Tank-Level Control of Liqueﬁed Natural Gas Carrier Based on Gaussian Function Nonlinear Decoration

: This paper introduces a novel controller into the tank level control of liquefied natural gas (LNG) carrier. The proposed controller can simplify the design process and save energy output of the controller under the premise of achieving a good control effect of the liquid level of a liquefied natural gas (LNG) carrier tank. Moreover, Gaussian function is adopted to decorate nonlinearly the output of the linear controller designed by using the second-order closed loop gain-shaping algorithm, and then the final controller is obtained. The effectiveness of the controller is verified by simulation experiments on the LNG carrier “Da-Peng Sun” No.2 liquid tank. The simulation results show that the comprehensive control performance index J of the second-order closed loop gain-shaping controller decorated by Gaussian function reduces by 11.8% and 95.3%, respectively, compared with the controller without nonlinear decoration and the linear proportional–integral–differential (PID) controller, meeting the requirement of energy saving and realizing a good control result of the tank level of the LNG carrier.


Introduction
With the rapid development of society and the economy of the shipping industry, people's awareness of environmental protection has been constantly enhanced and the structural reform of traditional energy has gradually become another theme of the current society. Therefore, in the context of environmental degradation caused by high energy consumption, the liquefied natural gas (LNG) industry chain around the world has been gradually expanding and discussions on LNG have gradually become the focus of people's research in recent years. Compared with traditional energy, LNG has the advantages of being cleaner and more environmentally friendly. The rapid development of LNG-related projects has gradually formed certain favorable conditions for the development of LNG industry in the shipping field. LNG carrier tank-level control is related to this industry; it is one of the typical control applications in industrial production. For example, in an ocean-going ship, there are all kinds of tanks to perform different services to coordinate safe navigation, such as an oil tank, ballast tank, fresh water tank, boiler water tank, mud tank, etc. Therefore, the importance of tank-level control is obvious.
As a typical representative of process control, the control of the water tank level is one of the hot spots in many process control studies, it is widely used in various fields of industrial production, among them the reliability of the control device and the accuracy of the control scheme are always the key factors affecting the performance of the whole system. However, the water tank level control system often has many uncertain factors, such as state time-varying, nonlinear, and hysteresis, so the traditional proportional-integral-differential (PID) control strategy cannot meet the performance requirements. In order to improve the ability to solve practical problems with theory from the perspective of application, in this paper, the water level model is amplified to study the tank level control of the LNG carrier J. Mar. Sci. Eng. 2020, 8, 695 2 of 12 and a first-order filter is connected in series in a PD (proportional-differential) controller, which can overcome the disadvantages of a traditional PID controller to a certain extent.
Zhang et al. [1] proposed a new closed-loop gain-shaping control algorithm, which has the advantages of a simple design process, obvious physical significance, and good robustness and stability of the designed controller. The new closed-loop gain-shaping control algorithm was applied to tank-level control and a good control effect was obtained [2]. Then, this new algorithm was applied to various aspects of ship motion control, such as ship course keeping control and ship rolling reduction control [3,4].
In recent years, a large number of scholars have conducted research on water tanks. Zhong et al. [5] used the dynamic matrix predictive algorithm to control the water level of a tank and verified the robustness of the proposed method by doing comparison experiments with various tanks. At last, the effectiveness of the proposed method was verified by the comparison experiment between the proposed method and traditional PID method. Li et al. [6] took linear and nonlinear tanks as examples and discussed the application method of several knowledge points about process control in them. Robert et al. [7] focused on the design of a new PID control to achieve higher dynamic accuracy and made it more instructive. Prasanta et al. [8] presented a new level control problem of a coupled two-tank Single Input and Single Output (SISO) system and validated that fractional order proportional integral (FOPI) and fractional order proportional derivative (FOPD) controllers are better than integer-order proportional-integral (IOPI) and integer-order proportional-derivative (IOPD) controllers as they achieve less steady-state error and consume less energy when the phase margin and gain crossover frequency are the same. Hedrea et al. [9] presented the design and validation of the tensor product (TP)-based model of a vertical three-tank system's laboratory equipment using the tensor product-based model transformation technique. Guo et al. [10] studied the optimal control of water-level oscillations in a surge tank and proposed the cascaded load adjustment mode. By using this mode, the ideal attenuation of water-level oscillations was realized under superimposition operating conditions. In addition, Dariusz [11] designed another proportional-integral (PI)-style controller to maintain a stable regulated ballast water level. Arkadiusz et al. [12] discussed the design of a programmable logic controller (PLC)-based fractional-order controller for industrial water tank volume control and proposed fractional-order controllers with stability and robustness. Kumar et al. [13] proposed a new method to control the level of a two-tank hybrid system by using SMC with an FOPID sliding surface. Zhao et al. [14] proposed an energy-saving inverse tangent functional nonlinear algorithm to evaluate water-level control. Similarly, other areas also have used the nonlinear robust controller. The closed-loop shaping filter was used in [15] to utilize the control effect of yaw motion of a smart surface vessel. The inverse tangent function was introduced in [16] to simplify the course-keeping backstepping controller design process for ships. In [17], a nonlinear controller was used to control the steering wheel angle of autonomous vehicles. Haidegger et al. [18] used PID-fuzzy controllers to improve the control system performance and proposed a cascade loop solution to support future teleoperation missions. Precup et al. [19] proposed a new approach to the stable design of fuzzy logic control systems that deal with a general class of chaotic processes by employing Lyapunov's direct method and the separate stability analysis of each rule in the fuzzy logic controller (FLC) on the basis of a stability analysis theorem. Dong et al. [20] and Jiang et al. [21] also made some studies about nonlinear control, such as proposing the robust adaptive fuzzy neural network control (RAFNNC) algorithm to control the heading of unmanned marine vehicles, in which an improved gray model is combined with the nonlinear robust controller to design the ship course-keeping controller. Zheng et al. [22] studied the problem of dynamic output feedback control for a class of nonlinear multiple time-delays system. The authors of [23][24][25][26] proposed some other nonlinear control models from different perspectives.
In summary, the above references have conducted in-depth research on the control field of water tank-level control from different point of views, including a variety of control methods and algorithms, and have made some achievements. However, there is still a large research space on the tank-level control and energy saving of the LNG carrier.
Based on the above results, this paper puts forward a novel nonlinear decorated controller with good control and energy-saving effects. The main contributions can be listed as follows: (1) A linear controller is designed by using the second-order closed-loop gain-shaping algorithm.
(2) The energy-saving effect of the controller is achieved by using the Gaussian function to decorate the controller output nonlinearly. (3) The new algorithm is applied to the control of the tank level of the LNG carrier for the first time and the effectiveness and energy saving of the controller are verified through simulation and comparison experiments.

Tank-Level Model of the LNG Carrier
For the LNG carrier tank system, Q i stands for the steady-state value of the liquefied natural gas (LNG) input into the tank of the LNG carrier; ∆Q i represents the increment of the input liquefied natural gas (LNG); Q o represents the steady-state value of the output liquefied natural gas (LNG); ∆Q o represents the increment of the output liquefied natural gas (LNG); h represents the liquid-level height; h o represents the steady-state value of the liquid level; ∆h represents the increment of the level; u is the opening degree of the regulator valve; A represents the cross-sectional area of the LNG carrier; and R is the resistance of the load valve at the outflow, namely liquid resistance. At equilibrium, Q o = Q i and h = h o . When the opening of the regulator valve changes ∆u, the tank level of the LNG carrier will change accordingly.
The difference between the inflow and outflow is shown in Equation (1): where V is the liquid storage capacity of the LNG carrier's tank: where K is the valve flow coefficient: where A o is the cross-sectional area of the output tube. This nonlinear formula can be linearized at the equilibrium point (h o , Q o ), and the liquid resistance R can be expressed as Equation (4): Substituting Equation (2) and Equation (4) into Equation (1), and replacing them with the form of the transfer function, we get the transfer function of the LNG carrier tank as Equation (5): In Equation (5), K 0 = K u R, T 0 = RA. The linear model (5) is used for designing the controller, while nonlinear models (1)-(3) are used for system simulation to verify the robustness of the designed controller.
Equation (5) can be transformed to: If the interference term is taken into account, the above model is modified as follows: where w is the bounded interference term, and w ∞ ≤ ρ. "Da-Peng Sun" is the first LNG carrier manufactured in China, taking No.2 tank as an example [27] (see Figure 1). The tank parameters are shown in Table 1 where w is the bounded interference term, and w ρ ∞ ≤ . "Da-Peng Sun" is the first LNG carrier manufactured in China, taking No.2 tank as an example [27] (see Figure 1). The tank parameters are shown in Table 1.  By calculating these parameters, we find that the length of the tank is 46.6 m, the average width is 33.9 m, the average cross-sectional area is 1579.74 m, and the height of the tank is 26.4 m. LNG carrier tank-level control is meaningful only when the LNG carrier is performing loading and discharging operation. As these two operations are roughly the same, we can only simulate the loading operation and the cross-sectional area of the output tube can be set at a smaller value: 0.01 m 2 . Through a lot of trials, we set R = 1, ; then, we can get the linear model parameters by According to reference [28], the formula of the liquid level and flow of the LNG carrier tank is:  By calculating these parameters, we find that the length of the tank is 46.6 m, the average width is 33.9 m, the average cross-sectional area is 1579.74 m, and the height of the tank is 26.4 m. LNG carrier tank-level control is meaningful only when the LNG carrier is performing loading and discharging operation. As these two operations are roughly the same, we can only simulate the loading operation and the cross-sectional area of the output tube can be set at a smaller value: 0.01 m 2 . Through a lot of trials, we set R = 1, K u = 0.0025; then, we can get the linear model parameters by using According to reference [28], the formula of the liquid level and flow of the LNG carrier tank is:

Design of the Nonlinear Decorated LNG Carrier Tank-Level Controller Based on the Closed-Loop Gain-Shaping Algorithm
For the linear mathematical model of the LNG carrier tank level shown in Formula (5), the closed-loop gain-shaping algorithm is adopted to design the linear controller [29], the bandwidth frequency of the closed-loop system is set as 1/T 1 , and the supplementary sensitivity function of the LNG carrier tank-level control system, namely the closed-loop transfer function of the system, is shown in Equation (9): In the process of designing the level controller of the LNG carrier tank based on the closed-loop gain-shaping algorithm, we made the following assumptions: (1) The bandwidth frequency of the closed-loop system is 1/T 1 .
(2) The closing slope of the closed-loop transmission frequency spectrum of the system is −40 dB/dec when designing the controller, and the singular value curve of T is approximately expressed as the spectrum curve of the second-order inertial system with the maximum singular value of 1. Compared with the typical oscillation link, this is equivalent to the case where the damping ratio is 1, thus ensuring that there is no peak in the spectrum of T.
Substituting Equation (5) into Equation (9), we finally get the linear controller K of the LNG carrier tank level: where 1/T 1 = 1rad/s. From Equation (10), we can know that the form of the controller using the second-order closed-loop gain-shaping algorithm is a PD (proportional differential) controller series and a first-order filter based on the negative feedback mechanism. Its structure is simple, easy to implement, and its application is very convenient.
Because 1 T 1 s+2 stands for a first-order filter, it does not affect the stability of the system, so we can ignore it and only need to prove the stability of Equation (11): The Lyapunov stability theory is used to analyze the stability of the LNG tank-level controller.
First, the state variables of the control system are defined as where e is the deviation between the actual tank level and the set tank level. According to Equation (12), the flow rate Q i of the tank-level control system of the LNG carrier can be expressed as: Substituting Equation (13) into Equation (6), we can get Equation (14): Finally, according to Equations (12) and (14), the equation of the state of the control system can be obtained: For Equation (15), the Lyapunov function of the system is defined as Equation (16): where P is a positive definite real symmetric matrix, and P = P T . Ignoring the external interference term in Equation (15), we can get: .
According to the Lyapunov stability theorem, for any positive definite real symmetric matrix Q, in order to make the system asymptotically stable in a large range at the origin, the following equation should be satisfied: The positive definite real symmetric matrix is defined as Q = I = 1 0 0 1 , and the positive definite real symmetric matrix P is constructed as: Substituting Equation (15) and Equation (19) into Equation (18), we can get Equation (20): By expanding the matrix of Equation (20) and solving it, we get: In order to maintain the positive definiteness of the matrix P, the following equation needs to be satisfied: By solving Equation (22), Equation (23) is obtained: Therefore, in the case of T 0 > √ 0.8 ≈ 0.9, if T 1 > 0 is ensured, the balanced state of the controller at the origin is asymptotically stable in a large range.
Next, the nonlinear function is used to decorate the output of the linear controller K of the LNG carrier tank level. After a lot of attempts, the nonlinear function is selected as the Gaussian function and through debugging, its final form is (0.91 − 0.9e −(u−0.0) 2 /0.5 2 ) sgn(u). We designed the controller according to the mathematical model of Equations (8) and (10) and the closed-loop gain-shaping algorithm. Figure 2 shows the overall structure of the system, where w is the interference term.
Next, the nonlinear function is used to decorate the output of the linear controller K of the LNG carrier tank level. After a lot of attempts, the nonlinear function is selected as the Gaussian function and through debugging, its final form is . We designed the controller according to the mathematical model of Equations (8) and (10) and the closed-loop gain-shaping algorithm. Figure 2 shows the overall structure of the system, where w is the interference term.

Simulation Experiment and Result Analysis
In order to verify the effectiveness and energy-saving effect of the controller, Matlab's Simulink toolbox was used for the LNG carrier loading (full loading) simulation experiment. The simulation block diagram was designed according to Figure 2 and the actual loading capacity of "Da-Peng Sun" LNG No.2 Tank. During the simulation experiment, the sloshing phenomena and surface of the free liquid inside the tank were not considered, and the parameters of K and G were obtained by Equations (8) and (10). Here, 1 1 T = , the running time was 35,000 s, and the controller with nonlinear decoration was compared with the controller without nonlinear decoration. Figure 3 shows the system simulation block diagram and the link of program is in the Supplementary Materials.

Simulation Experiment and Result Analysis
In order to verify the effectiveness and energy-saving effect of the controller, Matlab's Simulink toolbox was used for the LNG carrier loading (full loading) simulation experiment. The simulation block diagram was designed according to Figure 2 and the actual loading capacity of "Da-Peng Sun" LNG No.2 Tank. During the simulation experiment, the sloshing phenomena and surface of the free liquid inside the tank were not considered, and the parameters of K and G were obtained by Equations (8) and (10). Here, T 1 = 1, the running time was 35,000 s, and the controller with nonlinear decoration was compared with the controller without nonlinear decoration. Figure 3 shows the system simulation block diagram and the link of program is in the Supplementary Materials.
according to the mathematical model of Equations (8) and (10) and the closed-loop gain-shaping algorithm. Figure 2 shows the overall structure of the system, where w is the interference term.

Simulation Experiment and Result Analysis
In order to verify the effectiveness and energy-saving effect of the controller, Matlab's Simulink toolbox was used for the LNG carrier loading (full loading) simulation experiment. The simulation block diagram was designed according to Figure 2 and the actual loading capacity of "Da-Peng Sun" LNG No.2 Tank. During the simulation experiment, the sloshing phenomena and surface of the free liquid inside the tank were not considered, and the parameters of K and G were obtained by Equations (8) and (10). Here, 1 1 T = , the running time was 35,000 s, and the controller with nonlinear decoration was compared with the controller without nonlinear decoration. Figure 3 shows the system simulation block diagram and the link of program is in the Supplementary Materials. The input of the liquid level setting was a step signal with a value of 26.4 according to [27]. The controllers in Figure 3 were all designed by using the second-order closed-loop gain-shaping algorithm, and the upper part of Figure 3 uses the Gaussian function to decorate nonlinearly the output of the controller, while the lower part of the controller is undecorated. When the maximum loading capacity is 1.67 m 3 /s, the control output of the nonlinear decoration controller is 0.9100 m 3 /s (see Figure 4), reaching the set liquid level at a fast speed and completing the loading operation. The input of the liquid level setting was a step signal with a value of 26.4 according to [27]. The controllers in Figure 3 were all designed by using the second-order closed-loop gain-shaping algorithm, and the upper part of Figure 3 uses the Gaussian function to decorate nonlinearly the output of the controller, while the lower part of the controller is undecorated. When the maximum loading capacity is 1.67 m 3 /s, the control output of the nonlinear decoration controller is 0.9100 m 3 /s (see Figure 4), reaching the set liquid level at a fast speed and completing the loading operation.  Figure 5 shows the simulation results of the controller without nonlinear decoration. The control effect of the liquid level is roughly the same, except that the control output is 1.670 m 3 /s and reaches saturation. The decrease of the Gaussian function nonlinear decoration control is up to 53%, indicating that the control with nonlinear decoration is more energy saving.  Figure 5 shows the simulation results of the controller without nonlinear decoration. The control effect of the liquid level is roughly the same, except that the control output is 1.670 m 3 /s and reaches saturation. The decrease of the Gaussian function nonlinear decoration control is up to 53%, indicating that the control with nonlinear decoration is more energy saving.  In order to further verify the effectiveness and energy-saving effect of the controller, the linear PID controller presented in [30], which was proved and testified to have good robust stability and control effect, was used to do the contrast experiments. During the simulation experiment, the sloshing phenomena and surface of the free liquid inside the tank were not considered, and the parameters of K and G were obtained by Equations (8) and (10), where T1 = 1, and the running time was 35,000 s. Figure 6 shows the system simulation block diagram and the link of program is in the Supplementary Materials. In order to further verify the effectiveness and energy-saving effect of the controller, the linear PID controller presented in [30], which was proved and testified to have good robust stability and control effect, was used to do the contrast experiments. During the simulation experiment, the sloshing phenomena and surface of the free liquid inside the tank were not considered, and the parameters of K and G were obtained by Equations (8) and (10), where T 1 = 1, and the running time was 35,000 s. Figure 6 shows the system simulation block diagram and the link of program is in the Supplementary Materials. PID controller presented in [30], which was proved and testified to have good robust stability and control effect, was used to do the contrast experiments. During the simulation experiment, the sloshing phenomena and surface of the free liquid inside the tank were not considered, and the parameters of K and G were obtained by Equations (8) and (10), where T1 = 1, and the running time was 35,000 s. Figure 6 shows the system simulation block diagram and the link of program is in the Supplementary Materials.  Figure 7 shows the simulation results of the PID controller. Compared with the nonlinear decorated controller, the control output is too large and reaches saturation and its output is unstable, which leads to a bad control effect. This further illustrates the controller proposed in this paper has a good robust stability and energy-saving effect.  Figure 7 shows the simulation results of the PID controller. Compared with the nonlinear decorated controller, the control output is too large and reaches saturation and its output is unstable, which leads to a bad control effect. This further illustrates the controller proposed in this paper has a good robust stability and energy-saving effect. In order to compare the control effects of the two control algorithms more intuitively, the comprehensive control performance index J given in Equation (24) was used for comparison: where J is a function that controls the input energy and output error, where the smaller the value, the In order to compare the control effects of the two control algorithms more intuitively, the comprehensive control performance index J given in Equation (24) was used for comparison: where J is a function that controls the input energy and output error, where the smaller the value, the better the results. Table 2 shows the comparison results. In Table 2, the comprehensive control performance of the nonlinear decorated second-order closed-loop shaping-control algorithm is better than that without the nonlinear decorated second-order closed-loop shaping-control algorithm. From the above simulations results, we can find that the nonlinear decoration controller has a better control performance than the controller without nonlinear decoration and the PID controller. In addition, the control output of nonlinear decoration is obviously lower than the others without nonlinear decoration, which means the controller with nonlinear decoration has a better energy-saving effect. The results show that the proposed controller is robust and energy efficient.

Conclusions
In this paper, a novel control algorithm of the LNG carrier tank level, which can improve the energy-saving effect, was proposed. In this algorithm, the second-order closed-loop gain-shaping algorithm was first used to design the linear controller, then the linear control law was decorated by the nonlinear decoration technology based on the Gaussian function.
Then, the effectiveness of the controller was verified by the simulation experiment of the LNG carrier "Da-Peng Sun" No.2 tank. Finally, the nonlinear decorated controller, controller without nonlinear decoration, and PID controller were used to do simulation comparison experiments. By analyzing the simulation curves of the LNG carrier tank level of these three controllers, it was found that the second-order closed-loop gain-shaping controller decorated by the Gaussian function can better finish the loading operation in an effective and energy-saving way, reducing the output of the controller and saving energy. This indicates that the controller designed in this paper is robust and energy saving. Most importantly, it has certain guiding significance for the loading and discharging process of the LNG carrier in real life, and it can also be further applied to the liquid-level control of the ship's ballast water tank, fresh water tank, boiler water tank, and even mud tank. At the same time, it shows that the nonlinear decoration technology has essential research significance in the energy-saving aspect and can be studied more extensively and deeply.
However, the simulation experiment in this paper was carried out under the premise of some assumptions and the actual situation is more complex, such as the existence of sloshing phenomena and the surface of the free liquid. Therefore, it is necessary to do more research in complex situations.
Supplementary Materials: The link to the program of Figure 3 is shared at https://pan.baidu.com/s/ 1I6qCGa2fVACQZ2n3Tm9B6A code: jt85. The link to the program of Figure 6 is shared at https://pan.baidu.com/s/ 1K0GmG6Jldy_pP4wA-e-zQw code: dcrs.