Time-Domain Parameter Estimation for First-Principle ... - CiteSeerX

68 downloads 3771 Views 1MB Size Report
In this work, we consider the problem of parameter estimation from flight test data for ... estimation the model is prescribed and its parameters are the only free.
Time-Domain Parameter Estimation for First-Principle Rotorcraft Models using Recursive and Batch Procedures: Formulation and Preliminary Results C.L. Bottasso∗, F. Luraghi, G. Maisano Dipartimento di Ingegneria Aerospaziale, Politecnico di Milano, Milano, Italy Scientific Report DIA-SR 09-05 Dipartimento di Ingegneria Aerospaziale, Politecnico di Milano, Milano, Italy April 2009

Abstract In this document, we consider the problem of parameter estimation from flight test data for rotorcraft vehicle models. We describe two alternative parameter estimation classes of methods in the time domain, namely the recursive filtering and the batch optimization methods. Both classes of methods are formulated so as to be applicable to complex first-principle models of rotorcraft vehicles. In the recursive approach, we formulate a novel version of the Extended Kalman Filter which specifically accounts for the presence of unobservable states in the model. An important highlight of the proposed approach is that it does not require a reduced-order model of the system. In the case of the batch optimization methods, we present a formulation based on a new single-multiple shooting approach specifically designed for vehicle models with slow and fast solution components. The document is concluded by a preliminary assessment of the performance of the proposed procedures with the help of applications regarding manned and unmanned rotorcraft vehicles, using both data obtained by simulation and gathered during flight testing.

1

Introduction

In this work, we consider the problem of parameter estimation from flight test data for rotorcraft vehicles. The objective of parameter estimation is to find values of the parameters in a given mathematical model such that the model-computed response best matches (in a statistical sense) the experimentally observed one. In the literature, it is common practice to speak of system identification when in reality referring to the problem of parameter estimation. When performing system identification, one has the freedom to define both the structure of the model and its parameters, whereas when performing parameter estimation the model is prescribed and its parameters are the only free variables which can be used to minimize differences between the model-computed response and experimental data. ∗ Corresponding author, Dipartimento di Ingegneria Aerospaziale, Politecnico di Milano, Milano, Via La Masa 34, 20156 Italy. E-mail: [email protected]; Tel.: +39-02-2399-8315; Fax: +39-02-2399-8334.

1

1 Introduction

2

Much of the published works on rotorcraft system identification deals primarily with frequency domain approaches and linear models [38, 12, 16, 21], an excellent review on the state-of-the-art being given in the recent Reference [39]. Typically, for each given problem, ad hoc linear models are postulated and expressed in terms of a limited number of states and unknown model parameters, which often represent stability and control derivatives synthetically accounting for global aerodynamic effects created by the various aerodynamic components of the vehicle (rotor(s), fuselage, lifting surfaces, etc.). Suitable methods are then formulated for extracting best (in a statistical sense) estimates of these unknown model parameters from experimental observations. On the other hand, multidisciplinary aeromechanical analysis tools are being developed at a fast pace from first principles. Modern analyses are based on comprehensive approaches, which aim at covering the widest possible range of vehicle geometries and configurations, analysis types (including performance, handling qualities, vibrations, loads, etc.) and flight conditions (maneuvers, trimmed flight, hover, taxing, etc.). In fact, current comprehensive multibody analysis tools [4, 34, 19, 1] offer the ability to create hierarchical models of varying levels of fidelity of the various sub-systems of the vehicle. Rotorcraft codes are coupled with aerodynamic models, ranging from classical blade element inflow models [20], to time-accurate dynamic inflow [31] and free-wake models [6] all the way to first-principle computational fluid dynamics (CFD), that account for various effects such as the interactions of shed vortex filaments with the rotor blades, the fuselage and the tail rotor, dynamic stall effects on the retreating blade, etc. Hence, rotorcraft aeromechanical analyses are typically based on complex, highly non-linear, multi-field models. Reference [11] provides a review on the current aeromechanical modeling capabilities, and describes possible future needs and areas of required technological improvements. From this discussion, it appears that there is a clear need to use modern parameter estimation techniques for supporting the current capabilities in the aeromechanical modeling of rotorcraft vehicles. In doing so, the estimation methods must be carefully chosen. In fact, models are now non-linear, formulated in the time domain and often implemented in highly complex simulation codes; this last aspect calls for a high level interaction with the estimation procedures in order to minimize code modifications. Furthermore, since in a comprehensive code most effects are modeled from first principles by the various coupled disciplinary sub-components, the to-be-estimated parameters must be chosen with attention. One possibility is to use unknown parameters to account for the defects of the analytical models, i.e. for the un-modeled or un-resolved physics. This way, the white box model implemented in a comprehensive analysis code is augmented with carefully chosen black box components which, if properly estimated, lead to an improved grey box model of the aircraft. In the present work we focus on the time domain approach to parameter estimation and on non-linear vehicle models. Excellent reviews of time domain methodologies for parameter estimation are already available, most notably in Reference [17]. Reference [18] describes, among many different flight mechanics applications, the use of time domain parameter estimation for rotorcraft problems. In fact, modern time domain approaches seem to be ideally suited for supporting the model identification needs of rotorcraft aeromechanics. Regarding all methods and tools which support the process of parameter estimation, including data compatibility check, pre- and post-processing, model validation, etc., we refer to standard text books such as for example References [17, 24, 39]. Here, we specifically consider methods which are applicable to unstable systems, since rotorcraft vehicles are typically unstable at least in certain flight conditions. Unstable vehicles must be operated in closed-loop, and this must be explicitly accounted for when formulating parameter estimation methods. Hence, after having more precisely defined the problem of parameter estimation for a generic comprehensive rotorcraft model in Section 2, we analyze the problem of

2 The Problem of Parameter Estimation

3

parameter estimation for unstable vehicles in Section 3. In Section 4 and 5 we describe the mathematical formulation of two alternative parameter estimation classes of methods in the time domain, namely the recursive filtering and the batch optimization methods. Both classes of methods are formulated so as to be applicable to complex first-principle models of rotorcraft vehicles, and were implemented in computer codes interfaced with state-of-the-art flight vehicle models. In the recursive filtering case, we consider the Extended Kalman Filter (EKF) formulation. Here, the EKF algorithm is formulated in a novel way so as to account for the presence of unobservable states in the model. This way, the method can be applied to complex vehicle models which include both slow flight mechanics scales and faster aero-elastic ones, although measures are typically available only for the slow solution components describing the gross vehicle motion. An important highlight of the proposed approach is that it does not require a reduced-order model of the system. In the case of the batch optimization methods, which include both the output error and filter error methods, we present a formulation based on a new single-multiple shooting approach specifically formulated for vehicle models with slow and fast solution components [8]. In this case, the basic idea is to use multiple shooting on the flight mechanics scales, and single shooting on the faster ones; this avoids the enforcement of the multiple shooting gluing constraints for the faster scales, which greatly enhances convergence and in turn reduces the computational cost. The two classes of approaches described herein have characteristics which make them suitable candidates for the difficult problem of parameter estimation for rotorcraft models. On the other hand, the two methods have also important differences, so that one or the other might be favored depending on the application; a synergistic use of the two can also be foreseen. In Section 6 we describe some preliminary applications of the presented methods to both manned and unmanned rotorcraft vehicles, whereas conclusions and plans for future activities are given in Section 7.

2

The Problem of Parameter Estimation

Given a system S (the plant) and a suitable model of it M(p), parameterized in terms of free quantities p, the problem of parameter estimation is concerned with finding values of the parameters p such that the model outputs y best match in some given sense the measured quantities z, when both plant and model are excited by the same inputs δe = δ 1 . The problem is of a e while the observations stochastic nature, since the plant is usually excited by a process noise w, e. This situation is illustrated in Figure 1. are corrupted by a measurement noise v More precisely, consider a parametric flight mechanics vehicle model M(p), which includes structural and aerodynamic models of the vehicle components, possibly (but not necessarily) using a multibody approach [4]. The dynamics of model M can in general be described in terms of a set of non-linear index 1-3 differential algebraic equations written as fsd (x˙ sd , xsd , λ, xaero , δ, p) = 0,

(1a)

c(xsd ) = 0,

(1b)

M x˙ aero + Lxaero − τ (xsd , δ, p) = 0,

(1c)

where xsd ∈ Rnxsd are the structural dynamics states (including states describing rigid and possibly flexible rotor(s), fuselage, engine, etc.), λ ∈ Rnc are constraint-enforcing Lagrange mul1

Here and in the following, quantities related to the plant (the true system, as opposed to a model of it) are f indicated using the notation (·).

2 The Problem of Parameter Estimation

4

Fig. 1: The problem of parameter estimation. tipliers in a multibody vehicle model, xaero ∈ Rnxaero are aerodynamic states (e.g. dynamic inflow variables), δ ∈ Rnδ is the control input vector, and p ∈ Rnp are the model parameters. Equations (1a) group together kinematic and dynamic equilibrium equations. Equations (1b) represent mechanical joint constraint equations in a multibody vehicle model, whereas Equations (1c) are the aerodynamic state equations (here written in a linear form resembling the one obtained using, for example, the classical Peters-He [31] dynamic inflow model, but which could have a more general non-linear form without affecting the subsequent discussion). Finally, the ˙ = d(·)/dt indicates a derivative with respect to time t. notation (·) While the presence of differential algebraic governing equations does not pose any additional difficulty as far as the parameter estimation problem discussed here is concerned, for the sake of notational simplicity but with no loss of generality, in the following we will consider that Lagrange multipliers λ and redundant structural dynamics states can always be formally eliminated in favor of a minimal set of coordinates [14]. Therefore, the governing equations will be assumed to be of the ordinary differential type and will be simply expressed as fsd (x˙ sd , xsd , xaero , δ, p) = 0,

(2a)

M x˙ aero + Lxaero − τ (xsd , δ, p) = 0.

(2b)

It will be sometimes convenient to use a more synthetical form of the above equations, when we do not need to distinguish between structural dynamics and aerodynamic components; in those cases we will use the compact form f (x, ˙ x, δ, p) = 0,

(3)

where x = (xTsd , xTaero )T , x ∈ Rnx , nx = nxsd + nxaero , and f stacks together Equations (2a) and (2b).

3 Parameter Estimation Techniques for Unstable Systems

5

For application to parameter estimation problems, we rewrite Equation (3) as f (x, ˙ x, δ, p) − F w = 0,

(4)

where w ∈ Rnx is the process noise, a stochastic variable which represents the disturbances acting on the system (e.g., air turbulence) and any other modeling uncertainty. They are assumed to be zero-mean, Gaussian, white processes with power spectral density Q. F denotes the (typically unknown) process noise distribution matrix, which is generally assumed to be an nx –by–nx diagonal matrix or a nx –by–1 column vector. The definition of output and measurement equations completes the formulation of the parameter estimation problem. In general, such equations take the following form: ¡ ¢ y(tk ) = h x(tk ) , (5a) z(tk ) = y(tk ) + v(tk ),

(5b)

with k = 1, 2, . . . , N . Equation (5a) defines the model outputs y ∈ Rny as a function of states, inputs, and parameters, whereas the measurements z ∈ Rny , affected by measurement noise v ∈ Rny with covariance Rk = E[vk vkT ], E[·] being the expected value operator, are provided at N discrete sampling points tk . For the purpose of defining the model outputs, let us consider the following partitioning of the state vector x: ¢T ¡ x = xTfm , xToth , (6) where xfm are the flight mechanics states, while xoth are all other remaining states in the model. The flight mechanics states are here defined as those describing the gross rigid body motion of the vehicle, i.e. they represent the position, orientation, linear and angular velocities of a body-attached (or floating, in the case of a flexible fuselage) reference frame. With reference to Equation (5a), we define the output vector as ¢T ¡ y = xTfm , aTfm ,

(7)

i.e. we take as model outputs the flight mechanics states xfm and the flight mechanics accelerations afm , where afm = x˙ fm = gfm (xfm , δ, p). (8) With this choice, function h in Equation (5a) is defined as ¡ ¢ T T h = (Hfm x)T , gfm .

3

(9)

Parameter Estimation Techniques for Unstable Systems

Any technique developed for parameter estimation of rotorcraft models from experimental data must account for the fact that these vehicles are typically unstable, at least in certain flight conditions. For this reason, rotorcraft vehicles usually operate in closed-loop, under the action of an output feedback mechanism implemented through a flight control system (FCS). Hence, in the case of rotorcraft vehicles, experimental data used for parameter estimation is gathered in closed-loop. This fact has important consequences on the process of parameter estimation. Parameter estimation performed from data collected in closed-loop is termed in the literature e closed-loop estimation. This situation is illustrated in Figure 2. Plant S is driven by an input δ, e e In turn, the output δ of the FCS output by the vehicle FCS, and by a stochastic disturbance w.

3 Parameter Estimation Techniques for Unstable Systems

6

Fig. 2: Gathering of flight test data in closed-loop. is driven by two inputs: the pilot input δp and the system outputs yeFCS , which are functions of e, i.e. yeFCS = hFCS (e the plant states x x). During the experiment, some measured outputs z are e. gathered, where z = h(e x); the measurements are affected by measurement noise v With reference to Figure 2, we observe that the functional dependence of the inputs at the e is as follows: plant actuators, δ, e δep , x e, w). e δe = δ( (10) e means that, when performing closed-loop parameter estimation, we The dependence of δe on x e are in the presence of correlated inputs and outputs. Furthermore, the dependence of δe on w implies that the system is excited by a stochastic input. Finally, we notice that a typical FCS will try to suppress the excitation introduced by the pilot inputs δp , which of course renders the estimation problem even more difficult. Notwithstanding these difficulties, closed-loop parameter estimation is the only method that can be used in most practical cases when dealing with unstable aircrafts for obvious safety reasons. Furthermore, it should be noted that open-loop flight testing also suffers from its own severe drawbacks, most notably from the fact that data can only be gathered for short time spans, before the system excessively drift from the starting trim point. Hence, in the following we will only consider closed-loop estimation. Reference [13] reviews several strategies for closed-loop parameter estimation, illustrating the theoretical conditions under which consistent estimates are possible. In summary, there are three possible approaches to unstable system identification: • Indirect approach. Parameter estimation is performed by using a closed-loop model based on the knowledge of the feedback controller. The idea behind the indirect approach is to find the best model parameters from the input/output relation δp /y. This situation is illustrated in Figure 3. One important drawback of this approach is due to the fact that it requires explicit knowledge of the regulator. Unfortunately, a detailed model of the FCS might not always be available, for example because covered by proprietary rights; furthermore, modeling approximations in the FCS will inevitably affect the estimation results. • Direct approach. In this case, parameter estimation is performed by ignoring the feedback, and using the sole measurements of plant inputs and outputs, i.e. on the basis of the input/output relation δ/y. This situation is illustrated in Figure 4.

3 Parameter Estimation Techniques for Unstable Systems

7

Fig. 3: Parameter estimation using the indirect approach. Observing the figure, we notice that in this case one feeds the plant model M(p) directly with measured inputs δ. Hence, at the price of gathering the control inputs down-stream the FCS (as opposed to the direct case, when one needs only to measure the up-stream values δp ), one has the advantage that no knowledge of the FCS is required. Therefore, there is no possible effect of regulator modeling approximations on the quality of the results. However, even this approach has its own drawbacks. In fact, it can be shown that it is e [17]. Since usually δp can not be necessary to have a sufficient signal to noise ratio δp /w e has to be small, so that flight tests too large to avoid non-linear effects, this implies that w have to be conducted in calm, low turbulence air. Another potential difficulty, which to the best of our knowledge has not been previously noticed in the literature, is due to the fact that the input δ fed into the model was computed by the plant FCS. This signal was computed during the flight test so as to stabilize the plant; however, in general there is no guarantee that the same signal will also stabilize the model, especially when the parameter estimates are still far from convergence. This might in principle lead to instabilities for those parameter estimation methods which require the integration of the model equations, for example through shooting. Therefore, it might be convenient to use stabilized time marching, for example through filtering or multiple shooting [17]. • Joint input-output approach. Using this method, one regards the system inputs and outputs as the combined outputs of an augmented system, driven by some extra inputs and noise. It can be shown [13] that joint input-output methods can be regarded as the combined direct identification of both the open-loop system and the regulator.

4 A Recursive Approach: Direct Adaptive Kalman Filtering

8

Fig. 4: Parameter estimation using the direct approach. Given the necessity of perfect knowledge of the FCS for the indirect approach, in the remainder of this work we adopt the direct one as the method of choice for the present research effort. In the next sections, we formulate two alternative time domain parameter estimation methods, applicable to non-linear models of rotorcraft vehicles. Both are based on the direct approach discussed above, and hence can deal with unstable vehicles and with experimental data gathered in closed-loop. Furthermore, both methods are based on a stochastic approach to the problem of parameter estimation, and hence can deal with the presence of process and measurement noise. The main difference between the two methods is the way gathered data points are processed. In fact, the first approach is of a recursive nature and transforms the unknown parameters into dynamic variables, which are integrated to steady state through a relaxation process by treating one data point at a time. The second one, on the other hand, is a batch method, which processes all data points simultaneously in order to yield an estimate of the unknown model parameters.

4

A Recursive Approach: Direct Adaptive Kalman Filtering

The basic idea behind parameter estimation using recursive filtering is to promote the unknown model parameters p to the role of states. This leads to a new augmented state space model, and transforms the parameter estimation problem into a state estimation one. The augmented system can be written as fa (x˙ a , xa , δ) − Fa wa = 0,

with k = 1, 2, . . . , N .

(11a)

¡ ¢ y(tk ) = ha xa (tk ) ,

(11b)

z(tk ) = y(tk ) + v(tk ),

(11c)

4 A Recursive Approach: Direct Adaptive Kalman Filtering

9

Equation (11a) represents the augmented model dynamics and, more precisely, it is composed of two coupled differential equations: ˙ x, δ, p) − F w = 0, f (x,

(12a)

p˙ = 0.

(12b)

The first, Equation (12a), describes the coupled structural dynamics and fluid dynamics components of the vehicle model, both being affected by a process noise w through the noise distribution matrix F . The second, Equation (12b), is the parameter dynamics evolution equation. For problems with time varying parameters, one may add a process noise term to the right hand side which is responsible for exciting the temporal variations of the parameter vector. Given these dynamic equations, the augmented state vector is defined as xa = (xT , pT )T and stacks together the vehicle state vector together with the model parameters. Finally, Equations (11b) and (11c) define model outputs y and measurements z, respectively (see Section 2). The state estimation problem (11) can be solved with a number of different filtering techniques. The Kalman filter is an optimal estimator for unconstrained linear systems with normally distributed process and measurement noise. However, the problem of parameter estimation is typically of a non-linear nature, since model parameters often appear non-linearly in first-principle vehicle models. Among the different possible choices of non-linear filtering techniques, we mention here the extended Kalman filter, the unscented Kalman filter, the sigma point and the particle filters [35]. Reference [17] compares the performance of several of these approaches in the context of parameter estimation problems for flight mechanics. In this work, we use the extended Kalman filter (EKF), which amounts to an approximate generalization of the Kalman filter to non-linear systems obtained by linearizing the dynamics at each time step. This filter has found wide applicability to several state estimation problems for its simplicity and demonstrated effectiveness in many practical cases. Theoretical results on the stability and convergence of this approach are discussed in Reference [33]. The formulation of the EKF is reviewed in Appendix A. The implementation of this method developed in the present work performs the required linearizations by using perturbations with centered differences. Given the recursive nature of the approach, the implementation of the EKF to problem (11) leads to a time stepping procedure which processes one measurement sample at a time and leads to a time sequence of model parameter estimates. In fact, given control inputs δ, obtained for example by smooth interpolation of the recorded values δ(tk ), the augmented equations of motion are integrated on each sampling interval [tk−1 , tk ] to yield an augmented state prediction ˆ− ˆk− . Notice that the integration time step used for marching x a,k and the corresponding outputs y the model equations forward in time on each sampling interval may be smaller than the sampling step tk − tk−1 , because of accuracy or stability requirements during the numerical integration of the model equations. For example, this might be crucial in the case of a vehicle model M with fast dynamic components which need small time steps to be resolved, as in the case of vehicle models with flap blade or gimbal rotor states. Next, at instant the augmented ¡ each sampling ¢ state predictions are updated based on the innovations zk − yˆk− as ¡ ¢ ˆ+ ˆ− ˆk− , x (13) a,k = x a,k + Ka,k zk − y where Ka,k is a time-varying gain matrix, which is propagated forward in time together with state estimates based on the covariances of the estimation error, and of the process and measurement noise.

4 A Recursive Approach: Direct Adaptive Kalman Filtering

4.1

10

Filter Design

The filter design developed for this work is based on multi-time scale arguments. The basic observation is that complex rotorcraft vehicle models include both slow flight mechanics scales and faster aero-elastic ones, although measures are typically available only for the slow solution components describing the gross vehicle motion. As a result, all state variables whose dynamics are characterized by frequencies above the flight mechanics ones cannot be reconstructed from the available data. Hence, these states, being unobservable, are of no interest for the problem at hand. We make use of this fact and reconstruct the sole states associated with the slow scales, for which an accurate estimation is possible. This is conceptually equivalent to reducing the system to its reachable and observable parts, although a key feature of the proposed approach is that no reduced-order model of the system is required [37]. We call the resulting estimation algorithm selective Kalman filter. Let us consider the following partitioning of the augmented state vector: ¡ ¢T xa = xTS , xTF ,

(14)

where xS and xF are the states associated with slow and fast scales, respectively. With this partitioning of the state vector, the linearized output equations write δy = Ha δxa ,

(15)

where Ha = [HS

HF ] .

(16)

As previously noticed, in the present application the outputs y are related to the slow scale solution components (cfr. Equation (7)). The proposed approach is based on neglecting the effects of the fast scales on the slow outputs, which, with the current notation, implies setting HF ≡ 0.

(17)

This is reasonable in most flight mechanics applications of interest here, where the fast scales are related to rotor degrees of freedom, including rigid and flexible states, and aerodynamic states, which can be considered as decoupled from the slow gross rigid body motion of the vehicle. A possible exception to this situation is represented by the regressive lag mode (frequency 1−ωL /Ω) of a hingeless rotor/proprotor, which for certain rotor speeds might reach frequencies well below 1 Hz. If the mode is well damped, it does not however pose any difficulty to the application of the proposed procedure. Given the partitioning of the augmented state vector, the covariance matrix of the estimation uncertainty, which is computed as Pa = E[ˆ ea eˆTa ], (18) ˆ a − xa being the reconstruction error, can be partitioned as eˆa = x · ¸ PSS PSF Pa = . PFS PFF

(19)

We further assume that the error on fast scales is uncorrelated to the one on slow scales, i.e. PSF = PFS ≡ 0,

(20)

4 A Recursive Approach: Direct Adaptive Kalman Filtering

11

which is coherent with hypothesis (17). Under these assumptions, the Kalman gain matrix, ¡ ¢−1 Ka = Pa HaT Ha Pa HaT + R , has the following form:

· Ka =

where

KS 0

(21)

¸ ,

¡ ¢−1 . KS = PSS HST HS PSS HST + R

(22) (23)

This way, the filter effectively ignores the fast scale variables. In fact, only slow scale states (e.g. xfm , p) are updated by slow scale innovations, while the fast scale states remain unaffected. This behavior is due to the two hypotheses expressed above by Equations (17,20), without which fast scale innovations would affect slow state estimates. It was verified experimentally that, in the present application, this has the effect of corrupting the estimates to the point of leading to the divergence of the filter, since such fast scale innovations do not carry enough information content on the slow scale solution components.

4.2 4.2.1

Implementation Issues Adaptive Filtering

The implementation of the Kalman filter requires knowledge of the process and measurement noise covariances. Proper choices of these matrices is crucial for good filter performance. In fact, the use of poor statistics can lead to large estimation errors or even to the divergence of the estimates. To alleviate the need for careful tuning of these parameters, which is sometimes problematic, one can use an adaptive filtering method [27]. The approach used in this work is sketched in Appendix B, and it is based on Reference [28]. The basic idea is to estimate the unknown time-varying noise statistics simultaneously with the system state using a buffer of past data. 4.2.2

Variable Scaling

Large ranges in the values of the entries of the state variables, outputs and measurements might lead to the ill-conditioned of the Kalman filtering problem [15]. This can be cured by a proper scaling of all variables. Let Wxa and Wy be two weight matrices, ³ ´ Wxa = diag 1/xa ref 1 , . . . , 1/xa ref i , . . . , 1/xa ref nxa , (24a) ³ ´ Wy = diag 1/yref 1 , . . . , 1/yref i , . . . , 1/yref ny , (24b) where (·)ref is a reference value for the given variable, chosen so that the corresponding scaled variable is nearly of order O(1). Then, we can compute non-dimensional states, outputs, and measurements as x0a = Wxa xa ,

(25a)

0

(25b)

0

(25c)

y = Wy y, z = Wy z.

5 Batch Approaches: The Output Error and Filter Error Methods

12

Accordingly, the non-dimensional augmented system Jacobian matrices are computed as follows: A0a = Wxa Aa Wx−1 , a

(26a)

Ha0

(26b)

=

Wy Ha Wx−1 . a

Besides improving the problem conditioning, the use of non-dimensional variables has also the effect of easing the specification of the initial values of the covariance of the estimation uncertainty and process and measurement noise. 4.2.3

Enforcement of Constraints

The enforcement of constraints on the estimated augmented states during filtering was recently described in Reference [10, 36] and references therein. This may be important to ensure that the estimated values of the parameters remain within physically meaningful limits. In the case of simple bounds on the parameters, a simpler although heuristic approach is to use clipping: if the current update of a parameter exceeds the allowed bounds, it is reset to the bound value, otherwise the update is accepted. This however may slow down convergence. The present implementation uses clipping to approximately incorporate the effects of bounds on the model parameters.

5

Batch Approaches: The Output Error and Filter Error Methods

In batch methods, all measures are used simultaneously (as opposed to the recursive approach described above) so as to estimate the model parameters. The formulation of such methods therefore leads to an optimization problem defined over the whole duration of the data gathering experiment. There are two main methods in such category: the output error (OEM) and the filter error (FEM) methods, which are described next. We begin with the OEM, which is slightly simpler but also typically more robust. Since the two methods share between themselves most features, the description of the OEM gives the opportunity to describe some novel features of the implementation that we have developed in this research to increase the robustness and efficiency of the algorithms, specifically regarding a novel hybrid shooting designed for dealing effectively with rotorcraft vehicle models with fast solution components.

5.1

The Output Error Method

In the OEM, model parameters are adjusted iteratively to minimize the error between measurements and model predicted responses, under the assumption that the system is corrupted by measurement noise only. This leads to a nonlinear optimization problem, which can be written as min J id , p

s.t.: f (x, ˙ x, δ, p) = 0, ∀t ∈ [tk−1 , tk ], ¡ ¢ y(tk ) = h x(tk ) , g(p) ≤ 0,

(27a) (27b) (27c) (27d)

where J id is a cost function which measures in a statistical sense the match between model outputs y and measured quantities z. Depending on the definition of J id , we have the following methods:

5 Batch Approaches: The Output Error and Filter Error Methods

13

• Maximum Likelihood: J id = det(R),

(28)

where R is the maximum likelihood estimate of the measurement noise covariance matrix, R=

N ¢¡ ¢T 1 X¡ z(tk ) − y(tk ) z(tk ) − y(tk ) . N

(29)

k=1

The method seeks to maximize the probability density of observed variables given the model parameters. This can be readily transformed into the equivalent but simpler to handle problem of minimizing the logarithm of the density function [17] and leads to the definition of the optimization cost function in Equation (28). • Weighted Least Squares: J id =

N ¢ ¡ ¢T 1 X¡ z(tk ) − y(tk ) W z(tk ) − y(tk ) , 2

(30)

k=1

where W is a weight matrix. This method can be seen as a particular case of the Maximum Likelihood method when the measurement noise covariance matrix R is known [17]. In this case, W = R−1 . In practice, the method can be used as follows. At first, one guesses a value of the weights; once a solution has been obtained based on this choice of W , matrix R is computed using Equation (29). Next, the weighting matrix is initialized to the inverse of R, and another solution is computed. The iterations are continued until convergence. This way one recovers the maximum likelihood solution by solving a succession of weighted least squares problems. The optimization problem (27) is subjected to a number of constraints. The first set of constraints is represented by the model equations (27b). Given the control inputs δ, obtained by smooth interpolation (for example using cubic splines) of the values δ(tk ) recorded during the flight test, and the current estimates of the parameters p, these equations can be integrated on each sampling interval [tk−1 , tk ] to yield the state predictions x(tk ); Equations (27c) define the corresponding outputs. Finally, inequality (27d) enforces possible constraints on the model parameters. Such constraints ensure that the estimated parameters lie within acceptable bounds and do not take at convergence values which are non-physical. As for the filtering approach described previously, it is convenient for better conditioning and robustness to reformulate the problem in terms of scaled non-dimensional quantities, which can be done by using diagonal weighting matrices as in Equations (25). Problem (27) is a constrained non-linear optimization problem, whose unknowns are the free parameters p, together with the states x, and the outputs y (or their scaled counterparts). One simple way to solve this problem is to eliminate x (and in turn y) by shooting. In other words, we use the fact that, given a set of initial conditions, it is possible to integrate Equations (27b) on each sampling step, which in turn enables one to compute the corresponding outputs. Since there are no terminal or internal constraints on these quantities (as opposed to, for example, optimal control problems), the integration of these equations has the effect of completely eliminating them from the problem, which therefore becomes a standard non-linear programming problem (NLP) in the sole discrete unknown parameters p and the states at the gluing interfaces. The resulting NLP problem can be efficiently solved using the sequential quadratic programming

5 Batch Approaches: The Output Error and Filter Error Methods

14

(SQP) method, with Jacobians computed through centered finite differencing by perturbation of the unknowns [3]. Such methods are designed to deal effectively with equality and inequality constraints, so that there is no difficulty in handling parameter constraints (Equation (27d)). We remark that the ability to include such constraints in a straightforward manner and at no additional complexity is an important highlight of the present approach, since this helps to guarantee that the solution for the unknown parameters stays within admissible limits. We further remark the fact that such an optimization based approach to parameter estimation is formally extremely similar to the problem of trajectory optimization, an optimal control approach to the solution of maneuvering problems which finds applicability in rotorcraft flight mechanics, including the estimation of the H-V diagram, the simulation of various emergency conditions, the assessment of handling qualities, etc. [7, 9, 8]. In fact, in a parameter estimation problem the inputs are known, while parameters should be computed so as to best match given measures; on the other hand, in trajectory optimization problems the model parameters are assumed to be known, while the control inputs should be computed so as to minimize or maximize an index of performance. In both cases, one is lead to the solution of a constrained optimization problem. We have exploited this fact for developing a general purpose software program named STOP (System Identification and Trajectory Optimization Program). The code is capable of solving both classes of problems using a suite of numerical methods and algorithms that cover a broad range of vehicle models of varying complexity; the code has an internal vehicle model and is also coupled with several external rotorcraft simulators, including the commercial code FLIGHTLAB [1] and the Agusta-Westland programs Europa and Nfpath (the interfacing with the latter being currently under development). In STOP, the optimization problem (parameter estimation or trajectory optimization) is transformed into a NLP problem by discretization in the temporal domain; this can be done either by transcription or by shooting [7, 9, 5]. The former method is based on the idea of discretizing the model equations of motion on a temporal grid made of a suitably large number of consecutive time steps, typically using an implicit time integration method. This way, unknown time-varying quantities (states for parameter estimation, states and inputs for trajectory optimization) are approximated in terms of discrete values on the grid. Cost function and constraints are expressed in terms of such discrete values, while the discrete equations of motion are treated as additional constraints of the optimization problem. The direct method generates a possibly large but highly sparse NLP problem. Such method is usually quite efficient and robust; on the other hand, for models with fast solution components, the temporal grid is necessarily dense, which implies a potentially very large size of the problem. To treat more effectively problems with fast dynamic components, the STOP program implements a shooting approach. When using shooting, the equations of motion are integrated over the temporal domain, but the resulting discrete values are not treated as unknowns in the optimization problem. This can make the procedure unstable, since forward time marching has the potential of dramatically amplifying any small perturbation in the solution; notice that this does not happen with the transcription approach, which is in fact extremely robust even when analyzing unstable systems, as helicopters. On the other hand, one can now take even very small time steps to resolve the fast dynamic components of the solution, without affecting the size of the NLP problem. This approach is briefly described next.

5 Batch Approaches: The Output Error and Filter Error Methods

5.2

15

The Multiple Shooting Method

Multiple shooting is often advocated as a better, although somewhat empirical, solution than single shooting, especially when dealing with unstable systems as in the present case [17]. In fact, in optimal control problems, multiple shooting is often the only way to avoid solution blow up caused by the dramatic amplification of small perturbations [5].

Fig. 5: Basic principle of the multiple shooting method. We consider a partition of the time domain I = [t0 , tN ] given by t0 = τ0 < τ1 < . . . < τM = tN with I m = [τm , τm+1 ], m = (0, M − 1), where each I m is a shooting segment (see Figure 5). The resulting NLP problem is defined as follows. First, the set of NLP variables are chosen as: p¯ = (xTm=(0,M ) , pT )T ,

(31)

where xTm=(0,M ) are the discrete values of the states at the interfaces between shooting segments. Next, the governing equations (27b) are marched in time within each shooting segment I m , starting from the initial conditions provided by the values of the states xm at the left boundary of the segment. The effect of the forward integration is to generate a discrete time history of states m m and corresponding outputs within I m , which we label, respectively, xm i and yi , i = (1, N ), where N m is the number of sampling time instants in that segment. Here again, the integration time step used for marching the model equations forward in time on each sampling interval [tk−1 , tk ] may be smaller than the sampling step tk −tk−1 , to account for fast dynamic components ¯ m+1 = xm in the model. The last value of the states sequence is named x N m , and represents the prediction of the state variables at the right boundary of the shooting segment. Segments are then glued together by imposing the following equality constraints ¯ m = 0, xm − x

m = (2, M ).

(32)

The cost J id of Equation (27a) is evaluated using the segment time histories yim . Next, the gluing conditions (32) are used to express the set of equality constraints generated by the discretization of the equations of motion (27b).

5.3

The Single-Multiple Shooting Approach

Level 2 fidelity models [29] are seldom used in the solution of optimization problems because it is often hard to provide the required accuracy within a reasonable computation time, while avoiding numerical instabilities due to the complex nonlinear rotor model [22]. The reason for this is twofold: on one hand, one needs to use a small integration time step length to correctly resolve the high frequency components of the solution within a given accuracy.

5 Batch Approaches: The Output Error and Filter Error Methods

16

For rotorcraft models of the form (3), this implies a computational cost associated with the timemarching of the vehicle equations of motion (which represents the main contribution to the total cost of one iteration of the solution process), since, at every time step, a Newton-like method should be used to correctly evaluate the mutually influencing dynamics of the model. To obtain the total cost of one evaluation of the gluing constraints (32), this time must be multiplied by the number of perturbations of the unknown states needed for the evaluation of the Jacobian matrix of the constraints. Clearly, as the number of model states increases, the computational cost grows accordingly. On the other hand, one has to guarantee the continuity of the rotor states by imposing the proper gluing constraints. We have observed that the satisfaction of such constraints can be particularly difficult and usually ends up dominating the problem. This is not surprising, since the rotor generates most of the aerodynamic forces acting on the vehicle and even small variations in its states may imply large variations in the resulting forces, which hinders the satisfaction of the gluing constraints. We have found that these problems can be alleviated by using multi-time scale arguments [8]. In fact, the rotor states (both structural and aerodynamic) are significantly faster than the flight mechanics ones. Thus, since the multiple shooting treatment of these fast states is the main cause of the two aforementioned issues, i.e. raise in computational cost and difficulty in satisfying gluing constraints, one can think of treating slow and fast scales using different methods. More specifically, STOP uses a multiple shooting approach for the slow states. This is crucial, since with single shooting small changes early in the trajectory can produce dramatic effects at the end of it [2]; clearly, the problem is exacerbated when analyzing unstable systems, which is often the case when considering rotorcraft vehicles. Hence, the multiple shooting treatment of slow scales avoids the blow up of the solution. On the contrary, the code treats the fast scales using a single shooting approach, as depicted in Figure 6. This does not compromise the robustness of the procedure, since fast scales will not diverge if slow ones do not; hence, the stabilizing effect produced by the multiple shooting treatment of slow scales is felt also at the level of the fast ones.

Fig. 6: Hybrid single-multiple shooting approach. With such a hybrid single-multiple shooting approach, the size of the resulting NLP problem is substantially reduced and so is the total computational cost. Furthermore, there are no gluing constraints to be enforced for the fast rotor states, since only the slow states need to be glued together at the shooting interfaces. This has the effect of greatly increasing the robustness of the

5 Batch Approaches: The Output Error and Filter Error Methods

17

procedure, and the convergence speed. The detailed mathematical formulation of the single-multiple shooting method is given in Reference [8].

5.4

The Filter Error Method

As for the OEM (maximum likelihood) case, the FEM estimates the most likely vector p for the postulated model by maximizing the probability that the outputs y correspond to the measured outputs z as a function of the unknown parameters [17]. However, in this case one considers also the presence of the process noise, which can model effects such as the ones caused by turbulence in the air during data gathering. The presence of this additional term in the equations of motion is sometimes also interpreted as a description of the unmodelled or unresolved physics in the mathematical model of the vehicle with respect to the actual plant. Although this appears to be at present the only way to deal with model defects, it is clear that this corrective term is of a statistical sense, while an actual model defect will in general be of a deterministic nature, so that this interpretation remains quite unsatisfactory at best. The FEM can be formulated in terms of the following optimization problem: min J id = det(R),

(33a)

Θ

s.t.: f (x, ˙ x, δ, p) = 0,

∀t ∈ [tk , tk+1 ],

(33b)

ˆk , x(tk ) = x ¡ ¢ y(tk ) = h x(tk ) ,

(33d)

ˆ k+1 x

(33e)

¡ ¢ = x(tk+1 ) + K z(tk+1 ) − y(tk+1 ) ,

(33c)

K = K(f,x , h,x , R),

(33f)

Kf,x < I,

(33g)

g(p) ≤ 0.

(33h)

The unknowns Θ of the optimization problem are the model parameters p, and the components of the process noise distribution matrix F , i.e. Θ = (pT , . . . , Fij )T (combined natural cum innovation formulation [26]). The optimization problem is subjected to a number of constraints. In fact, Equations (33b) are the model equations, and (33c) their associated initial conditions at each measurement sampling instant tk , k = 1, 2, . . . , N . Given the recorded control inputs δ and the current estimates of the parameters p, these equations are integrated on each sampling interval [tk , tk+1 ] to yield the state predictions x(tk+1 ); Equations (33d) define the corresponding outputs. At each sampling instant, the predictions obtained by integrating the state equations (33b) ˆ k+1 , which are improved using a filtering approach. Equations (33e) define the updated values x become the initial conditions for the next sampling interval. Matrix K is a steady-state gain which can be computed according to the optimal Kalman approach [17] as a function of the gradients of f and h with respect to the states, and of R, by solving a steady-state Riccati equation for the covariance of the prediction error; in the interest of simplicity these details are not reported here, and we simply expressed the functional dependence of K synthetically by Equation (33f). The state update (33e) is obtained by multiplying the optimal gain matrix with the innovations z(tk+1 ) − y(tk+1 ), i.e. the residuals between measurements and outputs predicted by integrating the state equations. Here again, exactly as in the case of the recursive approach described in the previous pages, the innovations should be used only for updating estimates of the slow solution

6 Numerical Applications

18

scales, since such innovations typically do not carry enough information content so as to be capable of improving the estimates of the fast scales. Hence, even here we use the selective filtering approach proposed earlier in this document. The role of the filter is to stabilize the integration around the measurements z. In fact the filter, providing a feedback proportional to the residual, improves the initial conditions for each integration arc of the state equations, which in turn has a positive stabilizing effect on the overall identification algorithm. Hence the filter, although bears no resemblance to the actual FCS, effectively acts as a surrogate of it. As noted previously, stabilization may be important in the case of direct closed-loop identification of unstable vehicles, to account for the fact that the FCS command computed to stabilize the plant might not be a stabilizing input for the model at the current estimate of the parameters. To complete the description of problem (33), inequality (33g) enforces the compatibility between the estimates of the covariance of the residuals R and the Kalman gain K [17]. Finally, inequality (33h) enforces possible constraints on the model parameters. Such constraints ensure that the identified parameters lie within acceptable bounds and do not take at convergence values which are non-physical. Problem (33) is a constrained non-linear optimization problem, whose unknowns are the free e. This problem parameters Θ, together with the states x, the outputs y, and the filtered states x can be solved, exactly as in the OEM case, using either transcription or shooting (single, multiple, or the hybrid single-multiple methods). The FEM has been implemented in the code STOP, and is available as an alternative to the OEM. Clearly, both methods share all underlying numerical algorithms, including transcription and shooting, NLP solver, time marching, interfacing towards external vehicle models, scaling, etc.

6

Numerical Applications

In this section, we present some preliminary applications of the proposed procedures to both manned and unmanned rotorcraft vehicles. The examples reviewed here are indicative of the test that we are conducting for validating the implementation of the formulations, and for assessing their respective strengths and weaknesses.

6.1

Parameter Estimation of a Small Autonomous Vehicle using Simulation Data

As a first example, we consider the problem of parameter estimation for a small-size unmanned rotorcraft vehicle; full details on this problem are given in Reference [25]. Model equations are derived from first principles based on the three-dimensional rigid body equations of motion. Rotor forces and moments are computed analytically by combining actuator disk and blade element theory, considering a uniform inflow (see Reference [32]). The rotor attitude is evaluated by means of quasi-steady flapping dynamics with a linear aerodynamic damping correction. Look-up tables are used for the quasi-steady aerodynamic coefficients, and simple corrections for compressibility effects and for the downwash angle at the tail due to the main rotor are included in the model. As most commercially available models, the helicopter uses a Bell-Hiller stabilizing bar (flybar) to augment its stability characteristics around the pitch and roll axes. The motion of the fly-bar influences the dynamic behavior of the vehicle by augmenting the cyclic command to the main rotor through a mechanical linkage and hence this effect must be taken into account [23]. The fly-bar acts as a secondary rotor whose blades, which consist of two simple paddles mounted at the tips of a steel rod, are attached to the main rotor shaft below the main rotor

6 Numerical Applications

19

through an unrestrained teetering hinge. The paddles receive only cyclic inputs from the swashplate and no collective input, since the fly-bar is not designed to produce thrust. The paddle motion is described by two ordinary differential equations which model its lateral and longitudinal flapping motion (no coning) coupled with the helicopter pitch and roll motion. We perform a virtual experiment considering the vehicle trimmed in forward flight at a very low advance ratio, µ = 0.04. Simulated flight experiments are essential to test the designed maneuvers in a completely safe manner, without any risk for the helicopter. Moreover, performing such tests allows one to determine best practices for achieving reliable parameter estimates before conducting the real flight tests, thus reducing their number and cost. The aim of this test is the assessment of the effective identifiability of the key rotor aerodynamic parameters, namely the rotor(s) blade lift curve slope CLα and mean drag coefficient C¯D , i.e. ¡ ¢T p = CLα MR , CLα TR , C¯DMR , C¯DTR , (34) where the subscripts MR and TR denote main an tail rotor quantities, respectively. Data used for estimation is generated by integrating the equations of motion of the vehicle under the action of a LQR regulator. We start from the controls set to the trim value and sequentially perturb one of them at a time, while holding the others constant in time, as follows: main rotor longitudinal cyclic, main rotor lateral cyclic, main rotor collective, and tail rotor collective. We use a series of input steps, the so called 1-1-2-3 sequence [17], with a time step length of 0.6 s, which allows for the adequate excitation of the vehicle natural frequencies (0.31 ÷ 4.4 rad/s). Such input signal first excites the higher frequencies at the initial trimmed condition before the larger duration time steps are applied, thus preventing the helicopter from drifting away in an excessive manner from the trimmed condition. The generated output signals are corrupted by adding a white noise. The output vector y is defined as: ³ ´ T T T y = φ, θ, v B , ω B ,

(35)

where φ and θ are, respectively, the roll and pitch attitude, v B = (u, v, w)T is the vehicle linear velocity in a body-attached frame, and ω B = (p, q, r)T is the vehicle angular velocity. Figures 7–9 present results for the angular velocity components for both least-squares (LS) and maximum likelihood (ML) methods. The time histories show a good agreement between the simulated flight data and the computed response for converged parameter estimates.

6.2

Parameter Estimation of a Tilt-Rotor

In this second example, we consider a Level 2 fidelity model [29] of a tilt-rotor implemented in the general purpose rotorcraft flight simulator FLIGHTLAB [1]. In modern comprehensive models, much of the physics is based on first-principle modeling (e.g. geometrically exact non-linear beam models, dynamic wake models, etc.) and/or experimental data (e.g. lifting lines using experimental airfoil data). This raises the issue of the choice of the to-be-estimated model parameters. There is evidence in the literature that the correct prediction of the aerodynamics associated with real flow features, such as interference effects, is an important contributing factor to the overall fidelity of rotorcraft flight dynamic simulations (see, e.g., Reference [30]). In this work, model parameters are considered to be the coefficients of a rotor-fuselage, rotoraerodynamic surface empirical interference model. Such empirical corrective models represent

6 Numerical Applications

20

Fig. 7: Roll rate. Left: LS; right: ML. Solid line: simulated flight data. Dash-dotted line: computed response for converged parameter estimates. whatever aerodynamic loads are acting on the vehicle which are not fully captured or adequately resolved by the implemented analytical models. 6.2.1

An empirical Rotor-Fuselage, Rotor-Aerodynamic Surface Interference Model

Airloads produced by aerodynamic surfaces are computed using the lifting line theory with experimental airfoil data tables. Lift, drag, and pitch moment coefficients are obtained using a 2-D linear interpolation as a function of angle of attack, α, and control surface deflection δ. Similarly, look-up tables are used to compute the aerodynamic forces and moment coefficients of the fuselage as a function of angle of attack, α, and angle of sideslip, β. Consider a generic aerodynamic coefficient C whose values are given in tabular form as a function of two variables, i.e. C = Ctable (x1 , x2 ), where x1 = α, x2 = δ, β. The rotor interference is modeled using corrective factors K to modify the table entries as: Ctable = Ctable + Kx1 Ctable (x1 , 0) + Kx2 Ctable (0, x2 ) + K0 .

(36)

Force and moment coefficients are then computed by interpolation of the modified data. 6.2.2

Results

We present results for a longitudinal stick doublet maneuver for the vehicle in airplane mode (see Figure 10). With reference to the interference model of Equation (36), estimation is performed for the corrective factors Kα of the horizontal tail lift coefficient and K0 for the wing lift coefficient, i.e. p = (Kα H−Tail , K0 Wing )T . (37) We apply both the EKF and the OEM method to the solution of the estimation problem. For the design of the EKF, we consider only the states pertaining to the longitudinal motion of the vehicle, i.e. xS = (θ, u, w, q)T , (38) where θ is the pitch attitude, u, v are the linear velocity components along the x- and z-axis in a body-attached frame, and q is the pitch rate. The OEM is run using the merit function J id

7 Conclusions and Future Work

21

Fig. 8: Pitch rate. Left: LS; right: ML. Solid line: simulated flight data. Dash-dotted line: computed response for converged parameter estimates. of Equation (30) with a diagonal weight matrix W , whose entries are chosen so that during the optimization process non-dimensional variables of order O(1) are used, i.e. W = diag(Wi ),

i = 1, . . . , ny ,

(39)

where Wi−1 = maxk {|zi (tk )|}, and | · | is the absolute value operator. For both methods, we define the output vector y as: y = (θ, u, w, q, ax , az , q) ˙ T, (40) where ax , az are the linear accelerations along the x- and z-axis in a body-attached frame, and q˙ is the pitch acceleration. Figure 11 and 12 compare, respectively, the plant and the model-predicted pitch rate and acceleration time histories using the interference model with the estimated parameters (solid line) and prior to estimation (dash-dotted line). Both methods yield parameter estimates which improve the matching between system and model-predicted responses.

7

Conclusions and Future Work

In this document we have formulated two alternative classes of methods for the time domain parameter estimation of non-linear rotorcraft models from flight test data, namely the batch optimization and adaptive recursive filtering methods. The batch OEM and FEM algorithms have been implemented in the general purpose software program STOP, which is a unified platform for optimization problems in rotorcraft flight mechanics capable of also supporting trajectory optimization problems. The parameter estimation methods considered in this research effort have notable differences but many common features. Batch methods are one-shot approaches that process all available data simultaneously to arrive at an estimate of the parameters. They are typically associated with a higher computational cost and are very strongly non-linear problems which may experience difficult convergence; however when they converge they typically provide rather reliable estimates. Recursive methods, on the other hand, process one sample data point at a time, and hence sweep rather swiftly through the data sets, to the point of often being applicable to real-time

7 Conclusions and Future Work

22

Fig. 9: Yaw rate. Left: LS; right: ML. Solid line: simulated flight data. Dash-dotted line: computed response for converged parameter estimates.

Fig. 10: Longitudinal stick command input estimation problems for systems with time-varying parameters. The unknown parameters are however transformed into dynamic variables, and the relaxation towards steady state values is not always easy to achieve. In the formulation of the two approaches, we have paid particular attention at ensuring common crucial features to both, which in fact: • Use data gathered in closed-loop, which is crucial for the analysis of unstable vehicles as helicopters and tilt-rotors, at least in certain flight conditions. • Require no knowledge of the FCS, which might not be available altogether or which might affect the quality of the results when only partial knowledge is available or when modeling approximations are made (for example, neglecting saturation, free-play or other sources of non-linearities in the regulator). • Are statistically based, and can deal with both process (e.g. in the case of flight testing in

7 Conclusions and Future Work

23

Fig. 11: System and model predicted pitch rate time history for a longitudinal stick doublet maneuver for a tilt-rotor in airplane mode: with interference model (solid line), without interference model (dash-dotted line). Left: EKF; right: OEM. turbulent air) and unavoidable measurement noise. • Can deal with unmeasurable model states, which is for example the case whenever the model includes aerodynamic states. • Can be used in conjunction with first-principle flight mechanics models of the vehicle, including solution components characterized by fast time scales. • Minimize potential problems due to fact that the FCS command was generated in flight to stabilize the plant, and hence might not be a stabilizing command for the model, using filtering to keep the model integration in close proximity of the datum. • Provide estimates of all necessary statistics as part of the solution, without relying on prior knowledge of the noise, since this is typically unavailable or difficult to obtain and may require extensive manual tuning. Given their common features and differences, we speculate that the two classes of methods can be profitably used in a synergistic way. Since the recursive approach is fast, it can be used for creating at low computational cost reasonable values of the model parameters. Next, these values can be used as initial guesses for the more computationally demanding batch approach. The work program for our future activities in parameter estimation of rotorcraft vehicles calls for: • Further validation and extensive testing of the procedures with the help of representative rotorcraft parameter estimation problems. With regard to this aspect, we will begin shortly a complete parameter estimation campaign using small hobby helicopters, following the guidelines provided by the feasibility study described in Reference [25], while a dedicated campaign of flight tests with Agusta-Westland helicopters are scheduled to be conducted in 2010. • Comparison of the various methods on a suitable number of cases of practical interest, and emission of recommendations on their use and on their applicability to parameter

A The Extended Kalman Filter for Joint State and Parameter Estimation

24

Fig. 12: System and model predicted pitch acceleration time history for a longitudinal stick doublet maneuver for a tilt-rotor in airplane mode: with interference model (solid line), without interference model (dash-dotted line). Left: EKF; right: OEM. estimation problems in rotorcraft flight mechanics, including the assessment of the effective identifiability of the model parameters in all typical flight test cases of interest, with the determination of the best practices for achieving reliable estimates. • Leveraging on the fact that STOP code implements both trajectory optimization and parameter estimation solution procedures, we intend to work on the definition of optimal maneuvers for parameter estimation. The idea would be in this case to formulate trajectory optimization problems which maximize the identifiability of a given set of parameters, while operating within the flight envelope constraints of the vehicle. This might help in the definition of advanced flight testing procedures which go beyond the classical sequences of doublets and 3-2-1-1 (or 1-1-2-3) sequences.

Acknowledgements This research is funded by Agusta-Westland through a grant with the Politecnico di Milano, with Mr. Marco Cical`e serving as technical monitor. The authors gratefully acknowledge the contribution of Andrea Maffezzoli, Davide Muffo, Andrea Ragazzi and Nadir William in the preparation of the examples.

A

The Extended Kalman Filter for Joint State and Parameter Estimation

Consider the following state space model of a continuous-time nonlinear dynamic system with discrete output measurements: ¡ ¢ ˙ x(t) = f x(t), u(t), p + F w(t), (41a) ¡ ¢ y(t) = h x(t) , (41b) z(tk ) = y(tk ) + v(tk ),

k = 1, 2, . . . , N,

(41c)

A The Extended Kalman Filter for Joint State and Parameter Estimation

25

where x ∈ Rnx is the set of state variables, u ∈ Rnu are the input variables, p ∈ Rnp is the set of model parameters, y ∈ Rny is the set of output variables, z ∈ Rny are the measurements, and w ∈ Rnx and v ∈ Rny are stochastic variables representing process and measurement noise, respectively. They are assumed to be zero mean, Gaussian, uncorrelated, white noise sequences: E [w(t)] = 0, ¤ E w(t)wT (τ ) = Qδ(t − τ ), £

E [v(tk )] = 0, ¤ E v(tk )v T (ti ) = Rk δik , £ ¤ E w(tk )v T (ti ) = 0 for all i, k, £

(42a) (42b) (42c) (42d) (42e)

where E [·] is the expected value operator, δ(t−τ ) is the Dirac delta function, δik is the Kronecker delta function, δik = 1 for i = k, δik = 0 for i 6= k, and superscript “T ” denotes matrix transpose. Q and Rk are the process noise power spectral density (PSD) matrix and measurement noise covariance matrix, respectively. Finally, F is the process noise distribution matrix. Parameter estimation using Kalman filtering consists in transforming the parameter estimation problem into a state estimation one by artificially defining the unknown model parameters as additional state variables [24, 17]. This leads to a new augmented state space model. By considering a dynamics evolution equation for the model parameters of the form p˙ = 0,

(43)

and defining an augmented state vector xa as xa = (xT , pT )T ,

(44)

¡ ¢ x˙ a (t) = fa xa (t), u(t) + Fa wa (t), ¡ ¢ y(t) = ha xa (t) ,

(45a) (45b)

z(tk ) = y(tk ) + v(tk ),

(45c)

we can write the augmented model as

where ¡ ¢ ¸ f xa (t), u(t) , 0 · ¸ F 0 Fa = , 0 0 · ¸ w(t) wa (t) = . 0

¡ ¢ fa xa (t), u(t) =

·

(46a) (46b) (46c)

ˆ+ Given an estimate x a,0 of the state at time t = 0 and an initial guess of the estimation error + ˆ covariance matrix Pa,0 , ¸ · + Pˆx0 0 + ˆ , (47) Pa,0 = 0 Pˆp+0 the filtering algorithm proceeds for 1 ≤ k ≤ N as follows:

A The Extended Kalman Filter for Joint State and Parameter Estimation

26

ˆ+ 1. Linearize Equations (45a,45b) about the estimate x a,k−1 of the state at time t = tk−1 : δ x˙ a (t) = Aa δxa (t) + Fa wa (t), δy(t) = Ha δxa (t),

(48a) (48b)

where Aa and Ha are the augmented system Jacobian matrices, i.e. ∂fa,i + ˆ , uk−1 ), (x ∂xa,j a,k−1 ∂ha,i + ˆ (x , uk−1 ). = ∂xa,j a,k−1

Aa = [Aij ] = fa/xa =

(49a)

Ha = [Hij ] = ha/xa

(49b)

Here and in the following, we use the shorthand notation (·)k to denote a generic quantity computed at time t = tk . 2. Write Equation (48a) in an equivalent discrete-time form as ∗ δxa,k = Φk−1 δxa,k−1 + wa,k−1 ,

(50)

∗ wa,k−1 = Γa,k−1 wa,k−1 ,

(51)

with and £ ∗ ¤ = 0, E wa,k h i T ∗ ∗ E wa,k wa,k = Q∗a,k δik ,

(52b)

Q∗a,k = Γa,k Qa,k ΓTa,k .

(53)

(52a)

where In the above equations, Φk−1 is the state transition matrix, Φk−1 = eAa ∆t ≈ I + Aa ∆t + O(∆t2 ), Γa,k is the discrete-time process noise distribution matrix, · ¸ F ∆t 0 Γa,k ≈ , 0 0

(54)

(55)

where ∆t = tk − tk−1 is the sampling period, and Qa,k is the process noise covariance matrix, · ¸ Qk 0 Qa,k = . (56) 0 0 3. March Equation (45a) from t = tk−1 to t = tk using a suitable numerical scheme to obtain ˆ− a prediction x a,k of the state. We assume that the function Fa wa (t) has a constant value ∗ ] = 0, for all τ ∈ [t of zero over the integration interval, i.e. Fa wa (τ ) = E[wa,k k−1 , tk ]. − Next, compute a prediction Pˆa,k of the estimation error covariance matrix: − + Pˆa,k = Φk−1 Pˆa,k−1 ΦTk−1 + Q∗a,k−1 .

(57)

B Adaptive Filtering

27

4. Compute a prediction yˆk− of output variables: ˆ− yˆk− = ha (x a,k ).

(58)

³ ´−1 − − Ka,k = Pˆa,k HaT Ha Pˆa,k HaT + Rk .

(59)

5. Compute the Kalman gain matrix:

ˆ+ 6. Given measurements zk and output prediction yˆk− , compute the state estimate x a,k by − ˆ a,k as follows: correcting the state prediction x ˆ+ ˆ− x a,k = x a,k + Ka,k νk ,

(60)

where νk is the observation residual or innovation, νk = zk − yˆk− .

(61)

Next, update the prediction of the estimation error covariance matrix: + − T Pˆa,k = (I − Ka,k Ha ) Pˆa,k (I − Ka,k Ha )T + Ka,k Rk Ka,k .

(62)

7. Set k = k + 1 and go back to step 1.

B

Adaptive Filtering

In the adaptive filtering approach, the unknown time-varying noise statistics are estimated simultaneously with system state and error covariance using noise samples gathered on-line [28]. At the generic step k, using the last lr noise samples νj = zj − yˆj− ,

(63)

with j = k − lr + 1, . . . , k, the measurement noise covariance is updated as ˆk = R ˆ k−1 + R

1 ³ (νk − rˆk )2 − (νk−lr − rˆk )2 lr − 1

´ lr − 1 1 (Gk−lr − Gk ) , (64) + (νk − νk−lr )2 + lr lr

with rˆk = rˆk−1 + and where we used the notation

1 (νk − νk−lr ), lr

(65)

− Gk = Ha Pˆa,k HaT ,

(66)

(v − vˆ)2 = (v − vˆ) (v − vˆ)T ,

(67)

for a generic vector v. Similarly, defining the process noise sample qj∗ as ˆ+ ˆ+ qj∗ = x a,j − Φj−1 x a,j−1 ,

(68)

B Adaptive Filtering

28

the process noise covariance is updated based on the last lq samples qj∗ , j = k − lq + 1, . . . , k, as ˆ∗ = Q ˆ∗ Q a,k a,k−1 +

1 ³ ∗ ∗ (qk − qˆk )2 − (qk−l − qˆk )2 q lq − 1 ´ lq − 1 1 ∗ 2 + (qk∗ − qk−l ) + (D − D ) k−lq k , (69) q lq lq

where qˆk = qˆk−1 + and

1 ∗ ∗ (q − qk−l ), q lq k

+ + Dk = Φk−1 Pˆa,k−1 ΦTk−1 − Pˆa,k .

(70)

(71)

See Reference [28] for details.

References [1] Advanced Rotorcraft Technology Inc., 1685 Plymouth Street, Suite 250, Mountain View, CA 94043, USA, http://www.flightlab.com. [2] U.M. Ascher, R.M.M. Mattheij, and R.D. Russell. Numerical solution of boundary value problems for ordinary differential equations. Classics in Applied Mathematics, Philadelphia, 1995. [3] A. Barclay, P.E. Gill, and J.B. Rosen. SQP methods and their application to numerical optimal control. Report NA 97-3, Department of Mathematics, University of California, San Diego, 1997. [4] O.A. Bauchau, C.L. Bottasso, and Y.G. Nikishkov. Modeling rotorcraft dynamics with finite element multibody procedures. Mathematics and Computer Modeling, 33:1113–1137, 2001. [5] J.T. Betts. Practical Methods for Optimal Control Using Non-Linear Programming. SIAM, Philadelphia, 2006. [6] M.J. Bhagwat and J.G. Leishman. Stability, consistency and convergence of time marching free-vortex rotor wake algorithms. Journal of the American Helicopter Society, 46:59–71, 2001. [7] C.L. Bottasso. Solution procedures for maneuvering multibody dynamics problems for vehicle models of varying complexity. In C.L. Bottasso, editor, Multibody Dynamics — Computational Methods and Applications, Computational Methods in Applied Sciences. SpringerVerlag, Dordrecht, The Netherlands, 2008. ISBN 978-1-4020-8828-5. [8] C.L. Bottasso and G. Maisano. A new single-multiple shooting method for trajectory optimization of complex rotorcraft models. 2009. In preparation for submission. [9] C.L. Bottasso, G. Maisano, and F. Scorcelletti. Trajectory optimization procedures for rotorcraft vehicles, their software implementation and applicability to models of varying complexity. In Proceedings of AHS 64th Annual Forum and Technology Display, Montr´eal, Canada, April 29 – May 1 2008. Under review in Journal of the American Helicopter Society.

B Adaptive Filtering

29

[10] T.L. Chia, D. Simon, and H.J. Chizeck. Kalman filtering with statistical state constraints. Control and Intelligent Systems, 34:73–79, 2006. [11] A. Datta and W. Johnson. An assessment of the state-of-the-art in multidisciplinary aeromechanical analyses. In Proceedings of AHS Specialists’ Conference on Aeromechanics, San Francisco, USA, January 23–25 2008. [12] J.W. Fletcher. Identification of uh-60 stability derivative models in hover from flight test data. Journal of the American Helicopter Society, 40:32–46, 1995. [13] U. Forssell and L. Ljung. Closed-loop identification revisited. Automatica, 35:1215–1241, 1999. [14] M. Geradin and A. Cardona. Flexible Multibody Dynamics, a Finite Element Approach. John Wiley & Sons, New York, NY, 2000. [15] M.S. Grewal and A.P. Andrews. Kalman filtering: theory and practice using MATLAB. Wiley-interscience, New York, 2001. [16] J.A. Ham, C.K. Gardner, and M.B. Tischler. Flight testing and frequency domain analysis for rotorcraft handling qualities characteristics. In Proceedings of AHS Specialists’ Meeting on Piloting Vertical Flight Aircraft, San Francisco, CA, USA, January 20–23 1993. [17] R.V. Jategaonkar. Flight Vehicle System Identification. A Time Domain Approach. AIAA Progress in Astronautics Aeronautics, Reston, VA, 2006. [18] R.V. Jategaonkar, D. Fischenberg, and W. Gruenhagen. Aerodynamic modeling and system identification from flight data – Recent applications at DLR. Journal of Aircraft, 41:681–691, 2001. [19] W. Johnson. CAMRAD/JA: A comprehensive analytical model of rotorcraft aerodynamics and dynamics, Johnson Aeronautics version, Volume i: Theory manual. 1988. [20] W. Johnson. Helicopter theory. Dover, New York, 1994. [21] C.W. Acree Jr. and M.B. Tischler. Determining xv-15 aeroelastic modes from flight data with frequency-domain methods. NASA TP 3330, USAATCOM TR-93-A-004, 1993. [22] C.-J. Kim, S.K. Sung, S.H. Park, S.-N. Jung, and K. Yee. Selection of rotorcraft models for application to optimal control problems. Journal of Guidance, Control, and Dynamics, 31(5):1386–1399, 2008. [23] S.K. Kim and D.M. Tibury. Mathematical modeling and experimental identification of an unmanned helicopter robot with flybar dynamics. Journal of Robotic Systems, 21:95–116, 2004. [24] V. Klein and E.A. Morelli. Aircraft System Identification. Theory and Practice. AIAA Education Series, Reston, VA, 2006. [25] A. Maffezzoli. Procedures for the estimation of model parameters for a small rotorcraft uav. Master’s thesis, Politecnico di Milano, Dipartimento di Ingegneria Aerospaziale, 2009.

B Adaptive Filtering

30

[26] R.E. Maine and K.W. Iliff. Formulation and implementation of a practical algorithm for parameter estimation with process and measurement noise. SIAM Journal of Applied Mathematics, 41:558–579, 1981. [27] R.K. Mehra. Approaches to adaptive filtering. IEEE Transactions on Automatic Control, 17(5):693–698, 1972. [28] K.A. Myers and B.D. Tapley. Adaptive sequential estimation with unknown noise statistics. IEEE Transactions on Automatic Control, 21(4):520–523, 1976. [29] G.D. Padfield. Helicopter flight dynamics : the theory and application of flying qualities and simulation modelling. Blackwell, Oxford, UK, 2nd edition, 2007. [30] G.D. Padfield and R.W. Du Val. Applications areas for rotorcraft system identification simulation model validation. AGARD LS178, pages 12.1–12.39, 1991. [31] D.A. Peters and C.J. He. Finite state induced flow models. Part II: Three-dimensional rotor disk. Journal of Aircraft, 32:323–333, 1995. [32] R.W. Prouty. Helicopter performance, stability, and control. R. E. Krieger Publishing Co., Malabar, FL, 1990. [33] K. Reif and R. Unbehauen. The extended kalman filter as an exponential observer for nonlinear systems. IEEE Transactions on Signal Processing, 47:2324–2328, 1999. [34] M. Rutkowski, G.C. Ruzicka, R.A. Ormiston, H. Saberi, and Y. Jung. Comprehensive aeromechanics analysis of complex rotorcraft using 2GCHAS. Journal of the American Helicopter Society, 40:3–17, 1995. [35] D. Simon. Optimal State Estimation: Kalman, H-infinity, and Nonlinear Approaches. John Wiley & Sons, Inc., 2006. [36] D. Simon and D.L. Simon. Kalman filtering with inequality constraints for turbofan engine health estimation. IEE Proceedings - Control Theory and Applications, 153(3):371–378, 2006. [37] A.K. Singh and J. Hahn. State estimation for high-dimensional chemical processes. Computers and Chemical Engineering, 29(11–12):2326–2334, 2005. [38] M.B. Tischler and M.G. Cauffman. Frequency-response method for rotorcraft system identification: Flight applications to bo-105 coupled rotor/fuselage dynamics. Journal of the American Helicopter Society, 37:3–17, 1992. [39] M.B. Tischler and R.K. Remple. Aircraft and Rotorcraft System Identification: Engineering Methods with Flight Test Examples. AIAA Education Series, 2006.

Suggest Documents