PID tuning for dummies

7 years 1 week ago #29532366 by Erik
PID tuning for dummies was created by Erik
I can't get my PID-settings for closed speed mode right. On internet i found loads of websites/video's explaining it but does anybody know a very good/easy site where it is explained without too much technical talk?

From Blake i just learned that it's possible to use decimals, i would have never thought of that nor tried it.

Which method did you guys use to tune your motors?

Me and the Roboteq manual speak different languages which make me loose much time and cause a lot of damage to my robot, i 'm looking for a different approach this time.

Like this sentence from the manual: "Note that the controller uses one set of Proportional, Integral and Differential Gains for
both motors and therefore assumes that similar motor, mechanical assemblies and loads are present at each channel."

My Roborun uses PID-settings for each motor separate, would be nice to have 1 set for both motors (saves me much time) but it just doesn't work like that. Guess i understand everything in a wrong way.

A video about PID-tuning would be the best, i 'm more of a visual person instead of reading technical text.

Please Log in or Create an account to join the conversation.

7 years 1 week ago - 7 years 1 week ago #29532370 by Erik
Replied by Erik on topic PID tuning for dummies
x1. Configure the controller in Open Loop Speed mode.
2. Configure the position sensor input channel as position feedback for the desired
motor channel.
3. Click on the Run tab.
4. Enable the Feedback channel in the chart recorder.
5. Move the slider slowly in the positive direction and verify that the Feedback in the
chart increases in value. If the Feedback value decreases, then the sensor is backwards and you should either invert it or swap the motor wires so that the motor turns
in the opposite direction.
6. Move the sensor off the center position and observe the motor’s direction of rotation.
7. Go to the max position and verify that the feedback value reaches 1000 a little before
the end of the physical travel. Modify the min and max limits for the sensor input if
needed.
8. Repeat the steps in the opposite direction and verify that the -1000 is reached a little
before the end of the physical travel limit.

How can i move the sensor like mentioned at 6??? Or should that be the word "slider" instead of sensor???

At motorcommand one at 1000 my feedbacksensors read 637

Do i have to adjust that or is that for brushed motors since it's not in the brushless manual?

Please Log in or Create an account to join the conversation.

7 years 1 week ago #29532372 by Erik
Replied by Erik on topic PID tuning for dummies
I found it, i have to set the hall-settings to start counting from home position when 20.000 is reached or the motors will abruptly stop as fast as they can..can't find that in the brushless manual though.

Please Log in or Create an account to join the conversation.

7 years 18 hours ago #29532392 by Erik
Replied by Erik on topic PID tuning for dummies
Don't ask me why but the controller changes the hallsensor settings sometimes when going from open to closed loop. This will cause the motors to run full speed, suddenly stop and continue running at full speed.

Also the pulse pins for throttle/steering are swapped sometimes by the controller.

According to Blake it's NOT possible to use mixed mode steering in closed loop mode. Wished i had known that before, would have saved me 4 weeks of trial and error. I got it running though in closed loop speed mode with mixed steering but not perfect unfortunately.

The manual recommends PID-settings 0-1-0 but according to Blake it should be 1-0-0....small difference with enormous results (read issues). At settings 1-0-0 the motors have no power at all though and are very slow. The wheels do turn but without I-gain there's no power so it's useless for an autonomous robot. Will be continued...

Please Log in or Create an account to join the conversation.

6 years 11 months ago #29532407 by Erik
Replied by Erik on topic PID tuning for dummies
I give up!

The controller does NOT work in closed loop modes.

The manuals are rubbish and the fbl-2360 is not even in the list of the manuals.

The supportteam only refers to the manuals and claims it can drive as well in closed loop as open loop which is absolutely not true.

The support is far from sufficient and even let my motors run (by remotecontrol out of the headquarter in Arizona) on 60V 80A which they sure can't stand. After the "support" the motor could only turn but without any power at all, it even can't make the robot move, hope my motors are still undamaged though.

The software is very inconvenient and full of errors. When changing from open loop to closed loop it even changes the hall-settings by itself.

Roborun software makes my pc loose it's trackpad and the pc gets very hot from using it.

I wasted many months trying to make it work in controlled loop but it just doesn't work, AT ALL. Too bad, now i have to start all over again with my design and fix all the damage done by erratic behaviour of the motors. Lucky nobody got injured by a 30kg robot going full speed through the house uncontrolled.

Please Log in or Create an account to join the conversation.

6 years 11 months ago #29532409 by roboteq
Replied by roboteq on topic PID tuning for dummies
Closed loop speed mode works. I see that you have spent too much time struggling on your own. Please send direct message with your phone number at This email address is being protected from spambots. You need JavaScript enabled to view it.. We'll arrange teamviewer session and will work with you until is running good.

Please Log in or Create an account to join the conversation.

6 years 11 months ago - 6 years 11 months ago #29532410 by Erik
Replied by Erik on topic PID tuning for dummies
I lost some hours but found the issue, (also Blake found it but acted like it's normal).

In open loop mode the motors hallsensors call both positiv when given a positiv motorcommand. Negativ command leads to negativ counting.

When changing to closed loop position mode the motors suddenly don't count the same direction anymore, no matter what settings used (inverted or negativ hallsettings). They always turn the opposit direction of eachother.

I tried to swap 2 motorwires but then the motor won't run.

Haven't tried to swap hallsensor wires since they have a plus and negativ...can i just swap 2 of the 3 sensorwires at the middle of the Molexconnector? The outside pins are plus and minus.

This issue has been fooling me for months now, it drives me crazy and causes the motors to go beserk full speed, then stop abrupt to go again full speed...it caused cracks in my casing already and scares the heck out of me.

Mind you, my motors count 90 hallsteps on a full turn so they are 15 poles...don't know if that has to do with the issue.

Another issue i discovered is this:

In closed loop speed position mode the pulse inputs suddenly give full motorcommand, even when my rc-transmitter is turned off. On the run-screen i see the pulse-input at 2000 which is impossible...No idea where that comes from. When i disable the pulse-inputs the command is gone.

Please Log in or Create an account to join the conversation.

6 years 11 months ago #29532411 by Erik
Replied by Erik on topic PID tuning for dummies
VERY good manual again!

While in Open Loop, enable the Speed channel in the Roborun Chart recorder. Move the
slider in the positive direction and verify that the measured speed polarity is also positive. If
a negative speed is reported, swap the two encoder wires to change the measured polarity,
or swap the motor leads to make the motor spin in the opposite direction.

I don't have encoders but Hall-sensors. They do the same job though and the term encoder is used all the time because this manual is very old and not even for my brushless motors...how can you want me to use this manual? And it even doesn't work, i tried it!

Please Log in or Create an account to join the conversation.

6 years 11 months ago #29532420 by Erik
Replied by Erik on topic PID tuning for dummies
Well the manual is full of wrong info but the good news is that Roboteq will change it soon so you won't waste your time on wrong info.

Wait for the new firmware which will come soon, closed loop speed position mode doesn't work at the moment in mixed mode and you can't invert the motordirection.
My motors run in speedposition mode by PID 20-0-0....it is not recommended to use the I D settings because "it gives too many problems".

My motors run in closed loop speed mode by PID 1-0-0 and also mixed mode works...Forget about the manual which tells to try 0-1-0 and adjust while on the go, that doesn't work for me but i can't speak for your motors.

Please Log in or Create an account to join the conversation.

6 years 11 months ago - 6 years 11 months ago #29532437 by Erik
Replied by Erik on topic PID tuning for dummies
Yeehaa, now my robot works in closed loop speed position combined with mixed mode steering and pulse-input. It can drive over unlevelled floors and keeps position. It drives easy at 10 rpm which i need for sweeping/lawnmowing.

I use the improved firmware now. Thank you Roboteq!

Now i'll test to see if it can drive up ramps and goes fast to chase straydogs and use it's watercanon.

The only (small) issue is that the motors make noise when the robot stands still, have to figure out a softwaresolution for that so it goes into open loop mode when not received any motorcommands for 5 seconds and can swith back when commands are given. Also i need a solution so i can program an rc-switch to change the robot's speed easy...Any tips are welcome or i will study the subject myself and build it, only wished i had a good manual.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.094 seconds