Velocity Control Limit
Posted: Mon Jun 01, 2020 10:34 am
Good day,
I am working on a project that uses a RoboClaw and a DC brushed motor. The project requires switching from positive to negative speed as fast as possible. To command the velocity, I am using velocity control PID command 35
Send: [Address, 35, Speed(4 Bytes), CRC(2 bytes)]
Everything works fine for relatively small velocity jumps. Far larger jumps RoboClaw encounters stops controlling the motor speed. The motor simply stops.
Using command 38
Send: [Address, 38, Accel(4 Bytes), Speed(4 Bytes), CRC(2 bytes)]
seems to alleviate the issue, but I am making the response slower and it does not completely remove the problem. Similarly, if I change the PID tuning the velocity jump amplitude that determines the problem changes, but it is always there for some speed.
I have tried to apply PWM steps up to 80% Duty Cycle and both the motor and the electronics (I have a vclamp installed) manage the speed inversion with no problem. Unfortunately, the direct PWM control does not yield good speed tracking.
Is there some safety measure implemented in the velocity PID to avoid speed inversions? Is it possible to override it? In MotionStudio, there is a maximum error option, does it apply also to the PID? If so, I couldn't find the command in the documentation to disable that check.
I have tried to implement the PID manually, but unfortunately my code runs at too low a frequency to achieve the required bandwidth.
Any help would be appreciated.
Best regards
Matteo
I am working on a project that uses a RoboClaw and a DC brushed motor. The project requires switching from positive to negative speed as fast as possible. To command the velocity, I am using velocity control PID command 35
Send: [Address, 35, Speed(4 Bytes), CRC(2 bytes)]
Everything works fine for relatively small velocity jumps. Far larger jumps RoboClaw encounters stops controlling the motor speed. The motor simply stops.
Using command 38
Send: [Address, 38, Accel(4 Bytes), Speed(4 Bytes), CRC(2 bytes)]
seems to alleviate the issue, but I am making the response slower and it does not completely remove the problem. Similarly, if I change the PID tuning the velocity jump amplitude that determines the problem changes, but it is always there for some speed.
I have tried to apply PWM steps up to 80% Duty Cycle and both the motor and the electronics (I have a vclamp installed) manage the speed inversion with no problem. Unfortunately, the direct PWM control does not yield good speed tracking.
Is there some safety measure implemented in the velocity PID to avoid speed inversions? Is it possible to override it? In MotionStudio, there is a maximum error option, does it apply also to the PID? If so, I couldn't find the command in the documentation to disable that check.
I have tried to implement the PID manually, but unfortunately my code runs at too low a frequency to achieve the required bandwidth.
Any help would be appreciated.
Best regards
Matteo