Go Down

Topic: Balancing Robot PID Problem (Read 1 time) previous topic - next topic

zhomeslice

#15
Mar 17, 2017, 07:35 am Last Edit: Mar 17, 2017, 02:52 pm by zhomeslice
Is it normal for balancing robot move forward even in balancing point cause my bot do so, i try to adjust the position my battery so it can balance but its not good enough, and i will try to tune its more now with more high kP because if its lean it just go forward and cant recover from its position

Ill wait sir.

Thank

Hadri
More Kp will help with recovering. The bot should be able to oscillate at about balance with only Kp. Having a little Kd  while tubing Kp could help. If your bot has a jittery shaking you're Kd value is too high. Adding Ki can correct for setpoint errors, But its best to start with Kp then Kd and add Ki last for final improvements.
HC

zhomeslice

I'm Struggling with some kind of delay possibly caused by the Kalman filter. I can get my bot to balance using the MPU6050's DMP code but it isn't responding correctly with your Kalman filter code. Still Testing.... 
HC

hadrizx

Sorry for late reply sir, just got trouble few days ago and now its fine.

should i go for the MPU6050 DMP ? is that different with kalman filter that i implemented ? actually i dont really know whats better for my bot and for DMP i dont really understand that and not have the example code to implement that on my bot.

i still struggling with the tuning i will try to record the video sir.

hadrizx

I'm Struggling with some kind of delay possibly caused by the Kalman filter. I can get my bot to balance using the MPU6050's DMP code but it isn't responding correctly with your Kalman filter code. Still Testing....
is it really the kalman filter i use make this error? can i upload a sketch of your bot to my bot so i can compare what is the different ?

Thanks

Hadri

zhomeslice

Sorry for late reply sir, just got trouble few days ago and now its fine.

should i go for the MPU6050 DMP ? is that different with kalman filter that i implemented ? actually i dont really know whats better for my bot and for DMP i dont really understand that and not have the example code to implement that on my bot.

i still struggling with the tuning i will try to record the video sir.
lets try this code out to see if it works on your bot.

you will need to use The calibration sketch to get good offsets for the MPU6050
Also you will need to modify Balancing_Bot_Works_.ino to work with your motor control
Let me know if this will balance your bot. I'm still trying to figure out how to get your code working :)

Z
HC

hadrizx

lets try this code out to see if it works on your bot.

you will need to use The calibration sketch to get good offsets for the MPU6050
Also you will need to modify Balancing_Bot_Works_.ino to work with your motor control
Let me know if this will balance your bot. I'm still trying to figure out how to get your code working :)

Z
i just tune the PID with kP = 35 without kI and kD its now a little bit stable sir, however its still jitter and lean forward a bit. ill update the video , so you can observe the behavior of the bot.

actually i want the bot balance and stable as good as i can so i can implement the bluetooth for control.

Thanks sir

Hadri

zhomeslice

i just tune the PID with kP = 35 without kI and kD its now a little bit stable sir, however its still jitter and lean forward a bit. ill update the video , so you can observe the behavior of the bot.

actually i want the bot balance and stable as good as i can so i can implement the bluetooth for control.

Thanks sir

Hadri
Kp set to 35 your output is 35 times your input so at 3° your PWM setting is at 105 + minimum. if you are wobbling back and forth rapidly your power to the motors is too intense.
HC

Go Up