1. Introduction
Level control is commonly applied in large industrial automation production. In the shipping industry, the level control of various ship compartments plays a vital role in coordinating the safe navigation of ships, such as oil tanks, ballast tanks, and freshwater tanks. However, tank-level control systems are often subject to uncertainties such as time-varying state, non-linearity, and time lag. So many scholars have conducted a lot of research on this problem. Li et al. [
1] and Zhang et al. [
2] designed the water tank level controller based on the PID method, the simulation experiments showed that the PID controller has a better control performance. However, there is still the problem of complex parameter rectification to some extent. Thus, the idea of fuzzy logic and PID control worked together to solve the problem of parameter tuning [
3,
4]. Olivas et al. [
5] used the ant colony algorithm (ACO) to further optimize the fuzzy controller for the water tank. However, this type of intelligent algorithm is more complex and computationally intensive. Young et al. [
6] proposed a sliding mode control theory. It is widely used in applications due to its robustness and simplicity. The water tank level controller designed based on the sliding mode control theory [
7,
8,
9,
10] worked well. However, the discontinuous switching characteristics of the variable structure can cause jitter and vibration in the system. It reduces the service life of the pump and is not conducive to practical engineering applications. Therefore, it is necessary to design a simple tank level control system with the following characteristics. (1) Clear engineering implications and low calculation load. (2) Under the constraints of pump performance constraints, external environmental interference, and time lag, the controller should reduce energy loss and extend the service life of the pump while ensuring high control effects.
So, we use a closed-loop gain-shaping algorithm (CGSA) to design the controller. The algorithm is simplified as an engineering application of robust control and has the advantages of a simple design process and obvious physical significance. Zhang et al. [
11] proposed a new control scheme for industrial multiple-input multiple-output (MIMO) systems with a time lag using the CGSA method. Guan et al. [
12] used CGSA to design a robust PID fin control system to achieve ship rocking reduction control. Jiang et al. [
13] designed a wireless network control system based on CGSA and verified its role in a ship course keeping control through a simulation platform. The non-linear modification technique adds a non-linear function component between the control input and the system model. It is often combined with CGSA algorithms to solve the issue of high energy consumption. The technique is widely used in various fields such as ship heading control [
14,
15,
16,
17], track keeping [
18,
19,
20], pressure control in insulated spaces [
21], parameter identification of ship response models [
22], tank level control [
23,
24,
25,
26], etc. However, for tank level control, CGSA was modified by different functions, such as the arctan [
23], sinusoidal function [
24], and S function [
25]. The control system was modified by the Gaussian function and applied to the control of liquid tanks of LNG vessels [
26]. The above research results were searching for the effect of different nonlinear functions on the modification of the CGSA algorithm and applying them to different fields. In this paper, we propose a nonlinear switching theory to reduce its impact on the dynamic performance of the controller while ensuring the original decoration effect. Moreover, we introduce new evaluation metrics to analyze the effectiveness of the control system. The main contributions are listed by
(1) We design a concise linear controller using a third-order closed-loop gain-shaping algorithm and modify the linear control law by a nonlinear switching modification technique based on the arcsine function. Meanwhile, a pure time lag component of 0.8 s is introduced to fit the realistic situation, and finally, we use the Nyquist stability criterion to demonstrate the stability of the control system.
(2) When doing simulation experiments, we consider the performance constraints of the pump and little interference. Then, we introduce a new evaluation index system to analyze comparatively the controller. The experimental results show that this controller has significant advantages in terms of energy saving, safety, and smoothing.
The remainder of the paper is organized as follows: In
Section 2, we simplify the non-linear tank level model. In
Section 3, the control system is designed. In
Section 4, we perform stability analysis in the presence of time lag. In
Section 5, We provide simulation examples, and
Section 6 concludes.
2. Tank Level Model
Assumption. An idealized single tank exists, where both input and output regulating valves are in action to achieve the set height. The key mathematical notations used in this model are listed in
Table 1.
The difference between the inflow and outflow is
where
is the tank liquid storage volume.
where
is the valve flow coefficient.
where
is the cross-sectional area of the output tube.
Equation (3) can be converted to linear at the equilibrium point
, then the liquid resistance R can be expressed as
Substituting Equations (2) and (4) into Equation (1) and converting them into transfer function form, we receive
where,
. The linear model (5) is used for the design of the controller, while the non-linear model (1) (3) is used for system simulation to verify the robustness of the designed controller. Assuming that the height of the tank used for this paper is 2 m, the cross-sectional area of the tank is
, the cross-sectional area of the output pipe is
, the initial level is 0.5 m, and the maximum inlet volume of the tank is
, then
,
,
,
[
22].
However, the simplified model responds nearly 40% faster than the actual situation [
27]. To improve the simulation accuracy of the linear tank control system, a first-order inertial system
was added to Equation (5), and it was verified that the regulation time was similar to the actual situation in [
27]. Thus, this paper uses this model to improve the confidence of the system simulation, and the new model transfer function is
3. Control System Structure Design
In this section, we first design the controller using the CGSA and then modify the above-level-control system using an arcsine function. We add a pure time lag component after the level model to fit the actual situation. The control system structure is shown in
Figure 1.
3.1. Introduction of the Closed-Loop Gain Shaping Algorithm
The closed-loop gain-shaping algorithm is a proposed simple and robust control method for stable MIMO processes based on robust control theory. The core of the method is to determine the final expression of the closed-loop transfer function matrix of the system and to design the robust controller using the main parameters of the closed-loop system, i.e., the maximum singular value, bandwidth of frequency, high frequency asymptote slope, and spectrum peak of the closed-loop.
A control algorithm based on closed-loop gain-shaping is given by observing the mixed sensitivity singular value curve of
control S/T (see
Figure 2) and the correlation between the sensitivity function S(
, G is the controlled object and
is the controller) and the complementary sensitivity function T(
). According to the four engineering parameters of the maximum singular value, the bandwidth of frequency, the high frequency asymptote slope, and the spectrum peak of the closed-loop, the result of the hybrid sensitivity control algorithm using
control is used to construct the complementary sensitivity function T. The correlation between T and the sensitivity function T is applied to indirectly construct the sensitivity function T, and finally, the controller K is inverted.
3.2. Controller Design
We use the third-order CGSA to design the tank level controller and set the bandwidth frequency of the closed-loop system to
. Then the complementary sensitivity function of the tank level control system at this time is also the closed-loop transfer function of the system.
By substituting Equation (6) into Equation (7), the final robust controller is obtained as
As can be seen from Equation (8), the controller designed using the third-order closed-loop gain-shaping algorithm is in the form of a typical PD controller with an oscillating component in series. It is simple and easy to implement, solving the problem of complex parameterization and the unclear physical meaning of conventional PD controllers.
3.3. Improved Non-Linear Switch Modification
The non-linear modifier switching technique is essentially a segmentation function. In this paper, the segmentation function is constructed using the arcsine function in the following form.
where
and
.
It indicates that the system output differs significantly from the set output when u is large. It is often the initial stage of the control process or a situation where a major disturbance occurs. At this time, the arcsine non-linear modification does not work, maintaining the dynamic performance of the control law (8). It means that the difference between the system output and the set output is little when u is small. It is often the stable phase of the control process or a situation where small disturbances occur. Now the arcsine non-linear modification takes effect, making the control input smaller with little impact on the dynamic performance of the control law (8) and thus reducing energy consumption. Since the dynamic performance of the control law (8) remains unchanged for . So, we list the following analysis for the case where .
When
, we choose to retain the first-order Taylor expansion of the arcsine function.
(1) Effect on the steady state of the system
Assume that the input is a unit step signal and then analyze the output steady-state values using a modified model of the control object. According to the final value theorem of the Rasch transform, we obtain Equation (11).
Therefore, the non-linear switching modification of the arcsine function does not affect the final steady state of the system.
(2) Effect on the dynamic performance
Equation (12) is the transfer function of the closed-loop system. According to the closed-loop gain-shaping theory, the open-loop transfer function GK of the system meets the requirements of high gain at low frequencies and low gain at high frequencies when . Therefore, in the low-frequency range of Equation (12) compared with the standard feedback system , adding has little effect on the dynamic performance of the system.
(3) Effect on controller output
Equation (13) is the transfer function from the input to the controller output. The numerator of Equation (13) decreases more significantly than the denominator. So will reduce the control output. Non-linear switching technology is the introduction of to reduce energy consumption during the stabilization phase of the control, but at the same time to reduce the output.
4. Stability Analysis
In this section, we begin with an individual analysis of the control law (8) to explore its inherent stability performance. Afterward, the control system, which has the addition of non-linear switching modifications and time lag, is proved to be stable.
The stability analysis of a tank level feedback controller designed based on a closed-loop gain-shaping algorithm is commonly used in the Lyapunov stability theory [
22,
23,
24]. In this paper, the controller follows this scheme and finds that it is necessary to construct and solve a positive definite real symmetric matrix, which is computationally more complex and abstract. Therefore, we refer to the proof of [
19] to analyze the stability of the third-order closed-loop gain-forming controller using the Nyquist stability criterion in the frequency domain approach.
4.1. Improved Non-Linear Switch Modification
Theorem 1. The closed-loop system of the controller designed using the third-order closed-loop gain-shaping algorithm is stable with amplitude margin and phase angle margin under the condition .
Proof: The open-loop transfer function of the system is obtained from Equation (8):
Taking
into the Equation (14).
Assume that the cut-off frequency is
and the phase angle junction frequency is
.
Further solving for the phase angle margin , amplitude margin .
When
, the real part of
is
□
Apparently,
. As
changes from 0 to infinity, the amplitude and phase angle decreases. When
tends to infinity, the phase angle of all three complex vectors is
, and the amplitude is infinity. Substituting into Equation (7) we obtain
. We make the magnitude-phase characteristic curve of the system as shown in
Figure 3.
From the Nyquist stability criterion, we obtain
P is the number of poles in the right half-plane of the open-loop transfer function. N is the number of turns of the Nyquist curve enclosing and Z is the number of poles in the right half-plane of the closed-loop transfer function. In summary, this closed-loop system is stable. Its phase angle margin and amplitude margin .
4.2. Control System Stability Analysis
We add a pure time lag component of 0.8 s to the simulation system to fit the actual situation. However, this results in a degradation of the quality of the control and a reduction in the stability of the system. For this reason, we plot the amplitude-phase characteristic curve for the combined effect of the non-linear maximum modifier and the 0.8 s pure time lag component as shown in
Figure 4 and use the Nyquist stability criterion to determine the stability of the system.
The blue line shows the magnitude-phase characteristic curve of the original system. The black line is the amplitude-phase characteristic curve of the above two links acting together.
As a result, the system remains stable. However, the non-linear switching modification selectively changes the open-loop transfer function gain, affecting the amplitude margin of the system. Additionally, the introduction of a pure time lag component reduces the phase angle junction frequency of the system, thus reducing the phase angle margin.
6. Conclusions
This paper designs a concise and robust control scheme for water tank levels that can further improve the control quality. We first design a linear controller using a third-order closed-loop gain-shaping algorithm. The control law is then modified using a nonlinear switching modification technique based on an arcsine function. Additionally, the stability of the closed-loop system with time lag is demonstrated using the Nyquist stability criterion. We use a hypothetical tank model with a small disturbance, a pure lag of 0.8 s, and a pump servo system to verify the controller. Take one of the experiments as an example, compared to the second-order CGSA controller modified by the Gaussian function, the third-order CGSA controller modified by the nonlinear switch in this paper decreases by 81%, 97%, and 92% in MAE, MIA, and MIV. In the case of the same order CGSA, the MIA and MTV of the system with the non-linear switching modification technique reduce by 70% and 74%, respectively. Therefore, the controller reduces energy consumption and helps to extend the service life of the pump while maintaining a better control effect, which is of great significance to the actual large-size tank level control system. Finally, we give a theoretical analysis of the reasons for the excellent energy saving and smoothness of the controller in this paper. Compared with the second-order CGSA simple nonlinear technique, the control algorithm in this paper is more effective in filtering out high-frequency disturbances, which improves the energy-saving effect while further increasing the smoothness of the algorithm. In the future, we will automatically optimize the control parameters using energy saving and other indicators as constraints.