% Created 2021-08-27 ven. 11:24
% Intended LaTeX compiler: pdflatex
\documentclass[preprint, sort&compress]{elsarticle}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{subcaption}
\usepackage{amsfonts}
\usepackage{siunitx}
\journal{Mechanical Systems and Signal Processing}
\author[a1,a2]{Thomas Dehaeze\corref{cor1}}
\author[a3,a4]{Mohit Verma}
\author[a2,a4]{Christophe Collette}
\cortext[cor1]{Corresponding author. Email Address: dehaeze.thomas@gmail.com}
\address[a1]{European Synchrotron Radiation Facility, Grenoble, France}
\address[a2]{University of Li\`{e}ge, Department of Aerospace and Mechanical Engineering, 4000 Li\`{e}ge, Belgium.}
\address[a3]{CSIR --- Structural Engineering Research Centre, Taramani, Chennai --- 600113, India.}
\address[a4]{Universit\'{e} Libre de Bruxelles, Precision Mechatronics Laboratory, BEAMS Department, 1050 Brussels, Belgium.}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{array}
\usepackage[hyperref]{xcolor}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\hypersetup{colorlinks=true}
\date{}
\title{A new method of designing complementary filters for sensor fusion using \(\mathcal{H}_\infty\) synthesis}
\begin{document}


\hypersetup{allcolors=teal}

\begin{frontmatter}
\begin{abstract}
Sensor have limited bandwidth and are accurate only in a certain frequency band.
In many applications, the signals of different sensor are fused together in order to either enhance the stability or improve the operational bandwidth of the system.
The sensor signals can be fused using complementary filters.
The tuning of complementary filters is a complex task and is the subject of this paper.
The filters needs to meet design specifications while satisfying the complementary property.
This paper presents a framework to shape the norm of complementary filters using the \(\mathcal{H}_\infty\) norm minimization.
The design specifications are imposed as constraints in the optimization problem by appropriate selection of weighting functions.
The proposed method is quite general and easily extendable to cases where more than two sensors are fused.
Finally, the proposed method is applied to the design of complementary filter design for active vibration isolation of the Laser Interferometer Gravitation-wave Observatory (LIGO).
\end{abstract}

\begin{keyword}
Sensor fusion \sep{} Optimal filters \sep{} \(\mathcal{H}_\infty\) synthesis \sep{} Vibration isolation \sep{} Precision
\end{keyword}
\end{frontmatter}

\section{Introduction}
\label{sec:org5737795}
\label{sec:introduction}
\begin{itemize}
\item \cite{anderson53_instr_approac_system_steer_comput} earliest application of complementary filters (A simple RC circuit was used to physically realize the complementary filters)
\item \cite{bendat57_optim_filter_indep_measur_two} roots of sensor fusion
\end{itemize}
Sensor fusion can have many advantages.

In some situations, it is used to increase the bandwidth of the sensor \cite{shaw90_bandw_enhan_posit_measur_using_measur_accel,zimmermann92_high_bandw_orien_measur_contr,min15_compl_filter_desig_angle_estim}.
For instance by increasing the high frequency bandwidth of a position sensor using an accelerometer.


Decrease the noise: \cite{hua05_low_ligo,hua04_polyp_fir_compl_filter_contr_system,plummer06_optim_compl_filter_their_applic_motion_measur}
  \cite[chapter 8]{robert12_introd_random_signal_applied_kalman}


Increased robustness (sensor measuring different quantities): \cite{collette15_sensor_fusion_method_high_perfor,yong16_high_speed_vertic_posit_stage}

\par
The applications of sensor fusion are numerous.
It is widely used for attitude estimation of unmanned aerial vehicle
\cite{baerveldt97_low_cost_low_weigh_attit,pascoal99_navig_system_desig_using_time,corke04_inert_visual_sensin_system_small_auton_helic,batista10_optim_posit_veloc_navig_filter_auton_vehic,jensen13_basic_uas,min15_compl_filter_desig_angle_estim}

Motion control
\cite{shaw90_bandw_enhan_posit_measur_using_measur_accel,zimmermann92_high_bandw_orien_measur_contr}

Tjepkema et al. \cite{tjepkema12_sensor_fusion_activ_vibrat_isolat_precis_equip} used sensor fusion to isolate precision equipment from the ground motion.

Gravitational wave observer \cite{heijningen18_low}:
LIGO \cite{hua05_low_ligo,hua04_polyp_fir_compl_filter_contr_system}
VIRGO \cite{lucia18_low_frequen_optim_perfor_advan}
There are mainly two ways to perform sensor fusion: using complementary filters or using Kalman filtering \cite{brown72_integ_navig_system_kalman_filter}.
Kalman filtering \cite{odry18_kalman_filter_mobil_robot_attit_estim}

Relations between CF and Kalman: \cite{becker15_compl_filter_desig_three_frequen_bands}

Advantages of complementary filtering over Kalman filtering for sensor fusion:
\begin{itemize}
\item Less computation \cite{higgins75_compar_compl_kalman_filter}
\item For Kalman filtering, we are forced to make assumption about the probabilistic character of the sensor noises \cite{robert12_introd_random_signal_applied_kalman}
\item More intuitive frequency domain technique
\end{itemize}
In some cases, complementary filters are implemented in an analog way such as in \cite{yong16_high_speed_vertic_posit_stage,moore19_capac_instr_sensor_fusion_high_bandw_nanop}, but most of the time it is implemented numerically which allows much more complex

Multiple design methods have been used for complementary filters

\begin{itemize}
\item Analytical methods:
\begin{itemize}
\item first order: \cite{corke04_inert_visual_sensin_system_small_auton_helic,yong16_high_speed_vertic_posit_stage}
\item second order: \cite{baerveldt97_low_cost_low_weigh_attit}, \cite{stoten01_fusion_kinet_data_using_compos_filter}, \cite{jensen13_basic_uas}
\item higher order: \cite{shaw90_bandw_enhan_posit_measur_using_measur_accel}, \cite{zimmermann92_high_bandw_orien_measur_contr}, \cite{collette15_sensor_fusion_method_high_perfor}, \cite{matichard15_seism_isolat_advan_ligo}
\end{itemize}
\item \cite{pascoal99_navig_system_desig_using_time} use LMI to generate complementary filters (convex optimization techniques), specific for navigation systems
\item \cite{hua05_low_ligo,hua04_polyp_fir_compl_filter_contr_system}: FIR + convex optimization
\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, PID
\end{itemize}

\item 3 complementary filters: \cite{becker15_compl_filter_desig_three_frequen_bands}
\end{itemize}
\begin{itemize}
\item Robustness problems: \cite{zimmermann92_high_bandw_orien_measur_contr,plummer06_optim_compl_filter_their_applic_motion_measur} change of phase near the merging frequency
\item Trial and error
\item Although many design methods of complementary filters have been proposed in the literature, no simple method that allows to shape the norm of the complementary filters is available.
\end{itemize}
Most of the requirements => shape of the complementary filters
=> propose a way to shape complementary filters.
Section \ref{sec:requirements}

Section \ref{sec:hinf_method}

Section \ref{sec:application_ligo}

Section \ref{sec:discussion}

\section{Sensor Fusion and Complementary Filters Requirements}
\label{sec:orgbd86d49}
\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 Fusion Architecture}
\label{sec:org56b9e47}
\label{sec:sensor_fusion}

A general sensor fusion architecture using complementary filters 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}\).

The resulting sensor, termed as ``super sensor'', can have larger bandwidth and better noise characteristics in comparison to the individual sensor.
This means that the super sensor provides an estimate \(\hat{x}\) of \(x\) which can be more accurate over a larger frequency band than the outputs of the individual sensors.

\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 complementary property of filters \(H_1(s)\) and \(H_2(s)\) implies that the summation of their transfer functions is equal to unity.
That is, unity magnitude and zero phase at all frequencies.
Therefore, a pair of strict complementary filter needs to satisfy the following condition:
\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:org684f136}
\label{sec:sensor_models}

In order to study such sensor fusion architecture, a model of the sensors is required.

Such model is shown in Figure \ref{fig:sensor_model} and consists of a linear time invariant (LTI) system \(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 physical 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 to simplify the fusion.
This normalization consists of first obtaining an estimate \(\hat{G}_i(s)\) of the sensor dynamics \(G_i(s)\).
It is supposed that the estimate of the sensor dynamics \(\hat{G}_i(s)\) can be inverted and that its inverse \(\hat{G}_i^{-1}(s)\) is proper and stable.
The raw output of the sensor \(\tilde{x}_i\) is then passed through \(\hat{G}_i^{-1}(s)\) 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:sensor_models}Sensor models with an without normalization}
\centering
\end{figure}

Two calibrated sensors and then combined to form a super sensor as 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 normalized 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} = \Big( H_1(s) \hat{G}_1^{-1}(s) G_1(s) + H_2(s) \hat{G}_2^{-1}(s) G_2(s) \Big) x + H_1(s) \hat{G}_1^{-1}(s) G_1(s) n_1 + H_2(s) \hat{G}_2^{-1}(s) G_2(s) n_2
\end{equation}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/fusion_super_sensor.pdf}
\caption{\label{fig:fusion_super_sensor}Sensor fusion architecture}
\end{figure}

\subsection{Noise Sensor Filtering}
\label{sec:org99631b9}
\label{sec:noise_filtering}

In this section, it is supposed that all the sensors are perfectly calibrated, such that:
\begin{equation}
\label{eq:perfect_dynamics}
  \frac{\hat{x}_i}{x} = \hat{G}_i(s) G_i(s) = 1
\end{equation}

The effect of a non-perfect 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(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 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.

The estimation error \(\delta x\), defined as the difference between the sensor output \(\hat{x}\) and the measured quantity \(x\), is computed for the super sensor \eqref{eq:estimate_error}.
\begin{equation}
\label{eq:estimate_error}
  \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}(\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}

If the two sensors have identical noise characteristics (\(\Phi_{n_1}(\omega) = \Phi_{n_2}(\omega)\)), a simple averaging (\(H_1(s) = H_2(s) = 0.5\)) is what would minimize the super sensor noise.
This is the simplest form of sensor fusion with complementary filters.

However, the two sensors have usually high noise levels over distinct frequency regions.
In such case, 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}\).
Therefore, by properly shaping the norm of the complementary filters, it is possible to minimize the noise of the super sensor noise.

\subsection{Sensor Fusion Robustness}
\label{sec:org3f9e403}
\label{sec:fusion_robustness}

In practical systems the sensor normalization is not perfect and condition \eqref{eq:perfect_dynamics} is not verified.

In order to study such imperfection, a multiplicative input uncertainty is added to the sensor dynamics (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.

The weight \(w_i(s)\) is chosen such that the real sensor dynamics is always contained in the uncertain region represented by a circle centered on \(1\) and with a radius equal to \(|w_i(j\omega)|\).

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
\end{figure}

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]{figs/sensor_fusion_dynamic_uncertainty.pdf}
\caption{\label{fig:sensor_fusion_dynamic_uncertainty}Sensor fusion architecture with sensor dynamics uncertainty}
\end{figure}

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)\).
\begin{equation}
\label{eq:super_sensor_dyn_uncertainty}
  \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 dynamical uncertainty of the super sensor can be graphically 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]{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. The frequency dependency \(\omega\) is here omitted.}
\end{figure}

The super sensor dynamical uncertainty (i.e. the robustness of the fusion) clearly depends on the complementary filters norms.
For instance, the phase uncertainty \(\Delta\phi(\omega)\) added by the super sensor dynamics at frequency \(\omega\) can be found by drawing a tangent from the origin to the uncertainty circle of super sensor (Figure \ref{fig:uncertainty_set_super_sensor}) and is bounded by \eqref{eq:max_phase_uncertainty}.

\begin{equation}
\label{eq:max_phase_uncertainty}
    \Delta\phi(\omega) < \arcsin\big( |w_1(j\omega) H_1(j\omega)| + |w_2(j\omega) H_2(j\omega)| \big)
\end{equation}

As it is generally desired to limit the maximum phase added by the super sensor, \(H_1(s)\) and \(H_2(s)\) should be designed such that \(\Delta \phi\) is bounded to acceptable values.
Typically, the norm of the complementary filter \(|H_i(j\omega)|\) should be made small when \(|w_i(j\omega)|\) is large, i.e., at frequencies where the sensor dynamics is uncertain.

\section{Complementary Filters Shaping}
\label{sec:org82bc276}
\label{sec:hinf_method}
As shown in Section \ref{sec:requirements}, the noise and robustness of the ``super sensor'' are determined by the complementary filters norms.
Therefore, a complementary filters synthesis method that allows to shape their norms would be of great use.

In this section, such synthesis is proposed by expressing this problem as a \(\mathcal{H}_\infty\) norm optimization.
\subsection{Synthesis Objective}
\label{sec:orgceb5825}
\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 proper and stable transfer functions \(H_1(s)\) and \(H_2(s)\) such that conditions \eqref{eq:comp_filter_problem_form} are satisfied.

\begin{subequations}
\label{eq:comp_filter_problem_form}
  \begin{align}
  & H_1(s) + H_2(s) = 1 \label{eq:hinf_cond_complementarity} \\
  & |H_1(j\omega)| \le \frac{1}{|W_1(j\omega)|} \quad \forall\omega \label{eq:hinf_cond_h1} \\
  & |H_2(j\omega)| \le \frac{1}{|W_2(j\omega)|} \quad \forall\omega \label{eq:hinf_cond_h2}
  \end{align}
\end{subequations}
where \(W_1(s)\) and \(W_2(s)\) are two weighting transfer functions that are chosen to specify the maximum wanted norms of the complementary filters during the synthesis.

\subsection{Shaping of Complementary Filters using \(\mathcal{H}_\infty\) synthesis}
\label{sec:org79feac5}
\label{sec:hinf_synthesis}

In this section, it is shown that the synthesis objective can be easily expressed as a standard \(\mathcal{H}_\infty\) optimal control problem and therefore solved using convenient tools readily available.

Consider the generalized plant \(P(s)\) shown in Figure \ref{fig:h_infinity_robust_fusion} and mathematically described by \eqref{eq:generalized_plant}.

\begin{equation}
\label{eq:generalized_plant}
  \begin{bmatrix} z_1 \\ z_2 \\ v \end{bmatrix} = P(s) \begin{bmatrix} w\\u \end{bmatrix}; \quad P(s) = \begin{bmatrix}W_1(s) & -W_1(s) \\ 0 & \phantom{+}W_2(s) \\  1 & 0 \end{bmatrix}
\end{equation}

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/h_infinity_robust_fusion.pdf}
\caption{\label{fig:h_infinity_robust_fusion}Generalized plant used for \(\mathcal{H}_\infty\) synthesis of complementary filters}
\end{figure}

Applying the standard \(\mathcal{H}_\infty\) synthesis on the generalized plant \(P(s)\) is then equivalent as finding a stable filter \(H_2(s)\) which based on \(v\), generates a signal \(u\) such that the \(\mathcal{H}_\infty\) norm from \(w\) to \([z_1, \ z_2]\) is less than one \eqref{eq:hinf_syn_obj}.
\begin{equation}
\label{eq:hinf_syn_obj}
  \left\|\begin{matrix} \left(1 - H_2(s)\right) W_1(s) \\ H_2(s) W_2(s) \end{matrix}\right\|_\infty \le 1
\end{equation}

By then defining \(H_1(s)\) to be the complementary of \(H_2(s)\) \eqref{eq:definition_H1}, the \(\mathcal{H}_\infty\) synthesis objective becomes equivalent to \eqref{eq:hinf_problem} which ensure that \eqref{eq:hinf_cond_h1} and \eqref{eq:hinf_cond_h2} are satisfied.

\begin{equation}
\label{eq:definition_H1}
  H_1(s) \triangleq 1 - H_2(s)
\end{equation}

\begin{equation}
\label{eq:hinf_problem}
  \left\|\begin{matrix} H_1(s) W_1(s) \\ H_2(s) W_2(s) \end{matrix}\right\|_\infty \le 1
\end{equation}

Therefore, applying the \(\mathcal{H}_\infty\) synthesis on the standard plant \(P(s)\) \eqref{eq:generalized_plant} will generate two filters \(H_2(s)\) and \(H_1(s) \triangleq 1 - H_2(s)\) that are complementary \eqref{eq:comp_filter_problem_form} and such that there norms are bellow specified bounds \eqref{eq:hinf_cond_h1},\eqref{eq:hinf_cond_h2}.

The above optimization problem can be efficiently solved in Matlab \cite{matlab20} using the Robust Control Toolbox.

\subsection{Weighting Functions Design}
\label{sec:orgd27beed}
\label{sec:hinf_weighting_func}

Weighting functions are used during the synthesis to specify what is the maximum allowed norms of the complementary filters.
The proper design of these weighting functions is of primary importance for the success of the presented complementary filters \(\mathcal{H}_\infty\) synthesis.

First, only proper and stable transfer functions should be used.
Second, the order of the weighting functions should stay reasonably small in order to reduce the computational costs associated with the solving of the optimization problem and for the physical implementation of the filters (the order of the synthesized filters being equal to the sum of the weighting functions order).
Third, one should not forget the fundamental limitations imposed by the complementary property \eqref{eq:comp_filter}.
This implies for instance that \(|H_1(j\omega)|\) and \(|H_2(j\omega)|\) cannot be made small at the same frequency.


When designing complementary filters, it is usually desired to specify its slope, its crossover frequency and its maximum gain at low and high frequency.
To help with the design of the weighting functions such that the above specification can be easily expressed, the formula \eqref{eq:weight_formula} is proposed.

\begin{equation}
\label{eq:weight_formula}
  W(s) = \left( \frac{
           \hfill{} \frac{1}{\omega_c} \sqrt{\frac{1 - \left(\frac{G_0}{G_c}\right)^{\frac{2}{n}}}{1 - \left(\frac{G_c}{G_\infty}\right)^{\frac{2}{n}}}} s + \left(\frac{G_0}{G_c}\right)^{\frac{1}{n}}
         }{
           \left(\frac{1}{G_\infty}\right)^{\frac{1}{n}} \frac{1}{\omega_c} \sqrt{\frac{1 - \left(\frac{G_0}{G_c}\right)^{\frac{2}{n}}}{1 - \left(\frac{G_c}{G_\infty}\right)^{\frac{2}{n}}}} s + \left(\frac{1}{G_c}\right)^{\frac{1}{n}}
         }\right)^n
\end{equation}

The parameters in formula \eqref{eq:weight_formula} are:
\begin{itemize}
\item \(G_0 = lim_{\omega \to 0} |W(j\omega)|\): the low frequency gain
\item \(G_\infty = lim_{\omega \to \infty} |W(j\omega)|\): the high frequency gain
\item \(G_c = |W(j\omega_c)|\): the gain at \(\omega_c\)
\item \(n\): the slope between high and low frequency. It is also the order of the weighting function.
\end{itemize}

The parameters \(G_0\), \(G_c\) and \(G_\infty\) should either satisfy condition \eqref{eq:cond_formula_1} or \eqref{eq:cond_formula_2}.
\begin{subequations}
\label{eq:condition_params_formula}
  \begin{align}
    G_0 < 1 < G_\infty \text{ and } G_0 < G_c < G_\infty \label{eq:cond_formula_1}\\
    G_\infty < 1 < G_0 \text{ and } G_\infty < G_c < G_0 \label{eq:cond_formula_2}
  \end{align}
\end{subequations}

The typical shape of a weighting function generated using \eqref{eq:weight_formula} is shown in Figure \ref{fig:weight_formula}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/weight_formula.pdf}
\caption{\label{fig:weight_formula}Magnitude of a weighting function generated using the proposed formula \eqref{eq:weight_formula}, \(G_0 = 1e^{-3}\), \(G_\infty = 10\), \(\omega_c = \SI{10}{Hz}\), \(G_c = 2\), \(n = 3\)}
\end{figure}

\subsection{Validation of the proposed synthesis method}
\label{sec:orgc8f3eb3}
\label{sec:hinf_example}

The proposed methodology for the design of complementary filters is now applied on a simple example where two complementary filters \(H_1(s)\) and \(H_2(s)\) have to be designed such that:
\begin{itemize}
\item the merging frequency is around \(\SI{10}{Hz}\)
\item the slope of \(|H_1(j\omega)|\) is \(-2\) above \(\SI{10}{Hz}\)
\item the slope of \(|H_2(j\omega)|\) is \(+3\) below \(\SI{10}{Hz}\)
\item the maximum gain of both filters is \(10^{-3}\) away from the merging frequency
\end{itemize}

The first step is to design weighting functions that translate the above requirements.
They are here designed using \eqref{eq:weight_formula} with parameters summarized in table \ref{tab:weights_params}.
The magnitudes of the weighting functions are shown by dashed lines in Figure \ref{fig:hinf_filters_results}.

\begin{table}[htbp]
\caption{\label{tab:weights_params}Parameters used for weighting functions \(W_1(s)\) and \(W_2(s)\) using \eqref{eq:weight_formula}}
\centering
\begin{tabularx}{0.29\linewidth}{ccc}
\toprule
Parameters & \(W_1(s)\) & \(W_2(s)\)\\
\midrule
\(G_0\) & \(0.1\) & \(1000\)\\
\(G_\infty\) & \(1000\) & \(0.1\)\\
\(\omega_c\) & \(2\pi\cdot10\) & \(2\pi\cdot10\)\\
\(G_c\) & \(0.45\) & \(0.45\)\\
\(n\) & \(2\) & \(3\)\\
\bottomrule
\end{tabularx}
\end{table}

The \(\mathcal{H}_\infty\) synthesis is applied on the generalized plant of Figure \ref{fig:h_infinity_robust_fusion} using the Matlab \texttt{hinfsyn} command.
The synthesized filter \(H_2(s)\) is such that \(\mathcal{H}_\infty\) norm between \(w\) and \([z_1,\ z_2]^T\) is minimized and here found close to one \eqref{eq:hinf_synthesis_result}.

\begin{equation}
\label{eq:hinf_synthesis_result}
  \left\|\begin{matrix} \left(1 - H_2(s)\right) W_1(s) \\ H_2(s) W_2(s) \end{matrix}\right\|_\infty \approx 1
\end{equation}

The bode plots of the obtained complementary filters are shown by solid lines in Figure \ref{fig:hinf_filters_results} and their transfer functions in the Laplace domain are given in \eqref{eq:hinf_synthesis_result_tf}.

\begin{subequations}
\label{eq:hinf_synthesis_result_tf}
  \begin{align}
    H_2(s) &= \frac{(s+6.6e^4) (s+160) (s+4)^3}{(s+6.6e^4) (s^2 + 106 s + 3e^3) (s^2 + 72s + 3580)} \\
    H_1(s) &\triangleq H_2(s) - 1 = \frac{10^{-8} (s+6.6e^9) (s+3450)^2 (s^2 + 49s + 895)}{(s+6.6e^4) (s^2 + 106 s + 3e^3) (s^2 + 72s + 3580)}
  \end{align}
\end{subequations}

The obtained transfer functions are of order \(5\) as expected (sum of the weighting functions orders), and their magnitudes are bellow the maximum specified ones as ensured by \eqref{eq:hinf_synthesis_result}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1]{figs/hinf_filters_results.pdf}
\caption{\label{fig:hinf_filters_results}Frequency response of the weighting functions and complementary filters obtained using \(\mathcal{H}_\infty\) synthesis}
\end{figure}

This simple example illustrates the fact that the proposed methodology for complementary filters shaping is quite easy to use and effective.
A more complex real life example is taken up in the next section.

\section{Application: Design of Complementary Filters used in the Active Vibration Isolation System at the LIGO}
\label{sec:org8cb3b2e}
\label{sec:application_ligo}
Sensor fusion using complementary filters are widely used in active vibration isolation systems in gravitational wave detectors such at the LIGO \cite{matichard15_seism_isolat_advan_ligo,hua05_low_ligo}, the VIRGO \cite{lucia18_low_frequen_optim_perfor_advan,heijningen18_low} and the KAGRA \cite[Chap. 5]{sekiguchi16_study_low_frequen_vibrat_isolat_system}.

In the first isolation stage at the LIGO, two sets of complementary filters are used and included in a feedback loop \cite{hua04_low_ligo}.
A set of complementary filters (\(L_2,H_2\)) is first used to fuse a seismometer and a geophone.
Then, another set of complementary filters (\(L_1,H_1\)) is used to merge the output of the first ``inertial super sensor'' with a position sensor.
A simplified block diagram of the sensor fusion architecture is shown in Figure \ref{fig:ligo_super_sensor_architecture}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/ligo_super_sensor_architecture.pdf}
\caption{\label{fig:ligo_super_sensor_architecture}Simplified block diagram of the sensor blending strategy for the first stage at the LIGO \cite{hua04_low_ligo}}
\end{figure}

The fusion of the position sensor at low frequency with the ``inertial super sensor'' at high frequency using the complementary filters (\(L_1,H_1\)) is done for several reasons, first of which is to give the super sensor a DC sensibility and therefore allow the feedback loop to have authority at zero frequency.
The requirements on those filters are very tight and thus their design is complex and should be expressed as an optimization problem.

The approach used in \cite{hua05_low_ligo} is to use FIR complementary filters and to write the synthesis as a convex optimization problem.
After synthesis, the obtained FIR filters were found to be compliant with the requirements.
However they are of very high order so their implementation is quite complex.
In this section, the effectiveness of the proposed complementary filter synthesis strategy is demonstrated on the same set of requirements.
\subsection{Complementary Filters Specifications}
\label{sec:orgb603be6}
\label{sec:ligo_specifications}
The specifications for the set of complementary filters (\(L_1,H_1\)) used at the LIGO are summarized below (for further details, refer to \cite{hua04_polyp_fir_compl_filter_contr_system}):
\begin{itemize}
\item From \(0\) to \(\SI{0.008}{Hz}\), the magnitude \(|L_1(j\omega)|\) should be less or equal to \(8 \times 10^{-4}\)
\item Between \(\SI{0.008}{Hz}\) to \(\SI{0.04}{Hz}\), the filter \(L_1(s)\) should attenuate the input signal proportional to frequency cubed
\item Between \(\SI{0.04}{Hz}\) to \(\SI{0.1}{Hz}\), the magnitude \(|L_1(j\omega)|\) should be less than \(3\)
\item Above \(\SI{0.1}{Hz}\), the magnitude \(|H_1(j\omega)|\) should be less than \(0.045\)
\end{itemize}

These specifications are therefore upper bounds on the complementary filters' magnitudes.
They are physically represented in Figure \ref{fig:fir_filter_ligo} as well as the obtained magnitude of the FIR filters in \cite{hua05_low_ligo}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/fir_filter_ligo.pdf}
\caption{\label{fig:fir_filter_ligo}Specifications and Bode plot of the obtained FIR filters in \cite{hua05_low_ligo}}
\end{figure}

\subsection{Weighting Functions Design}
\label{sec:orgd94a6e5}
\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.

A Type I Chebyshev filter of order \(20\) is used as the weighting transfer function \(w_L(s)\) corresponding to the low pass filter.
For the one corresponding to the high pass filter \(w_H(s)\), a \(7^{\text{th}}\) order transfer function is designed.
The magnitudes of the weighting functions are shown in Fig. \ref{fig:ligo_weights}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/ligo_weights.pdf}
\caption{\label{fig:ligo_weights}Specifications and weighting functions magnitudes}
\end{figure}

\subsection{\(\mathcal{H}_\infty\) Synthesis}
\label{sec:org1f03af8}
\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\).
In Fig. \ref{fig:comp_fir_ligo_hinf}, their bode plot is compared with the FIR filters of order 512 obtained in \cite{hua05_low_ligo}.
They are found to be very close to each other and this shows the effectiveness of the proposed synthesis method.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/comp_fir_ligo_hinf.pdf}
\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:org013b9e6}
\label{sec:discussion}
\subsection{``Closed-Loop'' complementary filters}
\label{sec:orga1ea439}
\label{sec:closed_loop_complementary_filters}
It is possible to use the fundamental properties of a feedback architecture to generate complementary filters.

It has been proposed by:
\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, PID
\item Maybe also cite \cite{mahony05_compl_filter_desig_special_orthog}
\end{itemize}

Consider the feedback architecture of Figure \ref{fig:feedback_sensor_fusion}, with two inputs \(\hat{x}_1\) and \(\hat{x}_2\), and one output \(\hat{x}\).

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/feedback_sensor_fusion.pdf}
\caption{\label{fig:feedback_sensor_fusion}``Closed-Loop'' complementary filters}
\end{figure}

The output \(\hat{x}\) is described by \eqref{eq:closed_loop_complementary_filters}.

\begin{equation}
\label{eq:closed_loop_complementary_filters}
\hat{x} = \underbrace{\frac{1}{1 + L(s)}}_{S(s)} \hat{x}_1 + \underbrace{\frac{L(s)}{1 + L(s)}}_{T(s)} \hat{x}_2
\end{equation}

with the famous relationship
\begin{equation}
T(s) + S(s) = 1
\end{equation}

Provided that the closed-loop system is stable, this indeed forms two complementary filters.
Therefore, two filters can be merged as shown in Figure \ref{fig:feedback_sensor_fusion_arch}.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/feedback_sensor_fusion_arch.pdf}
\caption{\label{fig:feedback_sensor_fusion_arch}Classical feedback architecture for sensor fusion}
\end{figure}

One of the main advantage of this configuration is that standard tools of the linear control theory can be applied.
If one want to shape both the transfer functions \(\frac{\hat{x}}{\hat{x}_1}(s) = S(s)\) and \(\frac{\hat{x}}{\hat{x}_2}(s) = T(s)\), this corresponds to the \(\mathcal{H}_\infty\) mixed-sensitivity synthesis.

The \(\mathcal{H}_\infty\) mixed-sensitivity synthesis can be perform by applying the \(\mathcal{H}_\infty\) synthesis to the generalized plant \(P_L(s)\) shown in Figure \ref{fig:feedback_synthesis_architecture_generalized_plant} and described by \eqref{eq:generalized_plant_mixed_sensitivity} where \(W_1(s)\) and \(W_2(s)\) are weighting functions used to respectively shape \(S(s)\) and \(T(s)\).

\begin{equation}
\label{eq:generalized_plant_mixed_sensitivity}
  \begin{bmatrix} z \\ v \end{bmatrix} = P_L(s) \begin{bmatrix} w_1 \\ w_2 \\ u \end{bmatrix}; \quad P_L(s) = \begin{bmatrix}
    \phantom{+}W_1(s) & 0      & \phantom{+}1 \\
              -W_1(s) & W_2(s) &           -1
  \end{bmatrix}
\end{equation}

This is equivalent as to find a filter \(L(s)\) such that \eqref{eq:comp_filters_feedback_obj} is verified.

\begin{equation}
\label{eq:comp_filters_feedback_obj}
  \left\|\begin{matrix} \frac{1}{1 + L(s)} W_1(s) \\ \frac{L(s)}{1 + L(s)} W_2(s) \end{matrix}\right\|_\infty \le 1
\end{equation}

The sensor fusion can be implemented as shown in Figure \ref{fig:feedback_sensor_fusion_arch} using the feedback architecture or more classically as shown in Figure \ref{fig:sensor_fusion_overview} using \eqref{eq:comp_filters_feedback}.

\begin{equation}
\label{eq:comp_filters_feedback}
H_1(s) = \frac{1}{1 + L(s)}; \quad H_2(s) = \frac{L(s)}{1 + L(s)}
\end{equation}

The two being equivalent considering only the inputs/outputs relationships.

\begin{figure}[htbp]
\centering
\includegraphics[scale=1,scale=1]{figs/feedback_synthesis_architecture_generalized_plant.pdf}
\caption{\label{fig:feedback_synthesis_architecture_generalized_plant}Generalized plant for the \(\mathcal{H}_\infty\) mixed-sensitivity synthesis}
\end{figure}
Example: same weights as in \ref{tab:weights_params}.

Therefore, complementary filter design is very similar to mixed-sensitivity synthesis.

They are actually equivalent by taking
\begin{equation}
L = H_H^{-1} - 1
\end{equation}
(provided \(H_H\) is invertible, therefore bi-proper)

\subsection{Imposing zero at origin / roll-off}
\label{sec:org293cf77}
\label{sec:add_features_in_filters}

3 methods:

Link to literature about doing that with mixed sensitivity

\subsection{Synthesis of Three Complementary Filters}
\label{sec:orgd44eb72}
\label{sec:hinf_three_comp_filters}
Some applications may require to merge more than two sensors.
For instance at the LIGO, three sensors (an LVDT, a seismometer and a geophone) are merged to form a super sensor (Figure \ref{fig:ligo_super_sensor_architecture}). \par

\begin{itemize}
\item[{$\square$}] \cite{becker15_compl_filter_desig_three_frequen_bands}
\end{itemize}
When merging \(n>2\) sensors using complementary filters, two architectures can be used as shown in Figure \ref{fig:sensor_fusion_three}.

The fusion can either be done in a ``sequential'' way where \(n-1\) sets of two complementary filters are used (Figure \ref{fig:sensor_fusion_three_sequential}), or in a ``parallel'' way where one set of \(n\) complementary filters is used (Figure \ref{fig:sensor_fusion_three_parallel}).

In the first case, typical sensor fusion synthesis techniques can be used.
However, when a parallel architecture is used, a new synthesis method for a set of more than two complementary filters is required.
Such synthesis method is presented in this section. \par

\begin{center}
\fbox{
\begin{minipage}[c]{.6\textwidth}
Say possible advantages of parallel architecture

\end{minipage}
}
\end{center}

\begin{figure}[htbp]
\begin{subfigure}[b]{0.59\linewidth}
\centering
\includegraphics[scale=1]{figs/sensor_fusion_three_sequential.pdf}
\caption{\label{fig:sensor_fusion_three_sequential}Sequential fusion}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.39\linewidth}
\centering
\includegraphics[scale=1]{figs/sensor_fusion_three_parallel.pdf}
\caption{\label{fig:sensor_fusion_three_parallel}Parallel fusion}
\end{subfigure}
\caption{\label{fig:sensor_fusion_three}Sensor fusion architecture with more than two sensors}
\centering
\end{figure}
The synthesis objective is to compute a set of \(n\) stable transfer functions \([H_1(s),\ H_2(s),\ \dots,\ H_n(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}
where \([W_1(s),\ W_2(s),\ \dots,\ W_n(s)]\) are weighting transfer functions that are chosen to specify the maximum wanted norms of the complementary filters during the synthesis.

Such synthesis objective is very close to the one described in Section \ref{sec:synthesis_objective}, and indeed the proposed synthesis architecture is also very similar. \par
Consider the generalized plant \(P_3(s)\) shown in Figure \ref{fig:comp_filter_three_hinf} which is also described by \eqref{eq:generalized_plant_three_filters}.

\begin{equation}
\label{eq:generalized_plant_three_filters}
  \begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ v \end{bmatrix} = P_3(s) \begin{bmatrix} w \\ u_1 \\ u_2 \end{bmatrix}; \quad P_3(s) = \begin{bmatrix}W_1(s) & -W_1(s) & -W_1(s) \\ 0 & \phantom{+}W_2(s) & 0 \\ 0 & 0 & \phantom{+}W_3(s) \\ 1 & 0 & 0 \end{bmatrix}
\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}

Applying the \(\mathcal{H}_\infty\) synthesis on the generalized plant \(P_3(s)\) is equivalent as to find two stable filters \([H_2(s),\ H_3(s)]\) (shown in Figure \ref{fig:comp_filter_three_hinf}) 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}

By defining \(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} with \(n=3\). \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}. \par

\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}
Such synthesis method can be generalized to a set of \(n\) complementary filters, even though there might not be any practical application for \(n>3\).

\begin{equation}
\label{eq:generalized_plant_n_filters}
  \begin{bmatrix} z_1 \\ \vdots \\ z_n \\ v \end{bmatrix} = P_n(s) \begin{bmatrix} w \\ u_1 \\ \vdots \\ u_{n-1} \end{bmatrix}; \quad
  P_n(s) = \begin{bmatrix}
    W_1    & -W_1   & \dots  & \dots  & -W_1 \\
    0      &  W_2   & 0      & \dots  & 0 \\
    \vdots & \ddots & \ddots & \ddots & \vdots \\
    \vdots &        & \ddots & \ddots & 0 \\
    0      & \dots  & \dots  & 0      & W_n \\
    1      & 0      & \dots  & \dots  & 0
    \end{bmatrix}
\end{equation}

\section{Conclusion}
\label{sec:orgc6071ad}
\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.
Therefore, a synthesis method that permits the shaping of the complementary filters norms has been proposed and has been successfully applied for the design of complex filters.
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:org4efce57}
This research benefited from a FRIA grant from the French Community of Belgium.

\bibliographystyle{elsarticle-num}
\bibliography{ref}
\end{document}
