Finish section about module margin
This commit is contained in:
parent
1065724fb5
commit
bd27568455
BIN
figs/module_margin_example.pdf
Normal file
BIN
figs/module_margin_example.pdf
Normal file
Binary file not shown.
BIN
figs/module_margin_example.png
Normal file
BIN
figs/module_margin_example.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
614
index.html
614
index.html
File diff suppressed because it is too large
Load Diff
239
index.org
239
index.org
@ -1174,53 +1174,13 @@ Similarly, to reduce the effect of measurement noise $n$ on the output $y$, we w
|
||||
xlabel('Time [s]'); ylabel('Step Response');
|
||||
#+end_src
|
||||
|
||||
#+begin_src latex :file h-infinity-spec-S.pdf
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[%
|
||||
width=8cm,
|
||||
height=4cm,
|
||||
at={(0,0)},
|
||||
xmode=log,
|
||||
xmin=0.01,
|
||||
xmax=10000,
|
||||
ymin=-80,
|
||||
ymax=40,
|
||||
ylabel={Magnitude [dB]},
|
||||
xlabel={Frequency [Hz]},
|
||||
ytick={40, 20, 0, -20, -40, -60, -80},
|
||||
xminorgrids,
|
||||
yminorgrids
|
||||
]
|
||||
\addplot [thick, color=black, forget plot]
|
||||
table[row sep=crcr]{%
|
||||
0.01 -60\\
|
||||
0.1 -60\\
|
||||
190 6\\
|
||||
10000 6\\
|
||||
};
|
||||
\draw[<-] (0.05, -60) -- (0.1, -70);
|
||||
\draw (0.1, -70) -- (2, -70) node[right, fill=white, draw]{$\SI{-60}{\decibel} \rightarrow$ \footnotesize{Static error}};
|
||||
\draw[<-] (1, -40) -- (10, -40) node[right, fill=white, draw]{$\SI{20}{\decibel/dec} \rightarrow$ \footnotesize{Ref. track.}};
|
||||
\draw[<-] (100, 0) -- (3, 0) node[left, fill=white, draw]{$\omega_c \rightarrow$ \footnotesize{Speed}};
|
||||
|
||||
\draw[<-] (300, 6) -- (200, 20);
|
||||
\draw (200, 20) -- (10, 20) node[left, fill=white, draw]{$\SI{6}{\decibel} \rightarrow$ \footnotesize{Module margin}};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
|
||||
#+name: fig:h-infinity-spec-S
|
||||
#+caption: Typical wanted shape of the Sensitivity transfer function
|
||||
#+RESULTS:
|
||||
[[file:figs/h-infinity-spec-S.png]]
|
||||
|
||||
** Robustness: Module Margin
|
||||
<<sec:module_margin>>
|
||||
|
||||
Let's start by an example demonstrating why the phase and gain margins might not be good indicators of robustness.
|
||||
|
||||
#+begin_exampl
|
||||
Let's consider the following plant:
|
||||
Let's consider the following plant $G_t(s)$:
|
||||
#+begin_src matlab
|
||||
w0 = 2*pi*100;
|
||||
xi = 0.1;
|
||||
@ -1229,17 +1189,19 @@ Let's consider the following plant:
|
||||
Gt = 1/k*(s/w0/4 + 1)/(s^2/w0^2 + 2*xi*s/w0 + 1);
|
||||
#+end_src
|
||||
|
||||
Let's say we have designed a controller that gives the loop gain shown in Figure [[fig:phase_gain_margin_model_plant]] where the following characteristics can be determined:
|
||||
Let's say we have designed a controller $K_t(s)$ that gives the loop gain shown in Figure [[fig:phase_gain_margin_model_plant]].
|
||||
|
||||
#+begin_src matlab
|
||||
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
|
||||
|
||||
This might indicate very good robustness properties of the closed-loop system.
|
||||
|
||||
#+begin_src matlab
|
||||
Kt = 1.2e6*(s + w0)/s;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
freqs = logspace(0, 3, 1000);
|
||||
|
||||
@ -1277,14 +1239,14 @@ 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 =Gr= as a slightly lower damping factor:
|
||||
Now let's suppose the "real" plant $G_r(s)$ as a slightly lower damping factor:
|
||||
#+begin_src matlab
|
||||
xi = 0.03;
|
||||
Gr = 1/k*(s/w0/4 + 1)/(s^2/w0^2 + 2*xi*s/w0 + 1);
|
||||
#+end_src
|
||||
|
||||
The obtained loop gain is in Figure [[fig:phase_gain_margin_real_plant]].
|
||||
It is shown that 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 unstability.
|
||||
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.
|
||||
|
||||
It is confirmed by checking the stability of the closed loop system:
|
||||
#+begin_src matlab :results value replace
|
||||
@ -1334,35 +1296,125 @@ It is confirmed by checking the stability of the closed loop system:
|
||||
|
||||
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.
|
||||
|
||||
This is due to the fact that the gain and phase margin are indicators to the robustness of the system to 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 for 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.
|
||||
|
||||
- Nyquist Plot ::
|
||||
The Nyquist plot shows the evolution of $L(j\omega)$ in the complex plane from $\omega = 0 \to \infty$.
|
||||
#+end_definition
|
||||
|
||||
#+begin_seealso
|
||||
For more information about the /general/ Nyquist Stability Criteria, you may want to look at [[https://www.youtube.com/watch?v=sof3meN96MA][this]] video.
|
||||
#+end_seealso
|
||||
|
||||
From the Nyquist stability criteria, it is clear that we want $L(j\omega)$ to be as far away from the $-1$ point (called the /unstable point/) in the complex plane.
|
||||
From this, we define the *module margin*.
|
||||
|
||||
#+begin_definition
|
||||
- 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.
|
||||
#+end_definition
|
||||
|
||||
A typical Nyquist plot is shown in Figure [[fig:module_margin_example]].
|
||||
The gain, phase and module margins are graphically shown to have an idea of what they represent.
|
||||
|
||||
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}
|
||||
\end{equation}
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
% Example Plant
|
||||
k = 1e6; % Stiffness [N/m]
|
||||
c = 4e2; % Damping [N/(m/s)]
|
||||
m = 10; % Mass [kg]
|
||||
G = 1/(m*s^2 + c*s + k); % Plant
|
||||
|
||||
% Example Controller
|
||||
K = 14e8 * ... % Gain
|
||||
1/(s^2) * ... % Double Integrator
|
||||
(1 + s/(2*pi*10/sqrt(8)))/(1 + s/(2*pi*10*sqrt(8))); % Lead
|
||||
|
||||
L = G*K;
|
||||
L_resp = squeeze(freqresp(L, freqs, 'Hz'));
|
||||
|
||||
% Module Margin
|
||||
Dm = min(abs(1 + L_resp));
|
||||
|
||||
% Phase Gain Margin
|
||||
[Gm, Pm, Wcg, Wcp] = margin(L);
|
||||
|
||||
freqs = logspace(0, 3, 1000);
|
||||
figure;
|
||||
hold on;
|
||||
% Gain Margin
|
||||
plot([-1, -1/Gm], [0, 0], '-', 'DisplayName', sprintf('$\\Delta G = %.1f$', Gm))
|
||||
|
||||
% Phase Margin
|
||||
theta = -pi:0.01:-pi+Pm*pi/180;
|
||||
plot(cos(theta), sin(theta), '-', 'DisplayName', sprintf('$\\Delta \\phi = %.1f^o$', Pm));
|
||||
|
||||
% Module Margin
|
||||
theta = 0 : 0.01 : 2*pi;
|
||||
plot(Dm*cos(theta)-1, Dm*sin(theta), '-', 'DisplayName', sprintf('$\\Delta M = %.1f$', Dm));
|
||||
|
||||
% Nyquist Plot
|
||||
plot(real(L_resp), imag(L_resp), 'k-', 'DisplayName', '$L(j\omega)$')
|
||||
|
||||
plot(-1, 0, 'k*', 'HandleVisibility', 'off');
|
||||
|
||||
hold off;
|
||||
xlabel('Real Axis'); ylabel('Imaginary Axis');
|
||||
xlim([-1.5, 0.5]); ylim([-1, 1]);
|
||||
axis equal;
|
||||
legend('location', 'southeast');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/module_margin_example.pdf', 'width', 'wide', 'height', 'tall');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:module_margin_example
|
||||
#+caption: Nyquist plot with visual indication of the Gain margin $\Delta G$, Phase margin $\Delta \phi$ and Module margin $\Delta M$
|
||||
#+RESULTS:
|
||||
[[file:figs/module_margin_example.png]]
|
||||
|
||||
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}{\|S\|_\infty}
|
||||
\end{align*}
|
||||
|
||||
#+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.
|
||||
|
||||
\begin{equation}
|
||||
\Delta M = \frac{1}{\|S\|_\infty} \label{eq:module_margin_S}
|
||||
\end{equation}
|
||||
|
||||
The wanted robustness of the closed-loop system can be specified by setting a maximum value on $\|S\|_\infty$.
|
||||
#+end_important
|
||||
|
||||
Note that this is why large peak value of $|S(j\omega)|$ usually indicate robustness problems.
|
||||
|
||||
#+begin_exampl
|
||||
Typical, we require $\|S\|_\infty < 2 (6dB)$ which implies $\Delta G \ge 2$ and $\Delta \phi \ge 29^o$
|
||||
#+end_exampl
|
||||
|
||||
#+begin_seealso
|
||||
To learn more about module (or disk) margin, you can check out [[https://www.youtube.com/watch?v=XazdN6eZF80][this]] video.
|
||||
To learn more about module/disk margin, you can check out [[https://www.youtube.com/watch?v=XazdN6eZF80][this]] video.
|
||||
#+end_seealso
|
||||
|
||||
- [ ] Example why the module margin might be a good alternative
|
||||
- [ ] Stability => L does not does at the left of point -1
|
||||
- [ ] => ...
|
||||
|
||||
|
||||
#+begin_definition
|
||||
The *module margin* $\Delta M$ is defined as the *minimum distance* between the point $-1$ and $L(j\omega) = G(j\omega) K(j\omega)$ in the complex plane.
|
||||
#+end_definition
|
||||
|
||||
The module margin can be visually determined on the Nyquist plot ($L(j\omega)$ from $\omega = -\infty$ to $\infty$ in the complex plane).
|
||||
|
||||
- [ ] Example of Nyquist plot and module margin
|
||||
- [ ] Express the module margin as a function of $\|S\|_\infty$
|
||||
|
||||
\[ M_S < 2 \Rightarrow \text{GM} > 2 \text{ and } \text{PM} > 29^o \]
|
||||
|
||||
#+begin_important
|
||||
Large peak value of $S$ indicate robustness problems.
|
||||
|
||||
The wanted robustness of the closed-loop system can there be specified by setting a maximum value on $\|S\|_\infty$.
|
||||
#+end_important
|
||||
|
||||
** How to *Shape* transfer function? Using of Weighting Functions!
|
||||
<<sec:weighting_functions>>
|
||||
|
||||
@ -1603,6 +1655,47 @@ The obtained shapes are shown in Figure [[fig:high_order_weight]].
|
||||
** Sensitivity Function Shaping - Example
|
||||
<<sec:sensitivity_shaping_example>>
|
||||
|
||||
#+begin_src latex :file h-infinity-spec-S.pdf
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[%
|
||||
width=8cm,
|
||||
height=4cm,
|
||||
at={(0,0)},
|
||||
xmode=log,
|
||||
xmin=0.01,
|
||||
xmax=10000,
|
||||
ymin=-80,
|
||||
ymax=40,
|
||||
ylabel={Magnitude [dB]},
|
||||
xlabel={Frequency [Hz]},
|
||||
ytick={40, 20, 0, -20, -40, -60, -80},
|
||||
xminorgrids,
|
||||
yminorgrids
|
||||
]
|
||||
\addplot [thick, color=black, forget plot]
|
||||
table[row sep=crcr]{%
|
||||
0.01 -60\\
|
||||
0.1 -60\\
|
||||
190 6\\
|
||||
10000 6\\
|
||||
};
|
||||
\draw[<-] (0.05, -60) -- (0.1, -70);
|
||||
\draw (0.1, -70) -- (2, -70) node[right, fill=white, draw]{$\SI{-60}{\decibel} \rightarrow$ \footnotesize{Static error}};
|
||||
\draw[<-] (1, -40) -- (10, -40) node[right, fill=white, draw]{$\SI{20}{\decibel/dec} \rightarrow$ \footnotesize{Ref. track.}};
|
||||
\draw[<-] (100, 0) -- (3, 0) node[left, fill=white, draw]{$\omega_c \rightarrow$ \footnotesize{Speed}};
|
||||
|
||||
\draw[<-] (300, 6) -- (200, 20);
|
||||
\draw (200, 20) -- (10, 20) node[left, fill=white, draw]{$\SI{6}{\decibel} \rightarrow$ \footnotesize{Module margin}};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
|
||||
#+name: fig:h-infinity-spec-S
|
||||
#+caption: Typical wanted shape of the Sensitivity transfer function
|
||||
#+RESULTS:
|
||||
[[file:figs/h-infinity-spec-S.png]]
|
||||
|
||||
|
||||
- Robustness: Module margin > 2 ($\Rightarrow \text{GM} > 2 \text{ and } \text{PM} > 29^o$)
|
||||
- Bandwidth:
|
||||
- Slope of -2
|
||||
|
Loading…
Reference in New Issue
Block a user