PID Tuning: intuitive understanding of PID gains

  Рет қаралды 2,356

Steppe School

Steppe School

Күн бұрын

Пікірлер: 18
@steppeschool3629
@steppeschool3629 2 жыл бұрын
When I first encountered PID, I struggled to understand how gains affect the system. Usually, I used to vary gains randomly, which never provided good results. If you have similar problems, this video is for you. After completing this video, you will understand PID gains better. You will be able to tune PID in a few steps. The code is available on: www.steppeschool.com/products/communities/steppeschool-miscellaneous www.patreon.com/user?u=80399744
@lamnhatoan9944
@lamnhatoan9944 8 ай бұрын
Great explanation!
@hamidkavianathar7405
@hamidkavianathar7405 11 ай бұрын
Thanks for teaching. it was great. I would like to ask you a question, could you tell me how often do you run PID controller function?
@steppeschool3629
@steppeschool3629 11 ай бұрын
Hi, I run every 1 ms. In other words, at 1 kHz frequency.
@hamidkavianathar7405
@hamidkavianathar7405 11 ай бұрын
Thank you so much @@steppeschool3629
@mohsenzadeh_de
@mohsenzadeh_de 2 жыл бұрын
You teach very well.🌸 Please prepare a sample project for the MODBUS-RTU network.
@steppeschool3629
@steppeschool3629 2 жыл бұрын
Thanks a lot! Noted👌
@AbhishekKanti
@AbhishekKanti Жыл бұрын
Nice! I am building a self balancing robot using a BO gear dc motor, l298n motor driver, arduino uno and mpu6050. I am stuck in a part. I dont know how to convert the output of the pid controller into pwm value of 0 to 255. It would be great if you could help me with this.
@steppeschool3629
@steppeschool3629 Жыл бұрын
Hello, I personally do not use Arduino on my projects, but what you can do is scale the output of the PID to fit the PWM value range. For that, you can identify scale gain by dividing the maximum of the PWM range(in your case, 255) by the maximum value of the PID output (you have to identify it). Then, when the PWM duty cycle value is needed, you multiply this gain by the output of the PID to obtain the PWM duty cycle value.
@AbhishekKanti
@AbhishekKanti Жыл бұрын
@@steppeschool3629 thanks man for your reply. This is the main problem I am facing that how to find the maximum value of PID . I am not getting this on KZbin or the internet.
@steppeschool3629
@steppeschool3629 Жыл бұрын
As I showed here kzbin.info/www/bejne/f6DEZ5uXnrupm6c You have to set a maximum value for the PID output and I-gain output. You can identify these values manually. Once you set them, defining the scale to get the PWM value will be straightforward.
@AbhishekKanti
@AbhishekKanti Жыл бұрын
​@@steppeschool3629 In the given video how did you find your max pid value?
@steppeschool3629
@steppeschool3629 Жыл бұрын
I thought you had already tuned PID and are looking for how to scale the PID output to the PWM duty cycle value. In that case, start with P-gain. Slowly increase the P-gain, and manually tilt your robot(maybe 10-15 degrees). At some point, it should oscillate. You can use that value for setting the max PID value(maybe 3 times this value might be the max value). Then, you can tune other gains, as pointed out in the video. There are no standard rules. You can manually try different values to find the best value for your case.
@jugnu361
@jugnu361 Жыл бұрын
🙏🙏🙏
@lohikarhu734
@lohikarhu734 7 ай бұрын
I figured that diff gain also increases response speed to perturbations of the motor speed, so that it may be possible to reduce the P gain... In your demo, it seems that you are showing the response from an uncontrolled state to a controlled state, rather than response to a perturbation of the load? Or? But, I'm just some old guy, who never did learn the mathematics part, more of a "hands-on" and conceptual driver.... 😀
@rajdeepdas86
@rajdeepdas86 Жыл бұрын
Must enable SWV trace in the debugger settings first
PID Controller Implementation in Software - Phil's Lab #6
20:06
Phil’s Lab
Рет қаралды 215 М.
How to Tune a PID Controller
18:14
PID Explained
Рет қаралды 120 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
STM32 Programming: Read PWM Input signal for Radio controller
19:42
Steppe School
Рет қаралды 3,3 М.
STM32 motor control: PID theory and implementation
10:52
Steppe School
Рет қаралды 19 М.
DC motor PID speed control
15:29
Curio Res
Рет қаралды 255 М.
STM32 ICM-20948 IMU Part 3: gyroscope and magnetometer bias removal
12:32
How to Tune a PID Controller
8:43
RealPars
Рет қаралды 819 М.
A PID Tuning Guide | Understanding PID Control, Part 4
12:05
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН