- Forum
- Roboteq Motor Controllers
- Troubleshooting
- SDC2130, PID integrator component gets reset every few seconds.
SDC2130, PID integrator component gets reset every few seconds.
After playing a lot with config parameters, at some point I noticed that in a closed-loop speed mode sometimes there is a sudden drop in power.
I used board: SDC2100 v1.4 1104
Firmware: May 25, 2013 version
I had two pads shortened on P5 to enable the firmware to work (dev.roboteq.com/dev1/index.php/forum/10-...version?limitstart=0)
All the pictures here are with firmware version RCB100 08/25/2011 because at last, when I ran out of possible ways to solve this problem, I decided to try to roll back to an older version of the firmware on which I did not experience this problem. I also removed the wire between P5 two pads. This didn't help.
I noticed that it's only when KI is non-zero, the problems can be observed. So I set KP and KD to zeros. Picture motor2.png attached to the post demonstrates that every few seconds loop error becomes equal to the set point (~35 in this experiment)
What is kind of interesting is that if both motors are on, those loop error peaks occur at the same time (see both_motors.png). They are like synchronized.
Then I dig a little deeper. I wrote a small script to print Error and Power on a motor (script attached: catch_the_bug.mbs). And I found out that every few seconds the power suddenly drops to zero, even though the error is still the same (see line 283 of the attached full_log.txt). This consequently results in error starting to grow, and power grows slower (see the log). This doesn't look an expected behavior from an I-controller.
My motor controller Profile.xml is attached.
Other things I tried:
- Reset to default settings: didn't help
- When KI==0 there is no drops. Controller is stable.
- With some configurations I noticed there the problem was observed only when an external resistance force was applied to the motor
Please help.
Please Log in or Create an account to join the conversation.
- Griffin Baker
If you'd like go ahead and send us an email with your files to This email address is being protected from spambots. You need JavaScript enabled to view it.
Also in the closed loop speed, are you setting the max speed rpm of the motor to the full potential. The default is set to 1000 RPM's. If the motor is rated for 3500 RPM's, then in this mode, the speed will basically get choked so that it stays at 1000 RPM's or less.
Also in this mode, the Integral gain will have influence over the proportional gain. If you set them starting at say the following, does the same thing happen?
P:0
I=5
D:0
You will want to tune the I and a little P as needed.
Please Log in or Create an account to join the conversation.
The max rpm is set to 1000, yes, but my set point in the closed loop experiment is just 35.Also in the closed loop speed, are you setting the max speed rpm of the motor to the full potential.
Due to some technical diffficulties (it was an existing system which we modified), the encoders are attached with a gear reduction of 2.6. So encoder RPM=35 actually means Motor RPM=91. Motors are rated to 4600RPM.
Please Log in or Create an account to join the conversation.
Also in this mode, the Integral gain will have influence over the proportional gain. If you set them starting at say the following, does the same thing happen?
P:0
I=5
D:0
In my experiment the settings were: P=0, I=1, D=0.
I just tried setting P=0, I=5, D=0 as you suggested. The result is almost the same (see attached pic).
Please Log in or Create an account to join the conversation.
- Griffin Baker
I'll take a look at the rest of the stuff, but if you haven't already done so, have you disabled the loop error detection in the closed loop parameters? This may possibly be a cause for the motor power to go to zero unexpectedly.
Please Log in or Create an account to join the conversation.
Yes, I have. I think I tried disabling almost all safety parameters.I'll take a look at the rest of the stuff, but if you haven't already done so, have you disabled the loop error detection in the closed loop parameters? This may possibly be a cause for the motor power to go to zero unexpectedly.
Please Log in or Create an account to join the conversation.
loop1:
error = GetValue(_E,2)
power = GetValue(_P,2)
print(error, ",",power, "\r")
wait(0)
goto loop1
This allowed me to generate a log with 1ms resolution (in the attached zip-file). First value is the error, and second value is power. You can see how power drops on lines 174, 482, 2838, 3146, 5810, 7259, 5467.
Please Log in or Create an account to join the conversation.
- Griffin Baker
Please Log in or Create an account to join the conversation.
- Griffin Baker
In the Run tab, set the following channels.
Motor command 1
Motor power 1
Speed RPM1
Motor command 2
Motor power 2
Speed RPM 2
Run your motors for a minute or 2. Then stop both motors.
On the bottom there is a save log button, click on that and upload that log file.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Forum
- Roboteq Motor Controllers
- Troubleshooting
- SDC2130, PID integrator component gets reset every few seconds.