First Order Examples: Root Locus and Linearization
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
In the Crane example, recall that the distance from the beacon for the velocity-controlled crane, in Figure 1, is described by the difference equation
The model for the Crane, the first of the equation pair above, and the crane controller, the second of the pair, are both linear difference equations (LDEs). Whenever possible, we prefer LDE models of systems we want to control, mostly because we have so many good analysis tools for LDEs. For example, the model and controller LDE's for the Crane can be merged into a single difference equation,
We can also write an LDE for the "error", e[n], defined as the difference between the actual and desired crane position,
The LDE for the Crane position error is easily derived by subtracting the crane model equation from the equation d_{des}[n] = d_{des}[n] , then merging the result with the controller eqation, and finally substituting in the definition of the error. That is, subtracting yields
In deriving the error equation, notice that we have used a small trick, adding and subtracting d_{des}[n-1], as in
Natural frequencies are innate to a system, so are invariant to changes in variables. For example, the nature frequency of the first-order LDE describing the feedback-controlled crane, \lambda, is the same regardless of whether the system is described as a difference equation in distance, d[n] , or a difference equation in error, e[n]. That is, for either difference equation,
The points in the plot below are the natural frequencies for different gains in the Crane system. Note that the plot shows the natural frequencies as points in the complex plane (x-axis for real, y-axis for imaginary), even though they are real for first-order systems. As we will see once we start examining second-order systems, natural frequencies are the roots of a system-specific polynomials, and are general are complex. Also, we refer to the plots like Figure 3 as a root-locus plots, because the curves in the plots are formed from the "locus" of roots of the polynomials generated by sweeping a system's feedback gain from zero to infinity. Finally, root-locus plots for discrete-time systems often explicitly denote the unit circle |\lambda| = 1, because a system with a natural frequency outside the unit circle is unstable.
The arrows in the red curve of Figure 3 show the path of the natural frequency with increasing gain. As the plot shows, with increasing gain, the natural frequency moves from close to one, towards zero, then towards negative one, and finally outside the unit circle. The step responses for the system, in Figure 4, show the same trend with increasing gain. As the gain rises, the transient becomes faster and faster as the natural frequency approaches zero, and when it passes zero and becomes negative, the step response becomes oscillatory. For even larger gains, the system becomes unstable.
Most fused-filament 3-D printers "print" by extruding melted plastic filament through a temperature-controlled nozzle, like the one on the 3-D printer "hot-end" shown below. Along with the nozzle, the "hot-end" includes a heater, a temperature sensor, and large metallic "heat sink". The heat sink conducts heat away from the filament path, and insures that the high nozzle temperature will not lead to melting of the plastic filament before reaching the nozzle. Keeping the nozzle at a fixed high temperature given the high rate of heat conduction is a challenging problem, particularly given the variability in ambient room temperature.
Suppose we wish to design a feedback control system for the hotend, one that keeps the nozzle at T_{n} by adjusting the voltage, V_{h} on the nozzle heater based on measurements from the nozzle temperature sensor. A diagram of the connections and the mathematical block diagram is shown in the figure below.
A simple model relating the voltage on the heater to the nozzle temperature can be derived by relating the net heat flowing into the nozzle to the rate at which the nozzle temperature changes. Assuming the nozzle heater is lossless, the heat it generates is equal to the applied electric power, which in turn is equal to the product of heater voltage and electric current. And since the electric current is equal to the heater voltage divided by its resistance, the applied power, and therefore the generated heat, depends quadratically on voltage. That is,
Heat flows into the nozzle from the the heater, but also flows out from the nozzle, conducted by the heat sink into the external environment. Conductive heat loss is typically proportional to the difference between nozzle and ambient (or external environment) temperature, as in
If we are sampling the nozzle temperature every \Delta T seconds, and if we assume that the change in temperature is equal to net heat flow (scaled by the heat capacity of the hot end) then a simple NONLINEAR difference equation for the sampled nozzle temperature is
If the heater voltage is held constant at V_{h_0}, then the steady-state nozzle temperature T_{n_0} = lim_{n\rightarrow \infty} T_n[n] can be determined by balancing the heat generation and loss. That is, given V_{h_0}, T_{n_0} can be found by solving the nonlinear flow-balance equation,
Suppose we are designing a control system that adjusts heater voltage to maintain a specified, or desired, nozzle temperature, T_{n_0}. Since we know a lot about analyzing first-order LDEs, perhaps we can gain insight into the control system's performance by first linearizing the system about T_{n_0} (and its associated V_{h_0}), and then analyzing the resulting LDE.
A short digression: In our thermal example, there is only one nonlinearity, the quadratic relation between voltage and heat generation. Linearizing in this case is therefore equivalent to replacing the quadratic voltage-heat relation with its first-order Taylor series expansion. But are we justified in dropping the second-order term in the Taylor series? That is, will our analysis of a linearized model accurately predict the behavior of the nonlinear system? In general, the answer is an unequivocal..maybe. But if the system is first order, and if the linearized system's natural frequency is strictly less than one in magnitude, and if the system is never perturbed too far from the linearization point, then yes. We will use linearization in this class quite often, but a comprehensive treatment of its limitations is both fascinating and well beyond our scope.
Back to deriving the linearized LDE. To start, we will use lower case letters to denote the perturbations from steady state. That is,
Assuming the pair T_{n_0}, V_{h_0} satisfy the heat flux balance equation above, then we can use first order Taylor expansions to write an LDE that relates the perturbed quantities, t[n] to v[n] as
Uhm, well, perhaps our statement "we can use first order Taylor expansions to write an LDE relating perturbed quantities..." was a little glib, and we should look at the steps involved. We can start by subtracting T_{n_0} = T_{n_0} from the nonlinear difference equation model (along with one of our favorite tricks, used above, where we strategically add -T_{n_0}+T_{n_0}),
Are the rest of the steps clear? If so, what are \alpha and \gamma as a function of \beta, C, V_{h_0} and T_{n_0}. In answering the questions below, give your expression as a legal python expression and use B for \beta, R for R, C for C, V0 for V_{h_0}, and T0 for T_{n_0}. Be careful about signs, and use appropriate parentheses, when dividing by products. So the reciprocal of product of V_{h_0} and T_{n_0} should be written as 1/(V0*T0).
In our temperature model, the terms involving temperature where all linear. Does that explain why T_{n_0} did not explicitly appear in the equations for \alpha and \gamma?