Тёмный

Python for Control Engineering 

Industrial IT and Automation
Подписаться 17 тыс.
Просмотров 31 тыс.
50% 1

This Tutorial gives an Introduction to Control Engineering
using Python. Python Libraries useful in Control
Engineering Applications
are NumPy, Matplotlib
, SciPy (especially scipy.signal)
and Python Control Systems Library (control)
. The Tutorial includes lots of Python Examples.
PowerPoint used in the video:
www.halvorsen.blog/documents/...
Note! In the video @49:10 Ts is missing in last term, this should be the correct equation:
u[k] = u[k-1] + Kp*(e[k] - e[k-1]) + (Kp/Ti)*Ts*e[k]
The simulation results also gets much better :-)
Blog:
www.halvorsen.blog
Python Resources:
www.halvorsen.blog/documents/...
Python Programming Videos:
• Python Programming
Python for Science and Engineering Videos:
• Python for Science and...
Python for Control Engineering Videos:
• Python for Control Eng...
Python for Software Development Videos:
• Python for Software De...
RU-vid Channel @Industrial IT and Automation ​
/ industrialitandautomation
Video Contents:
0:00 Introduction
0:16 Python Resources
0:40 Video Contents
02:00 Python Libraries for Control Engineering
03:54 Control Engineering
6:13 The PID Algorithm
8:11 1.order Dynamic System
17:37 Discretization
20:30 Dynamic Systems and Models
22:25 1.order Transfer Functions
24:24 1.order - Step Response
27:57 State-space System
29:03 Basic State-space Example
42:52 Control System
47:42 Control System Simulations Discrete Version
53:43 Stability Analysis
55:54 Stability Analysis Example

Наука

Опубликовано:

 

5 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 26   
@Ma1ne2
@Ma1ne2 3 года назад
I just quickly wanted to tell you, that what you're doing is amazing! All this free material to topics with unfortunately little good material out there. You're one of the few sources I found with quality explanations to the control library. Can't wait to follow more of your videos and read your free (THANK YOU!) books! Best of luck for you and thank you for supporting the online community with these great learning resources.
@IndustrialITandAutomation
@IndustrialITandAutomation 3 года назад
Cool, thanks!
@AshishKumar-qe4hq
@AshishKumar-qe4hq 3 года назад
@@IndustrialITandAutomation so you reply too 😂
@stepsvideos
@stepsvideos 3 года назад
Thank you sir for your tutorial! I came across this warning when looking up the function 'odeint': "For new code, use scipy.integrate.solve_ivp to solve a differential equation." After a few hours of guess-and-search, this finally worked: import numpy as np import matplotlib.pyplot as plt from scipy.integrate import solve_ivp K = 3 T = 4 u = 1 tstart = 0 tstop = 30 t_increment = 0.1 # Note: y0 Is now an array y0 = [0] # Function that returns dx/dt # Note: t and y are in reverse order. Right side of ODE is now an array. def system1order(t, y, K, T, u): dydt = [(1/T) * (-y + K*u)] return dydt # Create time sequence t_samples = np.arange(tstart, tstop, t_increment) # Solve ODE # Note array indexing notation: -1 refers to last element, -2 second to last, etc x = solve_ivp(system1order, [t_samples[0], t_samples[-1]], y0, t_eval=t_samples, args=(K, T, u)) # solve_ivp() Returns a Bunch() object, which is a dot-accessible dictionary # In case you would like to see what it looks like: # print("x : ", x) # print("") # print("x.t: ", x.t) # print("") # print("x.y[0]: ", x.y[0]) # Plot results plt.plot(x.t, x.y[0]) plt.title('1.Order system dy/dt = (1/T)(-y + Ku)') plt.xlabel('t [s]') plt.ylabel('y(t)') plt.grid() plt.show()
@makut4154
@makut4154 Год назад
This is gold. This guy is a genius.
@superflanker07
@superflanker07 3 года назад
Super useful
@moreno3461
@moreno3461 2 года назад
Very good class
@blessy6995
@blessy6995 3 года назад
Sir ... Is really python useful for Mangement engineerings from Mechanical engineering background?
@stepsvideos
@stepsvideos 3 года назад
@46:52 Solving for u[k] (at the bottom of the slide), everything on the right hand side gets multiplied by Ts. Should the last term also be multiplied by Ts? If so, @50:38 Inside the for loop, should the equation for u[k] be: u[k] = u[k-1] + Kp*(e[k] - e[k-1]) + Ts*(Kp/Ti)*e[k] , with the last term multiplied by Ts?
@IndustrialITandAutomation
@IndustrialITandAutomation 3 года назад
Yes! Ts should be included in the last term. The simulation results also gets much better :-)
@JamesTJoseph
@JamesTJoseph 3 года назад
How to simulate model with dead time?
@yimingzhang4636
@yimingzhang4636 3 года назад
The code for example 9: #The Loop Transfer function L=control.series(Hc, Hp, Hf, Hm) print('L(s)=',L) #Tracking transfer function T=control.feedback(L,1) print('T(s)=',T) Maybe should be: #The Loop Transfer function L=control.series(Hc, Hp) print('L(s)=',L) L2=control.series(Hf,Hm) #Tracking transfer function T=control.feedback(L,L2) print('T(s)=',T) ?
@electronicsacademy2D2E29
@electronicsacademy2D2E29 Год назад
Dear Sir, Thank you for the wonderful tutorials. I had a question. In your YT video titled Python for control engineering, when you demonstrate the control example starting around 48:00. I can see there is a difference in the discrete PI term between the pdf presentation and the video. I see in the pdf there is an extra Ts term whereas in the video it is missing. Which one is the right expression? Pardon my ignorance, I am asking you instead of trying out the derivation myself.
@19293949596970
@19293949596970 Год назад
Dear sir, Are u getting the same graph after executing the PI controller ? I am getting a different one.
@electronicsacademy2D2E29
@electronicsacademy2D2E29 Год назад
@@19293949596970 Hi, you are right. The code and the derivations in the pdf are the correct ones. So yes, the graphs look different. I tried out the derivations later and the ones in the pdf are derived correctly 👍🏻. The derivations in the video look to be flawed.
@19293949596970
@19293949596970 Год назад
@@electronicsacademy2D2E29 Thanks
@dewdotninja
@dewdotninja 3 года назад
Thanks for this tutorial. I'm in control system area though a beginner in Python. I 've learnt quite a lot with this video. Anyway, I have a question on the stability analysis example slide (around minute 56). According to the slide, T = y/r = L/(1+L) with L = HcHpHmHs, but y is not indicated in the block diagram. I guess that y is the process output (labeled x on the slide). In that case, T = HpHc/(1+HpHcHfHm). Could you clarify this?
@stepsvideos
@stepsvideos 3 года назад
I think he means the tracking function is the transfer function between r and Yf. If you work that out, L(s) comes out as shown in the slide.
@caleb7799
@caleb7799 Год назад
good stuff, but if at all possible, please keep some distance between you and the microphone. thanks.
@doobaas
@doobaas 2 года назад
I have made a jupyter notebook of this tutorial if you are interested
@julioivanmaciascarrera9310
@julioivanmaciascarrera9310 2 года назад
Could you share it please
@hopelopez83
@hopelopez83 2 года назад
What is K?
@a-mhamdi
@a-mhamdi 2 года назад
This is the most common and standardized way to describe a first order model. K is called the static gain, when the input is constant. It measures the ratio output by input when the plant reaches its steady state, i.e., K=y/u when t--> infty. For instance, if k>1, the system is amplifying the input. Otherwise, it is reducing its contribution on the output.
@JamesTJoseph
@JamesTJoseph 3 года назад
You can include SIPPY too. github.com/CPCLAB-UNIPI/SIPPY
Далее
Transfer Functions with Python
56:36
Просмотров 8 тыс.
Everything You Need to Know About Control Theory
16:08
Просмотров 524 тыс.
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
A real control system - how to start designing
26:58
Просмотров 263 тыс.
MATLAB vs Python for Engineers
5:53
Просмотров 48 тыс.
DAQ with I/O Modules in Python
55:57
Просмотров 9 тыс.
RAG from the Ground Up with Python and Ollama
15:32
Просмотров 27 тыс.
Time Series Forecasting with XGBoost - Advanced Methods
22:02
Мой новый мега монитор!🤯
1:00
Просмотров 659 тыс.
How to Soldering wire in Factory ?
0:10
Просмотров 12 млн