Using Sine Function-Based Nonlinear Feedback to Control Water Tank Level

: This manuscript addresses the feasibility and significance of using a sine function to modify the system error of a normal linear feedback control to achieve more efficient capabilities in terms of energy-saving. The associated mathematic modeling and assessment were demonstrated by pre-senting a case analysis on the capabilities of controlling water level for a single tank. The principle of robust control and the theories and detailed algorithm of Lyapunov stability were applied to assess the result derived by novel nonlinear feedback in the form of sine function for optimizing the robustness of the PID (Proportional–Integral–Derivative) controller and economizing energy. Two control simulations are compared: nonlinear feedback control using a sine function and conventional fuzzy control. The results reveal that using the nonlinear feedback controller, a reduction of up to 32.9% of the average controlled quantity is achieved, and the performance index is improved by 24.0% with satisfactory robustness. The proposed nonlinear feedback control using a sine function provides simplicity, convenient implementation, and energy efficiency.


Introduction
Traditionally, the three major objectives in the automatic control field have been pursuing sound performance on stability, precision, and speed for years. With advances in control algorithms and design, increasing effort has been directed at promoting energy savings, low cost, and simplicity [1]. Considering the increased complexity and uncertainty of control systems, nonlinear characteristics are increasingly used in designing controllers. However, the conventional PID controller, which has advantages in terms of simplicity, reliability, and physical significance, remains widely implemented in the industrial field. The shortcomings existing in the conventional PID control would be resolved if the control quantity and deviation signals could be feasibly interrelated by means of nonlinear feedback PID control. Contemporarily, nonlinear feedback control which is a kind of novel theory will be potentially developed driven by the demand of upgrading the control performance that control domain desires. The philosophy that nonlinear feedback control advocates is to modify the error signal by means of nonlinear prior to sending back to the original controller. The controller itself remains unchanged but the error signal has been nonlinearly verified, to consume less energy but achieve the same outcome as original one does. This is the promising merit that nonlinear feedback control owns.
Controlling water level in a single tank has been regarded as a typical example in the control field and frequently studied as a benchmark to evaluate the control performance of a new algorithm. As far as shipping industry is concerned, the adhibition of water level control is essential for providing better service and sound working conditions. For instances, there are several tanks fitted onboard of ships for containing different fluids which would be served for the intended voyage, namely heavy fuel tanks, diesel oil tanks, tanks for ballast water and freshwater, etc. Considering the daily consumption, stability adjustment and sea condition, etc., the way of controlling liquid level is of importance in terms of safety at sea. Many existing studies regarding the level control onboard a ship were mostly conducted from the application of conventional PID control. Nevertheless, such control method might be hindered in further development due primarily to the complicated control law, difficulties of determining parameters, and inefficiency of energysaving. A control design that saves energy would therefore be advantageous with respect to the worldwide green shipping campaign.
Control theory has undergone three successive stages: classical control, modern control, and postmodern control (also known as robust control) [2]. In recent decades, nonlinear control research has become a mainstream approach in the domain of control theory. The principle of nonlinear feedback involves constructing state feedback or output feedback through nonlinear elements to achieve superior performance to that of linear feedback. In addition, nonlinear control often has other purposes, such as simplification of the control system structure, analysis, and design methods to achieve expected performance [3]. A feedback control system is the fundamental control mode in an automatic control system. Conventional error feedback is achieved by linear feedback control whose control mode is the most widely used. However, in recent decades, control algorithms for designing a controller have gradually changed from linear control to nonlinear control considering improving the accuracy of the control system.
Research on water tank level control and related experiments involve knowledge of process control. Both linear and nonlinear tanks can be used as examples to highlight relevant knowledge [4,5]. Historically, fuzzy systems have been widely used in many sectors of the industry, and researchers have created various mathematical models and control modes of fuzzy control systems for use in liquid level control [6][7][8]. As nonlinear control emerged in the control field over the past two decades, the focus of controlling a water tank level shifted from a linear to nonlinear perspective, and various algorithms and models have been proposed. Robust nonlinear control using finite-time disturbance observers has been proposed for a three-tank system with the purpose of tracking mismatched output [9]. Dynamic matrix predictive control has also been proposed, and associated simulations have been performed to analyze various control modes for water tanks to compare their effectiveness with that of traditional PID control [10]. Similarly, in [11], the authors proposed a type of nonlinear control of a two-tank hybrid system by applying a sliding mode controller in relation to a fractional-order PID. Furthermore, [12] put forward the mathematic modeling derived by two basic nonlinear differential equations to concentrate on the adaptive control of a nonlinear system. A novel mathematical model using a bee algorithm was also proposed to control a nonlinear system for the purpose of solving open-loop optimization problems [13]. PLCbased (Programmable Logic Controller) fractional-order controller design was also investigated for the evaluation of robustness and stability of fractional-order discrete PID feedback loops for varying methods and orders [14]. In addition, in [15], the authors studied the problem for controlling water level in a tank and examined controllers in terms of both fractional-order proportional integral and fractional-order proportional-derivative with respect to outer and inner loops to check performance, as far as energy efficiency is concerned. Controller which is designed with nonlinear robust has been largely applied in the marine transportation fields. In [16], the authors formulated a simple controller and fixed parameters for verifying the control performance and robustness using a simulation test for a MASS (Maritime Autonomous Surface Ship) ship.
Zhang and Zhang XK presented backstepping control designed by a nonlinear algorithm for constructing a course-keeping controller for vessels [17]. Similarly, in [18], the authors proposed algorithm for a robust adaptive fuzzy neural network control and created a PID controller for the heading control of UMV (Unmanned Marine Vehicles). Many other nonlinear control models have been proposed and evaluated to establish mathematical models from different perspectives [19][20][21][22]. However, in terms of energy-saving performance, additional research is required.
Based on the above observations, this paper presents a sine function-based nonlinear feedback controller and performs an evaluation regarding water level control in a tank. Having reviewed the existing study, the prominent contributions of this work are: (i) a novel control algorithm and models decorated by sine function-based nonlinear are mathematically proved, and associated nonlinear feedback controller is formulated for controlling the water level; (ii) the energy-saving capability is further enhanced by lessening the amplitude of control input.
The remainder of the paper is outlined in accordance with the following sections. Relevant mathematic modeling, interrelated algorithms, and the controller design were presented in Section 2. Stability and demonstration were both analytically and mathematically carried out in Section 3 based on Young's inequality and Lyapunov stability theory etc. Section 4 mainly illustrated the assessments of capabilities for controlling the water level by means of simulation under various scenarios. The simulation results were concluded, and future work were anticipated in the last section.

Mathematical Model and Related Algorithms
A representative PID controller owns the characteristics of simplicity, dependability, and prominent physical significance. Conventional PID control has steadily advanced into numerous modified modes, for instances, self-adaptive PID control, gain scheduling PID control, self-tuning PID control, and robustness PID control, etc., with the aim of lessening the inadequacies of conventional PID control. These inadequacies mainly reflect on the integration of parameters, weak self-adaptive ability, restricted robustness, and poor control accuracy [23,24].

Mathematic Modeling and Determination of PID Parameters
Control object G(s) is defined with its coefficient as a second-order strictly proper plant as follows: Accordingly, by applying a closed-loop gain algorithm, a robust PID controller can be expressed as follows: Equation (2) is a standard PID controller, and its parameters are where 1/T1 is deemed as bandwidth frequency of the system.

Mathematical Modeling
Suppose that in a single tank control system, Qi represents the steady-state value of input water flow, while ∆Qi means the increment of the input water flow. Qo stands for the steady-state value of output water flow, while ∆Qo is the increment of the output water flow. In addition, h and ho respectively represents the height and steady-state value of the water level. ∆h means the increment of the water level. Furthermore, u is the opening value of the adjustable input valve, and A represents the cross-sectional area. R will be the water resistance at the output valve. V is the water volume. According to the correlation of the materials balance, under normal operating conditions, the original water balance of the tank is defined as Qo = Qi, h = ho. However, the actual liquid level varies in accordance with the increment ∆u of the adjustable input valve. As a result, the output water flow changes due to alterations in the water level while the output valve remains unchanged.
The difference between the input and output water flow is as follows: In Equation (4), ∆Qi is generated by ∆u, and yields i u where Ku is the constant of the water flow of the valve. The correlation between the output water flow and the water height is At the equilibrium point (ho, Qo), Equation (6) Laplace transformation is used to further transform Equation (4) by substituting Equations (5) and (7) to obtain the transfer function of the tank as follows: More explicitly, Equation (8) is used to design the controller, while Equations (4)-(6) are used to construct a simulation model to evaluate the robustness of the controller. The parameters of the water tank that was studied in this work are assumed as shown in Table 1.

No.
Item Parameter 1 Height of tank 2 m 2 Area of tank base 1 m 2 3 Cross-sectional area of the pipe 0.05 m 2 4 Original water level 0.5 m 5 Max inflow rate of water intake 0.5 m 3 /s Thus, the formula of water level and inflow rate is where H is the water level, and Qi is the input flow rate. Function (8) can be converted as follows: If considering the disturbance term, then Equation (10) can be transformed as where d is the limited disturbance term, and d ρ ∞ ≤ .

Controller Design on Account of Closed-Loop Gain Algorithm
Closed-loop gain shaping algorithm is originated under the theoretical frame of H ∞ robust control theory, which enables the closed-loop gain shaping for the control system without selecting the weight function. The core of this method is to determine the final shape of transfer function of the closed-loop system as expected to design a robust controller using four major parameters in the closed-loop system, i.e., the maximum singular value, bandwidth of frequency, shut down slope, and spectrum peak of the closed-loop. The merit of this algorithm is of obvious physical significancy with simple design.
In conformity to Equation (7), the controller proposed hereby is constructed using a closed-loop gain algorithm (see Figure 1). When the bandwidth frequency is set 1/T1.the complementary sensitivity function of the water level control is therefore derived as Substituting Equation (8) into Equation (12), then the final controller of the water tank is The controller as expressed in Equation (12) is in fact a type of proportional-derivative (PD) controller based on a negative feedback mechanism. This controller has the advantages of simplicity and convenience, as in a conventional PD controller; however, it also solves the problems of complex integration of parameters and ambiguous physical significance.

Stability Analysis and Mathematical Proof of Proposed Controller
Stability analysis of the nonlinear feedback controller on account of the closed-loop gain shaping algorithm is performed using Lyapunov stability theory.
For the water tank level system, a linear control law is designed by the first-order closed-loop gain shaping algorithm Then the state space expression of the error system is defined as Suppose Introduce nonlinear feedback, let sin( ) replace e for proportional and derivative, then we can obtain the nonlinear control law Select a new Lyapunov candidate function Obviously, V is a positive definite function.
Now, Equation (23) is a semi-negative definite function, Assume Assume x2(t) is also any solution belonging to S, then The only solution that can remain in S is ( ) 0 x t ≡ , the equilibrium point is therefore asymptotically stable.
To sum up, the below lemma could be concluded based on the above mathematical derivations. LEMMA 1: Under the condition of stable control, the designed controller as proposed in this study reduce output of the control object whereas the steady-state value and control performance remaining the same.
The detailed elaboration of abovementioned lemma can be scrutinized as follows: (1) Impact on the stability of the designed control system: in setting the water level as a step-function signal, amplitude is r H , the steady-state output of water level H as illustrated in Figure 1 can be expressed as follows, where the amplitude is r H : Thus, the output steady-state error is 0, and there is no additional impact on the system stability of nonlinear control using the sine function.
(2) Impact on the dynamic property of the designed control system: the transfer function from input r H to output H of the system is Because 1 ω < , based on closed-loop gain theory, GK, which represents the charac- teristics of the open-loop frequency of the control system, meets the requirements of high gain at low frequency and low gain at high frequency [1]. Consequently, in the low-frequency scope, comparing Equation (28) and the closed-loop transfer function of the standard feedback system, there is little impact by introducing ω into the system.
The analysis in (2) is also applicable in this case; however, it should be noted that the deduction of the numerator is more significant than the deduction of the denominator. As a result, the control output is reduced by introducing into the system.

Simulation Experiments and Results
Evaluation of the models and algorithms discussed in Section 2 was performed using the Simulink toolbox, and a simulation diagram was designed, as illustrated in Figure 2. The robust PID controller proposed in [24] demonstrated more robust stability and simplicity than the original fuzzy PID controller proposed in [25] where the detailed information of all settings in relation to the fuzzy control are preset and already embedded in the program. The enhanced PID controller proposed in this study is a sine function-based nonlinear feedback controller that aims to achieve energy-saving performance. The input signal is corelated with amplitude in the form of a square wave varying from 0.5 m to 1.5 m. Although (2) is considered to construct the PID controller, a nonlinear mathematic modeling which is more complicated is employed for simulations. On the condition that the maximum inflow rate of the tank is maintained at 0.5 m 3 /s, the results of nonlinear feedback robust PID control can be used to determine that the mean control input is 0.0153 m 3 /s. The simulation results are presented in blue curve of Figure 3a,b, where Figure 3a displays the curve of the control input and Figure 3b displays the curve of the water level. No overshooting occurs, and quick tracking is achieved. Because a complex nonlinear model is used in the simulation whereas a simplified linear model is used to design the controller, system robustness is ensured.  As illustrated in red curve of Figure 3, the simulation results of the original fuzzy controller reveal that the mean control input is 0.0228 m 3 /s. By collating the nonlinear feedback robust PID control and original fuzzy control, it can be seen that overshoot which is around 6.7% has been reduced and the response speed in terms of setting time (5.25 s) is increased when using nonlinear feedback robust PID control. Because the mean control input is reduced by 32.9%, energy-saving is achieved by introducing the sine function into nonlinear feedback control.
When the inflow rate is reduced from 0.5 m 3 /s to 0.4 m 3 /s, the simulation results of the nonlinear feedback robust PID controller demonstrate that the mean control input is increased to 0.0203 m 3 /s (as illustrated in blue curve of Figure 4); however, the output performance hardly changes.  The simulation results of the original fuzzy controller, as illustrated in red curve of Figure 4, indicate that the mean control input is increased to 0.0257 m 3 /s, and the output performance is reduced. The nonlinear feedback effect remains better performance over the original fuzzy controller even when the inflow rate is reduced. The mean control input is reduced by up to 21%, which demonstrates that the energy efficiency of sine functionbased nonlinear feedback control is superior to that of original fuzzy control.
The following comprehensive control performance index J as shown in Equation (30) is used to evaluate the two aforementioned control algorithms: In accordance with Equation (30), J is a function that is used to measure the performance index of the control input value and output error; that is, the performance index is better with a smaller J. The above simulation result, as summarized in Table 2 through a quantitative comparison, positively confirms the effectiveness of the proposed algorithm. 24.0% 6.5%

Conclusions
In this study, two different control modes-nonlinear feedback robust PID control and conventional fuzzy control-are mathematically discussed and analyzed by controlling the water level in a tank. The nonlinear control mode yields the most energy-efficient performance, reducing the mean control input by 32.9% and improving the performance index by 24%. The proposed nonlinear PID controller using the sine function is developed in accordance with the design goals discussed in a previous study [24]. The specifications and features with respect to robust stability and simplicity are retained while the energysaving capability is significantly increased. In this paper, the sine function is used in non-linear feedback control to achieve the objective of using less energy. The proposed algorithm applying sine function-based nonlinear feedback demonstrates advantages, such as energy efficiency, simplicity, and potential for extensive use in the industry. However, due primarily to the conditions and limitations of carrying out actual experiments which would be further strengthened in our future research, particularly for the implementation of the fluid level control onboard an ocean-going ship.