title

Inverted Pendulum on a Cart [Control Bootcamp]

description

In this video, we introduce an example system to control: an inverted pendulum on a cart. We describe the state-space, find the fixed points, and simulate the system in Matlab. Because the linearized system is controllable, we will be able to arbitrarily place the eigenvalues of the closed-loop system through feedback in the next two videos.
These lectures follow Chapter 8 from:
"Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control" by Brunton and Kutz
Amazon: https://www.amazon.com/Data-Driven-Science-Engineering-Learning-Dynamical/dp/1108422098
Chapters available at: http://databookuw.com/databook.pdf
Book Website: http://databookuw.com
Brunton Website: eigensteve.com

detail

{'title': 'Inverted Pendulum on a Cart [Control Bootcamp]', 'heatmap': [{'end': 572.647, 'start': 551.776, 'weight': 1}, {'end': 728.409, 'start': 710.054, 'weight': 0.761}], 'summary': 'Covers practical applications of matlab for designing controllers to stabilize dynamics, focusing on controlling an inverted pendulum on a cart, including modeling a two-degree-of-freedom system with nonlinear odes, simulating dynamic systems, and linearized system control using eigenvalues and lqr control in matlab.', 'chapters': [{'end': 70.561, 'segs': [{'end': 70.561, 'src': 'embed', 'start': 3.237, 'weight': 0, 'content': [{'end': 3.697, 'text': 'Welcome back.', 'start': 3.237, 'duration': 0.46}, {'end': 11.724, 'text': "So now we're actually going to start coding up real examples in MATLAB, seeing if they're controllable,", 'start': 4.998, 'duration': 6.726}, {'end': 15.206, 'text': 'designing controllers to stabilize the dynamics.', 'start': 11.724, 'duration': 3.482}, {'end': 17.428, 'text': 'So this should be really fun and really powerful.', 'start': 15.226, 'duration': 2.202}, {'end': 21.892, 'text': 'Okay, we did a lot of math to understand why and when and how to control things,', 'start': 17.668, 'duration': 4.224}, {'end': 28.297, 'text': "but now the rubber is going to hit the road and we're actually going to see how easy it is to really control a system in MATLAB.", 'start': 21.892, 'duration': 6.405}, {'end': 44.246, 'text': 'One of the systems I really like to work with is, imagine that I have an inverted pendulum, but that inverted pendulum is sitting on top of a cart.', 'start': 29.658, 'duration': 14.588}, {'end': 52.582, 'text': "I'm going to have my inverted pendulum, but now that pendulum is on a cart, and I can move that cart around.", 'start': 47.298, 'duration': 5.284}, {'end': 59.367, 'text': 'So for some reason, this has always felt much more physical to me than just having a pendulum with some torque control in the bottom.', 'start': 52.842, 'duration': 6.525}, {'end': 60.288, 'text': 'That seems too easy.', 'start': 59.407, 'duration': 0.881}, {'end': 62.329, 'text': 'This is a little more interesting.', 'start': 60.908, 'duration': 1.421}, {'end': 66.913, 'text': "I have some cart, and I can move that cart around, and I'm trying to stabilize this inverted pendulum.", 'start': 62.349, 'duration': 4.564}, {'end': 70.561, 'text': "So let's think about what numbers we need.", 'start': 68.52, 'duration': 2.041}], 'summary': 'Coding examples in matlab to design controllers for stabilizing dynamics and controlling a system. working with an inverted pendulum on a cart.', 'duration': 67.324, 'max_score': 3.237, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg3237.jpg'}], 'start': 3.237, 'title': 'Matlab control system design', 'summary': 'Introduces practical application of matlab for designing controllers to stabilize dynamics, with a focus on controlling an inverted pendulum on a cart, emphasizing the physical aspect and the process of stabilization.', 'chapters': [{'end': 70.561, 'start': 3.237, 'title': 'Matlab control system design', 'summary': 'Introduces the practical application of matlab for designing controllers to stabilize dynamics, with a focus on controlling an inverted pendulum on a cart, emphasizing the physical aspect and the process of stabilization.', 'duration': 67.324, 'highlights': ['The chapter focuses on coding real examples in MATLAB to design controllers for stabilizing dynamics of systems, such as an inverted pendulum on a cart.', 'It emphasizes the physical aspect of controlling the inverted pendulum on a cart, adding a more interesting and challenging dimension to the process.', 'The practical application of MATLAB for control system design is highlighted, showcasing the process of stabilizing the dynamics of the inverted pendulum on a cart.']}], 'duration': 67.324, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg3237.jpg', 'highlights': ['The chapter focuses on coding real examples in MATLAB to design controllers for stabilizing dynamics of systems, such as an inverted pendulum on a cart.', 'The practical application of MATLAB for control system design is highlighted, showcasing the process of stabilizing the dynamics of the inverted pendulum on a cart.', 'It emphasizes the physical aspect of controlling the inverted pendulum on a cart, adding a more interesting and challenging dimension to the process.']}, {'end': 332.611, 'segs': [{'end': 99.062, 'src': 'embed', 'start': 72.082, 'weight': 0, 'content': [{'end': 75.403, 'text': 'Well, first of all, we need to define the state of the system.', 'start': 72.082, 'duration': 3.321}, {'end': 81.565, 'text': 'And so the state of the system is given by the position of this cart.', 'start': 76.383, 'duration': 5.182}, {'end': 84.066, 'text': "We're going to call that x.", 'start': 81.585, 'duration': 2.481}, {'end': 88.768, 'text': "And the angle of this pendulum arm, we're going to call that theta.", 'start': 84.066, 'duration': 4.702}, {'end': 99.062, 'text': "So our kind of high dimensional dynamical system state I'm going to change it up and I'm going to call it a vector y.", 'start': 89.828, 'duration': 9.234}], 'summary': 'Defining the system state with position x and angle theta.', 'duration': 26.98, 'max_score': 72.082, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg72082.jpg'}, {'end': 209.527, 'src': 'embed', 'start': 127.494, 'weight': 1, 'content': [{'end': 132.078, 'text': "There's two degrees of freedom, x and theta, the position of the cart and the angle of the pendulum.", 'start': 127.494, 'duration': 4.584}, {'end': 139.285, 'text': "And because it's two degrees of freedom with Newton's second law, I get four coupled ODEs.", 'start': 133.019, 'duration': 6.266}, {'end': 152.75, 'text': 'Okay, so I essentially have some DDT of x equals some nonlinear function of that vector x.', 'start': 139.605, 'duration': 13.145}, {'end': 155.272, 'text': 'So this is four nonlinear row equations.', 'start': 152.75, 'duration': 2.522}, {'end': 159.956, 'text': "I'm not going to bore you with the details of how to actually derive these,", 'start': 156.093, 'duration': 3.863}, {'end': 167.683, 'text': "but you could use something like Euler-Lagrange equations or Hamilton's equations and you could get these coupled first order nonlinear ODEs.", 'start': 159.956, 'duration': 7.727}, {'end': 170.786, 'text': 'So this is an honest to goodness nonlinear problem.', 'start': 168.684, 'duration': 2.102}, {'end': 178.509, 'text': 'but we can linearize the system and just intuitively we know that there are a couple of key fixed points.', 'start': 171.787, 'duration': 6.722}, {'end': 193.134, 'text': "Okay, so the fixed points of the system, fixed points, we're going to have a fixed point corresponding to the pendulum down position.", 'start': 178.929, 'duration': 14.205}, {'end': 204.684, 'text': 'So what we know has to happen is theta has to equal either zero for the pendulum down or pi for the pendulum up.', 'start': 193.734, 'duration': 10.95}, {'end': 206.825, 'text': 'theta dot has to equal zero.', 'start': 204.684, 'duration': 2.141}, {'end': 209.527, 'text': 'x dot has to equal zero.', 'start': 206.825, 'duration': 2.702}], 'summary': 'The problem involves two degrees of freedom, resulting in four coupled nonlinear odes, with key fixed points at theta=0 or pi and theta dot=0 and x dot=0.', 'duration': 82.033, 'max_score': 127.494, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg127494.jpg'}, {'end': 309.97, 'src': 'embed', 'start': 266.812, 'weight': 3, 'content': [{'end': 279.917, 'text': 'so through df dx, evaluated at a fixed point, you could get a linear system of equations x, dot equals, ax plus bu.', 'start': 266.812, 'duration': 13.105}, {'end': 284.967, 'text': "Okay, and now I haven't told you what U is.", 'start': 282.185, 'duration': 2.782}, {'end': 286.108, 'text': 'This is super important.', 'start': 285.027, 'duration': 1.081}, {'end': 306.182, 'text': "So U, the control input for this system, what we're going to get to control, we're going to say that U equals a force on the cart in the X direction.", 'start': 287.028, 'duration': 19.154}, {'end': 309.97, 'text': 'Okay, and this is actually very reasonable.', 'start': 307.608, 'duration': 2.362}], 'summary': 'System of equations derived from df dx can be controlled by force in x direction', 'duration': 43.158, 'max_score': 266.812, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg266812.jpg'}], 'start': 72.082, 'title': 'Modeling and control of a pendulum system', 'summary': 'Covers the modeling of a two degree of freedom system with four coupled nonlinear odes and discusses the fixed points, jacobian computation, and control inputs for the pendulum system, emphasizing the reasonable control input of force on the cart in the x direction.', 'chapters': [{'end': 178.509, 'start': 72.082, 'title': 'Modeling a two degree of freedom system', 'summary': "Discusses the modeling of a two degree of freedom system, consisting of a cart's position and a pendulum's angle, resulting in a high dimensional dynamical system with four coupled nonlinear odes.", 'duration': 106.427, 'highlights': ['The system state is defined by the position of the cart (x) and the angle of the pendulum (theta), resulting in a two degree of freedom system.', "The dynamical system is described by four coupled ODEs, derived from Newton's second law, representing the motion of the cart and the pendulum.", 'The system can be linearized, and it has a couple of key fixed points, indicating stability and equilibrium.']}, {'end': 332.611, 'start': 178.929, 'title': 'Pendulum system control', 'summary': 'Discusses the fixed points of the pendulum system, the computation of jacobian, and the control input for the system, emphasizing the reasonable control input of force on the cart in the x direction.', 'duration': 153.682, 'highlights': ['The control input U for the system is defined as a force on the cart in the X direction, which is realistic and achievable by using a motor and a controller to actuate the force, making it a feasible approach for controlling the pendulum system.', "The computation of the Jacobian using the Euler-Lagrange equations and the fixed points enables the derivation of a linear system of equations x dot equals ax plus bu, providing a method for analyzing the system's behavior and stability.", 'The system has two basic fixed points: the pendulum down with the cart fixed when theta equals zero, and the pendulum up with the cart fixed when theta equals pi, indicating stable positions for the system.', "The rates of change in the system, including theta and x, are independent of x itself, making x a free variable and demonstrating that the position of the cart does not affect the system's stability in these fixed points."]}], 'duration': 260.529, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg72082.jpg', 'highlights': ['The system state is defined by the position of the cart (x) and the angle of the pendulum (theta), resulting in a two degree of freedom system.', "The dynamical system is described by four coupled ODEs, derived from Newton's second law, representing the motion of the cart and the pendulum.", 'The system can be linearized, and it has a couple of key fixed points, indicating stability and equilibrium.', 'The control input U for the system is defined as a force on the cart in the X direction, which is realistic and achievable by using a motor and a controller to actuate the force, making it a feasible approach for controlling the pendulum system.', "The computation of the Jacobian using the Euler-Lagrange equations and the fixed points enables the derivation of a linear system of equations x dot equals ax plus bu, providing a method for analyzing the system's behavior and stability.", 'The system has two basic fixed points: the pendulum down with the cart fixed when theta equals zero, and the pendulum up with the cart fixed when theta equals pi, indicating stable positions for the system.']}, {'end': 530.829, 'segs': [{'end': 362.613, 'src': 'embed', 'start': 333.479, 'weight': 0, 'content': [{'end': 340.14, 'text': "Okay, and so now what I'm going to do is I'm just going to fire up MATLAB and show you, I've already cooked up all of these examples.", 'start': 333.479, 'duration': 6.661}, {'end': 344.601, 'text': 'So I have this nice function.', 'start': 342.021, 'duration': 2.58}, {'end': 347.622, 'text': 'So in MATLAB, right, I build these right-hand side functions.', 'start': 345.021, 'duration': 2.601}, {'end': 350.462, 'text': 'This is my nonlinear ODE.', 'start': 347.642, 'duration': 2.82}, {'end': 354.183, 'text': "It's called Cart Pend, the Cart Pendulum System.", 'start': 350.822, 'duration': 3.361}, {'end': 360.991, 'text': 'And it gives me the time derivative given the state.', 'start': 355.003, 'duration': 5.988}, {'end': 362.613, 'text': "So here it's called y.", 'start': 361.091, 'duration': 1.522}], 'summary': 'Matlab is used to develop nonlinear ode for cart pendulum system.', 'duration': 29.134, 'max_score': 333.479, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg333479.jpg'}, {'end': 445.083, 'src': 'embed', 'start': 387.754, 'weight': 2, 'content': [{'end': 390.757, 'text': "And then there's d, which is essentially some damping term.", 'start': 387.754, 'duration': 3.003}, {'end': 393.38, 'text': 'Okay, so in these equations there could be some friction.', 'start': 390.938, 'duration': 2.442}, {'end': 398.186, 'text': 'I believe I mean the damping to be as opposing the x dot.', 'start': 393.4, 'duration': 4.786}, {'end': 400.228, 'text': "Okay, so it's a damping on the cart.", 'start': 398.646, 'duration': 1.582}, {'end': 401.77, 'text': 'Maybe this cart has some friction.', 'start': 400.528, 'duration': 1.242}, {'end': 404.333, 'text': "And I'm assuming the pendulum has a lot less friction.", 'start': 402.37, 'duration': 1.963}, {'end': 414.832, 'text': "And then finally, I have this U, so if I was going to apply a force, you can derive Euler-Lagrange or Hamilton's with some force applied.", 'start': 405.885, 'duration': 8.947}, {'end': 417.214, 'text': "And I'm not going to bore you with all the details.", 'start': 415.612, 'duration': 1.602}, {'end': 421.997, 'text': "There's going to be a link to this on YouTube, so you can download this code and read through it yourself.", 'start': 417.234, 'duration': 4.763}, {'end': 424.9, 'text': 'But the right-hand side, these dynamics are pretty nasty.', 'start': 422.037, 'duration': 2.863}, {'end': 430.766, 'text': 'Okay, this actually takes a long time to derive by hand on pencil and paper for the system.', 'start': 425.64, 'duration': 5.126}, {'end': 437.474, 'text': 'This is the most time-consuming part of this whole demo, is actually getting this right-hand side vector field right.', 'start': 431.347, 'duration': 6.127}, {'end': 440.017, 'text': "But I'm not going to bore you with the details.", 'start': 438.495, 'duration': 1.522}, {'end': 445.083, 'text': "You can see if I go on and on, it's a pretty long, nasty expression.", 'start': 441.399, 'duration': 3.684}], 'summary': 'Discussion of damping, friction, and force application in system dynamics.', 'duration': 57.329, 'max_score': 387.754, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg387754.jpg'}, {'end': 502.288, 'src': 'embed', 'start': 473.517, 'weight': 1, 'content': [{'end': 481.745, 'text': "So I say this is mass 1, this is mass 5, length is 2, gravity is normal, and there's some moderate dissipation on the cart.", 'start': 473.517, 'duration': 8.228}, {'end': 488.501, 'text': 'And in MATLAB, I can integrate vector fields using ODE45, so I can integrate this.', 'start': 483.559, 'duration': 4.942}, {'end': 495.785, 'text': 'If I set up some time span, so I want to integrate from 0 to time 10 with this initial condition.', 'start': 489.222, 'duration': 6.563}, {'end': 502.288, 'text': 'So again, this initial condition means x is 0, x dot is 0.', 'start': 496.325, 'duration': 5.963}], 'summary': 'Using matlab ode45 to integrate vector fields with time span 0 to 10.', 'duration': 28.771, 'max_score': 473.517, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg473517.jpg'}], 'start': 333.479, 'title': 'Modeling and simulating dynamic systems', 'summary': "Discusses modeling a nonlinear ode in matlab for the cart pendulum system with parameters including mass, length, and damping, and deriving the dynamics for simulating a system with euler-lagrange and hamilton's methods, highlighting the ease of simulating the system in matlab.", 'chapters': [{'end': 404.333, 'start': 333.479, 'title': 'Modeling nonlinear ode in matlab', 'summary': 'Discusses building a right-hand side function for a nonlinear ode in matlab, specifically modeling the cart pendulum system with parameters including mass, length, and damping.', 'duration': 70.854, 'highlights': ['The function built in MATLAB is for a nonlinear ODE called Cart Pend, representing the Cart Pendulum System with parameters such as mass, length, and damping.', 'The parameters involved in the system include the masses of the small mass and the cart, as well as the length of the inverted pendulum and a damping term d.', 'The damping term d is meant to oppose the x dot, representing a damping on the cart, possibly due to friction.']}, {'end': 530.829, 'start': 405.885, 'title': 'Deriving dynamics for simulating system', 'summary': "Discusses deriving the dynamics for simulating a system with euler-lagrange and hamilton's methods, emphasizing the complexity of the process and the ease of simulating the system in matlab.", 'duration': 124.944, 'highlights': ['The most time-consuming part of the demonstration is deriving the nonlinear right-hand side vector field for the system, which can be simulated with or without forcing in MATLAB.', 'Integration of vector fields using ODE45 in MATLAB allows for simulating the system with specified parameters and initial conditions.', 'The force input affects the x dot and theta dot equations when going through Euler-Lagrange for the system.', "Applying a force allows for deriving Euler-Lagrange or Hamilton's with some force applied to the system, which can be accessed through a YouTube link for further details.", "The right-hand side dynamics for the system are described as 'pretty nasty' and are not elaborated on in the chapter."]}], 'duration': 197.35, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg333479.jpg', 'highlights': ['The function built in MATLAB is for a nonlinear ODE called Cart Pend, representing the Cart Pendulum System with parameters such as mass, length, and damping.', 'Integration of vector fields using ODE45 in MATLAB allows for simulating the system with specified parameters and initial conditions.', "Applying a force allows for deriving Euler-Lagrange or Hamilton's with some force applied to the system, which can be accessed through a YouTube link for further details.", 'The parameters involved in the system include the masses of the small mass and the cart, as well as the length of the inverted pendulum and a damping term d.', 'The most time-consuming part of the demonstration is deriving the nonlinear right-hand side vector field for the system, which can be simulated with or without forcing in MATLAB.']}, {'end': 904.84, 'segs': [{'end': 572.647, 'src': 'heatmap', 'start': 531.669, 'weight': 0, 'content': [{'end': 536.651, 'text': "So for right now we're just going to simulate this thing in free physics with no forcing.", 'start': 531.669, 'duration': 4.982}, {'end': 543.588, 'text': "And down here at the bottom, I have a function I've written called draw cart penned.", 'start': 538.823, 'duration': 4.765}, {'end': 547.932, 'text': 'Um, and so essentially it just plots a movie of the pendulum.', 'start': 543.608, 'duration': 4.324}, {'end': 550.594, 'text': 'And again, you can download this and see what I did.', 'start': 548.673, 'duration': 1.921}, {'end': 556.54, 'text': "So let's actually try to run this sim cart penned.", 'start': 551.776, 'duration': 4.764}, {'end': 559.123, 'text': "Okay Let's hope this runs.", 'start': 556.56, 'duration': 2.563}, {'end': 563.722, 'text': 'And you can see this is basically what you expect to happen.', 'start': 561.28, 'duration': 2.442}, {'end': 566.984, 'text': "You let this thing go, and it's going to just swing and swing and swing.", 'start': 563.742, 'duration': 3.242}, {'end': 569.685, 'text': 'And eventually, if I integrated it for longer, it would come to rest.', 'start': 567.004, 'duration': 2.681}, {'end': 572.647, 'text': "Maybe I'll just show you that because it's pretty easy.", 'start': 569.725, 'duration': 2.922}], 'summary': 'Simulated pendulum in free physics; pendulum swings and eventually comes to rest.', 'duration': 27.454, 'max_score': 531.669, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg531669.jpg'}, {'end': 733.873, 'src': 'heatmap', 'start': 710.054, 'weight': 0.761, 'content': [{'end': 717.56, 'text': "So I'm going to run my, I'm going to run pull place cart pend.", 'start': 710.054, 'duration': 7.506}, {'end': 720.822, 'text': "So it's going to load the A matrix and the B matrix.", 'start': 718.24, 'duration': 2.582}, {'end': 722.864, 'text': 'Oh, I think that ran the whole thing.', 'start': 721.723, 'duration': 1.141}, {'end': 728.409, 'text': "So I'm going to load my A matrix and I'm going to look at I of A.", 'start': 724.906, 'duration': 3.503}, {'end': 733.873, 'text': 'So these are the eigenvalues of my A matrix in the pendulum up condition.', 'start': 729.81, 'duration': 4.063}], 'summary': 'The speaker loaded a and b matrices, then examined the eigenvalues of a matrix in a specific condition.', 'duration': 23.819, 'max_score': 710.054, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg710054.jpg'}, {'end': 805.882, 'src': 'embed', 'start': 775.434, 'weight': 1, 'content': [{'end': 785.342, 'text': "It's a four by four matrix So if I look at the rank of this CTRB matrix, if this rank is 4, my system's controllable.", 'start': 775.434, 'duration': 9.908}, {'end': 788.605, 'text': 'If this rank is not 4, the system is not controllable.', 'start': 785.662, 'duration': 2.943}, {'end': 797.216, 'text': 'Okay, so, with this A matrix and this B matrix corresponding to force in the X direction of the cart,', 'start': 790.191, 'duration': 7.025}, {'end': 805.882, 'text': 'because the rank of my controllability matrix is 4, I can span all of my state space with this controllability subspace,', 'start': 797.216, 'duration': 8.666}], 'summary': 'A 4x4 ctrb matrix indicates system controllability.', 'duration': 30.448, 'max_score': 775.434, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg775434.jpg'}, {'end': 904.84, 'src': 'embed', 'start': 891.634, 'weight': 2, 'content': [{'end': 897.197, 'text': "We're going to use the place command in MATLAB to place these eigenvalues and design this matrix k.", 'start': 891.634, 'duration': 5.563}, {'end': 903.739, 'text': "Then we're going to develop an optimal eigenvalue placement using the linear quadratic regulator or LQR control.", 'start': 897.197, 'duration': 6.542}, {'end': 904.84, 'text': "So that's coming up next.", 'start': 903.92, 'duration': 0.92}], 'summary': 'Using matlab place command to place eigenvalues and design matrix k for optimal lqr control.', 'duration': 13.206, 'max_score': 891.634, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg891634.jpg'}], 'start': 531.669, 'title': 'Simulating pendulum motion and linearized system control', 'summary': 'Covers simulating pendulum motion in free physics and control of linearized system, including the process of linearization, controllability check, and controller design using eigenvalues and lqr control in matlab.', 'chapters': [{'end': 582.413, 'start': 531.669, 'title': 'Simulating pendulum motion in physics', 'summary': 'Discusses simulating pendulum motion in free physics with no forcing using a function called draw cart pend, showing the swinging motion and the eventual coming to rest.', 'duration': 50.744, 'highlights': ['The chapter demonstrates simulating pendulum motion in free physics with no forcing using a function called draw cart pend.', 'The pendulum motion is shown to continue swinging and eventually come to rest.', "The function draw cart pend plots a movie of the pendulum's motion."]}, {'end': 904.84, 'start': 582.433, 'title': 'Control of linearized system', 'summary': 'Discusses the process of linearizing the system, checking controllability, and designing a controller to stabilize the system using eigenvalues and lqr control in matlab.', 'duration': 322.407, 'highlights': ["The system's controllability is determined by checking the rank of the controllability matrix, and since the rank is 4, the system is controllable. The rank of the controllability matrix is checked to be 4, indicating that the system is controllable, allowing the development of a controller to control the system.", 'Designing a controller using eigenvalues and linear quadratic regulator (LQR) control to stabilize the system and move unstable eigenvalues into the stable left-half plane. The process involves designing a controller with stable eigenvalues using the linear quadratic regulator (LQR) control to stabilize the system and move unstable eigenvalues into the stable left-half plane.', 'Utilizing the place command in MATLAB to place eigenvalues and develop optimal eigenvalue placement using LQR control. The next steps involve using the place command in MATLAB to place eigenvalues and developing an optimal eigenvalue placement using the linear quadratic regulator (LQR) control.']}], 'duration': 373.171, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qjhAAQexzLg/pics/qjhAAQexzLg531669.jpg', 'highlights': ["The function draw cart pend plots a movie of the pendulum's motion.", "The system's controllability is determined by checking the rank of the controllability matrix, and since the rank is 4, the system is controllable.", 'Designing a controller using eigenvalues and linear quadratic regulator (LQR) control to stabilize the system and move unstable eigenvalues into the stable left-half plane.']}], 'highlights': ['The practical application of MATLAB for control system design is highlighted, showcasing the process of stabilizing the dynamics of the inverted pendulum on a cart.', 'The chapter focuses on coding real examples in MATLAB to design controllers for stabilizing dynamics of systems, such as an inverted pendulum on a cart.', 'The system state is defined by the position of the cart (x) and the angle of the pendulum (theta), resulting in a two degree of freedom system.', "The dynamical system is described by four coupled ODEs, derived from Newton's second law, representing the motion of the cart and the pendulum.", 'The system can be linearized, and it has a couple of key fixed points, indicating stability and equilibrium.', 'The control input U for the system is defined as a force on the cart in the X direction, which is realistic and achievable by using a motor and a controller to actuate the force, making it a feasible approach for controlling the pendulum system.', "The computation of the Jacobian using the Euler-Lagrange equations and the fixed points enables the derivation of a linear system of equations x dot equals ax plus bu, providing a method for analyzing the system's behavior and stability.", 'The system has two basic fixed points: the pendulum down with the cart fixed when theta equals zero, and the pendulum up with the cart fixed when theta equals pi, indicating stable positions for the system.', 'The function built in MATLAB is for a nonlinear ODE called Cart Pend, representing the Cart Pendulum System with parameters such as mass, length, and damping.', 'Integration of vector fields using ODE45 in MATLAB allows for simulating the system with specified parameters and initial conditions.', "The system's controllability is determined by checking the rank of the controllability matrix, and since the rank is 4, the system is controllable.", 'Designing a controller using eigenvalues and linear quadratic regulator (LQR) control to stabilize the system and move unstable eigenvalues into the stable left-half plane.']}