## 3 Optimal Tracking and Disturbance-Rejection
### The Higher-Order Filter
The desired closed-loop time constant \(T_{CL}\) is then defined as follows:  
\[T_{CL}=\frac{T_{CL0}}{K_{CL}}=\frac{1}{A_{0}K_{P1}K_{CL}}, \tag{39}\]  
where parameter \(K_{CL}\) defines the speed-up coefficient of the closed-loop time constant in relation to that obtained with the PD controller. According to the results of the experiments using different process models, the parameter \(K_{CL}\) = 3 is found to be a good compromise between tracking speed and robustness. To equate Expressions (35) and (36), the time-delay in the denominator of (35) is expressed by the second Pade's approximant:  
\[e^{-T_{dm}s}\approx\frac{1-\frac{T_{dm}}{2}s+\frac{T_{dm}^{2}}{4^{2}}s^{2}}{1+ \frac{T_{dm}}{2}s+\frac{T_{dm}^{2}}{2}s^{2}}. \tag{40}\]By Equations (35) and (36) and taking into account (40) in the denominator of (35), the following reference filter transfer function is obtained:  
\[G_{F}=\frac{1+b_{F1}s+b_{F2}s^{2}+b_{F3}s^{3}+b_{F4}s^{4}+b_{F5}s^{5}}{\Big{(}1+ \frac{K_{P}}{K_{I}}s+\frac{K_{D}}{K_{I}}s^{2}\Big{)}\Big{(}1+\frac{T_{dm}}{2}s +\frac{T_{dm}^{2}}{12}s^{2}\Big{)}\Big{(}1+\frac{T_{CI}}{n}s\Big{)}^{n}}, \tag{41}\]  
where \(n\) is calculated from Expression (37). Parameters \(b_{F1}\) to \(b_{F5}\) in the numerator are calculated from the denominator of the closed-loop transfer Function (35) without the reference filter \(G_{F}\):  
\[ \begin{split} den_{CI}=\frac{1}{A_{0}K_{I}}\Big{(}1+a_{1m}s+a_{2 m}s^{2}\Big{)}\Big{(}1+\frac{T_{dm}}{2}s+\frac{T_{dm}^{2}}{12}s^{2}\Big{)}s^{2}+ \Big{(}1+\frac{K_{P}}{K_{I}}s+\frac{K_{D}}{K_{I}}s^{2}\Big{)}\times\\ (1+b_{1m}s)\Big{(}1-\frac{T_{dm}}{2}s+\frac{T_{dm}^{2}}{12}s^{2} \Big{)}\end{split}  \tag{42}\]  
by equating the terms with the same power of the Laplace variable \(s\). The resulting parameters are the following:  
\[ \begin{split} b_{F1}=b_{1m}-\frac{T_{dm}}{2}+\frac{K_{P}}{K_{I}},\\ b_{F2}=\frac{T_{dm}(T_{dm}-Gb_{1m})}{12}+\frac{\Big{(}A_{0}K_{D} -\frac{A_{0}K_{D}T_{dm}}{2}+A_{0}K_{0}b_{1m}+1\Big{)}}{A_{0}K_{I}},\\ b_{F3}=\frac{K_{D}b_{1m}-\frac{T_{dm}(K_{D}+K_{D}b_{1m})}{2}+\frac{T_ {dm}^{2}(K_{D}+K_{1}b_{1m})}{12}+\frac{T_{dm}+T_{F}+a_{1m}}{A_{0}K_{I}},\\ b_{F4}=\frac{\frac{T_{dm}^{2}(K_{D}+K_{D}b_{1m})}{12}\frac{(K_{D}T_{ dm}b_{1m})}{2}+\frac{a_{2m}+T_{rd}b_{1m}}{A_{0}K_{I}}+\frac{T_{dm}(T_{F}+a_{1m})}{ 2}+\frac{T_{dm}^{2}}{12}}{\frac{T_{dm}^{2}(T_{F}+a_{1m})}{12}+\frac{T_{dm}(2 _{2m}+T_{F}a_{1m})}{12}+\frac{K_{D}T_{dm}^{2}}{12}}{\frac{T_{dm}^{2}(T_{F}+a_{ 1m})}{12}+\frac{T_{dm}(2_{2m}+T_{F}a_{1m})}{12}+\frac{K_{D}T_{dm}^{2}}{12K_{I}} }{A_{0}K_{I}}.\end{split}  \tag{43}\]  
where \(T_{F}\) is the controller filter time constant. **Remark 4**. : _The reference filter is not in the feedback part of the closed-loop system transfer function. Therefore, as long as the reference filter is stable, it does not change the stability of the entire closed-loop system. By observing the higher-order reference filter Denominator (41), it can be seen that majority of the filter poles are on the left-hand side of the complex plane. The only part of the denominator filter that might become unstable is the following term:_  
\[\Big{(}1+\frac{K_{P}}{K_{I}}s+\frac{K_{D}}{K_{I}}s^{2}\Big{)}. \tag{44}\]  
_By using simple derivation, it can be shown that the mentioned Term (44) is stable if all of the controller gains are of the same sign. The same applies for the second-order reference Filter (30), which also contains the same Term (44)._  
To facilitate the implementation of the proposed reference filters and to save the reader's time and effort, all MATLAB files for the calculation of the second- and higher-order filter parameters are available online in Reference [124]. Note that, as with the MOMI tuning method, the reference filter parameters can be calculated from the measured characteristic areas, which can be acquired from the process steady-state time response.