Hardware Demo of a Digital PID Controller

  Рет қаралды 990,055

Gregory L. Holst

Gregory L. Holst

Күн бұрын

The demonstration in this video will show you the effect of proportional, derivative, and integral control on a real system. It's a DC motor connected to an optical rotary encoder (quadrature) and is controlled by a digital control loop implemented on a TI Launch Pad MSP432. It uses a series of timers and interrupts to generate the PWM signals to the H-Bridge motor driver, read the pulses from the encoder, and calculate the control effort using a PID control algorithm. It also implements an anti-windup algorithm to improve the system stability since this is a real system and the motor saturates easily.
If you listen, you can hear the PWM signal whine as it adjust the current to the motor. When I push on the flag with my hand you will hear it go quiet. That's when the PWM is at 100% duty cycle and the audible PWM AC current going to the motor is now DC.
Post a comment if you liked the video!
You can download the code, design files, and parts list here:
github.com/ard...
(out of date: sourceforge.ne... )
Enjoy!
www.gregoryhols...

Пікірлер: 427
@AmitsLife
@AmitsLife 3 жыл бұрын
Thank you for not using any music
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@julians.2597
@julians.2597 3 жыл бұрын
@@John-eh2zc not doesnt like music, doesnt like annoying background music in tech videos. Usually because one either cant listen to it atm or is already listening to their own music, or because the music used is really bad stock music
@pfaprado
@pfaprado 7 жыл бұрын
Man this is the best summary of PIDs an engineering student could get. Thank you!
@marcioandreyoliveira
@marcioandreyoliveira 7 жыл бұрын
Forastieri I second you. This demo is simply amazing. I loved it a lot .
@arduinoNube
@arduinoNube 6 жыл бұрын
I'm glad you found it helpful! I actually built this for a mechatronics class demonstration at Georgia Tech where I did my teaching practicum (TA) during grad school.
@jonatan01i
@jonatan01i 6 жыл бұрын
Thank you very much for sharing it with us!
@nialv7985
@nialv7985 6 жыл бұрын
That is a very expressive hand
@auzworld
@auzworld 4 жыл бұрын
Yeah..its like its got a life of its own !!
@vivekvenkatsubramaniam437
@vivekvenkatsubramaniam437 4 жыл бұрын
I read it as 'expensive' and wondered why a prosthetic arm looked so real
@itzm1kea
@itzm1kea 3 жыл бұрын
I read expensive too ^^😄
@nicolassoncini2266
@nicolassoncini2266 4 жыл бұрын
I watched this video 4 years ago and now I'm doing my master's thesis on control and just today as I was thinking about it, it popped back into my recommended. Love it!
@arduinoNube
@arduinoNube 4 жыл бұрын
Nicolas S. Thank you for taking time to leave a note. I hope your thesis goes well! Glad you found the video helpful!
@martinmiglio
@martinmiglio 5 жыл бұрын
I wrote a final paper on this concept for one of my math courses, yet this video explains the main idea in 3 minutes
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@engvdo5297
@engvdo5297 5 жыл бұрын
It's amazing. till now we seen only formulas and heard something like PID. But, now we can understand practically how it's work Thank you so much
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@quahntasy
@quahntasy 4 жыл бұрын
*Finally in 2020 I found a hand that talks. Way explanatory video than people actually talking to explain*
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@21mejia25
@21mejia25 2 жыл бұрын
I heard about PID control from people in the BBQ world, but had no idea what it actually meant. Now, I am weeks away from getting a degree in Mechanical Engineering and I have a much better understanding. Your video really solidified everything and provides an excellent explanation of PID control. As a side project, I am going to build a PID controller to regulate temperatures of a smoker with the use of a fan.
@j3s0n
@j3s0n 4 жыл бұрын
The idea of using a pendulum to demonstrate this is genius as it's so easy to imagine the movement in relation with underdamped and critically damped graphs in your minds eye
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@PeteVree
@PeteVree 7 жыл бұрын
This is phenomenal. So cool that you've shared the code, etc. Thanks so much.
@arduinoNube
@arduinoNube 7 жыл бұрын
Np. Let me know if you find it useful. -G
@ColinMcNulty
@ColinMcNulty 3 жыл бұрын
I was a Motion Control Engineer in my very first job 25 years ago, long before robots were cool like they are today. I worked on streamlined robotic arms inside wind tunnels, satellite tracking TV transmission vans, formula 1 racing car "4 poster" testing rigs, air-to-air missile testing systems, and tank tracked robots that would crawl inside nuclear reactors using neodymium magnets that hugged the surface so they could drive upside down held up by magnetism! At their core, all those projects worked because of PID control of DC motors. Some days I wish I'd staying in that industry... :-/
@Homo_neanderthal
@Homo_neanderthal 3 ай бұрын
Hi! Thanks for sharing your experience. Why did you leave the industry and where are you now?
@vilmondesribeiro4363
@vilmondesribeiro4363 6 жыл бұрын
Phenomenal, and congratulations, this will help our students to understand PID and closed loop control systems.
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@IncroyablesExperiences
@IncroyablesExperiences 5 жыл бұрын
Very clear, great job!
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@danielnilsson7393
@danielnilsson7393 3 ай бұрын
Damn this is the best explanation of PID I've ever seen and it's in under 3 minutes
@gams101
@gams101 6 жыл бұрын
This is such a good demonstration about understanding the PID. I really wish I found out this video quite earlier when I was having a project in my Control System subject so that it would be less bloodier for my group.
@AUTEM_Industrial_Automation
@AUTEM_Industrial_Automation 2 жыл бұрын
At GeorgiaTech, Atlanta, I've had the change to physical watch this demo in ME6405 course with J. Rogers. Great job Gregory ! 👍
@W00PIE
@W00PIE 2 жыл бұрын
Currently working on a DIY PID controller for homebrewing, I have just finished some tests and also ran some auto-tuning methods (Ziegler-Nichols), now I have the maximum overshoot down to 0,1K, which is really nice. But boy, it takes time! The output is used as PWM control for an SSR with a cycle time of 5 seconds. It must be fun to work with a system that reacts so fast like yours, you get instant feedback and can tweak more or less in realtime. I think, I'll build something similar, just for fun!
@doruxan
@doruxan Жыл бұрын
Hey man. Can you give some insigths and maybe some articles or content to implement a self tuning pid?
@chaitanyapatil7513
@chaitanyapatil7513 Ай бұрын
hey man please help me with this project
@martin840909
@martin840909 Жыл бұрын
Great video, clear shows the function of PID. It is much better than many explanation videos with too many words and formulas.
@rogerandersen7046
@rogerandersen7046 5 жыл бұрын
i kinda now want just this youtube channel to have loads of videos of strange electroprojects with this talketive hand.
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@Dillbeet
@Dillbeet 3 жыл бұрын
This perfectly bridged the gap between the math and real world output! Thank you :)
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@naboulsikhalid7763
@naboulsikhalid7763 6 жыл бұрын
you saved my day. I couldn't wish more. Now I saw all these constants working, their effects in real time. thank you very much
@MunamNaseer
@MunamNaseer 7 жыл бұрын
Thank you so much Mr.Gregory L. Holst , I salute you for such a great heart to share everything , it will help us to understand working and implementation of PID controller. You are at place of my professors. I will start working on your efforts . Thank you thank u again.
@MrImmi34
@MrImmi34 5 жыл бұрын
One button, controls so many gains, frequency code... amazed.
@ms2649
@ms2649 9 ай бұрын
I never quit knew how to prevent windup properly, i used to just reset the error when target was reached and it "worked" but was not how it should be done. Had a look at your code and now have a better understanding of how to do it
@milindgulve9136
@milindgulve9136 5 жыл бұрын
This is one of the best Explanations for PID With practical meaning I have ever seen and understood. Thankyou !
@dekyed
@dekyed 2 жыл бұрын
Finally a great demonstration to help us visualize these ideas!
@kaili9552
@kaili9552 3 жыл бұрын
best PID illustration video I have ever seen.
@abdellahbarrous8516
@abdellahbarrous8516 3 жыл бұрын
Best video on PIDs ! Short, well explained and covers all aspects of the subject.
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@zvikagivli7665
@zvikagivli7665 5 жыл бұрын
KZbin was made for this kind of videos. GREAT!!!
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@isettech
@isettech 3 жыл бұрын
For high speed servos, it is common for the PID to be clocked at 6MHZ or more. Some applications are analog using 3 summed op amps. One for each component of PID. They are more difficult to tune. The Proportional is simple and can use a pot for gain. Derivative and Integral have both gain and time components which must be timed to the motor and load to be properly tuned. The gain is simple with a pot, but the time, involves changing capacitors, or changing the clock rate on a switched capacitor low pass filter, or other adjustable low pass filter.
@MrPashee
@MrPashee 2 жыл бұрын
Best explanation of PID I've ever seen.
@passion7312
@passion7312 4 жыл бұрын
Finally after watching lot of videos about pid, your video helped me to understand pid easily. Thankyou
@Tadesan
@Tadesan 6 жыл бұрын
I worked at a company where the PID control was referred to as Pissing In the Dark. Man those guys sucked. You rock!
@laworder416
@laworder416 5 жыл бұрын
hehehe what is the name of that company?
@turk639
@turk639 4 жыл бұрын
well it kinda is, you have to find the right parameters for it to work really well for your application, though once you find them it can be hella tight, though finding these controll parameters is an art and not really a science
@Aw4yed
@Aw4yed 6 жыл бұрын
man i never understand the pids but now with ur video it looks really easy
@natarajana.v4262
@natarajana.v4262 4 жыл бұрын
Best explanation for a PID controller. Very practical and amazing.
@camilomartinez1105
@camilomartinez1105 6 жыл бұрын
I love control theory, it's my favorite branch of electronic engineering Greetings from Colombia
@RetroCarton
@RetroCarton 8 жыл бұрын
Very well explained video. It's a great project Maybe you should do a basic tutorial for dummies on the P, I and D effects on the control system, it would be a great idea
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@marlinderwall8873
@marlinderwall8873 4 ай бұрын
I don't do control systems but I did IT work in refineries. Why control systems engineers needed advanced degrees makes a lot more sense now.
@AdaptivePhenix
@AdaptivePhenix 3 жыл бұрын
Excellent stuff! I would add one extra feature: u = Kp*error + Ki*error_i + Kd*error_d + offset; Sometimes we have a deadband or the axis is fighting gravity; In reality, the Ki can never stabilise the axis.
@thegreatzoom5073
@thegreatzoom5073 3 жыл бұрын
I don't see why it couldn't? The I term just keeps accumulating error and would end up reeling in that offset or deadband on its own right? And if it's oscillating over the point then the D term is supposed to dampen those oscillations.
@lucasmatsuoca
@lucasmatsuoca 4 ай бұрын
@@thegreatzoom5073 Ki*Error_i can and will be enough to get to reference with propper Anti-windup, or, if necessary, with some sort of adaptive PID gain. Never heard of this "+offset", but it might be a thing, i just never heard of
@TeDoFwAr
@TeDoFwAr 6 жыл бұрын
Thank you. The missing info is found..... And all the code to build and explore further. Legend!
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@cyrelharris
@cyrelharris 7 жыл бұрын
Awesome demo. For me this is very informative and I recommend that everyone, using PID controls should watch this video.
@acrobat9983
@acrobat9983 7 жыл бұрын
Probably the best PID Vid on KZbin :)
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@miguelangelluengotoledano7106
@miguelangelluengotoledano7106 3 жыл бұрын
Thank you very much for sharing your excellent work with all of us.
@emreipek4485
@emreipek4485 5 жыл бұрын
I couldn't understand PID controller how to use in real life. Perfect work! Thanks a lot :)
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@melhariri6720
@melhariri6720 7 жыл бұрын
A brilliant video demonstration with clarity and simplicity...well done! Thanks for the contribution.
@inibapakbudi
@inibapakbudi 5 жыл бұрын
Wow. Thanks for the video. Actually, my Final Project when in college is similar to this, but only Software simulation. And you make my dream come true!
@MrSaemichlaus
@MrSaemichlaus 4 жыл бұрын
Excellent teaching! Practical, hands-on and playful.
@MAYDAYDEEJAY
@MAYDAYDEEJAY 6 жыл бұрын
I don't think I've ever seen better explanation of PID :) Very Nice !
@jonathanrabe3727
@jonathanrabe3727 4 жыл бұрын
Dude, you nailed that! That looks perfect, and you didn't even fine tune the parameters but it still works so good...
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@brodiemacleod69
@brodiemacleod69 10 ай бұрын
Video so good you did all the teaching my proof needed when showing this to our entire lecuture lol
@Gameplayer55055
@Gameplayer55055 4 жыл бұрын
Very useful video for learning PID technology. I just made Minecraft thermostat with it, thanks!
@arduinoNube
@arduinoNube 4 жыл бұрын
Oh! Can you make a video/screencast and post a link?
@Gameplayer55055
@Gameplayer55055 4 жыл бұрын
Working in progress
@damny0utoobe
@damny0utoobe 6 жыл бұрын
Love it. Great logical explanation. Makes control systems look easy
@mathurhp
@mathurhp 5 жыл бұрын
This demonstration is what they must be showing in classrooms.
@rojbinandan2806
@rojbinandan2806 4 жыл бұрын
Excellent example of PID controller
@spastor92
@spastor92 4 жыл бұрын
I dont know why i am here but is so satisfying
@Egon3k
@Egon3k 3 жыл бұрын
so satisfying when it is set up correctly :)
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@nosweat9841
@nosweat9841 7 жыл бұрын
Great illustration. I'll share it with my fellow techs.
@wyvern4588
@wyvern4588 6 жыл бұрын
Amazing this system can control multi-copters with so much noise, multiple motors wind drag and infinite different forces at work. Now when this system wigs out, your drone is hell on blades.
@midwestmangos2452
@midwestmangos2452 5 жыл бұрын
IIRC almost every drone controller already uses PID in their software.
@WofWca
@WofWca 6 жыл бұрын
Awesome. 10 hour version pls. Ok, just a little bit more would be enough.
@arduinoNube
@arduinoNube 6 жыл бұрын
I do take requests. :) thanks for the comment. As soon as I hit 1000 subscribers I’ll make another video. Which would you prefer 1) how to build and program a PID controller or 2) a more in depth run through of what I showed in this video? Reply with a 1 or 2 and I’ll make the one with the most votes.
@midwestmangos2452
@midwestmangos2452 5 жыл бұрын
@@arduinoNube both, but if I had to pick just one I'd say #2. There's tons of libraries and example codes of PID controls for Arduino and other controllers out there, and it would be nice to have a good walk through explaining how to set it all up, but having the deepest and best understanding of the PID system itself can help with tuning and optimizing of any of those systems.
@bofasaldana6849
@bofasaldana6849 2 жыл бұрын
Thank you so much for this video!
@MrBobWareham
@MrBobWareham 6 жыл бұрын
Very good demo of PID control nice demo hardware well made and executed
@junaidayaz6011
@junaidayaz6011 6 жыл бұрын
I just have to say.i have not learned all this in control systems in 6 months in my semester,as from this 3 mins video..Thanks man!
@charmindesai3730
@charmindesai3730 Жыл бұрын
You actually deserve more than a million views until now :)
@elena6516
@elena6516 2 жыл бұрын
this is awesome, thank you for this!
@paulocesarestradasoplin5078
@paulocesarestradasoplin5078 3 жыл бұрын
Extremely awsome demonstration, great job!
@mikeallenfpv
@mikeallenfpv 3 жыл бұрын
This is very cool thanks for demonstrating!
@vextrek6036
@vextrek6036 3 жыл бұрын
Now that is an awesome video. Thank you for doing this.
@chrisbryden8102
@chrisbryden8102 8 ай бұрын
An absolutely amazing demonstration and final result!!!
@MuhammadHamza-ul5ky
@MuhammadHamza-ul5ky 5 жыл бұрын
Your demonstration is FAB. 👌 Thank you !
@deathpony698
@deathpony698 5 жыл бұрын
This is on par with a 400 level course I spent $3000 on... cool
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@yahuiz7877
@yahuiz7877 4 жыл бұрын
you bring to light for my embedded project! Thank you!
@AJ-et3vf
@AJ-et3vf 2 жыл бұрын
Awesome video! Thank you!
@johanelmander3787
@johanelmander3787 6 жыл бұрын
Best explanation ever.
@realdragon
@realdragon 4 жыл бұрын
I have no idea what it is or what you said but it was fun to watch
@luistorh
@luistorh 5 жыл бұрын
Thanks for a video where every second tells! 3 min. of PID essence.
@milindgulve9136
@milindgulve9136 7 жыл бұрын
Good Example of PID Control system.
@sharmashaun
@sharmashaun 5 жыл бұрын
Best demonstration on youtube!! Thanks a lot
@kaoshavoc
@kaoshavoc 6 жыл бұрын
Awesome. Wish i had seen this when i was making a pid out if an arduino.
@cate01a
@cate01a 2 жыл бұрын
super helpful! though god pids are such hell to make and account for the numerous errors and stuff!
@knowtheunknown2840
@knowtheunknown2840 4 жыл бұрын
awesome demonstration
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@esnatzea
@esnatzea 5 жыл бұрын
Thank you! Really awesome and very good to understand the concept!
@giovannibianchessi1578
@giovannibianchessi1578 7 жыл бұрын
Great, clean and instructive demo! Thank you.
@BKK-Japan1
@BKK-Japan1 5 жыл бұрын
Your force is strong.
@MrJacobbbo2
@MrJacobbbo2 6 жыл бұрын
If only my multi rotor was tuned so well.
@cetyl2626
@cetyl2626 5 жыл бұрын
I wonder if windup is a problem in multi rotors? I don't recall seeing that parameter.
@georgegx95
@georgegx95 5 жыл бұрын
@@cetyl2626 modern multirotor code has way more pid controller improvements than just windup, but for curiosity reasons here you go: github.com/betaflight/betaflight/search?q=windup&unscoped_q=windup
@caradu9973
@caradu9973 6 жыл бұрын
. this is excellent I need to do my pids on my quad copter and nobody has been able to explain it quite right every time I watch a video now on how to do it for a quad I'm going to link this in the comments thank you very much!!
@arduinoNube
@arduinoNube 6 жыл бұрын
I'm glad you liked it! Thanks for sharing it!
@maxounette-jv7dj
@maxounette-jv7dj 6 жыл бұрын
A masterpiece! It's good you made it silent, because if its needed we could be put on pause without having half a sentence ;)
@landonjacobs815
@landonjacobs815 3 жыл бұрын
kzbin.info/www/bejne/l4DPZYytdqysjNk
@fabriglas
@fabriglas 4 жыл бұрын
wish we had this in college. Control was my least favourite subject because it was not very practical best explaintion of the material I have ever seen!!!!!!!!!!
@toledomerendo
@toledomerendo 5 жыл бұрын
Neato! Thanks for sharing this with the world!
@ethanoch
@ethanoch 3 жыл бұрын
Great demo!
@pablodiazsainz2367
@pablodiazsainz2367 Жыл бұрын
Thats a fantastic job!
@alfredtang6154
@alfredtang6154 3 жыл бұрын
Great video!! thank you!!
@RodrigoCruz-iz3kb
@RodrigoCruz-iz3kb 6 жыл бұрын
Amazing! Your videos are helping me a lot in control theory!
@mhranmrad3284
@mhranmrad3284 2 жыл бұрын
You are amazing , thanks a lot.
@quantenschaum
@quantenschaum 4 жыл бұрын
Very nice demonstration. Thank you. Many commented, that it's a good explanation, but it does not explain anything, it just shows it in operation. Is there more information about the exact setup, the motor, position sensor, controller, software?
@RixtronixLAB
@RixtronixLAB 6 ай бұрын
Creative video, thank you:)
@jaimerdz3274
@jaimerdz3274 6 жыл бұрын
Thank you for this great demostration.
@syahrul9282
@syahrul9282 4 жыл бұрын
Holy shit the last one is really satisfying
@punpck
@punpck 6 жыл бұрын
great demonstration! the best on summary I've ever seen :)
@kunalpanchal7751
@kunalpanchal7751 7 жыл бұрын
Awesome presentation of control theories.. Loved it..!!
@heffaynekoguy687
@heffaynekoguy687 3 жыл бұрын
Jesus Christ this is going to help me so much 😅
What is a PID Controller? | DigiKey
22:19
DigiKey
Рет қаралды 82 М.
PIDs Simplified
13:07
SiieeFPV
Рет қаралды 297 М.
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 26 МЛН
规则,在门里生存,出来~死亡
00:33
落魄的王子
Рет қаралды 27 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 27 МЛН
I Built a Ball Balancing Robot
8:55
Aaed Musa
Рет қаралды 1,1 МЛН
DC motor PID speed control
15:29
Curio Res
Рет қаралды 238 М.
PID Balance+Ball | full explanation & tuning
13:13
Electronoobs
Рет қаралды 746 М.
Controlling Self Driving Cars
4:41
AerospaceControlsLab
Рет қаралды 508 М.
Ball and Plate PID control with 6 DOF Stewart platform
3:32
Full Motion Dynamics
Рет қаралды 2 МЛН
What Is PID Control? | Understanding PID Control, Part 1
11:42
MATLAB
Рет қаралды 1,8 МЛН
How to control a DC motor with an encoder
9:30
Curio Res
Рет қаралды 442 М.
Empirical PID gain tuning (Kevin Lynch)
7:08
Northwestern Robotics
Рет қаралды 160 М.
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 26 МЛН