Hello!
i am doing test to control the motor rotate at some speed. The control code is modified from
When controling the motor,i also plot the desired speed,actual speed and the error in real time.
Here is the plot:
speed at 25 radia/s:
and the plot at 50 radian/s:
- red line is the desired speed
- green line is the actual speed
- blue line is the velocity error
I have check the motor_board.cpp of BLMC_drivers to make sure that the actual speed
is already in rad/s,not krpm.
As you can see that the actual speed seems very noisy.
Here is my question:
- The velocity error interval is [-50,25], i think this is bad. does this means there is some problems with my encoder wheel?
- Can anyone tell me what the normal velocity error interval is expected?
- Does the speed needs some filtering?I try the low pass filter,the result is not good.
When i am doing the test, the error with error code=1 occurs sometimes,so i modified the udriver.
from
#define QEP_MAX_INDEX_ERROR (1./360.) * USER_MOTOR_ENCODER_LINES
to
#define QEP_MAX_INDEX_ERROR (10./360.) * USER_MOTOR_ENCODER_LINES
Does this make the encoder more inaccurate?
Best Regardsďź