PID Velocity Control in Python

  Рет қаралды 40,998

APMonitor.com

APMonitor.com

Күн бұрын

Пікірлер: 29
@duwir5959
@duwir5959 Жыл бұрын
but where is the code of the pid controller? could not find them?
@apm
@apm Жыл бұрын
See "Show Sample Code" here: apmonitor.com/pdc/index.php/Main/ProportionalIntegralDerivative
@donaldsummers4831
@donaldsummers4831 3 жыл бұрын
Great video, learned a lot! I used the first program to generate the first order response and it worked fine. Then I pieced together the last program (could not find at your website; just the first program) from your video to do the PID analysis. It basically worked but ... it created 300 figures. Had to delete the first 299 figures to get to your only figure on youtube. In other words, my 300th figure was the same as your 1st figure. I guess this is more of a Pycharm (I have version 2020.3, Python 3.9) question. Could you please explain to a Python programmer newbie how to only plot the final figure? I tried my best but couldn't figure it out. Thanks!
@apm
@apm 3 жыл бұрын
Here is a version that may help: github.com/APMonitor/pdc/blob/master/Velocity_Control.ipynb with "from IPython import display" and "display.clear_output(wait=True)". This video is solution help for my class. I don't include the controller development portions, just the open-loop step test so that they get the practice of coding a PID controller. Thanks for your comment - I created the Jupyter notebook based on your feedback.
@donaldsummers4831
@donaldsummers4831 3 жыл бұрын
@@apm Thanks so much for the quick reply. The "display" related code didn't help. I duplicated your final PID program perfectly but you didn't show any code after plt.xlabel('Time (sec)') statement in your video. Typically the last bit of code is plt.show(). I wasn't sure if you used a special version of that command or added additional commands to stop it from creating 300 plots. Again, I have no experience with Python or Pycharm so I may be asking dumb questions. Sorry for being a pest!
@rrc
@rrc 3 жыл бұрын
@@donaldsummers4831 try animate=False to not create all of those plots. I didn't use any special commands.
@donaldsummers4831
@donaldsummers4831 3 жыл бұрын
@@rrc Okay, thanks.
@nodonrom5261
@nodonrom5261 3 жыл бұрын
Does anyone where to find sources for These IMC or ITAE Tuning correlations? Im writing my thesis and want to use these. But cant find any Paper or book with These values
@apm
@apm 3 жыл бұрын
Here are the tuning correlations: apmonitor.com/pdc/index.php/Main/ProportionalIntegralDerivative You can find the original citations in Seborg, Edgar, Mellichamp, Doyle (Process Dynamics and Control).
@nanajerry824
@nanajerry824 3 жыл бұрын
DR RORPOPOR HERBAL on KZbin changed my entire life with his herbal medicine. I appreciate you sir, for taken away my PID 🌿🌿
@dendanedjalil2436
@dendanedjalil2436 4 жыл бұрын
how about doing the implementation in the hardware (programming the controller in the ecu of the car for exemple),??? can you please do some videos on the topic because that's what really is difficult to a lot of student and fresh engineers
@apm
@apm 4 жыл бұрын
Here is a hardware implementation of PID with an Arduino microcontroller: apmonitor.com/heat.htm Implementing PID control on a real system is an important part of the PDC course with 23 exercises: apmonitor.com/pdc (see Schedule link).
@17Koche
@17Koche 6 жыл бұрын
Excellent tutorial!
@rubenhernandez9725
@rubenhernandez9725 5 жыл бұрын
Where is the PID controller in the program? a PI controller is simulated in the program, not a PID i guess.
@apm
@apm 5 жыл бұрын
Here is the info on PID controllers: apmonitor.com/pdc/index.php/Main/ProportionalIntegralDerivative Most PID controllers have a zero for the derivative term.
@imamnegeri8825
@imamnegeri8825 6 жыл бұрын
Its so awesome tutorial sir, thanks
@eduardodonjuan1647
@eduardodonjuan1647 4 жыл бұрын
how can I get the transfer function out of this controller?
@apm
@apm 4 жыл бұрын
Here is some help on transfer functions for the process: apmonitor.com/pdc/index.php/Main/TransferFunctions and for the controller: apmonitor.com/pdc/index.php/Main/TransferFunctionBlockDiagrams
@bennguyen1313
@bennguyen1313 5 жыл бұрын
Is it possible to use real hardware for the input, for example a usb gaming pedal.. and visualize the RPM / Velocity real-time?
@apm
@apm 5 жыл бұрын
Yes, that should be possible. Here is an example of inputs and outputs from a physical device over a USB serial connection: apmonitor.com/heat.htm
@ferm.1313
@ferm.1313 6 жыл бұрын
Eres el mejor gracias.
@wonjaein
@wonjaein 4 жыл бұрын
Thanks!!
@captnawesome06
@captnawesome06 5 жыл бұрын
To make work in 3.7: Go down to the for loop find v = odeint(vehicle.....) And make it v = odeint.odeint(vehicle....) Otherwise you will get a module object is not callable :)
@apm
@apm 5 жыл бұрын
The example code at apmonitor.com/pdc/index.php/Main/SpeedControl is still valid with Python 3.7. You may have imported your odeint package differently. I used "from scipy.integrate import odeint". Did you use something like "import scipy.integrate as odeint"? It appears to be what you did because of the odeint.odeint().
@aliumara2139
@aliumara2139 7 жыл бұрын
It’s very useful discerption I have a lot of questions can send email for you ?
@apm
@apm 7 жыл бұрын
Hello Ali! Thanks for watching the video. I'd recommend that you visit the process dynamics and control course at apmonitor.com/pdc for more information. Unfortunately, I don't have time to respond to a lot of individual questions. There are over 150,000 views each month and it is hard to keep up with all the comments. Feel free to ask a question on the KZbin channel and I'll do my best to respond to it.
@aliumara2139
@aliumara2139 7 жыл бұрын
APMonitor.com thank you to reply me. I got master degree in chemical engineering advance process and I am planning to start teaching the students For the college level for advance processes and control I found ur Chanel it’s useful for me and other people I want to put the information as reference for me and my search now for the parallel computing can u give some advices for my idea thanks agin
@apm
@apm 7 жыл бұрын
+Ali Umara, that sounds like a fantastic opportunity! I make my courses available at apm.byu.edu. The dynamic optimization material may be most useful for your class. There is also the optimization techniques course that has some material on parallel processing with multithreaded applications. Examples are in Matlab and Python. You may also be interested in this lab that we use for MPC: apmonitor.com/pdc/index.php/Main/ArduinoTemperatureControl We're putting in a bulk order for other instructors who would also like to use it.
@aliumara2139
@aliumara2139 7 жыл бұрын
APMonitor.com that is kind from u I hope I’ll be on of Students in future thanks a lot
What is a PID Controller? | DigiKey
22:19
DigiKey
Рет қаралды 104 М.
Simulating an Entire Car Engine (yes, it makes noise)
12:04
AngeTheGreat
Рет қаралды 1,8 МЛН
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН
«Жат бауыр» телехикаясы І 26-бөлім
52:18
Qazaqstan TV / Қазақстан Ұлттық Арнасы
Рет қаралды 434 М.
Simulating Rocket Trajectories with Python
16:36
Miscellaneous Bits
Рет қаралды 14 М.
EEVacademy #6 - PID Controllers Explained
27:11
EEVblog
Рет қаралды 208 М.
DC motor PID speed control
15:29
Curio Res
Рет қаралды 257 М.
Self-Driving AI Car Simulation in Python
11:52
NeuralNine
Рет қаралды 174 М.
Simple Examples of PID Control
13:10
Brian Douglas
Рет қаралды 1 МЛН
Animating an ideal gas in Python
20:05
Angry Physicist
Рет қаралды 2,5 М.
The Only Unbreakable Law
53:25
Molly Rocket
Рет қаралды 350 М.
H Infinity and Mu Synthesis | Robust Control, Part 5
13:57
The Truth About Self Driving Cars
16:30
New Mind
Рет қаралды 169 М.
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН