Designing a Lag Compensator with Bode Plot
Вставка
- Опубліковано 19 жов 2024
- Get the map of control theory: www.redbubble....
Download eBook on the fundamentals of control theory (in progress): engineeringmed...
This video is part of the "Lead/Lag Compensators" playlist on my channel.
Errata:
Don't forget to subscribe! I'm on Twitter @BrianBDouglas!
If you have any questions on it leave them in the comment section below or on Twitter and I'll try my best to answer them.
I will be loading a new video each week and welcome suggestions for new topics. Please leave a comment or question below and I will do my best to address it. Thanks for watching!
It is weirdly satisfying when we finally see the step response after all the abstract frequency domain design
Thanks for the feedback ... I always appreciate it! I completely agree with you. Sometimes I watch my video just before I post it and I bore myself :) I would love to be able to do more demonstrations but they take a bit longer to set up and run than just writing out the theory. Plus I always feel I need to give background info before running the demonstration. But that is the goal of my laboratory videos I put out every other week. I'll try to add more practical demos in the videos. Thanks.
Sir, you have really made us understand what it actually does and how we should proceed for our design which is hardly taught anywhere..
Many of us who come watch this lecture is for mathematical approach.. But don't want to know what and how it does all that..
Thank you so much for making all so easy and effective to understand
Hi Brain, here m in Italy doing my MS engineering in Industrial engineering... I encountered Automatic Control and Instrumentation with zero back ground but your effort really astonishing and appreciating make me to understand and clear subject with cent by cent... I just want to say a lot thanksssssssssss to U... Stay happy and keep your work up.... Thnxxxxxxxxxxxxxx again
Your videos never gets old 😂😂 I ve been watching since I was I Ungraduated student till now ...everytime I watch, I learn sth new
Brilliant series of videos . If there was an academia award for Control Engineering you should get one !
I finally understand intuitively how lead and lag design are used in practice.
You Sir, have a gift for explanation and organizing a lecture. Thank you very much!
You are a blessing to this universe. Thank you Brian.
Brian love the lectures keep up the great work!
The compensators I described are continuous (S-domain) which means you need an analog circuit to implement them exactly. But like you said we usually implement these in the digital domain (Z-domain) using software. So the first thing you need to do is convert the compensator from S to Z using some method like Tustin where s = (2/T)*(1-z^-1)/(1+z^-1) or simple method where s = (1-z^-1)/T.
In this equation T is the sample time of your digital system and z^-1 is the previous sample in time.
Brian, your videos are astonishingly good. Not much else needs to be said.
Hey Brian, I am currently finishing a summer course on Classical Control Theory and your vids have helped me understand it so much! Just wanted to say thank you
Really nice, you know how to explain it really well, the pictures really help it.
I think that this videos are the best as they are, it would be nice to have some excersises thought ( but one video dedicated for it ), this was a really nice abstract of lead and lag compensation.
You are the best Controls Teacher !!!!!
After multiplying out U and Y, U(k) * [17 - 10 * U(k-1 )] = Y(k) * [12.5 - 10 * Y(k-1 )] since z^-1 is the just the previous sample time value of either U or Y
I just finished the series and came out with a better understanding of the topic. Thanks once again for uploading these incredible videos up!
Great work Douglas....... I dont have words to say that how these videos helped me.. please add videos on how to make block diagrams & signal flow graphs from electrical circuits
So in code it would be something like this:
while(1)
U(k) = read sensor;
Y(k) = U(k) * [17 - 10 * U(k-1 )] / [12.5 - 10 * Y(k-1 )]; compensator
U(k-1 ) = U(k); set current value to old value for next frame
Y(k-1 ) = Y(k); set current value to old value for next frame
Wait(0.1), Sample time
Hope that helps you!
i ve enjoyed this mini series of lead-lag(bode-plot(root-locus(nyquist criteria(...)..)
I really appreciate your videos. I would like to see something about digital PID programming and fuzzy controllers.
Thanks
Sorry to be offtopic but does anybody know a trick to get back into an Instagram account?
I somehow lost my account password. I would love any tricks you can give me!
@Carlos Bradley instablaster =)
@Seth Boden Thanks so much for your reply. I found the site on google and im waiting for the hacking stuff atm.
Seems to take quite some time so I will reply here later with my results.
@Seth Boden It worked and I finally got access to my account again. I'm so happy:D
Thank you so much you saved my account!
@Carlos Bradley No problem :D
Convert to Z using simple method, [(1-z^-1)/.1 + 2.5]/[(1-z^-1)/.1 + 7] which equals the input U divided by the output Y since it's a transfer function.
thank you so much for all the great lectures, i have watched so many of them.
i really wish you will make a lecture about desiging a control system that includs both lead and lag compensator togther with bode plot, i find the cases when you have to consider PM and GM for the same system hard and that to use both lead and lag compensator togther can make it much easier.
Great playlist thanks alot!
Sir, you are a magician. Thanks a lot for such great content !!
As an example: transfer function = (s+2.5)/(s+7). With T = 0.1.
Amazing!! Well done Brian. Keep it up!!
Hey Brian ! I have an interview in few days I have studied this subject in my bachelors but it was 3 years ago could you give me insights about what could be the questions for analog design engineer. I have watched the videos and loved the way you explain things I just need to know what topic I have to focus on ! Thank you for putting such videos thats very helpful for students like me.
Great video Brian! I have a question concerning the rule of thumb at 9:10. In the lag compensator design with root locus video you mention that the rule of thumb is to place the zero 50 times closer to the imaginary axis as the dominant closed-loop pole. However, in this video it seems as though you use the open-loop pole. Why do you do this?
superb bro i liked the explanation. great work
You mentioned that you would like to apply a ramp input to the closed system. But why did you wrote 'step(lead*sys)' in the Matlab? Wasn't that applying a step input instead of a ramp?
Thank you
Could you do the Lag-Lead compensators too?
I second this. :D
he's already done it with these videos
For electrical systems we need to translate the compensator into a circuit . Can you prepare a video showing how to do this
At the end of the video, I was having a hard time connecting how a slower response won't react as much to high frequencies? Love the series.
faster response means :
- less rise time
- less settling time
At 9:08 why the dominant pole is at 0.2? Should not it be -5? as 1/(0.2*s^2+s)=5/s*(s+5). so i think there should be a correction.
Awesome video! Thank you!
I have a question, not exactly about lag compensators, but when you showed an example lag compensator and its corresponding bode plot, I got confused when I attempted to replicate that bode plot by hand. The break frequencies didn't make sense, and the slope of the asymtote for the pole (at least, I think that's what it is) is definitely not -20dB/dec. Can you help me understand this?
You are referring to t (tau) but I do not understand how this relates to the compensator transfer function equation . Is it possible to include a video to show why you use the tau form of the equation . What is the advantage of using this form of the equation ?
yes sir I truly adore you
Dude you are awesome. Thank for this great videos.
Hey Brian,
first of all thanks for your vids. Just a little question about implementing such things. In modern time it is quite common to have control systems implemented in code on DSPs f.e. But how do you implement such thing as a Lag or Lead comp in SW ? I couldnt find an example code or so. Would it be done by having different different controller for different frequencies? Maybe I'm just failing to see the whole thing and my question is pretty stupid. Best regards/keep up your amazing work
Thanks Brian.
That was awesome! Great job!
Hi brian,
That would be great, a real application to demonstrate the theory. I am an RC hobbyist and start working on flight stabilization and self balancing Robot using Arduino - Watching several of your video, next I'm asking my self how will i apply the theory to the project i'm working on which requires error and compensation correction.
Thanks for your video lectures, Im getting it slowly though I'm very new to these theory.
in your system the gain margin is infinity so it was not a problem, so if it is not infinity and we had a gain requirement or condition what should we do ???
It’s a little abstract unless we focus on a particular application . Hoe to implement the lead / lag compensator for an electrical control example ?
Pls add circuits for both.
At 9:09 why is the dominant pole 0.2? Should not it be 5? as 1/(0.2*s^2+s)=5/s/(s-5) what is the wrong in my analogy?
+Pintér Zoltán Márk Please forgive him for skipping a step:
The rule of thumb is to place the zero 50 times closer to the origin as the dominant pole. So the dominant pole is at -5 (as you said) and to find where to put the zero:
-5/50 = -0.1
so the zero will be at s = -0.1.
Convert it back to the form k*s+1 = 0
s = -0.1 -> s*10 = -1 -> s*10 + 1 = 0;
in this calculation we did two inversions and two sign flips.
Instead of doing all that he just took the s*0.2 +1 = 0 and multiplied 0.2x50 = 10.
+Maxime Deslauriers Why is the dominant pole at -5?
System T.F = 1/(0.2s+1), now solve for s, you will get -5
@@internetmovieguy "Convert it back to the form k*s+1 = 0".. Please help me understand this statement of yours
C(s)_lag = (s+Z) ÷ (s+p) where Z = 50p,
[pole should be closer to the origin]
but he put it in the form :
C(s) = (as+1) ÷ (bs+1)
May many first born be sacrificed in your name Brian Douglas.
Thats just too dramatic ...But He is Helpful
Ill name my first born in his name..
great videos! helps me a lot in understanding the concepts, provides simplistic overview of the theory.
Are there any books you can recommend??
Why is the rule of thumb to put the zero 50 times closer to the origin than the dominant pole? Doesn't that change based on desired phase margin? Where did 50 come from?
what about nonlinear controls and fuzzy control theory !
we can see those soon ?
can you please make a video on state space
why is the dominant pole at 0.2?
djical because it is the closer pole to the imaginary axis
The dominant pole is not at -0.2 but at -5. Solve that denominator for finding the poles and it will end up at -5.
Is there a reason why the lag compensator has a lower step response?
So I'm trying to write out a code example for you but UA-cam keeps rejecting it because they think I'm writing ASCII art!! So I'll just post it in multiple comments. Sorry for the massive amount of commenting that will result. :(
First of all thank you for these videos. at 11 : 26 in video you said gain cross over frequency and speed of the system. can u tell me more about that how they are related.
Simplify to [12.5 - 10z^-1]/[17 - 10z^-1 ] = U/Y
Hi Brian,
Thanks for wonderful explanation for control System concepts.
I have one question, suppose we are given a requirement to design only good control system.
Let say designing compensator for DC motor.
No physical value for time domain factor like risetime, overshoot, settling time, steady state error, damping are given
Or no value in frequency domain is given for Gain margin, phase margin or sentivity , Bandwidth. are given.
Can you please suggest what default value should we take for these, to design good control system.
If possible can you cover it in separate video ?
Also as zeta & Wn is defined for 2nd order system, and if our Plant is not in the form of second order system how can we make use of zeta & Wn to design our controller ?
Regards,
Dinesh
this is not a question.
i dont think there is a standard for the "good design" as you mentioned.
depends on the system itself and how far you want to improve it
Brian you are awesome..
I really appreciate your great work.
I have first order model of a rectifier and I would like to build a compensator to insure zero SSE and compensate for disturbances.
Can you help, please
Many thanks, but I still have to read more about it in order to tackle my tutorials.
Thanks a lot for your videos, they were a great help! I was wondering: is it possible to increase bandwidth with a LAG compensator, and reduce the steady state error in the same time? I'm pretty sure adding a lead compensator will do, but would it be possible with just a lag compensator? Thanks!
If you're still here 8 years later the answer is no. The lag compensator, by design, decreases the gain at higher frequencies thus moving the gain crossover (and thus bandwidth) to the left (lower frequencies).
How u made this statement - moving the pole and zero to the far left in bode plot is equivalent to putting the zero and pole close to imaginary axis in root locus?
Lower frequencies are closer to the origin in the root locus plane
Brian, how do you build that pure integrator in the controller? Could you give a real example? Like the plant models an electric motor, the pure integrator what would look like in an op-amp configuration?
with resistance and capacitance and amplifier
Hi Brian!
How did u know that 20db is a factor of 10 ? is that mean that 1=2db?
and how it relates to the "Lag Bode from above" where the ratio is 2\4 and the change is 6db ?
Thank you!
decibel is defined as 20*log10(a/b), so if a/b=10 then in decibels its 20*log10(10)=20*1=20dB. This is not linear and you cannot say 1=2dB. 20*log10(2/4)=20*(-0.3)=-0.6dB.
Thank u Di Wang.
(-:
e.g.: for transfer function TF=1/(s²+s+1)
While designing a lag compensator when you move the zero of the compensator away from the origin and from the pole of the compensator, the response gets slower. Similarly, when you move the zero of the compensator closer to the origin and to the pole of the compensator, the response gets pretty much faster, can anybody answer why is this happening?
What happens r1=r2 in lag compensator?
Thanks!
At 4:35...how does 1/1=0dB? These videos are really helping me out a lot but that stumped me. Please help?
It is 20log(1)=0db.
Oh right! Thanks
Sir how did u take phase margin from the phase plot
Is it any random choice?
Phase Margin = [phase @ gain cross over frequency] + 180°
too good man
Thank you sir
You are awesome
Top notch
Lead compensator = PD controller and a Lag compensator is a PI controller?
amazing!
thank you sir
sir i am confused ,that you start with open loop transfer function and end up with closed loop stability but how you can comment on closed loop stability from open loop?.
sagar salunkhe the main goal of these designing techniques (such as bode plot, root locus and nyquist plot) is to use the open loop transfer function to evaluate the behavior of the closed loop function, since in most part of times, we already have a well defined open loop function. So let's assume that you have a open loop function which is G(s) connected in series with a gain K. In this case, your closed loop function will be like T(s)=K*G(s)/(1+K*G(s)) (considering unit feedback). We can see by analyzing T(s) that the stability of closed loop function will be given by the location of the roots of 1+K*G(s), i.e. 1+K*G(s)=0 (in other words, poles of T(s)). In order to obtain a stable system, the poles of T(s) must be located at the left-half-plane.
We can rearrange this equation as G(s)=-1/K. At this point, we can see that the poles of T(s) are actually all the points in s-plane which satisfies the following condition: phase G(s) = 180 degrees and magnitude of G(s) = 1/K. Note that the poles of T(s) depends on K and G(s), so each K will result on different poles to your system (these points can be observed by drawing the root locus of your system).
The boundary of your system's stability occurs when s is located at the imaginary axis, i.e. s=jw. Since in bode plot we evaluates the system's behavior in terms of jw, i.e. s=jw , we can conclude that when the bode plot of G(s) presents, in a certain frequency w, the value of magnitude 1 and phase 180 degrees it implies that your system has reached the boundary of its stability. Hope this can clarify. Best regards
Why choosing 20dB will give a FOS of 10?
20logx=20=>x=10
Great thanks a lot
One of the hardest things ive done in college
Great
help a lot
Hi all, thanks for the video and all your comments. I am not sure about how the crossover gain is related to the speed of the system. I'd appreciate it if anyone can share some insight. Thanks!
If you're still interested in an explanation:
Gain crossover freq decides bandwidth (since bandwidth is the freq at which magnitude is -3dB). Bandwidth relates to natural freq (assuming second order system, equate the expression for magnitude to -3dB, solve for omega to get the relationship in terms of damping ratio and natural freq). For a fixed damping ratio, changing natural freq of a second order system changes peak time, settling time, etc.
you're awesome
i have exam so pls answer quick...our hw question asks design a compensator and asks which
compensator you should use??! what is the criteria for choosing compesators??!
God is alive..
The control system online Jesus