From 2f5399af9719646102a0e6c9449610dcde6b0a51 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Thu, 3 Dec 2020 01:07:02 +0100 Subject: [PATCH] Re-worked section 5 --- index.html | 940 ++++++++++++++++++++++++++++------------------------- index.org | 284 +++++++++------- 2 files changed, 654 insertions(+), 570 deletions(-) diff --git a/index.html b/index.html index 0715736..9356b0e 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + A brief and practical introduction to \(\mathcal{H}_\infty\) Control @@ -30,56 +30,56 @@

Table of Contents

@@ -103,33 +103,33 @@ When possible, Matlab scripts used for the example/exercises are provided such t The general structure of this document is as follows:

-
-

1 Introduction to Model Based Control

+
+

1 Introduction to Model Based Control

- +

-
-

1.1 Model Based Control - Methodology

+
+

1.1 Model Based Control - Methodology

- +

-The typical methodology for Model Based Control techniques is schematically shown in Figure 1. +The typical methodology for Model Based Control techniques is schematically shown in Figure 1.

@@ -146,7 +146,7 @@ It consists of three steps: -

+

control-procedure.png

Figure 1: Typical Methodoly for Model Based Control

@@ -158,20 +158,20 @@ In this document, we will suppose a model of the plant is available (step 1 alre

-In Section 2, steps 2 and 3 will be described for a control techniques called classical (open-)loop shaping. +In Section 2, steps 2 and 3 will be described for a control techniques called classical (open-)loop shaping.

-Then, steps 2 and 3 for the \(\mathcal{H}_\infty\) Loop Shaping of closed-loop transfer functions will be discussed in Sections 4, 5 and 6. +Then, steps 2 and 3 for the \(\mathcal{H}_\infty\) Loop Shaping of closed-loop transfer functions will be discussed in Sections 4, 5 and 6.

-
-

1.2 From Classical Control to Robust Control

+
+

1.2 From Classical Control to Robust Control

- +

@@ -203,14 +203,14 @@ This robust control theory is the subject of this document.

-The three presented control methods are compared in Table 1. +The three presented control methods are compared in Table 1.

Note that in parallel, there have been numerous other developments, including non-linear control, adaptive control, machine-learning control just to name a few.

- +
@@ -358,11 +358,11 @@ Note that in parallel, there have been numerous other developments, including no -
-

1.3 Example System

+
+

1.3 Example System

- +

@@ -371,24 +371,24 @@ Most of them will be applied on a physical system presented in this section.

-This system is shown in Figure 2. +This system is shown in Figure 2. It could represent an active suspension stage supporting a payload. The inertial motion of the payload is measured using an inertial sensor and this is feedback to a force actuator. Such system could be used to actively isolate the payload (disturbance rejection problem) or to make it follow a trajectory (tracking problem).

-The notations used on Figure 2 are listed and described in Table 2. +The notations used on Figure 2 are listed and described in Table 2.

-
+

mech_sys_1dof_inertial_contr.png

Figure 2: Test System consisting of a payload with a mass \(m\) on top of an active system with a stiffness \(k\), damping \(c\) and an actuator. A feedback controller \(K(s)\) is added to position / isolate the payload.

-
Table 1: Table summurazing the main differences between classical, modern and robust control
+
@@ -474,7 +474,7 @@ The notations used on Figure 2 are listed and describe
Table 2: Example system variables
-
+

Derive the following open-loop transfer functions:

@@ -507,14 +507,14 @@ You can follow this generic procedure:

-Having obtained \(G(s)\) and \(G_d(s)\), we can transform the system shown in Figure 2 into a classical feedback architecture as shown in Figure 6. +Having obtained \(G(s)\) and \(G_d(s)\), we can transform the system shown in Figure 2 into a classical feedback architecture as shown in Figure 6.

-
+

classical_feedback_test_system.png

-

Figure 3: Block diagram corresponding to the example system of Figure 2

+

Figure 3: Block diagram corresponding to the example system of Figure 2

@@ -538,18 +538,18 @@ And now the system dynamics \(G(s)\) and \(G_d(s)\).

-The Bode plots of \(G(s)\) and \(G_d(s)\) are shown in Figures 4 and 5. +The Bode plots of \(G(s)\) and \(G_d(s)\) are shown in Figures 4 and 5.

-
+

bode_plot_example_afm.png

Figure 4: Bode plot of the plant \(G(s)\)

-
+

bode_plot_example_Gd.png

Figure 5: Magnitude of the disturbance transfer function \(G_d(s)\)

@@ -558,40 +558,40 @@ The Bode plots of \(G(s)\) and \(G_d(s)\) are shown in Figures -

2 Classical Open Loop Shaping

+
+

2 Classical Open Loop Shaping

- +

-After an introduction to classical Loop Shaping in Section 2.1, a practical example is given in Section 2.2. +After an introduction to classical Loop Shaping in Section 2.1, a practical example is given in Section 2.2. Such Loop Shaping is usually performed manually with tools coming from the classical control theory.

However, the \(\mathcal{H}_\infty\) synthesis can be used to automate the Loop Shaping process. -This is presented in Section 2.3 and applied on the same example in Section 2.4. +This is presented in Section 2.3 and applied on the same example in Section 2.4.

-
-

2.1 Introduction to Loop Shaping

+
+

2.1 Introduction to Loop Shaping

- +

-
+

Loop Shaping refers to a control design procedure that involves explicitly shaping the magnitude of the Loop Transfer Function \(L(s)\).

-
+

-The Loop Gain (or Loop transfer function) \(L(s)\) usually refers to as the product of the controller and the plant (see Figure 6): +The Loop Gain (or Loop transfer function) \(L(s)\) usually refers to as the product of the controller and the plant (see Figure 6):

\begin{equation} L(s) = G(s) \cdot K(s) \label{eq:loop_gain} @@ -602,7 +602,7 @@ Its name comes from the fact that this is actually the “gain around the lo

-
+

open_loop_shaping.png

Figure 6: Classical Feedback Architecture

@@ -626,12 +626,12 @@ It is widely used and generally successful as many characteristics of the closed

The shaping of the Loop Gain is done manually by combining several leads, lags, notches… This process is very much simplified by the fact that the loop gain \(L(s)\) depends linearly on \(K(s)\) \eqref{eq:loop_gain}. -A typical wanted Loop Shape is shown in Figure 7. +A typical wanted Loop Shape is shown in Figure 7. Another interesting Loop shape called “Bode Step” is described in [1].

-
+

open_loop_shaping_shape.png

Figure 7: Typical Wanted Shape for the Loop Gain \(L(s)\)

@@ -640,21 +640,21 @@ Another interesting Loop shape called “Bode Step” is described in The shaping of closed-loop transfer functions is obviously not as simple as they don’t depend linearly on \(K(s)\). But this is were the \(\mathcal{H}_\infty\) Synthesis will be useful! -More details on that in Sections 4 and 5. +More details on that in Sections 4 and 5.

-
-

2.2 Example of Manual Open Loop Shaping

+
+

2.2 Example of Manual Open Loop Shaping

- +

-
+

-Let’s take our example system described in Section 1.3 and design a controller using the Open-Loop shaping synthesis approach. +Let’s take our example system described in Section 1.3 and design a controller using the Open-Loop shaping synthesis approach. The specifications are:

    @@ -666,7 +666,7 @@ The specifications are:
-
+

Using SISOTOOL, design a controller that fulfills the specifications.

@@ -705,7 +705,7 @@ Let’s say we came up with the following controller.

-The bode plot of the Loop Gain is shown in Figure 8 and we can verify that we have the wanted stability margins using the margin command: +The bode plot of the Loop Gain is shown in Figure 8 and we can verify that we have the wanted stability margins using the margin command:

[Gm, Pm, ~, Wc] = margin(G*K)
@@ -745,7 +745,7 @@ The bode plot of the Loop Gain is shown in Figure 8 an
 
 
 
-
+

loop_gain_manual_afm.png

Figure 8: Bode Plot of the obtained Loop Gain \(L(s) = G(s) K(s)\)

@@ -753,11 +753,11 @@ The bode plot of the Loop Gain is shown in Figure 8 an
-
-

2.3 \(\mathcal{H}_\infty\) Loop Shaping Synthesis

+
+

2.3 \(\mathcal{H}_\infty\) Loop Shaping Synthesis

- +

@@ -780,7 +780,7 @@ where:

  • K is the synthesize controller
  • -
    +

    Matlab documentation of loopsyn (link).

    @@ -797,23 +797,23 @@ Even though we will not go into details and explain how such synthesis is workin
    -
    -

    2.4 Example of the \(\mathcal{H}_\infty\) Loop Shaping Synthesis

    +
    +

    2.4 Example of the \(\mathcal{H}_\infty\) Loop Shaping Synthesis

    - +

    To apply the \(\mathcal{H}_\infty\) Loop Shaping Synthesis, the wanted shape of the loop gain should be determined from the specifications. -This is summarized in Table 3. +This is summarized in Table 3.

    -Such shape corresponds to the typical wanted Loop gain Shape shown in Figure 7. +Such shape corresponds to the typical wanted Loop gain Shape shown in Figure 7.

    - +
    @@ -882,18 +882,18 @@ The \(\mathcal{H}_\infty\) open loop shaping synthesis is then performed using t

    -The obtained Loop Gain is shown in Figure 9 and matches the specified one by a factor \(\gamma \approx 2\). +The obtained Loop Gain is shown in Figure 9 and matches the specified one by a factor \(\gamma \approx 2\).

    -
    +

    open_loop_shaping_hinf_L.png

    Figure 9: Obtained Open Loop Gain \(L(s) = G(s) K(s)\) and comparison with the wanted Loop gain \(L_w\)

    -
    +

    When using the \(\mathcal{H}_\infty\) Synthesis, it is usually recommended to analyze the obtained controller.

    @@ -905,7 +905,7 @@ This is usually done by breaking down the controller into simple elements such a

    -Let’s briefly analyze the obtained controller which bode plot is shown in Figure 10: +Let’s briefly analyze the obtained controller which bode plot is shown in Figure 10:

    • two integrators are used at low frequency to have the wanted low frequency high gain
    • @@ -914,7 +914,7 @@ Let’s briefly analyze the obtained controller which bode plot is shown in
    -
    +

    open_loop_shaping_hinf_K.png

    Figure 10: Obtained controller \(K\) using the open-loop \(\mathcal{H}_\infty\) shaping

    @@ -922,10 +922,10 @@ Let’s briefly analyze the obtained controller which bode plot is shown in

    -Let’s finally compare the obtained stability margins of the \(\mathcal{H}_\infty\) controller and of the manually developed controller in Table 4. +Let’s finally compare the obtained stability margins of the \(\mathcal{H}_\infty\) controller and of the manually developed controller in Table 4.

    -
    Table 3: Wanted Loop Shape corresponding to each specification
    +
    @@ -966,38 +966,38 @@ Let’s finally compare the obtained stability margins of the \(\mathcal{H}_ -
    -

    3 A first Step into the \(\mathcal{H}_\infty\) world

    +
    +

    3 A first Step into the \(\mathcal{H}_\infty\) world

    - +

    In this section, the \(\mathcal{H}_\infty\) Synthesis method, which is based on the optimization of the \(\mathcal{H}_\infty\) norm of transfer functions, is introduced.

    -After the \(\mathcal{H}_\infty\) norm is defined in Section 3.1, the \(\mathcal{H}_\infty\) synthesis procedure is described in Section 3.2 . +After the \(\mathcal{H}_\infty\) norm is defined in Section 3.1, the \(\mathcal{H}_\infty\) synthesis procedure is described in Section 3.2 .

    -The generalized plant, a very useful tool to describe a control problem, is presented in Section 3.3. -The \(\mathcal{H}_\infty\) is then applied to this generalized plant in Section 3.4. +The generalized plant, a very useful tool to describe a control problem, is presented in Section 3.3. +The \(\mathcal{H}_\infty\) is then applied to this generalized plant in Section 3.4.

    -Finally, an example showing how to convert a typical feedback control architecture into a generalized plant is given in Section 3.5. +Finally, an example showing how to convert a typical feedback control architecture into a generalized plant is given in Section 3.5.

    -
    -

    3.1 The \(\mathcal{H}_\infty\) Norm

    +
    +

    3.1 The \(\mathcal{H}_\infty\) Norm

    - +

    -
    +

    The \(\mathcal{H}_\infty\) norm of a multi-input multi-output system \(G(s)\) is defined as the peak of the maximum singular value of its frequency response

    @@ -1014,7 +1014,7 @@ For a single-input single-output system \(G(s)\), it is simply the peak value of
    -
    +

    Let’s compute the \(\mathcal{H}_\infty\) norm of our test plant \(G(s)\) using the hinfnorm function:

    @@ -1029,11 +1029,11 @@ Let’s compute the \(\mathcal{H}_\infty\) norm of our test plant \(G(s)\) u

    -We can see in Figure 11 that indeed, the \(\mathcal{H}_\infty\) norm of \(G(s)\) does corresponds to the peak value of \(|G(j\omega)|\). +We can see in Figure 11 that indeed, the \(\mathcal{H}_\infty\) norm of \(G(s)\) does corresponds to the peak value of \(|G(j\omega)|\).

    -
    +

    hinfinity_norm_siso_bode.png

    Figure 11: Example of the \(\mathcal{H}_\infty\) norm of a SISO system

    @@ -1043,14 +1043,14 @@ We can see in Figure 11 that indeed, the \(\mathcal{H}
    -
    -

    3.2 \(\mathcal{H}_\infty\) Synthesis

    +
    +

    3.2 \(\mathcal{H}_\infty\) Synthesis

    - +

    -
    +

    The \(\mathcal{H}_\infty\) synthesis is a method that uses an algorithm (LMI optimization, Riccati equation) to find a controller that stabilizes the system and that minimizes the \(\mathcal{H}_\infty\) norms of defined transfer functions.

    @@ -1058,16 +1058,16 @@ The \(\mathcal{H}_\infty\) synthesis is a method that uses an algorithm (

    -Why optimizing the \(\mathcal{H}_\infty\) norm of transfer functions is a pertinent choice will become clear when we will translate the typical control specifications into the \(\mathcal{H}_\infty\) norm of transfer functions in Section 4. +Why optimizing the \(\mathcal{H}_\infty\) norm of transfer functions is a pertinent choice will become clear when we will translate the typical control specifications into the \(\mathcal{H}_\infty\) norm of transfer functions in Section 4.

    -
    +

    Then applying the \(\mathcal{H}_\infty\) synthesis to a plant, the engineer work usually consists of the following steps:

    1. Write the problem as standard \(\mathcal{H}_\infty\) problem using the generalized plant (described in the next section)
    2. -
    3. Translate the specifications as \(\mathcal{H}_\infty\) norms of transfer functions (Section 4)
    4. +
    5. Translate the specifications as \(\mathcal{H}_\infty\) norms of transfer functions (Section 4)
    6. Make the synthesis and analyze the obtained controller
    @@ -1090,11 +1090,11 @@ Note that there are many ways to use the \(\mathcal{H}_\infty\) Synthesis:
    -
    -

    3.3 The Generalized Plant

    +
    +

    3.3 The Generalized Plant

    - +

    @@ -1103,7 +1103,7 @@ This consist of deriving the Generalized Plant for the current problem.

    -The generalized plant, usually noted \(P(s)\), is shown in Figure 12. +The generalized plant, usually noted \(P(s)\), is shown in Figure 12. It has two sets of inputs \([w,\,u]\) and two sets of outputs \([z\,v]\) such that:

    \begin{equation} @@ -1111,22 +1111,22 @@ It has two sets of inputs \([w,\,u]\) and two sets of outputs \([z \end{equation}

    -The meaning of these inputs and outputs are summarized in Table 5. +The meaning of these inputs and outputs are summarized in Table 5.

    -A practical example about how to derive the generalized plant for a classical control problem is given in Section 3.5. +A practical example about how to derive the generalized plant for a classical control problem is given in Section 3.5.

    -
    +
    -
    +

    general_plant.png

    Figure 12: Inputs and Outputs of the generalized Plant

    -
    Table 4: Comparison of the characteristics obtained with the two methods
    +
    @@ -1172,18 +1172,18 @@ A practical example about how to derive the generalized plant for a classical co -
    -

    3.4 The \(\mathcal{H}_\infty\) Synthesis applied on the Generalized plant

    +
    +

    3.4 The \(\mathcal{H}_\infty\) Synthesis applied on the Generalized plant

    - +

    Once the generalized plant is obtained, the \(\mathcal{H}_\infty\) synthesis problem can be stated as follows:

    -
    +
    \(\mathcal{H}_\infty\) Synthesis applied on the generalized plant
    @@ -1196,11 +1196,11 @@ After \(K\) is found, the system is robustified by adjusting the response

    -The obtained controller \(K\) and the generalized plant are connected as shown in Figure 13. +The obtained controller \(K\) and the generalized plant are connected as shown in Figure 13.

    -
    +

    general_control_names.png

    Figure 13: General Control Configuration

    @@ -1226,29 +1226,29 @@ where:

    -Note that the general control configure of Figure 13, as its name implies, is quite general and can represent feedback control as well as feedforward control architectures. +Note that the general control configure of Figure 13, as its name implies, is quite general and can represent feedback control as well as feedforward control architectures.

    -
    -

    3.5 From a Classical Feedback Architecture to a Generalized Plant

    +
    +

    3.5 From a Classical Feedback Architecture to a Generalized Plant

    - +

    -The procedure to convert a typical control architecture as the one shown in Figure 14 to a generalized Plant is as follows: +The procedure to convert a typical control architecture as the one shown in Figure 14 to a generalized Plant is as follows:

    1. Define signals of the generalized plant: \(w\), \(z\), \(u\) and \(v\)
    2. -
    3. Remove \(K\) and rearrange the inputs and outputs to match the generalized configuration shown in Figure 12
    4. +
    5. Remove \(K\) and rearrange the inputs and outputs to match the generalized configuration shown in Figure 12
    -
    +

    -Consider the feedback control architecture shown in Figure 14. +Consider the feedback control architecture shown in Figure 14. Suppose we want to design \(K\) using the general \(\mathcal{H}_\infty\) synthesis, and suppose the signals to be minimized are the control input \(u\) and the tracking error \(\epsilon\).

      @@ -1257,7 +1257,7 @@ Suppose we want to design \(K\) using the general \(\mathcal{H}_\infty\) synthes
    -
    +

    classical_feedback_tracking.png

    Figure 14: Classical Feedback Control Architecture (Tracking)

    @@ -1276,17 +1276,17 @@ Usually, we want to minimize the tracking errors \(\epsilon\) and the control si

    -Then, Remove \(K\) and rearrange the inputs and outputs as in Figure 12. +Then, Remove \(K\) and rearrange the inputs and outputs as in Figure 12.

    Answer

    -The obtained generalized plant shown in Figure 15. +The obtained generalized plant shown in Figure 15.

    -
    +

    mixed_sensitivity_ref_tracking.png

    Figure 15: Generalized plant of the Classical Feedback Control Architecture (Tracking)

    @@ -1310,35 +1310,74 @@ P.OutputName = {'e', 'u
    -
    -

    4 Modern Interpretation of Control Specifications

    +
    +

    4 Modern Interpretation of Control Specifications

    - +

    - -

    -As shown in Section 2, the loop gain \(L(s) = G(s) K(s)\) is a useful and easy tool when manually designing controllers. +As shown in Section 2, the loop gain \(L(s) = G(s) K(s)\) is a useful and easy tool when manually designing controllers. This is mainly due to the fact that \(L(s)\) is very easy to shape as it depends linearly on \(K(s)\). Moreover, important quantities such as the stability margins and the control bandwidth can be estimated from the shape/phase of \(L(s)\).

    -However, the loop gain \(L(s)\) does not directly give the performances of the closed-loop system, which are determined by the closed-loop transfer functions. +However, the loop gain \(L(s)\) does not directly give the performances of the closed-loop system. +As a matter of fact, the behavior of the closed-loop system by the closed-loop transfer functions. +These are derived of a typical feedback architecture functions in Section 4.1. +

    + + +

    +The modern interpretation of control specifications then consists of determining the required shape of the closed-loop transfer functions such that the system behavior corresponds to the requirements. +Once this is done, the \(\mathcal{H}_\infty\) synthesis can be used to generate a controller that will shape the closed-loop transfer function as specified.. +This method is presented in Section 5. +

    + + +

    +One of the most important closed-loop transfer function is called the sensitivity function. +Its link with the closed-loop behavior of the feedback system is studied in Section 4.2.

    -If we consider the feedback system shown in Figure 16, we can link to the following specifications to closed-loop transfer functions. -This is summarized in Table 6. +The robustness (stability margins) of the system can also be linked to the shape of the sensitivity function with the use of the module margin (Section 4.3).

    -
    Table 5: Notations for the general configuration
    +

    +Links between typical control specifications and shapes of the closed-loop transfer functions are summarized in Section 4.4. +

    + + +
    +

    4.1 Closed Loop Transfer Functions and the Gang of Four

    +
    +

    + +

    + +

    +Consider the typical feedback system shown in Figure 16. +

    + +

    +The behavior (performances) of this feedback system is determined by the closed-loop transfer functions from the inputs (\(r\), \(d\) and \(n\)) to the important signals such as \(\epsilon\), \(u\) and \(y\). +

    + +

    +Depending on the specification, different closed-loop transfer functions do matter. +These are summarized in Table 6. +

    + + +
    +

    gang_of_four_feedback.png +

    +

    Figure 16: Simple Feedback Architecture with \(r\) the reference signal, \(\epsilon\) the tracking error, \(d\) a disturbance acting at the plant input \(u\), \(y\) is the output signal and \(n\) the measurement noise

    +
    + +
    @@ -1375,38 +1414,19 @@ This is summarized in Table 6. - + - +
    Table 6: Typical Specification and associated closed-loop transfer function
    StabilityAll closed-loop transfer functionAll
    Robustness (stability margins)Module margin (see Section 4.3)Module margin (see Section 4.3)
    - -
    -

    gang_of_four_feedback.png -

    -

    Figure 16: Simple Feedback Architecture

    -
    -
    - -
    -

    4.1 Closed Loop Transfer Functions

    -
    +

    - -

    - -

    -As the performances of a controlled system depend on the closed loop transfer functions, it is very important to derive these closed-loop transfer functions as a function of the plant \(G(s)\) and controller \(K(s)\). -

    - -
    -

    -Write the output signals \([\epsilon, u, y]\) as a function of the systems \(K(s), G(s)\) and of the input signals \([r, d, n]\) as shown in Figure 16. +For the feedback system in Figure 16, write the output signals \([\epsilon, u, y]\) as a function of the systems \(K(s), G(s)\) and the input signals \([r, d, n]\).

    Hint @@ -1443,9 +1463,9 @@ The following equations should be obtained:
    -
    +

    -We can see that they are 4 different transfer functions describing the behavior of the system in Figure 16. +We can see that they are 4 different closed-loop transfer functions describing the behavior of the feedback system in Figure 16. These called the Gang of Four:

    \begin{align} @@ -1457,7 +1477,7 @@ These called the Gang of Four:
    -
    +

    If a feedforward controller is included, a Gang of Six transfer functions can be defined. More on that in this short video. @@ -1466,7 +1486,7 @@ More on that in this short

    -And we have: +The behavior of the feedback system in Figure 16 is fully described by the following set of equations:

    \begin{align} \epsilon &= S r - GS d - GS n \\ @@ -1481,11 +1501,11 @@ Similarly, to reduce the effect of measurement noise \(n\) on the output \(y\),
    -
    -

    4.2 Sensitivity Function

    +
    +

    4.2 The Sensitivity Function

    - +

    @@ -1496,14 +1516,14 @@ In this section, we will see how the shape of the sensitivity function will impa

    Suppose we have developed a “reference” controller \(K_r(s)\) and made three small changes to obtained three controllers \(K_1(s)\), \(K_2(s)\) and \(K_3(s)\). -The obtained sensitivity functions are shown in Figure 17 and the corresponding step responses are shown in Figure 18. +The obtained sensitivity functions for these four controllers are shown in Figure 17 and the corresponding step responses are shown in Figure 18.

    -The comparison of the sensitivity functions shapes and their effect on the step response is summarized in Table 7. +The comparison of the sensitivity functions shapes and their effect on the step response is summarized in Table 7.

    - +
    @@ -1542,20 +1562,20 @@ The comparison of the sensitivity functions shapes and their effect on the step
    Table 7: Comparison of the sensitivity function shape and the corresponding step response for the three controller variations
    -
    +

    sensitivity_shape_effect.png

    Figure 17: Sensitivity function magnitude \(|S(j\omega)|\) corresponding to the reference controller \(K_r(s)\) and the three modified controllers \(K_i(s)\)

    -
    +

    sensitivity_shape_effect_step.png

    Figure 18: Step response (response from \(r\) to \(y\)) for the different controllers

    -
    +
    Closed-Loop Bandwidth

    The closed-loop bandwidth \(\omega_b\) is the frequency where \(|S(j\omega)|\) first crosses \(1/\sqrt{2} = -3dB\) from below. @@ -1568,24 +1588,20 @@ In general, a large bandwidth corresponds to a faster rise time.

    -
    +

    -From the simple analysis above, we can draw a first estimation of the wanted shape for the sensitivity function in Figure 19. -

    - -

    -The wanted characteristics on the magnitude of the sensitivity function are then: +From the simple analysis above, we can draw a first estimation of the wanted shape for the sensitivity function (Figure 19):

    • A small magnitude at low frequency to make the static errors small
    • A wanted minimum closed-loop bandwidth in order to have fast rise time and good rejection of perturbations
    • -
    • A small peak value in order to limit large overshoot and oscillations. +
    • A small peak value (small \(\mathcal{H}_\infty\) norm) in order to limit large overshoot and oscillations. This generally means higher robustness. This will become clear in the next section about the module margin.
    -
    +

    h-infinity-spec-S.png

    Figure 19: Typical wanted shape of the Sensitivity transfer function

    @@ -1595,20 +1611,21 @@ This will become clear in the next section about the module margin.
    -
    -

    4.3 Robustness: Module Margin

    +
    +

    4.3 Robustness: Module Margin

    - +

    -Let’s start by an example demonstrating why the phase and gain margins might not be good indicators of robustness. +Let’s start this section by an example demonstrating why the phase and gain margins might not be good indicators of robustness. +Will follow a discussion about the module margin, a robustness indicator that can be linked to the \(\mathcal{H}_\infty\) norm of \(S\) and that will prove to be very useful.

    -
    +

    -Let’s consider the following plant \(G_t(s)\): +Consider the following plant \(G_t(s)\):

    w0 = 2*pi*100;
    @@ -1620,7 +1637,7 @@ Gt = 1/k*(s
     
     

    -Let’s say we have designed a controller \(K_t(s)\) that gives the loop gain shown in Figure 20. +Let’s say we have designed a controller \(K_t(s)\) that gives the loop gain shown in Figure 20.

    @@ -1629,20 +1646,21 @@ Let’s say we have designed a controller \(K_t(s)\) that gives the loop gai

    -The following characteristics can be determined from Figure 20: +The following characteristics can be determined from the Loop gain in Figure 20:

      -
    • bandwidth of \(\approx 10\, \text{Hz}\)
    • -
    • infinite gain margin (the phase of the loop-gain never reaches -180 degrees
    • -
    • more than 90 degrees of phase margin
    • +
    • Control bandwidth of \(\approx 10\, \text{Hz}\)
    • +
    • Infinite gain margin (the phase of the loop-gain never reaches \(-180^o\))
    • +
    • More than \(90^o\) of phase margin

    -This might indicate very good robustness properties of the closed-loop system. +This clearly indicate very good robustness of the closed-loop system! +Or does it? Let’s find out.

    -
    +

    phase_gain_margin_model_plant.png

    Figure 20: Bode plot of the obtained Loop Gain \(L(s)\)

    @@ -1650,7 +1668,7 @@ This might indicate very good robustness properties of the closed-loop system.

    -Now let’s suppose the “real” plant \(G_r(s)\) as a slightly lower damping factor: +Now let’s suppose the controller is implemented in practice, and the “real” plant \(G_r(s)\) as a slightly lower damping factor than the one estimated for the model:

    xi = 0.03;
    @@ -1658,8 +1676,8 @@ Now let’s suppose the “real” plant \(G_r(s)\) as a slightly lo
     

    -The obtained “real” loop gain is shown in Figure 21. -At a frequency little bit above 100Hz, the phase of the loop gain reaches -180 degrees while its magnitude is more than one which indicated instability. +The obtained “real” loop gain is shown in Figure 21. +At a frequency little bit above 100Hz, the phase of the loop gain reaches -180 degrees while its magnitude is more than one which indicates instability.

    @@ -1676,18 +1694,18 @@ It is confirmed by checking the stability of the closed loop system: -

    +

    phase_gain_margin_real_plant.png

    Figure 21: Bode plots of \(L(s)\) (loop gain corresponding the nominal plant) and \(L_r(s)\) (loop gain corresponding to the real plant)

    -Therefore, even a small change of the plant parameter makes the system unstable even though both the gain margin and the phase margin for the nominal plant are excellent. +Therefore, even a small change of the plant parameter renders the system unstable even though both the gain margin and the phase margin for the nominal plant are excellent.

    -This is due to the fact that the gain and phase margin are robustness indicators for a pure change or gain or a pure change of phase but not a combination of both. +This is due to the fact that the gain and phase margin are robustness indicators corresponding a pure change or gain or a pure change of phase but not a combination of both.

    @@ -1696,16 +1714,16 @@ This is due to the fact that the gain and phase margin are robustness indicators Let’s now determine a new robustness indicator based on the Nyquist Stability Criteria.

    -
    +
    -
    Nyquist Stability Criteria (for stable systems)
    If the open-loop transfer function \(L(s)\) is stable, then the closed-loop system is unstable for any encirclement of the point \(−1\) on the Nyquist plot.
    +
    Nyquist Stability Criteria (for stable systems)
    If the open-loop transfer function \(L(s)\) is stable, then the closed-loop system will be unstable for any encirclement of the point \(−1\) on the Nyquist plot.
    Nyquist Plot
    The Nyquist plot shows the evolution of \(L(j\omega)\) in the complex plane from \(\omega = 0 \to \infty\).
    -
    +

    For more information about the general Nyquist Stability Criteria, you may want to look at this video.

    @@ -1717,21 +1735,21 @@ From the Nyquist stability criteria, it is clear that we want \(L(j\omega)\) to This minimum distance is called the module margin.

    -
    +
    Module Margin
    The Module Margin \(\Delta M\) is defined as the minimum distance between the point \(-1\) and the loop gain \(L(j\omega)\) in the complex plane.
    -
    +

    -A typical Nyquist plot is shown in Figure 22. +A typical Nyquist plot is shown in Figure 22. The gain, phase and module margins are graphically shown to have an idea of what they represent.

    -
    +

    module_margin_example.png

    Figure 22: Nyquist plot with visual indication of the Gain margin \(\Delta G\), Phase margin \(\Delta \phi\) and Module margin \(\Delta M\)

    @@ -1740,14 +1758,13 @@ The gain, phase and module margins are graphically shown to have an idea of what

    -As expected from Figure 22, there is a close relationship between the module margin and the gain and phase margins. +As expected from Figure 22, there is a close relationship between the module margin and the gain and phase margins. We can indeed show that for a given value of the module margin \(\Delta M\), we have:

    \begin{equation} - \Delta G \ge \frac{\Delta M}{\Delta M - 1}; \quad \Delta \phi \ge \frac{1}{\Delta M} + \Delta G \ge \frac{1}{1 - \Delta M}; \quad \Delta \phi \ge \Delta M \end{equation} -

    Let’s now try to express the Module margin \(\Delta M\) as an \(\mathcal{H}_\infty\) norm of a closed-loop transfer function:

    @@ -1756,10 +1773,18 @@ Let’s now try to express the Module margin \(\Delta M\) as an \(\mathcal{H &= \min_\omega |L(j\omega) - (-1)| \\ &= \min_\omega |1 + L(j\omega)| \\ &= \frac{1}{\max_\omega \frac{1}{|1 + L(j\omega)|}} \\ + &= \frac{1}{\max_\omega \left| \frac{1}{1 + G(j\omega)K(j\omega)}\right|} \\ &= \frac{1}{\|S\|_\infty} \end{align*} -
    +

    +Therefore, for a given \(\mathcal{H}_\infty\) norm of \(S\) (\(\|S\|_\infty = M_S\)), we have: +

    +\begin{equation} + \Delta G \ge \frac{M_S}{M_S - 1}; \quad \Delta \phi \ge \frac{1}{M_S} +\end{equation} + +

    The \(\mathcal{H}_\infty\) norm of the sensitivity function \(\|S\|_\infty\) is a measure of the Module margin \(\Delta M\) and therefore an indicator of the system robustness.

    @@ -1776,17 +1801,17 @@ The wanted robustness of the closed-loop system can be specified by setting a ma

    Note that this is why large peak value of \(|S(j\omega)|\) usually indicate robustness problems. -And we know understand why setting an upper bound on the magnitude of \(S\) is generally a good idea. +And we now understand why setting an upper bound on the magnitude of \(S\) is generally a good idea.

    -
    +

    Typical, we require \(\|S\|_\infty < 2 (6dB)\) which implies \(\Delta G \ge 2\) and \(\Delta \phi \ge 29^o\)

    -
    +

    To learn more about module/disk margin, you can check out this video.

    @@ -1795,40 +1820,27 @@ To learn more about module/disk margin, you can check out -

    4.4 Other Requirements

    +
    +

    4.4 Summary of

    - +

    -

    -Interpretation of the \(\mathcal{H}_\infty\) norm of systems: -

    -
      -
    • frequency by frequency attenuation / amplification
    • -
    - -

    -Let’s note \(G_t(s)\) the closed-loop transfer function from \(w\) to \(z\). -

    - -

    -Consider an input sinusoidal signal \(w(t) = \sin\left( \omega_0 t \right)\), then the output signal \(z(t)\) will be equal to: -\[ z(t) = A \sin\left( \omega_0 t + \phi \right) \] -with: -

    -
      -
    • \(A = |G_t(j\omega_0)|\) is the magnitude of \(G_t(s)\) at \(\omega_0\)
    • -
    • \(\phi = \angle G_t(j\omega_0)\) is the phase of \(G_t(s)\) at \(\omega_0\)
    • -
    -

    Noise Attenuation: typical wanted shape for \(T\)

    - +

    +\(S\) can be used to set a lower bound on the bandwidth +\(T\) can be used to set a higher bound on the bandwidth +\(T\) is used to make the system more robust to high frequency model uncertainties +

    + + + +
    @@ -1881,62 +1893,68 @@ Noise Attenuation: typical wanted shape for \(T\) -
    -

    5 \(\mathcal{H}_\infty\) Shaping of closed-loop transfer functions

    +
    +

    5 \(\mathcal{H}_\infty\) Shaping of closed-loop transfer functions

    - +

    In the previous sections, we have seen that the performances of the system depends on the shape of the closed-loop transfer function. -

    - -

    -Therefore, the synthesis problem is to design \(K(s)\) such that closed-loop system is stable and such that various closed-loop transfer functions such as \(S\), \(KS\) and \(T\) are shaped as wanted. +Therefore, the synthesis problem is to design \(K(s)\) such that closed-loop system is stable and such that the closed-loop transfer functions such as \(S\), \(KS\) and \(T\) are shaped as wanted. This is clearly not simple as these closed-loop transfer functions does not depend linearly on \(K\). -

    - -

    But don’t worry, the \(\mathcal{H}_\infty\) synthesis will do this job for us!

    -This -Section 5.1 -Section 5.2 -Section 5.3 -Section 5.4 +To do so, weighting functions are included in the generalized plant and the \(\mathcal{H}_\infty\) synthesis applied on the weighted generalized plant. +Such procedure is presented in Section 5.1. +

    + +

    +Some advice on the design of weighting functions are given in Section 5.2. +

    + +

    +An example of the \(\mathcal{H}_\infty\) shaping of the sensitivity function is studied in Section 5.3. +

    + +

    +Multiple closed-loop transfer functions can be shaped at the same time. +Such synthesis is usually called Mixed-sensitivity Loop Shaping and is one of the most powerful tool of the robust control theory. +Some insight on the use and limitations of such techniques are given in Section 5.4.

    -
    -

    5.1 How to Shape closed-loop transfer function? Using Weighting Functions!

    +
    +

    5.1 How to Shape closed-loop transfer function? Using Weighting Functions!

    - +

    -If the \(\mathcal{H}_\infty\) synthesis is applied on the generalized plant \(P(s)\) shown in Figure 23, it will generate a controller \(K(s)\) such that the \(\mathcal{H}_\infty\) norm of closed-loop transfer function from \(r\) to \(\epsilon\) is minimized. -This closed-loop transfer function actually correspond to the sensitivity function. -Therefore, it will minimize the the \(\mathcal{H}_\infty\) norm of the sensitivity function: \(\|S\|_\infty\). +Suppose we apply the \(\mathcal{H}_\infty\) synthesis on the generalized plant \(P(s)\) shown in Figure 23. +It will generate a controller \(K(s)\) such that the \(\mathcal{H}_\infty\) norm of closed-loop transfer function from \(r\) to \(\epsilon\) is minimized which is equal to the sensitivity function \(S\). +Therefore, the synthesis objective is to minimize the \(\mathcal{H}_\infty\) norm of the sensitivity function: \(\|S\|_\infty\).

    -However, as the \(\mathcal{H}_\infty\) norm is the maximum peak value of the transfer function’s magnitude, this synthesis is quite useless and clearly does not allow to shape the norm of \(S(j\omega)\) over all frequencies. +However, as the \(\mathcal{H}_\infty\) norm is the maximum peak value of the transfer function’s magnitude, this synthesis is quite useless as it will just try to decrease of peak value of \(S\). +Clearly this does not allow to shape the norm of \(S(j\omega)\) over all frequencies nor specify the wanted low frequency gain of \(S\) or bandwidth requirements.

    -
    +

    loop_shaping_S_without_W.png

    Figure 23: Generalized Plant

    -
    +

    -The trick is to include a weighting function \(W_S(s)\) in the generalized plant as shown in Figure 24. +The trick is to include a weighting function \(W_S(s)\) in the generalized plant as shown in Figure 24.

    @@ -1954,27 +1972,27 @@ Let’s now show how this is equivalent as shaping the sensitivity fu \Leftrightarrow & \left| S(j\omega) \right| < \frac{1}{\left| W_s(j\omega) \right|} \quad \forall \omega \label{eq:sensitivity_shaping} \end{align} -

    +

    -As shown in Equation \eqref{eq:sensitivity_shaping}, the \(\mathcal{H}_\infty\) synthesis applying on the weighted generalized plant allows to shape the magnitude of the sensitivity transfer function. +As shown in Equation \eqref{eq:sensitivity_shaping}, the objective of the \(\mathcal{H}_\infty\) synthesis applied on the weighted plant is to make the norm sensitivity function smaller than the inverse of the norm of the weighting function, and that at all frequencies.

    -Therefore, the choice of the weighting function \(W_s(s)\) is very important: its inverse magnitude will define the wanted upper bound of the sensitivity function magnitude. +Therefore, the choice of the weighting function \(W_s(s)\) is very important: its inverse magnitude will define the wanted upper bound of the sensitivity function magnitude over all frequencies.

    -
    +

    loop_shaping_S_with_W.png

    Figure 24: Weighted Generalized Plant

    -
    +

    -Using matlab, compute the weighted generalized plant shown in Figure 25 as a function of \(G(s)\) and \(W_S(s)\). +Using matlab, compute the weighted generalized plant shown in Figure 25 as a function of \(G(s)\) and \(W_S(s)\).

    Hint @@ -1998,32 +2016,34 @@ The two solutions below can be used.
    -
    -
    Pw = blkdiag(Ws, 1)*P;
    -
    -
    -

    The second solution is however more general, and can also be used when weights are added at the inputs by post-multiplying instead of pre-multiplying.

    + +
    +
    P = [1 -G;
    +     1 -G];
    +Pw = blkdiag(Ws, 1)*P;
    +
    +
    -
    -

    5.2 Design of Weighting Functions

    +
    +

    5.2 Design of Weighting Functions

    - +

    Weighting function included in the generalized plant must be proper, stable and minimum phase transfer functions.

    -
    +
    proper
    more poles than zeros, this implies \(\lim_{\omega \to \infty} |W(j\omega)| < \infty\)
    stable
    no poles in the right half plane
    @@ -2033,7 +2053,7 @@ Weighting function included in the generalized plant must be proper, s

    -Matlab is providing the makeweight function that allows to design first-order weights by specifying the low frequency gain, high frequency gain, and the gain at a specific frequency: +There is a Matlab function called makeweight that allows to design first-order weights by specifying the low frequency gain, high frequency gain, and the gain at a specific frequency:

    W = makeweight(dcgain,[freq,mag],hfgain)
    @@ -2048,9 +2068,9 @@ with:
     
  • hfgain: high frequency gain
  • -
    +

    -The Matlab code below produces a weighting function with the following characteristics (Figure 25): +The Matlab code below produces a weighting function with the following characteristics (Figure 25):

    • Low frequency gain of 100
    • @@ -2064,7 +2084,7 @@ The Matlab code below produces a weighting function with the following character
    -
    +

    first_order_weight.png

    Figure 25: Obtained Magnitude of the Weighting Function

    @@ -2072,7 +2092,7 @@ The Matlab code below produces a weighting function with the following character
    -
    +

    Quite often, higher orders weights are required.

    @@ -2104,7 +2124,7 @@ A Matlab function implementing Equation \eqref{eq:weight_formula_advanced} is sh

    -
    function [W] = generateWeight(args)
    +
    function [W] = generateWeight(args)
         arguments
             args.G0 (1,1) double {mustBeNumeric, mustBePositive} = 0.1
             args.G1 (1,1) double {mustBeNumeric, mustBePositive} = 10
    @@ -2139,11 +2159,11 @@ W3 = generateWeight('G0', 1e2, 26.
    +The obtained shapes are shown in Figure 26.
     

    -
    +

    high_order_weight.png

    Figure 26: Higher order weights using Equation \eqref{eq:weight_formula_advanced}

    @@ -2153,15 +2173,15 @@ The obtained shapes are shown in Figure 26.
    -
    -

    5.3 Shaping the Sensitivity Function

    +
    +

    5.3 Shaping the Sensitivity Function

    - +

    -Let’s design a controller using the \(\mathcal{H}_\infty\) synthesis that fulfils the following requirements: +Let’s design a controller using the \(\mathcal{H}_\infty\) shaping of the sensitivity function that fulfils the following requirements:

    1. Bandwidth of at least 10Hz
    2. @@ -2170,17 +2190,17 @@ Let’s design a controller using the \(\mathcal{H}_\infty\) synthesis that

    -As usual, the plant used is the one presented in Section 1.3. +As usual, the plant used is the one presented in Section 1.3.

    -
    +

    -Translate the requirements as upper bounds on the Sensitivity function and design the corresponding Weight using Matlab. +Translate the requirements as upper bounds on the Sensitivity function and design the corresponding weighting functions using Matlab.

    Hint

    -The typical wanted upper bound of the sensitivity function is shown in Figure 27. +The typical wanted upper bound of the sensitivity function is shown in Figure 27.

    @@ -2198,7 +2218,7 @@ Remember that the wanted upper bound of the sensitivity function is defined by t

    -
    +

    h-infinity-spec-S.png

    Figure 27: Typical wanted shape of the Sensitivity transfer function

    @@ -2206,6 +2226,9 @@ Remember that the wanted upper bound of the sensitivity function is defined by t
    Answer +

    +We want to design the weighting function \(W_s(s)\) such that: +

    1. \(|W_s(j \cdot 2 \pi 10)| = \sqrt{2}\)
    2. \(|W_s(j \cdot 0)| = 10^3\)
    3. @@ -2263,7 +2286,7 @@ And the \(\mathcal{H}_\infty\) synthesis is performed on the weighted gen
    -
    +
     Test bounds:  0.5 <=  gamma  <=  0.51
     
      gamma        X>=0        Y>=0       rho(XY)<1    p/f
    @@ -2276,7 +2299,7 @@ Best performance (actual): 0.503
     

    -\(\gamma \approx 0.5\) means that the \(\mathcal{H}_\infty\) synthesis generated a controller \(K(s)\) that stabilizes the closed-loop system, and such that: +\(\gamma \approx 0.5\) means that the \(\mathcal{H}_\infty\) synthesis generated a controller \(K(s)\) that stabilizes the closed-loop system, and such that the \(\mathcal{H}_\infty\) norm of the closed-loop transfer function from \(w\) to \(z\) is less than \(\gamma\):

    \begin{aligned} & \| W_s(s) S(s) \|_\infty \approx 0.5 \\ @@ -2284,23 +2307,23 @@ Best performance (actual): 0.503 \end{aligned}

    -This is indeed what we can see by comparing \(|S|\) and \(|W_S|\) in Figure 28. +This is indeed what we can see by comparing \(|S|\) and \(|W_S|\) in Figure 28.

    -
    +

    -Having \(\gamma < 1\) means that the \(\mathcal{H}_\infty\) synthesis found a controller such that the specified closed-loop transfer functions are bellow the specified upper bounds. +Obtaining \(\gamma < 1\) means that the \(\mathcal{H}_\infty\) synthesis found a controller such that the specified closed-loop transfer functions are bellow the specified upper bounds.

    -Having \(\gamma\) slightly above one does not necessary means the obtained controller is not “good”. +Yet, obtaining a \(\gamma\) slightly above one does not necessary means the synthesis is unsuccessful. It just means that at some frequency, one of the closed-loop transfer functions is above the specified upper bound by a factor \(\gamma\).

    -
    +

    results_sensitivity_hinf.png

    Figure 28: Weighting function and obtained closed-loop sensitivity

    @@ -2308,169 +2331,183 @@ It just means that at some frequency, one of the closed-loop transfer functions
    -
    -

    5.4 Shaping multiple closed-loop transfer functions

    +
    +

    5.4 Shaping multiple closed-loop transfer functions - Limitations

    - + +

    +

    +As was shown in Section 4, each of the four main closed-loop transfer functions (called the gang of four) will impact different characteristics of the closed-loop system.

    -As was shown in Section 4, depending on the specifications, up to four closed-loop transfer function may be shaped (the Gang of four). -This was summarized in Table 8. +Therefore, we might want to shape multiple closed-loop transfer functions at the same time. +For instance \(S\) could be shape to have good step responses, \(KS\) to limit the input usage and \(T\) to filter measurment noise. +When multiple closed-loop transfer function are shaped at the same time, it is refereed to as Mixed-Sensitivity \(\mathcal{H}_\infty\) Control and is the subject of Section 6.

    -For instance to limit the control input \(u\), \(KS\) should be shaped while to filter measurement noise, \(T\) should be shaped. -

    - -

    -When multiple closed-loop transfer function are shaped at the same time, it is refereed to as “Mixed-Sensitivity \(\mathcal{H}_\infty\) Control” and is the subject of Section 6. -

    - -

    -Depending on the closed-loop transfer function being shaped, different general control configuration are used and are described below. +Depending on which closed-loop transfer function are to be shaped, different weighted generalized plant can be used. +Some of them are described below for reference, it is a good exercise to try to re-design such weighted generalized plants.

    Shaping of S and KS -
    +

    general_conf_shaping_S_KS.png

    Figure 29: Generalized Plant to shape \(S\) and \(KS\)

    -
    -
    P = [W1 -G*W1
    -     0   W2
    -     1  -G];
    -
    -
    - +

    +Weighting functions: +

    • \(W_1(s)\) is used to shape \(S\)
    • \(W_2(s)\) is used to shape \(KS\)
    + +
    +
    P = [W1 -G*W1
    +     0   W2
    +     1  -G];
    +
    +
    Shaping of S and T -
    +

    general_conf_shaping_S_T.png

    Figure 30: Generalized Plant to shape \(S\) and \(T\)

    -
    -
    P = [W1 -G*W1
    -     0   G*W2
    -     1   -G];
    -
    -
    - +

    +Weighting functions: +

    • \(W_1\) is used to shape \(S\)
    • \(W_2\) is used to shape \(T\)
    + +
    +
    P = [W1 -G*W1
    +     0   G*W2
    +     1   -G];
    +
    +
    Shaping of S and GS -
    +

    general_conf_shaping_S_GS.png

    Figure 31: Generalized Plant to shape \(S\) and \(GS\)

    -
    -
    P = [W1   -W1
    -     G*W2 -G*W2
    -     G    -G];
    -
    -
    +

    +Weighting functions: +

    • \(W_1\) is used to shape \(S\)
    • \(W_2\) is used to shape \(GS\)
    + +
    +
    P = [W1   -W1
    +     G*W2 -G*W2
    +     G    -G];
    +
    +
    Shaping of S, T and KS -
    +

    general_conf_shaping_S_T_KS.png

    Figure 32: Generalized Plant to shape \(S\), \(T\) and \(KS\)

    -
    -
    P = [W1 -G*W1
    -     0   W2
    -     0   G*W3
    -     1   -G];
    -
    -
    - +

    +Weighting functions: +

    • \(W_1\) is used to shape \(S\)
    • \(W_2\) is used to shape \(KS\)
    • \(W_3\) is used to shape \(T\)
    + +
    +
    P = [W1 -G*W1
    +     0   W2
    +     0   G*W3
    +     1   -G];
    +
    +
    Shaping of S, T and GS -
    +

    general_conf_shaping_S_T_GS.png

    Figure 33: Generalized Plant to shape \(S\), \(T\) and \(GS\)

    -
    -
    P = [W1   -W1
    -     G*W2 -G*W2
    -     0     W3
    -     G    -G];
    -
    -
    - +

    +Weighting functions: +

    • \(W_1\) is used to shape \(S\)
    • \(W_2\) is used to shape \(GS\)
    • \(W_3\) is used to shape \(T\)
    + +
    +
    P = [W1   -W1
    +     G*W2 -G*W2
    +     0     W3
    +     G    -G];
    +
    +
    Shaping of S, T, KS and GS -
    +

    general_conf_shaping_S_T_KS_GS.png

    Figure 34: Generalized Plant to shape \(S\), \(T\), \(KS\) and \(GS\)

    -
    -
    P = [ W1  -W1*G*W3 -G*W1
    -      0    0        W2
    -      1   -G*W3    -G];
    -
    -
    - +

    +Weighting functions: +

    • \(W_1\) is used to shape \(S\)
    • \(W_2\) is used to shape \(KS\)
    • \(W_1W_3\) is used to shape \(GS\)
    • \(W_2W_3\) is used to shape \(T\)
    + +
    +
    P = [ W1  -W1*G*W3 -G*W1
    +      0    0        W2
    +      1   -G*W3    -G];
    +
    +

    -When shaping multiple closed-loop transfer functions, one should be verify careful about the three following points that are further discussed: +When shaping multiple closed-loop transfer functions, one should be very careful about the three following points that are further discussed:

      -
    • The shaped closed-loop transfer functions are linked by mathematical relations and cannot be shaped
    • -
    • Closed-loop transfer function can only be shaped in certain frequency range.
    • +
    • The shaped closed-loop transfer functions are linked by mathematical relations and cannot be shaped independently
    • +
    • Closed-loop transfer function can only be shaped in certain frequency range
    • The size of the obtained controller may be very large and not implementable in practice
    - - -
    +

    Mathematical relations are linking the closed-loop transfer functions. -For instance, the sensitivity function \(S(s)\) and the complementary sensitivity function \(T(s)\) as link by the following well known relation: +For instance, the sensitivity function \(S(s)\) and the complementary sensitivity function \(T(s)\) are linked by the following well known relation:

    \begin{equation} S(s) + T(s) = 1 @@ -2488,19 +2525,25 @@ The weighting function should be carefully design such as these fundamental rela

    -The control bandwidth is clearly limited by physical constrains such as sampling frequency, electronics bandwidth, +For practical control systems, above some frequency (the control bandwidth), the loop gain is much smaller than 1. +On the other size, there is a frequency range where the loop gain is much larger than 1, this frequency range is called the bandwidth. +Let’s see what does that means for the closed-loop transfer function. +First, take the case of the sensibility function:

    - \begin{align*} &|G(j\omega) K(j\omega)| \ll 1 \Longrightarrow |S(j\omega)| = \frac{1}{1 + |G(j\omega)K(j\omega)|} \approx 1 \\ &|G(j\omega) K(j\omega)| \gg 1 \Longrightarrow |S(j\omega)| = \frac{1}{1 + |G(j\omega)K(j\omega)|} \approx \frac{1}{|G(j\omega)K(j\omega)|} \end{align*} +

    +This means that the Sensitivity function cannot be shaped at frequencies where the loop gain is small. +

    +

    Similar relationship can be found for \(T\), \(KS\) and \(GS\).

    -
    +

    Determine the approximate norms of \(T\), \(KS\) and \(GS\) for large loop gains (\(|G(j\omega) K(j\omega)| \gg 1\)) and small loop gains (\(|G(j\omega) K(j\omega)| \ll 1\)).

    @@ -2510,41 +2553,42 @@ Determine the approximate norms of \(T\), \(KS\) and \(GS\) for large loop gains You can follows this procedure for \(T\), \(KS\) and \(GS\):

      -
    1. Write the closed-loop transfer function \(T(s)\) as a function of \(K(s)\) and \(G(s)\)
    2. -
    3. Take \(|K(j\omega)G(j\omega)| \gg 1\) and conclude on \(|T(j\omega)|\)
    4. -
    5. Take \(|K(j\omega)G(j\omega)| \ll 1\) and conclude on \(|T(j\omega)|\)
    6. +
    7. Write the closed-loop transfer function as a function of \(K(s)\) and \(G(s)\)
    8. +
    9. Take \(|K(j\omega)G(j\omega)| \gg 1\) and conclude on the norm of the closed-loop transfer function
    10. +
    11. Take \(|K(j\omega)G(j\omega)| \ll 1\) and conclude
    Answer

    -The obtained constrains are shown in Figure 35. +The obtained constrains are shown in Figure 35.

    -Depending on the frequency band, the norms of the closed-loop transfer functions depend on the controller \(K\) and therefore can be shaped. -However, in some frequency bands, the norms do not depend on the controller and therefore cannot be shaped. +Depending on the frequency band, the norms of the closed-loop transfer functions are a function of the controller \(K\) and therefore can be shaped. +However, in some frequency band, the norms do not depend on the controller and therefore cannot be shaped.

    Therefore the weighting functions should only focus on certainty frequency range depending on the transfer function being shaped. -These regions are summarized in Figure 35. +These regions are summarized in Figure 35.

    -
    +

    h-infinity-4-blocs-constrains.png

    -

    Figure 35: Shaping the Gang of Four: Limitations

    +

    Figure 35: Shaping the Gang of Four. Blue regions indicate that the transfer function can be shaped using \(K\). Red regions indicate this is not the case

    -
    +

    -The order (resp. number of state) of the controller given by the \(\mathcal{H}_\infty\) synthesis is equal to the order (resp. number of state) of the weighted generalized plant. +The order (e.g. number of state) of the controller given by the \(\mathcal{H}_\infty\) synthesis is equal to the order (e.g. number of state) of the weighted generalized plant. It is thus equal to the sum of the number of state of the non-weighted generalized plant and the number of state of all the weighting functions. +Then, the \(\mathcal{H}_\infty\) synthesis usually generate a controller with a very high order that is not implementable in practice.

    @@ -2560,16 +2604,16 @@ Two approaches can be used to obtain controllers with reasonable order:

    -
    -

    6 Mixed-Sensitivity \(\mathcal{H}_\infty\) Control - Example

    +
    +

    6 Mixed-Sensitivity \(\mathcal{H}_\infty\) Control - Example

    - +

    -
    -

    6.1 Control Problem

    +
    +

    6.1 Control Problem

    • [ ] Control Diagram
    • @@ -2622,8 +2666,8 @@ d(t>0.5) = 5e-4;
    -
    -

    6.2 Control Design Procedure

    +
    +

    6.2 Control Design Procedure

    Table 8: Typical Specifications and corresponding wanted norms of open and closed loop tansfer functions
    @@ -2670,7 +2714,7 @@ d(t>0.5) = 5e-4;
    -
    +

    mixed_sensitivity_control_schematic.png

    Figure 36: Generalized Plant used for the Mixed Sensitivity Synthesis

    @@ -2692,11 +2736,11 @@ d(t>0.5) = 5e-4;
    -
    -

    6.3 Step 1 - Shaping of \(S\)

    +
    +

    6.3 Step 1 - Shaping of \(S\)

    - +

    @@ -2728,7 +2772,7 @@ W3 = tf(0.1);

    -
    +
     K1 = hinfsyn(Pw, 1, 1, 'Display', 'on');
     
       Test bounds:  0.5 <=  gamma  <=  0.552
    @@ -2789,11 +2833,11 @@ xlabel('Time [s]'); ylabel(
    -

    6.4 Step 2 - Shaping of \(KS\)

    +
    +

    6.4 Step 2 - Shaping of \(KS\)

    - +

    @@ -2814,7 +2858,7 @@ xlabel('Time [s]'); ylabel( +
     K1 = hinfsyn(Pw, 1, 1, 'Display', 'on');
     
       Test bounds:  0.51 <=  gamma  <=  1.2
    @@ -2873,11 +2917,11 @@ xlabel('Time [s]'); ylabel(
    -

    6.5 Step 3 - Shaping of \(T\)

    +
    +

    6.5 Step 3 - Shaping of \(T\)

    - +

    @@ -2898,7 +2942,7 @@ xlabel('Time [s]'); ylabel( +
     K3 = hinfsyn(Pw, 1, 1, 'Display', 'on');
     
       Test bounds:  0.578 <=  gamma  <=  1.66
    @@ -2960,18 +3004,18 @@ xlabel('Time [s]'); ylabel(
    -

    7 Conclusion

    +
    +

    7 Conclusion

    - +

    -
    -

    Resources

    -
    +
    +

    Resources

    +

    @@ -2991,7 +3035,7 @@ xlabel('Time [s]'); ylabel(

    Author: Dehaeze Thomas

    -

    Created: 2020-12-02 mer. 22:23

    +

    Created: 2020-12-03 jeu. 01:06

    diff --git a/index.org b/index.org index cd56204..ac83d78 100644 --- a/index.org +++ b/index.org @@ -1103,30 +1103,36 @@ The procedure to convert a typical control architecture as the one shown in Figu ** Introduction :ignore: -- Section [[sec:closed_loop_tf]] -- Section [[sec:sensitivity_transfer_functions]] -- Section [[sec:module_margin]] -- Section [[sec:other_requirements]] - As shown in Section [[sec:open_loop_shaping]], the loop gain $L(s) = G(s) K(s)$ is a useful and easy tool when manually designing controllers. This is mainly due to the fact that $L(s)$ is very easy to shape as it depends /linearly/ on $K(s)$. Moreover, important quantities such as the stability margins and the control bandwidth can be estimated from the shape/phase of $L(s)$. -However, the loop gain $L(s)$ does *not* directly give the performances of the closed-loop system, which are determined by the *closed-loop* transfer functions. +However, the loop gain $L(s)$ does *not* directly give the performances of the closed-loop system. +As a matter of fact, the behavior of the closed-loop system by the *closed-loop* transfer functions. +These are derived of a typical feedback architecture functions in Section [[sec:closed_loop_tf]]. -If we consider the feedback system shown in Figure [[fig:gang_of_four_feedback]], we can link to the following specifications to closed-loop transfer functions. -This is summarized in Table [[tab:spec_closed_loop_tf]]. -#+name: tab:spec_closed_loop_tf -#+caption: Typical Specification and associated closed-loop transfer function -| Specification | Closed-Loop Transfer Function | -|--------------------------------+-----------------------------------------------| -| Reference Tracking | From $r$ to $\epsilon$ | -| Disturbance Rejection | From $d$ to $y$ | -| Measurement Noise Filtering | From $n$ to $y$ | -| Small Command Amplitude | From $n,r,d$ to $u$ | -| Stability | All closed-loop transfer function | -| Robustness (stability margins) | Module margin (see Section [[sec:module_margin]]) | +The modern interpretation of control specifications then consists of determining the *required shape of the closed-loop transfer functions* such that the system behavior corresponds to the requirements. +Once this is done, the $\mathcal{H}_\infty$ synthesis can be used to generate a controller that will *shape* the closed-loop transfer function as specified.. +This method is presented in Section [[sec:closed-loop-shaping]]. + + +One of the most important closed-loop transfer function is called the *sensitivity function*. +Its link with the closed-loop behavior of the feedback system is studied in Section [[sec:sensitivity_transfer_functions]]. + +The robustness (stability margins) of the system can also be linked to the shape of the sensitivity function with the use of the *module margin* (Section [[sec:module_margin]]). + +Links between typical control specifications and shapes of the closed-loop transfer functions are summarized in Section [[sec:other_requirements]]. + +** Closed Loop Transfer Functions and the Gang of Four +<> + +Consider the typical feedback system shown in Figure [[fig:gang_of_four_feedback]]. + +The behavior (performances) of this feedback system is determined by the closed-loop transfer functions from the inputs ($r$, $d$ and $n$) to the important signals such as $\epsilon$, $u$ and $y$. + +Depending on the specification, different closed-loop transfer functions do matter. +These are summarized in Table [[tab:spec_closed_loop_tf]]. #+begin_src latex :file gang_of_four_feedback.pdf \begin{tikzpicture} @@ -1149,17 +1155,23 @@ This is summarized in Table [[tab:spec_closed_loop_tf]]. #+end_src #+name: fig:gang_of_four_feedback -#+caption: Simple Feedback Architecture +#+caption: Simple Feedback Architecture with $r$ the reference signal, $\epsilon$ the tracking error, $d$ a disturbance acting at the plant input $u$, $y$ is the output signal and $n$ the measurement noise #+RESULTS: [[file:figs/gang_of_four_feedback.png]] -** Closed Loop Transfer Functions -<> - -As the performances of a controlled system depend on the *closed* loop transfer functions, it is very important to derive these closed-loop transfer functions as a function of the plant $G(s)$ and controller $K(s)$. +#+name: tab:spec_closed_loop_tf +#+caption: Typical Specification and associated closed-loop transfer function +| Specification | Closed-Loop Transfer Function | +|--------------------------------+-----------------------------------------------| +| Reference Tracking | From $r$ to $\epsilon$ | +| Disturbance Rejection | From $d$ to $y$ | +| Measurement Noise Filtering | From $n$ to $y$ | +| Small Command Amplitude | From $n,r,d$ to $u$ | +| Stability | All | +| Robustness (stability margins) | Module margin (see Section [[sec:module_margin]]) | #+begin_exercice -Write the output signals $[\epsilon, u, y]$ as a function of the systems $K(s), G(s)$ and of the input signals $[r, d, n]$ as shown in Figure [[fig:gang_of_four_feedback]]. +For the feedback system in Figure [[fig:gang_of_four_feedback]], write the output signals $[\epsilon, u, y]$ as a function of the systems $K(s), G(s)$ and the input signals $[r, d, n]$. #+HTML:
    Hint Take one of the output (e.g. $y$), and write it as a function of the inputs $[d, r, n]$ going step by step around the loop: @@ -1187,7 +1199,7 @@ The following equations should be obtained: #+end_exercice #+begin_important -We can see that they are 4 different transfer functions describing the behavior of the system in Figure [[fig:gang_of_four_feedback]]. +We can see that they are 4 different closed-loop transfer functions describing the behavior of the feedback system in Figure [[fig:gang_of_four_feedback]]. These called the *Gang of Four*: \begin{align} S &= \frac{1 }{1 + GK}, \quad \text{the sensitivity function} \\ @@ -1202,7 +1214,7 @@ If a feedforward controller is included, a *Gang of Six* transfer functions can More on that in this [[https://www.youtube.com/watch?v=b_8v8scghh8][short video]]. #+end_seealso -And we have: +The behavior of the feedback system in Figure [[fig:gang_of_four_feedback]] is fully described by the following set of equations: \begin{align} \epsilon &= S r - GS d - GS n \\ y &= T r + GS d - T n \\ @@ -1212,7 +1224,7 @@ And we have: Thus, for reference tracking, we have to shape the /closed-loop/ transfer function from $r$ to $\epsilon$, that is the sensitivity function $S(s)$. Similarly, to reduce the effect of measurement noise $n$ on the output $y$, we have to act on the complementary sensitivity function $T(s)$. -** Sensitivity Function +** The Sensitivity Function <> The sensitivity function is indisputably the most important closed-loop transfer function of a feedback system. @@ -1220,7 +1232,7 @@ In this section, we will see how the shape of the sensitivity function will impa Suppose we have developed a "/reference/" controller $K_r(s)$ and made three small changes to obtained three controllers $K_1(s)$, $K_2(s)$ and $K_3(s)$. -The obtained sensitivity functions are shown in Figure [[fig:sensitivity_shape_effect]] and the corresponding step responses are shown in Figure [[fig:sensitivity_shape_effect_step]]. +The obtained sensitivity functions for these four controllers are shown in Figure [[fig:sensitivity_shape_effect]] and the corresponding step responses are shown in Figure [[fig:sensitivity_shape_effect_step]]. The comparison of the sensitivity functions shapes and their effect on the step response is summarized in Table [[tab:compare_sensitivity_shapes]]. @@ -1358,12 +1370,10 @@ The comparison of the sensitivity functions shapes and their effect on the step #+end_definition #+begin_important -From the simple analysis above, we can draw a first estimation of the wanted shape for the sensitivity function in Figure [[fig:h-infinity-spec-S]]. - -The wanted characteristics on the magnitude of the sensitivity function are then: +From the simple analysis above, we can draw a first estimation of the wanted shape for the sensitivity function (Figure [[fig:h-infinity-spec-S]]): - A small magnitude at low frequency to make the static errors small - A wanted minimum closed-loop bandwidth in order to have fast rise time and good rejection of perturbations -- A small peak value in order to limit large overshoot and oscillations. +- A small peak value (small $\mathcal{H}_\infty$ norm) in order to limit large overshoot and oscillations. This generally means higher robustness. This will become clear in the next section about the *module margin*. @@ -1375,10 +1385,11 @@ The wanted characteristics on the magnitude of the sensitivity function are then ** Robustness: Module Margin <> -Let's start by an example demonstrating why the phase and gain margins might not be good indicators of robustness. +Let's start this section by an example demonstrating why the phase and gain margins might not be good indicators of robustness. +Will follow a discussion about the module margin, a robustness indicator that can be linked to the $\mathcal{H}_\infty$ norm of $S$ and that will prove to be very useful. #+begin_exampl -Let's consider the following plant $G_t(s)$: +Consider the following plant $G_t(s)$: #+begin_src matlab w0 = 2*pi*100; xi = 0.1; @@ -1393,12 +1404,13 @@ Let's say we have designed a controller $K_t(s)$ that gives the loop gain shown Kt = 1.2e6*(s + w0)/s; #+end_src -The following characteristics can be determined from Figure [[fig:phase_gain_margin_model_plant]]: -- bandwidth of $\approx 10\, \text{Hz}$ -- infinite gain margin (the phase of the loop-gain never reaches -180 degrees -- more than 90 degrees of phase margin +The following characteristics can be determined from the Loop gain in Figure [[fig:phase_gain_margin_model_plant]]: +- Control bandwidth of $\approx 10\, \text{Hz}$ +- Infinite gain margin (the phase of the loop-gain never reaches $-180^o$) +- More than $90^o$ of phase margin -This might indicate very good robustness properties of the closed-loop system. +This clearly indicate very good robustness of the closed-loop system! +Or does it? Let's find out. #+begin_src matlab :exports none freqs = logspace(0, 3, 1000); @@ -1437,7 +1449,7 @@ This might indicate very good robustness properties of the closed-loop system. [[file:figs/phase_gain_margin_model_plant.png]] -Now let's suppose the "real" plant $G_r(s)$ as a slightly lower damping factor: +Now let's suppose the controller is implemented in practice, and the "real" plant $G_r(s)$ as a slightly lower damping factor than the one estimated for the model: #+begin_src matlab xi = 0.03; #+end_src @@ -1447,7 +1459,7 @@ Now let's suppose the "real" plant $G_r(s)$ as a slightly lower damping factor: #+end_src The obtained "real" loop gain is shown in Figure [[fig:phase_gain_margin_real_plant]]. -At a frequency little bit above 100Hz, the phase of the loop gain reaches -180 degrees while its magnitude is more than one which indicated instability. +At a frequency little bit above 100Hz, the phase of the loop gain reaches -180 degrees while its magnitude is more than one which indicates instability. It is confirmed by checking the stability of the closed loop system: #+begin_src matlab :results value replace @@ -1495,16 +1507,16 @@ It is confirmed by checking the stability of the closed loop system: #+RESULTS: [[file:figs/phase_gain_margin_real_plant.png]] -Therefore, even a small change of the plant parameter makes the system unstable even though both the gain margin and the phase margin for the nominal plant are excellent. +Therefore, even a small change of the plant parameter renders the system unstable even though both the gain margin and the phase margin for the nominal plant are excellent. -This is due to the fact that the gain and phase margin are robustness indicators for a *pure* change or gain or a *pure* change of phase but not a combination of both. +This is due to the fact that the gain and phase margin are robustness indicators corresponding a *pure* change or gain or a *pure* change of phase but not a combination of both. #+end_exampl Let's now determine a new robustness indicator based on the Nyquist Stability Criteria. #+begin_definition - Nyquist Stability Criteria (for stable systems) :: - If the open-loop transfer function $L(s)$ is stable, then the closed-loop system is unstable for any encirclement of the point $−1$ on the Nyquist plot. + If the open-loop transfer function $L(s)$ is stable, then the closed-loop system will be unstable for any encirclement of the point $−1$ on the Nyquist plot. - Nyquist Plot :: The Nyquist plot shows the evolution of $L(j\omega)$ in the complex plane from $\omega = 0 \to \infty$. @@ -1586,19 +1598,24 @@ The gain, phase and module margins are graphically shown to have an idea of what As expected from Figure [[fig:module_margin_example]], there is a close relationship between the module margin and the gain and phase margins. We can indeed show that for a given value of the module margin $\Delta M$, we have: \begin{equation} - \Delta G \ge \frac{\Delta M}{\Delta M - 1}; \quad \Delta \phi \ge \frac{1}{\Delta M} + \Delta G \ge \frac{1}{1 - \Delta M}; \quad \Delta \phi \ge \Delta M \end{equation} - Let's now try to express the Module margin $\Delta M$ as an $\mathcal{H}_\infty$ norm of a closed-loop transfer function: \begin{align*} \Delta M &= \text{minimum distance between } L(j\omega) \text{ and point } (-1) \\ &= \min_\omega |L(j\omega) - (-1)| \\ &= \min_\omega |1 + L(j\omega)| \\ &= \frac{1}{\max_\omega \frac{1}{|1 + L(j\omega)|}} \\ + &= \frac{1}{\max_\omega \left| \frac{1}{1 + G(j\omega)K(j\omega)}\right|} \\ &= \frac{1}{\|S\|_\infty} \end{align*} +Therefore, for a given $\mathcal{H}_\infty$ norm of $S$ ($\|S\|_\infty = M_S$), we have: +\begin{equation} + \Delta G \ge \frac{M_S}{M_S - 1}; \quad \Delta \phi \ge \frac{1}{M_S} +\end{equation} + #+begin_important The $\mathcal{H}_\infty$ norm of the sensitivity function $\|S\|_\infty$ is a measure of the Module margin $\Delta M$ and therefore an indicator of the system robustness. @@ -1610,7 +1627,7 @@ The wanted robustness of the closed-loop system can be specified by setting a ma #+end_important Note that this is why large peak value of $|S(j\omega)|$ usually indicate robustness problems. -And we know understand why setting an upper bound on the magnitude of $S$ is generally a good idea. +And we now understand why setting an upper bound on the magnitude of $S$ is generally a good idea. #+begin_exampl Typical, we require $\|S\|_\infty < 2 (6dB)$ which implies $\Delta G \ge 2$ and $\Delta \phi \ge 29^o$ @@ -1620,23 +1637,29 @@ And we know understand why setting an upper bound on the magnitude of $S$ is gen To learn more about module/disk margin, you can check out [[https://www.youtube.com/watch?v=XazdN6eZF80][this]] video. #+end_seealso -** TODO Other Requirements +** TODO Summary of <> -Interpretation of the $\mathcal{H}_\infty$ norm of systems: -- frequency by frequency attenuation / amplification +# Interpretation of the $\mathcal{H}_\infty$ norm of systems: +# - frequency by frequency attenuation / amplification -Let's note $G_t(s)$ the closed-loop transfer function from $w$ to $z$. +# Let's note $G_t(s)$ the closed-loop transfer function from $w$ to $z$. -Consider an input sinusoidal signal $w(t) = \sin\left( \omega_0 t \right)$, then the output signal $z(t)$ will be equal to: -\[ z(t) = A \sin\left( \omega_0 t + \phi \right) \] -with: -- $A = |G_t(j\omega_0)|$ is the magnitude of $G_t(s)$ at $\omega_0$ -- $\phi = \angle G_t(j\omega_0)$ is the phase of $G_t(s)$ at $\omega_0$ +# Consider an input sinusoidal signal $w(t) = \sin\left( \omega_0 t \right)$, then the output signal $z(t)$ will be equal to: +# \[ z(t) = A \sin\left( \omega_0 t + \phi \right) \] +# with: +# - $A = |G_t(j\omega_0)|$ is the magnitude of $G_t(s)$ at $\omega_0$ +# - $\phi = \angle G_t(j\omega_0)$ is the phase of $G_t(s)$ at $\omega_0$ Noise Attenuation: typical wanted shape for $T$ +$S$ can be used to set a lower bound on the bandwidth +$T$ can be used to set a higher bound on the bandwidth +$T$ is used to make the system more robust to high frequency model uncertainties + + + #+name: tab:specification_modern #+caption: Typical Specifications and corresponding wanted norms of open and closed loop tansfer functions | | Open-Loop Shaping | Closed-Loop Shaping | @@ -1653,26 +1676,30 @@ Noise Attenuation: typical wanted shape for $T$ ** Introduction :ignore: In the previous sections, we have seen that the performances of the system depends on the *shape* of the closed-loop transfer function. - -Therefore, the synthesis problem is to design $K(s)$ such that closed-loop system is stable and such that various closed-loop transfer functions such as $S$, $KS$ and $T$ are shaped as wanted. +Therefore, the synthesis problem is to design $K(s)$ such that closed-loop system is stable and such that the closed-loop transfer functions such as $S$, $KS$ and $T$ are shaped as wanted. This is clearly not simple as these closed-loop transfer functions does not depend linearly on $K$. - But don't worry, the $\mathcal{H}_\infty$ synthesis will do this job for us! -This -Section [[sec:weighting_functions]] -Section [[sec:weighting_functions_design]] -Section [[sec:sensitivity_shaping_example]] -Section [[sec:shaping_multiple_tf]] +To do so, *weighting functions* are included in the generalized plant and the $\mathcal{H}_\infty$ synthesis applied on the *weighted* generalized plant. +Such procedure is presented in Section [[sec:weighting_functions]]. + +Some advice on the design of weighting functions are given in Section [[sec:weighting_functions_design]]. + +An example of the $\mathcal{H}_\infty$ shaping of the sensitivity function is studied in Section [[sec:sensitivity_shaping_example]]. + +Multiple closed-loop transfer functions can be shaped at the same time. +Such synthesis is usually called *Mixed-sensitivity Loop Shaping* and is one of the most powerful tool of the robust control theory. +Some insight on the use and limitations of such techniques are given in Section [[sec:shaping_multiple_tf]]. ** How to Shape closed-loop transfer function? Using Weighting Functions! <> -If the $\mathcal{H}_\infty$ synthesis is applied on the generalized plant $P(s)$ shown in Figure [[fig:loop_shaping_S_without_W]], it will generate a controller $K(s)$ such that the $\mathcal{H}_\infty$ norm of closed-loop transfer function from $r$ to $\epsilon$ is minimized. -This closed-loop transfer function actually correspond to the sensitivity function. -Therefore, it will minimize the the $\mathcal{H}_\infty$ norm of the sensitivity function: $\|S\|_\infty$. +Suppose we apply the $\mathcal{H}_\infty$ synthesis on the generalized plant $P(s)$ shown in Figure [[fig:loop_shaping_S_without_W]]. +It will generate a controller $K(s)$ such that the $\mathcal{H}_\infty$ norm of closed-loop transfer function from $r$ to $\epsilon$ is minimized which is equal to the sensitivity function $S$. +Therefore, the synthesis objective is to minimize the $\mathcal{H}_\infty$ norm of the sensitivity function: $\|S\|_\infty$. -However, as the $\mathcal{H}_\infty$ norm is the maximum peak value of the transfer function's magnitude, this synthesis is quite useless and clearly does not allow to *shape* the norm of $S(j\omega)$ over all frequencies. +However, as the $\mathcal{H}_\infty$ norm is the maximum peak value of the transfer function's magnitude, this synthesis is quite useless as it will just try to decrease of peak value of $S$. +Clearly this does not allow to *shape* the norm of $S(j\omega)$ over all frequencies nor specify the wanted low frequency gain of $S$ or bandwidth requirements. #+begin_src latex :file loop_shaping_S_without_W.pdf \begin{tikzpicture} @@ -1720,9 +1747,9 @@ Let's now show how this is equivalent as *shaping* the sensitivity function: \end{align} #+begin_important - As shown in Equation eqref:eq:sensitivity_shaping, the $\mathcal{H}_\infty$ synthesis applying on the /weighted/ generalized plant allows to *shape* the magnitude of the sensitivity transfer function. + As shown in Equation eqref:eq:sensitivity_shaping, the objective of the $\mathcal{H}_\infty$ synthesis applied on the /weighted/ plant is to make the norm sensitivity function smaller than the inverse of the norm of the weighting function, and that at all frequencies. - Therefore, the choice of the weighting function $W_s(s)$ is very important: its inverse magnitude will define the wanted *upper bound* of the sensitivity function magnitude. + Therefore, the choice of the weighting function $W_s(s)$ is very important: its inverse magnitude will define the wanted *upper bound* of the sensitivity function magnitude over all frequencies. #+end_important #+begin_src latex :file loop_shaping_S_with_W.pdf @@ -1775,11 +1802,13 @@ The two solutions below can be used. 1 -G]; #+end_src +The second solution is however more general, and can also be used when weights are added at the inputs by post-multiplying instead of pre-multiplying. + #+begin_src matlab :tangle no :eval no + P = [1 -G; + 1 -G]; Pw = blkdiag(Ws, 1)*P; #+end_src - -The second solution is however more general, and can also be used when weights are added at the inputs by post-multiplying instead of pre-multiplying. #+HTML:
    #+end_exercice @@ -1797,7 +1826,7 @@ Weighting function included in the generalized plant must be *proper*, *stable* no zeros in the right half plane #+end_definition -Matlab is providing the =makeweight= function that allows to design first-order weights by specifying the low frequency gain, high frequency gain, and the gain at a specific frequency: +There is a Matlab function called =makeweight= that allows to design first-order weights by specifying the low frequency gain, high frequency gain, and the gain at a specific frequency: #+begin_src matlab :tangle no :eval no W = makeweight(dcgain,[freq,mag],hfgain) #+end_src @@ -1924,7 +1953,7 @@ The obtained shapes are shown in Figure [[fig:high_order_weight]]. ** Shaping the Sensitivity Function <> -Let's design a controller using the $\mathcal{H}_\infty$ synthesis that fulfils the following requirements: +Let's design a controller using the $\mathcal{H}_\infty$ shaping of the sensitivity function that fulfils the following requirements: 1. Bandwidth of at least 10Hz 2. Small static errors for step responses 3. Robustness: Large module margin $\Delta M > 0.5$ ($\Rightarrow \Delta G > 2$ and $\Delta \phi > 29^o$) @@ -1932,7 +1961,7 @@ Let's design a controller using the $\mathcal{H}_\infty$ synthesis that fulfils As usual, the plant used is the one presented in Section [[sec:example_system]]. #+begin_exercice -Translate the requirements as upper bounds on the Sensitivity function and design the corresponding Weight using Matlab. +Translate the requirements as upper bounds on the Sensitivity function and design the corresponding weighting functions using Matlab. #+HTML:
    Hint The typical wanted upper bound of the sensitivity function is shown in Figure [[fig:h-infinity-spec-S-bis]]. @@ -1951,6 +1980,7 @@ Remember that the wanted upper bound of the sensitivity function is defined by t #+HTML:
    #+HTML:
    Answer +We want to design the weighting function $W_s(s)$ such that: 1. $|W_s(j \cdot 2 \pi 10)| = \sqrt{2}$ 2. $|W_s(j \cdot 0)| = 10^3$ 3. $\|W_s\|_\infty = 0.5$ @@ -2003,7 +2033,7 @@ And the $\mathcal{H}_\infty$ synthesis is performed on the /weighted/ generalize Best performance (actual): 0.503 #+end_example -$\gamma \approx 0.5$ means that the $\mathcal{H}_\infty$ synthesis generated a controller $K(s)$ that stabilizes the closed-loop system, and such that: +$\gamma \approx 0.5$ means that the $\mathcal{H}_\infty$ synthesis generated a controller $K(s)$ that stabilizes the closed-loop system, and such that the $\mathcal{H}_\infty$ norm of the closed-loop transfer function from $w$ to $z$ is less than $\gamma$: \begin{aligned} & \| W_s(s) S(s) \|_\infty \approx 0.5 \\ & \Leftrightarrow |S(j\omega)| < \frac{0.5}{|W_s(j\omega)|} \quad \forall \omega @@ -2012,9 +2042,9 @@ $\gamma \approx 0.5$ means that the $\mathcal{H}_\infty$ synthesis generated a c This is indeed what we can see by comparing $|S|$ and $|W_S|$ in Figure [[fig:results_sensitivity_hinf]]. #+begin_important -Having $\gamma < 1$ means that the $\mathcal{H}_\infty$ synthesis found a controller such that the specified closed-loop transfer functions are bellow the specified upper bounds. +Obtaining $\gamma < 1$ means that the $\mathcal{H}_\infty$ synthesis found a controller such that the specified closed-loop transfer functions are bellow the specified upper bounds. -Having $\gamma$ slightly above one does not necessary means the obtained controller is not "good". +Yet, obtaining a $\gamma$ slightly above one does not necessary means the synthesis is unsuccessful. It just means that at some frequency, one of the closed-loop transfer functions is above the specified upper bound by a factor $\gamma$. #+end_important @@ -2037,17 +2067,19 @@ It just means that at some frequency, one of the closed-loop transfer functions #+RESULTS: [[file:figs/results_sensitivity_hinf.png]] -** Shaping multiple closed-loop transfer functions +** Shaping multiple closed-loop transfer functions - Limitations <> -As was shown in Section [[sec:modern_interpretation_specification]], depending on the specifications, up to four closed-loop transfer function may be shaped (the Gang of four). -This was summarized in Table [[tab:specification_modern]]. +*** Introduction :ignore: -For instance to limit the control input $u$, $KS$ should be shaped while to filter measurement noise, $T$ should be shaped. +As was shown in Section [[sec:modern_interpretation_specification]], each of the four main closed-loop transfer functions (called the /gang of four/) will impact different characteristics of the closed-loop system. -When multiple closed-loop transfer function are shaped at the same time, it is refereed to as "Mixed-Sensitivity $\mathcal{H}_\infty$ Control" and is the subject of Section [[sec:h_infinity_mixed_sensitivity]]. +Therefore, we might want to shape multiple closed-loop transfer functions at the same time. +For instance $S$ could be shape to have good step responses, $KS$ to limit the input usage and $T$ to filter measurment noise. +When multiple closed-loop transfer function are shaped at the same time, it is refereed to as *Mixed-Sensitivity $\mathcal{H}_\infty$ Control* and is the subject of Section [[sec:h_infinity_mixed_sensitivity]]. -Depending on the closed-loop transfer function being shaped, different general control configuration are used and are described below. +Depending on which closed-loop transfer function are to be shaped, different weighted generalized plant can be used. +Some of them are described below for reference, it is a good exercise to try to re-design such weighted generalized plants. *** S KS :ignore: #+HTML:
    Shaping of S and KS @@ -2092,6 +2124,10 @@ Depending on the closed-loop transfer function being shaped, different general c #+RESULTS: [[file:figs/general_conf_shaping_S_KS.png]] +Weighting functions: +- $W_1(s)$ is used to shape $S$ +- $W_2(s)$ is used to shape $KS$ + #+name: lst:general_plant_S_KS #+caption: General Plant definition corresponding to Figure [[fig:general_conf_shaping_S_KS]] #+begin_src matlab :eval no :tangle no @@ -2099,9 +2135,6 @@ Depending on the closed-loop transfer function being shaped, different general c 0 W2 1 -G]; #+end_src - -- $W_1(s)$ is used to shape $S$ -- $W_2(s)$ is used to shape $KS$ #+HTML:
    *** S T :ignore: @@ -2145,6 +2178,10 @@ Depending on the closed-loop transfer function being shaped, different general c #+RESULTS: [[file:figs/general_conf_shaping_S_T.png]] +Weighting functions: +- $W_1$ is used to shape $S$ +- $W_2$ is used to shape $T$ + #+name: lst:general_plant_S_T #+caption: General Plant definition corresponding to Figure [[fig:general_conf_shaping_S_T]] #+begin_src matlab :eval no :tangle no @@ -2152,9 +2189,6 @@ Depending on the closed-loop transfer function being shaped, different general c 0 G*W2 1 -G]; #+end_src - -- $W_1$ is used to shape $S$ -- $W_2$ is used to shape $T$ #+HTML:
    *** S GS :ignore: @@ -2198,6 +2232,10 @@ Depending on the closed-loop transfer function being shaped, different general c #+RESULTS: [[file:figs/general_conf_shaping_S_GS.png]] +Weighting functions: +- $W_1$ is used to shape $S$ +- $W_2$ is used to shape $GS$ + #+name: lst:general_plant_S_GS #+caption: General Plant definition corresponding to Figure [[fig:general_conf_shaping_S_GS]] #+begin_src matlab :eval no :tangle no @@ -2205,8 +2243,6 @@ Depending on the closed-loop transfer function being shaped, different general c G*W2 -G*W2 G -G]; #+end_src -- $W_1$ is used to shape $S$ -- $W_2$ is used to shape $GS$ #+HTML: *** S T KS :ignore: @@ -2255,6 +2291,11 @@ Depending on the closed-loop transfer function being shaped, different general c #+RESULTS: [[file:figs/general_conf_shaping_S_T_KS.png]] +Weighting functions: +- $W_1$ is used to shape $S$ +- $W_2$ is used to shape $KS$ +- $W_3$ is used to shape $T$ + #+name: lst:general_plant_S_T_KS #+caption: General Plant definition corresponding to Figure [[fig:general_conf_shaping_S_T_KS]] #+begin_src matlab :eval no :tangle no @@ -2263,10 +2304,6 @@ Depending on the closed-loop transfer function being shaped, different general c 0 G*W3 1 -G]; #+end_src - -- $W_1$ is used to shape $S$ -- $W_2$ is used to shape $KS$ -- $W_3$ is used to shape $T$ #+HTML: *** S T GS :ignore: @@ -2315,6 +2352,11 @@ Depending on the closed-loop transfer function being shaped, different general c #+RESULTS: [[file:figs/general_conf_shaping_S_T_GS.png]] +Weighting functions: +- $W_1$ is used to shape $S$ +- $W_2$ is used to shape $GS$ +- $W_3$ is used to shape $T$ + #+name: lst:general_plant_S_T_GS #+caption: General Plant definition corresponding to Figure [[fig:general_conf_shaping_S_T_GS]] #+begin_src matlab :eval no :tangle no @@ -2323,10 +2365,6 @@ Depending on the closed-loop transfer function being shaped, different general c 0 W3 G -G]; #+end_src - -- $W_1$ is used to shape $S$ -- $W_2$ is used to shape $GS$ -- $W_3$ is used to shape $T$ #+HTML: *** S T KS GS :ignore: @@ -2379,6 +2417,12 @@ Depending on the closed-loop transfer function being shaped, different general c #+RESULTS: [[file:figs/general_conf_shaping_S_T_KS_GS.png]] +Weighting functions: +- $W_1$ is used to shape $S$ +- $W_2$ is used to shape $KS$ +- $W_1W_3$ is used to shape $GS$ +- $W_2W_3$ is used to shape $T$ + #+name: lst:general_plant_S_T_KS_GS #+caption: General Plant definition corresponding to Figure [[fig:general_conf_shaping_S_T_KS_GS]] #+begin_src matlab :eval no :tangle no @@ -2386,27 +2430,18 @@ Depending on the closed-loop transfer function being shaped, different general c 0 0 W2 1 -G*W3 -G]; #+end_src - -- $W_1$ is used to shape $S$ -- $W_2$ is used to shape $KS$ -- $W_1W_3$ is used to shape $GS$ -- $W_2W_3$ is used to shape $T$ #+HTML: - - *** Limitation :ignore: -When shaping multiple closed-loop transfer functions, one should be verify careful about the three following points that are further discussed: -- The shaped closed-loop transfer functions are linked by mathematical relations and cannot be shaped -- Closed-loop transfer function can only be shaped in certain frequency range. +When shaping multiple closed-loop transfer functions, one should be very careful about the three following points that are further discussed: +- The shaped closed-loop transfer functions are linked by mathematical relations and cannot be shaped independently +- Closed-loop transfer function can only be shaped in certain frequency range - The size of the obtained controller may be very large and not implementable in practice - - #+begin_warning Mathematical relations are linking the closed-loop transfer functions. - For instance, the sensitivity function $S(s)$ and the complementary sensitivity function $T(s)$ as link by the following well known relation: + For instance, the sensitivity function $S(s)$ and the complementary sensitivity function $T(s)$ are linked by the following well known relation: \begin{equation} S(s) + T(s) = 1 \end{equation} @@ -2417,13 +2452,17 @@ When shaping multiple closed-loop transfer functions, one should be verify caref The weighting function should be carefully design such as these fundamental relations are not violated. #+end_warning -The control bandwidth is clearly limited by physical constrains such as sampling frequency, electronics bandwidth, - +For practical control systems, above some frequency (the control bandwidth), the loop gain is much smaller than 1. +On the other size, there is a frequency range where the loop gain is much larger than 1, this frequency range is called the bandwidth. +Let's see what does that means for the closed-loop transfer function. +First, take the case of the sensibility function: \begin{align*} &|G(j\omega) K(j\omega)| \ll 1 \Longrightarrow |S(j\omega)| = \frac{1}{1 + |G(j\omega)K(j\omega)|} \approx 1 \\ &|G(j\omega) K(j\omega)| \gg 1 \Longrightarrow |S(j\omega)| = \frac{1}{1 + |G(j\omega)K(j\omega)|} \approx \frac{1}{|G(j\omega)K(j\omega)|} \end{align*} +This means that the Sensitivity function cannot be shaped at frequencies where the loop gain is small. + Similar relationship can be found for $T$, $KS$ and $GS$. #+begin_exercice @@ -2431,9 +2470,9 @@ Determine the approximate norms of $T$, $KS$ and $GS$ for large loop gains ($|G( #+HTML:
    Hint You can follows this procedure for $T$, $KS$ and $GS$: -1. Write the closed-loop transfer function $T(s)$ as a function of $K(s)$ and $G(s)$ -2. Take $|K(j\omega)G(j\omega)| \gg 1$ and conclude on $|T(j\omega)|$ -3. Take $|K(j\omega)G(j\omega)| \ll 1$ and conclude on $|T(j\omega)|$ +1. Write the closed-loop transfer function as a function of $K(s)$ and $G(s)$ +2. Take $|K(j\omega)G(j\omega)| \gg 1$ and conclude on the norm of the closed-loop transfer function +3. Take $|K(j\omega)G(j\omega)| \ll 1$ and conclude #+HTML:
    #+HTML:
    Answer @@ -2441,8 +2480,8 @@ The obtained constrains are shown in Figure [[fig:h-infinity-4-blocs-constrains] #+HTML:
    #+end_exercice -Depending on the frequency band, the norms of the closed-loop transfer functions depend on the controller $K$ and therefore can be shaped. -However, in some frequency bands, the norms do not depend on the controller and therefore *cannot* be shaped. +Depending on the frequency band, the norms of the closed-loop transfer functions are a function of the controller $K$ and therefore can be shaped. +However, in some frequency band, the norms do not depend on the controller and therefore *cannot* be shaped. Therefore the weighting functions should only focus on certainty frequency range depending on the transfer function being shaped. These regions are summarized in Figure [[fig:h-infinity-4-blocs-constrains]]. @@ -2507,13 +2546,14 @@ These regions are summarized in Figure [[fig:h-infinity-4-blocs-constrains]]. #+end_src #+name: fig:h-infinity-4-blocs-constrains -#+caption: Shaping the Gang of Four: Limitations +#+caption: Shaping the Gang of Four. Blue regions indicate that the transfer function can be shaped using $K$. Red regions indicate this is not the case #+RESULTS: [[file:figs/h-infinity-4-blocs-constrains.png]] #+begin_warning - The order (resp. number of state) of the controller given by the $\mathcal{H}_\infty$ synthesis is equal to the order (resp. number of state) of the weighted generalized plant. + The order (e.g. number of state) of the controller given by the $\mathcal{H}_\infty$ synthesis is equal to the order (e.g. number of state) of the weighted generalized plant. It is thus equal to the *sum* of the number of state of the non-weighted generalized plant and the number of state of all the weighting functions. + Then, the $\mathcal{H}_\infty$ synthesis usually generate a controller with a very high order that is not implementable in practice. Two approaches can be used to obtain controllers with reasonable order: 1. use simple weights (usually first order)