diff --git a/journal/figs/fusion_super_sensor.pdf b/journal/figs/fusion_super_sensor.pdf index 024effa..b79d038 100644 Binary files a/journal/figs/fusion_super_sensor.pdf and b/journal/figs/fusion_super_sensor.pdf differ diff --git a/journal/figs/fusion_super_sensor.png b/journal/figs/fusion_super_sensor.png index 018d294..8f92525 100644 Binary files a/journal/figs/fusion_super_sensor.png and b/journal/figs/fusion_super_sensor.png differ diff --git a/journal/figs/fusion_super_sensor.svg b/journal/figs/fusion_super_sensor.svg index 7b98b98..6a42df9 100644 --- a/journal/figs/fusion_super_sensor.svg +++ b/journal/figs/fusion_super_sensor.svg @@ -30,78 +30,99 @@ - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + - + - + + + + + + + + + + + + + + + + + + + @@ -136,17 +157,24 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -158,21 +186,28 @@ - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -184,138 +219,138 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -324,66 +359,66 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -395,10 +430,10 @@ - + - + diff --git a/journal/figs/sensor_fusion_dynamic_uncertainty.pdf b/journal/figs/sensor_fusion_dynamic_uncertainty.pdf index 6d5fcbc..cabdc94 100644 Binary files a/journal/figs/sensor_fusion_dynamic_uncertainty.pdf and b/journal/figs/sensor_fusion_dynamic_uncertainty.pdf differ diff --git a/journal/figs/sensor_fusion_dynamic_uncertainty.png b/journal/figs/sensor_fusion_dynamic_uncertainty.png index 83e52d4..3c97eb4 100644 Binary files a/journal/figs/sensor_fusion_dynamic_uncertainty.png and b/journal/figs/sensor_fusion_dynamic_uncertainty.png differ diff --git a/journal/figs/sensor_fusion_dynamic_uncertainty.svg b/journal/figs/sensor_fusion_dynamic_uncertainty.svg index f2247be..142faf3 100644 --- a/journal/figs/sensor_fusion_dynamic_uncertainty.svg +++ b/journal/figs/sensor_fusion_dynamic_uncertainty.svg @@ -1,345 +1,414 @@ - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + - + + + + + + + + + + - + - + - + - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - + - - - - - - + - + - + - - + - + - + - + + + + + + + + + + + - - - - - - - + - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/journal/figs/sensor_fusion_overview.pdf b/journal/figs/sensor_fusion_overview.pdf new file mode 100644 index 0000000..5006049 Binary files /dev/null and b/journal/figs/sensor_fusion_overview.pdf differ diff --git a/journal/figs/sensor_fusion_overview.png b/journal/figs/sensor_fusion_overview.png new file mode 100644 index 0000000..284bb06 Binary files /dev/null and b/journal/figs/sensor_fusion_overview.png differ diff --git a/journal/figs/sensor_fusion_overview.svg b/journal/figs/sensor_fusion_overview.svg new file mode 100644 index 0000000..1d79a59 --- /dev/null +++ b/journal/figs/sensor_fusion_overview.svg @@ -0,0 +1,316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/journal/figs/sensor_model.pdf b/journal/figs/sensor_model.pdf index 2a0240d..6f3f7a1 100644 Binary files a/journal/figs/sensor_model.pdf and b/journal/figs/sensor_model.pdf differ diff --git a/journal/figs/sensor_model.png b/journal/figs/sensor_model.png index 116a001..6bf6ba8 100644 Binary files a/journal/figs/sensor_model.png and b/journal/figs/sensor_model.png differ diff --git a/journal/figs/sensor_model.svg b/journal/figs/sensor_model.svg index bfee756..7e75592 100644 --- a/journal/figs/sensor_model.svg +++ b/journal/figs/sensor_model.svg @@ -1,5 +1,5 @@ - + @@ -24,15 +24,12 @@ - - - - + - + @@ -60,14 +57,14 @@ - + - + @@ -76,81 +73,78 @@ - + - + - - - - - - + + + + + + - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - - + + - + - - + + - + - + - + - + diff --git a/journal/figs/sensor_model_calibrated.pdf b/journal/figs/sensor_model_calibrated.pdf index 4543988..8ee523a 100644 Binary files a/journal/figs/sensor_model_calibrated.pdf and b/journal/figs/sensor_model_calibrated.pdf differ diff --git a/journal/figs/sensor_model_calibrated.png b/journal/figs/sensor_model_calibrated.png index b14a18d..59b21a0 100644 Binary files a/journal/figs/sensor_model_calibrated.png and b/journal/figs/sensor_model_calibrated.png differ diff --git a/journal/figs/sensor_model_calibrated.svg b/journal/figs/sensor_model_calibrated.svg index 20e1c68..088ec32 100644 --- a/journal/figs/sensor_model_calibrated.svg +++ b/journal/figs/sensor_model_calibrated.svg @@ -1,216 +1,249 @@ - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + - + - + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - + + + + + + - + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - + + + + + + + + - + - + + + + + + + + + + + + + + + diff --git a/journal/figs/sensor_model_uncertainty.pdf b/journal/figs/sensor_model_uncertainty.pdf index 1659219..03ece4d 100644 Binary files a/journal/figs/sensor_model_uncertainty.pdf and b/journal/figs/sensor_model_uncertainty.pdf differ diff --git a/journal/figs/sensor_model_uncertainty.png b/journal/figs/sensor_model_uncertainty.png index 98d0cdf..7ab5185 100644 Binary files a/journal/figs/sensor_model_uncertainty.png and b/journal/figs/sensor_model_uncertainty.png differ diff --git a/journal/figs/sensor_model_uncertainty.svg b/journal/figs/sensor_model_uncertainty.svg index 6e4abd6..afbcefc 100644 --- a/journal/figs/sensor_model_uncertainty.svg +++ b/journal/figs/sensor_model_uncertainty.svg @@ -1,276 +1,298 @@ - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + - + - + + + + + + + - + - + - + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - + + + + + + - - + - + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - - - - - - - - - - - - + + + + + + + + + + + + - + - + - - + + - + - + - + - - + + - + - + - + - + diff --git a/journal/figs/sensor_model_uncertainty_simplified.pdf b/journal/figs/sensor_model_uncertainty_simplified.pdf index 62337ed..aea332d 100644 Binary files a/journal/figs/sensor_model_uncertainty_simplified.pdf and b/journal/figs/sensor_model_uncertainty_simplified.pdf differ diff --git a/journal/figs/sensor_model_uncertainty_simplified.png b/journal/figs/sensor_model_uncertainty_simplified.png index 53c7253..ba1769f 100644 Binary files a/journal/figs/sensor_model_uncertainty_simplified.png and b/journal/figs/sensor_model_uncertainty_simplified.png differ diff --git a/journal/figs/sensor_model_uncertainty_simplified.svg b/journal/figs/sensor_model_uncertainty_simplified.svg index 9b9d0f8..16993fa 100644 --- a/journal/figs/sensor_model_uncertainty_simplified.svg +++ b/journal/figs/sensor_model_uncertainty_simplified.svg @@ -1,219 +1,219 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - + + + + + + + + - + - - + + - + - + - - + + - + - + - + - + diff --git a/journal/journal.org b/journal/journal.org index 6c321cd..1df0270 100644 --- a/journal/journal.org +++ b/journal/journal.org @@ -17,6 +17,7 @@ #+LATEX_HEADER_EXTRA: \address[a3]{CSIR --- Structural Engineering Research Centre, Taramani, Chennai --- 600113, India.} #+LATEX_HEADER_EXTRA: \address[a4]{Universit\'{e} Libre de Bruxelles, Precision Mechatronics Laboratory, BEAMS Department, 1050 Brussels, Belgium.} +#+LATEX_HEADER: \usepackage{subcaption} #+LATEX_HEADER: \usepackage{amsfonts} #+LATEX_HEADER: \usepackage{siunitx} #+LATEX_HEADER_EXTRA: \usepackage{tabularx} @@ -27,7 +28,7 @@ #+LATEX_HEADER_EXTRA: \hypersetup{colorlinks=true} :END: -* Build :noexport: +* Build :noexport: #+NAME: startblock #+BEGIN_SRC emacs-lisp :results none (add-to-list 'org-latex-classes @@ -126,7 +127,7 @@ Sensor fusion \sep{} Optimal filters \sep{} $\mathcal{H}_\infty$ synthesis \sep{ - cite:hua05_low_ligo,hua04_polyp_fir_compl_filter_contr_system: FIR + convex optimization - Similar to feedback system: - cite:plummer06_optim_compl_filter_their_applic_motion_measur use H-Infinity to optimize complementary filters (flatten the super sensor noise spectral density) - - cite:jensen13_basic_uas design of complementary filters with classical control theory + - cite:jensen13_basic_uas design of complementary filters with classical control theory, PID - 3 complementary filters: cite:becker15_compl_filter_desig_three_frequen_bands @@ -260,30 +261,69 @@ Complementary filters provides a framework for fusing signals from different sen As the effectiveness of the fusion depends on the proper design of the complementary filters, they are expected to fulfill certain requirements. These requirements are discussed in this section. -** Sensor Models -<> - -- Noise + dynamics - -#+name: fig:sensor_model -#+caption: Basic Sensor Model -[[file:figs/sensor_model.pdf]] - -- Suppose we calibrate the sensors - -#+name: fig:sensor_model_calibrated -#+caption: Calibrated Sensor -[[file:figs/sensor_model_calibrated.pdf]] - ** Sensor Fusion Architecture <> -Let's consider two sensors measuring the same physical quantity $x$ with dynamics $G_1(s)$ and $G_2(s)$, and with uncorrelated noise characteristics $n_1$ and $n_2$. +A general sensor fusion architecture is shown in Figure ref:fig:sensor_fusion_overview where several sensors (here two) are measuring the same physical quantity $x$. +The two sensors output signals are estimates $\hat{x}_1$ and $\hat{x}_2$ of $x$. +Each of these estimates are then filtered out by complementary filters and combined to form a new estimate $\hat{x}$. +We further call the overall system from $x$ to $\hat{x}$ the "super sensor". -The signals from both sensors are fed into two complementary filters $H_1(s)$ and $H_2(s)$ and then combined to yield an estimate $\hat{x}$ of $x$ as shown in Fig. ref:fig:fusion_super_sensor. +#+name: fig:sensor_fusion_overview +#+caption: Schematic of a sensor fusion architecture +[[file:figs/sensor_fusion_overview.pdf]] + +The filters $H_1(s)$ and $H_2(s)$ are complementary which implies that: +#+name: eq:comp_filter +\begin{equation} + H_1(s) + H_2(s) = 1 +\end{equation} + +It will soon become clear why the complementary property is important. + +** Sensor Models and Sensor Normalization +<> + +In order to study such sensor fusion architecture, a model of the sensor is required. + +The sensor model is shown in Figure ref:fig:sensor_model. +It consists of a Linear Time Invariant system (LTI) $G_i(s)$ representing the dynamics of the sensor and an additive noise input $n_i$ representing its noise. +The model input $x$ is the measured quantity and its output $\tilde{x}_i$ is the "raw" output of the sensor. + +Before filtering the sensor outputs $\tilde{x}_i$ by the complementary filters, the sensors are usually normalized. +This normalization consists of obtaining an estimate $\hat{G}_i(s)$ of the sensor dynamics $G_i(s)$. +The raw output of the sensor $\tilde{x}_i$ is then passed through the inverse of the sensor dynamics estimate as shown in Figure ref:fig:sensor_model_calibrated. +This way, the units of the estimates $\hat{x}_i$ are equal to the units of the physical quantity $x$. +The sensor dynamics estimate $\hat{G}_1(s)$ can be a simple gain or more complex transfer functions. + +#+begin_export latex +\begin{figure}[htbp] +\begin{subfigure}[b]{0.49\linewidth} +\centering +\includegraphics[scale=1]{figs/sensor_model.pdf} +\caption{\label{fig:sensor_model} Basic sensor model consisting of a noise input $n_i$ and a dynamics $G_i(s)$} +\end{subfigure} +\hfill +\begin{subfigure}[b]{0.49\linewidth} +\centering +\includegraphics[scale=1]{figs/sensor_model_calibrated.pdf} +\caption{\label{fig:sensor_model_calibrated} Calibrated sensors using the inverse of an estimate $\hat{G}_1(s)$ of the sensor dynamics} +\end{subfigure} +\caption{\label{fig:figure_name}Sensor models with an without normalization} +\centering +\end{figure} +#+end_export + +Let's now combine the two calibrated sensors models (Figure ref:fig:sensor_model_calibrated) with the sensor fusion architecture of figure ref:fig:sensor_fusion_overview. +The result is shown in Figure ref:fig:fusion_super_sensor. + +The two sensors are measuring the same physical quantity $x$ with dynamics $G_1(s)$ and $G_2(s)$, and with /uncorrelated/ noises $n_1$ and $n_2$. +The signals from both calibrated sensors are fed into two complementary filters $H_1(s)$ and $H_2(s)$ and then combined to yield an estimate $\hat{x}$ of $x$ as shown in Fig. ref:fig:fusion_super_sensor. + +The super sensor output is therefore equal to: #+name: eq:comp_filter_estimate \begin{equation} - \hat{x} = \left(G_1 H_1 + G_2 H_2\right) x + H_1 n_1 + H_2 n_2 + \hat{x} = \Big( H_1(s) \hat{G}_1(s) G_1(s) + H_2(s) \hat{G}_2(s) G_2(s) \Big) x + H_1(s) \hat{G}_1(s) G_1(s) n_1 + H_2(s) \hat{G}_2(s) G_2(s) n_2 \end{equation} #+name: fig:fusion_super_sensor @@ -291,66 +331,77 @@ The signals from both sensors are fed into two complementary filters $H_1(s)$ an #+attr_latex: :scale 1 [[file:figs/fusion_super_sensor.pdf]] -The complementary property of $H_1(s)$ and $H_2(s)$ implies that their transfer function sum is equal to one at all frequencies eqref:eq:comp_filter. -#+name: eq:comp_filter -\begin{equation} - H_1(s) + H_2(s) = 1 -\end{equation} - ** Noise Sensor Filtering <> -Let's first consider sensors with perfect dynamics +In this section, it is suppose that all the sensors are correctly calibrated, such that: #+name: eq:perfect_dynamics \begin{equation} - G_1(s) = G_2(s) = 1 + \frac{\hat{x}_i}{x} = \hat{G}_i(s) G_i(s) \approx 1 \end{equation} -The estimate $\hat{x}$ is then described by +The effect of a non-ideal normalization will be discussed in the next section. + +The super sensor output $\hat{x}$ is then: #+name: eq:estimate_perfect_dyn \begin{equation} - \hat{x} = x + H_1 n_1 + H_2 n_2 + \hat{x} = x + H_1(s) n_1 + H_2(s) n_2 \end{equation} -From eqref:eq:estimate_perfect_dyn, the complementary filters $H_1(s)$ and $H_2(s)$ are shown to only operate on the sensor's noise. + +From eqref:eq:estimate_perfect_dyn, the complementary filters $H_1(s)$ and $H_2(s)$ are shown to only operate on the sensor's noises. Thus, this sensor fusion architecture permits to filter the noise of both sensors without introducing any distortion in the physical quantity to be measured. Let's define the estimation error $\delta x$ by eqref:eq:estimate_error. #+name: eq:estimate_error \begin{equation} - \delta x \triangleq \hat{x} - x = H_1 n_1 + H_2 n_2 + \delta x \triangleq \hat{x} - x = H_1(s) n_1 + H_2(s) n_2 \end{equation} As shown in eqref:eq:noise_filtering_psd, the Power Spectral Density (PSD) of the estimation error $\Phi_{\delta x}$ depends both on the norm of the two complementary filters and on the PSD of the noise sources $\Phi_{n_1}$ and $\Phi_{n_2}$. #+name: eq:noise_filtering_psd \begin{equation} - \Phi_{\delta x} = \left|H_1\right|^2 \Phi_{n_1} + \left|H_2\right|^2 \Phi_{n_2} + \Phi_{\delta x}(\omega) = \left|H_1(j\omega)\right|^2 \Phi_{n_1}(\omega) + \left|H_2(j\omega)\right|^2 \Phi_{n_2}(\omega) \end{equation} +# TODO - Rework, tell that we can put requirements on the *norm* of the complementary filters Usually, the two sensors have high noise levels over distinct frequency regions. In order to lower the noise of the super sensor, the value of the norm $|H_1|$ has to be lowered when $\Phi_{n_1}$ is larger than $\Phi_{n_2}$ and that of $|H_2|$ lowered when $\Phi_{n_2}$ is larger than $\Phi_{n_1}$. ** Robustness of the Fusion <> -In practical systems the sensor dynamics is not perfect and eqref:eq:perfect_dynamics is not verified. -In such case, one can use an inversion filter $\hat{G}_i^{-1}(s)$ to normalize the sensor dynamics, where $\hat{G}_i(s)$ is an estimate of the sensor dynamics $G_i(s)$. -However, as there is always some level of uncertainty on the dynamics, it cannot be perfectly inverted and $\hat{G}_i^{-1}(s) G_i(s) \neq 1$. +In practical systems the sensor normalization is not perfect and eqref:eq:perfect_dynamics is not verified. -#+name: fig:sensor_model_uncertainty -#+caption: Input Uncertainty -[[file:figs/sensor_model_uncertainty.png]] +In order to study such imperfection, the sensor dynamical uncertainty is modeled using multiplicative input uncertainty (Figure ref:fig:sensor_model_uncertainty), where the nominal model is taken as the estimated model for the normalization $\hat{G}_i(s)$, $\Delta_i$ is any stable transfer function satisfying $|\Delta_i(j\omega)| \le 1,\ \forall\omega$, and $w_i(s)$ is a weight representing the magnitude of the uncertainty. -#+name: fig:sensor_model_uncertainty_simplified -#+caption: Input Uncertainty -#+RESULTS: -[[file:figs/sensor_model_uncertainty_simplified.png]] +# The weight $w_i(s)$ is chosen such that the real sensor dynamics is contained in the uncertain region represented by... -Let's represent the resulting dynamic uncertainty of the inverted sensors by an input multiplicative uncertainty as shown in Fig. ref:fig:sensor_fusion_dynamic_uncertainty where $\Delta_i$ is any stable transfer function satisfying $|\Delta_i(j\omega)| \le 1,\ \forall\omega$, and $|w_i(s)|$ is a weight representing the magnitude of the uncertainty. +As the nominal sensor dynamics is taken as the normalized filter, the normalized sensor can be further simplified as shown in Figure ref:fig:sensor_model_uncertainty_simplified. + +#+begin_export latex +\begin{figure}[htbp] +\begin{subfigure}[b]{0.59\linewidth} +\centering +\includegraphics[scale=1]{figs/sensor_model_uncertainty.pdf} +\caption{\label{fig:sensor_model_uncertainty} Sensor with multiplicative input uncertainty} +\end{subfigure} +\hfill +\begin{subfigure}[b]{0.39\linewidth} +\centering +\includegraphics[scale=1]{figs/sensor_model_uncertainty_simplified.pdf} +\caption{\label{fig:sensor_model_uncertainty_simplified} Simplified sensor model} +\end{subfigure} +\hfill +\caption{\label{fig:sensor_models_uncertainty}Sensor models with dynamical uncertainty} +\centering +\end{figure} +#+end_export + +A sensor fusion architecture with two sensors with dynamical uncertainty is shown in Figure ref:fig:sensor_fusion_dynamic_uncertainty. #+name: fig:sensor_fusion_dynamic_uncertainty #+caption: Sensor fusion architecture with sensor dynamics uncertainty -#+attr_latex: :scale 1 [[file:figs/sensor_fusion_dynamic_uncertainty.pdf]] The super sensor dynamics eqref:eq:super_sensor_dyn_uncertainty is no longer equal to $1$ and now depends on the sensor dynamics uncertainty weights $w_i(s)$ as well as on the complementary filters $H_i(s)$. @@ -359,11 +410,10 @@ The super sensor dynamics eqref:eq:super_sensor_dyn_uncertainty is no longer equ \frac{\hat{x}}{x} = 1 + w_1(s) H_1(s) \Delta_1(s) + w_2(s) H_2(s) \Delta_2(s) \end{equation} -The uncertainty region of the super sensor can be represented in the complex plane by a circle centered on $1$ with a radius equal to $|w_1(j\omega) H_1(j\omega)| + |w_2(j\omega) H_2(j\omega)|$ as shown in Fig. ref:fig:uncertainty_set_super_sensor. +The uncertainty region of the super sensor can be represented in the complex plane by a circle centered on $1$ with a radius equal to $|w_1(j\omega) H_1(j\omega)| + |w_2(j\omega) H_2(j\omega)|$ as shown in Figure ref:fig:uncertainty_set_super_sensor. #+name: fig:uncertainty_set_super_sensor -#+caption: Uncertainty region of the super sensor dynamics in the complex plane (solid circle). The contribution of both sensors 1 and 2 to the uncertainty are represented respectively by a dotted and a dashed circle -#+attr_latex: :scale 1 +#+caption: Uncertainty region of the super sensor dynamics in the complex plane (solid circle). The contribution of both sensors 1 and 2 to the uncertainty are represented respectively by a blue circle and a red circle [[file:figs/uncertainty_set_super_sensor.pdf]] The maximum phase added $\Delta\phi(\omega)$ by the super sensor dynamics at frequency $\omega$ is then @@ -554,7 +604,7 @@ They are found to be very close to each other and this shows the effectiveness o #+attr_latex: :scale 1 [[file:figs/comp_fir_ligo_hinf.pdf]] -* Discussion :noexport: +* Discussion ** Alternative configuration - Feedback architecture : Similar to mixed sensitivity - 2 inputs / 1 output @@ -601,13 +651,13 @@ By choosing $H_1(s) \triangleq 1 - H_2(s) - H_3(s)$, the proposed $\mathcal{H}_\ *** Example of generated complementary filters :ignore: An example is given to validate the method where three sensors are used in different frequency bands (up to $\SI{1}{Hz}$, from $1$ to $\SI{10}{Hz}$ and above $\SI{10}{Hz}$ respectively). -Three weighting functions are designed using eqref:eq:weight_formula and shown by dashed curves in Fig. ref:fig:hinf_three_synthesis_results. -The bode plots of the obtained complementary filters are shown in Fig. ref:fig:hinf_three_synthesis_results. +Three weighting functions are designed using eqref:eq:weight_formula and shown by dashed curves in Fig. ref:fig:three_complementary_filters_results. +The bode plots of the obtained complementary filters are shown in Fig. ref:fig:three_complementary_filters_results. -#+name: fig:hinf_three_synthesis_results +#+name: fig:three_complementary_filters_results #+caption: Frequency response of the weighting functions and three complementary filters obtained using $\mathcal{H}_\infty$ synthesis #+attr_latex: :scale 1 -[[file:figs/hinf_three_synthesis_results.pdf]] +[[file:figs/three_complementary_filters_results.pdf]] * Conclusion <> diff --git a/journal/journal.pdf b/journal/journal.pdf index 21dd239..7544974 100644 Binary files a/journal/journal.pdf and b/journal/journal.pdf differ diff --git a/journal/journal.tex b/journal/journal.tex index 644b7fa..1ed9d7d 100644 --- a/journal/journal.tex +++ b/journal/journal.tex @@ -1,4 +1,4 @@ -% Created 2021-04-30 ven. 11:16 +% Created 2021-05-03 lun. 17:46 % Intended LaTeX compiler: pdflatex \documentclass[preprint, sort&compress]{elsarticle} \usepackage[utf8]{inputenc} @@ -14,6 +14,7 @@ \usepackage{amssymb} \usepackage{capt-of} \usepackage{hyperref} +\usepackage{subcaption} \usepackage{amsfonts} \usepackage{siunitx} \journal{Mechanical Systems and Signal Processing} @@ -57,7 +58,7 @@ Sensor fusion \sep{} Optimal filters \sep{} \(\mathcal{H}_\infty\) synthesis \se \end{frontmatter} \section{Introduction} -\label{sec:org341e767} +\label{sec:org0c85494} \label{sec:introduction} \begin{itemize} \item \cite{bendat57_optim_filter_indep_measur_two} roots of sensor fusion @@ -90,7 +91,7 @@ Sensor fusion \sep{} Optimal filters \sep{} \(\mathcal{H}_\infty\) synthesis \se \item Similar to feedback system: \begin{itemize} \item \cite{plummer06_optim_compl_filter_their_applic_motion_measur} use H-Infinity to optimize complementary filters (flatten the super sensor noise spectral density) -\item \cite{jensen13_basic_uas} design of complementary filters with classical control theory +\item \cite{jensen13_basic_uas} design of complementary filters with classical control theory, PID \end{itemize} \item 3 complementary filters: \cite{becker15_compl_filter_desig_three_frequen_bands} @@ -104,45 +105,76 @@ Most of the requirements => shape of the complementary filters => propose a way to shape complementary filters. \section{Complementary Filters Requirements} -\label{sec:org77471d1} +\label{sec:org05c7608} \label{sec:requirements} Complementary filters provides a framework for fusing signals from different sensors. As the effectiveness of the fusion depends on the proper design of the complementary filters, they are expected to fulfill certain requirements. These requirements are discussed in this section. -\subsection{Sensor Models} -\label{sec:org363af04} -\label{sec:sensor_models} - -\begin{itemize} -\item Noise + dynamics -\end{itemize} - -\begin{figure}[htbp] -\centering -\includegraphics[scale=1]{figs/sensor_model.pdf} -\caption{\label{fig:sensor_model}Basic Sensor Model} -\end{figure} - -\begin{itemize} -\item Suppose we calibrate the sensors -\end{itemize} - -\begin{figure}[htbp] -\centering -\includegraphics[scale=1]{figs/sensor_model_calibrated.pdf} -\caption{\label{fig:sensor_model_calibrated}Calibrated Sensor} -\end{figure} - \subsection{Sensor Fusion Architecture} -\label{sec:org240da2b} +\label{sec:orgca80a74} \label{sec:sensor_fusion} -Let's consider two sensors measuring the same physical quantity \(x\) with dynamics \(G_1(s)\) and \(G_2(s)\), and with uncorrelated noise characteristics \(n_1\) and \(n_2\). +A general sensor fusion architecture is shown in Figure \ref{fig:sensor_fusion_overview} where several sensors (here two) are measuring the same physical quantity \(x\). +The two sensors output signals are estimates \(\hat{x}_1\) and \(\hat{x}_2\) of \(x\). +Each of these estimates are then filtered out by complementary filters and combined to form a new estimate \(\hat{x}\). +We further call the overall system from \(x\) to \(\hat{x}\) the ``super sensor''. -The signals from both sensors are fed into two complementary filters \(H_1(s)\) and \(H_2(s)\) and then combined to yield an estimate \(\hat{x}\) of \(x\) as shown in Fig. \ref{fig:fusion_super_sensor}. +\begin{figure}[htbp] +\centering +\includegraphics[scale=1]{figs/sensor_fusion_overview.pdf} +\caption{\label{fig:sensor_fusion_overview}Schematic of a sensor fusion architecture} +\end{figure} + +The filters \(H_1(s)\) and \(H_2(s)\) are complementary which implies that: +\begin{equation} +\label{eq:comp_filter} + H_1(s) + H_2(s) = 1 +\end{equation} + +It will soon become clear why the complementary property is important. + +\subsection{Sensor Models and Sensor Normalization} +\label{sec:orgfc7a65c} +\label{sec:sensor_models} + +In order to study such sensor fusion architecture, a model of the sensor is required. + +The sensor model is shown in Figure \ref{fig:sensor_model}. +It consists of a Linear Time Invariant system (LTI) \(G_i(s)\) representing the dynamics of the sensor and an additive noise input \(n_i\) representing its noise. +The model input \(x\) is the measured quantity and its output \(\tilde{x}_i\) is the ``raw'' output of the sensor. + +Before filtering the sensor outputs \(\tilde{x}_i\) by the complementary filters, the sensors are usually normalized. +This normalization consists of obtaining an estimate \(\hat{G}_i(s)\) of the sensor dynamics \(G_i(s)\). +The raw output of the sensor \(\tilde{x}_i\) is then passed through the inverse of the sensor dynamics estimate as shown in Figure \ref{fig:sensor_model_calibrated}. +This way, the units of the estimates \(\hat{x}_i\) are equal to the units of the physical quantity \(x\). +The sensor dynamics estimate \(\hat{G}_1(s)\) can be a simple gain or more complex transfer functions. + +\begin{figure}[htbp] +\begin{subfigure}[b]{0.49\linewidth} +\centering +\includegraphics[scale=1]{figs/sensor_model.pdf} +\caption{\label{fig:sensor_model} Basic sensor model consisting of a noise input $n_i$ and a dynamics $G_i(s)$} +\end{subfigure} +\hfill +\begin{subfigure}[b]{0.49\linewidth} +\centering +\includegraphics[scale=1]{figs/sensor_model_calibrated.pdf} +\caption{\label{fig:sensor_model_calibrated} Calibrated sensors using the inverse of an estimate $\hat{G}_1(s)$ of the sensor dynamics} +\end{subfigure} +\caption{\label{fig:figure_name}Sensor models with an without normalization} +\centering +\end{figure} + +Let's now combine the two calibrated sensors models (Figure \ref{fig:sensor_model_calibrated}) with the sensor fusion architecture of figure \ref{fig:sensor_fusion_overview}. +The result is shown in Figure \ref{fig:fusion_super_sensor}. + +The two sensors are measuring the same physical quantity \(x\) with dynamics \(G_1(s)\) and \(G_2(s)\), and with \emph{uncorrelated} noises \(n_1\) and \(n_2\). +The signals from both calibrated sensors are fed into two complementary filters \(H_1(s)\) and \(H_2(s)\) and then combined to yield an estimate \(\hat{x}\) of \(x\) as shown in Fig. \ref{fig:fusion_super_sensor}. + +The super sensor output is therefore equal to: \begin{equation} \label{eq:comp_filter_estimate} - \hat{x} = \left(G_1 H_1 + G_2 H_2\right) x + H_1 n_1 + H_2 n_2 + \hat{x} = \Big( H_1(s) \hat{G}_1(s) G_1(s) + H_2(s) \hat{G}_2(s) G_2(s) \Big) x + H_1(s) \hat{G}_1(s) G_1(s) n_1 + H_2(s) \hat{G}_2(s) G_2(s) n_2 \end{equation} \begin{figure}[htbp] @@ -151,71 +183,75 @@ The signals from both sensors are fed into two complementary filters \(H_1(s)\) \caption{\label{fig:fusion_super_sensor}Sensor fusion architecture} \end{figure} -The complementary property of \(H_1(s)\) and \(H_2(s)\) implies that their transfer function sum is equal to one at all frequencies \eqref{eq:comp_filter}. -\begin{equation} -\label{eq:comp_filter} - H_1(s) + H_2(s) = 1 -\end{equation} - \subsection{Noise Sensor Filtering} -\label{sec:orgc5064da} +\label{sec:org2a2ea67} \label{sec:noise_filtering} -Let's first consider sensors with perfect dynamics +In this section, it is suppose that all the sensors are correctly calibrated, such that: \begin{equation} \label{eq:perfect_dynamics} - G_1(s) = G_2(s) = 1 + \frac{\hat{x}_i}{x} = \hat{G}_i(s) G_i(s) \approx 1 \end{equation} -The estimate \(\hat{x}\) is then described by +The effect of a non-ideal normalization will be discussed in the next section. + +The super sensor output \(\hat{x}\) is then: \begin{equation} \label{eq:estimate_perfect_dyn} - \hat{x} = x + H_1 n_1 + H_2 n_2 + \hat{x} = x + H_1(s) n_1 + H_2(s) n_2 \end{equation} -From \eqref{eq:estimate_perfect_dyn}, the complementary filters \(H_1(s)\) and \(H_2(s)\) are shown to only operate on the sensor's noise. + +From \eqref{eq:estimate_perfect_dyn}, the complementary filters \(H_1(s)\) and \(H_2(s)\) are shown to only operate on the sensor's noises. Thus, this sensor fusion architecture permits to filter the noise of both sensors without introducing any distortion in the physical quantity to be measured. Let's define the estimation error \(\delta x\) by \eqref{eq:estimate_error}. \begin{equation} \label{eq:estimate_error} - \delta x \triangleq \hat{x} - x = H_1 n_1 + H_2 n_2 + \delta x \triangleq \hat{x} - x = H_1(s) n_1 + H_2(s) n_2 \end{equation} As shown in \eqref{eq:noise_filtering_psd}, the Power Spectral Density (PSD) of the estimation error \(\Phi_{\delta x}\) depends both on the norm of the two complementary filters and on the PSD of the noise sources \(\Phi_{n_1}\) and \(\Phi_{n_2}\). \begin{equation} \label{eq:noise_filtering_psd} - \Phi_{\delta x} = \left|H_1\right|^2 \Phi_{n_1} + \left|H_2\right|^2 \Phi_{n_2} + \Phi_{\delta x}(\omega) = \left|H_1(j\omega)\right|^2 \Phi_{n_1}(\omega) + \left|H_2(j\omega)\right|^2 \Phi_{n_2}(\omega) \end{equation} Usually, the two sensors have high noise levels over distinct frequency regions. In order to lower the noise of the super sensor, the value of the norm \(|H_1|\) has to be lowered when \(\Phi_{n_1}\) is larger than \(\Phi_{n_2}\) and that of \(|H_2|\) lowered when \(\Phi_{n_2}\) is larger than \(\Phi_{n_1}\). \subsection{Robustness of the Fusion} -\label{sec:orgfc9ea9e} +\label{sec:orgca279c9} \label{sec:fusion_robustness} -In practical systems the sensor dynamics is not perfect and \eqref{eq:perfect_dynamics} is not verified. -In such case, one can use an inversion filter \(\hat{G}_i^{-1}(s)\) to normalize the sensor dynamics, where \(\hat{G}_i(s)\) is an estimate of the sensor dynamics \(G_i(s)\). -However, as there is always some level of uncertainty on the dynamics, it cannot be perfectly inverted and \(\hat{G}_i^{-1}(s) G_i(s) \neq 1\). +In practical systems the sensor normalization is not perfect and \eqref{eq:perfect_dynamics} is not verified. + +In order to study such imperfection, the sensor dynamical uncertainty is modeled using multiplicative input uncertainty (Figure \ref{fig:sensor_model_uncertainty}), where the nominal model is taken as the estimated model for the normalization \(\hat{G}_i(s)\), \(\Delta_i\) is any stable transfer function satisfying \(|\Delta_i(j\omega)| \le 1,\ \forall\omega\), and \(w_i(s)\) is a weight representing the magnitude of the uncertainty. + +As the nominal sensor dynamics is taken as the normalized filter, the normalized sensor can be further simplified as shown in Figure \ref{fig:sensor_model_uncertainty_simplified}. \begin{figure}[htbp] +\begin{subfigure}[b]{0.59\linewidth} +\centering +\includegraphics[scale=1]{figs/sensor_model_uncertainty.pdf} +\caption{\label{fig:sensor_model_uncertainty} Sensor with multiplicative input uncertainty} +\end{subfigure} +\hfill +\begin{subfigure}[b]{0.39\linewidth} +\centering +\includegraphics[scale=1]{figs/sensor_model_uncertainty_simplified.pdf} +\caption{\label{fig:sensor_model_uncertainty_simplified} Simplified sensor model} +\end{subfigure} +\hfill +\caption{\label{fig:sensor_models_uncertainty}Sensor models with dynamical uncertainty} \centering -\includegraphics[scale=1]{figs/sensor_model_uncertainty.png} -\caption{\label{fig:sensor_model_uncertainty}Input Uncertainty} \end{figure} -\begin{figure}[htbp] -\centering -\includegraphics[scale=1]{figs/sensor_model_uncertainty_simplified.png} -\caption{\label{fig:sensor_model_uncertainty_simplified}Input Uncertainty} -\end{figure} - -Let's represent the resulting dynamic uncertainty of the inverted sensors by an input multiplicative uncertainty as shown in Fig. \ref{fig:sensor_fusion_dynamic_uncertainty} where \(\Delta_i\) is any stable transfer function satisfying \(|\Delta_i(j\omega)| \le 1,\ \forall\omega\), and \(|w_i(s)|\) is a weight representing the magnitude of the uncertainty. +A sensor fusion architecture with two sensors with dynamical uncertainty is shown in Figure \ref{fig:sensor_fusion_dynamic_uncertainty}. \begin{figure}[htbp] \centering -\includegraphics[scale=1,scale=1]{figs/sensor_fusion_dynamic_uncertainty.pdf} +\includegraphics[scale=1]{figs/sensor_fusion_dynamic_uncertainty.pdf} \caption{\label{fig:sensor_fusion_dynamic_uncertainty}Sensor fusion architecture with sensor dynamics uncertainty} \end{figure} @@ -225,12 +261,12 @@ The super sensor dynamics \eqref{eq:super_sensor_dyn_uncertainty} is no longer e \frac{\hat{x}}{x} = 1 + w_1(s) H_1(s) \Delta_1(s) + w_2(s) H_2(s) \Delta_2(s) \end{equation} -The uncertainty region of the super sensor can be represented in the complex plane by a circle centered on \(1\) with a radius equal to \(|w_1(j\omega) H_1(j\omega)| + |w_2(j\omega) H_2(j\omega)|\) as shown in Fig. \ref{fig:uncertainty_set_super_sensor}. +The uncertainty region of the super sensor can be represented in the complex plane by a circle centered on \(1\) with a radius equal to \(|w_1(j\omega) H_1(j\omega)| + |w_2(j\omega) H_2(j\omega)|\) as shown in Figure \ref{fig:uncertainty_set_super_sensor}. \begin{figure}[htbp] \centering -\includegraphics[scale=1,scale=1]{figs/uncertainty_set_super_sensor.pdf} -\caption{\label{fig:uncertainty_set_super_sensor}Uncertainty region of the super sensor dynamics in the complex plane (solid circle). The contribution of both sensors 1 and 2 to the uncertainty are represented respectively by a dotted and a dashed circle} +\includegraphics[scale=1]{figs/uncertainty_set_super_sensor.pdf} +\caption{\label{fig:uncertainty_set_super_sensor}Uncertainty region of the super sensor dynamics in the complex plane (solid circle). The contribution of both sensors 1 and 2 to the uncertainty are represented respectively by a blue circle and a red circle} \end{figure} The maximum phase added \(\Delta\phi(\omega)\) by the super sensor dynamics at frequency \(\omega\) is then @@ -249,12 +285,12 @@ where \(\Delta \phi_\text{max}\) is the maximum allowed added phase. Thus the norm of the complementary filter \(|H_i|\) should be made small at frequencies where \(|w_i|\) is large. \section{Complementary Filters Shaping using \(\mathcal{H}_\infty\) Synthesis} -\label{sec:org678f099} +\label{sec:org3d11f72} \label{sec:hinf_method} As shown in Sec. \ref{sec:requirements}, the performance and robustness of the sensor fusion architecture depends on the complementary filters norms. Therefore, the development of a synthesis method of complementary filters that allows the shaping of their norm is necessary. \subsection{Synthesis Objective} -\label{sec:orgf726b5b} +\label{sec:org867aacd} \label{sec:synthesis_objective} The synthesis objective is to shape the norm of two filters \(H_1(s)\) and \(H_2(s)\) while ensuring their complementary property \eqref{eq:comp_filter}. This is equivalent as to finding stable transfer functions \(H_1(s)\) and \(H_2(s)\) such that conditions \eqref{eq:comp_filter_problem_form} are satisfied. @@ -269,7 +305,7 @@ This is equivalent as to finding stable transfer functions \(H_1(s)\) and \(H_2( where \(W_1(s)\) and \(W_2(s)\) are two weighting transfer functions that are chosen to shape the norms of the corresponding filters. \subsection{Shaping of Complementary Filters using \(\mathcal{H}_\infty\) synthesis} -\label{sec:orga266a36} +\label{sec:orgec7ca01} \label{sec:hinf_synthesis} In order to express this optimization problem as a standard \(\mathcal{H}_\infty\) problem, the architecture shown in Fig. \ref{fig:h_infinity_robust_fusion} is used where the generalized plant \(P\) is described by \eqref{eq:generalized_plant}. \begin{equation} @@ -305,7 +341,7 @@ The conditions \eqref{eq:hinf_cond_h1} and \eqref{eq:hinf_cond_h2} on the filter Therefore, all the conditions \eqref{eq:comp_filter_problem_form} are satisfied using this synthesis method based on \(\mathcal{H}_\infty\) synthesis, and thus it permits to shape complementary filters as desired. \subsection{Weighting Functions Design} -\label{sec:org911c399} +\label{sec:org1b0a8b2} \label{sec:hinf_weighting_func} The proper design of the weighting functions is of primary importance for the success of the presented complementary filters \(\mathcal{H}_\infty\) synthesis. @@ -350,7 +386,7 @@ The general shape of a weighting function generated using \eqref{eq:weight_formu \end{figure} \subsection{Validation of the proposed synthesis method} -\label{sec:org6867aff} +\label{sec:org9091752} \label{sec:hinf_example} Let's validate the proposed design method of complementary filters with a simple example where two complementary filters \(H_1(s)\) and \(H_2(s)\) have to be designed such that: \begin{itemize} @@ -392,7 +428,7 @@ The bode plots of the obtained complementary filters are shown in Fig. \ref{fig: \end{figure} \section{Application: Design of Complementary Filters used in the Active Vibration Isolation System at the LIGO} -\label{sec:org377e66e} +\label{sec:orgf547be3} \label{sec:application_ligo} Several complementary filters are used in the active isolation system at the LIGO \cite{hua05_low_ligo,hua04_polyp_fir_compl_filter_contr_system}. The requirements on those filters are very tight and thus their design is complex. @@ -401,7 +437,7 @@ The obtained FIR filters are compliant with the requirements. However they are o The effectiveness of the proposed method is demonstrated by designing complementary filters with the same requirements as the one described in \cite{hua05_low_ligo}. \subsection{Complementary Filters Specifications} -\label{sec:org75813ae} +\label{sec:orgd0486d1} \label{sec:ligo_specifications} The specifications for one pair of complementary filters used at the LIGO are summarized below (for further details, refer to \cite{hua04_polyp_fir_compl_filter_contr_system}) and shown in Fig. \ref{fig:ligo_weights}: \begin{itemize} @@ -412,7 +448,7 @@ The specifications for one pair of complementary filters used at the LIGO are su \end{itemize} \subsection{Weighting Functions Design} -\label{sec:org7015511} +\label{sec:org1a654aa} \label{sec:ligo_weights} The weighting functions should be designed such that their inverse magnitude is as close as possible to the specifications in order to not over-constrain the synthesis problem. However, the order of each weight should stay reasonably small in order to reduce the computational costs of the optimization problem as well as for the physical implementation of the filters. @@ -428,7 +464,7 @@ The magnitudes of the weighting functions are shown in Fig. \ref{fig:ligo_weight \end{figure} \subsection{\(\mathcal{H}_\infty\) Synthesis} -\label{sec:orge5b6fe6} +\label{sec:org93cef71} \label{sec:ligo_results} \(\mathcal{H}_\infty\) synthesis is performed using the architecture shown in Fig. \ref{eq:generalized_plant}. The complementary filters obtained are of order \(27\). @@ -441,8 +477,63 @@ They are found to be very close to each other and this shows the effectiveness o \caption{\label{fig:comp_fir_ligo_hinf}Comparison of the FIR filters (solid) designed in \cite{hua05_low_ligo} with the filters obtained with \(\mathcal{H}_\infty\) synthesis (dashed)} \end{figure} +\section{Discussion} +\label{sec:org016320e} +\subsection{Alternative configuration} +\label{sec:org69bd60e} +\begin{itemize} +\item Feedback architecture : Similar to mixed sensitivity +\item 2 inputs / 1 output +\end{itemize} + +Explain differences + +\subsection{Imposing zero at origin / roll-off} +\label{sec:org7f88310} +3 methods: + +Link to literature about doing that with mixed sensitivity + +\subsection{Synthesis of Three Complementary Filters} +\label{sec:orgd378e04} +\label{sec:hinf_three_comp_filters} +Some applications may require to merge more than two sensors. +In such a case, it is necessary to design as many complementary filters as the number of sensors used. +The synthesis problem is then to compute \(n\) stable transfer functions \(H_i(s)\) such that \eqref{eq:hinf_problem_gen} is satisfied. +\begin{subequations} +\label{eq:hinf_problem_gen} + \begin{align} + & \sum_{i=0}^n H_i(s) = 1 \label{eq:hinf_cond_compl_gen} \\ + & \left| H_i(j\omega) \right| < \frac{1}{\left| W_i(j\omega) \right|}, \quad \forall \omega,\ i = 1 \dots n \label{eq:hinf_cond_perf_gen} + \end{align} +\end{subequations} +The synthesis method is generalized here for the synthesis of three complementary filters using the architecture shown in Fig. \ref{fig:comp_filter_three_hinf}. + +The \(\mathcal{H}_\infty\) synthesis objective applied on \(P(s)\) is to design two stable filters \(H_2(s)\) and \(H_3(s)\) such that the \(\mathcal{H}_\infty\) norm of the transfer function from \(w\) to \([z_1,\ z_2, \ z_3]\) is less than one \eqref{eq:hinf_syn_obj_three}. +\begin{equation} +\label{eq:hinf_syn_obj_three} + \left\| \begin{matrix} \left[1 - H_2(s) - H_3(s)\right] W_1(s) \\ H_2(s) W_2(s) \\ H_3(s) W_3(s) \end{matrix} \right\|_\infty \le 1 +\end{equation} + +\begin{figure}[htbp] +\centering +\includegraphics[scale=1,scale=1]{figs/comp_filter_three_hinf.pdf} +\caption{\label{fig:comp_filter_three_hinf}Architecture for \(\mathcal{H}_\infty\) synthesis of three complementary filters} +\end{figure} + +By choosing \(H_1(s) \triangleq 1 - H_2(s) - H_3(s)\), the proposed \(\mathcal{H}_\infty\) synthesis solves the design problem \eqref{eq:hinf_problem_gen}. \par +An example is given to validate the method where three sensors are used in different frequency bands (up to \(\SI{1}{Hz}\), from \(1\) to \(\SI{10}{Hz}\) and above \(\SI{10}{Hz}\) respectively). +Three weighting functions are designed using \eqref{eq:weight_formula} and shown by dashed curves in Fig. \ref{fig:three_complementary_filters_results}. +The bode plots of the obtained complementary filters are shown in Fig. \ref{fig:three_complementary_filters_results}. + +\begin{figure}[htbp] +\centering +\includegraphics[scale=1,scale=1]{figs/three_complementary_filters_results.pdf} +\caption{\label{fig:three_complementary_filters_results}Frequency response of the weighting functions and three complementary filters obtained using \(\mathcal{H}_\infty\) synthesis} +\end{figure} + \section{Conclusion} -\label{sec:org39b90d9} +\label{sec:org46a0029} \label{sec:conclusion} This paper has shown how complementary filters can be used to combine multiple sensors in order to obtain a super sensor. Typical specification on the super sensor noise and on the robustness of the sensor fusion has been shown to be linked to the norm of the complementary filters. @@ -450,7 +541,7 @@ Therefore, a synthesis method that permits the shaping of the complementary filt Future work will aim at further developing this synthesis method for the robust and optimal synthesis of complementary filters used in sensor fusion. \section*{Acknowledgment} -\label{sec:org1ece332} +\label{sec:orgc8d6b1f} This research benefited from a FRIA grant from the French Community of Belgium. \bibliographystyle{elsarticle-num} diff --git a/matlab/index.org b/matlab/index.org index 4a6e33a..a68bf57 100644 --- a/matlab/index.org +++ b/matlab/index.org @@ -185,9 +185,10 @@ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); xlabel('Frequency [Hz]'); ylabel('Magnitude'); hold off; xlim([freqs(1), freqs(end)]); -ylim([5e-4, 20]); +ylim([1e-4, 20]); xticks([0.1, 1, 10, 100, 1000]); -legend('location', 'northeast', 'FontSize', 8); +leg = legend('location', 'southeast', 'FontSize', 8); +leg.ItemTokenSize(1) = 18; #+end_src #+begin_src matlab :tangle no :exports results :results file replace @@ -278,7 +279,8 @@ ylabel('Magnitude'); set(gca, 'XTickLabel',[]); ylim([1e-4, 20]); yticks([1e-4, 1e-3, 1e-2, 1e-1, 1, 1e1]); -legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2); +leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2); +leg.ItemTokenSize(1) = 18; % Phase ax2 = nexttile; @@ -387,8 +389,9 @@ plot(freqs, 1./abs(squeeze(freqresp(W3, freqs, 'Hz'))), '--', 'DisplayName', '$| set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); xlabel('Frequency [Hz]'); ylabel('Magnitude'); hold off; -xlim([freqs(1), freqs(end)]); -legend('location', 'northeast', 'FontSize', 8); +xlim([freqs(1), freqs(end)]); ylim([2e-4, 1.3e1]) +leg = legend('location', 'northeast', 'FontSize', 8); +leg.ItemTokenSize(1) = 18; #+end_src #+begin_src matlab :tangle no :exports results :results file replace @@ -481,7 +484,8 @@ set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); ylabel('Magnitude'); set(gca, 'XTickLabel',[]); ylim([1e-4, 20]); -legend('location', 'northeast', 'FontSize', 8, 'NumColumns', 2); +leg = legend('location', 'northeast', 'FontSize', 8, 'NumColumns', 2); +leg.ItemTokenSize(1) = 18; % Phase ax2 = nexttile; @@ -573,7 +577,8 @@ xlabel('Frequency [Hz]'); ylabel('Magnitude'); hold off; xlim([freqs(1), freqs(end)]); ylim([1e-4, 10]); -legend('location', 'southeast', 'FontSize', 8); +leg = legend('location', 'southeast', 'FontSize', 8); +leg.ItemTokenSize(1) = 18; #+end_src #+begin_src matlab :tangle no :exports results :results file replace @@ -752,19 +757,19 @@ ylim([5e-3, 5]); % Phase ax2 = nexttile; hold on; -plot(w, 180/pi*angle(H), 'k-'); -plot(w, 180/pi*angle(1-H), 'k--'); +plot(w, 180/pi*unwrap(angle(H)), 'k-'); +plot(w, 180/pi*unwrap(angle(1-H)), 'k--'); hold off; xlabel('Frequency [Hz]'); ylabel('Phase [deg]'); set(gca, 'XScale', 'log'); -yticks([-180:90:180]); ylim([-180, 180]); +yticks([-450:90:180]); ylim([-450, 200]); linkaxes([ax1,ax2],'x'); xlim([1e-3, 1]); #+end_src #+begin_src matlab :tangle no :exports results :results file replace -exportFig('figs/fir_filter_ligo.pdf', 'width', 'wide', 'height', 'normal'); +exportFig('figs/fir_filter_ligo.pdf', 'width', 'wide', 'height', 'tall'); #+end_src #+name: fig:fir_filter_ligo @@ -828,7 +833,8 @@ xlabel('Frequency [Hz]'); ylabel('Magnitude'); hold off; xlim([freqs(1), freqs(end)]); ylim([1e-3, 10]); -legend('location', 'southeast', 'FontSize', 8); +leg = legend('location', 'southeast', 'FontSize', 8); +leg.ItemTokenSize(1) = 18; #+end_src #+begin_src matlab :tangle no :exports results :results file replace @@ -925,7 +931,8 @@ xlabel('Frequency [Hz]'); ylabel('Magnitude'); hold off; xlim([freqs(1), freqs(end)]); ylim([1e-3, 10]); -legend('location', 'southeast', 'FontSize', 8); +leg = legend('location', 'southeast', 'FontSize', 8); +leg.ItemTokenSize(1) = 18; #+end_src #+begin_src matlab :tangle no :exports results :results file replace @@ -1014,7 +1021,7 @@ addpath('./matlab'); addpath('./matlab/src'); #+end_src -#+begin_src matlab :exec no +#+begin_src matlab :eval no addpath('./src'); #+end_src @@ -1425,6 +1432,576 @@ xlim([freqs(1), freqs(end)]); #+end_src +** Compare "open-loop" shaping with "close-loop" shaping +*** Simple weights +#+begin_src matlab +n = 2; w0 = 2*pi*11; G0 = 1/10; G1 = 1000; Gc = 1/2; +W1 = ((((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 = 3; w0 = 2*pi*10; G0 = 1000; G1 = 0.1; Gc = 1/2; +W2 = ((((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); +#+end_src + +#+begin_src matlab +Pol = [0 W1 1; + W2 -W1 0]; +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +sprintf('The number of states of Pol is %i', length(Pol.StateName)) +#+end_src + +#+RESULTS: +: The number of states of Pol is 7 + +#+begin_src matlab :results output replace :exports both +tic; +[Hol, ~, gamma, ~] = hinfsyn(Pol, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); +toc; +#+end_src + +#+begin_src matlab +Hol_2 = Hol; +Hol_1 = 1 - Hol; +#+end_src + +#+begin_src matlab +Pcl = [0 W2 1 + W1 -W2 -1]; +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +sprintf('The number of states of Pcl is %i', length(Pcl.StateName)) +#+end_src + +#+RESULTS: +: The number of states of Pcl is 8 + +#+begin_src matlab :results output replace :exports both +tic; +[Hcl, ~, gamma, ~] = hinfsyn(Pcl, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); +toc; +#+end_src + +#+begin_src matlab +Hcl_1 = 1 - 1/(1 + Hcl); +Hcl_2 = 1/(1 + Hcl); +#+end_src + +#+begin_src matlab :results output replace :exports results +size(Hol_1) +size(Hol_2) +size(Hcl_1) +size(Hcl_2) +#+end_src + +#+RESULTS: +#+begin_example +size(Hol_1) +State-space model with 1 outputs, 1 inputs, and 5 states. +size(Hol_2) +State-space model with 1 outputs, 1 inputs, and 5 states. +size(Hcl_1) +State-space model with 1 outputs, 1 inputs, and 5 states. +size(Hcl_2) +State-space model with 1 outputs, 1 inputs, and 5 states. +'org_babel_eoe' +ans = + 'org_babel_eoe' +#+end_example + +#+begin_src matlab :exports none +freqs = logspace(-1, 3, 1000); + +figure; +tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + +% Magnitude +ax1 = nexttile([2, 1]); +hold on; +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(Hol_1, freqs, 'Hz'))), '-', ... + 'DisplayName', '$H_H(s)$ - $\mathcal{H}_\infty$ OL'); +set(gca,'ColorOrderIndex',2); +plot(freqs, abs(squeeze(freqresp(Hol_2, freqs, 'Hz'))), '-', ... + 'DisplayName', '$H_L(s)$ - $\mathcal{H}_\infty$ OL'); + +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(Hcl_1, freqs, 'Hz'))), '--', ... + 'DisplayName', '$H_H(s)$ - $\mathcal{H}_\infty$ CL'); +set(gca,'ColorOrderIndex',2); +plot(freqs, abs(squeeze(freqresp(Hcl_2, freqs, 'Hz'))), '--', ... + 'DisplayName', '$H_L(s)$ - $\mathcal{H}_\infty$ CL'); + +hold off; +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Magnitude'); +set(gca, 'XTickLabel',[]); +leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2); +leg.ItemTokenSize(1) = 16; + +% Phase +ax2 = nexttile; +hold on; +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hol_1, freqs, 'Hz')))), '-'); +set(gca,'ColorOrderIndex',2); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hol_2, freqs, 'Hz')))), '-'); + +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hcl_1, freqs, 'Hz')))), '--'); +set(gca,'ColorOrderIndex',2); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hcl_2, freqs, 'Hz')))), '--'); +set(gca, 'XScale', 'log'); +xlabel('Frequency [Hz]'); ylabel('Phase [deg]'); +hold off; +yticks([-450:90:180]); ylim([-450, 200]); + +linkaxes([ax1,ax2],'x'); +xlim([freqs(1), freqs(end)]); +#+end_src + +*** Simple weights with LMI +#+begin_src matlab +n = 2; w0 = 2*pi*11; G0 = 1/10; G1 = 1000; Gc = 1/2; +W1 = ((((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 = 3; w0 = 2*pi*10; G0 = 1000; G1 = 0.1; Gc = 1/2; +W2 = ((((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); +#+end_src + +#+begin_src matlab +Pol = [0 W1 1; + W2 -W1 0]; +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +sprintf('The number of states of Pol is %i', length(Pol.StateName)) +#+end_src + +#+RESULTS: +: The number of states of Pol is 7 + +#+begin_src matlab :results output replace :exports both +tic; +[Hol, ~, gamma, ~] = hinfsyn(Pol, 1, 1,'TOLGAM', 0.001, 'METHOD', 'lmi', 'DISPLAY', 'on'); +toc; +#+end_src + +#+begin_src matlab +Hol_2 = Hol; +Hol_1 = 1 - Hol; +#+end_src + +#+begin_src matlab +Pcl = [0 W2 1 + W1 -W2 -1]; +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +sprintf('The number of states of Pcl is %i', length(Pcl.StateName)) +#+end_src + +#+RESULTS: +: The number of states of Pcl is 8 + +#+begin_src matlab :results output replace :exports both +tic; +[Hcl, ~, gamma, ~] = hinfsyn(Pcl, 1, 1,'TOLGAM', 0.001, 'METHOD', 'lmi', 'DISPLAY', 'on'); +toc; +#+end_src + +#+begin_src matlab +Hcl_1 = 1 - 1/(1 + Hcl); +Hcl_2 = 1/(1 + Hcl); +#+end_src + +#+begin_src matlab :results output replace :exports results +size(Hol_1) +size(Hol_2) +size(Hcl_1) +size(Hcl_2) +#+end_src + +#+RESULTS: +#+begin_example +size(Hol_1) +State-space model with 1 outputs, 1 inputs, and 5 states. +size(Hol_2) +State-space model with 1 outputs, 1 inputs, and 5 states. +size(Hcl_1) +State-space model with 1 outputs, 1 inputs, and 5 states. +size(Hcl_2) +State-space model with 1 outputs, 1 inputs, and 5 states. +'org_babel_eoe' +ans = + 'org_babel_eoe' +#+end_example + +#+begin_src matlab :exports none +freqs = logspace(-1, 3, 1000); + +figure; +tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + +% Magnitude +ax1 = nexttile([2, 1]); +hold on; +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(Hol_1, freqs, 'Hz'))), '-', ... + 'DisplayName', '$H_H(s)$ - $\mathcal{H}_\infty$ OL'); +set(gca,'ColorOrderIndex',2); +plot(freqs, abs(squeeze(freqresp(Hol_2, freqs, 'Hz'))), '-', ... + 'DisplayName', '$H_L(s)$ - $\mathcal{H}_\infty$ OL'); + +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(Hcl_1, freqs, 'Hz'))), '--', ... + 'DisplayName', '$H_H(s)$ - $\mathcal{H}_\infty$ CL'); +set(gca,'ColorOrderIndex',2); +plot(freqs, abs(squeeze(freqresp(Hcl_2, freqs, 'Hz'))), '--', ... + 'DisplayName', '$H_L(s)$ - $\mathcal{H}_\infty$ CL'); + +hold off; +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Magnitude'); +set(gca, 'XTickLabel',[]); +leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2); +leg.ItemTokenSize(1) = 16; + +% Phase +ax2 = nexttile; +hold on; +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hol_1, freqs, 'Hz')))), '-'); +set(gca,'ColorOrderIndex',2); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hol_2, freqs, 'Hz')))), '-'); + +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hcl_1, freqs, 'Hz')))), '--'); +set(gca,'ColorOrderIndex',2); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hcl_2, freqs, 'Hz')))), '--'); +set(gca, 'XScale', 'log'); +xlabel('Frequency [Hz]'); ylabel('Phase [deg]'); +hold off; +yticks([-450:90:180]); ylim([-450, 200]); + +linkaxes([ax1,ax2],'x'); +xlim([freqs(1), freqs(end)]); +#+end_src + +*** Complex weights +#+begin_src matlab :exports none +w1 = 2*pi*0.008; x1 = 0.35; +w2 = 2*pi*0.04; x2 = 0.5; +w3 = 2*pi*0.05; x3 = 0.5; + +% Slope of +3 from w1 +wH = 0.008*(s^2/w1^2 + 2*x1/w1*s + 1)*(s/w1 + 1); +% Little bump from w2 to w3 +wH = wH*(s^2/w2^2 + 2*x2/w2*s + 1)/(s^2/w3^2 + 2*x3/w3*s + 1); +% No Slope at high frequencies +wH = wH/(s^2/w3^2 + 2*x3/w3*s + 1)/(s/w3 + 1); +% Little bump between w2 and w3 +w0 = 2*pi*0.045; xi = 0.1; A = 2; n = 1; +wH = wH*((s^2 + 2*w0*xi*A^(1/n)*s + w0^2)/(s^2 + 2*w0*xi*s + w0^2))^n; + +wH = 1/wH; +W1 = wH; +#+end_src + +#+begin_src matlab :exports none +n = 20; Rp = 1; Wp = 2*pi*0.102; +[b,a] = cheby1(n, Rp, Wp, 'high', 's'); +wL = 0.04*tf(a, b); + +wL = 1/wL; +W2 = wL; +#+end_src + +#+begin_src matlab +Pol = ss([0 W1 1; + W2 -W1 0]); +#+end_src + +#+begin_src matlab +Pcl = ss([0 W2 1 + W1 -W2 -1]); +#+end_src + +#+begin_src matlab :results output replace :exports results +size(Pol) +size(Pcl) +#+end_src + +#+RESULTS: +: size(Pol) +: State-space model with 2 outputs, 3 inputs, and 27 states. +: size(Pcl) +: State-space model with 2 outputs, 3 inputs, and 27 states. + +#+begin_src matlab :results output replace :exports both +tic; +for iter = 1:10 + [Hol, ~, gamma, ~] = hinfsyn(Pol, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'off'); +end; +toc; +#+end_src + +#+begin_src matlab +Hol_1 = 1 - Hol; +Hol_2 = Hol; +#+end_src + +#+begin_src matlab :results output replace :exports both +tic; +for iter = 1:10 + [Hcl, ~, gamma, ~] = hinfsyn(Pcl, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'off'); +end +toc; +#+end_src + +#+begin_src matlab +Hcl_1 = 1 - 1/(1 + Hcl); +Hcl_2 = 1/(1 + Hcl); +#+end_src + +#+begin_src matlab :results output replace :exports results +size(Hol_1) +size(Hol_2) +size(Hcl_1) +size(Hcl_2) +#+end_src + +#+RESULTS: +#+begin_example +size(Hol_1) +State-space model with 1 outputs, 1 inputs, and 27 states. +size(Hol_2) +State-space model with 1 outputs, 1 inputs, and 27 states. +size(Hcl_1) +State-space model with 1 outputs, 1 inputs, and 27 states. +size(Hcl_2) +State-space model with 1 outputs, 1 inputs, and 27 states. +'org_babel_eoe' +ans = + 'org_babel_eoe' +#+end_example + +#+begin_src matlab :exports none +freqs = logspace(-3, 1, 1000); + +figure; +tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + +% Magnitude +ax1 = nexttile([2, 1]); +hold on; +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(Hol_1, freqs, 'Hz'))), '-', ... + 'DisplayName', '$H_H(s)$ - $\mathcal{H}_\infty$ OL'); +set(gca,'ColorOrderIndex',2); +plot(freqs, abs(squeeze(freqresp(Hol_2, freqs, 'Hz'))), '-', ... + 'DisplayName', '$H_L(s)$ - $\mathcal{H}_\infty$ OL'); + +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(Hcl_1, freqs, 'Hz'))), '--', ... + 'DisplayName', '$H_H(s)$ - $\mathcal{H}_\infty$ CL'); +set(gca,'ColorOrderIndex',2); +plot(freqs, abs(squeeze(freqresp(Hcl_2, freqs, 'Hz'))), '--', ... + 'DisplayName', '$H_L(s)$ - $\mathcal{H}_\infty$ CL'); + +hold off; +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Magnitude'); +set(gca, 'XTickLabel',[]); +ylim([5e-3, 10]); +leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2); +leg.ItemTokenSize(1) = 16; + +% Phase +ax2 = nexttile; +hold on; +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hol_1, freqs, 'Hz')))), '-'); +set(gca,'ColorOrderIndex',2); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hol_2, freqs, 'Hz')))), '-'); + +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hcl_1, freqs, 'Hz')))), '--'); +set(gca,'ColorOrderIndex',2); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hcl_2, freqs, 'Hz')))), '--'); +set(gca, 'XScale', 'log'); +xlabel('Frequency [Hz]'); ylabel('Phase [deg]'); +hold off; +yticks([-450:90:180]); ylim([-450, 200]); + +linkaxes([ax1,ax2],'x'); +xlim([freqs(1), freqs(end)]); +#+end_src + +*** Complex weights with alternative conf + +#+begin_src matlab +Pcl = ss([W1 -W1; + 0 W2; + 1 -1]); +#+end_src + +#+begin_src matlab :results output replace :exports both +tic; +[Hcl, ~, gamma, ~] = hinfsyn(Pcl, 1, 1,'TOLGAM', 0.001, 'METHOD', 'ric', 'DISPLAY', 'on'); +toc; +#+end_src + +#+begin_src matlab +Hcl_1 = 1 - 1/(1 + Hcl); +Hcl_2 = 1/(1 + Hcl); +#+end_src + + + +*** Complex weights with LMI +#+begin_src matlab :exports none +w1 = 2*pi*0.008; x1 = 0.35; +w2 = 2*pi*0.04; x2 = 0.5; +w3 = 2*pi*0.05; x3 = 0.5; + +% Slope of +3 from w1 +wH = 0.008*(s^2/w1^2 + 2*x1/w1*s + 1)*(s/w1 + 1); +% Little bump from w2 to w3 +wH = wH*(s^2/w2^2 + 2*x2/w2*s + 1)/(s^2/w3^2 + 2*x3/w3*s + 1); +% No Slope at high frequencies +wH = wH/(s^2/w3^2 + 2*x3/w3*s + 1)/(s/w3 + 1); +% Little bump between w2 and w3 +w0 = 2*pi*0.045; xi = 0.1; A = 2; n = 1; +wH = wH*((s^2 + 2*w0*xi*A^(1/n)*s + w0^2)/(s^2 + 2*w0*xi*s + w0^2))^n; + +wH = 1/wH; +W1 = ss(minreal(wH)); +#+end_src + +#+begin_src matlab :exports none +n = 20; Rp = 1; Wp = 2*pi*0.102; +[b,a] = cheby1(n, Rp, Wp, 'high', 's'); +wL = 0.04*tf(a, b); + +wL = 1/wL; +W2 = ss(minreal(wL)); +#+end_src + +#+begin_src matlab +Pol = [0 W1 1; + W2 -W1 0]; +#+end_src + +#+begin_src matlab +Pcl = [0 W2 1 + W1 -W2 -1]; +#+end_src + +#+begin_src matlab :results output replace :exports both +tic; +[Hol, ~, gamma, ~] = hinfsyn(Pol, 1, 1,'TOLGAM', 0.001, 'METHOD', 'lmi', 'DISPLAY', 'on'); +toc; +#+end_src + +#+begin_src matlab +Hol_1 = 1 - Hol; +Hol_2 = Hol; +#+end_src + +#+begin_src matlab :results output replace :exports both +tic; +[Hcl, ~, gamma, ~] = hinfsyn(Pcl, 1, 1,'TOLGAM', 0.001, 'METHOD', 'lmi', 'DISPLAY', 'on'); +toc; +#+end_src + +#+begin_src matlab +Hcl_1 = 1 - 1/(1 + Hcl); +Hcl_2 = 1/(1 + Hcl); +#+end_src + +#+begin_src matlab :results output replace :exports results +size(Hol_1) +size(Hol_2) +size(Hcl_1) +size(Hcl_2) +#+end_src + +#+RESULTS: +#+begin_example +size(Hol_1) +State-space model with 1 outputs, 1 inputs, and 34 states. +size(Hol_2) +State-space model with 1 outputs, 1 inputs, and 34 states. +size(Hcl_1) +State-space model with 1 outputs, 1 inputs, and 47 states. +size(Hcl_2) +State-space model with 1 outputs, 1 inputs, and 47 states. +'org_babel_eoe' +ans = + 'org_babel_eoe' +#+end_example + +#+begin_src matlab :exports none +freqs = logspace(-3, 1, 1000); + +figure; +tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + +% Magnitude +ax1 = nexttile([2, 1]); +hold on; +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(Hol_1, freqs, 'Hz'))), '-', ... + 'DisplayName', '$H_H(s)$ - $\mathcal{H}_\infty$ OL'); +set(gca,'ColorOrderIndex',2); +plot(freqs, abs(squeeze(freqresp(Hol_2, freqs, 'Hz'))), '-', ... + 'DisplayName', '$H_L(s)$ - $\mathcal{H}_\infty$ OL'); + +set(gca,'ColorOrderIndex',1); +plot(freqs, abs(squeeze(freqresp(Hcl_1, freqs, 'Hz'))), '--', ... + 'DisplayName', '$H_H(s)$ - $\mathcal{H}_\infty$ CL'); +set(gca,'ColorOrderIndex',2); +plot(freqs, abs(squeeze(freqresp(Hcl_2, freqs, 'Hz'))), '--', ... + 'DisplayName', '$H_L(s)$ - $\mathcal{H}_\infty$ CL'); + +hold off; +set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); +ylabel('Magnitude'); +set(gca, 'XTickLabel',[]); +ylim([5e-3, 10]); +leg = legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 2); +leg.ItemTokenSize(1) = 16; + +% Phase +ax2 = nexttile; +hold on; +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hol_1, freqs, 'Hz')))), '-'); +set(gca,'ColorOrderIndex',2); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hol_2, freqs, 'Hz')))), '-'); + +set(gca,'ColorOrderIndex',1); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hcl_1, freqs, 'Hz')))), '--'); +set(gca,'ColorOrderIndex',2); +plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Hcl_2, freqs, 'Hz')))), '--'); +set(gca, 'XScale', 'log'); +xlabel('Frequency [Hz]'); ylabel('Phase [deg]'); +hold off; +yticks([-450:90:180]); ylim([-450, 200]); + +linkaxes([ax1,ax2],'x'); +xlim([freqs(1), freqs(end)]); +#+end_src + +*** Conclusion +#+begin_important +There is no difference between " open-loop" shaping and "close-loop" shaping: +- same " solving" time +- same obtained filter orders +#+end_important + * Impose a positive slope at DC or a negative slope at infinite frequency ** Introduction :ignore: diff --git a/tikz/index.org b/tikz/index.org index d8ada88..5dfb77e 100644 --- a/tikz/index.org +++ b/tikz/index.org @@ -21,20 +21,62 @@ Configuration file is accessible [[file:config.org][here]]. +* Sensor Fusion - Overview +#+begin_src latex :file sensor_fusion_overview.pdf +\definecolor{myblue}{rgb}{0, 0.447, 0.741} +\definecolor{myred}{rgb}{0.8500, 0.325, 0.098} + +\begin{tikzpicture} + \node[branch] (x) at (0, 0); + \node[block, above right=0.3 and 0.5 of x](sensor1){Sensor 1}; + \node[block, below right=0.3 and 0.5 of x](sensor2){Sensor 2}; + + \node[block, right=1.1 of sensor1](H1){$H_1(s)$}; + \node[block, right=1.1 of sensor2](H2){$H_2(s)$}; + + \node[addb, right=5.0 of x](add){}; + + \draw[] ($(x)+(-0.7, 0)$) node[above right]{$x$} -- (x.center); + \draw[->] (x.center) |- (sensor1.west); + \draw[->] (x.center) |- (sensor2.west); + \draw[->] (sensor1.east) -- node[midway, above]{$\hat{x}_1$} (H1.west); + \draw[->] (sensor2.east) -- node[midway, above]{$\hat{x}_2$} (H2.west); + \draw[->] (H1) -| (add.north); + \draw[->] (H2) -| (add.south); + \draw[->] (add.east) -- ++(0.9, 0) node[above left]{$\hat{x}$}; + + \begin{scope}[on background layer] + \node[fit={($(H2.south-|x) + (0, -0.2)$) ($(H1.north-|add.east) + (0.2, 0.6)$)}, fill=black!10!white, draw, inner sep=6pt] (supersensor) {}; + \node[below] at (supersensor.north) {Super Sensor}; + + \node[fit={(sensor2.south west) (sensor1.north east)}, fill=black!20!white, draw, inner sep=6pt] (sensors) {}; + \node[align=center] at (sensors.center) {{\tiny Normalized}\\[-0.5em]{\tiny Sensors}}; + + \node[fit={(H2.south west) (H1.north-|add.east)}, fill=black!20!white, draw, inner sep=6pt] (filters) {}; + \node[align=center] at ($(filters.center) + (-0.3, 0)$) {{\tiny Complementary}\\[-0.5em]{\tiny Filters}}; + \end{scope} +\end{tikzpicture} +#+end_src + +#+name: fig:sensor_fusion_overview +#+caption: Sensor Fusion Architecture - Overview +#+RESULTS: +[[file:figs/sensor_fusion_overview.png]] + * Sensor Model #+begin_src latex :file sensor_model.pdf \begin{tikzpicture} \node[addb](add1){}; - \node[block, right=0.8 of add1](G1){$G_1(s)$}; + \node[block, right=0.8 of add1](G1){$G_i(s)$}; \draw[->] ($(add1.west)+(-0.7, 0)$) node[above right]{$x$} -- (add1.west); - \draw[<-] (add1.north) -- ++(0, 0.7)node[below right](n1){$n_1$}; + \draw[<-] (add1.north) -- ++(0, 0.7)node[below right](n1){$n_i$}; \draw[->] (add1.east) -- (G1.west); - \draw[->] (G1.east) -- ++(0.7, 0) node[above left]{$\tilde{x}_1$}; + \draw[->] (G1.east) -- ++(0.7, 0) node[above left]{$\tilde{x}_i$}; \begin{scope}[on background layer] \node[fit={(add1.west |- G1.south) (n1.north -| G1.east)}, fill=black!20!white, draw, inner sep=3pt] (sensor1) {}; - \node[below left] at (sensor1.north east) {Sensor 1}; + \node[below left] at (sensor1.north east) {Sensor}; \end{scope} \end{tikzpicture} #+end_src @@ -48,21 +90,21 @@ Configuration file is accessible [[file:config.org][here]]. #+begin_src latex :file sensor_model_calibrated.pdf \begin{tikzpicture} \node[addb](add1){}; - \node[block, right=0.8 of add1](G1){$G_1(s)$}; - \node[block, right=0.8 of G1](G1inv){$\hat{G}_1^{-1}(s)$}; + \node[block, right=0.8 of add1](G1){$G_i(s)$}; + \node[block, right=0.8 of G1](G1inv){$\hat{G}_i^{-1}(s)$}; \draw[->] ($(add1.west)+(-0.7, 0)$) node[above right]{$x$} -- (add1.west); - \draw[<-] (add1.north) -- ++(0, 0.7)node[below right](n1){$n_1$}; + \draw[<-] (add1.north) -- ++(0, 0.7)node[below right](n1){$n_i$}; \draw[->] (add1.east) -- (G1.west); - \draw[->] (G1.east) -- (G1inv.west) node[above left]{$\tilde{x}_1$}; - \draw[->] (G1inv.east) -- ++(0.8, 0) node[above left]{$\hat{x}_1$}; + \draw[->] (G1.east) -- (G1inv.west) node[above left]{$\tilde{x}_i$}; + \draw[->] (G1inv.east) -- ++(0.8, 0) node[above left]{$\hat{x}_i$}; \begin{scope}[on background layer] \node[fit={(add1.west |- G1inv.south) (n1.north -| G1inv.east)}, fill=black!10!white, draw, inner sep=6pt] (sensor1cal) {}; - \node[below left] at (sensor1cal.north east) {Calibration}; + \node[below left, align=right] at (sensor1cal.north east) {{\tiny Normalized}\\[-0.5em]{\tiny sensor}}; \node[fit={(add1.west |- G1.south) (n1.north -| G1.east)}, fill=black!20!white, draw, inner sep=3pt] (sensor1) {}; - \node[below left] at (sensor1.north east) {Sensor 1}; + \node[below left] at (sensor1.north east) {Sensor}; \end{scope} \end{tikzpicture} #+end_src @@ -72,73 +114,8 @@ Configuration file is accessible [[file:config.org][here]]. #+RESULTS: [[file:figs/sensor_model_calibrated.png]] -* Sensor Model with Uncertainty -#+begin_src latex :file sensor_model_uncertainty.pdf -\begin{tikzpicture} - \node[branch] (input) at (0,0) {}; - \node[block, above right= 0.4 and 0.4 of input](W1){$w_1(s)$}; - \node[block, right=0.4 of W1](delta1){$\Delta_1(s)$}; - \node[addb] (addu) at ($(delta1.east|-input) + (0.4, 0)$) {}; - \node[addb, right=0.4 of addu] (addn) {}; - \node[block, right=0.4 of addn] (G1) {$\hat{G}_1(s)$}; - \node[block, right=0.8 of G1](G1inv){$\hat{G}_1^{-1}(s)$}; - - \draw[->] ($(input)+(-0.7, 0)$) node[above right]{$x$} -- (addu); - \draw[->] (input.center) |- (W1.west); - \draw[->] (W1.east) -- (delta1.west); - \draw[->] (delta1.east) -| (addu.north); - \draw[->] (addu.east) -- (addn.west); - \draw[->] (addn.east) -- (G1.west); - \draw[<-] (addn.north) -- ++(0, 0.7)node[below right](n1){$n_1$}; - \draw[->] (G1.east) -- (G1inv.west) node[above left]{$\tilde{x}_1$}; - \draw[->] (G1inv.east) -- ++(0.8, 0) node[above left]{$\hat{x}_1$}; - - \begin{scope}[on background layer] - \node[fit={(input.west |- G1inv.south) (delta1.north -| G1inv.east)}, fill=black!10!white, draw, inner sep=6pt] (sensor1cal) {}; - \node[below left] at (sensor1cal.north east) {Calibration}; - - \node[fit={(input.west |- G1.south) (delta1.north -| G1.east)}, fill=black!20!white, draw, inner sep=3pt] (sensor1) {}; - \node[below left] at (sensor1.north east) {Sensor 1}; - \end{scope} -\end{tikzpicture} -#+end_src - -#+name: fig:sensor_model_uncertainty -#+caption: Input Uncertainty -#+RESULTS: -[[file:figs/sensor_model_uncertainty.png]] - -* Sensor Model with Uncertainty - Simplified -#+begin_src latex :file sensor_model_uncertainty_simplified.pdf -\begin{tikzpicture} - \node[branch] (input) at (0,0) {}; - \node[block, above right= 0.4 and 0.4 of input](W1){$w_1(s)$}; - \node[block, right=0.4 of W1](delta1){$\Delta_1(s)$}; - \node[addb] (addu) at ($(delta1.east|-input) + (0.4, 0)$) {}; - \node[addb, right=0.4 of addu] (addn) {}; - - \draw[->] ($(input)+(-0.7, 0)$) node[above right]{$x$} -- (addu); - \draw[->] (input.center) |- (W1.west); - \draw[->] (W1.east) -- (delta1.west); - \draw[->] (delta1.east) -| (addu.north); - \draw[->] (addu.east) -- (addn.west); - \draw[<-] (addn.north) -- ++(0, 0.7)node[below right](n1){$n_1$}; - \draw[->] (addn.east) -- ++(0.9, 0) node[above left]{$\hat{x}_1$}; - - \begin{scope}[on background layer] - \node[fit={(input.west |- addu.south) ($(delta1.north -| addn.east) + (0.1, 0.3)$)}, fill=black!10!white, draw, inner sep=6pt] (sensor1cal) {}; - \node[below left] at (sensor1cal.north east) {Calibrated Sensor}; - \end{scope} -\end{tikzpicture} -#+end_src - -#+name: fig:sensor_model_uncertainty_simplified -#+caption: Input Uncertainty -#+RESULTS: -[[file:figs/sensor_model_uncertainty_simplified.png]] - * Sensor Fusion Architecture -#+begin_src latex :file fusion_super_sensor.pdf :tangle figs/fusion_super_sensor.tex +#+begin_src latex :file fusion_super_sensor.pdf \definecolor{myblue}{rgb}{0, 0.447, 0.741} \definecolor{myred}{rgb}{0.8500, 0.325, 0.098} @@ -174,12 +151,12 @@ Configuration file is accessible [[file:config.org][here]]. \node[below left] at (supersensor.north east) {Super Sensor}; \node[fit={(add1.west |- G1inv.south) (n1.north -| G1inv.east)}, fill=myblue!20!white, draw, inner sep=6pt] (sensor1cal) {}; - \node[below left] at (sensor1cal.north east) {Calibration}; + \node[below left, align=right] at (sensor1cal.north east) {{\tiny Normalized}\\[-0.5em]{\tiny sensor}}; \node[fit={(add1.west |- G1.south) (n1.north -| G1.east)}, fill=myblue!30!white, draw, inner sep=3pt] (sensor1) {}; \node[below left] at (sensor1.north east) {Sensor 1}; \node[fit={(add2.west |- G2inv.south) (n2.north -| G2inv.east)}, fill=myred!20!white, draw, inner sep=6pt] (sensor2cal) {}; - \node[below left] at (sensor2cal.north east) {Calibration}; + \node[below left, align=right] at (sensor2cal.north east) {{\tiny Normalized}\\[-0.5em]{\tiny sensor}}; \node[fit={(add2.west |- G2.south) (n2.north -| G2.east)}, fill=myred!30!white, draw, inner sep=3pt] (sensor2) {}; \node[below left] at (sensor2.north east) {Sensor 2}; \end{scope} @@ -191,6 +168,71 @@ Configuration file is accessible [[file:config.org][here]]. #+RESULTS: [[file:figs/fusion_super_sensor.png]] +* Sensor Model with Uncertainty +#+begin_src latex :file sensor_model_uncertainty.pdf +\begin{tikzpicture} + \node[branch] (input) at (0,0) {}; + \node[block, above right= 0.4 and 0.4 of input](W1){$w_1(s)$}; + \node[block, right=0.4 of W1](delta1){$\Delta_1(s)$}; + \node[addb] (addu) at ($(delta1.east|-input) + (0.4, 0)$) {}; + \node[addb, right=0.4 of addu] (addn) {}; + \node[block, right=0.4 of addn] (G1) {$\hat{G}_1(s)$}; + \node[block, right=0.8 of G1](G1inv){$\hat{G}_1^{-1}(s)$}; + + \draw[->] ($(input)+(-0.7, 0)$) node[above right]{$x$} -- (addu); + \draw[->] (input.center) |- (W1.west); + \draw[->] (W1.east) -- (delta1.west); + \draw[->] (delta1.east) -| (addu.north); + \draw[->] (addu.east) -- (addn.west); + \draw[->] (addn.east) -- (G1.west); + \draw[<-] (addn.north) -- ++(0, 0.7)node[below right](n1){$n_1$}; + \draw[->] (G1.east) -- (G1inv.west) node[above left]{$\tilde{x}_1$}; + \draw[->] (G1inv.east) -- ++(0.8, 0) node[above left]{$\hat{x}_1$}; + + \begin{scope}[on background layer] + \node[fit={(input.west |- G1inv.south) (delta1.north -| G1inv.east)}, fill=black!10!white, draw, inner sep=6pt] (sensor1cal) {}; + \node[below left, align=right] at (sensor1cal.north east) {{\tiny Normalized}\\[-0.5em]{\tiny sensor}}; + + \node[fit={(input.west |- G1.south) (delta1.north -| G1.east)}, fill=black!20!white, draw, inner sep=3pt] (sensor1) {}; + \node[below left] at (sensor1.north east) {Sensor}; + \end{scope} +\end{tikzpicture} +#+end_src + +#+name: fig:sensor_model_uncertainty +#+caption: Input Uncertainty +#+RESULTS: +[[file:figs/sensor_model_uncertainty.png]] + +* Sensor Model with Uncertainty - Simplified +#+begin_src latex :file sensor_model_uncertainty_simplified.pdf +\begin{tikzpicture} + \node[branch] (input) at (0,0) {}; + \node[block, above right= 0.4 and 0.4 of input](W1){$w_1(s)$}; + \node[block, right=0.4 of W1](delta1){$\Delta_1(s)$}; + \node[addb] (addu) at ($(delta1.east|-input) + (0.4, 0)$) {}; + \node[addb, right=0.4 of addu] (addn) {}; + + \draw[->] ($(input)+(-0.7, 0)$) node[above right]{$x$} -- (addu); + \draw[->] (input.center) |- (W1.west); + \draw[->] (W1.east) -- (delta1.west); + \draw[->] (delta1.east) -| (addu.north); + \draw[->] (addu.east) -- (addn.west); + \draw[<-] (addn.north) -- ++(0, 0.7)node[below right](n1){$n_1$}; + \draw[->] (addn.east) -- ++(0.9, 0) node[above left]{$\hat{x}_1$}; + + \begin{scope}[on background layer] + \node[fit={(input.west |- addu.south) ($(delta1.north -| addn.east) + (0.1, 0.4)$)}, fill=black!10!white, draw, inner sep=6pt] (sensor1cal) {}; + \node[below] at (sensor1cal.north) {Normalized Sensor}; + \end{scope} +\end{tikzpicture} +#+end_src + +#+name: fig:sensor_model_uncertainty_simplified +#+caption: Input Uncertainty +#+RESULTS: +[[file:figs/sensor_model_uncertainty_simplified.png]] + * Sensor fusion architecture with sensor dynamics uncertainty #+begin_src latex :file sensor_fusion_dynamic_uncertainty.pdf :tangle figs/fusion_super_sensor.tex \definecolor{myblue}{rgb}{0, 0.447, 0.741} @@ -199,10 +241,10 @@ Configuration file is accessible [[file:config.org][here]]. \begin{tikzpicture} \node[branch] (x) at (0, 0); - \node[branch, above right=0.9 and 0.3 of x] (input1) {}; - \node[branch, below right=0.9 and 0.3 of x] (input2) {}; - \node[block, above right= 0.4 and 0.4 of input1](W1){$w_1(s)$}; - \node[block, above right= 0.4 and 0.4 of input2](W2){$w_2(s)$}; + \node[branch, above right=1.0 and 0.3 of x] (input1) {}; + \node[branch, below right=1.0 and 0.3 of x] (input2) {}; + \node[block, above right= 0.4 and 0.3 of input1](W1){$w_1(s)$}; + \node[block, above right= 0.4 and 0.3 of input2](W2){$w_2(s)$}; \node[block, right=0.4 of W1](delta1){$\Delta_1(s)$}; \node[block, right=0.4 of W2](delta2){$\Delta_2(s)$}; \node[addb] (addu1) at ($(delta1.east|-input1) + (0.4, 0)$) {}; @@ -222,12 +264,12 @@ Configuration file is accessible [[file:config.org][here]]. \draw[->] (W1.east) -- (delta1.west); \draw[->] (delta1.east) -| (addu1.north); \draw[->] (addu1.east) -- (addn1.west); - \draw[<-] (addn1.north) -- ++(0, 0.7)node[below right](n1){$n_1$}; + \draw[<-] (addn1.north) -- ++(0, 0.6)node[below right](n1){$n_1$}; \draw[->] (input2.center) |- (W2.west); \draw[->] (W2.east) -- (delta2.west); \draw[->] (delta2.east) -| (addu2.north); \draw[->] (addu2.east) -- (addn2.west); - \draw[<-] (addn2.north) -- ++(0, 0.7)node[below right](n2){$n_2$}; + \draw[<-] (addn2.north) -- ++(0, 0.6)node[below right](n2){$n_2$}; \draw[->] (addn1.east) -- (H1.west) node[above left]{$\hat{x}_1$}; \draw[->] (addn2.east) -- (H2.west) node[above left]{$\hat{x}_2$}; @@ -240,10 +282,10 @@ Configuration file is accessible [[file:config.org][here]]. \node[below left] at (supersensor.north east) {Super Sensor}; \node[fit={(input1.west |- addu1.south) ($(delta1.north -| addn1.east) + (0.1, 0.0)$)}, fill=myblue!20!white, draw, inner sep=6pt] (sensor1cal) {}; - \node[below left] at (sensor1cal.north east) {Sensor 1}; + \node[below left, align=right] at (sensor1cal.north east) {{\tiny Normalized}\\[-0.5em]{\tiny sensor 1}}; \node[fit={(input2.west |- addu2.south) ($(delta2.north -| addn1.east) + (0.1, 0.0)$)}, fill=myred!20!white, draw, inner sep=6pt] (sensor2cal) {}; - \node[below left] at (sensor2cal.north east) {Sensor 2}; + \node[below left, align=right] at (sensor2cal.north east) {{\tiny Normalized}\\[-0.5em]{\tiny sensor 2}}; \end{scope} \end{tikzpicture} #+end_src @@ -332,86 +374,10 @@ Configuration file is accessible [[file:config.org][here]]. #+RESULTS: [[file:figs/h_infinity_robust_fusion.png]] -* Frequency response of the weighting functions and complementary filters obtained using $\mathcal{H}_\infty$ synthesis -#+begin_src latex :file hinf_synthesis_results.pdf :tangle figs/hinf_synthesis_results.tex :exports both - \setlength\fwidth{6.5cm} - \setlength\fheight{6cm} - - \begin{tikzpicture} - \begin{axis}[% - width=1.0\fwidth, - height=0.5\fheight, - at={(0.0\fwidth, 0.47\fheight)}, - scale only axis, - xmode=log, - xmin=0.1, - xmax=1000, - xtick={0.1, 1, 10, 100, 1000}, - xticklabels={{}}, - xminorticks=true, - ymode=log, - ymin=0.0005, - ymax=20, - ytick={0.001, 0.01, 0.1, 1, 10}, - yminorticks=true, - ylabel={Magnitude}, - xminorgrids, - yminorgrids, - ] - \addplot [color=mycolor1, line width=1.5pt, forget plot] - table [x=freqs, y=H1, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_filters_results.csv}; - - \addplot [color=mycolor2, line width=1.5pt, forget plot] - table [x=freqs, y=H2, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_filters_results.csv}; - - \addplot [color=mycolor1, dashed, line width=1.5pt, forget plot] - table [x=freqs, y=W1, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_weights.csv}; - - \addplot [color=mycolor2, dashed, line width=1.5pt, forget plot] - table [x=freqs, y=W2, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_weights.csv}; - \end{axis} - - \begin{axis}[% - width=1.0\fwidth, - height=0.45\fheight, - at={(0.0\fwidth, 0.0\fheight)}, - scale only axis, - xmode=log, - xmin=0.1, - xmax=1000, - xtick={0.1, 1, 10, 100, 1000}, - xminorticks=true, - xlabel={Frequency [Hz]}, - ymin=-200, - ymax=200, - ytick={-180, -90, 0, 90, 180}, - ylabel={Phase [deg]}, - xminorgrids, - legend style={at={(1,1.1)}, outer sep=2pt , anchor=north east, legend cell align=left, align=left, draw=black, nodes={scale=0.7, transform shape}}, - ] - \addlegendimage{color=mycolor1, dashed, line width=1.5pt} - \addlegendentry{$W_1^{-1}$}; - \addlegendimage{color=mycolor2, dashed, line width=1.5pt} - \addlegendentry{$W_2^{-1}$}; - \addplot [color=mycolor1, line width=1.5pt] - table [x=freqs, y=H1p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_filters_results.csv}; - \addlegendentry{$H_1$}; - \addplot [color=mycolor2, line width=1.5pt] - table [x=freqs, y=H2p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_filters_results.csv}; - \addlegendentry{$H_2$}; - \end{axis} - \end{tikzpicture} -#+end_src - -#+name: fig:hinf_synthesis_results -#+caption: Frequency response of the weighting functions and complementary filters obtained using $\mathcal{H}_\infty$ synthesis ([[./figs/hinf_synthesis_results.png][png]], [[./figs/hinf_synthesis_results.pdf][pdf]], [[./figs/hinf_synthesis_results.tex][tex]]). -#+RESULTS: -[[file:figs/hinf_synthesis_results.png]] - * Architecture for $\mathcal{H}_\infty$ synthesis of three complementary filters #+begin_src latex :file comp_filter_three_hinf.pdf :tangle figs/comp_filter_three_hinf.tex \begin{tikzpicture} - \node[block={5.0cm}{3.5cm}, fill=black!20!white, dashed] (P) {}; + \node[block={5.0cm}{4.5cm}, fill=black!20!white] (P) {}; \node[above] at (P.north) {$P(s)$}; \coordinate[] (inputw) at ($(P.south west)!0.8!(P.north west) + (-0.7, 0)$); @@ -453,241 +419,3 @@ Configuration file is accessible [[file:config.org][here]]. #+RESULTS: [[file:figs/comp_filter_three_hinf.png]] -* Frequency response of the weighting functions and three complementary filters obtained using $\mathcal{H}_\infty$ synthesis -#+begin_src latex :file hinf_three_synthesis_results.pdf :tangle figs/hinf_three_synthesis_results.tex :exports both - \setlength\fwidth{6.5cm} - \setlength\fheight{6cm} - - \begin{tikzpicture} - \begin{axis}[% - width=1.0\fwidth, - height=0.55\fheight, - at={(0.0\fwidth, 0.42\fheight)}, - scale only axis, - xmode=log, - xmin=0.1, - xmax=100, - xticklabels={{}}, - xminorticks=true, - ymode=log, - ymin=0.0005, - ymax=20, - ytick={0.001, 0.01, 0.1, 1, 10}, - yminorticks=true, - ylabel={Magnitude}, - xminorgrids, - yminorgrids, - legend columns=2, - legend style={ - /tikz/column 2/.style={ - column sep=5pt, - }, - at={(1,0)}, outer sep=2pt , anchor=south east, legend cell align=left, align=left, draw=black, nodes={scale=0.7, transform shape} - }, - ] - \addplot [color=mycolor1, dashed, line width=1.5pt] - table [x=freqs, y=W1, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_weights.csv}; - \addlegendentry{${W_1}^{-1}$}; - \addplot [color=mycolor1, line width=1.5pt] - table [x=freqs, y=H1, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv}; - \addlegendentry{$H_1$}; - - - \addplot [color=mycolor2, dashed, line width=1.5pt] - table [x=freqs, y=W2, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_weights.csv}; - \addlegendentry{${W_2}^{-1}$}; - \addplot [color=mycolor2, line width=1.5pt] - table [x=freqs, y=H2, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv}; - \addlegendentry{$H_2$}; - - \addplot [color=mycolor3, dashed, line width=1.5pt] - table [x=freqs, y=W3, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_weights.csv}; - \addlegendentry{${W_3}^{-1}$}; - \addplot [color=mycolor3, line width=1.5pt] - table [x=freqs, y=H3, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv}; - \addlegendentry{$H_3$}; - \end{axis} - - \begin{axis}[% - width=1.0\fwidth, - height=0.4\fheight, - at={(0.0\fwidth, 0.0\fheight)}, - scale only axis, - xmode=log, - xmin=0.1, - xmax=100, - xminorticks=true, - xlabel={Frequency [Hz]}, - ymin=-240, - ymax=240, - ytick={-180, -90, 0, 90, 180}, - ylabel={Phase [deg]}, - xminorgrids, - ] - - \addplot [color=mycolor1, line width=1.5pt] - table [x=freqs, y=H1p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv}; - - \addplot [color=mycolor2, line width=1.5pt] - table [x=freqs, y=H2p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv}; - - \addplot [color=mycolor3, line width=1.5pt] - table [x=freqs, y=H3p, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/mathinf_three_results.csv}; - \end{axis} - \end{tikzpicture} -#+end_src - -#+name: fig:hinf_three_synthesis_results -#+caption: Frequency response of the weighting functions and three complementary filters obtained using $\mathcal{H}_\infty$ synthesis ([[./figs/hinf_three_synthesis_results.png][png]], [[./figs/hinf_three_synthesis_results.pdf][pdf]], [[./figs/hinf_three_synthesis_results.tex][tex]]). -#+RESULTS: -[[file:figs/hinf_three_synthesis_results.png]] - -* Specifications and weighting functions magnitude used for $\mathcal{H}_\infty$ synthesis -#+begin_src latex :file ligo_weights.pdf :tangle figs/ligo_weights.tex :exports both - \setlength\fwidth{6.5cm} - \setlength\fheight{3.2cm} - - \begin{tikzpicture} - \begin{axis}[% - width=1.0\fwidth, - height=1.0\fheight, - at={(0.0\fwidth, 0.0\fheight)}, - scale only axis, - separate axis lines, - every outer x axis line/.append style={black}, - every x tick label/.append style={font=\color{black}}, - every x tick/.append style={black}, - xmode=log, - xmin=0.001, - xmax=1, - xminorticks=true, - xlabel={Frequency [Hz]}, - every outer y axis line/.append style={black}, - every y tick label/.append style={font=\color{black}}, - every y tick/.append style={black}, - ymode=log, - ymin=0.005, - ymax=20, - yminorticks=true, - ylabel={Magnitude}, - axis background/.style={fill=white}, - xmajorgrids, - xminorgrids, - ymajorgrids, - yminorgrids, - legend style={at={(0,1)}, outer sep=2pt, anchor=north west, legend cell align=left, align=left, draw=black, nodes={scale=0.7, transform shape}} - ] - - \addplot [color=mycolor1, line width=1.5pt] - table [x=freqs, y=wHm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matligo_weights.csv}; - \addlegendentry{$|w_H|^{-1}$} - - \addplot [color=mycolor2, line width=1.5pt] - table [x=freqs, y=wLm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matligo_weights.csv}; - \addlegendentry{$|w_L|^{-1}$} - - \addplot [color=black, dotted, line width=1.5pt] - table[row sep=crcr]{% - 0.0005 0.008\\ - 0.008 0.008\\ - }; - \addlegendentry{Specifications} - - \addplot [color=black, dotted, line width=1.5pt, forget plot] - table[row sep=crcr]{% - 0.008 0.008\\ - 0.04 1\\ - }; - \addplot [color=black, dotted, line width=1.5pt, forget plot] - table[row sep=crcr]{% - 0.04 3\\ - 0.1 3\\ - }; - \addplot [color=black, dotted, line width=1.5pt] - table[row sep=crcr]{% - 0.1 0.045\\ - 2 0.045\\ - }; - \end{axis} - \end{tikzpicture} -#+end_src - -#+name: fig:ligo_weights -#+caption: Specifications and weighting functions magnitude used for $\mathcal{H}_\infty$ synthesis ([[./figs/ligo_weights.png][png]], [[./figs/ligo_weights.pdf][pdf]], [[./figs/ligo_weights.tex][tex]]). -#+RESULTS: -[[file:figs/ligo_weights.png]] - -* Comparison of the FIR filters (solid) with the filters obtained with $\mathcal{H}_\infty$ synthesis (dashed) -#+begin_src latex :file comp_fir_ligo_hinf.pdf :tangle figs/comp_fir_ligo_hinf.tex :exports both - \setlength\fwidth{6.5cm} - \setlength\fheight{6.8cm} - - \begin{tikzpicture} - \begin{axis}[% - width=1.0\fwidth, - height=0.60\fheight, - at={(0.0\fwidth, 0.32\fheight)}, - scale only axis, - xmode=log, - xmin=0.001, - xmax=1, - xtick={0.001,0.01,0.1,1}, - xticklabels={{}}, - xminorticks=true, - ymode=log, - ymin=0.002, - ymax=5, - ytick={0.001, 0.01, 0.1, 1, 10}, - yminorticks=true, - ylabel={Magnitude}, - xminorgrids, - yminorgrids, - legend style={at={(1,0)}, outer sep=2pt, anchor=south east, legend cell align=left, align=left, draw=black, nodes={scale=0.7, transform shape}} - ] - \addplot [color=mycolor1, line width=1.5pt] - table [x=freqs, y=Hhm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_hinf.csv}; - \addlegendentry{$H_H(s)$ - $\mathcal{H}_\infty$} - \addplot [color=mycolor1, dashed, line width=1.5pt] - table [x=freqs, y=Hhm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_fir.csv}; - \addlegendentry{$H_H(s)$ - FIR} - \addplot [color=mycolor2, line width=1.5pt] - table [x=freqs, y=Hlm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_hinf.csv}; - \addlegendentry{$H_L(s)$ - $\mathcal{H}_\infty$} - \addplot [color=mycolor2, dashed, line width=1.5pt] - table [x=freqs, y=Hlm, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_fir.csv}; - \addlegendentry{$H_L(s)$ - FIR} - \end{axis} - - \begin{axis}[% - width=1.0\fwidth, - height=0.3\fheight, - at={(0.0\fwidth, 0.0\fheight)}, - scale only axis, - xmode=log, - xmin=0.001, - xmax=1, - xtick={0.001, 0.01, 0.1, 1}, - xminorticks=true, - xlabel={Frequency [Hz]}, - ymin=-180, - ymax=180, - ytick={-180, -90, 0, 90, 180}, - ylabel={Phase [deg]}, - xminorgrids, - ] - \addplot [color=mycolor1, line width=1.5pt, forget plot] - table [x=freqs, y=Hhp, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_hinf.csv}; - \addplot [color=mycolor1, dashed, line width=1.5pt, forget plot] - table [x=freqs, y=Hhp, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_fir.csv}; - \addplot [color=mycolor2, line width=1.5pt, forget plot] - table [x=freqs, y=Hlp, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_hinf.csv}; - \addplot [color=mycolor2, dashed, line width=1.5pt, forget plot] - table [x=freqs, y=Hlp, col sep=comma] {/home/thomas/Cloud/thesis/papers/dehaeze19_desig_compl_filte/matlab/matcomp_ligo_fir.csv}; - \end{axis} - \end{tikzpicture} -#+end_src - -#+name: fig:comp_fir_ligo_hinf -#+caption: Comparison of the FIR filters (solid) with the filters obtained with $\mathcal{H}_\infty$ synthesis (dashed) ([[./figs/comp_fir_ligo_hinf.png][png]], [[./figs/comp_fir_ligo_hinf.pdf][pdf]], [[./figs/comp_fir_ligo_hinf.tex][tex]]). -#+RESULTS: -[[file:figs/comp_fir_ligo_hinf.png]]