diff --git a/figs/h-infinity-spec-S.pdf b/figs/h-infinity-spec-S.pdf index 5db59be..6bbeeb9 100644 Binary files a/figs/h-infinity-spec-S.pdf and b/figs/h-infinity-spec-S.pdf differ diff --git a/figs/h-infinity-spec-S.png b/figs/h-infinity-spec-S.png index e18c950..fe64f52 100644 Binary files a/figs/h-infinity-spec-S.png and b/figs/h-infinity-spec-S.png differ diff --git a/figs/h-infinity-spec-S.svg b/figs/h-infinity-spec-S.svg index 3f9d32d..177ebfe 100644 --- a/figs/h-infinity-spec-S.svg +++ b/figs/h-infinity-spec-S.svg @@ -24,45 +24,39 @@ - + - + - - - - - - - - - - + - + - + + + + - + - + - + - + @@ -95,9 +89,6 @@ - - - @@ -105,114 +96,90 @@ - + - + - + - + - + - + - + - + - + - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + @@ -341,164 +308,98 @@ - + - + + + + + - - + + + + + + - - + - + + - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - - + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + diff --git a/figs/sensitivity_shape_effect.pdf b/figs/sensitivity_shape_effect.pdf new file mode 100644 index 0000000..84f3b1f Binary files /dev/null and b/figs/sensitivity_shape_effect.pdf differ diff --git a/figs/sensitivity_shape_effect.png b/figs/sensitivity_shape_effect.png new file mode 100644 index 0000000..4207f39 Binary files /dev/null and b/figs/sensitivity_shape_effect.png differ diff --git a/figs/sensitivity_shape_effect_step.pdf b/figs/sensitivity_shape_effect_step.pdf new file mode 100644 index 0000000..2fbe089 Binary files /dev/null and b/figs/sensitivity_shape_effect_step.pdf differ diff --git a/figs/sensitivity_shape_effect_step.png b/figs/sensitivity_shape_effect_step.png new file mode 100644 index 0000000..7c11477 Binary files /dev/null and b/figs/sensitivity_shape_effect_step.png differ diff --git a/index.html b/index.html index 39f6fb5..25ed039 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,54 +30,54 @@

Table of Contents

@@ -86,33 +86,33 @@ This document is structured as follows:

    -
  • As \(\mathcal{H}_\infty\) Control is a model based control technique, a short introduction to model based control is given in Section 1
  • -
  • Classical open loop shaping method is presented in Section 2. +
  • As \(\mathcal{H}_\infty\) Control is a model based control technique, a short introduction to model based control is given in Section 1
  • +
  • Classical open loop shaping method is presented in Section 2. It is also shown that \(\mathcal{H}_\infty\) synthesis can be used for open loop shaping.
  • \(\mathcal{H}_\infty\) Important concepts such as the \(\mathcal{H}_\infty\) norm and the generalized plant are introduced.
  • A
  • Finally, an complete example of the -is performed in Section 5.
  • +is performed in Section 5.
-
-

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 when applying Model Based Control to a plant is schematically shown in Figure 1. +The typical methodology when applying Model Based Control to a plant is schematically shown in Figure 1. It consists of three steps:

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

control-procedure.png

Figure 1: Typical Methodoly for Model Based Control

@@ -137,24 +137,24 @@ In this document, we will mainly focus on steps 2 and 3.

-Step 2 will be discussed in Section 4. +Step 2 will be discussed in Section 4. There are two main methods for the controller synthesis (step 3):

    -
  • open loop shaping discussed in Section 2
  • -
  • closed loop shaping discussed in Sections 4 and 5
  • +
  • open loop shaping discussed in Section 2
  • +
  • closed loop shaping discussed in Sections 4 and 5
-
-

1.2 From Classical Control to Robust Control

+
+

1.2 From Classical Control to Robust Control

- +

- +
@@ -287,7 +287,7 @@ There are two main methods for the controller synthesis (step 3):
Table 1: Table summurazing the main differences between classical, modern and robust control
-
+

robustness_performance.png

Figure 2: Comparison of the performance and robustness of classical control methods, modern control methods and robust control methods. The required information on the plant to succesfuly apply each of the control methods are indicated by the colors.

@@ -295,27 +295,27 @@ There are two main methods for the controller synthesis (step 3):
-
-

1.3 Example System

+
+

1.3 Example System

- +

-Let’s consider the model shown in Figure 3. +Let’s consider the model shown in Figure 3. It could represent a suspension system with a payload to position or isolate using an force actuator and an inertial sensor. -The notations used are listed in Table 2. +The notations used are listed in Table 2.

-
+

mech_sys_1dof_inertial_contr.png

Figure 3: 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.

- +
@@ -401,7 +401,7 @@ The notations used are listed in Table 2.
Table 2: Example system variables
-
+

Derive the following open-loop transfer functions:

@@ -458,11 +458,11 @@ Thanks in advance

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

-
+

classical_feedback_test_system.png

Figure 4: Block diagram corresponding to the example system

@@ -480,7 +480,7 @@ Let’s define the system parameters on Matlab.

-And now the system dynamics \(G(s)\) and \(G_d(s)\) (their bode plots are shown in Figures 5 and 6). +And now the system dynamics \(G(s)\) and \(G_d(s)\) (their bode plots are shown in Figures 5 and 6).

4: G = 1/(m*s^2 + c*s + k); % Plant
@@ -489,14 +489,14 @@ And now the system dynamics \(G(s)\) and \(G_d(s)\) (their bode plots are shown
 
-
+

bode_plot_example_afm.png

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

-
+

bode_plot_example_Gd.png

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

@@ -505,38 +505,38 @@ And now the system dynamics \(G(s)\) and \(G_d(s)\) (their bode plots are shown
-
-

2 Classical Open Loop Shaping

+
+

2 Classical Open Loop Shaping

- +

-
-

2.1 Introduction to Loop Shaping

+
+

2.1 Introduction to Loop Shaping

- +

-
+

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

-
+

-The Loop Gain \(L(s)\) usually refers to as the product of the controller and the plant (“Gain around the loop”, see Figure 7): +The Loop Gain \(L(s)\) usually refers to as the product of the controller and the plant (“Gain around the loop”, see Figure 7):

\begin{equation} L(s) = G(s) \cdot K(s) \label{eq:loop_gain} \end{equation} -
+

open_loop_shaping.png

Figure 7: Classical Feedback Architecture

@@ -561,11 +561,11 @@ The Open Loop shape is usually done manually has the loop gain \(L(s)\) depends

-\(K(s)\) then consists of a combination of leads, lags, notches, etc. such that \(L(s)\) has the wanted shape (an example is shown in Figure 8). +\(K(s)\) then consists of a combination of leads, lags, notches, etc. such that \(L(s)\) has the wanted shape (an example is shown in Figure 8).

-
+

open_loop_shaping_shape.png

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

@@ -573,14 +573,14 @@ The Open Loop shape is usually done manually has the loop gain \(L(s)\) depends
-
-

2.2 Example of Open Loop Shaping

+
+

2.2 Example of Open Loop Shaping

- +

-
+

Let’s take our example system and try to apply the Open-Loop shaping strategy to design a controller that fulfils the following specifications:

@@ -592,7 +592,7 @@ Let’s take our example system and try to apply the Open-Loop shaping strat
-
+

Using SISOTOOL, design a controller that fulfill the specifications.

@@ -609,7 +609,7 @@ In order to have the wanted Roll-off, two integrators are used, a lead is also a

-The obtained controller is shown below, and the bode plot of the Loop Gain is shown in Figure 9. +The obtained controller is shown below, and the bode plot of the Loop Gain is shown in Figure 9.

K = 14e8 * ... % Gain
@@ -620,7 +620,7 @@ The obtained controller is shown below, and the bode plot of the Loop Gain is sh
 
-
+

loop_gain_manual_afm.png

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

@@ -668,11 +668,11 @@ And we can verify that we have the wanted stability margins:
-
-

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

+
+

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

- +

@@ -699,7 +699,7 @@ where:

  • K is the synthesize controller
  • -
    +

    Matlab documentation of loopsyn (link).

    @@ -708,11 +708,11 @@ Matlab documentation of loopsyn ( -

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

    +
    +

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

    - +

    @@ -744,10 +744,10 @@ The \(\mathcal{H}_\infty\) optimal open loop shaping synthesis is performed usin

    -The Bode plot of the obtained controller is shown in Figure 10. +The Bode plot of the obtained controller is shown in Figure 10.

    -
    +

    It is always important to analyze the controller after the synthesis is performed.

    @@ -768,28 +768,28 @@ Let’s briefly analyze this controller: -
    +

    open_loop_shaping_hinf_K.png

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

    -The obtained Loop Gain is shown in Figure 11. +The obtained Loop Gain is shown in Figure 11.

    -
    +

    open_loop_shaping_hinf_L.png

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

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

    - +
    @@ -830,22 +830,22 @@ Let’s now compare the obtained stability margins of the \(\mathcal{H}_\inf -
    -

    3 First Steps in the \(\mathcal{H}_\infty\) world

    +
    +

    3 First Steps in the \(\mathcal{H}_\infty\) world

    - +

    -
    -

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

    +
    +

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

    - +

    -
    +

    The \(\mathcal{H}_\infty\) norm is defined as the peak of the maximum singular value of the frequency response

    @@ -862,7 +862,7 @@ For a SISO system \(G(s)\), it is simply the peak value of \(|G(j\omega)|\) as a
    -
    +

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

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

    -We can see that the \(\mathcal{H}_\infty\) norm of \(G(s)\) does corresponds to the peak value of \(|G(j\omega)|\) as a function of frequency as shown in Figure 12. +We can see that the \(\mathcal{H}_\infty\) norm of \(G(s)\) does corresponds to the peak value of \(|G(j\omega)|\) as a function of frequency as shown in Figure 12.

    -
    +

    hinfinity_norm_siso_bode.png

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

    @@ -891,14 +891,14 @@ We can see that the \(\mathcal{H}_\infty\) norm of \(G(s)\) does corresponds to
    -
    -

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

    +
    +

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

    - +

    -
    +

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

    @@ -934,11 +934,11 @@ Note that there are many ways to use the \(\mathcal{H}_\infty\) Synthesis:
    -
    -

    3.3 The Generalized Plant

    +
    +

    3.3 The Generalized Plant

    - +

    @@ -948,9 +948,9 @@ It makes things much easier for the following steps.

    -The generalized plant, usually noted \(P(s)\), is shown in Figure 13. +The generalized plant, usually noted \(P(s)\), is shown in Figure 13. It has two inputs and two outputs (both could contains many signals). -The meaning of the inputs and outputs are summarized in Table 4. +The meaning of the inputs and outputs are summarized in Table 4.

    @@ -963,14 +963,14 @@ It can indeed represent feedback as well as feedforward control architectures. \end{equation} -

    +

    general_plant.png

    Figure 13: Inputs and Outputs of the generalized Plant

    -
    -
    Table 3: Comparison of the characteristics obtained with the two methods
    +
    +
    @@ -1016,18 +1016,18 @@ It can indeed represent feedback as well as feedforward control architectures. -
    -

    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
    @@ -1042,7 +1042,7 @@ After \(K\) is found, the system is robustified by adjusting the response
    -
    +

    general_control_names.png

    Figure 14: General Control Configuration

    @@ -1074,28 +1074,28 @@ where:
    -
    -

    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 15 to a generalized Plant is as follows: +The procedure to convert a typical control architecture as the one shown in Figure 15 to a generalized Plant is as follows:

    1. Define signals (\(w\), \(z\), \(u\) and \(v\)) of the generalized plant
    2. Remove \(K\) and rearrange the inputs and outputs to match the generalized configuration
    -
    +

    -Compute the Generalized plant of corresponding to the tracking control architecture shown in Figure 15 +Compute the Generalized plant of corresponding to the tracking control architecture shown in Figure 15

    -
    +

    classical_feedback_tracking.png

    Figure 15: Classical Feedback Control Architecture (Tracking)

    @@ -1119,11 +1119,11 @@ Then, Remove \(K\) and rearrange the inputs and outputs.
    Answer

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

    -
    +

    mixed_sensitivity_ref_tracking.png

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

    @@ -1147,19 +1147,19 @@ P.OutputName = {'e', 'u
    -
    -

    4 Modern Interpretation of the Control Specifications

    +
    +

    4 Modern Interpretation of the Control Specifications

    - +

    -
    -

    4.1 Introduction

    +
    +

    4.1 Introduction

    -As shown in Section 2, the loop gain \(L(s) = G(s) K(s)\) is a useful and easy tool for the manual design of controllers. +As shown in Section 2, the loop gain \(L(s) = G(s) K(s)\) is a useful and easy tool for the manual design of controllers.

    @@ -1173,11 +1173,11 @@ The closed loop system behavior is indeed determined by the closed-loop t

    -If we consider the feedback system shown in Figure 17, we can link to the following specifications to closed-loop transfer functions. -This is summarized in Table 5. +If we consider the feedback system shown in Figure 17, we can link to the following specifications to closed-loop transfer functions. +This is summarized in Table 5.

    -
    Table 4: Notations for the general configuration
    +
    @@ -1219,13 +1219,13 @@ This is summarized in Table 5. - +
    Table 5: Typical Specification and associated closed-loop transfer function
    Robustness (stability margins)Module margin (see Section 4.4)Module margin (see Section 4.4)
    -
    +

    gang_of_four_feedback.png

    Figure 17: Simple Feedback Architecture

    @@ -1233,20 +1233,20 @@ This is summarized in Table 5.
    -
    -

    4.2 Closed Loop Transfer Functions

    +
    +

    4.2 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 17. +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 17.

    Hint @@ -1283,9 +1283,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 17. +We can see that they are 4 different transfer functions describing the behavior of the system in Figure 17. These called the Gang of Four:

    \begin{align} @@ -1297,7 +1297,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. @@ -1321,82 +1321,126 @@ Similarly, to reduce the effect of measurement noise \(n\) on the output \(y\),

    -
    -

    4.3 Sensitivity Function

    +
    +

    4.3 Sensitivity Function

    - +

    -
    -
    K1 = 14e8 * ... % Gain
    -     1/(s^2) * ... % Double Integrator
    -     (1 + s/(2*pi*10/sqrt(8)))/(1 + s/(2*pi*10*sqrt(8))); % Lead
    +

    +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 18 and the corresponding step responses are shown in Figure 19. +

    -K2 = 1e8 * ... % Gain - 1/(s^2) * ... % Double Integrator - (1 + s/(2*pi*1/sqrt(8)))/(1 + s/(2*pi*1*sqrt(8))); % Lead +

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

    -K3 = 1e8 * ... % Gain - 1/(s^2) * ... % Double Integrator - (1 + s/(2*pi*1/sqrt(2)))/(1 + s/(2*pi*1*sqrt(2))); % Lead + + -S1 = 1/(1 + K1*G); -S2 = 1/(1 + K2*G); -S3 = 1/(1 + K3*G); ++-T1 = K1*G/(1 + K1*G); -T2 = K2*G/(1 + K2*G); -T3 = K3*G/(1 + K3*G); +-bodeFig({S1, S2, S3}) - ++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 6: Comparison of the sensitivity function shape and the corresponding step response for the three controller variations
    ControllerSensitivity Function ShapeChange of the Step Response
    \(K_1(s)\)Larger bandwidth \(\omega_b\)Faster rise time
    \(K_2(s)\)Larger peak value \(\Vert S\Vert_\infty\)Large overshoot and oscillations
    \(K_3(s)\)Larger low frequency gain \(\vert S(j\cdot 0)\vert\)Larger static error
    + + +
    +

    sensitivity_shape_effect.png +

    +

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

    -
    -
    freqs = logspace(-1, 2, 1000);
     
    -figure;
    -tiledlayout(1, 2, 'TileSpacing', 'None', 'Padding', 'None');
    +
    +

    sensitivity_shape_effect_step.png +

    +

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

    +
    -ax1 = nexttile; -hold on; -plot(freqs, abs(squeeze(freqresp(S1, freqs, 'Hz'))), 'DisplayName', '$L(s)$'); -plot(freqs, abs(squeeze(freqresp(S2, freqs, 'Hz'))), 'DisplayName', '$L_w(s)$'); -plot(freqs, abs(squeeze(freqresp(S3, freqs, 'Hz'))), 'DisplayName', '$L_w(s) / \gamma$, $L_w(s) \cdot \gamma$'); -hold off; -set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); -xlabel('Frquency [Hz]'); ylabel('Sensitivity Magnitude'); -hold off; +
    +
    +
    Closed-Loop Bandwidth

    +The closed-loop bandwidth \(\omega_b\) is the frequency where \(|S(j\omega)|\) first crosses \(1/\sqrt{2} = -3dB\) from below. +

    + +

    +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 20. +

    + +

    +The wanted characteristics on the magnitude of the sensitivity function are then: +

    +
      +
    • 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. +This generally means higher robustness. +This will become clear in the next section about the module margin.
    • +
    + + +
    +

    h-infinity-spec-S.png +

    +

    Figure 20: Typical wanted shape of the Sensitivity transfer function

    +
    -ax2 = nexttile; -t = linspace(0, 1, 1000); -y1 = step(T1, t); -y2 = step(T2, t); -y3 = step(T3, t); -hold on; -plot(t, y1) -plot(t, y2) -plot(t, y3) -hold off -xlabel('Time [s]'); ylabel('Step Response'); -
    -
    -

    4.4 Robustness: Module Margin

    +
    +

    4.4 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 consider the following plant \(G_t(s)\):

    @@ -1410,7 +1454,7 @@ Gt = 1/k*(s

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

    @@ -1419,7 +1463,7 @@ Let’s say we have designed a controller \(K_t(s)\) that gives the loop gai

    -The following characteristics can be determined from Figure 18: +The following characteristics can be determined from Figure 21: