# Robust Controller Decorated by Nonlinear S Function and Its Application to Water Tank
## 4 Simulation Experiments and Results  
The Simulink toolbox of MATLAB (2016b) was used for the simulation experiment, and its diagrammatic drawing is shown in Figure 5. Compared with the fuzzy controller proposed in reference [18], the robust control proposed in reference [17] has better robust stability and simplicity. However, the improved PD controller proposed in this study is a kind of S function nonlinear decorated control, aiming to achieve energy-saving performance based on the two controllers mentioned above.  
The input signal is a square wave with amplitude changing from 0.5 m to 1.5 m. The Formula (2) in this study was applied to design a PD controller. When the max inlet ratio of the tank is ensured at 0.5 m\({}^{3}\)/s due to the effect of nonlinear decorated robust PD control, the mean control input is 0.0273 m\({}^{3}\)/s. The simulation results are displayed in Figure 6. There are no overshoot and quick tracking achieved. Considering the complicated nonlinear model that is used in the simulation experiments while the controller is designed according to the simplified linear model, the system robustness is also guaranteed. (In Figure 6b, the blue line represents the set level and the red line represents the simulated level).  
As displayed in Figure 7, which shows the effect of nonlinear feedback, its mean control input is 0.0302 m\({}^{3}\)/s. The control input of the improved algorithm is reduced by 9.6%, compared to the nonlinear-decorated control and the nonlinear feedback control. The purpose of saving energy by applying the S-function-decorated control is then obtained.  
The mean control input of nonlinear decorated robust control is 0.0349 m\({}^{3}\)/s if the inlet ratio is decreased from 0.5 m\({}^{3}\)/s to 0.4 m\({}^{3}\)/s, as shown in Figure 8. The control output of the level is almost unchanged with satisfactory robustness.  
Figure 5: Simulation diagram of fuzzy controller and nonlinear robust controller decorated by S function.  
Figure 6: Simulation results of nonlinear decorated robust controller: (**a**) represents the control input curve (**b**) represents the water level curve.  
Figure 7: Simulation results of nonlinear feedback (0.5): (**a**) represents the control input curve (**b**) represents the water level curve.  
The effect of nonlinear feedback is shown in Figure 9, its mean control input is 0.0365 m\({}^{3}\)/s when the inlet ratio is reduced from 0.5 m\({}^{3}\)/s to 0.4 m\({}^{3}\)/s. Compared with the nonlinear-decorated control and the nonlinear feedback control with a limited inlet ratio, the control input of the improved algorithm is reduced by 4.4%.  
The performance of linear feedback fuzzy control is displayed in Figure 10, the mean control input is 0.0369 m\({}^{3}\)/s, and the effect of linear feedback fuzzy control is displayed in Figure 11 when the limit of inlet ratio is 0.4 m\({}^{3}\)/s, with the mean control input as 0.0421 m\({}^{3}\)/s. The mean control input of nonlinear-decorated robust control is reduced by 26.1%, compared with the linear feedback fuzzy control. The purpose of energy-saving is met. Further, the fuzzy control has a slight overshoot.  
The comprehensive control performance index \(J\) of (42) is used to evaluate the above three kinds of control algorithms.  
\[J=\int{(Q_{i}^{2}+\Delta H^{2})\mathrm{d}t} \tag{42}\]  
Figure 8: Simulation results of nonlinear decorated robust control: (**a**) represents the control input curve (**b**) represents the water level curve.  
Figure 9: Simulation results of nonlinear feedback (0.4): (**a**) represents the control input curve (**b**) represents the water level curve.