diff --git a/matlab/index.html b/matlab/index.html index cbf7471..ac3c157 100644 --- a/matlab/index.html +++ b/matlab/index.html @@ -3,251 +3,25 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- + -The idea is to combine sensors that works in different frequency range using complementary filters.
-Doing so, one "super sensor" is obtained that can have better noise characteristics than the individual sensors over a large frequency range. +Doing so, one “super sensor” is obtained that can have better noise characteristics than the individual sensors over a large frequency range.
@@ -425,23 +111,23 @@ The Matlab scripts is accessible here
-Let's consider the sensor fusion architecture shown on figure 1 where two sensors (sensor 1 and sensor 2) are measuring the same quantity \(x\) with different noise characteristics determined by \(N_1(s)\) and \(N_2(s)\). +Let’s consider the sensor fusion architecture shown on figure 1 where two sensors (sensor 1 and sensor 2) are measuring the same quantity \(x\) with different noise characteristics determined by \(N_1(s)\) and \(N_2(s)\).
\(\tilde{n}_1\) and \(\tilde{n}_2\) are normalized white noise:
\begin{equation} -\label{orge64e355} - \Phi_{\tilde{n}_1}(\omega) = \Phi_{\tilde{n}_1}(\omega) = 1 +\label{orga7ad7f8} + \Phi_{\tilde{n}_1}(\omega) = \Phi_{\tilde{n}_2}(\omega) = 1 \end{equation} -
Figure 1: Fusion of two sensors
@@ -451,16 +137,16 @@ Let's consider the sensor fusion architecture shown on figure 2. +We obtain the architecture of figure 2. -
Figure 2: Fusion of two sensors with ideal dynamics
@@ -470,7 +156,7 @@ We obtain the architecture of figure 2. \(H_1(s)\) and \(H_2(s)\) are complementary filters: \begin{equation} -\label{org9f8097b} +\label{orga71be68} H_1(s) + H_2(s) = 1 \end{equation} @@ -487,17 +173,17 @@ We have that the Power Spectral Density (PSD) of \(\hat{x}\) is: And the goal is the minimize the Root Mean Square (RMS) value of \(\hat{x}\): \begin{equation} -\label{orgc722a2b} +\label{orgc926b79} \sigma_{\hat{x}} = \sqrt{\int_0^\infty \Phi_{\hat{x}}(\omega) d\omega} \end{equation}-Let's define the noise characteristics of the two sensors by choosing \(N_1\) and \(N_2\): +Let’s define the noise characteristics of the two sensors by choosing \(N_1\) and \(N_2\):
omegac = 100*2*pi; G0 = 1e-5; Ginf = 1e-4; -N1 = (Ginf*s/omegac + G0)/(s/omegac + 1)/(1 + s/2/pi/100); +omegac = 100*2*pi; G0 = 1e-5; Ginf = 1e-4; +N1 = (Ginf*s/omegac + G0)/(s/omegac + 1)/(1 + s/2/pi/100); -omegac = 1*2*pi; G0 = 1e-3; Ginf = 1e-8; -N2 = ((sqrt(Ginf)*s/omegac + sqrt(G0))/(s/omegac + 1))^2/(1 + s/2/pi/4000)^2; +omegac = 1*2*pi; G0 = 1e-3; Ginf = 1e-8; +N2 = ((sqrt(Ginf)*s/omegac + sqrt(G0))/(s/omegac + 1))^2/(1 + s/2/pi/4000)^2;
Figure 3: Noise Characteristics of the two sensors (png, pdf)
@@ -522,8 +208,8 @@ N2 = ( -As \(\tilde{n}_1\) and \(\tilde{n}_2\) are normalized white noise: \(\Phi_{\tilde{n}_1}(\omega) = \Phi_{\tilde{n}_2}(\omega) = 1\) and we have: @@ -536,11 +222,11 @@ For that, we use the \(\mathcal{H}_2\) Synthesis.
-We use the generalized plant architecture shown on figure 4. +We use the generalized plant architecture shown on figure 4.
-
Figure 4: \(\mathcal{H}_2\) Synthesis - Generalized plant used for the optimal generation of complementary filters
@@ -569,11 +255,11 @@ Thus, if we minimize the \(\mathcal{H}_2\) norm of this transfer function, we mi-We define the generalized plant \(P\) on matlab as shown on figure 4. +We define the generalized plant \(P\) on matlab as shown on figure 4.
P = [0 N2 1; - N1 -N2 0]; +P = [0 N2 1; + N1 -N2 0];
[H1, ~, gamma] = h2syn(P, 1, 1); +[H1, ~, gamma] = h2syn(P, 1, 1);
h2syn
command.
Finally, we define \(H_2(s) = 1 - H_1(s)\).
H2 = 1 - H1; +H2 = 1 - H1;
-The complementary filters obtained are shown on figure 5. +The complementary filters obtained are shown on figure 5.
-The PSD of the noise of the individual sensor and of the super sensor are shown in Fig. 6. +The PSD of the noise of the individual sensor and of the super sensor are shown in Fig. 6.
-The Cumulative Power Spectrum (CPS) is shown on Fig. 7. +The Cumulative Power Spectrum (CPS) is shown on Fig. 7.
@@ -610,35 +296,35 @@ The obtained RMS value of the super sensor is lower than the RMS value of the in
-PSD_S1 = abs(squeeze(freqresp(N1, freqs, 'Hz'))).^2; -PSD_S2 = abs(squeeze(freqresp(N2, freqs, 'Hz'))).^2; -PSD_H2 = abs(squeeze(freqresp(N1*H1, freqs, 'Hz'))).^2+abs(squeeze(freqresp(N2*H2, freqs, 'Hz'))).^2; +PSD_S1 = abs(squeeze(freqresp(N1, freqs, 'Hz'))).^2; +PSD_S2 = abs(squeeze(freqresp(N2, freqs, 'Hz'))).^2; +PSD_H2 = abs(squeeze(freqresp(N1*H1, freqs, 'Hz'))).^2+abs(squeeze(freqresp(N2*H2, freqs, 'Hz'))).^2;
Figure 6: Power Spectral Density of the estimated \(\hat{x}\) using the two sensors alone and using the optimally fused signal (png, pdf)
CPS_S1 = 1/pi*cumtrapz(2*pi*freqs, PSD_S1); -CPS_S2 = 1/pi*cumtrapz(2*pi*freqs, PSD_S2); -CPS_H2 = 1/pi*cumtrapz(2*pi*freqs, PSD_H2); +CPS_S1 = 1/pi*cumtrapz(2*pi*freqs, PSD_S1); +CPS_S2 = 1/pi*cumtrapz(2*pi*freqs, PSD_S2); +CPS_H2 = 1/pi*cumtrapz(2*pi*freqs, PSD_H2);
Figure 7: Cumulative Power Spectrum of individual sensors and super sensor using the \(\mathcal{H}_2\) synthesis (png, pdf)
@@ -646,431 +332,10 @@ CPS_H2 = 1 --An alternative Alternative formulation of the \(\mathcal{H}_2\) synthesis is shown in Fig. 8. -
- - --
-Figure 8: Alternative formulation of the \(\mathcal{H}_2\) synthesis
--Another objective that we may have is that the noise of the super sensor \(n_{SS}\) is following the minimum of the noise of the two sensors \(n_1\) and \(n_2\): -\[ \Gamma_{n_{ss}}(\omega) = \min(\Gamma_{n_1}(\omega),\ \Gamma_{n_2}(\omega)) \] -
- --In order to obtain that ideal case, we need that the complementary filters be designed such that: -
-\begin{align*} - & |H_1(j\omega)| = 1 \text{ and } |H_2(j\omega)| = 0 \text{ at frequencies where } \Gamma_{n_1}(\omega) < \Gamma_{n_2}(\omega) \\ - & |H_1(j\omega)| = 0 \text{ and } |H_2(j\omega)| = 1 \text{ at frequencies where } \Gamma_{n_1}(\omega) > \Gamma_{n_2}(\omega) -\end{align*} - --Which is indeed impossible in practice. -
- --We could try to approach that with the \(\mathcal{H}_\infty\) synthesis by using high order filters. -
- --As shown on Fig. 3, the frequency where the two sensors have the same noise level is around 9Hz. -We will thus choose weighting functions such that the merging frequency is around 9Hz. -
- --The weighting functions used as well as the obtained complementary filters are shown in Fig. 9. -
- -n = 5; w0 = 2*pi*10; G0 = 1/10; G1 = 10000; Gc = 1/2; -W1a = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n; - -n = 5; w0 = 2*pi*8; G0 = 1000; G1 = 0.1; Gc = 1/2; -W2a = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n; --
P = [W1a -W1a; - 0 W2a; - 1 0]; --
-And we do the \(\mathcal{H}_\infty\) synthesis using the hinfsyn
command.
-
[H2a, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); --
-[H2a, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); -Resetting value of Gamma min based on D_11, D_12, D_21 terms - -Test bounds: 0.1000 < gamma <= 10500.0000 - - gamma hamx_eig xinf_eig hamy_eig yinf_eig nrho_xy p/f -1.050e+04 2.1e+01 -3.0e-07 7.8e+00 -1.3e-15 0.0000 p -5.250e+03 2.1e+01 -1.5e-08 7.8e+00 -5.8e-14 0.0000 p -2.625e+03 2.1e+01 2.5e-10 7.8e+00 -3.7e-12 0.0000 p -1.313e+03 2.1e+01 -3.2e-11 7.8e+00 -7.3e-14 0.0000 p - 656.344 2.1e+01 -2.2e-10 7.8e+00 -1.1e-15 0.0000 p - 328.222 2.1e+01 -1.1e-10 7.8e+00 -1.2e-15 0.0000 p - 164.161 2.1e+01 -2.4e-08 7.8e+00 -8.9e-16 0.0000 p - 82.130 2.1e+01 2.0e-10 7.8e+00 -9.1e-31 0.0000 p - 41.115 2.1e+01 -6.8e-09 7.8e+00 -4.1e-13 0.0000 p - 20.608 2.1e+01 3.3e-10 7.8e+00 -1.4e-12 0.0000 p - 10.354 2.1e+01 -9.8e-09 7.8e+00 -1.8e-15 0.0000 p - 5.227 2.1e+01 -4.1e-09 7.8e+00 -2.5e-12 0.0000 p - 2.663 2.1e+01 2.7e-10 7.8e+00 -4.0e-14 0.0000 p - 1.382 2.1e+01 -3.2e+05# 7.8e+00 -3.5e-14 0.0000 f - 2.023 2.1e+01 -5.0e-10 7.8e+00 0.0e+00 0.0000 p - 1.702 2.1e+01 -2.4e+07# 7.8e+00 -1.6e-13 0.0000 f - 1.862 2.1e+01 -6.0e+08# 7.8e+00 -1.0e-12 0.0000 f - 1.942 2.1e+01 -2.8e-09 7.8e+00 -8.1e-14 0.0000 p - 1.902 2.1e+01 -2.5e-09 7.8e+00 -1.1e-13 0.0000 p - 1.882 2.1e+01 -9.3e-09 7.8e+00 -2.0e-15 0.0001 p - 1.872 2.1e+01 -1.3e+09# 7.8e+00 -3.6e-22 0.0000 f - 1.877 2.1e+01 -2.6e+09# 7.8e+00 -1.2e-13 0.0000 f - 1.880 2.1e+01 -5.6e+09# 7.8e+00 -1.4e-13 0.0000 f - 1.881 2.1e+01 -1.2e+10# 7.8e+00 -3.3e-12 0.0000 f - 1.882 2.1e+01 -3.2e+10# 7.8e+00 -8.5e-14 0.0001 f - - Gamma value achieved: 1.8824 -- -
H1a = 1 - H2a; --
-We then compute the Power Spectral Density as well as the Cumulative Power Spectrum. -
- -PSD_Ha = abs(squeeze(freqresp(N1*H1a, freqs, 'Hz'))).^2+abs(squeeze(freqresp(N2*H2a, freqs, 'Hz'))).^2; -CPS_Ha = 1/pi*cumtrapz(2*pi*freqs, PSD_Ha); --
-We have that: -\[ \Phi_{\hat{x}}(\omega) = \left|H_1(j\omega) N_1(j\omega)\right|^2 + \left|H_2(j\omega) N_2(j\omega)\right|^2 \] -
- --Then, at frequencies where \(|H_1(j\omega)| < |H_2(j\omega)|\) we would like that \(|N_1(j\omega)| = 1\) and \(|N_2(j\omega)| = 0\) as we discussed before. -Then \(|H_1 N_1|^2 + |H_2 N_2|^2 = |N_1|^2\). -
- --We know that this is impossible in practice. A more realistic choice is to design \(H_2(s)\) such that when \(|N_2(j\omega)| > |N_1(j\omega)|\), we have that: -\[ |H_2 N_2|^2 = \epsilon |H_1 N_1|^2 \] -
- --Which is equivalent to have (by supposing \(|H_1| \approx 1\)): -\[ |H_2| = \sqrt{\epsilon} \frac{|N_1|}{|N_2|} \] -
- --And we have: -
-\begin{align*} - \Phi_{\hat{x}} &= \left|H_1 N_1\right|^2 + |H_2 N_2|^2 \\ - &= (1 + \epsilon) \left| H_1 N_1 \right|^2 \\ - &\approx \left|N_1\right|^2 -\end{align*} - --Similarly, we design \(H_1(s)\) such that at frequencies where \(|N_1| > |N_2|\): -\[ |H_1| = \sqrt{\epsilon} \frac{|N_2|}{|N_1|} \] -
- --For instance, is we take \(\epsilon = 1\), then the PSD of \(\hat{x}\) is increased by just by a factor \(\sqrt{2}\) over the all frequencies from the idea case. -
- --We use this as the weighting functions for the \(\mathcal{H}_\infty\) synthesis of the complementary filters. -
- --The weighting function and the obtained complementary filters are shown in Fig. 10. -
- -epsilon = 2; - -W1b = 1/epsilon*N1/N2; -W2b = 1/epsilon*N2/N1; - -W1b = W1b/(1 + s/2/pi/1000); % this is added so that it is proper --
P = [W1b -W1b; - 0 W2b; - 1 0]; --
-And we do the \(\mathcal{H}_\infty\) synthesis using the hinfsyn
command.
-
[H2b, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); --
-[H2b, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); -Test bounds: 0.0000 < gamma <= 32.8125 - - gamma hamx_eig xinf_eig hamy_eig yinf_eig nrho_xy p/f - 32.812 1.8e+01 3.4e-10 6.3e+00 -2.9e-13 0.0000 p - 16.406 1.8e+01 3.4e-10 6.3e+00 -1.2e-15 0.0000 p - 8.203 1.8e+01 3.3e-10 6.3e+00 -2.6e-13 0.0000 p - 4.102 1.8e+01 3.3e-10 6.3e+00 -2.1e-13 0.0000 p - 2.051 1.7e+01 3.4e-10 6.3e+00 -7.2e-16 0.0000 p - 1.025 1.6e+01 -1.3e+06# 6.3e+00 -8.3e-14 0.0000 f - 1.538 1.7e+01 3.4e-10 6.3e+00 -2.0e-13 0.0000 p - 1.282 1.7e+01 3.4e-10 6.3e+00 -7.9e-17 0.0000 p - 1.154 1.7e+01 3.6e-10 6.3e+00 -1.8e-13 0.0000 p - 1.089 1.7e+01 -3.4e+06# 6.3e+00 -1.7e-13 0.0000 f - 1.122 1.7e+01 -1.0e+07# 6.3e+00 -3.2e-13 0.0000 f - 1.138 1.7e+01 -1.3e+08# 6.3e+00 -1.8e-13 0.0000 f - 1.146 1.7e+01 3.2e-10 6.3e+00 -3.0e-13 0.0000 p - 1.142 1.7e+01 5.5e-10 6.3e+00 -2.8e-13 0.0000 p - 1.140 1.7e+01 -1.5e-10 6.3e+00 -2.3e-13 0.0000 p - 1.139 1.7e+01 -4.8e+08# 6.3e+00 -6.2e-14 0.0000 f - 1.139 1.7e+01 1.3e-09 6.3e+00 -8.9e-17 0.0000 p - - Gamma value achieved: 1.1390 -- -
H1b = 1 - H2b; --
PSD_Hb = abs(squeeze(freqresp(N1*H1b, freqs, 'Hz'))).^2+abs(squeeze(freqresp(N2*H2b, freqs, 'Hz'))).^2; -CPS_Hb = 1/pi*cumtrapz(2*pi*freqs, PSD_Hb); --
Wp = 0.56*(inv(N1)+inv(N2))/(1 + s/2/pi/1000); - -W1c = N1*Wp; -W2c = N2*Wp; --
P = [W1c -W1c; - 0 W2c; - 1 0]; --
-And we do the \(\mathcal{H}_\infty\) synthesis using the hinfsyn
command.
-
[H2c, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); --
-[H2c, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); -Test bounds: 0.0000 < gamma <= 36.7543 - - gamma hamx_eig xinf_eig hamy_eig yinf_eig nrho_xy p/f - 36.754 5.7e+00 -1.0e-13 6.3e+00 -6.2e-25 0.0000 p - 18.377 5.7e+00 -1.4e-12 6.3e+00 -1.8e-13 0.0000 p - 9.189 5.7e+00 -4.3e-13 6.3e+00 -4.7e-15 0.0000 p - 4.594 5.7e+00 -9.4e-13 6.3e+00 -4.7e-15 0.0000 p - 2.297 5.7e+00 -1.3e-16 6.3e+00 -6.8e-14 0.0000 p - 1.149 5.7e+00 -1.6e-17 6.3e+00 -1.5e-15 0.0000 p - 0.574 5.7e+00 -5.2e+02# 6.3e+00 -5.9e-14 0.0000 f - 0.861 5.7e+00 -3.1e+04# 6.3e+00 -3.8e-14 0.0000 f - 1.005 5.7e+00 -1.6e-12 6.3e+00 -1.1e-14 0.0000 p - 0.933 5.7e+00 -1.1e+05# 6.3e+00 -7.2e-14 0.0000 f - 0.969 5.7e+00 -3.3e+05# 6.3e+00 -5.6e-14 0.0000 f - 0.987 5.7e+00 -1.2e+06# 6.3e+00 -4.5e-15 0.0000 f - 0.996 5.7e+00 -6.5e-16 6.3e+00 -1.7e-15 0.0000 p - 0.992 5.7e+00 -2.9e+06# 6.3e+00 -6.1e-14 0.0000 f - 0.994 5.7e+00 -9.7e+06# 6.3e+00 -3.0e-16 0.0000 f - 0.995 5.7e+00 -8.0e-10 6.3e+00 -1.9e-13 0.0000 p - 0.994 5.7e+00 -2.3e+07# 6.3e+00 -4.3e-14 0.0000 f - - Gamma value achieved: 0.9949 -- -
H1c = 1 - H2c; --
PSD_Hc = abs(squeeze(freqresp(N1*H1c, freqs, 'Hz'))).^2+abs(squeeze(freqresp(N2*H2c, freqs, 'Hz'))).^2; -CPS_Hc = 1/pi*cumtrapz(2*pi*freqs, PSD_Hc); --
-The three methods are now compared. -
- --The Power Spectral Density of the super sensors obtained with the complementary filters designed using the three methods are shown in Fig. 12. -
- --The Cumulative Power Spectrum for the same sensors are shown on Fig. 13. -
- --The RMS value of the obtained super sensors are shown on table 1. -
- -- | rms value | -
---|---|
Sensor 1 | -1.3e-03 | -
Sensor 2 | -1.3e-03 | -
H2 Fusion | -1.2e-04 | -
H-Infinity a | -2.4e-04 | -
H-Infinity b | -1.4e-04 | -
H-Infinity c | -2.2e-04 | -
We would like to verify if the obtained sensor fusion architecture is robust to change in the sensor dynamics.
@@ -1080,13 +345,13 @@ Two weights \(w_1(s)\) and \(w_2(s)\) are used to described the amplitude of theomegac = 100*2*pi; G0 = 0.1; Ginf = 10; -w1 = (Ginf*s/omegac + G0)/(s/omegac + 1); +omegac = 100*2*pi; G0 = 0.1; Ginf = 10; +w1 = (Ginf*s/omegac + G0)/(s/omegac + 1); -omegac = 0.2*2*pi; G0 = 5; Ginf = 0.1; -w2 = (Ginf*s/omegac + G0)/(s/omegac + 1); -omegac = 5000*2*pi; G0 = 1; Ginf = 50; -w2 = w2*(Ginf*s/omegac + G0)/(s/omegac + 1); +omegac = 0.2*2*pi; G0 = 5; Ginf = 0.1; +w2 = (Ginf*s/omegac + G0)/(s/omegac + 1); +omegac = 5000*2*pi; G0 = 1; Ginf = 50; +w2 = w2*(Ginf*s/omegac + G0)/(s/omegac + 1);
G1 = 1 + w1*ultidyn('Delta',[1 1]); -G2 = 1 + w2*ultidyn('Delta',[1 1]); +G1 = 1 + w1*ultidyn('Delta',[1 1]); +G2 = 1 + w2*ultidyn('Delta',[1 1]);
The super sensor uncertain model is defined below using the complementary filters obtained with the \(\mathcal{H}_2\) synthesis. -The dynamical uncertainty bounds of the super sensor is shown in Fig. 14. +The dynamical uncertainty bounds of the super sensor is shown in Fig. 8. Right Half Plane zero might be introduced in the super sensor dynamics which will render the feedback system unstable.
Gss = G1*H1 + G2*H2; +Gss = G1*H1 + G2*H2;
From the above complementary filter design with the \(\mathcal{H}_2\) and \(\mathcal{H}_\infty\) synthesis, it still seems that the \(\mathcal{H}_2\) synthesis gives the complementary filters that permits to obtain the minimal super sensor noise (when measuring with the \(\mathcal{H}_2\) norm).
@@ -1133,11 +398,11 @@ However, the synthesis does not take into account the robustness of the sensor fWe initially considered perfectly known sensor dynamics so that it can be perfectly inverted. @@ -1145,14 +410,14 @@ We initially considered perfectly known sensor dynamics so that it can be perfec
We now take into account the fact that the sensor dynamics is only partially known. -To do so, we model the uncertainty that we have on the sensor dynamics by multiplicative input uncertainty as shown in Fig. 15. +To do so, we model the uncertainty that we have on the sensor dynamics by multiplicative input uncertainty as shown in Fig. 9.
--
Figure 15: Sensor fusion architecture with sensor dynamics uncertainty
+Figure 9: Sensor fusion architecture with sensor dynamics uncertainty
@@ -1166,19 +431,19 @@ The Matlab scripts is accessible here<
In practical systems, the sensor dynamics has always some level of uncertainty. -Let's represent that with multiplicative input uncertainty as shown on figure 15. +Let’s represent that with multiplicative input uncertainty as shown on figure 9.
--
Figure 16: Fusion of two sensors with input multiplicative uncertainty
+Figure 10: Fusion of two sensors with input multiplicative uncertainty
@@ -1197,7 +462,7 @@ We see that as soon as we have some uncertainty in the sensor dynamics, we have
-The uncertainty set of the transfer function from \(\hat{x}\) to \(x\) at frequency \(\omega\) is bounded in the complex plane by a circle centered on 1 and with a radius equal to \(|w_1(j\omega) H_1(j\omega)| + |w_2(j\omega) H_2(j\omega)|\) (figure 17). +The uncertainty set of the transfer function from \(\hat{x}\) to \(x\) at frequency \(\omega\) is bounded in the complex plane by a circle centered on 1 and with a radius equal to \(|w_1(j\omega) H_1(j\omega)| + |w_2(j\omega) H_2(j\omega)|\) (figure 11).
@@ -1206,16 +471,16 @@ We then have that the angle introduced by the super sensor is bounded by \(\arcs
--
Figure 17: Maximum phase variation
+Figure 11: Maximum phase variation
Let say we want to merge two sensors: @@ -1230,39 +495,39 @@ We define the weights that are used to characterize the dynamic uncertainty of t
omegac = 100*2*pi; G0 = 0.1; Ginf = 10; -w1 = (Ginf*s/omegac + G0)/(s/omegac + 1); +omegac = 100*2*pi; G0 = 0.1; Ginf = 10; +w1 = (Ginf*s/omegac + G0)/(s/omegac + 1); -omegac = 0.2*2*pi; G0 = 5; Ginf = 0.1; -w2 = (Ginf*s/omegac + G0)/(s/omegac + 1); -omegac = 5000*2*pi; G0 = 1; Ginf = 50; -w2 = w2*(Ginf*s/omegac + G0)/(s/omegac + 1); +omegac = 0.2*2*pi; G0 = 5; Ginf = 0.1; +w2 = (Ginf*s/omegac + G0)/(s/omegac + 1); +omegac = 5000*2*pi; G0 = 1; Ginf = 50; +w2 = w2*(Ginf*s/omegac + G0)/(s/omegac + 1);
-From the weights, we define the uncertain transfer functions of the sensors. Some of the uncertain dynamics of both sensors are shown on Fig. 18 with the upper and lower bounds on the magnitude and on the phase. +From the weights, we define the uncertain transfer functions of the sensors. Some of the uncertain dynamics of both sensors are shown on Fig. 12 with the upper and lower bounds on the magnitude and on the phase.
G1 = 1 + w1*ultidyn('Delta',[1 1]); -G2 = 1 + w2*ultidyn('Delta',[1 1]); +G1 = 1 + w1*ultidyn('Delta',[1 1]); +G2 = 1 + w2*ultidyn('Delta',[1 1]);
-The uncertainty region of the super sensor dynamics is represented by a circle in the complex plane as shown in Fig. 17. +The uncertainty region of the super sensor dynamics is represented by a circle in the complex plane as shown in Fig. 11.
@@ -1275,7 +540,7 @@ Thus, the phase shift \(\Delta\phi(\omega)\) due to the super sensor uncertainty
-Let's define some allowed frequency depend phase shift \(\Delta\phi_\text{max}(\omega) > 0\) such that: +Let’s define some allowed frequency depend phase shift \(\Delta\phi_\text{max}(\omega) > 0\) such that: \[ |\Delta\phi(\omega)| < \Delta\phi_\text{max}(\omega), \quad \forall\omega \]
@@ -1291,15 +556,15 @@ The maximum phase shift due to dynamic uncertainty at frequency \(\omega\) will-We know try to express this requirement in terms of an \(\mathcal{H}_\infty\) norm. +We now try to express this requirement in terms of an \(\mathcal{H}_\infty\) norm.
-Let's define one weight \(w_\phi(s)\) that represents the maximum wanted phase uncertainty: +Let’s define one weight \(w_\phi(s)\) that represents the maximum wanted phase uncertainty: \[ |w_{\phi}(j\omega)|^{-1} \approx \sin(\Delta\phi_{\text{max}}(\omega)), \quad \forall\omega \]
@@ -1316,7 +581,7 @@ Then: Which is approximately equivalent to (with an error of maximum \(\sqrt{2}\)): \begin{equation} -\label{org58312d5} +\label{org559e8db} \left\| \begin{matrix} w_1(s) w_\phi(s) H_1(s) \\ w_2(s) w_\phi(s) H_2(s) \end{matrix} \right\|_\infty < 1 \end{equation} @@ -1327,73 +592,73 @@ Thus, at these frequencies, \(|w_\phi|\) should be smaller than \(1\).-Let's define \(w_\phi(s)\) in order to bound the maximum allowed phase uncertainty \(\Delta\phi_\text{max}\) of the super sensor dynamics. -The magnitude \(|w_\phi(j\omega)|\) is shown in Fig. 19 and the corresponding maximum allowed phase uncertainty of the super sensor dynamics of shown in Fig. 20. +Let’s define \(w_\phi(s)\) in order to bound the maximum allowed phase uncertainty \(\Delta\phi_\text{max}\) of the super sensor dynamics. +The magnitude \(|w_\phi(j\omega)|\) is shown in Fig. 13 and the corresponding maximum allowed phase uncertainty of the super sensor dynamics of shown in Fig. 14.
Dphi = 20; % [deg] +Dphi = 20; % [deg] -n = 4; w0 = 2*pi*900; G0 = 1/sin(Dphi*pi/180); Ginf = 1/100; Gc = 1; -wphi = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/Ginf)^(2/n)))*s + (G0/Gc)^(1/n))/((1/Ginf)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/Ginf)^(2/n)))*s + (1/Gc)^(1/n)))^n; +n = 4; w0 = 2*pi*900; G0 = 1/sin(Dphi*pi/180); Ginf = 1/100; Gc = 1; +wphi = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/Ginf)^(2/n)))*s + (G0/Gc)^(1/n))/((1/Ginf)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/Ginf)^(2/n)))*s + (1/Gc)^(1/n)))^n; -W1 = w1*wphi; -W2 = w2*wphi; +W1 = w1*wphi; +W2 = w2*wphi;
-
Figure 19: Magnitude of the weght \(w_\phi(s)\) that is used to bound the uncertainty of the super sensor (png, pdf)
+Figure 13: Magnitude of the weght \(w_\phi(s)\) that is used to bound the uncertainty of the super sensor (png, pdf)
-
Figure 20: Maximum wanted phase uncertainty using this weight (png, pdf)
+Figure 14: Maximum wanted phase uncertainty using this weight (png, pdf)
-The obtained upper bounds on the complementary filters in order to limit the phase uncertainty of the super sensor are represented in Fig. 21. +The obtained upper bounds on the complementary filters in order to limit the phase uncertainty of the super sensor are represented in Fig. 15.
--
Figure 21: Upper bounds on the complementary filters set in order to limit the maximum phase uncertainty of the super sensor to 30 degrees until 500Hz (png, pdf)
+Figure 15: Upper bounds on the complementary filters set in order to limit the maximum phase uncertainty of the super sensor to 30 degrees until 500Hz (png, pdf)
-The \(\mathcal{H}_\infty\) synthesis architecture used for the complementary filters is shown in Fig. 22. +The \(\mathcal{H}_\infty\) synthesis architecture used for the complementary filters is shown in Fig. 16.
--
Figure 22: Architecture used for \(\mathcal{H}_\infty\) synthesis of complementary filters
+Figure 16: Architecture used for \(\mathcal{H}_\infty\) synthesis of complementary filters
The generalized plant is defined below.
P = [W1 -W1; - 0 W2; - 1 0]; +P = [W1 -W1; + 0 W2; + 1 0];
hinfsyn
command.
[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); +[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
H1 = 1 - H2; +H1 = 1 - H2;
-The obtained complementary filters are shown in Fig. 23. +The obtained complementary filters are shown in Fig. 17.
--We can now compute the uncertainty of the super sensor. The result is shown in Fig. 24. +We can now compute the uncertainty of the super sensor. The result is shown in Fig. 18.
Gss = G1*H1 + G2*H2; +Gss = G1*H1 + G2*H2;
-We now compute the obtain Power Spectral Density of the super sensor's noise. +We now compute the obtain Power Spectral Density of the super sensor’s noise. The noise characteristics of both individual sensor are defined below.
omegac = 100*2*pi; G0 = 1e-5; Ginf = 1e-4; -N1 = (Ginf*s/omegac + G0)/(s/omegac + 1)/(1 + s/2/pi/100); +omegac = 100*2*pi; G0 = 1e-5; Ginf = 1e-4; +N1 = (Ginf*s/omegac + G0)/(s/omegac + 1)/(1 + s/2/pi/100); -omegac = 1*2*pi; G0 = 1e-3; Ginf = 1e-8; -N2 = ((sqrt(Ginf)*s/omegac + sqrt(G0))/(s/omegac + 1))^2/(1 + s/2/pi/4000)^2; +omegac = 1*2*pi; G0 = 1e-3; Ginf = 1e-8; +N2 = ((sqrt(Ginf)*s/omegac + sqrt(G0))/(s/omegac + 1))^2/(1 + s/2/pi/4000)^2;
-The PSD of both sensor and of the super sensor is shown in Fig. 25. -The CPS of both sensor and of the super sensor is shown in Fig. 26. +The PSD of both sensor and of the super sensor is shown in Fig. 19. +The CPS of both sensor and of the super sensor is shown in Fig. 20.
-Using the \(\mathcal{H}_\infty\) synthesis, the dynamical uncertainty of the super sensor can be bounded to acceptable values. @@ -1530,11 +795,11 @@ However, the RMS of the super sensor noise is not optimized as it was the case w
@@ -1543,8 +808,8 @@ The Matlab scripts is accessible
-
The goal is to design complementary filters such that:
@@ -1564,20 +829,20 @@ The Matlab function for that is
We define the weights that are used to characterize the dynamic uncertainty of the sensors. This will be used for the \(\mathcal{H}_\infty\) part of the synthesis.
-Both dynamical uncertainty and noise characteristics of the individual sensors are shown in Fig. 27.
+Both dynamical uncertainty and noise characteristics of the individual sensors are shown in Fig. 21.
We design weights for the \(\mathcal{H}_\infty\) part of the synthesis in order to limit the dynamical uncertainty of the super sensor.
-The maximum wanted multiplicative uncertainty is shown in Fig. 28. The idea here is that we don't really need low uncertainty at low frequency but only near the crossover frequency that is suppose to be around 300Hz here.
+The maximum wanted multiplicative uncertainty is shown in Fig. 22. The idea here is that we don’t really need low uncertainty at low frequency but only near the crossover frequency that is suppose to be around 300Hz here.
Figure 28: Wanted maximum module uncertainty of the super sensor (png, pdf) Figure 22: Wanted maximum module uncertainty of the super sensor (png, pdf)
-The equivalent Magnitude and Phase uncertainties are shown in Fig. 29.
+The equivalent Magnitude and Phase uncertainties are shown in Fig. 23.
-The synthesis architecture that is used here is shown in Fig. 30.
+The synthesis architecture that is used here is shown in Fig. 24.
@@ -1658,10 +923,10 @@ The controller \(K\) is synthesized such that it:
-
Figure 30: Mixed H2/H-Infinity Synthesis Figure 24: Mixed H2/H-Infinity Synthesis
@@ -1677,7 +942,7 @@ Then:
-The mixed $\mathcal{H}2$/\(\mathcal{H}_\infty\) synthesis is performed below.
+The mixed \(\mathcal{H}_2/\mathcal{H}_\infty\) synthesis is performed below.
-The obtained complementary filters are shown in Fig. 31.
+The obtained complementary filters are shown in Fig. 25.
-The PSD and CPS of the super sensor's noise are shown in Fig. 32 and Fig. 33 respectively.
+The PSD and CPS of the super sensor’s noise are shown in Fig. 26 and Fig. 27 respectively.
-The uncertainty on the super sensor's dynamics is shown in Fig. 34.
+The uncertainty on the super sensor’s dynamics is shown in Fig. 28.
This synthesis methods allows both to:
@@ -1788,1476 +1053,19 @@ This synthesis methods allows both to:
-The following matlab scripts was written by Mohit.
-
-We define the weights that are used to characterize the dynamic uncertainty of the sensors. This will be used for the \(\mathcal{H}_\infty\) part of the synthesis.
-
-We define the noise characteristics of the two sensors by choosing \(N_1\) and \(N_2\). This will be used for the \(\mathcal{H}_2\) part of the synthesis.
-
-The weights for the \(\mathcal{H}_2\) and \(\mathcal{H}_\infty\) part are defined below.
-
-We are using the CVX toolbox to solve the optimization problem.
-
-We first put the generalized plant in a State-space form.
-
-We Define all the variables.
-
-We define the minimization objective.
-
-The \(\mathcal{H}_\infty\) constraint.
-
-The \(\mathcal{H}_2\) constraint.
-
-And we run the optimization.
-
-Finally, we can compute the obtained complementary filters.
-
-The Mixed \(\mathcal{H}_2\) / \(\mathcal{H}_\infty\) Synthesis is performed below.
-
-The obtained filters are compare with the one obtained using the CVX toolbox in Fig. [[]].
-
-The Matlab scripts is accessible here.
-
-The idea is to use only the \(\mathcal{H}_\infty\) norm to express both the maximum wanted super sensor uncertainty and the fact that we want to minimize the super sensor's noise.
-
-For performance, we may want to obtain a super sensor's noise that is close to the minimum of the individual sensor noises.
-
-The noise of the super sensor is:
-\[ |N_{ss}(j\omega)|^2 = | H_1(j\omega) N_1(j\omega) |^2 + | H_2(j\omega) N_2(j\omega) |^2 \quad \forall\omega \]
-
-The minimum noise that we can obtain follows the minimum noise of the individual sensor:
-
-To do so, we want to design the complementary filters such that:
-
-For the uncertainty of the super sensor.
-The equivalent super sensor uncertainty is:
-\[ |w_{ss}(j\omega)| = |H_1(j\omega) w_1(j\omega)| + |H_2(j\omega) w_2(j\omega)|, \quad \forall\omega \]
-
-The minimum uncertainty that we can obtain follows the minimum uncertainty of the individual sensor:
-
-To do so, we want to design the complementary filters such that:
-
-Of course, the conditions for performance and uncertainty may not be compatible.
-
-We may not want to follow the minimum uncertainty.
-
-Uncertainty on the individual sensors:
-
-Noise level of the individual sensors:
-
-We design weights that are used to describe the wanted upper bound on the super sensor's noise and super sensor's uncertainty.
-
-Weight on the uncertainty:
-
-Weight on the performance:
-
-The noise and uncertainty weights of the individual sensors and the asked noise/uncertainty of the super sensor are displayed in Fig. 42.
-
- Figure 42: Upper bounds on the super sensor's noise and super sensor's uncertainty (png, pdf)
-The corresponding maximum norms of the filters to have the perf/robust asked are shown in Fig. 43.
-
-We do the \(\mathcal{H}_\infty\) synthesis with 4 weights and 4 outputs.
-
-And we do the \(\mathcal{H}_\infty\) synthesis using the
-The obtained complementary filters with the upper bounds are shown in Fig. 44.
-
-The \(\mathcal{H}_\infty\) synthesis has been used to design complementary filters that permits to robustly merge sensors while ensuring a maximum noise level.
-However, no guarantee is made that the RMS value of the super sensor's noise is minimized.
-
-The goal here is to find the parameters of a single sensor that would best represent a super sensor.
-
-Let consider figure 48 where two sensors are merged.
-The dynamic uncertainty of each sensor is represented by a weight \(w_i(s)\), the frequency characteristics each of the sensor noise is represented by the weights \(N_i(s)\).
-The noise sources \(\tilde{n}_i\) are considered to be white noise: \(\Phi_{\tilde{n}_i}(\omega) = 1, \ \forall\omega\).
-
-To the dynamics of the super sensor is:
-
-And the noise of the super sensor is:
-
-At each frequency \(\omega\), the uncertainty set of the super sensor shown on figure 48 is a circle centered on \(1\) with a radius equal to \(|H_1(j\omega) w_1(j\omega)| + |H_2(j\omega) w_2(j\omega)|\) on the complex plane.
-The uncertainty set of the sensor shown on figure 49 is a circle centered on \(1\) with a radius equal to \(|w_{ss}(j\omega)|\) on the complex plane.
-
-Ideally, we want to find a weight \(w_{ss}(s)\) so that:
-
-\[ |w_{ss}(j\omega)| = |H_1(j\omega) w_1(j\omega)| + |H_2(j\omega) w_2(j\omega)|, \quad \forall\omega \]
-
-The PSD of the estimation \(\hat{x}\) when \(x = 0\) of the configuration shown on figure 48 is:
-
-The PSD of the estimation \(\hat{x}\) when \(x = 0\) of the configuration shown on figure 49 is:
-
-Ideally, we want to find a weight \(N_{ss}(s)\) such that:
-
-\[ |N_{ss}(j\omega)|^2 = | H_1(j\omega) N_1(j\omega) |^2 + | H_2(j\omega) N_2(j\omega) |^2 \quad \forall\omega \]
-
-We could choose
-
-But we would have:
-
-and
-
-Here are the steps in order to apply optimal and robust sensor fusion:
-
-The technique to estimate the sensor noise is taken from barzilai98_techn_measur_noise_sensor_presen.
-
-Let's consider two sensors (sensor 1 and sensor 2) that are measuring the same quantity \(x\) as shown in figure 50.
-
- Figure 50: Huddle test block diagram
-Each sensor has uncorrelated noise \(n_1\) and \(n_2\) and internal dynamics \(G_1(s)\) and \(G_2(s)\) respectively.
-
-We here suppose that each sensor has the same magnitude of instrumental noise: \(n_1 = n_2 = n\).
-We also assume that their dynamics is ideal: \(G_1(s) = G_2(s) = 1\).
-
-We then have:
-
-Since the input signal \(x\) and the instrumental noise \(n\) are incoherent:
-
-From equations \eqref{orgac9254d} and \eqref{org86d1282}, we finally obtain
-
-For further complementary filter synthesis, it is preferred to consider a normalized noise source \(\tilde{n}\) that has a PSD equal to one (\(\Phi_{\tilde{n}}(\omega) = 1\)) and to use a weighting filter \(N(s)\) in order to represent the frequency dependence of the noise.
-
-The weighting filter \(N(s)\) should be designed such that:
-
-These weighting filters can then be used to compare the noise level of sensors for the synthesis of complementary filters.
-
-The sensor with a normalized noise input is shown in figure 51.
-
- Figure 51: One sensor with normalized noise
-Once the noise of the sensors to be merged have been characterized, the power spectral density of both sensors have to be compared.
-
-Ideally, the PSD of the noise are such that:
-
-The coherence between signals \(x\) and \(y\) is defined as follow
-\[ \gamma^2_{xy}(\omega) = \frac{|\Phi_{xy}(\omega)|^2}{|\Phi_{x}(\omega)| |\Phi_{y}(\omega)|} \]
-where \(|\Phi_x(\omega)|\) is the output Power Spectral Density (PSD) of signal \(x\) and \(|\Phi_{xy}(\omega)|\) is the Cross Spectral Density (CSD) of signal \(x\) and \(y\).
-
-The PSD and CSD are defined as follow:
-
-where:
-
-Let's consider one sensor represented on figure 52.
-
-The dynamic uncertainty is represented by an input multiplicative uncertainty where \(w(s)\) is a weight that represents the level of the uncertainty.
-
-The goal is to accurately determine \(w(s)\) for the sensors that have to be merged.
-
- Figure 52: Sensor with dynamic uncertainty
-Once the noise characteristics and dynamic uncertainty of both sensors have been determined and we have determined the following weighting functions:
-
-The goal is to design complementary filters \(H_1(s)\) and \(H_2(s)\) shown in figure 48 such that:
-
- Figure 53: Sensor fusion architecture with sensor dynamics uncertainty
-All the files (data and Matlab scripts) are accessible here.
-
-First order complementary filters are defined with following equations:
-
-Their bode plot is shown figure 54.
-
-We here use analytical formula for the complementary filters \(H_L\) and \(H_H\).
-
-The first two formulas that are used to generate complementary filters are:
-
-where:
-
-This is illustrated on figure 55.
-The slope of those filters at high and low frequencies is \(-2\) and \(2\) respectively for \(H_L\) and \(H_H\).
-
- Figure 55: Effect of the parameter \(\alpha\) on the shape of the generated second order complementary filters (png, pdf)
-We now study the maximum norm of the filters function of the parameter \(\alpha\). As we saw that the maximum norm of the filters is important for the robust merging of filters.
-
-The following formula gives complementary filters with slopes of \(-3\) and \(3\):
-
-The parameters are:
-
-The filters are defined below and the result is shown on figure 57.
-
-All the files (data and Matlab scripts) are accessible here.
-
-We here synthesize the complementary filters using the \(\mathcal{H}_\infty\) synthesis.
-The goal is to specify upper bounds on the norms of \(H_L\) and \(H_H\) while ensuring their complementary property (\(H_L + H_H = 1\)).
-
-In order to do so, we use the generalized plant shown on figure 58 where \(w_L\) and \(w_H\) weighting transfer functions that will be used to shape \(H_L\) and \(H_H\) respectively.
-
- Figure 58: Generalized plant used for the \(\mathcal{H}_\infty\) synthesis of the complementary filters
-The \(\mathcal{H}_\infty\) synthesis applied on this generalized plant will give a transfer function \(H_L\) (figure 59) such that the \(\mathcal{H}_\infty\) norm of the transfer function from \(w\) to \([z_H,\ z_L]\) is less than one:
-\[ \left\| \begin{array}{c} H_L w_L \\ (1 - H_L) w_H \end{array} \right\|_\infty < 1 \]
-
-Thus, if the above condition is verified, we can define \(H_H = 1 - H_L\) and we have that:
-\[ \left\| \begin{array}{c} H_L w_L \\ H_H w_H \end{array} \right\|_\infty < 1 \]
-Which is almost (with an maximum error of \(\sqrt{2}\)) equivalent to:
-
-We then see that \(w_L\) and \(w_H\) can be used to shape both \(H_L\) and \(H_H\) while ensuring (by definition of \(H_H = 1 - H_L\)) their complementary property.
-
- Figure 59: \(\mathcal{H}_\infty\) synthesis of the complementary filters
-We define the generalized plant \(P\) on matlab.
-
-And we do the \(\mathcal{H}_\infty\) synthesis using the
-We then define the high pass filter \(H_H = 1 - H_L\). The bode plot of both \(H_L\) and \(H_H\) is shown on figure 61.
-
-The idea is here to use the fact that in a classical feedback architecture, \(S + T = 1\), in order to design complementary filters.
-
-Thus, all the tools that has been developed for classical feedback control can be used for complementary filter design.
-
-All the files (data and Matlab scripts) are accessible here.
-
- Figure 62: Architecture used to generate the complementary filters
-We have:
-\[ y = \underbrace{\frac{L}{L + 1}}_{H_L} y_1 + \underbrace{\frac{1}{L + 1}}_{H_H} y_2 \]
-with \(H_L + H_H = 1\).
-
-The only thing to design is \(L\) such that the complementary filters are stable with the wanted shape.
-
-A simple choice is:
-\[ L = \left(\frac{\omega_c}{s}\right)^2 \frac{\frac{s}{\omega_c / \alpha} + 1}{\frac{s}{\omega_c} + \alpha} \]
-
-Which contains two integrator and a lead. \(\omega_c\) is used to tune the crossover frequency and \(\alpha\) the trade-off "bump" around blending frequency and filtering away from blending frequency.
-
-min15_compl_filter_desig_angle_estim
-
-corke04_inert_visual_sensin_system_small_auton_helic
-
-Analytical Formula found in the literature provides either no parameter for tuning the robustness / performance trade-off.
-
-The generated complementary filters using \(\mathcal{H}_\infty\) and the analytical formulas are very close to each other. However there is some difference to note here:
-
-
-3.1 Mixed \(\mathcal{H}_2\) / \(\mathcal{H}_\infty\) Synthesis - Introduction
+3.1 Mixed \(\mathcal{H}_2\) / \(\mathcal{H}_\infty\) Synthesis - Introduction
h2hinfsyn
(
-3.2 Noise characteristics and Uncertainty of the individual sensors
+3.2 Noise characteristics and Uncertainty of the individual sensors
omegac = 100*2*pi; G0 = 0.1; Ginf = 10;
-w1 = (Ginf*s/omegac + G0)/(s/omegac + 1);
+
omegac = 100*2*pi; G0 = 0.1; Ginf = 10;
+w1 = (Ginf*s/omegac + G0)/(s/omegac + 1);
-omegac = 0.2*2*pi; G0 = 5; Ginf = 0.1;
-w2 = (Ginf*s/omegac + G0)/(s/omegac + 1);
-omegac = 5000*2*pi; G0 = 1; Ginf = 50;
-w2 = w2*(Ginf*s/omegac + G0)/(s/omegac + 1);
+omegac = 0.2*2*pi; G0 = 5; Ginf = 0.1;
+w2 = (Ginf*s/omegac + G0)/(s/omegac + 1);
+omegac = 5000*2*pi; G0 = 1; Ginf = 50;
+w2 = w2*(Ginf*s/omegac + G0)/(s/omegac + 1);
omegac = 100*2*pi; G0 = 1e-5; Ginf = 1e-4;
-N1 = (Ginf*s/omegac + G0)/(s/omegac + 1)/(1 + s/2/pi/100);
+
omegac = 100*2*pi; G0 = 1e-5; Ginf = 1e-4;
+N1 = (Ginf*s/omegac + G0)/(s/omegac + 1)/(1 + s/2/pi/100);
-omegac = 1*2*pi; G0 = 1e-3; Ginf = 1e-8;
-N2 = ((sqrt(Ginf)*s/omegac + sqrt(G0))/(s/omegac + 1))^2/(1 + s/2/pi/4000)^2;
+omegac = 1*2*pi; G0 = 1e-3; Ginf = 1e-8;
+N2 = ((sqrt(Ginf)*s/omegac + sqrt(G0))/(s/omegac + 1))^2/(1 + s/2/pi/4000)^2;
3.3 Weighting Functions on the uncertainty of the super sensor
+3.3 Weighting Functions on the uncertainty of the super sensor
n = 4; w0 = 2*pi*900; G0 = 9; G1 = 1; Gc = 1.1;
-H = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n;
-wphi = 0.2*(s+3.142e04)/(s+628.3)/H;
+
n = 4; w0 = 2*pi*900; G0 = 9; G1 = 1; Gc = 1.1;
+H = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n;
+wphi = 0.2*(s+3.142e04)/(s+628.3)/H;
3.4 Mixed Synthesis Architecture
+3.4 Mixed Synthesis Architecture
@@ -1693,89 +958,89 @@ which is what we wanted.
We define the generalized plant that will be used for the mixed synthesis.
W1u = ss(w1*wphi); W2u = ss(w2*wphi); % Weight on the uncertainty
-W1n = ss(N1); W2n = ss(N2); % Weight on the noise
+
W1u = ss(w1*wphi); W2u = ss(w2*wphi); % Weight on the uncertainty
+W1n = ss(N1); W2n = ss(N2); % Weight on the noise
-P = [W1u -W1u;
- 0 W2u;
- W1n -W1n;
- 0 W2n;
- 1 0];
+P = [W1u -W1u;
+ 0 W2u;
+ W1n -W1n;
+ 0 W2n;
+ 1 0];
3.5 Mixed \(\mathcal{H}_2\) / \(\mathcal{H}_\infty\) Synthesis
+3.5 Mixed \(\mathcal{H}_2\) / \(\mathcal{H}_\infty\) Synthesis
Nmeas = 1; Ncon = 1; Nz2 = 2;
+
Nmeas = 1; Ncon = 1; Nz2 = 2;
-[H2,~,normz,~] = h2hinfsyn(P, Nmeas, Ncon, Nz2, [0, 1], 'HINFMAX', 1, 'H2MAX', Inf, 'DKMAX', 100, 'TOL', 0.01, 'DISPLAY', 'on');
+[H2,~,normz,~] = h2hinfsyn(P, Nmeas, Ncon, Nz2, [0, 1], 'HINFMAX', 1, 'H2MAX', Inf, 'DKMAX', 100, 'TOL', 0.01, 'DISPLAY', 'on');
-H1 = 1 - H2;
+H1 = 1 - H2;
3.6 Obtained Super Sensor's noise
+3.6 Obtained Super Sensor’s noise
3.7 Obtained Super Sensor's Uncertainty
+3.7 Obtained Super Sensor’s Uncertainty
3.8 Conclusion
+3.8 Conclusion
4 Mixed Synthesis - LMI Optimization
-4.1 Introduction
-4.2 Noise characteristics and Uncertainty of the individual sensors
-omegac = 100*2*pi; G0 = 0.1; Ginf = 10;
-w1 = (Ginf*s/omegac + G0)/(s/omegac + 1);
-
-omegac = 0.2*2*pi; G0 = 5; Ginf = 0.1;
-w2 = (Ginf*s/omegac + G0)/(s/omegac + 1);
-omegac = 5000*2*pi; G0 = 1; Ginf = 50;
-w2 = w2*(Ginf*s/omegac + G0)/(s/omegac + 1);
-
-omegac = 100*2*pi; G0 = 1e-5; Ginf = 1e-4;
-N1 = (Ginf*s/omegac + G0)/(s/omegac + 1)/(1 + s/2/pi/100);
-
-omegac = 1*2*pi; G0 = 1e-3; Ginf = 1e-8;
-N2 = ((sqrt(Ginf)*s/omegac + sqrt(G0))/(s/omegac + 1))^2/(1 + s/2/pi/4000)^2;
-
-4.3 Weights
-n = 4; w0 = 2*pi*900; G0 = 9; G1 = 1; Gc = 1.1;
-H = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n;
-wphi = 0.2*(s+3.142e04)/(s+628.3)/H;
-
-W1u = ss(w1*wphi); W2u = ss(w2*wphi); % Weight on the uncertainty
-W1n = ss(N1); W2n = ss(N2); % Weight on the noise
-
-P = [W1u -W1u;
- 0 W2u;
- W1n -W1n;
- 0 W2n;
- 1 0];
-
-4.4 LMI Optimization
-A = P.A;
-Bw = P.B(:,1);
-Bu = P.B(:,2);
-Cz1 = P.C(1:2,:); Dz1w = P.D(1:2,1); Dz1u = P.D(1:2,2); % Hinf
-Cz2 = P.C(3:4,:); Dz2w = P.D(1:2,1); Dz2u = P.D(1:2,2); % H2
-Cy = P.C(5,:); Dyw = P.D(5,1); Dyu = P.D(5,2);
-
-n = size(P.A,1);
-ny = 1; % number of measurements
-nu = 1; % number of control inputs
-nz = 2;
-nw = 1;
-
-Wtinf = 0;
-Wt2 = 1;
-
-cvx_startup;
-
-cvx_begin sdp
-cvx_quiet true
-cvx_solver sedumi
-variable X(n,n) symmetric;
-variable Y(n,n) symmetric;
-variable W(nz,nz) symmetric;
-variable Ah(n,n);
-variable Bh(n,ny);
-variable Ch(nu,n);
-variable Dh(nu,ny);
-variable eta;
-variable gam;
-
-minimize Wt2*eta+Wtinf*gam % mix objective
-subject to:
-
-gam<=1; % Keep the Hinf norm less than 1
-
-[ X, eye(n,n) ;
- eye(n,n), Y ] >= 0 ;
-
-[ A*X + Bu*Ch + X*A' + Ch'*Bu', A+Bu*Dh*Cy+Ah', Bw+Bu*Dh*Dyw, X*Cz1' + Ch'*Dz1u' ;
- (A+Bu*Dh*Cy+Ah')', Y*A + A'*Y + Bh*Cy + Cy'*Bh', Y*Bw + Bh*Dyw, (Cz1+Dz1u*Dh*Cy)' ;
- (Bw+Bu*Dh*Dyw)', Bw'*Y + Dyw'*Bh', -eye(nw,nw), (Dz1w+Dz1u*Dh*Dyw)' ;
- Cz1*X + Dz1u*Ch, Cz1+Dz1u*Dh*Cy, Dz1w+Dz1u*Dh*Dyw, -gam*eye(nz,nz)] <= 0 ;
-
-trace(W) <= eta ;
-
-[ W, Cz2*X+Dz2u*Ch, Cz2*X+Dz2u*Ch;
- X*Cz2'+Ch'*Dz2u', X, eye(n,n) ;
- (Cz2*X+Dz2u*Ch)', eye(n,n), Y ] >= 0 ;
-
-[ A*X + Bu*Ch + X*A' + Ch'*Bu', A+Bu*Dh*Cy+Ah', Bw+Bu*Dh*Dyw ;
- (A+Bu*Dh*Cy+Ah')', Y*A + A'*Y + Bh*Cy + Cy'*Bh', Y*Bw + Bh*Dyw ;
- (Bw+Bu*Dh*Dyw)', Bw'*Y + Dyw'*Bh', -eye(nw,nw)] <= 0 ;
-
-cvx_end
-cvx_status
-
-M = eye(n);
-N = inv(M)*(eye(n,n)-Y*X);
-Dk = Dh;
-Ck = (Ch-Dk*Cy*X)*inv(M');
-Bk = inv(N)*(Bh-Y*Bu*Dk);
-Ak = inv(N)*(Ah-Y*(A+Bu*Dk*Cy)*X-N*Bk*Cy*X-Y*Bu*Ck*M')*inv(M');
-
-H2 = tf(ss(Ak,Bk,Ck,Dk));
-H1 = 1 - H2;
-
-4.5 Result
-
-4.6 Comparison with the matlab Mixed Synthesis
-Nmeas = 1; Ncon = 1; Nz2 = 2;
-
-[H2m,~,normz,~] = h2hinfsyn(P, Nmeas, Ncon, Nz2, [0, 1], 'HINFMAX', 1, 'H2MAX', Inf, 'DKMAX', 100, 'TOL', 0.01, 'DISPLAY', 'on');
-
-H1m = 1 - H2m;
-
-4.7 H-Infinity Objective
-
-4.8 Obtained Super Sensor's noise
-
-5 H-Infinity synthesis to ensure both performance and robustness
-5.1 Introduction
-5.2 Dynamical uncertainty and Noise level of the individual sensors
-omegac = 100*2*pi; G0 = 0.1; Ginf = 10;
-w1 = (Ginf*s/omegac + G0)/(s/omegac + 1);
-
-omegac = 0.2*2*pi; G0 = 5; Ginf = 0.1;
-w2 = (Ginf*s/omegac + G0)/(s/omegac + 1);
-omegac = 5000*2*pi; G0 = 1; Ginf = 50;
-w2 = w2*(Ginf*s/omegac + G0)/(s/omegac + 1);
-
-omegac = 100*2*pi; G0 = 1e-5; Ginf = 1e-4;
-N1 = (Ginf*s/omegac + G0)/(s/omegac + 1)/(1 + s/2/pi/100);
-
-omegac = 1*2*pi; G0 = 1e-3; Ginf = 1e-8;
-N2 = ((sqrt(Ginf)*s/omegac + sqrt(G0))/(s/omegac + 1))^2/(1 + s/2/pi/4000)^2;
-
-5.3 Weights for uncertainty and performance
-n = 4; w0 = 2*pi*500; G0 = 6; G1 = 1; Gc = 1.1;
-H = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n;
-
-Wu = 0.2*(s+3.142e04)/(s+628.3)/H;
-
-n = 1; w0 = 2*pi*9; A = 6;
-a = sqrt(2*A^(2/n) - 1 + 2*A^(1/n)*sqrt(A^(2/n) - 1));
-G = ((1 + s/(w0/a))*(1 + s/(w0*a))/(1 + s/w0)^2)^n;
-
-n = 2; w0 = 2*pi*9; G0 = 1e-2; G1 = 1; Gc = 5e-1;
-G2 = (((1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (G0/Gc)^(1/n))/((1/G1)^(1/n)*(1/w0)*sqrt((1-(G0/Gc)^(2/n))/(1-(Gc/G1)^(2/n)))*s + (1/Gc)^(1/n)))^n;
-
-Wp = inv(G2)*inv(G)*inv(N2);
-
-5.4 H-infinity synthesis with 4 outputs corresponding to the 4 weights
-W1p = N1*Wp/(1+s/2/pi/1000); % Used to render W1p proper
-W2p = N2*Wp;
-W1u = w1*Wu;
-W2u = w2*Wu;
-
-P = [W1p -W1p;
- 0 W2p;
- W1u -W1u;
- 0 W2u;
- 1 0];
-
-hinfsyn
command.
-[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
-
-
-[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
-Resetting value of Gamma min based on D_11, D_12, D_21 terms
-
-Test bounds: 1.4139 < gamma <= 65.6899
-
- gamma hamx_eig xinf_eig hamy_eig yinf_eig nrho_xy p/f
- 65.690 1.3e+00 -6.7e-15 1.3e+00 -4.5e-13 0.0000 p
- 33.552 1.3e+00 -9.4e-15 1.3e+00 -3.7e-14 0.0000 p
- 17.483 1.3e+00 -5.6e-16 1.3e+00 -4.8e-13 0.0000 p
- 9.448 1.3e+00 -3.2e-15 1.3e+00 -1.2e-13 0.0000 p
- 5.431 1.3e+00 -2.3e-16 1.3e+00 -3.6e-13 0.0000 p
- 3.422 1.3e+00 -7.3e-16 1.3e+00 -2.6e-15 0.0000 p
- 2.418 1.3e+00 9.3e-17 1.3e+00 -3.0e-14 0.0000 p
- 1.916 1.3e+00 2.4e-17 1.3e+00 -2.2e-14 0.0000 p
- 1.665 1.3e+00 -2.5e-16 1.3e+00 -2.1e-14 0.0000 p
- 1.539 1.3e+00 -6.9e-15 1.3e+00 -5.3e-14 0.0000 p
- 1.477 1.3e+00 -2.1e-14 1.3e+00 -2.3e-13 0.0000 p
- 1.445 1.3e+00 -1.3e-16 1.3e+00 -2.6e-15 0.0000 p
- 1.430 1.3e+00 -4.9e-13 1.3e+00 -2.2e-13 0.0000 p
- 1.422 1.3e+00 -1.2e+08# 1.3e+00 -2.6e-13 0.0000 f
- 1.426 1.3e+00 -6.3e-13 1.3e+00 -3.3e-14 0.0000 p
- 1.424 1.3e+00 -3.4e+08# 1.3e+00 -4.5e-14 0.0000 f
- 1.425 1.3e+00 -1.7e+09# 1.3e+00 -5.2e-13 0.0000 f
-
- Gamma value achieved: 1.4256
-
-
-H1 = 1 - H2;
-
-5.5 Conclusion
-6 Equivalent Super Sensor
-6.1 Sensor Fusion Architecture
-6.2 Equivalent Configuration
-
-6.3 Model the uncertainty of the super sensor
-6.4 Model the noise of the super sensor
-6.5 First guess
-7 Optimal And Robust Sensor Fusion in Practice
-
-
-7.1 Measurement of the noise characteristics of the sensors
-7.1.1 Huddle Test
-7.1.2 Weights that represents the noises' PSD
-7.1.3 Comparison of the noises' PSD
-7.1.4 Computation of the coherence, power spectral density and cross spectral density of signals
-
-
-7.2 Estimate the dynamic uncertainty of the sensors
-7.3 Optimal and Robust synthesis of the complementary filters
-
-
-
-
-
-
-
-8 Methods of complementary filter synthesis
-
-8.1 Complementary filters using analytical formula
-8.1.1 Analytical 1st order complementary filters
-w0 = 2*pi; % [rad/s]
-
-Hh1 = (s/w0)/((s/w0)+1);
-Hl1 = 1/((s/w0)+1);
-
-8.1.2 Second Order Complementary Filters
-
-
-
-
-
figure;
-plot(alphas, infnorms)
-set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
-xlabel('$\alpha$'); ylabel('$\|H_1\|_\infty$');
-
-8.1.3 Third Order Complementary Filters
-
-
-
-alpha = 1;
-beta = 10;
-w0 = 2*pi*14;
-
-Hh3_ana = (s/w0)^3 * ((s/w0)^2 + (1+alpha+beta)*(s/w0) + (1+(alpha+1)*(beta+1)))/((s/w0 + 1)*((s/w0)^2+alpha*(s/w0)+1)*((s/w0)^2+beta*(s/w0)+1));
-Hl3_ana = ((1+(alpha+1)*(beta+1))*(s/w0)^2 + (1+alpha+beta)*(s/w0) + 1)/((s/w0 + 1)*((s/w0)^2+alpha*(s/w0)+1)*((s/w0)^2+beta*(s/w0)+1));
-
-8.2 H-Infinity synthesis of complementary filters
-8.2.1 Synthesis Architecture
-8.2.2 Weights
-
-8.2.3 H-Infinity Synthesis
-P = [0 wL;
- wH -wH;
- 1 0];
-
-hinfsyn
command.
-[Hl_hinf, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
-
-
-[Hl_hinf, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on');
-Test bounds: 0.0000 < gamma <= 1.7285
-
- gamma hamx_eig xinf_eig hamy_eig yinf_eig nrho_xy p/f
- 1.729 4.1e+01 8.4e-12 1.8e-01 0.0e+00 0.0000 p
- 0.864 3.9e+01 -5.8e-02# 1.8e-01 0.0e+00 0.0000 f
- 1.296 4.0e+01 8.4e-12 1.8e-01 0.0e+00 0.0000 p
- 1.080 4.0e+01 8.5e-12 1.8e-01 0.0e+00 0.0000 p
- 0.972 3.9e+01 -4.2e-01# 1.8e-01 0.0e+00 0.0000 f
- 1.026 4.0e+01 8.5e-12 1.8e-01 0.0e+00 0.0000 p
- 0.999 3.9e+01 8.5e-12 1.8e-01 0.0e+00 0.0000 p
- 0.986 3.9e+01 -1.2e+00# 1.8e-01 0.0e+00 0.0000 f
- 0.993 3.9e+01 -8.2e+00# 1.8e-01 0.0e+00 0.0000 f
- 0.996 3.9e+01 8.5e-12 1.8e-01 0.0e+00 0.0000 p
- 0.994 3.9e+01 8.5e-12 1.8e-01 0.0e+00 0.0000 p
- 0.993 3.9e+01 -3.2e+01# 1.8e-01 0.0e+00 0.0000 f
-
- Gamma value achieved: 0.9942
-
-
-Hh_hinf = 1 - Hl_hinf;
-
-8.3 Feedback Control Architecture to generate Complementary Filters
-8.3.1 Architecture
-8.3.2 Loop Gain Design
-
-8.4 Analytical Formula found in the literature
-
-
-8.4.1 Analytical Formula
-8.4.2 Matlab
-omega0 = 1*2*pi; % [rad/s]
-tau = 1/omega0; % [s]
-
-% From cite:corke04_inert_visual_sensin_system_small_auton_helic
-HL1 = 1/(s/omega0 + 1); HH1 = s/omega0/(s/omega0 + 1);
-
-% From cite:jensen13_basic_uas
-HL2 = (2*omega0*s + omega0^2)/(s+omega0)^2; HH2 = s^2/(s+omega0)^2;
-
-% From cite:shaw90_bandw_enhan_posit_measur_using_measur_accel
-HL3 = (3*tau*s + 1)/(tau*s + 1)^3; HH3 = (tau^3*s^3 + 3*tau^2*s^2)/(tau*s + 1)^3;
-
-8.4.3 Discussion
-8.5 Comparison of the different methods of synthesis
-
-
-Bibliography
+Bibliography
-
-