What Is Linear Quadratic Regulator (LQR) Optimal Control? | State Space, Part 4

  Рет қаралды 292,219

MATLAB

MATLAB

Күн бұрын

Пікірлер: 218
@justinhendrick3743
@justinhendrick3743 5 жыл бұрын
"That's how you rotate to pick up a cow" is a sentence I never thought I'd hear.
@nabilmohammad5076
@nabilmohammad5076 5 жыл бұрын
This is the best explanation of LQR I have ever seen. Thank you Brian. :)
@LeeWhitcher
@LeeWhitcher 5 жыл бұрын
Your dedication to the animation is something to behold! You even animated the magnitude of the thrusters 😂
@branislavjeremic4904
@branislavjeremic4904 5 жыл бұрын
These kind of videos can have the universities close their doors, and be left with certification only or distant learning. I mean who needs professors' lectures after this, really. :) I have been familiar with pole placement and LQR for years, but really wanted to find the video explaining it in simple words for my own sake. The whole series is brilliant, I am leaving comment of gratefulness to this one in particular, for the reason I stumbled on it firstly. Great job is a diminutive here.
@blablabla12a
@blablabla12a 5 жыл бұрын
I've got a test in two days and your new videos on the topic are like a gift from god 👏🏼
@BrianBDouglas
@BrianBDouglas 5 жыл бұрын
Hey everyone, thanks for watching this video! If you have any questions or comments that you'd like me to see, please leave them under this comment so that I get notified and can respond. Cheers!
@ahmadalghooneh2105
@ahmadalghooneh2105 5 жыл бұрын
Hi Brian, Could you please share the code?
@BrianBDouglas
@BrianBDouglas 5 жыл бұрын
@@ahmadalghooneh2105 I knew someone would ask and I should have been prepared. Yes I can ... but the code was written quickly to get this video out so it is horribly written. I'll get it up on Github shortly and let you know.
@ahmadalghooneh2105
@ahmadalghooneh2105 5 жыл бұрын
Brian Douglas so much thanks brian, no matter the order, I just wanted to know how did you manage to make the plots so cool, A huge fan of yours, Regards
@gosayeweldemaryam2415
@gosayeweldemaryam2415 5 жыл бұрын
Best presentation. deep knowing and great experience can be seen on your video
@Ayahalom123
@Ayahalom123 5 жыл бұрын
It's good to see you on matlab's channel! Loved your videos all along
@nikhilvaliveti5717
@nikhilvaliveti5717 7 ай бұрын
Brian, you can't make things look so easy man. Dope work.
@BrianBDouglas
@BrianBDouglas 7 ай бұрын
Thank you!
@carrot5581
@carrot5581 10 ай бұрын
I'm studying Control and we have a space-state module which at first it was easy, but gradually getting harder to understand. However, after your videos it really help me a lot since you made it really simple to understand and even gave different methods, but what help me the must its showing how they can be apply to different systems. Now I even think Space-State is actually really cool and would like to learn more about it and even apply it in my personal project and such. Thank you so much.
@BrianBDouglas
@BrianBDouglas 10 ай бұрын
I really appreciate your comment! That's great to hear :)
@周长林-q8t
@周长林-q8t 8 ай бұрын
This is awesome! It's much easier to understand. Thank you!
@BrianBDouglas
@BrianBDouglas 8 ай бұрын
Great to hear! I also have a video on the Algebraic Riccati Equation which might help as well: kzbin.info/www/bejne/kJzXfWaPn7mVeJYsi=MWLW8nn0S9zPjjCG
@mohamedbenrekia2211
@mohamedbenrekia2211 9 ай бұрын
You are just the best tutor on youtube.. thanks ..
@BrianBDouglas
@BrianBDouglas 9 ай бұрын
I appreciate that!
@saeedeh_nikan
@saeedeh_nikan 10 ай бұрын
easy and excellent explanation ever ! thanks a lot :)
@BrianBDouglas
@BrianBDouglas 10 ай бұрын
🤗
@danielbohorquezalvarado5841
@danielbohorquezalvarado5841 Жыл бұрын
this is the funniest video I've ever seen about something related with engineering
@GustavoRinaldi1
@GustavoRinaldi1 2 жыл бұрын
I'd like to thank Brian for that fantastic take on the LQR explanation. I had understood the math behind it but I hadn't get the intuition I should have gotten while developing my LQR model and now I feel really ready to give it a shot.
@guiverhalen
@guiverhalen Ай бұрын
Amazing explanation! Better than 1 year of college!
@energyeve2152
@energyeve2152 Жыл бұрын
I haven't finished the video yet but I found exactly what I was looking for. Thank you for sharing this in such an intuitive way to understand what I am doing haha. Keep shining :D
@SuperNaicker
@SuperNaicker 4 жыл бұрын
Brilliant class. I hope I learned control systems from a professor like you. Thanks.
@gmatheus10
@gmatheus10 Жыл бұрын
Holy shit, my professor went through all the mathematics that I could'nt even track the concepts. Thank you for this video
@kametor
@kametor 2 ай бұрын
Wonderful explanation sir, thank you.
@krystoflis7157
@krystoflis7157 5 жыл бұрын
Excellent introduction to LQR. Thank you Brian
@satishone999
@satishone999 5 жыл бұрын
Dear Brian, It is one of the best explanation. Thank you for your time and effort.
@bedirhansen2219
@bedirhansen2219 2 жыл бұрын
Best video I have ever seen on youtube
@NadimC137
@NadimC137 3 жыл бұрын
I knew it was brian the moment this video started, you are truly an amazing educator, some of your videos built my foundation in control!
@tongvanngoc_gv-t9091
@tongvanngoc_gv-t9091 2 жыл бұрын
This is definitely a great and simple explanation I've seen so far
@abcxyz4207
@abcxyz4207 3 жыл бұрын
Wow optimal control is amazing!! Way cooler than PID
@julial1572
@julial1572 10 ай бұрын
Thank you Brian !!! Wonderful explanation !!
@SaludContable
@SaludContable 3 жыл бұрын
Really good video, content and form, both great! Very enjoyable
@SaludContable
@SaludContable 3 жыл бұрын
I wish I could present this way
@rostamr4096
@rostamr4096 2 жыл бұрын
I wish Brian create more tutorials...he is the best.
@SunriseSchoolSambrial
@SunriseSchoolSambrial 4 жыл бұрын
Thank you so much. Your lecture really helped me understanding the control system basics.
@shashwatsingh2682
@shashwatsingh2682 Жыл бұрын
Excellent explanation
@alirezaghaderi
@alirezaghaderi 4 жыл бұрын
Thanks Man ! Your videos are better than whole academic education !! Please create more videos
@yakeshbalasubramaniam216
@yakeshbalasubramaniam216 3 жыл бұрын
Wow perfectly explained
@mordecai806
@mordecai806 Жыл бұрын
Obrigado! IFSP- Eng. Controle e Automação-São Paulo Brasil!
@khushbuKumari-fx6xo
@khushbuKumari-fx6xo 4 жыл бұрын
This is a really really good video for understanding the basisc of LQR...thank you so much sir
@erikasantuccio1887
@erikasantuccio1887 3 жыл бұрын
It was really nice to see your videos, they were quite helpful as refresh and also maybe to understand better what I studied some years ago. Many thanks!
@Daniboy370
@Daniboy370 3 ай бұрын
Awesome as usual !
@Seboymogabeny
@Seboymogabeny 5 жыл бұрын
watched all 4 parts.. keep up the good work ;)!
@mohanasundaramgobinath3470
@mohanasundaramgobinath3470 Жыл бұрын
Sir, just now I have watched this video lecture. Thank you for explaining with the simple terms. I have a question. Why the state should be zero for a observer or other design ? Can you please explain me?
@누구세옹
@누구세옹 2 жыл бұрын
What a wonderful lecture. Thank you so much
@darylfishback-duran3580
@darylfishback-duran3580 5 жыл бұрын
Great video! Glad for another reference for LQR intuition and usage!
@kamirtharaj6801
@kamirtharaj6801 5 жыл бұрын
thnx bro.....you are the best
@Tomisdeb0m
@Tomisdeb0m 4 жыл бұрын
Amazing video! Thanks
@Vashi29Cricket
@Vashi29Cricket 3 жыл бұрын
OMG I think I am gonna ace my Controls class now!
@brianhumphreys5161
@brianhumphreys5161 5 жыл бұрын
good, easy to understand video. shout out to Professor Lum.
@techupdateswithjosh6044
@techupdateswithjosh6044 2 жыл бұрын
Great and simple explanation. Thank you. I hope I will so good and make great videos too.
@arnecl9566
@arnecl9566 3 жыл бұрын
@Brian Douglas I love you for making these videos!!
@omarel-ghezawi6466
@omarel-ghezawi6466 4 жыл бұрын
Excellent exposition. Good effort. Well done
@snehamoypatra9786
@snehamoypatra9786 4 жыл бұрын
Why Professers avoid this. They tell every thing in abstract way. Thank you Brain. You are great.
@luislandazuri2070
@luislandazuri2070 5 жыл бұрын
If someone is having problems finding the scaling term, try using simulink to see the step response of the system. Matlab and simulink responses are very different. This might be my mistake mishandling matlab, but if anyone is trying to implement this in a real system and nothing works it might be because of this. To give you some context the step response in matlab gave me a scaling term of around 3000 while with simulink I get the gain around 1,6 and with this my system works perfectly.
@layzerfreedman5517
@layzerfreedman5517 3 жыл бұрын
Thank you for the explanation ! You made it very easy to understand :)
@gitarplayer13
@gitarplayer13 5 жыл бұрын
UW AE511 brought me here. Great video, will be checking out more in the future.
@jlleluc4s
@jlleluc4s 2 жыл бұрын
Great frame 3:45 = "you don´t have infinite money to maximize your performance, and, you don´t have unlimited time to minimize your expenses."
@DRAMBgo
@DRAMBgo 2 жыл бұрын
What an amazing explanation!
@danielstankowski1307
@danielstankowski1307 4 жыл бұрын
You are the best!
@sreevarshiniyohanandhan8325
@sreevarshiniyohanandhan8325 4 жыл бұрын
Well said👏
@noahrichard6707
@noahrichard6707 4 жыл бұрын
thanks
@edwardsanchez2331
@edwardsanchez2331 5 жыл бұрын
Great video with great explanations.
@nitinkmaurya
@nitinkmaurya 5 жыл бұрын
Thankyou. A big fan of urs control lessons.
@selamhendrix5252
@selamhendrix5252 5 жыл бұрын
such a great video, I like all your other videos on control theory as well, thank you!
@wes1588
@wes1588 5 жыл бұрын
Great video as always Brian!
@MattAero
@MattAero 5 жыл бұрын
UW AE511: Great video, thank you!
@salarbasiri5959
@salarbasiri5959 2 жыл бұрын
perfect explanation!
@sebastiangrimm6478
@sebastiangrimm6478 Жыл бұрын
Great video! Tank u so much👍
@spiworkshop9416
@spiworkshop9416 5 жыл бұрын
Hope to get lessons on Sliding Mode Controller in up coming days and its application.
@yz7664
@yz7664 2 жыл бұрын
why in LQR, we dont need to introduce Kr for reference error any more?
@karolmazaraki4271
@karolmazaraki4271 5 жыл бұрын
Just great video. Thank you!
@21stcenturycotyk
@21stcenturycotyk 5 жыл бұрын
Excellent video as always but why leave out the part about solving the algebraic reccati equation to find the optimal solution to the cost function, since its just matrix maths and doesn't go into the complex derivations ?
@BrianBDouglas
@BrianBDouglas 5 жыл бұрын
In retrospect that probably would have been better. I didn’t for two reasons though: 1) I usually shoot for 12-15 minute videos and this was getting long and 2) I want to do another video in the future just on this topic. Thanks for the comment.
@21stcenturycotyk
@21stcenturycotyk 5 жыл бұрын
@@BrianBDouglas oh an I just want to say thank you for your videos both here and on your channel, I'm in my 3rd year on a robotics engineering course and I don't know if I would have made it through my 1st year without your videos.
@BrianBDouglas
@BrianBDouglas 5 жыл бұрын
@@21stcenturycotyk 👍
@saeedbasaleh1917
@saeedbasaleh1917 2 жыл бұрын
Thank you sir.
@Antonioqwert3868
@Antonioqwert3868 2 жыл бұрын
Hi, Brian your videos about control theory is great , I hope you will talk about MPC controller :)
@zero_kelvin_
@zero_kelvin_ 3 жыл бұрын
the matlab code doesnt work for me. I get the following error: Unrecognized function or variable 'rot'.
@rohitn6910
@rohitn6910 3 жыл бұрын
same here............
@Shark_Oswald
@Shark_Oswald 5 жыл бұрын
Awesome job
@georgigeorgiev271
@georgigeorgiev271 2 жыл бұрын
Just brilliant!
@yacinemahboub
@yacinemahboub 11 ай бұрын
loved it 😁
@DoctorMikeReddy
@DoctorMikeReddy 3 жыл бұрын
Just found this gem. Where DID the idea of beaming up cows come from, I wonder? Either way, a fun application :-)
@AniketSharmacodes
@AniketSharmacodes 5 жыл бұрын
Hi, can you explain how the angular acceleration is dependent on the angle by a factor of 0.01? I was thinking dynamics should be like T = I*(angle)'' and no angle terms in it. Thanks for such an amazing video btw
@MrSolidGeek
@MrSolidGeek 3 жыл бұрын
I would like to know this as well, did you figure this out? :-)
@jacobodebruynmonge2874
@jacobodebruynmonge2874 5 жыл бұрын
The video is awesome. Thanks!!
@danoku5582
@danoku5582 Жыл бұрын
Hi Brian, thanks for your lecture on LQR. You and Chris have done a great Job on this. Please my question is on the other diagonal that makes my matrix positive definite or semi positive definite in case of R., How can I choose members in case for nxn matrix, for n>=3. its easier for 2x2 to just pick any number and repeat it , just like zero if I am using an identity matrix, but for n>3 is my question. Secondly please can you do a video also for MPC?
@oldcowbb
@oldcowbb 2 жыл бұрын
i'm confused, everyone keep saying the LQR works with kalman filter i thought it should account for state uncertainty in someway, but apparently it doesn't?
@djredrover
@djredrover Жыл бұрын
Hey Brian, would it be possible to continue this spacecraft example but using MPC? I'd appreciate it greatly. Love.
@charlesguilmin7248
@charlesguilmin7248 4 жыл бұрын
It's really interesting and explanations are really nice. I didn't find the R_tuning.m file. Can you tell me where I can find it ? Thank you so much
@skyXplorer
@skyXplorer 7 ай бұрын
Where is the cow 🐮? Is there anyway to get the code for that as part of the animation? Thanks for the awesome video!!
@BrianBDouglas
@BrianBDouglas 7 ай бұрын
Ha! The cow was a bit of video editing trickery so it's not in the code. But the rest of it does exist in the visualization if you check out the code in the description.
@skyXplorer
@skyXplorer 7 ай бұрын
@@BrianBDouglas , haha well it was awesome! Little stuff like that makes it way more fun, I was going around showing my colleagues! Your videos are definitely helping me with OJT. Let me know if you're ever interested in visiting NASA AFRC and maybe giving a talk to our new professionals group and I'll try to coordinate something!
@danielweber8961
@danielweber8961 5 жыл бұрын
Thanks for the awesome video! I just have one question: What if the reference vector and the state vector do not have the same dimensions? In this case a subtraction would not be defined.
@davidm973
@davidm973 7 ай бұрын
Awesomenesssss
@autome4374
@autome4374 5 жыл бұрын
Thank you sir.it is known that the LQR control works with linear systèmes.but we can control a nonlinear physical système like the inverted pundelum,TRMS,2DOF HELICOPTERS with lqr how is that
@tianchenzhang8838
@tianchenzhang8838 2 жыл бұрын
it seems like the more accurate you construct the state form of the UFO, the more accurate the LQR is. But how could we construct such a precise differential equation for a real system. Thanks
@alanlee4326
@alanlee4326 5 жыл бұрын
Great Video!
@ThomasDo
@ThomasDo Жыл бұрын
Hi, I believe the Q is positive semidefinite while R is positive definite, no? or am I wrong here?
@ahmadalghooneh2105
@ahmadalghooneh2105 5 жыл бұрын
Brian, this video is only for regulation, and the controller will push all the system states toward zero, what if you want your states to be pushed toward a particular desired point? I guess the cost function would be different then, it would be integral(e.T*Q*e + u.T*B*u) right? but how to implement that in matlab using the lqr command ?
@ahmadalghooneh2105
@ahmadalghooneh2105 5 жыл бұрын
@@gustavstreicher4867 Hi, thank you for taking your time answering my question. you see you can actually do this when you are constructing the cost function and optimizer by any numerical optimizer, but when you are using matlab, there is a problem, because matlab lqr command expects A,B,Q and R matrices, you dont have the dynamics of the error with the form of edot= Ae+Bu, thats my problem
@gustavstreicher4867
@gustavstreicher4867 5 жыл бұрын
@@ahmadalghooneh2105 Hey, I just noticed you actually implied the same thing in your cost function by using e. Sorry about that. I think it doesn't really matter what values you want the states to go to because the lqr function essentially produces a regulator solution that implies a zeta and wn value. This same damping and natural frequency is present in the natural response as well as in tracking a step input, for example. So the same K solution will work for whatever state reference you are tracking.
@ahmadalghooneh2105
@ahmadalghooneh2105 5 жыл бұрын
@@gustavstreicher4867 Yes Dear Gustav, What you say is absolutely true, The K works for tracking any reference. yet my problem was how to include error in cost function, which I found the solution, you can use servo control type 1 construction for state space, you can find it in Ogata
@edwardavd9423
@edwardavd9423 5 жыл бұрын
The poor cow, but very nice lessons! Thank you! :D
@nachobalasch
@nachobalasch 10 ай бұрын
Forever in your debt. I have a question on timestamp 6:49 -> Im trying to make sense of the relationship between the integral equation and it's meaning, which is {the cumulative error of the states plus the cumulative effort of the actuator}. I don't understand how the first part is equivalent to the cumulative error of the states. Are you assuming that the state vectors should be at a reference of 0? That doesn't make much sense to me. Intuitively, I would expect the following to be the way to calculate the error of a state at a given time: steady state required by the reference - current state.
@BrianBDouglas
@BrianBDouglas 10 ай бұрын
That's exactly right! This is a regulator which means it's trying to drive the system states to 0. Like you said, if you want this to follow a reference, you can redefine the origin of your states by subtracting out the reference but this adds in some steady state error which is usually countered with a feedforward term or an integrator. Look up LQI function in MATLAB to see what I mean.
@den4ess
@den4ess 3 жыл бұрын
Brian, I love you
@dprashad7838
@dprashad7838 4 жыл бұрын
Hamiltonian? I need help implementing Hamiltonian. LQR is built in I've gotten to use it, but don't know how to graph it. Also, how'd you make the animation? I'd like to do something similar modeling a rocket landing, for example the falcon 9. Help meeeeeee!!!!!!!!!!!!!!!!!!!!
@alexf7889
@alexf7889 3 жыл бұрын
can Q be zero for same state I dont care about?
@hamzaramzan5121
@hamzaramzan5121 5 жыл бұрын
from where I can learn to play such type of animations in matlab
@BrianBDouglas
@BrianBDouglas 5 жыл бұрын
I used the patch command to draw out the UFO. Then I animated it by updating the XData and YData with my calculated values. Here's a quick example of moving a square up on the graph: H = patch([-1 1 1 -1], [-1 -1 1 1], 'b'); axis([-3 3 -3 3]); for i = 1:10 pause(0.2); H.YData = [-1 -1 1 1] + i/10; end
@smitdumore1064
@smitdumore1064 3 жыл бұрын
beautiful
@amineboujida1276
@amineboujida1276 5 жыл бұрын
Instead of doing the tweaking of R and Q by hand why dont we automate it , like in the machine learning approach
@jacobrasmussen8166
@jacobrasmussen8166 2 жыл бұрын
but.. doesn't spacemen use solar energy?
@fanwang-ek5nx
@fanwang-ek5nx 8 ай бұрын
great video, from 2024
@BrianBDouglas
@BrianBDouglas 8 ай бұрын
It's been 4 years already? Where did the time go??
@dhidhi1000
@dhidhi1000 3 жыл бұрын
does it only work for "unforced" systems? I haven't seen a single tutorial on how to apply, say, a step reference using this, and when I tried it didn't really work.
@matthewjames7513
@matthewjames7513 2 жыл бұрын
Anyone know why he wrote A-B*K instead of A on line 22 at 15:08 ?
@matthewjames7513
@matthewjames7513 2 жыл бұрын
ah i figured it out. It's because A-B*K is the closed loop 'A matrix'
@chivornit2071
@chivornit2071 5 жыл бұрын
Hey Brian, Can you help me about this problem? I am working on 3Omni-wheeled mobile robot. In robot frame X’r=AXr+BU, where Xr=[xr’,yr’,theta’] linear state space model. But I when use global coordinates with rotation matrix R(theta), that’s Xr=R(theta)Xw, then Xr’=R(theta)’Xw+R(theta)Xw”. It becomes non linear model. How can I use LQR controller for control this robot with trajectory tracking? Thanks!!!
Why the Riccati Equation Is important for LQR Control
14:30
Man Mocks Wife's Exercise Routine, Faces Embarrassment at Work #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 4,7 МЛН
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 22 МЛН
Introduction to State-Space Equations | State Space, Part 1
14:12
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 78 М.
Everything You Need to Know About Control Theory
16:08
MATLAB
Рет қаралды 553 М.
PID vs. Other Control Methods: What's the Best Choice
10:33
RealPars
Рет қаралды 123 М.
What Is Sliding Mode Control?
19:33
MATLAB
Рет қаралды 5 М.
The better way to do statistics
17:25
Very Normal
Рет қаралды 232 М.
Man Mocks Wife's Exercise Routine, Faces Embarrassment at Work #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 4,7 МЛН