Module 3: Classical Loopshaping Design

Module 3: Classical Loopshaping Design

This article is contained in Scilab Control Engineering Basics study module, which is used as course material for International Undergraduate Program in Electrical-Mechanical Manufacturing Engineering, Department of Mechanical Engineering, Kasetsart University.

Module Key Study Points

  • Understand the tradeoffs in feedback control design
  • Learn how to formulate design specs as bounds on frequency responses
  • Relationships between open-loop and closed-loop frequency responses
  • Perform basic frequency response shaping of loop transfer function

Recall from module 2, we define 3 important transfer functions
Loop :

(1)   \begin{equation*}  L(s) = C(s)P(s) \end{equation*}

Sensitivity :

(2)   \begin{equation*}  S(s) = \frac{1}{1+L(s)}   \end{equation*}

Complementary Sensitivity :

(3)   \begin{equation*}  T(s) = \frac{L(s)}{1+L(s)}   \end{equation*}

that become the key players, especially for an approach of feedback control design commonly known as “classical control,” since it originated from the ’40 during WWII. This study module focuses on such approach. In essence, we will perform frequency response shaping on the loop transfer function L(s) to yield the desired control specifications, often referred to as loopshaping*.

* We have to make a remark though, that this term is also used in some modern design scheme to shape the closed-loop frequency responses directly. In this module we focus on shaping the open-loop transfer function L(s).

Before getting into the design procedure, we need to formulate the stability and performance requirements from last module to a general SISO feedback diagram with exogenous signals injected at various points in the loop, as shown in Figure 1.



Figure 1 a general SISO feedback diagram

Performance Criteria

The following closed-loop responses can be easily derived

(4)   \begin{equation*} y(s) = S(s)d_o(s) + T(s)(r(s) - n(s)) - S(s)P(s)d_i(s)   \end{equation*}

(5)   \begin{equation*} e(s) = S(s)(r(s) - n(s) - d_o(s) - P(s)d_i(s))   \end{equation*}

(6)   \begin{equation*} u(s) = C(s)S(s)(r(s) - n(s) -d_o(s)) + T(s)d_i(s) \end{equation*}

Together with the plant, the transfer functions that play the roles in these expressions are the sensitivity S(s) and complementary sensitivity T(s). Note that these two closed-loop transfer functions are functions of the controller, so design criteria can be casted on them.

For example, good tracking performance requires that e(s) approaches zero. From (5), it implies that S(s) should be made small. Now, suppose that measurement noise n(s) is prevalent in this system. We do not want this unwanted signal to affect the plant output y(s). From (4), this noise rejection requirement implies that T(s) should be made small. So, we must design a controller to yield small S(s) and T(s). But this requirement violates the algebraic constraint

(7)   \begin{equation*}  S(s) + T(s) = 1  \end{equation*}

i.e., when S(s) approaches 0, T(s) goes to 1, and vice versa. This conflict suggests that some tradeoffs have to be made in the control design specifications.

Fortunately, in normal situation the exogenous signals entering the feedback loop in Figure 1 have different frequency spectrum that could ease off the problem considerably. We summarize them as follows:

  • r (command input): common command signal is smooth and varies gradually with time, so it naturally lies in low-frequency region.
  • d_i, d_o (disturbance): a typical disturbance signal entering at the input or output of the plant also has low-frequency spectrum, such as mechanical vibration, resonance, or in the robot joint case, the dynamic force exerting from adjacent links.
  • n (measurement noise): most sensors become noisy when frequency increases. So the measurement noise generally lies in high-frequency region.

This allows us to cast frequency-dependent specifications to S(s) and T(s). It is more convenient to represent them as magnitude of frequency responses |S(j\omega)| and |T(j\omega)|. So, in the above situation, we can make |S(j\omega)| small in low frequency region (for good tracking), and |T(j\omega)| small in high frequency region (noise rejection).

Stability Criteria

Note: in the discussion that follows, we assume a stable, minimum-phase plant, such as the DC motor robot joint used as our example. Some statements may not be valid for an unstable or non-minimum phase plant.

Stability requirement for classical control design can be explained clearly using relationship between the magnitude of sensitivity |S(j\omega)| and Nyquist plot of L(j\omega) as shown in Figure 2. It can be shown that the distance from L(j\omega) curve to the critical point -1 is inversely proportional to |S(j\omega)|. The shorter this distance, the poorer stability margin of the system. The circle in Figure 2 represents the magnitude |S(j\omega)|= 1. Hence, when |S(j\omega)| > 1, the curve of L(j\omega) is inside the circle. As a result, control design spec for stability can be made as a bound on the peak of sensitivity frequency response. Note that this peak occurs at some mid frequency region before |S(j\omega)| converges to 1 and |T(j\omega)| roll-off.



Figure 2 relationship between sensitivity frequency response and Nyquist plot

Design Criteria Imposed on Loop Transfer Function

In some postmodern control strategy such as H_\infty synthesis, the stability and performance bounds discussed above can be formulated into weighting functions on S and T directly. That strategy is also called loopshaping (on closed-loop transfer functions). For the classical control design scheme, however, the frequency response shaping is performed on the loop transfer function L(s). Hence, all the criteria must be converted to bounds on L.

To summarize the stability and performance criteria on the closed-loop transfer functions, we separate them to 3 frequency regions LOW, MID, and HIGH. From the above discussion, we have the following design specs

  • LOW: |S(j\omega)| \ll 1 for good tracking and disturbance attenuation
  • MID: since |S(j\omega)| \gg 1 indicates poor stability. An upper bound on |S(j\omega)| is needed. Note from the algebraic constraint that |S(j\omega)| \gg 1 implies |T(j\omega)| \gg 1 .
  • HIGH: |T(j\omega)| \ll 1 for measurement noise rejection performance.

Now, these closed-loop bounds can be converted to constraints on L(j\omega) by using these relationships

  • LOW: for small S(j\omega), we have S(j\omega) = \frac{1}{1 + L(j\omega)} \approx \frac{1}{L(j\omega)}. Hence |S(j\omega)| \ll 1 implies |L(j\omega)| \gg 1; i.e., the bound on L is created by inverting the bound on S.
  • MID: By means of Figure 2, the bound on S is translated to stability margins criteria on L. For a stable, non-minimum phase plant, Bode gain-phase relationship is normally used in shaping L(j\omega) in MID frequency to have sufficient phase margin. More on this later.
  • HIGH: for small T(j\omega), we have T(j\omega) = \frac{L(j\omega)}{1 + L(j\omega)} \approx L(j\omega) . Hence |T(j\omega)| \ll 1 implies |L(j\omega)| \ll 1; i.e., the bound on L is the same as the bound on T.

This can be summarized in Figure 3 and 4.



Figure 3 bounds on S and T



Figure 4 bounds on L

Bode Gain-Phase Relationship

The stability requirement on L(j\omega) in Figure 4 may need more explanation. Suppose there is no stability requirement in terms of phase margin, we could make the magnitude of L to have its slope as steep as we want to easily satisfy both the low and high frequency bounds. Such simplicity is not feasible due to a constraint at the crossover frequency known as the Bode gain-phase relationship, which states that

For a stable, minimum-phase system, the phase of any transfer function L(j\omega) has a unique relationship with its magnitude. On a log-log plot, if the slope of magnitude plot has a constant slope n over a decade of frequency, then

(8)   \begin{equation*}  \angle L(j\omega) \approx n \times 90^\circ \end{equation*}

This suggests a basic rule for stability of classical control design. For the closed loop system to have sufficient phase margin, within some frequency region around crossover, the slope of |L(j\omega)| must be approximately -1, or -20 dB/decade. This is depicted in Figure 4. may have higher slope in low and high frequency regions to satisfy the performance bounds, but at crossover it should try to maintain -20 dB/decade for some frequency band.

Now I hope the reader could grab the concept. No better way to understand classical control design than experimenting with a problem set.
Example: let us design a controller for our same old robot joint driven by DC motor developed since the first module

(9)   \begin{equation*}  P(s) = \frac{1}{10s^2 + 0.1s} \end{equation*}

with the following design specs

  1. steady state error is eliminated
  2. low frequency disturbance is attenuated at least 0.01 below 1 Hz
  3. high frequency measurement noise is attenuated 0.1 above 100 Hz
  4. closed-loop stable, with phase margin at least 40 degrees

From the above discussion, this can be translated to stability and performance bounds

  1. L(s) has an integrator. Note that P(s) already has one
  2. |S(j\omega)| \leq -40 dB \rightarrow |L(j\omega)| \geq 40 dB below 1 Hz
  3. |T(j\omega)| \leq 20 dB \rightarrow |L(j\omega)| \leq 20 dB above 100 Hz
  4. L(j\omega) has at least 40 degrees phase margin, or max|S(j\omega)|\leq 3.3 dB*

* Problem 1 asks you to derive this relationship

To aid this design problem, we write a specific script file lshape.sce. Download this file and open it with SciNote. The variables for design specs 2 – 4 are initialized at the top of file, which you could later change to modify the bounds to your own specs. Right now we stick with the given values.

Let’s see how this script works. From module 2, we design a lead-lag compensator

(10)   \begin{equation*}  C(s) = 20000\frac{(s+0.01)}{(s+100)}   \end{equation*}

that yields closed-loop stability and quite good tracking performance. This controller is the default when you first download the script. So we start our experiment with it. Run the script from Scilab command prompt

-->exec('lshape.sce',-1)

to observe the frequency responses versus bounds in Figure 5 and 6. Loopshaping procedure uses Figure 5 as a tool to design a controller, while Figure 6 is used to demonstrate the relationship between the frequency responses and bounds from open-loop and closed-loop systems.



Figure 5 plot of L(j\omega) versus bounds from lshape.sce



Figure 6 |S(j\omega)| and |T(j\omega)| versus bounds from lshape.sce

Notice from Figure 5 that, the lead-lag compensator (9) does not meet the low-frequency requirement. The curve of |L(j\omega)| must be above the 40 dB line shown in magenta for all frequency less than 1 Hz. The text in legend for LF bound also shows (violated!). As a result, the |S(j\omega)| curve in Figure 6 violates its LF bound, where it should be below the -40 dB level for all frequency less than 1 Hz.

So we need to design a new controller, obviously with more LF gain and higher bandwidth, to meet the specs. To demonstrate the Bode gain-phase relationship, let’s do something crazy by choosing a controller with only proportional gain of 60000. Figure 7 shows the resulting L(j\omega), with its magnitude curve above the LF bound and below the HF bound as desired. Checking the phase margin, however, we see that the system now has zero phase margin. The magnitude of S (and T) in Figure 8 also violates the stability bound. Can you explain what happens?

Go back to the Bode gain-phase relationship statement. This static gain controller results in the slope of |L(j\omega)| equals -40 dB/decade at crossover frequency. So its phase is -180 degree; i.e., no phase margin left. Simulate this system to verify that the step response should oscillate indefinitely.



Figure 7 plot of L(j\omega) versus bounds with static gain C = 60000



Figure 8 |S(j\omega)| and |T(j\omega)| versus bounds with static gain C=60000

So, to design a controller that meets all specs, the curve of |L(j\omega)| must be above the LF bound, pass the crossover at slope -20 dB/decade (and maintain this slope for as wide frequency range as possible to achieve enough phase margin), and roll off below the HF bound.

We recommend that the reader should first try shaping the loop by his/her own controller to understand the concept. If you don’t succeed or your patience run out, lshape.sce comes with a sample controller

(11)   \begin{equation*}  C(s) = (6 \times 10^5)\frac{s + 50}{s + 500} \end{equation*}

Uncomment the lines that create this controller, and run the script to see Figure 9 and 10. The responses versus all stability and performance bounds confirm that this controller meets all the specs. The system has phase margin equal 55 degrees. The bandwidth is about 25 Hz.



Figure 9 plot of L(j\omega) versus bounds from controller (10)



Figure 10 |S(j\omega)| and |T(j\omega)| versus bounds from controller (10)

Use the Xcos model lshapesim.zcos in Figure 11 to simulate time-domain responses. What we want to verify in particular is design specs no 2 and 3; i.e., disturbance and measurement noise attenuation. The disturbance and measurement noise signals are set to 10\sin 2\pi t and \sin 200\pi t, respectively.



Figure 11 lshapesim.zcos — Xcos model for time-domain response simulation

So with disturbance attenuation of 0.01 and noise attenuation of 0.1, both signals should make the output oscillates at magnitude 0.1. Figure 12 and 13 confirms that both the specs are met.



Figure 12 disturbance attenuation response of controller (12)



Figure 13 measurement noise attenuation response of controller (12)

Problems

1. Show that the relationship between phase margin \phi and the maximum peak of |S(j\omega)| is given by

    \begin{displaymath} \max_{\omega} |S(j\omega)| = \frac{\sin \left( \frac{\pi - \phi}{2}\right)}{\sin \phi}  \end{displaymath}

2. Use lshape.sce to design a controller to achieve disturbance attenuation performance of 0.001 (-60 dB). Other specs remain the same.

3. Design a controller to achieve disturbance attenuation of 0.01 (-40 dB) for frequency below 10 Hz. Other specs remain the same. Explain if you are unable to get a controller that meets these requirements.

Supplement