{'fraction_non_alphanumeric': 0.031320799713820104, 'fraction_numerical': 0.015421916610358122, 'mean_word_length': 4.676895306859206, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Multi-Parameter Quadratic Programming Explicit Model Predictive Based Real Time Turboshaft Engine Control

The traditional model predictive control (tMPC) algorithms have a large amount of online calculation, which makes it difficult to apply them directly to turboshaft engine–rotor systems because of real time requirements. Therefore, based on the theory of the perturbed piecewise affine system (PWA) and multi-parameter quadratic programming explicit model predictive control (mpQP-eMPC) algorithm, we develop a controller design method for turboshaft engine–rotor systems, which can be used for engine steady-state, transient state and limit protection control. This method consists of two steps: controller offline design and online implementation. Firstly, the parameter space of the PWA system is divided into several partitions offline based on the disturbance and performance constraints. Each partition has its own control law, which is in the form of piecewise affine linear function between the controller and the parameters. The control laws for those partitions are also obtained in this offline step. After which, for the online control implementation step, the corresponding control law can be obtained by a real-time query of a corresponding partition, which the current engine state falls into. This greatly reduces the amount of online calculation and thus improves the real-time performance of the MPC controller. The effectiveness of the proposed method is verified by simulating the steadystate and transient process of a turboshaft engine–rotor system with a limit protection requirement. Compared with tMPC, an mpQP-eMPC based controller can not only guarantee good steady-state, dynamic control performance and limit protection, but can also significantly improve the real-time performance of the control system.


Introduction
Helicopters play an important role in short distance transportation, aerial photography, agriculture, disaster search and rescue and other fields. The power unit of a helicopter is important and the turboshaft engine is the main selection for most helicopters in the world because of its high power-to-weight ratio and low vibration. Therefore, improving the reliability and advancement of the turboshaft engine control system is the key to improving the overall maneuverability of the helicopter to meet the needs of modern industry, agriculture and military [1]. Since the dynamics of the propeller rotor and the engine are coupled through the gear transmission system, the working state of the turboshaft engine will be affected by the propeller rotor load with large inertia. The low dynamic characteristic of a high inertia rotor load creates a great challenge for the design of a high performance control system.
The difficulties in the design of turboshaft engine control systems are mainly reflected in two aspects. First, the turboshaft engine and the rotor system are directly connected through physical structures, such as gearboxes and driven shafts, which makes a strong dynamics coupling between the two independent systems. Currently, for most turboshaft engines, a traditional PID linear controller with MAX-MIN high-low selection logic structure is widely used. However, for this nonlinear dynamic system with strong coupling dynamics and strong constraints, the performance of this kind of controller is unsatisfying. The acceleration and deceleration transition is slow, and the overshoot and droop can reach 4%, which causes great damage to the engine's life span and safety [2]. Therefore, the traditional PID controller has been unable to meet the performance requirements of modern high-performance turboshaft engines due to its limitations. The research on new control algorithms to adapt to the rapid development of turboshaft engines has become of great interest to controller designers. Thanks to the development of MPC methods, research on MPC methods for turboshaft engine control has been attractive to the engineering community.
MPC originated in the 1970s. Due to its unique advantages, such as the ability to predict future output, process constrained optimization, and the ability to suppress unmodeled dynamic error and environmental disturbance uncertainty, it has been widely discussed by the industry [3][4][5], and has been successfully applied in industrial process control with slow dynamic characteristics such as petroleum smelting and chemical industry [6][7][8]. Currently, all the application research of turboshaft engines that we can find is particularly scarce and most of the model predictive controller designs for aeroengines are focused on solving the model mismatch phenomenon. At the present time, the real-time research on model predictive controllers for turboshafts is limited. However, in the face of the complex nonlinear dynamic system of turboshaft engines with strong rotor coupled dynamics and strong constraint conditions, and due to the huge amount of calculation in the optimization process, it is difficult to apply in real-time and online engineering, and its development has thus been limited in recent years. In summary, since there are few model predictive real-time controller designs of turboshaft engines and the real-time performance is of great importance for engines, mpQP-eMPC real-time research is carried out in this paper.
In order to solve the problem introduced by the large number of online calculations of tMPC, Bemporad proposed the mpQP-eMPC algorithm based on multi-parameter quadratic programming theory in [9]. Parametric programming is a kind of optimization problem with parameters; multi-parameter quadratic programming is popular in academia because of its convexity [10,11]. Due to the partition of the parameter space, the multi-parameter quadratic programming has the ability to obtain the explicit controller offline, which can simplify the process of the online solution [12][13][14]. The mpQP-eMPC based on parametric quadratic programming can reduce the online computing time to meet the real-time requirements. Considering the high real-time requirements of a turboshaft engine rotor system's control system, this paper will design a turboshaft engine controller based on mpQP-eMPC to solve the problem of tMPC being unable to guarantee real-time performance.
Based on the perturbed PWA model of turboshaft engine rotor systems, through theoretical derivation, this paper transforms the control problem of turboshaft engines into a standard mpQP-eMPC controller design problem. The specific solution of the affine function relationship is also derived. The control design process of turboshaft engines proposed in this paper is described as follows: Firstly, the parameter space is reasonably partitioned. By way of the derivation introduced in this paper, the detailed piecewise affine linear function relationship between the controller and the related parameters on each parameter partition is obtained. These are all conducted in the offline step. Then, during online implementation, the optimal control decision of the turboshaft engine-rotor system is obtained by querying the partition of the system state. The simulation results show that mpQP-eMPC is better than tMPC in ensuring the steady-state and transient dynamic performance of the turboshaft engine rotor system, and the average calculation time of mpQP-eMPC is 0.002 times that of tMPC, which can meet the real-time requirements.
The rest of the paper is organized as follows: Section 2 briefly introduces the turboshaft engine-rotor system and its perturbed PWA model. Section 3 presents the mpQP-eMPC algorithm for the turboshaft engine-rotor system. In Section 4, a simulation study on a turboshaft engine-rotor system is presented to verify the proposed method. Finally, Section 5 concludes the paper.

Turboshaft Engine-Rotor System and Its Perturbed PWA Model
The turboshaft engine-rotor system is shown in Figure 1 and its main control objective is to keep constant power turbine rotation speed by quickly adjusting the gas turbine rotation speed through changing the input fuel flow when the collective pitch changes under different flight tasks. This is necessary to meet the requirements of the rotor load changes of the helicopter. The controller should ensure that the acceleration and deceleration time is as short as possible during the transition state, and the key performance parameters of the engine are within the limits in the meantime. The state space nonlinear equations of the turboshaft engine-rotor system are described as follows: where n g n p are the state variables of the system, n g is the rotation speed of the gas turbine, n p is the rotation speed of the power turbine, w f is the fuel input of the turboshaft engine, and the disturbance input is the collective pitch input xcpc of the rotor system, the flight altitude is H and the flight Mach number is Ma. Equation (1) only highlights the input and output parameters without providing the explicit relationship between them. In fact, we cannot build this explicit input-output function expression of the engine. Therefore, for the requirements of controller design, the construction work of the PWA system is carried out based on the component-level model shown in Figure 1.
Since the dynamic process of the turboshaft engine-rotor system (shown in Figure 1) and Equation (1) is highly nonlinear and has strong coupling characteristics, the controller design is completed by considering the PWA modeling method. Firstly, the nonlinear state space model of the turboshaft engine-rotor system is linearized in the ground state (H = 0, Ma = 0). At s steady-state working points, the discrete turboshaft engine rotor-system PWA model is established:

mpQP-eMPC Algorithm for Turboshaft Engine-Rotor System
The mpQP-eMPC structure of the turboshaft engine-rotor system is shown in Figure 2. The design process can be divided into two steps: • The tMPC optimization problem of the turboshaft engine-rotor system is transformed into a standard mpQP-eMPC problem; • The turboshaft engine controller design based on mpQP-eMPC.

Standard mpQP-eMPC Algorithm
Firstly, the standard description of mpQP-eMPC with parameter z 1 is shown as follows: min where Z is the optimization variable and Z 1 is the optimization parameter. Matrices H, G and W are the weight matrix of objective function and constraints matrices, respectively. One of the objectives in this paper is to convert the parameters in Equation (2) and the classical MPC control into the standard mpQP-eMPC problem in Equation (3). The mpQP-eMPC explicit solution is based on the concepts of polytopic partition and piecewise affine function.
Based on Definitions 1 and 2 and Lemma 1, the explicit optimal solution of (3) can be obtained.

Lemma 1 ([9]
). Based on the multi-parameter programming method to solve the optimization problems (3), then its feasible region is convex and the optimal solution is continuous and piecewise affine: Lemma 1 serves as a tool to obtain the explicit expression of the mpQP-eMPC controller for the turboshaft engine-rotor and will be used in the rest of this article.

Transformation of Turboshaft Engine Controller and mpQP-eMPC Controller
The traditional tMPC control algorithm of the turboshaft engine is described as follows: In order to transform the tMPC of the turboshaft engine into the standard mpQP-eMPC form, the state prediction equation and output prediction equation of the perturbed PWA system are calculated based on (2).
State prediction equation: Output prediction equation: . . . where The parameter constraints conditions of Equation (6) are equivalent to: Furthermore, the prediction Equations in (7) and (8) are brought into Equation (9) to obtain: Let The optimization problem of Equation (6) is equivalent to: where Finally, let then Equation (6) can now be transformed into a standard mpQP-eMPC: Remark 2. The transformation is necessary. The benefit from the standard form of mpQP-eMPC, the deducing procedure of explicit expression in solving the optimization problem based on KKT conditions becomes simpler, more concise and easier to understand.

Offline Solution Algorithm of Turboshaft Engine Controller Based on mpQP-eMPC
The transformation of the turboshaft engine-rotor system tMPC into the standard mpQP-eMPC optimization problem is completed as above, and the turboshaft engine controller offline step can now proceed by referring to the mpQP-eMPC algorithm procedure.

Lemma 2 ([15]
). For any partition {ϑ l } L l=0 = {ϑ 0 , ϑ 1 , · · · , ϑ L } of the parameter space ϑ, suppose that the optimization problem (13) on ϑ l satisfies both the linear independent constraint condition LICQ and the strict complementary relaxation condition, and (13) has an initial feasible solution then the optimal solution of the optimization problem (13) is as follows: 10 , G i , S i and W i represent the ith row of matrix G, S, and W respectively. Y is a zero matrix of dimension s × n, λ 0 = λ(x 0 ) is a set of nonnegative Lagrange multipliers, Z 0 = Z(Z 10 ) is a set of initial feasible solutions of optimization problem (13).
From Lemma 2, it is not difficult to find that the key to solving the optimization problem is to determine a partition {ϑ 0 , ϑ 1 , · · · , ϑ L } of ϑ and the feasible solutions Z 10 and Z 0 on any partition ϑ l . The partition of ϑ can refer to the method in Lemma 3. then Next, the explicit expression of the mpQP-eMPC controller is given through the following theorem.

Theorem 1.
Assuming that the parameter space partition {ϑ 1 , ϑ 2 , · · · , ϑ L } of the perturbed PWA system (2) is obtained based on the method in Lemma 3, where F l is the first m rows of matrix −(M 0 ) −1 N 0 , G l is the first m rows of matrix (M 0 ) −1 N 0 Z 10 + Z 0 , and m is the number of rows of Z, then the mpQP-eMPC controller of the turboshaft engine-rotor system is continuous, and its explicit expression on any partition is as follows: Proof. From Lemma 1, we can see that the mpQP-eMPC controller of the turboshaft engine-rotor system is continuous. Based on Lemma 2, Z(Z 1 ) = F l Z 1 + G l . Because Z = U i + (Π 3 ) −1 * Π 2 Z 1 , therefore: Thus, Theorem 1 is proved.
Furthermore, with the help of Chebyshev distance, a feasible solution Z 10 of the optimization problem (13) in any partition ϑ l is obtained: If ε ≤ 0, then the problem in (13) is infeasible for all Z 1 in ϑ l . Otherwise, we fix Z 1 = Z 10 and obtain Z 0 based on the following standard quadratic optimization problem: Finally, based on Lemmas 2 and 3, solutions Z 10 and Z 0 of Equations (17) and (18), and Theorem 1, the mpQP-eMPC controller algorithm of the turboshaft engine rotor system is summarized in Algorithm 1.

Algorithm 1 mpQP-eMPC Controller Iteration Algorithm
Step 1: In the space GZ W + SZ 1 , based on the optimization problem (17), find the initial value of the parameter Z 10 ; Step 2: Fix Z 10 , and obtain Z 0 λ 0 by solving quadratic programming optimization problem Equation (18); Step 3: Determine the critical region ϑ l near the equilibrium point Z 0 λ 0 by judging whether λ 0 is greater than 0; Step 4: Based on Equation (16) in Theorem 1. to obtain the expressions of Z(x) λ(x) and u(x) in the critical region ϑ l ; Step 5: Divide the critical region ϑ l based on Lemma 3 to obtain the subcritical region ϑ li of this critical region; Step 6: Repeat the above steps to segment each subcritical domain ϑ li iteratively, and determine the values of Z(x) λ(x) and u(x) in each polyhedron (polyhedron) based on Theorem 1.

Analysis of the Influence of N y on the Partition Number of Parameter Space
The length of the prediction horizon N y has a direct impact on the number of parameter space partitions. In general, the larger the N y , the more parameter space partitions, and the longer the time it takes to find the controller during the online query procedure. However, the length of N y is not the bigger the better. The case of xcpc = 80 in the turboshaft engine is taken as an example to illustrate this argument.
The linear system at xcpc = 80 (corresponding to the linear system with i = 3 in (1)) is considered: Note that matrices A, B, C and w are the results of normalization and discretizing. For N y = 3 and N y = 30, respectively, based on the iterative algorithm summarized in Table 1, the explicit model predictive controllers are designed for the system (19) according to the given values in Table 1.  Figures 3 and 5 that, when N y = 3, the system state space can be divided into five partitions, and when N y = 30, the system state space can be divided into 33 partitions. That is to say, the larger the N y , the more divisions of the interval division. However, when N y = 30, only the number of parameter space partition changes, and the controller value does not change greatly. In this case, the dynamic performance of the controlled plant is consistent with that of N y = 3. Therefore, when the turboshaft engine rotor system is considered, the size of N y should be selected reasonably according to the dynamic of the system to reduce the online online controller query time.

Simulation Example
Under flight condition H = 0, Ma = 0, ten equilibrium points are selected to establish the PWA system for the turboshaft engine-rotor component-level nonlinear model. Some of the PWA models are shown as follows; the others are similar.

PWA System
Based on two groups of different input signals, the effectiveness of PWA system modeling is verified.
(1) Figure 7 shows the step input signal of the engine fuel and rotor system (including the large step signal in the first 250s and the small step signal in the last 950s). The speed response curves of PWA system and turboshaft engine-rotor system are shown in Figures 8 and 9. Among them, the maximum overshoot of power turbine speed n p is 0.9569%, the steady-state modeling error is less than 0.024%. The transition and the steady-state modeling error of gas turbine rotaion speed n g are both less than 0.01%.

Figure 7.
Step input signals of fuel w f and collective pitch xcpc. Turboshaft engine-rotor system PWA system Figure 9. Speed response curves of gas turbine.
(2) Figure 10 shows the ramp input signals of engine fuel w f and collective pitch xcpc of the rotor system. The speed response curves of the PWA system and the turboshaft engine-rotor system are shown in Figures 11 and 12. According to the response curves of power turbine rotation speed n p and gas turbine rotation speed n g , the steady-state and dynamic errors of n p are less than 0.24%; The steady and dynamic error of n g is less than 0.01%. Therefore, the output of the PWA system is basically consistent with the nonlinear model of the turboshaft engine rotor system, which meets the requirements of the controller design.

mPQP-eMPC Controller
In the design process of the control system, by making u(k) = u(k − 1) + ∆u(k), an integral unit is added to ensure the steady-state servo tracking without static error, and the fuel change rate limit is introduced into the optimization problem (13) to take into consideration actuator position saturation and rate saturation.  Turboshaft engine-rotor system PWA system Figure 11. Speed response curves of power turbine. Turboshaft engine-rotor system PWA system Figure 12. Speed response curves of gas turbine.
Based on the constraints and parameter settings in Table 2, the explicit model predictive controller is designed according to procedures proposed in the above contents and is compared with the tMPC method, where Q is [1,1,1,1,1,1,2,1,0.1,1] T and R is  The input signal of collective pitch is designed to simulate vertical take off and landing procedure of the helicopeter ( Figure 13): During the first 10 s, the collective pitch lever is pushed up quickly to make a rapid step change of xcpc value from 10% to 100%. The turboshaft engine will have to transfer from idle working state to maximum power state quickly. This is to simulate the vertical take-off process. After working on xcpc = 100% for approximately 100 s, the collective pitch lever is pulled down in two steps to make xcpx drop from 100% to 10% which realizes rapid vertical descent process. The helicopter vertical climbing process is also simulated: the collective pitch slowly increases from 10% position to 100% position step by step. The simulation results are shown in Figures 14-17. Figure 14 shows the fuel flow response curves in two comparative algorithms. The controller based on the mpQP-eMPC algorithm proposed in this paper can ensure that the fuel flow reaches the limit line quickly without exceeding the limit. The fuel rate response curve is shown in Figure 15: the mpQP-eMPC based algorithm can ensure that the fuel rate is close to the limit line as soon as possible but keeps within the limited change rate range in the same time. The system dynamic response performance is thus improved. Figure 16 shows the speed response curve of gas turbine under two comparative algorithms: the mpQP-eMPC based method does not exceed the limited range for the rotation speed of gas turbine, while under the control of tMPC, the rotation speed of the gas turbine violates the speed constraint for a certain period of time. Figure 17 shows the rotation speed response curve of the power turbine under two comparative controllers: the power turbine rotation speed response under the mpQP-eMPC based controller is faster than that under the control of tMPC. The rotation speed overshoot under the mpQP-eMPC controller is also smaller whose maximum value is less than 1.44% compared to 2.4% under the control of tMPC. The steady-state control error is less than 0.005% with the controller proposed in this paper.

Real-Time Verification of Mpqp-Empc
In order to verify the real-time performance of the mpQP-eMPC control algorithm, based on a 3.4 GHz Intel processor, simulation verification is carried out considering the different length prediction time domain. The selection of N y is shown in Table 3. In addition, the sampling time T s is 0.01 (sec) for simulation setting, and the change of collective pitch xcpc is the same as shown above in Figure 13.    The comparison simulation results of the two methods are shown in Table 3, and the comparison simulation results are shown in Figures 18-21. Figure 18 shows the calculation time of different algorithms at each sampling time when N y = 3. The average calculation time of the mpQP-eMPC controller is 7.8270 × 10 −6 s, and the maximum calculation time is 3.5050 × 10 −4 s; The average computing time of the traditional MPC controller is 0.4209 × 10 −2 s, and the maximum computing time is 3.9680 × 10 −2 s. Figure 19 shows the calculation time of different algorithms at each sampling time when N y = 5. The average calculation time of the mpQP-eMPC controller is 7.9000 × 10 −6 s, and the maximum calculation time is 2.6660 × 10 −4 s; the average computing time of the traditional MPC controller is 0.4782 × 10 −2 s, and the maximum computing time is 1.1966 × 10 −2 s.

Remark 3.
References [16,17] also offer different methods to improve the real-time property, such as Mehdi Hosseinzadeh using the explicit reference governor to enhance the real time character in [16]. Meanwhile, reference [17] has also done a lot of related work on this, and the method proposed in [17] can be seen as an extension of the method in [16]. In addition, there are some robust methods that can improve the real-time performance of the model predictive algorithm [4]. However, considering that inequality scaling is involved and the special research objects, such as turboshaft engines, have strict requirements on the performance of the control system, we have not tried these methods to improve the real-time performance. However, these methods are indeed worth trying, and this may be an important part of our work in the future.

Conclusions
A real-time explicit model prediction control for turboshaft engines based on multiparameter quadratic programming is proposed. Firstly, the perturbed PWA system is constructed. Then, based on the theory of PWA and multi-parameter quadratic programming, the mpQP-eMPC controller is designed for turboshaft engine-rotor systems. Finally, the effectiveness of the proposed method is verified by simulating the steady-state and transient process of a turboshaft engine-rotor system with a limit protection requirement. The simulation result proves that: (1) the perturbed PWA linear modeling method is accurate enough; (2) under the proposed mpQP-eMPC based controller, the system dynamic performance is improved while obeying certain constraints at the same time; (3) it breaks through the bottleneck of tMPC finding it difficult to guarantee the real-time performance of turboshaft engines.
There are many ways to improve the real-time performance, but we just tried one of these methods on the turboshaft engine. The focus of future research can be to try a variety of methods to enhance the real-time performance of the MPC algorithm and to finally determine a method that can best improve the control performance of the turboshaft engine.