# Application-Oriented Input Spectrum Design in Closed-Loop Identification
## 6 Average Performance Input Design Problem Solution
### The Parameter Estimation of the Upper Tank  
To illustrate the advantages of the input design for the closed-loop system parameter estimation, the output-error (OE) system, considering only the upper tank dynamics (34), is used:  
\[y(t)=G_{0}(q,\theta_{0})u(t)+e_{0}(t), \tag{39}\]  
where  
\[G_{0}(q,\theta_{0})=\frac{0.161q^{-1}}{1-0.937q^{-1}}, \tag{40}\]  
where \(e_{0}(t)\) is a white Gaussian process with a zero mean, and the variance is \(\lambda_{0}\) = 0.1. We estimate model parameters based on \(N\) = 500 input-output data with the following sampling period \(T_{\text{s}}\) = 1 [s]:  
\[G(q,\theta)=\frac{\theta_{1}q^{-1}}{1+\theta_{2}q^{-1}},\ \ \theta=[\theta_{1},\theta_{2}]^{T}, \tag{41}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Value** & **Unit** & **Description** \\ \hline \(h_{1,max}\) & 4.00 & m & Max. water level of tank 1 \\ \(h_{1,min}=h_{2,min}\) & 0.00 & m & Min. water level of tanks 1, 2 \\ \(h_{2,max}\) & 2.00 & m & Max. water level of tank 2 \\ \(h_{10}\) & 0.75 & m & Initial condition of tank 1 \\ \(h_{20}\) & 0.50 & m & Initial condition of tank 2 \\ \(a_{1}\) & 0.05 & m\({}^{2}\) & Area of water outlet hole \\ \(a_{2}\) & 0.06 & m\({}^{2}\) & Area of water outlet hole \\ \(A_{1}\) & 1.50 & m\({}^{2}\) & Cross-section of tank 1 \\ \(A_{2}\) & 0.75 & m\({}^{2}\) & Cross-section of tank 2 \\ \(u_{0}\) & 0.25 & m\({}^{3}\)/s & Initial water inflow \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The plant model parameters and limitations. The optimization problem is described by Formulas (18) and (30) with the arbitrarily selected value \(\gamma=0.1\) and the excitation signal is modeled by the FIR filter with the order of \(m=20\). The ellipsoidal constraint in (18) is defined by (12) with \(\chi=\chi^{2}(2)=5.99\), which is related to the confidence level of 95%, and the frequency grid [0, \(\pi\)] with 50 frequency points is used to evaluate the ellipsoidal constraint (26). The weighting function (13) is obtained using the damping ratio \(\zeta=0.7\) and the carefully selected bandwidth \(\omega_{0}=0.85\) [rad/s] and then is converted into the following discrete form:  
\[T(q)=\frac{0.239q^{-1}+0.159q^{-2}}{1-0.906q^{-1}+0.304q^{-2}}. \tag{42}\]  
The optimal input spectrum obtained using (18), the complementary sensitivity function \(T(q)\), and the open-loop system \(G_{0}(q,\,\theta_{0})\) for the upper tank process are shown in Figure 3.  
The parameter estimates of the model (41), obtained using the frequency (18) and the KYP (30) methods, are displayed in Figure 4.  
Figure 4: Estimated parameters of the upper tank model, based on 100 Monte-Carlo runs (confidence level of 95%). Figure 3: Magnitude plots for the upper tank: the input spectrum (dashed black line), the weighting function \(T\) (dash–dotted blue line), and the transfer function \(G_{0}\) (solid green line). Solving the optimization problem (18), the optimal input spectrum for the upper tank system has been obtained (Figure 3). The objective of optimization was to design the input spectrum of minimum energy, considering constraints established by the contour \(\left\|\Delta(\omega,\theta)\right\|_{\infty}\leq 0.1\). To reduce the required input power, most of the excitation energy is located around the first resonance peak. The water sloshing of the tank becomes weaker at higher natural frequency modes. It can be noticed that a large quantity of the excitation energy is concentrated inside the expected bandwidth of the considered system. The minimum designated input power \(\alpha\) obtained for the upper tank system is 0.140 (Figure 3). However, the input design method that focuses the input energy around the first spectrum peak is very sensitive to inaccurate estimates of model parameters at this point. Then, the designed optimal input has been used for the estimation of the parameters when the output of the upper tank model has been disturbed by the white Gaussian process with the zero mean and the variance \(\lambda_{0}=0.1\).