Written by: Sas Harrison – Systems Engineer
Anatomy of Linear Feedback – Closed Loops & Root Loci
This article will explain the nature of linear feedback. Models laid out intuitively in the DYMOLA GUI are connected systematically with the ideas of Laplace-domain block diagrams commonly used in controller development, while the concepts of proportional, integral & differential control are briefly summarised.
Ideas used to carry out stability analyses will hopefully become more easy to connect with the computer models, with the relationships between alternative system representations clarified.
In this article, DYMOLA computes outputs from a single example system, subjected to a step input. Advantage is taken of the flexibility of the DYMOLA environment.
For students & researchers, we hope the article will open up possibilities to use DYMOLA as the modular, acausal, smart explicit analysis software of choice for control design & stability analysis.
This article refers to some earlier articles in the “Stability analysis in DYMOLA” series.
Why Use Dymola for Stability Analysis?
As progress is made through the series, ways to use DYMOLA for stability analysis are explored.
Effectiveness in Modelling
- Easily redefine the known & unknown quantities in models without modification to the model.
- Linearisei the dynamical system in a fast & appropriate way.
- Construct root locus & other useful illustrations, without the user needing to have (complete) knowledge/understanding of the model – in sharp contrast to many other engineering tools.
Model Based Systems Engineering
The modular structure of Dymola lends itself to incrementally adding features & details. Testing to make sure the model still works as expected is also easy. These qualities serve Systems Engineering which requires documentation of how models are developed & results reached, in order to accurately and easily adjust those models as ideas develop, or are revised.
In short, when using model based systems engineering, it is critical to be resistant to error, and for models to be reusable and flexible.
The principles of RAMSii apply to models & processes for modelling, as well as the final product.
Ideas of Feedback
This series of articles will explore tools for linear analysis in DYMOLA. The meaning of a system’s “roots” was already explained in part I, but in practice, methods for stability analysis are more often concerned with systems that contain at least one feedback loop.
This is true to the degree that software for general mathematics has functions that only let you do analysis (like root locus analysis) on closed-loop systems.
It’s fair to say we don’t often need an elaborate diagram to see what the system would do when it has no feedback loop. That is mainly because there is much more limited scope for intervention (no controls). Nonetheless, the methods are entirely relevant for “open loop” systems too.
Closed loop systems feed output information back, through certain processes, to the input. In simple examples, the output may be delivered unchanged to the input, and subtracted from the reference value (a unity feedback system) while in practice, instruments and subsystems all have a transfer function of their own, influencing the signal as it “passes through”.
The mechanism for “subtracting” the feedback signal from the reference input, like a steering servo, or aileron, likewise has its own (potentially unhelpful) transfer function. The controller itself, is only an implementation of a logical law to decide what control to apply (what command to give the servo or aileron). However, the controller is only one of many components of H(s) shown below.
Usually, the reference input represents some phenomenon outside our control,
and the controller is a mechanism that uses (our) knowledge of the plant to
compensate for the effects of the outside influence on the state (position, speed,
temperature, etc) of the plant.
Figure 1: An example of feedback representing physics
As explained, in practice H(s) is really a product of transfer functions for:
- Instruments & sensors (which give us access to a reliable, continuous reading of what the output C(s) is.
- Controller logic (various circuitry, historically mechanical devices…)
- Signal transmission mechanism
- Controlling device (rudder, aileron, heating element, motor, hydraulic jack)
In the diagrams below, the version on the left shows the feedback path condensed as a single transfer function, but usually H(s) will be the outcome of several terms. Using Laplace domain functions makes the process of composing and interpreting it simpler (Boyce & DiPrima, 2001).
Figure 2: In practice the feedback transfer function is a product of many
Proportional, Integral & Derivative Feedback
You may have heard the term “PID” which refers to controllers that use the output itself, the derivative of the output, and the integral of the output to contribute to the feedback signal.
Each has a coefficient, called a “gain” which weights the influence of the terms.
The Laplace block diagrams help to manage the terms, especially as the integral & derivative transform to multiplication & division by s, the complex variable.
Figure 3: The above diagrams are equivalent (Ogata, 2002)
Anatomy of Feedback Control
The easiest way to show an example is to just build on the model we have been using. Here, the value of capacitor voltage is amplified processed (we will examine this later) and subtracted from the input voltage.
Figure 4: A closed loop system in reality includes unwanted transfer functions
Figure 5: The transfer functions of instrument & actuator are ignored (=1)
Figure 6: The simplified model leaves Hobs & Hact as unity (no effect)
Now compare the DYMOLA schematic with the block diagram containing specific functions representing the H(s) constituents. In this block diagram, Hobs(s) has been assumed to equal unity, and been left out, as has Hact(s). This matches the actual nature of the DYMOLA model shown, in which the instrument is modelled as measuring the voltage at the capacitor perfectly, and the “signal voltage” component, similarly, delivers the control signal perfectly too.
Figure 7: Dymola GUI & a block diagram separating control components as in the GUI (see also Figure 8) note that the differentiator,
and derivative gain KD (indicated, right) are shown for completeness but do not exist in the GUI diagram (left)
Figure 8: How the blocks correspond to the system
Example in DYMOLA
As before, we’re concentrating on the voltage across the capacitor as the output of interest. We start by illustrating the effects of feedback control, not using theory, but rather just by example results obtained by simulation. We then discuss qualitatively what the effects are, why, and what the accompanying root locus diagram will look like.
Figure 9: A causal plant with causally modelled feedback
Below, we look at the effect of proportional, and then integral control by experimenting with gain values. Note that DYMOLA easily allows us to try a range of possible values by scripting, but it also contains an arsenal of tools to analyse systems without close inspection & without advanced practical CAE skills. We’ll explore these in later articles.
Figure 10: Selected results using a range of gains
Before proceeding we orientate ourselves with the following observation:
- The steady state response obviously depends on the reference input (Ogata, 2002) as well as the transfer function of the plant. The above is the result of a unit step input.
- The feedback control pushes the system towards zero output. The controller contains no foreknowledge of where the system “wants” to settle to.
- Controller responds to a non-zero output (proportional) or a nonzero time-integral of the output (integral).
- Both transient and steady-state responses due to the reference input are suppressed by the controller – it cannot “distinguish” between them, but can be “tuned” to affect some kinds of response more, or faster.
In the above diagram, we can observe the following points. These follow from examining the theory, but we have used results only to point to the effects for now. DYMOLA can quickly & efficiently generate such results. Useful for when a system is harder to examine…
With greater proportional gain (alone):
- The system will not return to its original conditioniii (as a spring loaded by a weight – it will reach a new position, no matter how stiff).
- One suppresses the amplitude of response.
- Higher frequency vibrations can be generated (a stiffer spring holding your position).
If we allow integral gain:
- Integral gain responds to the history of the output. It lets you eliminate steady state error (even a small integral gain does this eventually).
- Integral gain arrests the average value so the signal begins oscillating around zero. The oscillations themselves are perpetuated!
- Eventually, integral gain will cause instability. The examples show instability run longer (see diagrams!) to show the progression of the growth of the signal.
Most importantly we note that:
- All real control systems are limited by the strength of control signal that can be generated.
- For this reason, the control signal trace is also included!
“Maxing out” the control actuator is called “saturation” in control engineering. Bear in mind that any control schematic that treats the system as “linear” as is done here, cannot account for the fact that there is only so much control that can be applied. For example, rocket thrusters to correct course have a maximum thrust, beyond which they will deliver no more regardless of what is demanded! This is “obvious” but it is possible to become engrossed in analysis, and pay too little attention to the physical facts. It is for this reason this control “demand” has been plotted. It’s worth keeping an eye on it!
Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion.
Boyce, W. E. & DiPrima, R. C., 2001. Elementary Differential Equations & Boundary Value Problems. 7th ed. Troy, NY: John Wiley & Sons Inc..
Hamann, R. J., 2006. Lecture Notes: Space Systems Engineering. 4th ed. Delft: TU Delft.
Ogata, K., 2002. Modern Control Engineering. 4th ed. Upper Saddle River: Prentice-Hall.
i Creating a linear approximation at an appropriate operating point, which can be used to design a control system meant to maintain that operating point (Requires verification that the excursions of the system are small enough not to invalidate the analysis).
ii Design for Reliability, Availability, Maintainability & Sustainability. A key Systems Engineering concept, the term RAMS summarises the need to achieve a low lifecycle cost & reduce risk due to uncertainty by facilitating (continuous) maintenance, inspection, testing and so forth by design. This applies to the development process, and here, to modelling in aid of that, as well as to the final product.
iii This is called steady-state error