pole placement | state space, part 2 video -凯发k8网页登录
from the series:
brian douglas
this video provides an intuitive understanding of pole placement, also known as full state feedback. this is a control technique that feeds back every state to guarantee closed-loop stability and is the stepping stone to other methods like lqr and h infinity.
we’ll cover the structure of the control law and why moving poles or eigenvalues around changes the dynamics of a system. we’ll also go over an example in matlab and touch on a few interesting comparisons to other control techniques.
in this video, we’re going to talk about a way to develop a feedback controller for a model that’s represented using state-space equations. and we’re going to do that with a method called pole placement, or full state feedback. now, my experience is that pole placement itself isn’t used extensively in industry; you might find that you’re using other methods like lqr or h infinity more often. however, pole placement is worth spending some time on because it’ll give you a better understanding of the general approach to feedback control using state-space equations and it’s a stepping stone to getting to those other methods. so i hope you stick around. i’m brian, and welcome to a matlab tech talk.
to start off, we have a plant with inputs u and outputs y. and the goal is to develop a feedback control system that drives the output to some desired value. a way you might be familiar with doing this is to compare the output to a reference signal to get the control error. then you develop a controller that uses that error term to generate the input signals into the plant with the goal of driving the error to zero. this is the structure of the feedback system that you’d see if you were developing, say, a pid controller.
but for pole placement, we’re going to approach this problem in a different way. rather than feed back the output y, we’re going to feed back the value of every state variable in our state vector, x. we’re going to claim that we know the value of every state even though it’s not necessarily part of the output y. we’ll get to that in a bit, but for now, assume we have access to all of these values. we then take the state vector and multiply it by a matrix that is made up of a bunch of different gain values. the result is subtracted from a scaled reference signal, and this result is fed directly into our plant as the input.
now you’ll notice that there isn’t a block here labeled “controller” like we have in the top block diagram. in this feedback structure, this whole section is the controller. and pole placement is a method by which we can calculate the proper gain matrix to guarantee system stability, and the scaling term on the reference is used to ensure that steady state error performance is acceptable. i’ll cover both of these in this video.
in the last video, we introduced the state equation x dot = ax bu. and we showed that the dynamics of a linear system are captured in this first part, ax. the second part is how the system responds to inputs, but how the energy in the system is stored and moves is captured by the ax term. so you might expect that there is something special about the a matrix when it comes to controller design. and there is: any feedback controller has to modify the a matrix in order to change the dynamics of the system. this is especially true when it comes to stability.
the eigenvalues of the a matrix are the poles of the system, and the location of the poles dictates stability of a linear system. and that’s the key to pole placement: generate the required closed-loop stability by moving the poles or the eigenvalues of the closed-loop a matrix.
i want to expand a bit more on the relationship between poles, eigenvalues, and stability before we go any further because i think it’ll help you understand exactly how pole placement works.
for this example, let’s just start with an arbitrary system and focus on the dynamics, the a matrix. we can rewrite this in non-matrix form so it’s a little bit easier to see how the state derivatives relate to the states. in general, each state can change as a function of the other states. and that’s the case here; x dot 1 changes based on x2 and x dot 2 changes based on both x1 and x2. this is perfectly acceptable, but it makes it hard to visualize how eigenvalues are contributing to the overall dynamics. so what we can do is transform the a matrix into one that uses a different set of state variables to describe the system.
this transformation is accomplished using a transform matrix whose columns are the eigenvectors of the a matrix. what we end up with after the transformation is a modified a matrix consisting of the complex eigenvalues along the diagonal and zeroes everywhere else. these two models represent the same system. they have the same eigenvalues, the same dynamics; it’s just the second one is described using a set of state variables that change independently of each other.
with the a matrix written in diagonal form, it’s easy to see that we’re left with a set of first-order differential equations where the derivative of each state is only affected by that state and nothing else. and here’s the cool part: the solution to a differential equation like this is in the form z = a constant times e ^ lambda t. where lambda is the eigenvalue for that given state variable.
okay, let’s dive into this equation a little bit more. zn shows how the state changes over time given some initial condition, c. or another way of thinking about this is that if you initialize the state with some energy, this equation shows what happens to that energy over time. and by changing lambda, you can affect how the energy is dissipated or, in the case of an unstable system, how the energy grows.
let’s go through a few different values of lambda so you can visually see how energy changes based on the location of the eigenvalue within the complex plane.
if lambda is a negative real number, then this mode is stable since the solution is e raised to a negative number, and any initial energy will dissipate over time. if it’s positive, then it’s unstable because the energy will grow over time. and if there is a pair of imaginary eigenvalues, then the energy in the mode will oscillate, since e ^ imaginary number produces sines and cosines. and any combination of real and imaginary numbers in the eigenvalue will produce a combination of oscillations and exponential energy dissipation.
i know this was all very fast, but hopefully it made enough sense that now we can state the problem we’re trying to solve. if our plant has eigenvalues that are at undesirable locations in the complex plane, then we can use pole placement to move them somewhere else. certainly if they’re in the right half plane it’s undesirable since they’d be unstable, but undesirable could also mean there are oscillations that you want to get rid of, or maybe just speed up or slow down the dissipation of energy in a particular mode.
with that behind us, we can now get into how pole placement moves the eigenvalues. remember the structure of the controller that we drew at the beginning? this results in an input u = r*kr - k*x. where r kr is the scaled reference, which again we’ll get to in a bit. and kx is the state vector that we’re feeding back multiplied by the gain matrix.
here’s where the magic happens. if we plug this control input into our state equation, we are closing the loop and we get the following state equation: notice that a and -bk both act on the state vector so we can combine them to get modified a matrix.
this is the closed-loop a matrix and we have the ability to move the eigenvalues by choosing an appropriate k. and this is easy to do by hand for simple systems. let’s try an example with a second-order system with a single input. we can find the eigenvalues by setting the determinant of a - lambda i to zero and then solve for lambda. and they are at -2 and 1. one of the modes will blow up to infinity because of the presence of the positive real eigenvalue and so the system is unstable. let's use pole placement to design a feedback controller that will stabilize this system by moving the unstable pole to the left half plane.
our closed-loop a matrix is a - bk and the gain matrix, k, is 1x2 since there is one output and two states. this results in - k1, 1 - k2, 2 and -1. we can solve for the eigenvalues of acl like we did before and we get this characteristic equation that is a function of our two gain values.
let’s say we want our closed-loop poles at -1 and -2. in this way, the characteristic equation needs to be l^2 3l 2 = 0. so at this point, it’s straightforward to find the appropriate k1 and k2 that make these two equations equal. we just set the coefficients equal to each other and solve. and we get k1 = 2, and k2 = 1 and that’s it. if we place these two gains in the state feedback path of this system, it will be stabilized with eigenvalues at -1 and -2.
walking through an example by hand, i think, gives you a good understanding of pole placement; however, the math involved starts to become overwhelming for systems that have more than two states. the idea is the same; just solving the determinant becomes impractical. but we can do this exact same thing in matlab with pretty much a single command.
i’ll show you quickly how to use the place command in matlab by recreating the same system we did by hand. i’ll define the four matrices, and then create the open-loop state-space object. i can check the eigenvalues of the open-loop a matrix just to show you that there is, in fact, that positive eigenvalue that causes this system to be unstable.
that’s no good, so let’s move the eigenvalues of the system to -2 and -1. now solving for the gain matrix using pole placement can be done with the place command. and we get gain values 2 and 1 like we expected.
now the new closed-loop a matrix is a - bk, and just to double check, this is what acl looks like and it does have eigenvalues at -1 and -2. okay, i’ll create the closed-loop system object and now we can compare the step responses for both.
the step response of the open-loop system is predictably unstable. the step response of the closed-loop system looks much better. however, it’s not perfect. rather than rising to 1 like we’d expect, the steady state output is only 0.5. and this is finally where the scaling on the reference comes in. so far, we’ve only been concerned with stability and have paid little attention to steady state performance. but even addressing this is pretty straightforward. if the response to the input is only half of what you expect, why don’t we just double the input? and that’s what we do. well, not double it, but we scale the input by the inverse of the steady state value.
in matlab, we can do this by inverting the dc gain of the system. you can see that the dc gain is 0.5, and so the inverse is 2. now we can rebuild our closed-loop system by scaling the input by kr. and checking the step response. no surprise; its steady state value is 1.
and that’s pretty much what there is to basic pole placement. we feed back every state variable and multiply them by a gain matrix in such a way that moves the closed-loop eigenvalues, and then we scale the reference signal so that the steady state output is what we want.
of course, there’s more to pole placement than what i could cover in this 12-minute video, and i don’t want to drag this on too long, but i also don’t want to leave this video without addressing a few more interesting things for you to consider. so in the interest of time, let’s blast through these final thoughts lightning-round style. are you ready? let’s go!
pole placement is like fancy root locus. with root locus you have one gain that you can adjust that can only move to the poles along the locus lines. but with pole placement, we have a gain matrix that gives us the ability to move the poles anywhere in the complex plane, not just along single-dimensional lines.
a two-state pole placement controller is very similar to a pd controller. with pd, you feed back the output and generate the derivative within the controller. with pole placement, you are feeding back the derivative as a state, but the results are essentially the same: 2 gains, one for a state and one for its derivative.
okay, we can move eigenvalues around, but where should we place them? the answer to that is a much longer video, but here are some things to think about. if you have a high-order system, consider keeping two poles much closer to the imaginary axis than the others so that the system will behave like a common second-order system. these are called the dominant poles since they are slower and tend to dominate the response of the system.
keep in mind that if you try to move a bunch of eigenvalues really far left in order to get a super-fast response, you may find that you don’t have the speed or authority in your actuators to generate the necessary response. this is because it takes more gain, or more actuator effort, to move the eigenvalues further from their open-loop starting points.
full state feedback is a bit of a misnomer. you are feedback every state in your mathematical model, but you don’t, and can’t, feed back every state in a real system. for just one example, at some level, all mechanical hardware is flexible, which means additional states, but you may choose to ignore those states in your model and develop your feedback controller assuming a rigid system. the important part is that you feed back all critical states to your design so that your controller will still work on the real hardware.
you have to have some kind of access to all of the critical states in order to feed them back. the output, y, might include every state, in which case you’re all set. however, if this isn’t the case, you will either need to add more sensors to your system to measure the missing states or use the existing outputs to estimate or observe the states you aren’t measuring directly. in order to observe your system, it needs to be observable, and similarly, in order to control your system it needs to controllable. we’ll talk about both of those concepts in the next video.
so that’s it for now. i hope these final few thoughts helped you understand a little more about what it means to do pole placement and how it’s part of an overall control architecture.
if you want some additional information, there are a few links in the description that are worth checking out that explain more about using pole placement with matlab.
if you don’t want to miss the next tech talk video, don’t forget to subscribe to this channel. also, if you want to check out my channel, control system lectures, i cover more control theory topics there as well. thanks for watching. i’ll see you next time.
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 mathworks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- (español)
- (english)
- (english)
欧洲
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
亚太
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)