Frequency Domain Analysis¶
Mathematical connections: differential equations, Laplace transform.
This week we concentrate on systems of differential equations of the form
where \(u\) represents controllable inputs and \(w\) represents uncontrollable inputs (disturbances).
As we saw last week, such linear systems usually arise by the process of linearization, where the corresponding state, input, and disturbance vectors are written as perturbations from some 'simple' state, input, and disturbance values:
We will come back to the idea of linearization in later weeks, so for now there is no danger in assuming that \eqref{eq:dyneq} describes our model precisely.
Our goal is to study the dynamics in the form of an abstract first order linear differential equation
where the equation is homogeneous if \(e \equiv 0\).
Types of Control¶
We may study various types of controls:
Open-Loop Control¶
In an open-loop control \(u(t)\) is a predetermined function and so the system can be written as
where \(A(t) = F(t)\) and \(e(t) = G(t) u(t) + L(t) w(t)\). Even without disturbances the equation is nonhomogeneous.
Closed-Loop Feedback Control¶
Systems with closed-loop feedback control may assume the control can be written as:
and so our system can be written as:
where \(A(t) := F(t) - G(t) C(t)\) and \(e(t) := L(t) w(t)\). Note if there are no disturbances we get a homogeneous system.
Intuitively think about designing control actions for flying an airplane, it would probably produce a more 'stable' situation if your control somehow reacts to the state of the airplane, as opposed to predetermining all of the controls on the ground before taking off (even if you calculated that those controls should be optimal, small unpredictable disturbances sure to occur in the air could make those controls useless).
Dynamic Compensation¶
In addition one could add dynamic compensation to the control feedback law:
i.e. the control \(u\) depends not just on the current state, but on the contribution from all previous states. Here \(H_\xi\) is an identity matrix with some of the rows removed (if the corresponding element of the state should not have an effect).
Can we still put this into the framework of \eqref{eq:abssys}? Let's define \(\xi(t)\) to be the solution of
Then by the Fundamental Theorem of Calculus
and the dynamics can be described by
which redefining \(x\) to be the above vector can again be written in the form
Again without disturbances \(w\) the system is homogeneous.
Actuator Dynamics¶
Finally, the choice of control could involve solving a differential equations on its own. Such actuator dynamics can take the form
for a given \(F_C(t)\). Here we can again write the equation in the general form (RS 2.5-19)
Laplace Transform and Frequency Domain Methods¶
Hopefully at this point you are convinced that there are various way to design our controls and a pressing question is how these choices can be designed to drive the state of our model to the behavior we want. One complication of this analysis is the fact that the relations between the control and the state are through differential equations. As we will see in the remainder of this week, the Laplace Transform which you doubtless encountered in an elementary differential equations course is extremely helpful in this context. Below I describe the 'Frequency Domain Methods' that utilize this marvelous invention of Pierre-Simon Laplace.
We'll come back to the feedback controls soon enough, but for now let's return to \eqref{eq:dyneq} as is and assume in addition that the matrices \(F\) and \(G\) do not depend on \(t\) and there is no uncontrollable input. Recall that the Laplace Transform of the resulting equation
is given by
We also assume that we have an output vector
with the corresponding equation in the 'frequency domain':
If you have only seen Laplace Transforms applied to scalar equations you should convince yourself that the formulas above still make sense in the vector setting, after all you are simply taking the Laplace Transform of all equations in your system.
Transfer Functions¶
Assuming \(x(0) = 0\) and using a little linear algebra magic we can write the input-output relation in the frequency domain as
or
Similarly,
In the frequency domain the relation between the control and the state or the output is simply represented by a multiplication by an \(s\)-dependent matrix, an ugly matrix, \(H (sI - F)^{-1} G\) but still just a matrix. We will call it the transfer function.
Finally, we make one more assumption destroying large part of our generalization only to be recovered later in the semester. That is we assume that the control \(u(t)\) is a single scalar and so is the output \(y(t)\). In other words the ugly matrix \(H (sI - F)^{-1} G\) relating the corresponding Laplace Transforms is nothing other than a scalar. Don't relax too much though \(H\), \(I\), \(F\), and \(G\) are still matrices (or at best vectors), as I never said that the state \(x(t)\) is a scalar, that would make things really too simple and not as interesting. So \(x\) is still an n-dimensional vector and the dynamics equation is still a system, all we are saying is that it is controlled by one input and produces one output. You should check that it then makes sense that \(G\) is \(n \times 1\), \(F\) is \(n \times n\) and \(H\) to be \(1 \times n\).
Exercise: Applying to the Car Model¶
Try It in CCST
Use the Cloud Controls & Simulation Toolbox to define state-space systems and compute transfer functions. For example, for the car model linearized about constant thrust with steering as the single input:
ss [[0,1,0],[0,0,1],[0,0,0]] [[0],[0],[1]] [[0,1,0]] [[0]] -> car_lin
tf car_lin -> car_tf
poles car_lin -> car_poles
gdisplay car_poles
Simulate the step response to see the open-loop behavior:
The ss command takes \(F\), \(G\), \(H\), \(D\) matrices directly, matching the state-space form \(\dot{x} = Fx + Gu\), \(y = Hx + Du\) from this lecture.