Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pid tuning for low cg bot -- need help
09-26-2016, 05:51 PM
Post: #1
pid tuning for low cg bot -- need help
I need some help with the pid tuning of a low center of gravity bot. (or at least lower than the standard configuration of the current pids.

here is the situation.

with default pids, if I raise the bot via servo arm, it overshoots and comes back too far and lays back down again.

If I add some weight to the top of the bot, it does get better, but still overshoots.

Also, there is some oscillations about the center point when the bot has no input from osc. it appears to be hunting for balance and slight overshoot. This can be somewhat corrected by greatly reducing the the "normal" mode MAX_THROTTLE, MAX_STEERING, MAX_TARGET_ANGLE.

I have tried to move the sensor to different locations as well, but it does not seem to help. I thought it might be too much P in the raise up, but I am not sure.

Any help would be greatly appreciated.
Thanks
Find all posts by this user
Quote this message in a reply
09-26-2016, 06:49 PM
Post: #2
RE: pid tuning for low cg bot -- need help
Try the new feature in the jjrobots "official" APP. You can modify the PID values in real time:
https://play.google.com/store/apps/detai...2&hl=en_GB

There some info here: http://jjrobots.com/b-robot-evo-pid-cont...obots-app/
[Image: multipliers.png]
Find all posts by this user
Quote this message in a reply
09-27-2016, 05:03 AM
Post: #3
RE: pid tuning for low cg bot -- need help
Thank you for your reply, however, the pid tuning of the app does nothing for the raise_up function. I did however experiment and found a nice value of around 44 for the KD_RAISEUP solved my overshoot on raise up.

However, I am still having an issue with oscillations about the center point when the bot is still and not moving. It seems to be hunting for balance point.

I think that the default PID settings are great for moving around, however, I need to stop the wobble when not moving. I have played with all values in the "live" settings, but nothing seems to help. I have moved the sensor up away from the other electronics, did not help.

Anyone have any advice? I can increase the KD to compensate somewhat, but it makes the bot jerky when moving.

let me know if there is some other solution or known issue.
Thanks.
Find all posts by this user
Quote this message in a reply
09-27-2016, 08:28 AM
Post: #4
RE: pid tuning for low cg bot -- need help
Have you tried to put some weight in a higher point? This could sound illogical but imagine a very long stick, it is easier to balance in the "static" position the taller the stick is.
Find all posts by this user
Quote this message in a reply
09-27-2016, 02:45 PM
Post: #5
RE: pid tuning for low cg bot -- need help
(09-27-2016 08:28 AM)JohnQ Wrote:  Have you tried to put some weight in a higher point? This could sound illogical but imagine a very long stick, it is easier to balance in the "static" position the taller the stick is.
You will get much more inertia and your robot becomes slow and clumsy
Find all posts by this user
Quote this message in a reply
09-27-2016, 05:47 PM (This post was last modified: 09-27-2016 05:50 PM by power67.)
Post: #6
RE: pid tuning for low cg bot -- need help
I want to keep the CG as low as possible as it leads to a more nimble and faster reaction time on the balance point. I have everything working great except at a static stance.

I was wondering if anyone had tried a different pid loop for in and around the 0 point, say (adjusted_angle > -10) && (adjusted_angle < 10) ?

That way it would only apply a small amount of power for correction and reduce the overshoot or "hunting" close to center, but not effect the performance after movement is triggered via user input.

My goal is to soften the movement at rest.
Find all posts by this user
Quote this message in a reply
09-27-2016, 06:42 PM (This post was last modified: 09-27-2016 06:45 PM by sasa999.)
Post: #7
RE: pid tuning for low cg bot -- need help
(09-27-2016 05:47 PM)power67 Wrote:  My goal is to soften the movement at rest.
At rest there is very small movement and I think there is no need for another PID settings, but anyway you can add different PID setting for little less swing, but this will change also reaction to external forces.
Look at my robot
http://forumsjjrobots.com/thread-738-pos...tml#pid990
Find all posts by this user
Quote this message in a reply
09-28-2016, 02:46 AM
Post: #8
RE: pid tuning for low cg bot -- need help
sasa999, thank you for your response. I have looked deeply at your code segments and robot. That is half the reason I went with this kit. A good place to start... seeing what you have done with it.

currently, my bot does not stay anyway close to as stable at rest as your does. I will try to post a video of it doing its wobble. The wobble gets worse the more weight I add to the top.

here are my current PID settings

// NORMAL MODE PARAMETERS (MAXIMUN SETTINGS)
#define MAX_THROTTLE 980
#define MAX_STEERING 250
#define MAX_TARGET_ANGLE 20

// PRO MODE = MORE AGGRESSIVE (MAXIMUN SETTINGS)
#define MAX_THROTTLE_PRO 980 //680
#define MAX_STEERING_PRO 250
#define MAX_TARGET_ANGLE_PRO 40 //20

// Default control terms
#define KP 0.19
#define KD 28
#define KP_THROTTLE 0.07
#define KI_THROTTLE 0.04

// Control gains for raiseup (the raiseup movement requiere special control parameters)
#define KP_RAISEUP 0.16
#define KD_RAISEUP 44
#define KP_THROTTLE_RAISEUP 0 // No speed control on raiseup
#define KI_THROTTLE_RAISEUP 0.0
Find all posts by this user
Quote this message in a reply
09-28-2016, 05:09 AM
Post: #9
RE: pid tuning for low cg bot -- need help
at my wits end. after some issues with the original kit shipping without some needed parts, and now this, I have to wonder if one or all electronic parts are not any good from the kit.

here is what I have done to try to solve the issue:

installed multiple stepper drivers
moved mpu6050 to different locations
tried multiple types of wheels
moved wires around to remove RF noise
removed servo (the one that shipped with the kit burned up after only a few attempts to lift the bot)!!
tried different power supplies, and isolated the voltage to each board
adjusted the vref on stepper drivers +-

Not sure what else to do except give up on the project.

I need some help please.

here is the video of the wobble at rest.



Find all posts by this user
Quote this message in a reply
09-28-2016, 08:33 AM
Post: #10
RE: pid tuning for low cg bot -- need help
Where did you place the batteries? In the default location?
Watching the video I can tell you that you can improve a little that oscillation (play with the P parameter) but sacrificing agility. The current parameters are balanced and will allow you to control the Brobot with agility and at the same time they give stability in the static position. One or the other. As sassa999 stated before, moving up the centre of gravity will make the Brobot less agile but will improve the static oscillation.

Even a Segway oscillate when there is no one on top of it.

Some students here, in the academy, where playing a lot with the PID parameters and got to the same outcome. I will try to get the parameters and post them here, in the FORUM
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)