620 likes | 742 Views
Lecture 40: Review of Controls. Converting a problem to mathematics. Linearization. Stabilization (making x go to zero). Tracking (making x go to x r — the hardest). Observers (stabilizing the system when you can’t measure the entire state). I’m sorry about Problem Set 11:
E N D
Lecture 40: Review of Controls Converting a problem to mathematics Linearization Stabilization (making x go to zero) Tracking (making x go to xr— the hardest) Observers (stabilizing the system when you can’t measure the entire state) I’m sorry about Problem Set 11: I wanted to stretch you, but not bend you out of shape
BONUS RECITATION! Joey will run an extra recitation in the Conference Room Monday 11-12
Converting a problem to mathematics You can write the physics using free body diagrams or the Euler-Lagrange method There may be an auxiliary electrical equation Let’s recall magnetic suspension; it has a number of useful features.
Converting a problem to mathematics yis positive down Numerical parameters for later
Converting a problem to mathematics We’ll need to convert the second order dynamical equation to a pair of first order equations We’ll want to rearrange the electrical equation to look like a state equation Our state vector will be where v denotes the rate of change of y
Converting a problem to mathematics Manipulate the equations combine these input
Converting a problem to mathematics and I have replaced e by the generic input variable u This is a nonlinear problem, which brings us to the next step
Linearization We linearize about some reference state, some point in state space that is stationary This is frequently, but not always, zero For the magnetic suspension system is it not zero The reference state may include a reference input, as it does for the magnetic suspension
Linearization Find the reference state We have Clearly v0 = 0. y0 cannot be zero, so we have Finally
Linearization We are at liberty to select one of these variables. y0 makes the most sense. The reference state is then We get the linear equations by writing x = x0 + x’, e = e0 + e’
Linearization How do we actually do this?
Linearization One way, the brute force and awkwardness way, is to substitute for x and e and expand all the terms, keeping only those linear in the primed variables This works if the problem is simple, and it can be done if the problem is hard I did this for the magnetic suspension system in Lecture 33 and here are the relevant calculations once again
Linearization We want to linearize around the equilibrium solution This is the term that needs work I’ll deal with it on the next couple of slides
Linearization The linear equations We can make a matrix equation out of this
Linearization Let me note that there is another way to linearize this will seem weird to you, but it is very helpful once you believe it Think of expanding F in a three variable Taylor series around the equilibrium
Linearization substitute the equilibrium values
Linearization Remember that So that the expressions become And these are the columns of the linearized matrix
Linearization Let’s look at another example of linearization by differentiation Find an equilibrium such that this vanishes and linearize about that equilibrium
Linearization Take the simple equilibrium, for which x = 0
Linearization The more complicated equilibrium is In this case we have
Stabilization We have arrived at the canonical problem where our goal is to choose u in such a way that x will go to zero We do that using full state feedback, setting u = -Gx We need to find G, and we have a ritual to do that The ritual only works if the system is controllable and the first step in the ritual is figuring out if the system is controllable. It’s probably worth noting that: A is a kxk square matrix B is a kx 1 column vector G is a 1 xk row vector
Stabilization Step one is to form the controllability matrix and calculate its determinant. If the determinant is nonzero the system is controllable and we can move forward Find the inverse of S and select its last row This is a row vector. We calculate k – 1 more rows to make a square matrix T.
Stabilization And we have the square matrix which is invertible We use T to do a change of variable (which just amounts to a change of basis for the mathematically inclined of you) We see what happens on the next slide
Stabilization We can multiply this last equation by T to get We agree to rename the matrices and vectors to make this equation A1 and B2 are in companion form; here’s a k = 6 example
Stabilization Now we are ready to talk about gains, and we have to start in terms of z x will go to zero if z goes to zero. z will go to zero if the eigenvalues of Ac all have negative real parts. We call these eigenvalues poles. Because of the companion form, it is easy to choose gains to put the poles where we want them
Stabilization The k = 6 example The characteristic polynomial Remember this ritual for finding characteristic polynomials You don’t need to calculate determinants
Stabilization We can form the characteristic polynomial for the poles we want Expand that in powers of s and equate the coefficients to determine the gains (in z space) Once we have those, we need to go back tox space, and let’s see how that goes
Stabilization Were there but worlds enough and time I would now have you work a stabilization problem But there ain’t, so I’ll work one
TWO THINGS TO REMEMBER The characteristic polynomial for a second order system can be written in terms of the poles as The characteristic polynomial for a 2 x 2 matrix in companion form is
Stabilization The inverse: swap the diagonal terms change the signs of the off-diagonal terms divide by the determinant Build T
Stabilization The inverse: swap the diagonal terms change the signs of the off-diagonal terms divide by the determinant The companion forms
Stabilization Now we can form Ac and work on its eigenvalues (the poles) Characteristic polynomials
Stabilization The choice of poles is up to you Critical damping: s1 = -r = s2 Conjugate pair: s1 = -r+ jq , s2 = -r- jq
Tracking This is probably the hardest one, and we haven’t spent much time on it Find some ur such that Find some Arsuch that Two options present themselves to us: We’ve run out of time, so we’ll never get a chance to look at the first method We’ll follow Friedland in working with the second method
Tracking We compare with Friedland equation (6.37)
Tracking We can ask that the derivative of the error goes to zero, from which is stable, hence invertible and we can write the latter form being equivalent to equation 6.40 We find G in the same manner we just rehearsed
Tracking It may happen that we can actually make e vanish in its entirety If that is the case, then we will be very happy It is more generally true that we cannot that all we can make vanish is some subset of e typically the part that looks like an error in y This is what Friedland does, multiplies the error by the matrix/vector C
Tracking rearrange we want this to work for any xr so . . .
Tracking Let’s look at another 2 x 2 system and see if we can make it track
Tracking From the earlier part of this lecture, we can find the gains given the poles I will take them to be at -1, giving me a critically damped system
Tracking We can build the error matrix and in this case we can actually kill all the error by choosing We select the feedback as we had before
Tracking We can plug all this in and integrate numerically. Here’s the result for Y = 1, w = 2
Observers This last bit depends on the Lecture 38 Suppose that all we know is an output y, a scalar for an SISO system
Observers We use y, the control and an artificial dynamical system to find an estimate for x and we select the carat matrices to minimize the difference between x and its estimate.
Observers As usual we want to construct a system for the evolution of the error and, of course, make the error go to zero Note that K is a column vector We eliminate the explicit appearance of the estimate
Observers e will go to zero if I get rid of the contributions from x and u and make sure the new matrix is stable This becomes a pole placement exercise