MODEL PREDICTIVE CONTROL OF A HYDRAULIC ACTUATOR IN TORQUE APPLYING SYSTEM OF A MECHANICALLY CLOSED-LOOP TEST RIG FOR THE HELICOPTER GEARBOX

Transmission health is an important factor in safety and maintenance costs in industries, so construction of test rigs for testing high-powered gearboxes under different operating conditions of helicopters is required. The studied test rig, which is developed at Sharif University of Technology branch of ACECR (Academic Centre of Education, Culture and Research) is mainly used for testing high-powered gearboxes through a mechanically closed-loop procedure. For providing a variety of speeds and torques in test rigs, torque applying system is required. According to generation of higher forces, reduced size of equipment and accurate positioning, electro hydraulic actuators (EHAs) are used for applying torques for planetary gearboxes of this test rig. Due to the importance of applying accurate torques in evaluation of the gearbox performance, first an accurate model of EHA is derived, which captures the system dynamics using system identification method with low consumed time and simple relations. After that, a type of model predictive controller called dynamic matrix controller is proposed for controlling EHA under determined requirements. Then, the performance of proposed controller under normal conditions as well as in presence of disturbance is investigated. The results show a good tracking of controller for various reference inputs in different conditions. Moreover, the performance of the proposed controller is compared with the performance of classical proportional-integral-derivative (PID) controller and superior characteristics of the proposed controller is concluded.


Introduction
Transmission systems and power trains play an important role in both safety and maintenance cost of helicopters. As they provide propulsion, lift and maneuvering, the rapid and reliable detection of faults are of great importance. Since most of the mechanical failures of the helicopters are related to the transmission system, therefore, testing and early detection of gearbox faults will significantly enhance the safety and reduce the maintenance cost through preventing the occurrence of major breakdowns and catastrophic failures (Dempsey, Lewicki, & Le, 2007;Suryavanashi et al., 2002). In order to test the transmission systems, test rigs with the capability of providing variable speed and torque would be required for simulating different conditions and satisfying various requirements (Arun, Giriraj, & Rahaman, 2014). These test rigs can be designed in open-loop or closed-loop schemes. According to the drawbacks of open-loop schemes compared to closed-loop schemes such as higher power consumption, higher installation costs and problems encountered for heat dissipation, the closed-loop schemes are preferred (Mihailidis & Nerantzis, 2009). In these schemes, the output power is returned to the system and used again; hence, no power sink is required for dissipating energy and the motor is just used for compensating the energy loss and providing the initial required power (Frost & Cross, 1990).
These test rigs can be loaded in electrical or mechanical way; in the prior method, installation cost and required area are high due to the need for both motor and generator; however, in the latter one, these problems are solved (Mihailidis & Nerantzis, 2009). Different systems can be used for applying torques in mechanically closed-loop systems, among them, hydraulic systems are widely used due to their unique features. Åkerblom et al. (1999) used a test rig with mechanical power recirculation consisting two identical gearboxes, one of which was tilted using a hydraulic cylinder. Mihailidis and Nerantzis (2009) proposed a novel test rig, which consists of planetary gearboxes, with the capability of applying required pattern of torques and speeds for testing gears. Palermo et al. (2014a), Palermo et al. (2014b) developed an isolated power circulation test rig, which was consisted of two sides; the test side and reaction side to test the desired gearbox and close the power recirculation, respectively. Preliminary, conceptual and detailed design of a mechanically closed-loop test rig for testing high-powered gearboxes were described by Mozafari et al., 2017). In addition, they provided static and dynamic analyses of the system and presented a simplified model of the hydraulically-driven test rig. For controlling the motion of the hydraulic torque applying system, they had implemented different controllers. They used On-Off and PID controllers and compared the performances, they reported the better response characteristics of PID controller (Mardani, 2018). In another study, they developed the PID controller and proposed Fractional Order PID (FOPID). They declared the improved accuracy, speed and response characteristic by the use of FOPID instead of PID (Takloo et al., n.d.).
Ability to simulate actual loading conditions as precisely as possible is one of the most important requirements in test rigs, so in this paper, we focus on modeling and controlling of the hydraulic actuators used in the mentioned test rig. Hydraulic systems are preferred due to the provision of high forces with reduced size of equipment and eliminating gear sets as well as robustness improvement. In addition, their linear motion, high-speed response, accurate positioning besides high power to weight ratio can be considered as the advantages of these systems. However, these equipment are faced with some problems such as nonlinearity and uncertainty (Adnan, Rahiman, & Samad, 2010;Ishak et al., 2015). The nonlinear behavior of these systems originates from the compressibility of the working fluid, time-dependent characteristics, friction, dead band zone, internal leakage, hysteresis and etc. . On the other hand, precise control of torque is very crucial in test rigs as any small error may lead to a mistake in evaluation of the gearbox. Prior to control of these systems, an accurate model, which represents the complete dynamic behavior of the system should be developed.
The Electro Hydraulic Actuator (EHA) converts the electrical signal to the hydraulic power. Several researches used mathematical formulation to model the behavior of the EHA (Kingston et al., 2001). However, according to the fact that EHA is a nonlinear system with uncertain dynamic, the dynamic behavior of the system cannot be totally captured by mathematical representation. Therefore, the use of intelligent methods for modeling EHA can be very beneficial. The model of the EHA was obtained using the Matlab identification toolbox by Wang and Syrmos (2008) and Shao et al. (2009). Pei, Zhang, andTang (2007), utilized Radial Based Function (RBF) neural network to online identify of the hydraulic servo system. A PID controller was designed and its coefficients were tuned by Ziegler-Nichols method in the research by Rahmat et al. (2010). After obtaining the model of the system, due to the importance of efficient control of these systems, many researchers have investigated different control schemes. Rozali et al. (2010) proposed a nonlinear hybrid controller, which consists fuzzy controller along with the classical PID controller and simulated their approach. Chen, Renn, and Su (2005) introduced a new sliding mode controller to improve the tracking performance of EHA through the usage of variable boundary layer. In a research by Guan and Pan (2008), the sliding mode controller was used for EHA with unknown system parameters. Yao et al. (2011), developed an adaptive neural network controller for tracking the reference with high accuracy, which was suitable for real-time implementation. However, its trapping in local optimum was the deficiency of the proposed controller. In a work by Yang et al. (2018), a novel back-stepping control scheme was presented to guarantee the boundary tracking performances of the EHA.
The rest of the paper is organized as follows: In section II, the investigated test rig for testing high-powered gearboxes and hydraulically-driven torque applying system is introduced, next; in section III, the modeling procedure of the actuation system for the torque applying structure using SI, excitation signals, data acquisition approach, estimating the model and validation are explained in detail. The proposed DMC-MPC control scheme is described in section IV. After that, in section V, the results for modeling the actuation system through SI as well as the simulation of the proposed controller are provided and discussed. In addition, the comparison of the DMC controller with classical PID controller is also provided. Finally, section VI is dedicated to the conclusions that can be derived from this investigation.

The definition of the system
In this paper, we have used a mechanically closed-loop test rig, which has been designed and constructed at Sharif University of Technology branch of ACECR (Academic Centre of Education, Culture and Research). Low energy loss with the capability of applying a variety of speeds and torques can be mentioned as the advantages of this test rig, which is used for testing the high-powered and large gearboxes. The maximum loading capacity of this test rig is 489 HP with rotational speed of 3000 rpm. The schematic and real test rig is depicted in Figure 1. As it is obvious from this figure, the energy is circulated in the closed loop and a motor is embedded for compensating the energy losses and providing the initial power required for starting the system. In order to apply torque to this system, a torque applying system is used. In this test rig, hydraulic actuators are used to rotate the ring of planetary gearboxes as shown in Figure 2. According to this figure, by applying displacement through the rod of EHA to the pins of the ring, the required torque is generated. The travelling course of the EHA is 60 mm, and distance between two pins of the torque applying system is 175 mm; consequently up to 20 degrees rotation can be generated in the ring of the planetary gearbox using this actuation system. The actuation system consists a three-phase electrical motor, a positive displacement pump, a container, a safety valve, and a pressure indicator. For the actuation system, according to the operating pressure and maximum required flow, MOOG G763004 servo valve is used. Moreover, the generated displacement is measured by Opkon Lpc-LM 75 considering the possible displacement of the actuator. For more information about this test rig, refer to Mardani (2018), Mozafari et al. (2017), Takloo et al. (n.d.).

Modelling the system
In order to obtain an accurate model of system, which captures system dynamics completely, we aim to use system identification approach. Precise modeling plays an important role in further uses, such as control, as it can significantly influence the performance of designed controller. As shown in Figure 3, the identification process consists four steps. The first step in extracting the system model using SI is to design experiments and excite the system to gather the input-output data set. The second step includes selecting the model structure, as well as its order and parameters. In the following step, the model is estimated and in the last step, obtained model is evaluated to check the possibility of its usage in further applications.
The superiority of the proposed modeling procedure is its applicability for different EHA set-ups with various characteristics and different operational conditions according to the data-driven nature of the proposed scheme. The proposed modeling scheme can be utilized is every single-input single-output (SISO) system that it is possible to gather the input-output data through implementation of appropriate sensors. In addition, through some modifications, this scheme can be utilized for multi-input multi-output (MIMO) systems too. The important issue that should be considered in using this scheme for modeling different systems is the identifiability of the system; for more information in this regard it is referred to (Ljung, 1999).

Data acquisition
An EHA system includes hydraulic actuator and a servo valve with amplifier. As can be seen in Figure 4, the data is recorded in an open-loop scheme. At first, the excitation signal, which can be voltage, is generated in the computer by the written code and then transferred through the interface to the servo valve after amplification. This signal leads to a displacement in valve spool, which results in an appropriate flow in the actuator and finally the actuator displacement is recorded as the output by the embedded sensor. Accordingly, for each excitation signal, we have corresponding output signal that forms a data set. Different excitation signals can be utilized; however, if the model is to be used in determined frequencies, combination of sinusoidal signals would be an appropriate choice according to the high quality of the acquired data in these frequencies. This feature is very important in further use of model in control issues. The signals should be chosen based on the operational frequencies of the system. In this research, the combination of sine signals is chosen as the input for the system.
where ( ) in V K is the input signal, P is the number of sine signals to be combined, s t is the sampling time, i a is the amplitude of sine signals, and i ω is the frequency. The open-loop tests were conducted several times in different conditions to assess the repeatability of the process; according to the gathered data and since MOOG servo valves provides superior repeatability, the system can be considered repeatable and there is no need to repeat the data acquisition procedure several times.

Model structure and parameters
Identification processes can be categorized as parametric and non-parametric approaches. Non-parametric approach is often used for complicated systems in which there is no prior knowledge about the model structure; however in parametric system identification, the system structure should be defined and the unknowns are the parameters (Sovardi et al., 2013). In some cases, in which noises exist, the parametric identification is superior as it is less sensitive to the noise. So, in this research, since we will investigate the performance of the controller under different conditions, including noise and disturbances, parametric identification is implemented. If the amplitude of the hydraulic actuator is small, the actuator can be represented by a linear system; usually 2 nd or 3 rd order system would be sufficient. According to (Ling et al., 2011), although EHA is a nonlinear system, using ARX model for modeling the EHA would result in appropriate model. For selecting the order of the model, Parsimony principle can be used. According to this principle, among the identified models with different orders, the model with less parameters and acceptable accuracy is preferred (Söderström & Stoica, 1989). The selection of model with less parameters would lead to less computational cost as well as the simpler design of the controller (Ishak et al., 2017).
The general form of ARX model as input-output relation is defined as follows: If ( ) A q and ( ) B q are introduced as the model polynomials and described as follows: The transfer function of the identified plant can be defined as: For selecting the appropriate order of the model, first we evaluate 1 st -2 nd -3 rd order ARX and select the best one with minimum error. According to the obtained results, ARX2 provides acceptable results, so it is selected to eliminate complexity and time consumption of higher-order

Start
End Figure 3. The flow chart of the system identification models along with the possibility of providing online estimation. The ARX2 model, which is a second-order transfer function between the input and output is defined as follows: In the above equation, u(t) and y(t) are the input and output of the system, respectively and a, b, c and d are the unknown parameters. This transfer function can be rewritten in the following form: ( 1) ( 2) ( | ) ( 1) where ( ) t ϕ is regression vector that determine the structure for unknown parameters which are shown by θ and defined as In addition,ˆ( | ) y t θ represents the estimation of the model behavior.

Model estimation
From another point of view, the identification process can be conducted in online or offline schemes. In this paper, in which, firstly the data is gathered and then it is transferred to the computer for further processes, it is said that the identification is conducted offline.
Consider that a set of candidate models exist, which are parameterized as a model structure (Ljung, 1999): in which * M is the best model and ( ) M θ are the parameterized model.
In fact, identification iteration is performed for several times through minimization methods to test the capability of the models. In this paper, the weighted least square method is used for selecting the parameters as follows: In the above equation, θ  is the estimated parameters; Y is the output and W is the weights that is defined as diagonal matrix as: i w defines the relative importance of the i th output. The best model was selected according to the next section (Section 2.4).

Model validation
In order to evaluate the performance of the system, the real system output and estimated output should be compared. Generally, error function is defined as the difference between the real outputs and estimated value by the model obtained from system identification. The root mean square error (RMSE) is an index for evaluating the quality of the system. RSME techniques are very common for validating the model obtained from system identification. According to these techniques, the accuracy and precision of the models can be compared (Ishak et al., 2017). RSME is calculated by following equations.
in which, y(k) and ˆ( ) y k indicate the real and estimated outputs of the system, respectively and n is the number of samples.

Control scheme
Model Predictive Control (MPC) is a family of controllers that by using a process model and through minimization of a cost function, obtains a sequence of control inputs so that the predicted output converges to the defined set point in an optimal manner. Due to the understandable principles and basic features as well as simplicity in tuning the parameters, only a little information is required for implementing this control scheme. The MPC calculations are based on current measurements and predictions of the future values of the outputs.
Clearly, the success of the MPC controllers, which are considered as model-based controllers, is highly dependent on the accuracy of the model; for this purpose, obtaining a precise model of the studied plant may be regarded as the first step in designing these controllers. The output is predicted in determined time intervals, which is named "Prediction Horizon", by using a process model. The predicted outputs are dependent on the known parameters (inputs and outputs up to t second) and unknown control signals in the future, which should be computed and applied to the system. The future control signals are obtained by minimizing the cost function, which attempt to reduce the error between the process output and reference. The control signal is only applied to the system at t. The main objective of control laws is that the process output in the

DMC algorithm
Dynamic Matrix Control (DMC) is a particular type of MPC, which uses a parametric model based on the step response of the system to predict the input and output. In Figure 5, the structure of a DMC-MPC procedure is depicted. This model uses the past inputs, past and present outputs as well as predicted outputs. In this model, the step response can be described by (Camacho & Bordons, 2007): where ( ) y t is the output, i g is the coefficient of step response at each sampling time and i is the sampling time. In addition, u ∆ is the increment of the command ( t z ∈ ). Also, it should be noted that current disturbance is considered to be equal to disturbance in the future time and so it is constant along the prediction horizon and calculated as the difference between the measured output

t k t n t t y t y t t
In the above equation, n represents the disturbance. So, the prediction of the output at ( t k + ) is given by: In the above equation, the first term represents the future inputs or forced response of the system. The second term indicates the past inputs and the third term is the disturbance.
It is worth mentioning that coefficients of i g converge to a constant value after N sampling time; therefore we have (Ramdani & Grouni, 2017): (14) Consequently, equation (13) can be rewritten as: Term 2 along with term 3, represent the free response of the system. So we have: where: It is worth to mention that ( is the free response of the system and is not depended to the future control action. By changing the limits in equation (16), the prediction of the output for a prediction horizon, p, and control horizon, m, is given by: The estimation of the system output in the following times of prediction horizon can be obtained by the expansion of equation (18) as follows: Therefore, the equation (19) can be rewritten in matrix form as follows: ( (21) F and G are the free response matrix and dynamic matrix of the system and defined as: The control law can be derived considering an objective function that utilizes the future output prediction that was previously determined. The aim of DMC controller is to drive the outputs of the plant to the desired reference as near as possible, or in other words, it is aimed to minimize  ) is the desired reference, y(n) is the real output ot the plant of the system, e(n) is the error between the desired reference and real output of the plant, ∆u is the increment of control input and ˆ( ) y n k + is the predicted output.
the difference between the reference output and predicted output along prediction horizon of p using m control actions in control horizon. So, the control signal can be obtained by minimizing the quadratic cost function, which is defined as follows: where, 1 p and 2 p are the minimum and maximum prediction horizons, respectively. The term ( | ) y t j t +  is the predicted output and ( ) w t j + is the reference. In addition, λ is the weighting coefficient.
By minimizing the quadratic function in analytical way, a sequence of future control signals can be obtained. To solve equation (23) analytically, it should be rewritten as: Then by derivation of equation (24) and equating it to zero, the control signals can be defined as: The equaiton (25) provides a sequence of future control signals; however, only the first control signal is applied to the system. In order to obtain the other control signals, the procedure should be iterated for the following time samples based on the receding horizon principle.

Results and discussions
In this section, the obtained results are provided in three subsections. In the first subsection, the results of the model obtained through system identification procedure are represented and discussed. The second subsection is dedicated to the model predictive control results of the system using DMC algorithm. In addition, in the third subsection, the results of DMC controller is compared with the classical PID controller.

System identification results
The input signal for the system is chosen as a combination of sine signals as follows: ( ) cos(0.5 ) cos(2 ) cos(5 ) (26) The excitation signal is depicted in Figure 6. For training and testing outputs, 3000 data points were collected during 50 seconds. This data set is divided into two groups of training and testing data sets. About 60% of the collected data (1800 data points) are used for training the network' the remaining (1200 data points) were used for testing the model. It is worth to note that the training and test data sets are completely different from each other and the system would be tested in the data sets that has not been trained. According to the literature , the sampling frequency was selected to be 50 milliseconds.
The unknown parameter vectors are obtained as: As can be seen in Figure 7, the real EHA system and the identified system are subjected to the same input and their outputs are compared. The comparison results are provided in Figure 8. The error is defined as the difference between the real system output and the identified system output which is shown in Figure 9. As can be seen, the order of the error is very low and can be neglected.

DMC-MPC results
The proposed DMC method is applied on the model obtained from the system identification and results are provided in the following. In the first section, the results are presented and discussed in the normal condition and in the second section, the results are provided in the presence of disturbances. In both subsections, two types of reference are considered; constant reference and variable step reference.

DMC performance in normal conditions
First, the performance of the proposed controller is presented for the normal condition, in which no disturbance is considered. As can be seen in Figure 10, after about 0.3 seconds, the EHA output tracks the reference input without any overshoot and fluctuations in the output almost without steady state error.
In the following, a step reference with variable amplitude is considered as the reference. The performance of the system is depicted in Figure 11. According to this figure, it can be concluded that the designed controller can track the reference input, which is the step signal with various amplitudes. After about 0.3 second, the system tracks the first initial reference and after each change in the amplitude, the controller tracks the new reference with the delay of 0.1 second without overshoot and fluctuation in the outputs.

DMC performance in the presence of disturbance
In order to evaluate the performance of the proposed DMC-MPC controller in real conditions, which is mostly faced with various disturbances resulted from different sources like flow or force, a disturbance is applied to the system. So, a signal with the maximum amplitude of 5 mm and the minimum amplitude of 2 mm is applied to the system between the 6 th and 7 th seconds during the system operation as follows: dist = 0.05(t>6)(t<=6.5) -0.02(t>6.5)(t<=7) . (29) Then the performance of the proposed controller in the presence of the defined disturbance is evaluated and the controller's disturbance rejection feature is investigated. For the case, in which the reference is constant, as can be seen in Figure 12, the controller can efficiently damp the disturbance and after about 0.5 seconds, it would track the reference input, without any overshoot and fluctuation in the output. Consequently, it can be inferred that the disturbance rejection properties of the proposed controller are satisfactory and the controller can effectively deal with the applied disturbance.
In the next step, we applied the same disturbance as defined in equation (29) between the 6 th and 7 th seconds of system operation for variable reference input and evaluated the performance of the controller. Figure 13 shows the performance of the controller for tracking the variable step input in the presence of disturbances. As can be seen in Figure 13, the system can compensate the disturbance influence and reaches to steady performance in this case; however, large domain of the disturbance compared to the step domain, would be problematic. . The PID control scheme is depicted in Figure 14.
The PID controller can expressed as: in which c G is the controller gain. The result of implementing PID controller along with DMC controller is plotted in Figure 15 for the constant reference without any disturbance. As can be seen in this figure, the DMC algorithm provides better performance in terms of settling time and overshoot. According to this figure, the DMC output tracks the reference after 0.3 s without any overshoot and steady state error; however for the PID controller, the settling time is 4.9 s and the overshoot is equal to 8.43%. So the better performance of DMC controller in this case can be concluded. According to the constant gains, conventional PID controllers do not provide reasonable performance and consequently, an algorithm for tuning the parameters is needed.

Conclusions
In this paper, due to the importance of transmission evaluation in safety and maintenance costs in industries, we aimed to investigate the test rig for evaluating the performance of the gearboxes under different operational conditions of helicopters. The studied test rig developed at Sharif University of Technology branch of ACECR (Academic Centre of Education, Culture and Research) is a rig According to the obtained results, it can be concluded that the controller shows good properties both in normal condition and in the presence of disturbances. In addition, the quality of the response is satisfactory. So, the proposed DMC-MPC algorithm can be applied in controlling the actuating system in torque applying devices of the constructed test rig without any problem.

Comparison with PID control scheme
In order to provide a comparison as well as emphasize on the superiority of the DMC control algorithm, the results of the proposed scheme for tracking the constant reference is compared with the PID (proportional-integralderivative) control scheme. PID controller is defined as follows (Ahn & Truong, 2009 in which, p K , i K and d K denote the proportional, integral, and derivative coefficients, respectively. In addition, ( ) e t is the error between the desired reference and system with low energy loss actuation system for testing the highpowered gearboxes. This test rig, which is a mechanically closed-loop rig, is able to provide a wide range of speed and torques for simulation required conditions. Torque applying system, which is responsible for providing the desired torque, is the important parts of the rig. EHA, which convert the electric signal to the linear motion of the piston, would be an appropriate choice for this system. Due to the importance of acquiring a precise model of the actuating system, which captures the dynamic of the system and can be computed online (lower time consumption) without using any simplifying assumption that may affect the controller performance, we used the system identification approach for modeling the EHA system. After examining different structures for the model, ARX2 model was selected and the corresponding parameters were determined and subjected to the same input with the real system for comparison. The result showed that the model could capture the dynamic of the system well and the validity of the model was confirmed.
After that the model was obtained, a DMC-MPC controller, which is dynamic matrix controller was proposed for controlling this system. The controller was evaluated in two conditions; the normal condition and in the presence of disturbance. According to the obtained results, the system was able to track the constant reference after 0.3 seconds without any overshoot and fluctuations in the output. For the variable step reference, each variation in the amplitude of the reference was tracked after about 0.1 s. In the presence of disturbance, the tracking was achieved after about 0.5 s. In summary, good tracking of this controller was achieved for various reference inputs in both conditions and the system showed good characteristics of disturbance rejection feature. In addition, the performance of the DMC controller was compared with the performance of the classical PID controller and superiority of the proposed controller was concluded.