Source: https://training.ti.com/state-space-control-seminar-session-2
Timestamp: 2019-04-22 19:54:54+00:00

Document:
Properties of linear systems, so our introduction then acquainted us with the state space formulation, and how we extract certain information from that, including eigenvectors and eigenvalues, and the dynamic response, and then the connection between the state space representation and the transfer function representation. This section goes a little bit further, and examines the properties of the state space formulation. And there are three in particular, which are very important, plus a couple of others that you might not have imagined. The most obvious of the properties is that of stability. And you probably have a very clear image in your mind what is meant by stability. And it's obvious, I think, for stable systems, for a continuous time system, even a transfer function system what stable means. You know it when you see it. It's either something that remains bound, or it doesn't remain bound, and that's nice. But for the state space description where we have a set of internal variables, there are a couple of other classifications of stability which are important. And when you take the theory further, if you go on to study non-linear systems, you'll find that stability is very nebulous concept indeed. There are systems that kind of look as if they're stable, and look as if they're unstable at the same time. So I need to explain stability from the context of the state space description, and particularly from the state vector perspective. And then there are two properties which are unique to the state space description. Those are called controllability and observability. They don't apply to the transfer function description. But they do apply to the state space description. And they're very important. Because when we later go on to design control systems using the state space paradigm, if the system is not controllable, our effort will be futile. And then still later, when we go to design an estimator or an observer, that's the same thing, if the system we begin with is not observable, similarly our efforts will be futile. We can't estimate the state from an unobservable system. So controllability and observability are important properties that we'll need later. Now it turns out that stability, as well as controllability and observability, all these three, have a very clear visualization, if we can carry out the specific kind of transformation on the system called a modal decomposition. I'm going to explain to you what modal decomposition actually means. But if you can carry one out, all these properties become very clear to you, and there are the benefits towards doing it as well. So we'll start with modal decomposition, and I'm going to show you the properties explained in that term, and in terms of other things as well. And then we'll look at canonical realizations again. I've shown you one, phase variable canonical form. It turns out that there are two others, called the controllable canonical form, and the observable canonical form. Which is why this section comes right after that one about controllability and observability. And then the very last thing I'm going to do, it's a fairly short section, the last thing before lunch is to introduce the next tutorial that is going to be more or less, every tutorial after this will be based on it. It's a double mass system. It consists of a mechanical system having two masses, which are coupled together by a very lightly damped coupling, such that when you push one mass, the other mass moves. But there's some kind of energy exchange between the two masses. And the result is oscillatory. It's a nice easy to visualize system. And it has a lot of the dynamics that make these tutorials fun to do, and interesting at the same time. So I'm going to introduce that system at the end of this section. Now, I want to begin by explaining the concept of similar matrices. When matrices are used for transformation, you've seen that in n dimensions the matrix has dimensions n by n. The matrix is square. And so therefore if we have a transformation from one vector to another, in 3-dimensional space, the transformation matrix which performs that is 3-dimensional. Here, for example, we have a vector V, which is operated on by a matrix T1 to transform the vector to a different vector called V tilde. So V tilde is pointing in different direction than V, because it's been operated on by the matrix T1. Now T1, as well as V and V tilde, will be expressed in terms of a coordinate system that might be orthogonal. For example x1, y1, and z1, those might be three orthogonal coordinates which represent the vectors and the transformation between them. Now let's imagine that we change nothing, but the coordinate system in which all this information is presented. Instead of x1, y1, z1, we use x2, y2, z2. Well now, the same two matrices-- the same two vectors would have a slightly different representation. Because their elements will be different. Because although they're pointing in the same direction notionally, they're represented in a different coordinate frame. And the transformation matrix which moves from V to V tilde, that would be different too. Because its coordinate frame had changed. It's doing exactly the same thing, but it's doing it in a different coordinate frame. Matrices T1 and T2 are called similar matrices. They perform exactly the same transformation, but they perform it in a different coordinate frame. They're related by a transformation called a similarity transformation. In particular, T2 is equal to M to the minus 1, T1 times M, where M is a similarity transformation. It transforms a matrix from one coordinate frame into another coordinate frame. And it has a very specific form. Doesn't it? You see the matrix M. It must be square. It must have the same dimensions as T, because T2 has the same dimensions as T1. But M to the minus 1 times that, times M, when you see that, think similarity transformation. It's going to come in, in just a second. Now, this is an important point. So let me spend a couple of minutes to it, to describing it. It possible to find a similarity transformation matrix M, which takes T1 and makes T2 diagonal. And if you can do that, then there is a lot of benefits that come out of that particular representation, that particular coordinate frame. But in order for that to happen, T1 must have a full set of eigenvectors. Otherwise you can't diagonalize T2. If T1 has not got a full set of eigenvectors, you can't have a fully diagonal T2, but you can get close to it. The form of the matrix which appears, is called Jordan form representation, which I'm going to explain shortly. But let's now imagine that we've got a full set of eigenvectors in T1, and that some similarity transformation can be found, such that the diagonal matrix T2 which results, that matrix is diagonal, but it has a further property which is that you can arrange the elements of the diagonal matrix such that they are the eigenvalues of the system. And the similarity transformation which does that for you has columns, which are themselves the eigenvectors of T1. So there's some important information there that I want to repeat. If T1 has a full set of eigenvectors, the eigenvectors are by definition linearly independent. Those eigenvectors can be used as columns to form the similarity transformation matrix M. OK for dimensions, because you know you've got n eigenvalues in T1, T1 is n by n, and you've got a full set eigenvalues. And you've got n eigenvectors. And each eigenvector has an element in it. So by making those columns, the columns of M, M must also be n by n in dimension. And by using that matrix which results in a similarity transformation, T2 will be diagonal, but not only diagonal. The eigenvalues of T1 will be the elements of the diagonal on T2. Now, before I use that information, I'm going to introduce you to how you make a state transformation using a state equation. Now let's say that I've written a state equation for a system based on a particular choice of state elements. And I told you previously that there was nothing unique about those state elements. You can pick anything you like. So let's pretend that you make one choice, and it's not working out well for you, and you want to change them to a different set of elements. There's no reason why you can't do that. And the change can become accomplished by what's called a state transformation. So let's say you're using x, and you want to translate, use v instead. v is a different-- I mean it's a state vector, but I'm just calling it v for now. And it's related to x through this matrix M, which is an arbitrary matrix now for n. So what we'll do is plug this directly into the state equation, x dot equals x plus v. So the left-hand side is not x dot anymore, but it's M times v dot. v dot is the new state vector, equals AMv. Mv is just plugged in where x was before, plus v times u. v doesn't change. And now what we'll do is we'll pre-multiply both sides by the inverse of M. Now this is a nice thing if you can make M composed of the eigenvectors. Because M will be definitely invertible. So you can definitely find an inverse from M. It's square, so the dimensions are exactly what we need. And pre-multiplying both sides by the inverse of M, you get v dot equals M to the minus 1, A times M times v. Look, similarity transformation on the state vector. Plus n to the minus 1 times v times u. We performed a similarity transformation on the state vector. And guess what that M to the minus 1 AM matrix is going to be. It's going to be diagonal. And it's going to have the eigenvalues along the leading diagonal. Let's call it A1. And let's call M to the minus 1B, B1. Now that's the state vector into the transformed state. We now need to concentrate on the output equation. And we do the same thing. Though it's much simpler. Because we don't have to invert M. All we need is to replace x by M times v. And we'll call that C1. So C time M is going to be C1 plus v times uD is unaffected by all of this. So now we have the state equation and the output equation represented in terms of this new state, v, whatever v happens to be. Now the unique choice of-- so there's an infinite choice here. You can pick any state you like. So we're not tied to a particular state. You can change freely between one and the other. But for this unique choice, the elements of v have a particular name. They're called the modes of the system. Typical systems operate in characteristic set of patterns, as seen here. Those patterns are called modes. And it's a unique choice of the elements of the state vector which are called modes. And the reason that they're important is that, and you'll see in a moment, each of the modes is completely uncoupled from all the other modes. This transformation, unique transformation where you've used this M matrix of eigenvector columns to transform into-- using in effect vector transformation. That's called modal decomposition. And there are many reasons why you might want to do it. The first is, the fact that these modes are uncoupled from one another, gives us a very clear visualization of the pathways between the input and the output. Not only that, but the pathways from the input in the state, and the state to the output, are much clearer than they would be if you had just taken a random state vector representation. The dynamics are much easier to solve. Because there's scalar, and not vector. You can do a very simple view of motion over time, and it makes it clear where the dynamics of the system are. Because by exposing where the eigenvalues are, you know which are the dominant modes, and which are less important. Remember modes to the left in a complex plane, the eigenvalues to the left in a complex are decaying more quickly than those to the right, those closest to the imaginary axis, if it's a continues time system, and they are the parallel to that if it's a discrete time system. You also get a much clearer insight into the two properties I explained earlier of controllability and observability. And the reason for that is that the pathways are exposed in a modal decomposition. And the process is similar for a continuous time or a discrete time system. It's just that the meaning of eigenvalues is different. So let's do it. We're going to compose this modal similarity transformation matrix, which I'm now going to call W, because it's a very specific transformation matrix. M on the general one, but I want to call this W. And the columns of W are composed of the n independent eigenvectors of the system matrix A. So you've got n columns, each column having n elements. This is an n by n matrix. And I'm going to change the notation for the vector as well, because it's such a specific and a unique choice of elements called modes. I'm going to give it the symbol q, and the elements will be q1 to q sub n. There are the modes of the system. So, yeah. This is what it is. Now, there's another notation change I want to make you aware of. So this is the new state equation. And this is the new output equation. And because of this unique choice of columns for the transformation matrix W, we as I said, end up with a diagonalized new system matrix, lambda. This is an uppercase Lambda. And Lambda will contain, along its leading diagonal, the eigenvectors of A. So writing these equations, I guest this is how they look. The modal matrix, as its called, contains in its columns the eigenvectors of A. And the spectral matrix, as it's called Lambda, is a diagonal matrix where the eigenvalues lie along the leading diagonal, and all the other elements are zeros. So modal matrix and spectral matrix are the names that are applied to these two. Now the modal input matrix is W to the minus 1 times v. So we'll plug W into that state transformation formula that I showed you. Lambda I've explained. Now the input matrix, W to the minus 1 v. So when you use this decomposition, it's helpful to separate out the individual rows of this input matrix. So I'm calling these rows beta 1, beta 2, all the way to beta sub n. And these are the rows of W to the minus 1 v, which is why I'm writing it like this. So think of these as vectors. But actually they're row vectors, and there are n of them in the n rows of the input matrix now. Beta 1 and beta sub n are the rows of the input matrix, W to the minus 1 v. And therefore, this is what your state equation looks like in full form. The derivative of the modal vector on the left equals the spectral matrix times the modal vector, plus and then these are the rows of the new modal input matrix. But I'm thinking of them as vectors times the input vector. So if you like, it's the beta i's which capture the coupling of all the inputs onto a specific mode. And then the Lambda i captures the dynamics from qi to qi dot. So you see what I mean about complete decoupling now. If you can write the state equation in this form. So that's the modal input matrix. And that's how it looks in for each individual mode that's the equation that you've got. So notice now that this Lambda i appearing here, this is totally scalar. And the key point is that the dynamics are uncoupled. That the input matrix. Now modal response, previously every state derivative could have involved all the other states. Because you might have had a row of the state matrix which had every element non-zero in it. But now what you've got is only a single first order differential equation, involving the same mode. The other modes don't take any effect in that. And this is the solution to the mode. So it's the eigenvalue now that fixes the transient response. That gives you the growth or the decay of the modal evolution. And then the particular integral involved beta i. So that gives us the shape of response is the eigenvectors that determine that through their relationship with B. The output matrix is the product of C and W. And it's helpful in what follows to think of the columns of the CW matrix as separate vectors. And there are n of them. Because this will multiply up into a vector. So gamma 1 to gamma n, separate vectors, each vector coupling individual-- a single mode onto all the outputs. So this is what it would look like. I mean they're vectors, but think of them at least for now as scalars. Each gamma i, as I say, is coupling a particular mode onto all the outputs together. So that the output vector is the sum of all these products. So gamma 1 times q1, plus gamma 2 times q2 and so on. Now this diagram, I think, will tie it all together. Because this is graphically what we've done. We've changed the sort of nebulous representation in state space into a completely separate set of states, each of which is completely decoupled from all the others. And it's scalar now. Because qi depends only on qi dot, and vice versa. And the coupling between the i space and all the inputs is determined by the row, corresponding row, of the modal input matrix. And the coupling between the i state and all the outputs is determined by the i column of the modal output matrix. So, can you see now? You've got a very clear visualization of how all the inputs affect one mode, and how the mode effects all the outputs. It's very obvious in this representation how that happens. Now everything works fine, providing that you've got a full set of eigenvectors. And if you haven't, the only way that you can have had that is if you've got repeated eigenvalues. So before I go on and tell you how you use this information to describe the properties of a system, I want to just touch briefly on what goes wrong if you've got a degenerate system matrix. It can only happen with repeated eigenvalues. And even then, it may not happen. You may be lucky and say, well you've got repeated eigenvalues. But you've still got a full set of eigenvectors. Or you may be unlucky, and lose one or more of the eigenvectors. So the systems are degenerate. And when you lose eigenvectors, you have to, if you want to carry out a modal decomposition, you have to replace them by substituting the missing ones with eigenvectors that are called generalized eigenvectors. These will still be orthogonal to the true eigenvectors. But they won't themselves satisfy the eigenvector equation that I showed you before, which is A minus lambda i, times Wi. And we looked for a nontrivial solution to that. So they're generalized eigenvectors. You can find them through MATLAB. There is a lengthy process to find them, which I don't intend to cover in today's seminar. But once you've found those, you can use them in a modal transformation. But the spectral matrix, the one with the diagonal eigenvalues in it, won't be truly diagonal anymore. It'll have some elements in the super diagonal, which are 1. Which means that the mode won't be perfectly decoupled from all the others. There will be a little bit of coupling going on. And the form of the matrix which has that diagonal, but with some super diagonal equal to 1. They're called Jordan matrices. And the matrix, system matrix which results, or the spectral matrix, will have Jordan blocks in it. Now there are different possible permutations when you start to lose matrices. But fundamentally the number of eigenvectors that you get for a specific eigenvalue depends on how many solutions you get to the formula A minus i times Lambda i times Wi equals 0. That was how you found the eigenvectors, you remember. And you did that for every choice of lambda i. Now some lambda i's are the same, you might lose solutions. You might not have fully independent solutions to that. And the number that you get depends on the null space dimension of this matrix, A minus i times Lambda i. The null space dimension tells you how many eigenvectors you're going to get out for that specific Lambda i. So in this case, there's an integer that I'm calling hi, which tells you the number of available eigenvectors for a specific eigenvalue. And the number will be between 1, you'll always get 1, and Mi, which is the multiplicity of that particular eigenvalue. If you're lucky, you get a full set, in which case you've got what's called full degeneracy. And nothing need worry us. But if you've got less than that, well, if you've only got one, you need these generalized eigenvalues, and you end up with a full Jordan form representation. If you've got between 1 and the multiplicity, well you end up with Jordan blocks appearing. And the spectral matrix has certain blocks in it which have 1's on the super diagonals. But they're not all 1's. Some of them are zeros. Let me show you a quick example of this. This is an Jordan block, which might be associated with a specific eigenvalue that has some multiplicity. And the multiplicity is the number of elements on the diagonal. And you see that all the elements are 0, except these few. This is called a Jordan block or a Jordan matrix. Since this is the only matrix there is. And as an example of it, here is a fifth order system, which has three eigenvalues. So there are two missing eigenvalues. I've got two at minus 2, two at plus 3. So it's an unstable system, and 1 at minus 1. And so in this case, what appears is for the two eigenvalues at minus 2, there's a Jordan block of A. You see that? It's on the diagonal, such that the eigenvalues appear on the diagonal. But the generalized eigenvector that we need puts a 1 there. And then same thing for the 3, there's a Jordan block appearing here with 3s on the diagonal, and 1 in the super diagonal. And then the single real eigenvalue gives us an eigenvector associated with it. So you get a nice minus 1 in the bottom right-hand corner like that. I'm going to do a quick tutorial now, just to show you how you use the modal decomposition. And for once, it's not based on these buck converter anymore. Stay with me while I clear everything else out. In this case what we're doing in tutorial 6.1, is to decompose-- I have no idea what I did. I apologize for it I pressed something I shouldn't have done-- decompose this into its constituent mode. So clearly this is a third order system. I don't know how well behaved it's going to be. But it obviously has two inputs. Because the input matrix has two columns in it. So we've got three states, and we've got two inputs, and we have a single output because of the form of the output matrix C. It has one row. So there must be one output. And it has three columns, because we know there are three states. And the input matrix is 0-- so the transition matrix I'm sorry is 0. It's got two elements in it. Because there are two inputs. And it has one row, because there's one output. So let's decompose this into its constituent modes, and we'll see what happens. So to begin with then, all we do is construct the system using the same methods that I've shown you before in MATLAB. And before we do the modal decomposition, I'm going to plot its response. And we'll see how its response changes after modal decomposition. First of all, I'm going to construct a step response of this, and plot the three modes. Now the problem is that there are two inputs. So what the step response, problem is-- the reason is there's two step inputs to this. Because what MATLAB will do when you conduct a step response on a system with two inputs, is there's two sets of results. One which is a step applied to the first input, while the second is held 0. And the other set of results when the first is held 0, and the second has the step inputs applied to it. So there's going to be two sets of state graph here. That it will be reflected in the dimensions of the state vectors that come out of this, the state vector results. So here we go. Here are the two results. The upper graph is the evolution of the three internal states when we have a step applied to u1 and u2 is held at 0. And then the reverse for the bottom graph down here, these are the states evolution over time as u1 is held constant, and then u2 has the step applied to it. Now what we'll do is perform a modal decomposition. And this is how we do it. This CLC just clears whatever's in the workspace. That makes things a little bit tidy for us. And then I'm going to use the eig instruction again. Remember that's the one that we extracted the eigenvalues from. But when you use that instruction with these two parameters on the left, W and L, it will return for us the modal matrix W, and the spectral matrix Lambda. Well there isn't a caret from the keyboard for lambda. So I'm using up uppercase L. Those are the two matrices, both n by n, 3 by 3 in this case, which are returned. You give it the system matrix A, and no balance just means don't balance out the eigenvectors, I mean I just like to do it that way. That doesn't matter. Now you've got hold of W. You can use that in a similarity transformation to extract the modal input and modal output matrices. Remember, the modal input matrix was W to the minus 1 times B. So we'll invert W, and multiply it by B. And I'm interested in the-- well, I'm going to transpose it. Because of the interest in treating the rows as vectors. You'll see why in a second. And then the modal output matrix is C times W. And then what we'll do is just represent them as the modal matrix. So, let's do this. And what you'll see is the A, B, C, and D disappear, and what we end up with is L and an MiM 0 and D. I don't know why we didn't end up-- OK. All right. So all it's done is just given me A, B, C, and D again. But the point this is the spectral matrix. This is lambda consisting of the eigenvalues in a diagonal matrix. This is the modal input matrix. It's transposed. I wonder why it transposed. That's actually the right form. I'd have to think about why it was transposed. But that is the right form of input matrix. Because it has two columns. There are two inputs. And then there are three rows. Because there are three states in this. And then there's the output matrix, modal output matrix, and the transmission matrix is still 0. We're now going to do exactly the same things we did before we carried out the modal decomposition. We'll conduct a step response, and plot the states. And now here's the thing. For this particular choice of states, because we've got a fully diagonalized spectral matrix, we must have fully decoupled internal states now. Each state is only dependent on its own state. So we've got qi of T equals Lambda i times qi. So they're fully decoupled. It's a first order differential equation. There's nothing else in there. And you know from yesterday that the solution to first order differential equation is exponential. So when we compute the states and we work them out for a step input, we should find 1 minus a decaying exponential for every single state. And what we get is indeed that. So these are the states, and how they evolve now for a step input. Because they're all decoupled from one another. You might look at that and think, well, OK. He's telling us that. So what. Maybe the system's changed too. But the point is because it's only a state transformation the actual dynamics of the system don't change. In other words, as a whole, the system will behave exactly the same whether I represented the states using some arbitrary selection, or this particular selection. And I'm going to show you that. Now, what I'm going to do is first of all, plot the original system. The plot of y1, which was the output of the original system. And it looks like that. All right, nothing very interesting about that. That's how the system will behave. And now what I'm going to do down below here, is the same thing. I'm going to plot on top of this graph y2, y2 being the output of the modal decomposition. And all that will change, I hope, is the color of that plot. It should go from blue to green, because it's the same system. It's only the internal dynamics which are represented differently by different choice of states. That's what a modal decomposition is doing for us. [INAUDIBLE]? The main reason for using a modal decomposition is that the pathways from the input to the output are much clearer. And that property means that the properties of controllability and observability, the stability, and so on are much easier to visualize. Which we're going to see now. So it's a good point. Because it leads me into to what's coming next. [INAUDIBLE]? It's possible, yeah. [INAUDIBLE]? Well, it will help in the sense that it might focus your attention on the dominant modes. So it might help in that sense. Or if you wanted to simplify a system by reducing the order of it, it might help you in making that choice too. So there are reasons why it would help with control design. [INAUDIBLE]? Yeah, exactly. [INAUDIBLE]? Well, sort of. Yeah, you're right. But I want to get away from the idea of lead and lag compensators, and also from root locus. Because with-- in the system I described yesterday where we used output feedback, we were obliged to put the closed loop poles on specific lines in the complex plane called loci. And the only thing that we could change was the gain, to move the poles along those loci. One of the big advantages with state feedback control is that you can choose anywhere you like in the complex plane to put poles. You have a far greater degree of flexibility for where the closed loop poles go. The gate, the fact that you're using the state vector in the feedback rather than just the output is that benefit. So I think this helps also with that process of making the selection of the poles. Now, I'm going to use this a little bit more in a moment. But I want to go on and talk about stability in a moment. And there are two types of stability that I want to tell you about before we go on, and see how they're used. The first is what we might immediately think of as a stable system. This system possesses the property called asymptotic stability, which means that its state in the initial condition response of its state, as time becomes infinite, will converge on the equilibrium point. So this would be equivalent to a stable node or a stable focus in the phase portraits that I showed you earlier. Because this state might follow some sort of a path. This one is a stable focus, where eventually over time it settles in its steady state on the equilibrium point. It's call asymptotic stability. And there is a wordy definition for what it means in terms of how far you displace the initial condition, and the fact that it converges on the equilibrium point. So systems which have, if their continuous time eigenvalue is less than 0, or if their discrete time eigenvalue is a modulus less than 1, have the property of asymptotic stability. Now, while we're on this slide, can I just make something very-- something that looks obvious very clear to you, so it's doubly obvious. Because it matters later. In the steady state for an asymptotic stable system, if it's continuous time, you know that the steady state is defined by x dot of T equals 0. It means that the state isn't changing anymore. It's reached its equilibrium point. And that is the steady state. But notice, if it's a discrete time system, there's a difference. Because what it means in steady state is that the next state is no different from the current state. And so the state xk plus 1 is the same as xk. And so when you look at the steady state for a discrete time system, the important thing is that the right-hand side is not 0 anymore. This will come back when we look at designing for steady state in feedback control systems this afternoon. But I want to make you aware that that's an important difference. And it's practically the only one which accounts for the difference between continuous time and discrete time systems later on. So there's difference in the steady state definition. But anyway, I think you can perhaps [INAUDIBLE] enough, imagine what asymptotic stability is. Now there's another kind of stability, which was in the phase portrait diagrams where the equilibrium point was called a center. And in general that is known as Lyapunov stability. And what Lyapunov stability says is that if you displace the initial state from its equilibrium point, and let it go, providing you don't let it go too far from the state, it will either converge on the state, or it might not go to infinity. It might sort of remain in the vicinity of the equilibrium point without ever actually reaching it. And an example of that is a system which has complex conjugate eigenvalues, if it's continuous time, or eigenvalues on the unit circle, if it's discrete time. Because those oscillations are sustained. It's on the border between stable and unstable. It's called Lyapunov. Sometimes you see systems which have Lyapunov stability, referred to as stable ISL in the sense of Lyapunov. It's not something we need to worry about too much. But the terminology comes up from time to time, particularly with relevance to non-linear systems. But a system which does this, and in this case it's second order, so its phase portrait would fall into the category of center, it possesses Lyapunov stability. Now, both of these diagrams were drawn in terms of the state, the initial condition response of the state. What I'm going to talk about now is how the input is involved. Because the effect of the input allows us to differentiate between internal and external stability. First of all, internal stability is the property of coupling between the input and the states. It's sometimes called bounded input bounded state stability, or BIBS stability. And sometimes it's called internal stability. Because we're talking about an internal set of variables called the state. Providing that for a bounded input, the state remains bounded, you've got BIBS or internal stability. And if you address the question of stability from the input to the output, then clearly you're looking at external signals. And the property of external stability is defined when a bounded input only produces a bounded output. You have BIBO stability. Now because the output equation is an algebraic equation only involving the states, providing that you've got bounded input bounded state stability, you've automatically got bounded input bounded output stability. Because the dynamics are only there in the state equation, but not the reverse. It's not necessarily true that because a system is stable externally, it's also stable internally. To determine that, you need to determine how the states are coupled from internal to the output, from the state to the output. It might be that you have internal states which are oscillating like crazy, but that oscillation isn't coupled through to the output, because there are elements in the output matrix which are 0. So internal stability, definitely guarantees external stability, but not the reverse. OK. Now let's go and talk about controllability and observability. And the stability concept will also come into this. What I have here is a fourth order system after modal decomposition has been carried out. It's similar to the diagram that I showed before. Because each of these modes is completely uncoupled from all the others. And the coupling between the inputs and each mode is determined by the rows of the W minus 1 B matrix, and a coupling from each mode to all of the outputs by the columns of the CW matrix, these gamma elements. Now where the corresponding row of W minus 1 B, so that Bi transverse is nonzero and gamma i is nonzero, obviously that mode is coupled through. So you could say that because of the input is coupled to that mode, I can influence that mode by influencing the inputs. Therefore that mode is said to be controllable. And because that corresponding column of the CW matrix is nonzero, as this mode moves, it's somehow going to influence at least one of the outputs. So therefore the motion of that mode is observable at the output. Mode 1 is said to be controllable and observable. And you can see it on this diagram. Because you know that the corresponding vectors, beta 1 and gamma 1 are nonzero. Now imagine a situation where gamma 2 is zero. That means that this mode is not coupled through to the output. We have no way of determining simply by observing the output whether q2 is a stable or an unstable mode. And so therefore that mode is unobservable. But because beta 2 is nonzero, it is coupled to the input. So we could influence it. It's a controllable, but unobservable mode. When the reverse is true, you can see what's going to happen with mode 3, beta 3 is zero, but gamma 3 is nonzero. So this mode is uncontrollable, but at least it's observable. And finally there's mode here which is uncoupled to anything. It's an uncontrollable and an unobservable mode. So these properties are very clear, once you have a full modal decomposition. The significance of them is, well, first of all, as I said, you can't determine anything about the internal controllability or observability from a transfer function description. These are properties only of the state space description. And happily, most physical systems are both controllable and observable, which means when you construct a state space model from scratch, of a system of some kind, the actual system itself is going to be controllable and observable. But your model usually contains some simplifications or some assumptions, which means that the model may not have those properties. And therefore you may not be able to control the model of the system or observe your model of the system. If your choice of state does have these properties, then carrying out a state transformation does not change the properties. So it doesn't matter what state selection you use, the properties of controllability and observability are unique to the system, not to the selection of states. And you tend to have problems for a variety of reasons. Most often because you've forgotten that there are poles here or cancellations taking place in your transfer function description, or that the equivalent transfer function description does have cancelling poles and zeros. But you may run into it for other reasons, such as making a poor choice of states, or perhaps the number of states. Those things can also lead to a loss of controllability or observability. So first of all, controllability, summarizing what was two slides ago, the system on the left is controllable. Because just looking at the dynamics, the connected pathways from the input to the modes, both of the beta 1 and beta 2 column matrix vectors are nonzero. So q1 and q2 are both coupled to the input. So this is a controllable system. And the system on the right is uncontrollable as a general classification. But it's specifically mode 2, which is uncontrollable. Because mode 2 is not connected to the input. Beta 2 is a 0 vector. And that's important. Because this particular eigenvalue lies in the right half plane. It means that the system is unstable, and there isn't anything we can do about that. Because we've got no way of influencing the unstable mode. This kind of thing may not be so obvious if you just have a random choice of state variables, and a full state variable description. But it's obvious now that there is an unstable and uncontrollable mode present in the system. And that's going to lead to problems later. So if you have a modal decomposition, the classification between controllable and uncontrollable is very clear to you. You just look for nonzero beta i vectors. Now that's the easy way of seeing things. There is also an algebraic test which you can apply in the general case. And the algebraic test goes like this. You first have to construct a controllability matrix, which from now on, I'm going to call P. A controllability matrix looks like this. Now, this is called a partition matrix. I think it was in the matrix algebra notes from yesterday. A partition matrix contains elements which are themselves matrices. And this particular one is formed as follows. It's B, A times B, A squared B, all the way up to A to the n minus 1 times B. And let's think about the dimensions of this. B, you know, is an n by r matrix. It has n rows and r columns. A is a square matrix. So it's not going to change the number of rows that are present. So AB is going to be more so an n by r matrix. A squared B, similarly, n by r. So each of these partitions is n by r. So you have n columns in the whole thing. You have n rows and you have n times r columns in this whole matrix. And then what you do is you look at its rank. Now remember the rank of a matrix is the dimension of the largest nonzero determinant anywhere in it. So what's the biggest rank that you can have for this matrix? You can't get bigger than n. Because it has n rows in it. And it has n times r columns. So you've got one input. It's going to be an n by n matrix. That's the biggest rank. If you've got 10 inputs, it's going to be 10 times 10n. But it can't get bigger than n, because you need a square matrix to have a determinant. So the biggest rank you can have is n. Now if this particular matrix has rank n, the system is controllable. That how you do it. You can also do it for discrete time systems. And the only difference is a notational change, C for A, and gamma for B. Otherwise you construct the controllability matrix, and assess it in exactly the same way. There are some things you can say. If you've only got a rank of v, where v is less than n. Then you know that you've only got v controllable modes. And you've got n minus v uncontrollable modes. Because n minus v Beta i vectors are zero in there. And some people define a controllability index as it's the smallest number of partitions which must be added until you get full rank. Well, anyway that's the controllability index. Now observability is very similar, surprisingly similar, alarmingly similar. I've got a question. Yes? [INAUDIBLE]? Yeah. [INAUDIBLE]? Sure. [INAUDIBLE]? Yep. [INAUDIBLE]? You were going to say that it's not going to change. It's going to stay at zero forever. Is that what you mean? Yeah. Just that [INAUDIBLE]. How is it going to be excited? Yeah. The answer is mathematically this thing will stay at zero forever. In reality, it won't. There are noise and disturbances affecting systems in reality, which you just don't know. It's not going to stay at zero. But you've identified the fact that you can't influence it through the input. And therefore whatever happens to it, you can't change. And it is going to grow. Because there will be some disturbance which excites it. And then practically it will grow. But mathematically you're right. There is nothing to excite it. So theoretically it would stay at zero forever. But that's not reality. Yeah. That's the answer. Is that OK? Yes. OK. So continuing on to observability, nothing very surprising happens. We addressed the question of observability to the pathways between the modes and the output. And it's the columns of the CW matrix which give us that information. If they're all nonzero, then-- even if the modes are coupled through the output. Because gamma 1, for example, determines how q1 is coupled onto all of the outputs. And so on the left, we have an observable system. It's still an unstable system. Because Lambda 1 is greater than zero. And it's a continuous time system. You can see that. So therefore this mode is going to oscillate. But at least we can detect that oscillation at the output. That's the definition of observability. And on the right I have an unstable system. It has I think the same mode, so the same eigenvalues. But it's unobservable, because gamma 2 is 0. The second column of the CW matrix is 0, and therefore the second mode is not connected through to any of the outputs. And we have no way of detecting what the second mode is going to do. There's an algebraic test for this as well. It involves forming a partition matrix, which I'm going to call Q. From now on P and Q are going to be reserved for these two matrices. Because we're going to need them a lot. And now the partitions are formed from C transpose, A transpose, C transpose, A transpose squared, C transpose and so on. And you look for a rank of n in this matrix. And if you have it, then the system is observable. If you don't have it, the system is unobservable. There is a parallel one for discrete time systems with A replaced by C. Now there are two additional properties, which are relevant. And the first of them is called stabilizability. Stabilizability is the same as controllability, but the question is addressed only to the unstable mode. So let me give you an example. Here is a system which has, it's an uncontrollable system. Because we know that the first mode is uncoupled to the input. Because beta 1 is 0. And therefore, this mode can do whatever it likes. There's no way that we can influence this mode. But it is a stable mode, at least it's stable. This second mode, however, is unstable. But it has a nonzero beta 2 vector. Therefore it is coupled through the input, and therefore we can influence it. We could stabilize that by manipulation of the input. So this system is uncontrollable, seen as a whole. But at least it's stabilizable. You can stabilize it. There is another term which is the same as this. But it's applied to the output. It's called detectability. It observability, but addressed only to the unstable modes. Here, it's the same system actually, but here you've got gamma 1 nonzero, so the first mode is coupled through to the output. But the second mode is not. Now here the first mode is unstable. So therefore it's a detectable system, based on the first mode. And the second mode is stable. Although it's not observable, because it's stable the systems is said to be detectable. Meaning that if there's any internal oscillation involved, anything that's unstable inside the system, at least you can detect that. So I've defined controllability and observability in two ways. And I've defined stabilizability and detectability, which are controllability and observability but addressed only to the unstable modes. Let's do a very quick tutorial. Because this is quite fun really. We're going to investigate the structural properties of this fourth order system. And I have no idea what they are. Because I can't remember how this tutorial turns out. So let's look at tutorial 6.2. So first of all, we'll create the system. There's nothing very surprising there, just using SS, and A, B, C, D. And first of all, we'll conduct a stability analysis. Now there's a handy script in MATLAB. You don't have to worry about things like eigenvectors and eigenvalues and working whether the left-half plan, or right-half plane. You just type is stable. Is stable, it takes all the fun out of it really, doesn't it? So what you do, you type is stable, or is it stable or unstable. Yeah. apparently this is an unstable system. We don't know why yet. But it's an unstable system. Now, the next thing we're going to do is check controllability. First thing I'm doing here is I'm looking at the size of the A matrix. This will tell you the dimension of-- now if you type 1 here, it'll tell you the number of rows. And if you type 2, it will tell you the number of columns. Because they're the dimensions, 1, 2. But I know that A is a square matrix. So it doesn't really matter. This will tell me what the dimension of the system is. And of course in this case it's 4. And then here is the important line, because this is constructing the controllability matrix. CTRB constructs the controllability matrix from the two matrices that you need give it, which is the system matrix A, and the input matrix C. Therefore, we've created P. And now I just need to see whether the rank of P is the same as the dimension of A, which is the rank of the system, and the size of the system. And if it is, then the system is controllable. And if it's not, it's uncontrollable. And happily this is a controllable system. So there's an unstable mode in there somewhere. But at least it's controllable. So therefore you can say that this system is stabilizable, even though it's unstable. Now we'll do a similar thing for observability. I'm going to construct the observability matrix Q, using of OVSV, give it the A and C matrices, and again check for the rank. And hopefully the rank will be equal to 4. And unfortunately it's not. There is a rank of less than 4. And therefore the system is unobservable. And in an attempt to try and unravel some of the mystery behind this system, we'll conduct a modal decomposition and find out why. So we're going to do eig of A. That'll give us the modal and spectral matrices, and then compute the modal input and output matrices. And that's what's going on in the next script. So there we are. And now, before we go any further with this, some of the properties are now becoming clear. Because all we've done is modal decomposition. We've got obviously a complete set of eigenvalues, and a complete set of eigenvectors. Because all the eigenvalues are different, and therefore we know we've got a full set of eigenvectors. But if you look at them, left-half plane, left-half plane, so you've got a plus 1. So that's the reason the system's unstable. There's a positive eigenvalue in there. Number 3 is positive. Well, we knew that it was a controllable system, so we shouldn't be too surprised to find that all the rows of the input matrix are nonzero. But we also knew it was unobservable, meaning that some of the modes are not coupled through the output. And lo and behold, the first two columns of the output matrix are 0. So gamma 1 and gamma 2 are both 0. But gamma 3 and gamma 4 are not 0. So we've got unstable. We've got controllable. We've got unobservable. Now the other two properties I told you about were stabilizability and detectability. So let's deal with stabilizability first. Is this is a stabilizable system? Yes. Michelle says yes. Everybody agree it's stabilizable? It is stabilizable because all of the modes are coupled to the input. So it doesn't matter that one of the modes is unstable. It's coupled through. So therefore it must be stabilizable. Is this a detectable system? Why not? Right. So, think about it. Detectability is observability, but addressed only to the unstable modes. So we're not interested in the stable modes, just the unstable one. Well, it's the third mode here which is unstable. So we will address detectability, observability to that one. And we need the third column of the CW matrix nonzero. Well, it is. So by observing the output, we've at least got the information that thing is going to be unstable. So this is a stabilizable and a detectable system. But it's not stable. And it's not observable, taken as a whole. So there are the properties of that system. Good. We're almost there I hope. We've got two forms. I'm not going to labor this one. Because I've already done it. And it's nearly lunchtime. This is the phase variable canonical form. And anything that's different between this and the previous slide I showed with phase variable canonical form on it is the title. It's called controllable canonical form. You can arrive at this through the process I showed you in the first section. You get a very recognizable structure of the matrices. You get this one for the system matrix where all the denominator coefficients appear in the bottom row. And the rest of the matrix is 0, except for the super diagonal, which is 1's. This is because of the choice of states, the state choice being phases. The B matrix, input matrix, is 0, except the last one. And the C matrix, the output matrix, contains the coefficients of the numerator. When you see that, you know you're dealing with a controllable canonical form. And it's called that because this form is automatically controllable. And we're going to use this form this afternoon when we do designs of state-space systems. Now there's a parallel form to this, called the observable canonical form. I'm going to show you very quickly, and tell you that it's related very closely to the controllable canonical form. This matrix, the observable canonical form, I'll now call OCF. Right. So you've got CCF and OCF, if you see those abbreviations. The OCF system matrix is related to the CCF system matrix by a transpose. That's all the difference is. And now if you look at the input matrix for the observable canonical form, and you compare it with the output matrix of the controllable canonical form, those two are related by a transpose as well. So in some sense the controllable output matrix is the transpose of the observable input matrix, and vice versa. And similarly if you look at the output matrix of the observable canonical form, it's the same as the input matrix of the controllable canonical form, just transposed. So if you've got one description, you've automatically got the other, providing you now have to do a transpose, OCF and CCF. Now, these things are powerful when we come to do state space design later. CCF transformations make the design of state feedback control as very easy. And OCF forms give the observer designer a hint of simplicity as well. Now they're called companion forms. And they're related by these transposes, just what I've explained to you in previous slide. But this relationship is an extremely powerful one, much more powerful than you might imagine at first. The name for this relationship is called duality, meaning that the two systems described by these matrices are duals of one another. And therefore, you can test for controllability of one by testing for observability of the other, and vice versa. Because if you looked at the P and Q matrices, they were related in exactly the same way. Remember, the P matrix was B partition B, A times B, A squared times B. When you constructed the observability matrix, it was C transpose in place of B, and A transpose in place of A. Otherwise they're exactly the same. So when you check for controllability of one, you're really checking your observability of the other one. And this kind of parallelism helps us later when we come to do design. Because it turns out that the techniques used to design state feedback controllers are exactly the same ones that you use for observer design. It's a really powerful thing. Because you only have to learn one set of processes, and you can do both jobs. Now I'm going to conclude this section with a very short tutorial, where I'm going to show you what can go wrong. There is a term called minimal realization, which means that you found the state vector with the smallest possible dimension. And what can go wrong is that your model has states in there, which are not doing anything. There are too many states. You might have a third order system. But you inadvertently have given it four states. And when you do that sort of thing, things can go wrong. And what usually goes wrong is you lose one of the properties I've just been talking about. You lose, for example, the controllability property, which means that you can't control the system. So you must start by making sure that you've got controllability. And if haven't, look. Are you dealing with minimal realization or not? To illustrate this, I'm going to do it in the form of a tutorial, tutorial 6.3. Which says, investigate the controllability and observability properties of this seemingly harmless third order system with one input. Because the B matrix is a column matrix, and one output, because the C matrix is a row matrix. So let's look at this in MATLAB, and see what happens. So nothing very surprising to start with, we will commence by constructing the system. Nothing has appeared in the command window. But these are matrices over here in the workspace. So we've constructed the system. And now we're going to determine firstly controllability, using exactly the same technique as before. Construct the controllability matrix, and determine whether its rank is equal to the size of the system matrix. If it is, then the system is controllable. And if it's not-- well, it's uncontrollable. But happily this one is. Because the system matrix is 3 by 3. This is the P matrix. We're looking for the largest nonzero determinant in that. And it happens that this does actually have a nonzero determinant. So therefore the rank of this matrix is 3, 3 equals 3. And therefore, this is a controllable system. Now let's go on and do the same thing for observability. We know already that n is 3. We don't have to recompute it. Observability, this is the observability matrix. Unfortunately, the largest nonzero determinant is a 2 by 2 matrix. And here it has a rank of 2. 2 being smaller than 3, this is an unobservable system. Now in an attempt to find out why, what I'm going to do next is to look at the state of the transfer function representation of the system. So I'm converting the SS to TS using the script to convert to a transfer function description, and then TS constructs G, the transfer function from it. So let's look at that. Simply this, OK, nothing obvious so far. It's a third order system with two zeros in it. And now what we'll do next is we will use this ZTK script. Remember, this is the one that presents the pole and zero information as arrays. So this will tell us in factored form what the numerator and denominator are. And that will explicitly reveal the poles and zeros. And at this point, you can see there's a problem. Because there is a cancelling pole in here. One pole at S equals minus 1, and one zero also at S equals minus 1. This is said to be a non-minimal realization. Now I'm looking here at a rather simple system. Systems get an awful lot more complicated than this, with many, many orders. And it's kind of hard to find these things. And sometimes you don't want to go to a transfer function representation to look for them. But happily MATLAB provides us with a script called minreal. See, it's amazing how much MATLAB takes-- how much work MATLAB takes out of it. Minreal, you give it the transfer function. In this case G1 is the ZTK form, and it will return another transfer function, which is minimal realization. In this case, it'll just remove that cancelling pole for us. Now we have a transfer function which is second order. And I can go ahead and reconstruct the state space form of this. Now the way that I'm doing it, and you'll have to do it this way too, is to get back to these arrays of coefficients from the transfer function description. And that's done with this TS data. It returns the arrays of the numerator and denominator, the coefficients into arrays. And then you use TF to FS to go back the other way. Transfer function to state space, it takes those two arrays and returns to the four matrices that we need in the state space description. So there we go. There is now a second order system expressed in state space form, which is a minimal realization. And the last cell here simply confirms that we are now dealing with a controllable and observable system. It's the same tests we applied before, constructing the controllability and observability matrices, and checking that they're ranks are 2, in this case. Because the order of the system is reduced by 1. So here we go. The 2 is the order of the system. We've got a 2 by 2 matrix, with rank 2. That's the controllability matrix. So we're still good. And now the observability matrix is 2 by 2, an it has a rank . So now we've got observability as well. So you can run into problems. Those problems tend to be the loss of controllability or observability. And therefore we're kind of almost there with this session. And then we're going to stop for lunch more or less on time. Now, the system that I'm going to be using pretty consistently this afternoon for the tutorials, is a mechanical system. And it's based on a double mass system like this one, where there are two masses, M1 and M2, which are sitting and free to slide on a surface of some kind. So you can imagine these two masses as blocks of metal or something that sit on the table. And we can influence their position by pushing from the right on mass M1. And when we do that, obviously M1 is going to move. And its position is called y1. And as it moves, it will exert a force on M2, because it's coupled to it, through this spring damper assembly. Now these spring and damper values have been chosen, such that this coupling is a very lightly damp coupling. Meaning that when you give this a little nudge on M1, M2 is going to go boing-oing-oing like this, it's going to go on like that for a long, long time. Because there's very light damping in there. So now, if I constructed a model of this, just like that, that's probably going to slide along forever. Because there's nothing to stop it. So what I've done is I've added in a couple of frictional terms in here, so that in reality, of course, you know there's going to be friction. And this kind of oscillation is going to die down for two reasons. One, because it is a little bit damp, and the other because there's sliding friction here that's going to bring these two masses eventually to a graceful halt if we just give it a kick. Now the variable of interest is y2, I think. I think what I'm doing here is I am controlling with a force, the force applied to M1, and hoping that y2 goes where I want it to go. And of course, in an uncontrolled no-feedback situation, kind of operating with dead reckoning really. But you will see later on this afternoon that with the application of control to this, it's amazing how accurate you can get with the positioning of M2, even though there's an indirect coupling between them, a lightly damp coupling between them. Now the reason I've chosen this is that you can visualize what's going on here. There's a nice state space description for it. I had this as an appendix in the new version of the book. And it's also downloadable from the website as an appendix on that one. So if you go to the website and you look for the second edition of the book, if you don't want to buy the book, you can actually read the appendix here, Appendix E, which actually has all this written up for you. So this is the appendix in PDF form, and you're welcome to download that. Without going into details, these are the equations of motion. And this is how the state equations look. It's fourth order. So you've got a 4 by 4 system matrix. And-- what the devil is going on? Oh yes. [INAUDIBLE]? Sorry? You gave it in the appendix. There's a little bit more information in there. Can I talk to you afterwards about that? Because I haven't gone through a complete derivation in the appendix. That would help. Yeah it would. Yeah. I probably should do that. I haven't gone through a complete derivation in the appendix. But the equations here are almost right. The reason that they're not completely right is this. I may as well tell you about it. See, I've just applied Newton's second law to get these two terms. There's a frictional term involved in here as well. And because this is the equation concerning movement of the first mass, there is the input force u that's involved in there. And I've assigned the states to be the position of the first mass and its derivative. So that's the speed of the first mass, and the position of the second mass and its derivative. So when I form the equation for x2 dot, that mass times acceleration x2 dot equals all this lot. And the problem is that the mass term here appears on the left. And therefore, you take all these other terms over to the right, and divide through by M1, so that you've got x2 dot on the left-hand side, if you like, which is what done here. And the thing that's gone wrong is that I've forgotten to divide this term u by M1. So on this equation over here, this shouldn't be 1. This should be 1 over M1, right? So anyway, I did this six months ago. And I went through all the results of this. Because there's like seven or eight different sections in Appendix E. And all of the results were coming out beautifully right. And then I went back to the beginning after I published the darn thing, and looked at that. Damn me. I've forgotten M1. And you know why I got away with it? Because M1 is 1 kilogram. So for once in my life I got lucky. So M1 was 1 kilogram. Right. Now let's just quickly do this tutorial, and you'll see how this system behaves, or doesn't behave depending on your definition of behavior. OK. Here we go. So, we're doing nothing very, very elaborate. I've corrected it in the script. Here we're creating the model and using the SS function to create the state space model. There it is. And now what I'm going to do is perform a modal decomposition on this, just as I've done before. And we'll see what the modal form looks like. Now it is happily a system with a complete set of eigenvectors. Because I've got a fully diagonal modal matrix now. But you can already see that two of the eigenvalues are extremely complex, indeed. Because most of the small real components, but the imaginary component is very imaginary. And therefore you've got a lot of oscillation present in this. And the other thing you can see is that there's a very small number present in the third mode. That might imply that the system is unstable. But it's not, actually. That is down to numerical resolution of MATLAB. That is a 0 eigenvalue. We have a model input matrix which is got a complete set of terms in it. So therefore the system is controllable, which is nice. And you might imagine that from what kind of system it is. And the model output matrix similarly has a complete set of term in it. So therefore it's also an observable system as well. So far so good. We can verify this in just the same way as we did before. So let me run down and prove that it's controllable and it is observable. Now what I'm going to do is to conduct an initial condition response for this. And I'm going to extract from the x vector which results, because there are four states in there. I'm going to extract the first and the third states from that. Now I've added to it the initial separation between the two. So this y0 is a parameter further up, which says initially the two masses are separated by a distance. And I think I used about a meter or so. It's a pretty big system, this one. And so when I add that to that, and then subtract the first from the third mode, I'm subtracting y1 from y2, and adding in the initial offset. So this will tell me the separation of the masses over time. And when I run this, you'll see it's a very oscillatory system indeed. I mean this is second now. But you're going to see this come down when we start to control it. And It's very oscillatory. Because you're giving it a nudge, and it's going boing-oing-oing like that. This is the initial condition response. Let me just run back a second, and show you what initial condition I've used. This vector here where I've got the first position mass is a little bit to the right, a positive direction for that. And the second one is a little bit to the left. So I've compress the spring a little bit like that, and just let it go. And so this boing-oing thing has compressed it by 10 centimeters or something like that. It's stopped all that motion. And that's why. Now we're going to plot the individual mass positions. And this is the absolute mass positions that are involved. Because I'm taking the onset of y2 into account. y0 is added to y2. And you'll see how they behave as we apply this test. There they go. So this is mass M1. It's much heavier, and it's got a bigger frictional coefficient. And it's kind of damped down pretty quickly. And this is mass M2, which is being influenced by M1 to a far greater degree. It's oscillating. And what happens is both of these are kind of oscillating and moving slowly along this slide way. And they come to rest about half a meter further along the slide way than where they started. So I think you can visualize that by doing boing, like that, it's going to oscillate a little bit. And then it's eventually going to move and come to a rest. And that's exactly what it does. We could, if we were so inclined, construct a Bode plot of this. And to do that, we need the transfer function representation. So there it is. Now this proves that there's an integrated presence. So that very small eigenvalue was 0. And then I've got a complex conjugate pole pair, as you might imagine, and a real pole and a real 0. And all these things can be visualized in the Bode plot, which looks like this. So we've got an integrator, minus 90 degrees, and then there is a complex conjugate pole pair, which gives us this and that. And then there's a pole, real pole here, and a real 0 up here somewhere. So these are the properties of the system that we're going to examine in much more detail this afternoon. And the only thing that's left now is my favorite part, I guess, which is the quiz. What do similar matrices have in common? They're similar right? So they've got something in common. [INAUDIBLE]? Yeah, they do, actually. Yeah, they do have the same number of eigenvalues and the number of eigenvectors. That's not the answer I was looking for. But it's a great answer. The answer I was looking for is they represent the same transformation in two different coordinate frames. But you're absolutely right about that. And that was in the text. Two advantages of modal representation. I guess at this point-- Simple. You're right, simplification. The pathways from the input and the output to the output are much clearer to visualize. [INAUDIBLE]. Right, yeah. So because of the first property that we just said, the properties of controllability, observability, and so on, and detectability and stabilizability. All those things are much easier to visualize when constructing a controllability matrix, for example, and looking for a rank. So it's much easier to visualize those things. How about internal stability for a discrete time system? [INAUDIBLE]. You're at steady state. You're right. That's steady state. So internal stability, we call that another name. And Michelle knows, it was bounded input, bounded state. So as long as the input is bounded, is the state bounded? If so it has bounded input bounded state, or internal stability. What about this discrete time thing? What about that? What are we saying about the system if it has internal stability? To me, internal stability has been a red herring really. What about the eigenvalues? Stable? The eigenvalues must be what? [INAUDIBLE]. Right. It's going to be less than 1, or if it's have Lyapunov stable, it has to be equal to 1 or less that 1. That's right. When is the system-- and I just told you this. When is a discrete time system stable ISL? Remember what that meant? In the sense of Lyapunov, it's stable when the eigenvalues have a magnitude less than or equal to 1. Because actually strictly Lyapunov stability includes asymptotic stability as well. How can we determine whether a given state space system is observable? There are two methods I gave you for this. The first method involved carrying out a modal decomposition. And what did we look for in modal decomposition? [INAUDIBLE]. Yeah. That's right. The model output matrix contained no 0 columns in it. Each of the columns in the modal output matrix, they were gamma 1, gamma 2, gamma 3. Each gamma coupled a mode towards the output. So as long as none of those gammas were 0, you know that all of the modes were coupled through. And therefore the system was observable. There was a test too. [INAUDIBLE]. Yeah. You construct the observability matrix Q. It was C transpose, A transpose, C transpose, and so on for those partitions. That should have a rank of n, full rank on that observability matrix. So there's two different ways of determining that. That's great. How are observable and controllable canonical forms related? There's a word I'm looking for. Duality. They're duals of one another. The system matrix is related through a transpose. So the observable system matrix, OCF matrix is the transpose of the CSF system matrix. And then you have the controllable B matrix is the transpose of the C matrix, with the observable case and vice versa. Yeah. Observability is the word I was looking for. And I'll give you that. What is a minimal realization? What characterizes it? It has to do with the dimensions of the state vector. It's just a system with the smallest dimension of state vector. That's what it is, the right dimension in other words. What is the difference between observability and detectability? [INAUDIBLE]. Yeah. So detectability-- yeah. I know why you mean. Detectability is observability addressed to only the unstable modes. It means you can detect instability just by observing what's happening at the output. Now we're going to break in a moment for lunch. But before we do, I want to thank you for your attention for the last three hours. Because this is the hard work. It kind of seems very abstract. A lot of it is mathematical. And it doesn't look as if we're doing anything real. But this afternoon, please come back. Because we're going to use this information to do control of systems like the double mass system, and exciting things like flight controllers. And we use this information in a very real way. All this stuff is important for what comes in this afternoon. So there is for those of us joining from outside TI, some bags at the back which we're going to have containing lunch. And we'll come back at 1 o'clock, please to restart with chapter 7.

References: v. 
 v. 
 v. 
 v. 
 v. 
 v.