Experimental Aircraft Parameter Estimation AA241X May 14 2014 Stanford University
Overview 1. System & Parameter Identification 2. Energy Performance Estimation Propulsion OFF Propulsion ON 3. Stability & Control Derivative Estimation Based on Trim & CG shifting Linear regressions from dynamic data 4. Measuring Moments of Inertia
System Identification Definition: determine a suitable model of a dynamical system, based on experimental input & output data Find a system S that can reproduce the observed input-output data u (t) S y (t) System ID: Given u and y, determine S (inverse problem) Controls: Given S and y, determine u (inverse problem) Simulation: Given S and u, determine y (direct problem)
System ID vs. Parameter ID System ID: find the structure of S Very hard problem Potentially infinite number of models that can produce the same inputoutput pairs, especially given noise in the data In practice, need to reduce the search to a given class of models Parameter ID: given the structure of S, find the values of certain coefficients Much more tractable Incorporate prior knowledge about the structure of the system that we know from first principles Many tools available System ID is just data fitting Lots of overlap with Linear Algebra, Digital Signal Processing and Machine Learning
Parameter ID System model can have linear or nonlinear dynamics, and can be linear or nonlinear w.r.t. unknown parameters θ If linear in parameters, there are lots of tools to solve efficiently Thus, usually its a linear combination of regressors is the vector of free coefficients in the model In a linear dynamic model, these could be elements of the A,B,C,D matrices Need to compare the quality of different models with a Figure of Merit, usually a sum of squared errors. For example: E (θ ) = [!y k y k (u 0 k,θ)] 2!x = θ x i f i (x,u) +ε y = θ ig y i (x,u) +η k!y is the measured output, and y is the predicted output, if we apply the measured inputs to our model
Parameter ID (II) Goal: find that minimizes error E: This is just an optimization problem, have lots of tools to do this! Should be easy If model is explicit, then we should be able to calculate: In practice, its an art as well as a science: θ θ ID = argmin We have to provide the model structure! Need to define E The data has to be good : The experiments have to be good Noise should be low May have local minima θ E θ, 2 E 2 θ,... E (θ ) Moreover, what we really want is to minimize E on new data What is the guarantee that minimizing E, will produce a good model?
Parameter ID (III) There are common issues in Parameter ID (beyond those of numerical optimization): 1. Experimental data might have little information Number of data points too few Collinearity of data points and regressors (a.k.a linearly dependent equations) Input-output space is not covered enough Need to cover all the state & control space Need to excite all modes Unmeasured/Unmodeled disturbances 2. Model complexity vs. noise fitting If model is very complex and we have few data points, it will have flexibility to contort and fit the measured data very well But this contortion can be too much, producing very bad predictions of new data. This is known as chasing the noise Ideally low order model that represents major effects, lots of measurements with low noise and excitation of all the modes
Parameter ID (IV) We can include prior information about the parameters by adding a regularization term to the objective function These could be from aerodynamic modeling, or prior parameter estimations θ ID = argmin θ E (θ ) + λ θ θ o 2 This way we say: find the values that best match the measurements, but we give you a hint of what these values should look like Can remove many of the ill-conditioned problems we mentioned before Need to define a weighting Lambda: expresses the relative confidence on the identification procedure and the prior estimates we had
Frequency Domain System ID Parameter estimation can also be done in the Frequency Domain Need to convert time-domain data into the frequency domain, using the Fourier Transform Can be: More robust Faster, due to reduced data points in converting to frequency More useful, since we can directly do control design with it
Performance Estimation The (energy) performance of an electric aircraft is characterized by: 1. Lifting aerodynamic efficiency 2. Motor efficiency 3. Propeller efficiency In trim flight: T = D + Lsin(γ) = D L L + sin(γ) = [ D L + sin(γ)]mg C L = mg 2 1 2 ρsv (δe )
Propulsion OFF When propulsion is off (glide): By gliding at different velocities (i.e. different elevator positions) and measuring the trim velocity and glide path angle, we can obtain the L/D vs. CL curve Need to do this in calm conditions, since wind is not measured If lightly damped, the phugoid motion will be superimposed, and measurements will not be as good: D L (C L ) = sin(γ) Having a phugoid damper can improve the estimates, and increase productivity of flight testing We need to average across several seconds
Propulsion ON The electric power consumption is given by P electric = V e A = [ D L V + h]! mg η prop η motor Having obtained the L/D curve from the glide tests, we can now fly with different throttle positions and speeds, and obtain the overall propulsive efficiency η prop η motor = [ D L V +! h] mg V e A Having an RPM sensor would allow for the characterization of the motor efficiency, and thus we could isolate the propeller efficiency: η prop = [ D L V + h]! mg V e Aη m (Ω, v, R, K v )
Propwash effects In practice, the airflow over the wing is not the same when propeller is on and off Thus, the L/D curve obtained during glides is not fully representative when the propeller is producing thrust Some effects of propwash: 1. Increased velocity within slipstream à Increase dynamic pressure, thus drag on wing, fuselage and tail 2. Swirl à Induced drag on wing and tail 3. If propeller is angled, might also change angle of attack
SD & CD Estimation from Trim Flight & CG Shifting We can also estimate Stability & Control Derivatives by flying at specific trim conditions In UAVs its possible to shift the CG around to create useful trim conditions Spanwise GC shift: lateral derivatives can be estimated by adding a small weight on the tip of the wing, and trimming it out with control surfaces h_y mg Moment balance at trim: C l = mgh y qsb = C l δa δa + C lβ β + C lδr δr C n = 0 = C nβ β + C nδr δr + C nδa δa
Lateral CG Shifting Test 1: deflect ailerons (and rudder if necessary) (1) mgh 1 y qsb = C l δa δa 1 + C lδr δr 1 0 = C nδr δr 1 + C n δa δa 1 Test 2: deflect rudder only, to induce sideslip (2) mgh 2 y qsb = C l β β 2 + C lδr δr 2 0 = C nβ β 2 + C nδr δr 2
Lateral CG Shifting If we do this for 2 different CG locations, we have 8 equations and 6 unkowns! Least squares solution Alternatively, we could use the rudder derivatives from a VLM, which are quite reliable given that it s a lifting surface with small wake interactions In this case, with one CG displacement we have 4 equations and 4 unknowns Need to choose displacement h carefully, based on VLM estimates of SD & CD To make it possible to trim! To require small deflections of control surfaces But not too small, to avoid stiction problems
Longitudinal CG Shifting Test 0: Measure base trim condition C L = C L0 = mg q 0 S Test 1: Add or remove weight at the CG C L = (m + Δm)g q 1 S = C L0 + C Lα Δα 1 + C Lδe δe 1 C m = 0 = C mα Δα 1 + C mδe δe 1 Test 2: Move CG forward or back C L = mg q 2 S = C L 0 + C Lα Δα 2 + C Lδe δe 2 C m = mgh x q 2 Sc = C m α Δα 2 + C mδe δe 2 Thus, 4 equations and 4 unkowns (m+delta_m) g h_x mg
Trim based Estimation We can add more trim conditions to improve the estimation accuracy It now becomes an over defined set of equations à least squares problem Can also include prior estimates, from VLM or back of the envelope calculations, by adding regularization terms to the least squares problems Further tests could include coordinated turns, to gather information about angular rate derivatives Unfortunately, all this should be done for different throttle settings, given the nonlinearities w.r.t. throttle
Linear Regressions from Dynamic Data Some SD & CD can be estimated, without the need of complex System ID Example: roll damping and aileron effectiveness In non-dimensional form, the roll equation is: Î xx!ˆp = Clp ˆp + C lδa δa + We can re-arrange this to:!ˆp = C l p Î xx ˆp + C l δa Î xx δa +
Linear Regressions from Dynamic Data(II) Using flight data for the Bixler 2* gathered at 50Hz, we can numerically differentiate the roll rate to obtain an estimate of roll acceleration 0.15 0.1 Equilibrium roll rate vs. aileron deflecion If we plot data points for which roll acceleration is almost zero we have:!ˆp 0 ˆp = C l δa C lp δa Non dimensional roll rate 0.05 0 0.05 0.1 0.15 C lδa 0.2 C lp 0.43 0.6 0.4 0.2 0 0.2 0.4 0.6 aileron deflection (fraction of full deflection) * Thanks to Adrien Perkins and Drone Identity for gathering the flight data!
Linear Regressions from Dynamic Data (III) Similarly we can isolate roll damping, by plotting data points for which the aileron deflection is near zero: δa 0!ˆp = C lp Î xx ˆp +ε C lp Î xx 1.23 Note how noisy the signals are due to win gusts, and other aerodynamic effects (dihedral, rudder, etc.) Non dimensional roll acceleration 0.08 0.06 0.04 0.02 0 0.02 0.04 0.06 0.08 Roll damping X: 0.0516436 Y: 0.0635985 0.15 0.1 0.05 0 0.05 0.1 0.15 Non dimensional roll rate
Linear Regressions from Dynamic Data(IV) Estimating Ixx at roughly 0.035kgm^2 Î xx = 0.27 C lp = 0.33 C lδa = 0.14 Using QuadAir to estimate these derivatives: C lp 0.37 C lδa 0.19
Linear Regressions from Dynamic Data(V) We can also see evidence of the first order dynamics between aileron and roll rate Could use estimations of rise time and decay rate to complement the previous estimation methods Lag between aileron defection and roll rate Roll rate Aileron 0 Roll rate (deg/s), aileron deflection (%) 50 100 150 763 763.5 764 764.5 765 Time (seconds)
Measuring Moments of Inertia The easiest way to measure the moment of inertia of a body is to use a trifilar pendulum I= Wr2 T 2 4π 2 L The period of oscillation T and moment of inertia I are related by: I b = (W b +W p )r 2 2 T b+p I 4π 2 p L W: weight of body R: distance from strings to the center L: length of strings
Measuring Moments of Inertia Procedure: 1. Measure constants r & L 2. Measure weight of platform W_p 3. Measure the torsional oscillation period T_p of the platform only, and calculate the moment of inertia of the platform I_p 4. Measure weight of body W_b 5. Place body on the platform with its CG in the center, and with the axis of interest parallel to the strings 6. Measure the torsional oscillation period T_b+p, and calculate the moment of inertia of the body by substracting that of the platform To reduce measurement error we need to: Reduce timing error à measure multiple consecutive oscillations Increase radial distance r Reduce I_p (as small as can hold the body) Increase L (as big as possible) Make sure CG is centered Make sure the strings are rigid