Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PID stuff
01-12-2018, 10:40 AM (This post was last modified: 01-12-2018 11:15 AM by JJrobots JP.)
Post: #1
PID stuff
Hello!

I have been following balancing robots development for years, and now I decided to make one. Until now, this is the best mechanics/code I've found, with proper explanations, open source community... congratulations Jose and Juan!

I have a doubt/question about the stabilization PID. I have some experience programming PIDs at work so I was wondering why do you use a PD and integrate later... from what I know, integrating a PD is exactly the same as doing a PI, because the D integrated gives a P, and the P integrated results in a I.

I have been setting up my balancing robot with a PI in the stabilization stage, and it works the same, but the adjust and integral limit, etc... is more intuitive.

I have also seen that in your code, when you do the integration, the dt is not considered (in the PI and the PD it is considered), so if for some reason the main dt changed (a change in the IMU refresh timeout, for example) the PD part should be adjusted again.

A dt factor could be added to the integrator (and adjust again PD's) or a PI could be used, in which dt is already considered.

Just my two cents about almost a perfect code, for me. I'll post my updates when I finish my project.

Alex
Find all posts by this user
Quote this message in a reply
01-16-2018, 09:01 PM
Post: #2
RE: PID stuff
Hello scandermore,
your posting is interesting for me. I had tried such a change to PIDstableControl() (without this +=) and with an additional integral part, in order to reduce the oscillations while the robot is standing. It seems to be some better, but the driving stability was rather bad. The robot wasn't able to stop immediately when I drive throttle=0 with smartphone.
Which experiences could you make concerning that.

Claus
Find all posts by this user
Quote this message in a reply
Yesterday, 07:12 PM
Post: #3
RE: PID stuff
Thanks! Keep us updated with your version of the PID control.
Regarding the dt: actually, the gyro (MPU-6050) providing a continuously updated value periodically, gives us the dt reference. It gives the equivalent of a "hardware clock"
The current version of the PID control is the result of several iterations. This one makes the B-robot behaves nicely in the static position and while moving (it is a well balanced PID control) BUT there are other versions (not published) which make the B-robot extremely stable but (as VanDijk commented) not as smooth to control when the robot wanders around. We have been looking for the best compromise between standing stability and control.

As stated above, please keep us updated with your experience! The current PID configuration does not have to be the optimum one.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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