Application of results of experimental identification in control of laboratory helicopter model

. This article deals with experimental identification and control of laboratory helicopter model CE 150 manufactured by company Humusoft. Structure of the identified system was approximated by linear black-box models. Discrete Input/Output Auto-Regressive Moving Average model with eXternal input (ARMAX) and its state space equivalent were used. Parameters of the models were estimated by regression techniques using System Identification Toolbox for Matlab. Acquired models were validated using simulations, residual analysis and real-time control. Input/output data necessary for identification were obtained by measurements from laboratory model and were processed using Real-Time Toolbox for Matlab. Based on acquired mathematical models input/output and state space controllers were designed (input/output pole placement with integration, state space pole placement with integration and observer). Designed controllers were implemented in Matlab environment using the Real Time Toolbox and their performance was verified by real-time control of the helicopter model.


Introduction
A great deal of attention has been centered on the field of automation in various domains of industry thanks to increased demand for safety, fault proof and efficient usage of natural resources.Performance and reliability of control algorithms which are the key part of automation depend heavily on the mathematical model of controlled system.
To obtain such a model several approaches are available and we term this procedure as system identification.Main purpose of the identification procedure and corresponding model is to capture the underlying dynamics of the phenomena in consideration.
Depending on the amount of a priori information available we divide the models as follows.We say the phenomena can be modeled with a white-box model if all the necessary information is available a priori.Procedure that leads to white-box model is called an analytical identification.If there is no information about the dynamics of identified system available a priori we call the corresponding model a black-box model.Knowledge about such system is then gained through the analysis of the input/output measurements and is called experimental identification.Situation most widely encountered in practice is when both analytical and experimental identification are used and the resulting model is called a grey-box model.Authoritative account on this subject can be found in [1], [2], [3].This article is devoted to experimental identification and control of laboratory helicopter model CE 150 manufactured by company Humusoft [4].Several researchers have already reported some results on the identification of this dynamical system [5], [6].
The structure of nonlinear model was proposed in [5], while some parts of the mathematical model were approximated by black-box models.Author describes a way of computing some of the parameters of this model, but for the purpose of the control algorithms design he abandons the nonlinear model and proposes to identify the linear model from the input/output (I/O) data.
Analytical identification based on primary physical laws is carried out in [6].Parameters of proposed model are acquired either by direct measurements or by the least-squares method.Linear models for the control algorithms design are then obtained by linearization around some suitable operating point.
The application of optimal control is studied in detail in [7] and [8].
Aim of this article is to further develop the idea of obtaining parametric models with linear structure by means of experimental identification proposed in [5].Also to point out the possibility to bypass the analytical identification which relies on careful application of physical laws.And instead create the black-box models using only regression techniques and measured I/O data [9], [10].
This article is structured as follows.The second section covers the description of the laboratory model, structure of the mathematical models, parameters estimation and model validation methods.In the third section identification and validation results are presented.The fourth section is devoted to control algorithms design and implementation and presentation of results of the real-time control.The fifth section summarizes the article and points out the future work.

Procedure of Experimental Identification of Laboratory Helicopter Model CE 150
The general setup for experimental identification is demonstrated on Fig.

Experiment Design and Data Acquisition
Laboratory helicopter model CE 150 is composed of the body which carries two DC electromotors that drive two propellers.The body can perform rotational movement around two mutually perpendicular axes.Body has thus two degrees of freedom, one in elevation and one in azimuth.The angular velocity of propellers which are driven by the electromotor is proportional to the command inputs generated by computer.Centre of mass of the helicopter is controlled by the servomechanism.
The helicopter model is a multivariable dynamical system with up to three controllable inputs and two measurable outputs.Inputs and outputs are coupled.System is highly nonlinear and at least of order six depending on modeling precision.Schematic model of the helicopter is demonstrated on Fig. 2. Physical meaning of the variables of laboratory helicopter model used in Fig. 2 is explained in Tab. 1.
Tab.1: Physical meaning of variables used in helicopter schematic model [5].Interface between the laboratory model and computer is realized using an interfacing unit and a multifunctional I/O card MF 614 (or its equivalent newer versions).Technical parameters of the laboratory model are listed in following tables.

Variable Variable description
Tab.2: Technical parameters of helicopter body [5].Channels of the I/O card MF614 are connected with computer using the Real Time Toolbox for Matlab [10].Technical details of this card can be found in [12].Calibration of the sensors is automatic but requires initial position of the helicopter body to the very left and bottom.Data acquisition is realized according to the flow diagram depicted on Fig. 3.

Model Structure Selection
Either linear or nonlinear structure of the model can be chosen.However linear structure is selected because the theory of discrete linear systems is used for the control algorithms design.Linear digital control is used due to the fast dynamics of considered system.Implementation of nonlinear control algorithms is much more complicated and requires much more computational power.
From the vast linear framework the I/O SISO (Single Input Single Output) ARMAX (AutoRegressive Moving Average with eXternal input) [1] model will be used.Structure of the considered model is defined by following difference equation where u(k) stands for model input, y(k) for model output and ζ(k) represents a random process (white noise), which is used in MA (Moving Average) model of disturbance.
This model is evaluated in discrete time instants , where T s stands for sampling period.Equation ( 1) can be also expressed as follows 1 1 where polynomials contains weighting coefficients of lagged input, output and disturbance samples.The operator q is defined as follows ( ) ( 1) Equation for the one step ahead output prediction is where represents prediction error.For the ease of notation the vector of regressors φ(k, θ) and the vector of parameters θ(k) are introduced Equation ( 5) can then be expressed as a pseudo linear regression The linear state space SISO models will be used as well.This model is defined by following system of equations Vector x(k)∊ℝ n is the state vector, u(k)∊ℝ stands for input and y(k)∊ℝ stands for output of the system.Matrix A∊ℝ n×n and vectors b∊ℝ n and c∊ℝ n contain model's parameters.It is assumed that the process noise η(k)∊ℝ n and the measurement noise μ(k)∊ℝ can be represented by independent random sequences with Gaussian probability distribution and zero mean.Optimal predictor for this system is the Kalman filter [1] which can be expressed as Detailed overview of standard linear black-box models is given in [1].

Methods for Estimation of Model Parameters
Estimation of unknown parameters of the I/O and state space model can be realized by minimization of prediction error.Parameter estimation process is demonstrated on Fig. 4. System is excited by a suitable input signal u(k).Corresponding response signal y(k) is measured on the output.Output signal is composed from the real system output y o (k) and immeasurable (or unmeasured) disturbances e d (k).It is supposed that the disturbances affecting the output can be modeled by a random process.This process is obtained as a response of a certain dynamical system to white noise ζ(k).This dynamical system is called the disturbance model.
If the vector of parameters θ is unknown but a dataset of I/O measurements is available an obvious approach is to choose the vector θ in such a way that output of the model ˆ( ) y k would fit the measured system output y(k) as close as possible.Measure of fitness can be in general expressed by criterion 1 1 ( , ) ( ( , ), ) where Z N stands for data vector which includes the I/O data until the time NT s and for this particular case 2 ( ( , ), ) ( , ) Clearly in the light of the criterion ( 12) the output ˆ( ) y k will fit the y(k) as close as possible when the criterion (12) attains its minimum with respect to vector θ i.e.
Generally it is not possible to minimize the function ( 12) by analytical methods and the solution has to be sought by the iterative numerical optimization methods.For the special case of scalar output and quadratic criterion update of the estimate of the vector of parameters is given as ˆˆ[ ] ( , ), where ( )  ˆi N θ denotes the estimate of vector of parameters for the i th iteration.Vector ( ) ' ( , V θ Z stands for the gradient and can be computed as where σ(k, θ) denotes gradient matrix of ˆ( | ) y k θ with respect to θ.In addition gradient ( 16) is modified by the matrix .
According to selection of matrix R it is possible to obtain several variations of this method e.g.Newton, Gauss-Newton, Levenberg-Marquard.Further details and references about the general prediction error framework can be found in [1].

Methods for Validation of Regression Models
To verify if the model has captured the underlying dynamics of the identified system one can compare measured and simulated output of the system.Outputs should be similar and the error should be close to zero.Different dataset should be used for the purpose of validation.
Validation is frequently supplemented by residual analysis.Two principal mechanisms are used the whiteness and the independence test.Performance of the model is then evaluated according to prediction error ε(k) called also a residue.Residuals represent the part of the data that the model could not reproduce [1].
According to whiteness test residuals of a good model are mutually uncorrelated, i.e. sequence of the residuals is represented by a white noise [1].Simply put model should capture the essential dynamics between the inputs and outputs and the only unexplained data come for random independent disturbances.Therefore if the residuals are correlated an unmodeled functional relation is present in the data.Correlation of residuals can be examined by AutoCorrelation Function (ACF).The whiteness test verifies both model of dynamics and the disturbance model.
According to independence test a good model has the residuals and past inputs mutually uncorrelated [1].Indication of correlation means that the model doesn't explain how part of the output is related with these inputs.Correlation of residuals and past inputs can be examined by Cross-Correlation Function (CCF).The independence test verifies the model of dynamics.
In this particular case the independence test is of main interest.The specific results of validation regarding the laboratory helicopter model will be discussed in section 3.1.

Elevation Dynamics Identification
Laboratory helicopter model is a nonlinear dynamical system.However this nonlinear behavior can be approximated by linear model around some small neighborhood.Moreover the system contains multiple inputs and multiple outputs.However the mechanical construction allows disabling the motion either in elevation or azimuth.This enables independent identification of elevation or azimuth subsystem by SISO models.Finally unstable nature of this dynamical system further complicates the identification procedure.However a stable operating range exists and it can be used for open loop data acquisition.

Input/Output and State Space Model
Sampling period for open loop I/O data acquisition was set to T s = 0,01 [s].Operating point was chosen so that the steady state value of input was u 1,ss = 0,53 [-] and steady state value of output was  = -0,17π [rad].System was excited by pseudo random binary signal u 1 (k) demonstrated on Fig. 5. Computation of the parameter estimates was realized by the System Identification Toolbox for Matlab.Function pem was used to obtain the coefficients of the state space model and function armax was used to obtain the coefficients of the ARMAX model [13], [14].The resulting matrices of the state space model were obtained in the following form The ARMAX polynomials were obtained as follows A q aq aq aq B q b q b q b q C q c q c q c q Validation of acquired parametric models of the elevation subsystem was carried out by both comparison of real (  ) and simulated ( M ) output and using the residual analysis.Different datasets were used for identification and validation purposes.Validation results for the state space model are identical except for some minor differences and therefore were omitted.Simulated and measured responses of the elevation angle  (k) to the excitation signal are compared on Fig. 6.This comparison shows that the underlying dynamics were successfully captured.To analyze how much information from data was explained by the models residual analysis was used.Validation results for the I/O ARMAX model are given on Fig. 7 and Fig. 8.  Indeed from the results of the whiteness test demonstrated on Fig. 7 one can observe that all the information from the data was explained and only independent random disturbances remained.The independence test demonstrated on Fig. 8 shows that the residuals are uncorrelated with the past inputs and that the model explains how past outputs are related with the output.Regarding the validation of state space model same conclusion can be made [9].Acquired models should be used in control algorithms design for final verification.

Verification of Identification Results in Control Algorithms of Laboratory Model
Parametric models of elevation subsystem were created for the purposes of control algorithms design.Therefore it is possible to verify their performance also on the basis of control algorithms results.

Control Algorithm Design Based on the Input/Output Model
Such control algorithm design employs the transfer function of the considered system.Result is generally a dynamical controller with one or two degrees of freedom.
Suppose the transfer function of order n a is in the following form while following holds b 0 = 0 a n b ≤ n a -1.Let the transfer function of one degree of freedom (1DoF) controller be The goal of control design procedure is to find a suitable vector of parameters θ reg = (d 0 , d 1 , . .., d m , c 1 , . .., c m ) containing 2m + 1 controller parameters.A suitable method for calculation of these parameters is for example pole placement method.This method is covered in detail in [15].
Transfer function of the closed loop with 1DoF controller can be written as where A cl (z, θ) is the characteristic polynomial of a closed loop and following holds order ( , ) The algorithmic solution of (25) can be found in [9].

Feed Forward Nonlinearity Compensator
To deal with the nonlinear nature of the elevation dynamics feedback control structure was augmented with a feed forward controller.This controller was realized by a polynomial of 3 rd order Coefficients of the polynomial were determined by least squares method according to measured steady state values of elevation angle and corresponding input values.Measured and predicted data are compared on Fig. 9.The structure of the resulting control algorithm for the laboratory helicopter model is depicted on Fig. 10.Flowchart describing the implementation of the real time control is given on Fig. 11 and the complete flowchart of the control algorithm is given in [9].
Results of the tracking using the control algorithm, ( ) ( ) ( ) based on the input output model are demonstrated on Fig. 12 and Fig. 13.Depending on the requirements control effort and the tracking performance can be adjusted by suitable placement of the closed loop poles.

Control Algorithm Design Based on the State Space Model
Besides the I/O SISO model of elevation subsystem the state space model was also obtained.To verify this model in the control algorithm design a state space controller is also proposed.
Synthesis of the state space control is based upon the following system of equations where The design goal for the control algorithm is to select a vector k ∊ ℝ n such that the set of eigen values for the matrix of the closed loop dynamics A cl = A bk T was as follows where 1 ≤ p h ≤ 1 is the multiplicity of the h th eigen value z h [16].The proportional nature of the control algorithm (30) causes the steady state error when the persistent disturbance is present.To eliminate this error an integrating element is incorporated into the state feedback.
Integrator can be described by as follows then it is possible to create an augmented state space description of the system (29).Vector of the feedback gains k can be then designed by suitable placement of the closed loop poles by several approaches [16], [17].
For the state vector estimation a deterministic observer was used.Vector of the observer gains was designed by the function place of the Control Toolbox for Matlab.Observer poles were chosen so that the observer dynamics were faster than the dynamics of the closed loop.
Block diagram of the control algorithm is depicted on Fig. 14.  Results of the real time tracking with the state space control algorithm with integration for the laboratory helicopter model are demonstrated on Fig. 16 and Fig.State feedback is superior to the I/O feedback due to utilization of complete information about the state of the system.However this information has to be reconstructed from the I/O measurement.Therefore a state feedback augmented with an observer is yet another way of designing an I/O dynamic controller.This section was devoted to the elevation control of laboratory helicopter model.Both I/O and state space approach was used.Control algorithms were designed according to identified I/O and state space models.Identification was carried out using open loop measurements of the elevation angle.Identification of the elevation subsystem around the unstable operating point requires stabilizing the helicopter model first.This can be done using controllers designed here.To identify the azimuth subsystem again closed loop identification has to be used.Results of the control algorithms based upon the I/O and state space models obtained by closed loop identification for elevation and azimuth subsystem can be found in [9].

Conclusion
This article was devoted to experimental identification and control of the laboratory helicopter model CE 150 manufactured by company Humusoft.It was showed that linear dynamical I/O and state space models can be obtained only using I/O measurements and regression techniques omitting the tedious application of physical laws.Acquired models were validated using comparison of the measured and simulated outputs of the laboratory helicopter model and also by the residual analysis.
Advantage of proposed approach is that directly discrete linear models suitable for control algorithms design were obtained and neither linearization nor discretization were needed.Both I/O and state space control algorithms were designed, implemented and tested by a real time control of the laboratory helicopter model CE 150.Implementation of the control algorithms was carried out using Real Time Toolbox for Matlab.Control results verify that the parametric models obtained by application of the System Identification Toolbox functions are valid.
All in all it can be seen that correct use of regression techniques can save much time and effort during the modeling stage.Moreover when dealing with physical phenomena where underlying dynamics are not well understood this may be the only way of obtaining reliable mathematical model at all.
In comparison to other approaches, e.g.black-box nonlinear nonparametric models or nonlinear grey-box models based on physical insight, chosen approach lacks the generalization properties of the nonlinear models.However the procedures that leads to mentioned nonlinear models are much more complicated and time demanding.Furthermore design of a nonlinear controller that could utilize the nonlinear structure of the model is also nontrivial.In view of the nonlinear nature of the system, use of the nonlinear model structure should result in its increased generalization and prediction possibilities.Black-box or grey-box nonlinear model structure can be used.Parameter estimation can be realized using the standard optimization techniques [19], or using approximate nonlinear filtering algorithms, e.g.Extended Kalman filtering [20], Unscented Kalman filtering [21].To exploit the nonlinear structure of the model nonlinear controllers and observers could be considered as well [22], [23].

1 .
The experiment design and data acquisition require a thorough knowledge of technical details of the laboratory model.Numerous measurements have to be carried out for purpose of creating several I/O data sets.Structure of the model defines a whole set of candidate models.The identification method should then select the best model from this set.As a last step validation of the model should be done.
Controller can be then designed in such a way so that location of poles of the closed loop was in agreement with desired location of poles p i * , i = 1,…,m + n a .Desired location can be expressed by a desired characteristic polynomial A cl * (z) of the closed loop. of the closed loop poles a 1DoF dynamical controller of an order of m = n -1 is sufficient.The closed loop is determined by a transfer function of order n a + m = 2n a − 1 and it is therefore required to place 2n a -1 poles.If the characteristic polynomial of the closed loop A * cl (z) is chosen then the polynomials C(z) and D(z) can be determined as a solution of the following diophantine equation *

Fig. 9 :
Fig. 9: Feed forward control law based on the elevation angle.

Fig. 10 :
Fig. 10: Block diagram of elevation tracking control structure for helicopter laboratory model.

Fig. 11 :
Fig. 11: Flowchart of real time tracking implementation.Assignment y(k) ← y * (t 0 + kT s ) describes sampling of the continuous output function.In contrary assignment u * (t 0 +kT vz ) ← u fb (k) + u ff (k) expresses registration of the discrete control to I/O card and generation of corresponding voltage for main electromotor.Integer N stands for number of samples of the reference signal w(k).Coefficients of the feedback regulator are denoted as c i a d i and finally e(k) stands for the control error.Real time communication between the Matlab environment and the I/O card was realized by the Real Time Toolbox for Matlab.Transfer function of the feedback controller was in the following form

Fig. 12 :
Fig. 12: Control input for the helicopter elevation tracking based on input output model.

Fig. 13 :
Fig. 13: Reference and measured elevation angle for the helicopter tracking based on the input output model.
is the sampling period, T i stands for integrator time constant and e(k) is the regulation error.If the control algorithm acquires following form (

Fig. 14 :
Fig. 14: Block diagram for the state space control algorithm with static error cancelation.Part of the flowchart that deals with the real time control is demonstrated on Fig. 15.

Fig. 16 :
Fig. 16: Control input generated by the state space controller with integration for the real time helicopter control.

Fig. 17 :
Fig. 17: Real time elevation angle tracking by the state space controller.