Python for Control Engineering

  Рет қаралды 31,854

Industrial IT and Automation

Industrial IT and Automation

Күн бұрын

Пікірлер: 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.
@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) ?
@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 :-)
@moreno3461
@moreno3461 2 жыл бұрын
Very good class
@superflanker07
@superflanker07 3 жыл бұрын
Super useful
@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 2 жыл бұрын
good stuff, but if at all possible, please keep some distance between you and the microphone. thanks.
@blessy6995
@blessy6995 3 жыл бұрын
Sir ... Is really python useful for Mangement engineerings from Mechanical engineering background?
@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
@doobaas
@doobaas 3 жыл бұрын
I have made a jupyter notebook of this tutorial if you are interested
@julioivanmaciascarrera9310
@julioivanmaciascarrera9310 2 жыл бұрын
Could you share it please
@JamesTJoseph
@JamesTJoseph 3 жыл бұрын
How to simulate model with dead time?
@hopelopez83
@hopelopez83 3 жыл бұрын
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
Industrial IT and Automation
Рет қаралды 8 М.
Everything You Need to Know About Control Theory
16:08
MATLAB
Рет қаралды 556 М.
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 41 МЛН
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 269 МЛН
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 8 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 64 МЛН
What You Need To Know About Python 3.13
15:45
Jake Callahan
Рет қаралды 4 М.
A real control system - how to start designing
26:58
Brian Douglas
Рет қаралды 271 М.
A math GENIUS taught me how to LEARN ANYTHING in 3 months (it's easy)
8:52
Python Programmer
Рет қаралды 483 М.
DAQ with Python
39:19
Industrial IT and Automation
Рет қаралды 21 М.
Mass-Spring-Damper System with Python
29:25
Industrial IT and Automation
Рет қаралды 10 М.
When you Accidentally Compromise every CPU on Earth
15:59
Daniel Boctor
Рет қаралды 835 М.
PID Control Tuning with Python GEKKO
23:42
APMonitor.com
Рет қаралды 25 М.
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 41 МЛН