Research on the cabin pressure control system based on the gray wolf fuzzy PID algorithm

The cabin pressure control system is typically nonaffine-nonlinear time-varying system. In this paper, the fuzzy PID control method optimized by gray wolf algorithm is proposed to solve the problems of large overshoot and long adjustment times in traditional control methods. Simulation results show that the fuzzy PID control method optimized by gray wolf algorithm proposed in this paper improves the dynamic characteristics of the system, reduces cabin pressure error and adjustment time, stabilizes the control process, and improves the comfortableness of passengers.


Introduction
The cabin pressure control system(CPCS) is one of the significant sub-system of the aircraft environment control system, whose function is to maintain the cabin differential pressure, and cabin pressure change rate, cabin pressure within a reasonable and comfortable range, and to provide system status indication and warning information to the crew.The CPCS's control performance affects the aircraft structure and occupant safety.
CPCS mainly has three types: electronic pneumatic, pneumatic, and digital [1] .Pneumatic type is widely used in high-speed and small tank capacity fighters because of their mature research, excellent anti-electromagnetic interference ability, and adaptability to a complex battlefield environment.Electronic pneumatic type is widely used military transport planes.Digital type is mainly used in civil aircraft due to their high adjustment accuracy and good stability.The research object of this paper is the digital CPCS of a large wide-body civil aircraft.
Up to now, the research on digital CPCS mainly focuses on the development of cabin pressure control law.The control algorithm of the cabin pressure in current engineering applications mainly adopts PID control and expert control [2] .When there is a large disturbance, the disadvantage of PID control is that the overshoot is large and the adjustment time is long.To figure out the above problems, an approach proposed by Nie et al. [3] that makes the rate of cabin pressure change priority control based on the flight status model, which improved the control effects.Zhu et al. [4] used continuous gain scheduling to optimize PID control to reduce steady-state error.The gain adaptive PID control proposed by Guoyuan Zhang et al. improve the dynamic characteristics of the CPCS and reduce the steady state error [5] .Zhao Zhang et al. [6] used particle simple adaptive to study the reconfiguration design which improved the safety and reliability of the CPCS.Yang et al. [7] used nonlinear PID control to study the system performance of the cabin under abnormal conditions and obtained good control results.To solve the IOP Publishing doi:10.1088/1742-6596/2764/1/012078 2 problems of the CPCS containing unkown parameters, Karimi [8] adapts MFNN to control the pressure and illustrates its effectiveness.
The fuzzy control algorithm is a classical control method for cabin pressure control problems with large time-constant and nonaffine-nonlinear types.Liu [9] proposed a fuzzy controller for the cabin pressure, which reduced the overshoot of the system.Fu [10] proposed a fuzzy controller to control the high-precision cockpit pressure control system model, which has good stability and real-time performance.Aiming at optimizing the leakage characteristics of the CPCS, Zhang et al. [11] simulated the CPCS and designed an adaptive fuzzy controller，which with quantization factor and scaling factor can reduce the gas leakage and adjustment time and improve the robustness of the CPCS.Given the problem of cabin pressure control caused by high-speed diving and turning to level off of new combat, Guan [12] proposed an expert fuzzy PID predict controller.The result shows that the controller can increase the rate of cabin pressure and improve the dive time and airspace range.However, fuzzy rules of fuzzy control depend on expert experience and are sensitive to system parameters.When the system parameters change, fuzzy rule formulation becomes a high-dimensional parameter design problem.To solve this problem, Geng et al. [13] proposed an improved adaptive genetic algorithm to optimize the fuzzy control law.The result shows that the optimized method has no overshoot, the adjustment time was shortened by 30%, and the control process was stable.In this paper, several algorithms are compared, and the gray wolf algorithm is finally chosen for the fuzzy rules optimization.In contrast to genetic algorithm and particle swarm optimization algorithm, which are widely used in the field of optimization, the fuzzy grey wolf PID algorithm effectively improved the control performance and the comfort of the cabin.Moreover, the algorithm simplifies the design difficulty of the fuzzy control algorithm and improves the universality of fuzzy control to different types of the CPCS.

System modeling
The digital CPCS mainly consists of the control panel, cabin pressure controller, outflow valve, and safety valve, as shown in Figure 1.The CPCS automatically generates a cabin pressure schedule according to input parameters such as the operation panel and the switch signal.The cabin pressure system carries out the real-time measurement of cabin pressure and atmospheric static pressure with the help of a digital pressure sensor, judges the flight state (takeoff, climb, cruise, descent), and automatically regulates the opening of OFV according to the cabin pressure schedule to adjust the cabin differential pressure, cabin pressure and cabin pressure change rate.Usually, the CPCS adopts a three-mode redundancy design, including one manual control channel as well as two automatic control channels.Each control channel can work independently.When one automatic control channel fails, the cabin pressure controller automatically switches to the other automatic control channel.When both automatic control channels fail, the cabin pressure controller IOP Publishing doi:10.1088/1742-6596/2764/1/0120783 can manually switch to the manual control channel to ensure that the system can work normally.The main research object of this paper is automatic channels.

Cabin pressure schedule
The cabin pressure schedule is the mapping relationship between the cabin pressure, differential pressure, as well as the ambient air pressure altitude.It mainly depends on the aircraft type and flight mission.The whole flight process of an aircraft mainly includes six states: on the ground, takeoff, climb, cruise, descent, and landing.The pressure schedule of each flight stage is as follows.
1) Ventilation on the ground: The aircraft is on the ground.The cabin pressure control system poweron and built-in test controls the outflow valve in a fully open state.
2) Pre-pressurization: The aircraft is on the ground, when the system receives the operating signal, the pre-pressurization procedure runs.The controller controls the cabin to be pressurized at the rate of 18.3 (Pa/s) so that the cabin differential pressure is 1.5 kPa.
3) Climb / Descent: Aircraft landing gear lifts off and aircraft altitude continues to rise/fall, cabin target pressure P cg controls according to the approximately linear cabin pressure schedule.
Where P h is the atmospheric pressure, m is the pressurization rate, P 0 is the atmospheric pressure at the sea level, and C is the air flow resistance.
4) Cruise: The cabin pressure target value during which the cabin maintains climb or descent.5) Landing: To prevent cabin pressure fluctuations during the aircraft landing, the cabin differential pressure is set to 1 kPa.When the aircraft is on the ground, the automatic pressure relief procedure starts.
Figure 2 indicates the cabin pressure schedule.The cabin architecture is shown in Figure 3.To simplify the model, assuming that:  The cabin temperature controlled by the temperature system is constant. Ignoring the cabin deformation. The air in the cabin is ideal. The air supply is constant.The mathematical model of the cabin can be obtained according to the above assumptions as follows.
Where V C is the cabin volume, G b is the cabin outflow valve flow volume, R is the gas constant, G l is cabin leakage volume,  is the cabin temperature, G s is safety flow volume,  is the cabin pressure, G k is the cabin air supply volume.

Outflow valve
The outflow valve is an important executive accessory of the system, which is a digital electric valve that mainly consists of a motor, motor controller, drive mechanism, etc.
1) Motor: A brushless DC motor is used as the actuator of the outflow valve.The assumptions are as follows: The power provided by the power supply is mainly converted into mechanical energy through the air gap, so the motor's solenoid torque is as follows.
The equation of motion is: Where U A , U B , U C is each stator phase voltage,  is mutual inductance between phases of the stator, I A , I B , I C is each stator phase current, T em is the electromagnetic torque of the motor, E A , E B , E C is each phase stator counter electromotive force,  is the phase resistance of each stator phase,  is each phase stator self-inductance, T L is the motor load torque,  is the mechanical angular velocity of the motor, B v is the damping coefficient, and  is the moment of inertia of the motor.
The Brushless DC motor controller adopts three-loop control.The position loop, speed loop, and current loop regulators all adopt the PI regulator.
Double flapper valve: The double flapper valve is used as the outflow valve.Figure 5 is the valve's schematic diagram.1.71 (7)   While the gas is in a supercritical state: Where  is the flow coefficient.
Transmission mechanism: The valve transmission mechanism adopts a gear reducer, taking a singular gear reducer as an example, and its motion equation is: Where  is the angular speed of the driving gear;  is the reduction ratio;  is the angular speed of the driven gear.

Algorithm design of cabin pressure control
Fuzzy control is a classical algorithm for cabin pressure control.The formulation of fuzzy rules is a key factor affecting the control effect.At present, the formulation of cabin pressure fuzzy rules mainly depends on the subjective opinions of designers lacks rationality, and is sensitive to system parameters.When parameters change, fuzzy rules sometimes need to be changed.Therefore, an optimization algorithm is used to optimize fuzzy rules.

Fuzzy controller design
According to [7], fuzzy control lacks an integral part, and its characteristics exist dead zone.The valve opening and cabin pressure change rate under the fuzzy control exists oscillation, which is not allowed IOP Publishing doi:10.1088/1742-6596/2764/1/0120786 in cabin pressure control.Therefore, we adopts the fuzzy PID control algorithm, and PID parameters are optimized in real-time according to fuzzy rules by fuzzy logic.
The established two-dimensional Mamdani fuzzy controller is shown in Figure 6.Aiming at the accuracy of fuzzy control, there are 7 fuzzy subsets of E, Ec,  ,  ,  respectively, consisting of PB, PM, PS, Z0, NS, NM, and NB.To limit the change rate of cabin pressure and cabin pressure, the membership function of PB and NB at both ends is set as Gaussian membership function, which changes slowly and the control characteristic is smooth.For the control accuracy at the on-design point, the other membership functions are set as trimf membership functions, as shown in Figure 7.
The method of gravity center is adopted to solve fuzzy.Table 1shows the preliminarily fuzzy rules.Where fit is the objective function,  is the sampling time, E is cabin pressure control errors,  ,  , and  are the influence factors, and the values are 0.3, 0.1, and 0.6 respectively.
According to Table 1, fuzzy rule design presents the characteristics of high correlation and high dimension.When the system parameters change, only adjusting one or several fuzzy rules cannot achieve a good control effect.Genetic algorithms currently applied to fuzzy rule design have slow convergence speed, and are often obtain local optimal solutions with long calculation time solving high dimensional problems.A variety of algorithms including genetic algorithm (GA), particle swarm optimization algorithm (PSO), Artificial Bee Colony(ABC), dynamic reverse learning differential evolution algorithm (OBLDE), and grey wolf algorithm (GWO) are compared in this paper.The result is shown in Figure 8.As is shown in Figure 8, the grey wolf algorithm can optimize the cabin objective function to a minimum of 1.64e 5 within 50 generations, which shows that GWO is more suitable for optimizing cabin pressure fuzzy rules than GA, PSO, OBLDE, and ABC.
GWO is a new intelligent algorithm for simulating grey wolf colony behavior, whose dominance are simple structure, few super parameters, and easy coding.The steps of GWO algorithm are as follows: Hierarchical stratification: The wolves have strict social hierarchies, so when building a gray wolf population model, we need to calculate the fitness of each individual in the population and label the three individuals with the highest fitness as , , and .The rest of the individuals are labeled  wolves who need to obey other social classes and besiege the prey.
Besiege: The wolves usually approach and surround the preys when they search for them, then: 15 Where  is the distance of the wolves from prey,  is the number of iterations,  and  are the synergy factor,   is the position of the prey (the global optimum solution),   is the current position of the gray wolves, _ is the maximum number of iterations,  ,  is random numbers between 0,1 .
Hunting: When gray wolves hunt, the head wolf leads the rest of the wolves to approach the prey.The position updating formulas are as follows: Where  ,  ,   the location of the , ,  wolf,  ,  ,  are the distances among the current wolf and the head wolf.
Attack prey: The algorithm updates mainly by decreasing the value .Simultaneously the value  affects A. While || 1, Gray wolves are near prey, searching for an opportunity to attack.
Hunting for prey: While || 1, gray wolves spread out to hunt prey with higher values of the fitness function.
Figure 9 shows the schematic diagram of GWO.The original fuzzy rules are all smooth.Optimized by GWO, while E is PB, it means the cabin pressure is much higher than the target pressure, so the valves need to be closed quickly, Kp is almost always at a big value and vice versa.While E gets closer to Z0, the error is small, the valve opening needs to be maintained, and Kp approaches 0. While Ec is near PB, it means the pressurization rate is large, so the valves need to be opened quickly.That means there is a conflict between E and Ec.The optimization results show a preference for E.
The role of Ki is to eliminate deviation and improve accuracy, but also to increase the response speed, produce overshoot, and produce oscillation.The optimization results show that while E is close to Z0, Ec is close to NB, there are systematic errors and external disturbances, and Ki needs to be large.
The function of Kd is to suppress overshoot and oscillation.Its optimization process is similar to Kp.An altitude step signal is given when the aircraft is on a steady cruise in the 2000s to analyze the system response characteristics of the GA, PSO, and GWO algorithm optimized and the traditional fuzzy PID control.Considering that the input is metric height and has a large range of values, the step signal is amplified ten times.Figure 13 indicates that the unoptimized fuzzy PID control has the largest overshooting, and there are oscillations; GA and PSO optimized fuzzy PID Control's overshooting is reduced and the regulation time is shortened, but there are still oscillations; GWO optimized fuzzy PID control is free of overshoot, and the regulation time is shortened by nearly 30%.To verify the system response characteristics in the full flight profile, the flight altitude is used as the system input shown in Figure 2. Figures 14-17 show the cabin pressure, outflow valve opening, cabin pressure change rate, and control errors of the CPCS optimized by the GWO algorithm.Figure 15.Cabin pressure error.Figure 14 and 15 show the cabin pressure and its error.The initial cabin pressure is the atmospheric pressure at the sea level and the cabin pressure perfectly tracks the schedule.The pre-pressurization procedure was performed and the cabin pressure remained stable at 1,828.8 m corresponding to the cabin pressure during cruise.The automatic pressure relief procedure was performed during the landing.In the whole flight profile, the cabin pressure error only occurs at the beginning of the cabin air supply and state switching stage, and is within ±20 Pa, with high control accuracy.The results show that the CPCS controlled by fuzzy PID optimized by GWO has fast response, high precision, and good dynamic and steady performance.

Conclusions
In this paper, we model the key subsystem of the CPCS.The cabin pressure fuzzy controller is designed, and its fuzzy rule optimization is analyzed and studied: 1) The optimization effect of GA, PSO, OBLDE, and GWO algorithms on fuzzy rules is compared which proves that the fuzzy PID controller based on the GWO algorithm is more effective; IOP Publishing doi:10.1088/1742-6596/2764/1/01207812 2) Compared with the fuzzy PID control, fuzzy PID control based on GA, PSO, GWO havemore small overshooting amount and short adjustment time, which makes the cockpit pressure control error within the range of ±20 Pa, and the gradient of the cabin pressure within the range of -29.3 ~ 17.34 Pa/s, and the whole control process smoother.
The fuzzy PID based on GWO control studied meets the control requirements of CPCS, has a better control effect, improves the comfort of the aircraft, and provides the theoretical support for the control models for semi-physical simulation and digital twin.Its subsequent application in engineering provides a reference significance.The CPCS studied in this paper is not only applicable to wide-body airliners but also to other aircraft types.

Figure 1 .
Figure 1.CPCS architecture.The CPCS automatically generates a cabin pressure schedule according to input parameters such as the operation panel and the switch signal.The cabin pressure system carries out the real-time measurement of cabin pressure and atmospheric static pressure with the help of a digital pressure sensor, judges the flight state (takeoff, climb, cruise, descent), and automatically regulates the opening of OFV according to the cabin pressure schedule to adjust the cabin differential pressure, cabin pressure and cabin pressure change rate.Usually, the CPCS adopts a three-mode redundancy design, including one manual control channel as well as two automatic control channels.Each control channel can work independently.When one automatic control channel fails, the cabin pressure controller automatically switches to the other automatic control channel.When both automatic control channels fail, the cabin pressure controller

Figure 4 .
Figure 4. Motor equivalent circuit diagram. Neglecting motor core saturation, excluding eddy current losses and hysteresis losses  The three-phase windings are perfectly the same, and the armature conductors are evenly distributed over the surface of the core. Ignoring the armature reaction, the air-gap magnetic field is 120° trapezoidal wave. The three-phase windings are connected in Y-type. Commutation torque pulses caused by commutation processes are ignored. Assume that the power tubes and freewheeling diodes of the inverter circuit have ideal switching characteristics The schematic diagram of the motor is shown in Figure 4. Then the voltage balance equation for the three-phase windings of the stator winding of brushless DC motor is as follows.U A U B U C

Figure 5 .
Figure 5. Outflow valve.In Figure 5,  is the valve's opening, F B is the flow area at a certain opening, and F Bmax is the maximum flow area of the valve.The effective flow area is: F B =F Bmax 1-sinα (6) The volume of the outflow valve can be obtained: While the gas is in subcritical state: G B =μF B 0.156 T C

Figure 6 . 2 .
Figure 6.Fuzzy controller schematic diagram.The error among the target and the actual pressure of the cabin E and the gradient of change of pressure Ec as input variables.The ranges of values are (-30 Pa, 30 Pa) and (-29.3Pa/s, 17.34 Pa/s).The corresponding quantization factors are  0.05,  0.2.The outputs of fuzzy control are PID parameters  ,  , , the value range is set to (-3, 3), and the corresponding scale factor is  =8.Aiming at the accuracy of fuzzy control, there are 7 fuzzy subsets of E, Ec,  ,  ,  respectively, consisting of PB, PM, PS, Z0, NS, NM, and NB.To limit the change rate of cabin pressure and cabin pressure, the membership function of PB and NB at both ends is set as Gaussian membership function, which changes slowly and the control characteristic is smooth.For the control accuracy at the on-design point, the other membership functions are set as trimf membership functions, as shown in Figure7.The method of gravity center is adopted to solve fuzzy.Table1showsthe preliminarily fuzzy rules.

Figure 7 .
Figure 7. Schematic diagram of membership function design.

Figure 8 .
Figure 8.Comparison of optimization algorithm effects.As is shown in Figure8, the grey wolf algorithm can optimize the cabin objective function to a minimum of 1.64e 5 within 50 generations, which shows that GWO is more suitable for optimizing cabin pressure fuzzy rules than GA, PSO, OBLDE, and ABC.GWO is a new intelligent algorithm for simulating grey wolf colony behavior, whose dominance are simple structure, few super parameters, and easy coding.

Figure 9 .
Figure 9. Gray wolf optimization algorithm schematic diagram.Therefore, the flow chart of fuzzy PID control optimized by GWO is shown in Figure 10.

9 Figure 10 .
Figure 10.Fuzzy PID controller based on GWO.4.Simulation verificationThis paper models the universal CPCS model and verifies the control algorithms based on MATLAB.According to Chapter 2, the CPCS model is established, which includes the cabin, cabin pressure controller, outflow valve including the actuating mechanism and the gear, and so on, as shown in Figure11.We can change the parameters to describe the CPCS of different types of aircraft.

Figure 11 .
Figure 11.System simulation model.The comparison of fuzzy rules optimized by GWO and original fuzzy rules is shown in Figure 12.The original fuzzy rules are all smooth.Optimized by GWO, while E is PB, it means the cabin pressure is much higher than the target pressure, so the valves need to be closed quickly, Kp is almost always at a big value and vice versa.While E gets closer to Z0, the error is small, the valve opening needs to be maintained, and Kp approaches 0.

10 Figure 12 .
Figure 12.Fuzzy rules (left) and GWO-optimized fuzzy rules (right).While Ec is near PB, it means the pressurization rate is large, so the valves need to be opened quickly.That means there is a conflict between E and Ec.The optimization results show a preference for E.The role of Ki is to eliminate deviation and improve accuracy, but also to increase the response speed, produce overshoot, and produce oscillation.The optimization results show that while E is close to Z0, Ec is close to NB, there are systematic errors and external disturbances, and Ki needs to be large.The function of Kd is to suppress overshoot and oscillation.Its optimization process is similar to Kp.An altitude step signal is given when the aircraft is on a steady cruise in the 2000s to analyze the system response characteristics of the GA, PSO, and GWO algorithm optimized and the traditional fuzzy PID control.Considering that the input is metric height and has a large range of values, the step signal is amplified ten times.Figure13indicates that the unoptimized fuzzy PID control has the largest overshooting, and there are oscillations; GA and PSO optimized fuzzy PID Control's overshooting is reduced and the regulation time is shortened, but there are still oscillations; GWO optimized fuzzy PID control is free of overshoot, and the regulation time is shortened by nearly 30%.

Figure 14 .
Figure 14.Cabin pressure.Figure15.Cabin pressure error.Figure14and 15 show the cabin pressure and its error.The initial cabin pressure is the atmospheric pressure at the sea level and the cabin pressure perfectly tracks the schedule.The pre-pressurization procedure was performed and the cabin pressure remained stable at 1,828.8 m corresponding to the cabin pressure during cruise.The automatic pressure relief procedure was performed during the landing.In the whole flight profile, the cabin pressure error only occurs at the beginning of the cabin air supply and state switching stage, and is within ±20 Pa, with high control accuracy.

Figure 16 .
Figure 16.Cabin pressure change rate.Figure 17.Outflow valve opening.Figure 16 shows the result of the cabin pressure change rate.It varies from -29.3 Pa/s to 17.37 Pa/s.The whole process changes smoothly without oscillation.The outflow valve opening is shown in Figure 17.During the climb, the residual pressure continues to increase, so the outflow valve opening continues to close, and exhaust flow increases.During the descent, the outflow valve continues to open, which affects the exhaust flow rate, the residual pressure situation is decreasing.The results show that the CPCS controlled by fuzzy PID optimized by GWO has fast response, high precision, and good dynamic and steady performance.

Figure 17 .
Figure 16.Cabin pressure change rate.Figure 17.Outflow valve opening.Figure 16 shows the result of the cabin pressure change rate.It varies from -29.3 Pa/s to 17.37 Pa/s.The whole process changes smoothly without oscillation.The outflow valve opening is shown in Figure 17.During the climb, the residual pressure continues to increase, so the outflow valve opening continues to close, and exhaust flow increases.During the descent, the outflow valve continues to open, which affects the exhaust flow rate, the residual pressure situation is decreasing.The results show that the CPCS controlled by fuzzy PID optimized by GWO has fast response, high precision, and good dynamic and steady performance.

Table 1 .
Fuzzy rule.Considering the comfortableness of the passengers and the longevity of the valve, cabin pressure control should make the system have a short settling time under the premise of reducing overshoot and oscillation.Therefore, the design optimization objective function is: