# An Accurate Method for Real-Time Aircraft Dynamics Simulation Based on Predictor-Corrector Scheme

Authors: Jiaxin Zhao; Hongwei Wang; Heming Zhang
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

Real-time aircraft dynamics simulation requires very high accuracy and stability in the numerical integration process. Nonetheless, traditional multistep numerical methods cannot effectively meet the new requirements. Therefore, a novel real-time multistep method based on Predict-Evaluate-Correct scheme of three-step fourth-order method (RTPEC-34) is proposed and developed in this research to address the gap. In addition to the development of a highly accurate algorithm based on predictor-corrector, the contribution of this work also includes the analysis of truncation error for real-time problems. Moreover, the parameters for the RTPEC-34 method are optimized using intelligent optimization algorithms. The application and comparison of the optimization algorithms also lead to general guidelines for their applications in the development of improved multistep methods. Last but not least, theoretical analysis is also conducted on the stability of the proposed RTPEC-34 method, which is corroborated in simulation experiments and thus provides general guidelines for the evaluation of real-time numerical methods. The RTPEC-34 method is compared with other multistep algorithms using both numerical experiments and a real engineering example. As shown in the comparison, it achieves improved performance in terms of accuracy and stability and it is also a viable and efficient algorithm for real-time aircraft dynamics simulation.


---

## Body

## 1. Introduction

Aircraft dynamics simulation is a complex nonlinear process whereby engine, aerodynamic, and atmospheric models are solved simultaneously [1]. Aircraft variables such as aircraft velocity, orientation angles, aerodynamic angles, and angular rates are assembled by ordinary differential equations (ODEs) with initial value problems (IVP). The real-time simulation of aircraft dynamics requires very accurate and stable numerical methods for solving the ODEs.A numerical solution of an ODE is a table of approximated values of the variables for a set of discrete time points. Multistep methods, as a class of the most widely used numerical solution, use information at more than one previous point to estimate the solution at the next point. Linear multistep methods have the form shown in (1) where the parameters αi and βi are determined using polynomial interpolation [2](1)yn+1=∑i=1kαiyn+1-i+h∑i=0kβif(xn+1-i,yn+1-i).If β0=0, the method is explicit; and if β0≠0, then the method is implicit. Since multistep methods require several values of variables and derivatives from previous calculations history, they cannot self-start before the values have been obtained. Using a single-step method, which does not require past history, is a common strategy to generate solution values at enough points for starting using a multistep method of a desired order. The Euler method and the Runge-Kutta (RK) method (or variants of them) are popular single-step methods to assist multistep methods in providing initial values. We know that implicit single-step methods are generally more accurate and stable than the explicit ones. Similarly, implicit multistep methods are usually more accurate and stable than the explicit ones but a nonlinear equation needs to be solved to obtain the derivative values yn+1. On the other hand, explicit linear multistep methods can conveniently make a guess of initial values and have simple and direct formulas. These advantages help meet the requirements of real-time input and calculation. As a result, the explicit and implicit methods are often used together as a predictor-corrector pair and the Predict-Evaluate-Correct (PEC) method has become a very useful scheme for solving ODEs with IVP. When computational complexity and the error constants relative to order are concerned [3], the most popular fourth-order Adams-Bashforth-Moulton (ABM) [2] of predictor-corrector method is widely used. This method, however, does not satisfy the needs of real-time simulation [4]. In addition, although implicit methods have a much greater region of stability than explicit methods, they are still not necessarily unconditionally stable. Explicit methods cannot be A-stable due to the famous Dahlquist barrier, which means it is less useful for solving stiff ODEs [5] and a PEC scheme is actually explicit in a complicated way. On the contrary, a properly designed implicit multistep method is suitable for dealing with stiff problems. Since the accuracy restriction depends on the slowly varying components of the solution and the stability restriction depends on the rapidly varying ones, the Gear method [6] and the Rosenbrock method [7] aim to solve stiff ODEs with long intervals of stability regions, at the cost of accuracy.According to the different requirements and constraints of a simulation, many researchers improved the multistep methods from different aspects. Huang [8] considered two-stage hybrid methods of seventh order. Gottlieb et al. [9] considered a class of two-step and two-stage methods and Xu and Zhao [3] proposed an estimation of the longest stability interval for three-order four-step methods. In addition, Bulatov and Berghe [10] discussed two-step fourth-order methods of the second order and Bresten et al. [11] focused on strong stability preserving methods. Seong et al. [12] considered the fifth-order multistep method using constant step size and Wang et al. [13] discussed the variable-step interaction algorithm for multidisciplinary collaborative simulation. Although these methods attempted to improve the method by varying the order and number of integration steps, very few of them focused on optimizing parameters for a fixed order. When stability and accuracy of numerical solutions are considered at the same time, a predictor-corrector pair of order four is a very good choice based on which improved methods can be developed.This research, with a particular focus on the aircraft dynamics ODE problems, aims to improve the accuracy of the real-time predictor-corrector methods and analyze the stability regions of the proposed methods. Both simulation experiments of numerical examples and an engineering example are used to evaluate the performance of the proposed method by comparing its results with those obtained from the classic RK method and the methods for stiff ODEs. It has been shown in the evaluation that these proposed methods are effective. The rest of this paper is organized as follows. Section2 details the development of a predictor-corrector method for highly accurate real-time aircraft dynamics simulation as well as the optimization of its key parameters. In Section 3, a theoretical analysis is conducted to evaluate the stability of the RTPEC-34 method. In Section 4, the RTPEC-34 method is evaluated by comparing it with other classic multistep algorithms in several simulation experiments. The main conclusions of this research are drawn in Section 5.


## 2. Optimization of the Accuracy of Multistep Numerical Methods Using Predictor-Corrector Scheme

Aircraft simulation involves a computation process that is subject to real-time constraints as it is a real-time system. This means the responses or results of the simulation process have a deadline that must be met, regardless of system load, in order for the system considered to be correct [14, 15]. The predictor-corrector multistep formula is rearranged as the real-time form discussed in [16]. In particular, the predictor equation is obtained as follows:(2a)yn+1p=yn+hβ-0fxtn,yn+β-1f(x(tn-1),yn-1)yn+c+β-2fxtn-2,yn-2+β-3fxtn-3,yn-3.Evaluatef(x(tn+1),yn+1p) at this predicted value of yn+1p to obtain yn+1 at tn+1. The corrector equation is then obtained as(2b)yn+1=yn+hβνfxtn+1,yn+1p+β0fxtn,ynyn+c+β1f(x(tn-1),yn-1)+β2f(x(tn-2),yn-2)yn+1p.In order to improve the accuracy of the real-time predictor-corrector multistep methods, the step of the predictor equation needs to be reduced. Consider the fourth-order three-step algorithm as follows:(3)yn+v=yn+h(β-0fn+β-1fn-1+β-2fn-2)yn+1=yn+hβνfn+v+β0fn+β1fn-1+β2fn-2,where parameters β-0, β-1, β-2, βν, β0, β1, and β2 are yet to be determined. Numerical convergence can be achieved for formula (3) when the following constraint equations are established [17]:(4a)β-0+β-1+β-2=v,βv+β0+β1+β2=1.Additionally, based on the method of undetermined coefficients [18], formula (3) can be further constrained by five equations as follows:(4b)-β-1-2β-2=v22,12β-1+2β-2=v36,vβv-β1-2β2=12,v22βv+12β1+2β2=16,v32βv-16β1-43β2=124.Thus, (4a) and (4b) include seven undetermined equations which contain eight unknown variables. The multistep numerical methods for solving an ODE suffer from two distinct sources of error. Compared to truncation error, round-off error generally plays only a minor role [19, 20]. Therefore, truncation error is the main focus of this research and the estimation of the p-order truncation error can be done using the following formula:(5)∑i=0kαiy(tn+k-ih)-h∑i=0ky˙(tn+k-ih)=hp+1Cp+1y(p+1)(tnk)+⋯.The local truncation error coefficient is then represented as(6)Cp+1=-1p+11p+1!α1+2p+1α2+⋯+kp+1αk+1pβ1+2pβ2+⋯+kpβk.For (3), the estimation of truncation error coefficient can be represented as(7)Cp-34=-1525!+14![v4βv+β-1+24(β-2+β2)].Based on the above discussion, the problem has now become how to figure out the minimum value of formula (7) with the constraints described in (4a) and (4b).There are many optimization methods to find out the minimum value with nonlinear constraints, such as feasible direction method (FDM) [21], penalty function method, and quadratic programming (QP) [22]. However, these methods are not accurate enough to solve multivalue equality. The genetic algorithm (GA) [23] has the potential to fix the problem of falling into local optimum compared with the classic methods mentioned above. While the equality nonlinear constraints in the above model are strict, the infeasible solution will become a large proportion in the populations as the genetic algorithm is used separately [24]. Hence, some other optimization methods should be utilized to assist the GA [25]. The penalty function has the advantages of considering the points out of the feasible regions when solving nonlinear constraints problems [26]. In this research, the GA with a punishment strategy is chosen to find solutions outside the feasible regions.A penalty function is generally constructed using the addition form below:(8)valx=fx+∑i=1nripix,where x is the chromosome, f(x) is the objective function, pi(x) is ith penalty element, and ri is the changeable penalty coefficient of the pi(x). The element ∑i=1nripi(x) in formula (8) is for multiplying constraint violations, which will be used to alter feasible region unless the original function is unsolvable. The complete expression of penalty function then can be established as follows: (9)val(x)=f(x),xworkable,f(x)+∑i=1nripi(x),other.To simplify the constraint, use v to represent β-0, β-1, and β-2:(10)β-0=16v3+34v2+v,β-1=-v33-v2,β-2=16v3+14v2.Thus, the objective function (7) can be rearranged as(11)fx=Cp-34=v4βv+73v3+3v2+β1+16β2.Then, the following three penalty elements are used for the GA optimization process, which are derived from (4a), (4b), and (10):(12a)p1=v22βv+12β1+2β2-16=0,(12b)p2=v32βv-16β1-43β2-124=0,(12c)p3=vβv-β1-2β2-12=0.The setting for the GA running is as follows: binary code is used; the number of individuals in the population is 1000; the crossover operator is 0.9; and mutation operator is 0.08. A simulation is done using MATLAB software, and then the parameters can be obtained for the minimum truncation error of the RTPEC-34 method.Compared with the classic optimization methods, it can be found that different parameters are obtained as shown in Table1.Table 1
Parameter values obtained using different optimization methods.
Parameter
FDM
QP
GA with a punishment strategy
v
0.3959
0.5450
0.5181
β
v
1.5534
0.9122
0.9963
β
0
−0.6811
0.1233
0.0125
β
1
0.1403
−0.0681
−0.0337
β
2
−0.0126
0.0326
0.0249
β
¯
0
0.5239
0.7947
0.7425
β
¯
1
−0.1775
−0.3510
−0.3147
β
¯
2
0.0495
0.1012
0.0903Apply the parameters to (3); a family of the RTPEC-34 method with the highest accuracy can be obtained. The RTPEC-34 method using FDM optimization is shown as follows:(13a)yn+v=yn+h(0.5239fn-0.1775fn-1+0.0495fn-2),yn+1=yn+h1.5534fn+v-0.6811fnyn+hv+0.1403fn-1-0.0126fn-2.The RTPEC-34 method using QP optimization is shown as follows:(13b)yn+v=yn+h(0.7947fn-0.3510fn-1+0.1012fn-2),yn+1=yn+h0.9122fn+v+0.1233fnyn+hv-0.0681fn-1+0.0326fn-2.The RTPEC-34 method using GA optimization with a punishment strategy is shown as follows:(13c)yn+v=yn+h(0.7425fn-0.3147fn-1+0.0903fn-2),yn+1=yn+h0.9963fn+v+0.0125fnyn+hb-0.0337fn-1+0.0249fn-2.


## 3. Stability Analysis

A widely used approach to determining stability region is to apply the method to the linear ODEdy/dx=λy with initial condition y(0)=y0, and its analytical solution is given as y(x)=y0eλx. Applying the three-step fourth-order ABM algorithms (12a), (12b), and (12c) to this equation using a fixed step-size h, we have(14)yn+v=yn+h(β-0λyn+β-1λyn-1+β-2λyn-2),yn+1=yn+h(βνλyn+v+β0λyn+β1λyn-1+β2λyn-2).Substitutingyn+v into yn+1, we can obtain the following stability polynomial:(15)πξ,μ=ξ3-(βνβ-0μ2+(βν+β0)μ+1)ξ2-(βνβ-1μ2+β1μ)ξ-βνβ-2μ2-β2μ,where μ=hλ.Obtaining RTPEC-34 stability polynomial with the parameters shown in Table1, we can then use root-locus method to obtain the diagram for the stability regions of this method as shown Figure 1.Figure 1
The region of absolute stability of the RTPEC-34 method.The curvesC1, C2, and C3 are the root locus of RTPEC-34 (13a), (13b), and (13c) stability polynomial, respectively. Since no multistep methods of greater than second order are unconditionally stable, an explicit linear multistep method cannot be A-stable if it is higher than order two due to the famous Dahlquist barrier theorem. Even if it is implicit, it is still the case. Thus the fourth-order method can be stable only in the finite stability region. From Figure 1, it can be concluded that the highest accuracy RTPEC-34 method (13c) using GA with a punishment strategy has the largest stability region among the three methods.


## 4. Evaluation and Discussion

### 4.1. Numerical Experiments

In this section, the numerical results obtained by using the highest accuracy RTPEC-34 method are presented in Example1. In addition, the method proposed is compared with the Runge-Kutta method of fourth-order (RK4) method to demonstrate its good performance in supporting real-time simulation in Example 2. Furthermore, the Rosenbrock method for stiff ODEs is used to evaluate the accuracy of the proposed method.Example 1.
The ODE with IVP (16) is used to compare the proposed methods (13a), (13b), and (13c) using different parameters. Consider(16)dydx=1+cos⁡(x),y(0)=0.The analytical solution of this ODE isy(x)=1+2x. Applying (13a), (13b), and (13c) to the ODE (16), the numerical calculation errors in different simulation settings with different step-size h are shown in Table 2. According to Figure 2, the accuracy of (13c) is better than that of (13a) and (13b) under the condition of h=0.005, h=0.01, and h=0.02. The RTPEC-34 methods using GA optimization with a punishment strategy (13c) are much more stable than the other two cases. Thus, we choose (13c) as the method with the highest accuracy after the optimization and comparison. It is used to demonstrate the efficiency of the proposed methods in other simulation experiments.Table 2
Numerical errors due to different values of the parameters in (13a), (13b), and (13c).
t
Formula (13a)
Formula (13b)
Formula (13c)
(FDM)
(QR)
(GA with a punishment strategy)
h
=
0.005
h
=
0.01
h
=
0.02
h
=
0.005
h
=
0.01
h
=
0.02
h
=
0.005
h
=
0.01
h
=
0.02
0.0000
0
e
-
4
0
e
-
3
0
e
-
3
0
e
-
4
0
e
-
3
0
e
-
3
0
e
-
4
0
e
-
4
0
e
-
3
0.0200
0.0065
e
-
4
-
0.0008
e
-
3
-
0.0013
e
-
3
0.0038
e
-
4
-
0.0008
e
-
3
-
0.0013
e
-
3
0.0029
e
-
4
-
0.0083
e
-
4
-
0.0013
e
-
3
0.0400
0.0355
e
-
4
0.0052
e
-
3
-
0.0067
e
-
3
0.0226
e
-
4
0.0031
e
-
3
-
0.0067
e
-
3
0.0179
e
-
4
0.0230
e
-
4
-
0.0067
e
-
3
0.0600
0.0834
e
-
4
0.0149
e
-
3
0.0136
e
-
3
0.0533
e
-
4
0.0094
e
-
3
0.0065
e
-
3
0.0425
e
-
4
0.0734
e
-
4
0.0039
e
-
3
0.0800
0.1499
e
-
4
0.0284
e
-
3
0.0413
e
-
3
0.0960
e
-
4
0.0181
e
-
3
0.0245
e
-
3
0.0767
e
-
4
0.1431
e
-
4
0.0184
e
-
3
0.1000
0.2352
e
-
4
0.0457
e
-
3
0.0765
e
-
3
0.1507
e
-
4
0.0291
e
-
3
0.0473
e
-
3
0.1205
e
-
4
0.2319
e
-
4
0.0366
e
-
3
0.1200
0.3391
e
-
4
0.0666
e
-
3
0.1192
e
-
3
0.2173
e
-
4
0.0426
e
-
3
0.0748
e
-
3
0.1738
e
-
4
0.3398
e
-
4
0.0587
e
-
3
0.1400
0.4617
e
-
4
0.0913
e
-
3
0.1693
e
-
3
0.2958
e
-
4
0.0585
e
-
3
0.1071
e
-
3
0.2367
e
-
4
0.4667
e
-
4
0.0846
e
-
3
0.1600
0.6028
e
-
4
0.1197
e
-
3
0.2269
e
-
3
0.3862
e
-
4
0.0767
e
-
3
0.1442
e
-
3
0.3090
e
-
4
0.6127
e
-
4
0.1142
e
-
3
0.1800
0.7625
e
-
4
0.1519
e
-
3
0.2919
e
-
3
0.4885
e
-
4
0.0973
e
-
3
0.1860
e
-
3
0.3909
e
-
4
0.7776
e
-
4
0.1477
e
-
3
0.2000
0.9406
e
-
4
0.1877
e
-
3
0.3642
e
-
3
0.6025
e
-
4
0.1202
e
-
3
0.2325
e
-
3
0.4822
e
-
4
0.9614
e
-
4
0.1850
e
-
3Figure 2
Comparison of numerical error for (13a), (13b), and (13c).
(a)
(b)Example 2.
To compare the proposed method (13c) with the RK4 method, the real-time simulation procedure of an aircraft propulsion system [27] is considered in which the motion ODE with IVP has the following form:(17)dydx=-10y2+1+sin2πx,x∈0,1,y(0)=0.Applying (13c) and the RK4 to system (17), numerical solutions can be obtained, as shown in Figure 3. It is shown in the curves in Figure 3 that the solutions obtained using the RTPEC-34 method come earlier in time (for about one) than the RK4 method, which is a significant phenomenon in the real-time simulation. This means the RTPEC-34 method (13c) is much more adaptive than RK4 when the aircraft dynamics simulation requires the numerical solutions in real time.Figure 3
The numerical solutions obtained using the RTPEC-34 method and the RK4 method.Example 3.
Due to the quality of being A-stable, the Rosenbrock method is a half-implicit RK method used for solving stiff ODEs. The Rosenbrock method of order three has the following form:(18)yn+1=yn+w1k1+w2k2,k1=h1-ha1fyxn,yn-1fxn,yn,k2=h1-ha2fyxnc1h,yn+c2k1-1×fxn+d1h,yn+d2k1,where a1=1.40824829, a2=0.59175171, c1=c2=0.17378667, w1=-0.41315432, d1=d2=0.17378667, and w2=0.41315432. However, it is difficult to estimate the truncation error directly. Hence, the following ODE (19) is used to compare the RTPEC-34 method (13c) with the Rosenbrock method in terms of accuracy:(19)dydx=2xy,x∈0,1,y(0)=1.The analytical solution of ODE (18) is y(x)=ex2.Table3 shows the exact solutions and numerical solutions using the RTPEC-34 method (13c) and the Rosenbrock method in the interval [0,1]. It is noted that the accuracy of RTPEC-34 method (13c) is much better than that of the Rosenbrock method at h=0.1 in Figure 4. It is indicated in this phenomenon that ODEs can be solved more accurately by the proposed method unless they are extremely stiff.Table 3
Comparison of numerical solutions obtained with different step sizes.
x
Theoretical value
Rosenbrock method
RTPEC-34 method (13c)
h
=
0.05
h
=
0.1
h
=
0.05
h
=
0.1
0
1.0000
1.0000
1.0000
1.0000
1.0000
0.1
1.0101
1.0075
1.0049
1.0050
1.0100
0.2
1.0408
1.0355
1.0303
1.0405
1.0300
0.3
1.0942
1.0859
1.0777
1.0991
1.0822
0.4
1.1735
1.1617
1.1501
1.1843
1.1714
0.5
1.2840
1.2679
1.2522
1.3019
1.2934
0.6
1.4333
1.4118
1.3910
1.4601
1.4567
0.7
1.6323
1.6038
1.5765
1.6705
1.6737
0.8
1.8965
1.8588
1.8228
1.9498
1.9616
0.9
2.2479
2.1978
2.1501
2.3217
2.3451
1.0
2.7183
2.6511
2.5875
2.8203
2.8599Figure 4
Comparison of the numerical solutions obtained by the RTPEC-34 and Rosenbrock methods.
(a)
(b)


### 4.2. Aircraft Dynamics Experiment

The aircraft dynamics experiment is focused on the simulation of the motion model, which is a system of 12 scalar order differential equations [1]. To avoid the singularities of derivatives of roll angular rate p˙ and yaw angular rate r˙ when pitch angle θ passes through ±(π/2), quaternion methods are used for the aircraft orientation representation [28]. We have got an aircraft system representation consisting of 13 scalar first order differential equations as follows:(20a)u˙=ru-qw+1mX-+FT+2q1q3-q0q2g,v˙=pw-ru+1mY-+2q2q3+q0q2g,w˙=qu-pv+1mZ-+q02-q12-q22+q32g,(20b)p˙=c1r+c2pq+c3L-+c4N-+hEq,q˙=c5pr-c6p2-r2+c7M--hEr,r˙=c8p-c2rq+c4L-+c9N-+hEq,(20c)q˙0q˙1q˙2q˙3=120-p-q-rp0r-qq-r0prq-p0q0q1q2q3,(20d)x˙Ey˙Ez˙E=q02+q12-q22-q322q1q2-q0q32q1q3+q0q22q1q2+q0q3q02-q12+q22-q322q2q3-q0q12q1q3-q0q22q2q3+q0q1q02-q12-q22+q32×uvw,where(21)q0q1q2q3=±cos⁡ϕ2cos⁡θ2cos⁡ψ2+sinϕ2sinθ2sinψ2sinϕ2cos⁡θ2cos⁡ψ2-cos⁡ϕ2sinθ2sinψ2cos⁡ϕ2sinθ2cos⁡ψ2+sinϕ2cos⁡θ2sinψ2cos⁡ϕ2cos⁡θ2sinψ2-sinϕ2sinθ2cos⁡ψ2.u=VTcos⁡αcos⁡β,v=VTsinβ,w=VTsinαcos⁡β,The 12 aircraft variables, [VT,α,β], [p,q,r], [xE,yE,zE], and [ϕ,θ,ψ], represent velocity, sideslip angle, attack angle, body-axis rolling rate, pitch rate and yaw rate,x-position,y-position, andz-position with respect to earth, rolling angle, pitch angle, and yaw angle, respectively. For the sake of calculation simplicity, 7 parameters are introduced, where [u,v,w] are velocity in x-axis, y-axis, and z-axis direction and [q0,q1,q2,q3] are quaternion components which do not have any physical meaning.To demonstrate the effectiveness and efficiency of the proposed method (13c), it has been applied to a real aircraft dynamics simulation problem. A number of comparisons with other classic linear multistep methods such as the fourth-order Adams-Bashforth method (AB4) have been made in the simulation which has high real-time requirements (22)yn+1=yn+124(55fn-59fn-1+37fn-2-9fn-3).The nonlinear dynamics model of the F-16 aircraft [29] is used in the experiment as the simulation in such an engineering problem requires a detailed model and practical data. For the atmospheric data relative to the coefficient of formulas (20a), (20b), (20c), and (20d) an approximation is used based on the guidelines by the International Standard Atmosphere (ISA) [30]. In the experiment, the flight status of the F-16 aircraft with the altitude at 1000 m and the velocity at 200 m/s and the initial values of variables are calculated by using the ISA atmospheric model, aerodynamics model, and engine model. The simulation is performed for the F-16 aircraft dynamical model using different numerical methods, the RTPEC-34 (13c) and the AB4 method. The configuration for the simulation is shown in Table 4.Table 4
Simulation configuration for the F-16 aircraft dynamics model.
Initial values of variables
[
V
T
,
α
,
β
]
=
[
200
,
-
0.0552,0.0102
] [q0,q1,q2,q3]=[1,0,0.0051,0] [p,q,r]=[0,0,0] [xE,yE,zE]=[0,0,-1000]
Simulation period
0~10 seconds
Step size
0.02 secondsAs demonstrated in these simulation experiments, the aircraft variables curves in Figure5 can illustrate the real state of a whole fight, where the roll rate, pitch rate, and yaw rate [p,q,r] tend to be stable in Figures 5(a)~5(c). This is also the case for [α,β] in Figure 5(d) through to Figure 5(f) and the coordinates [xE,yE,zE] of the fight position in the whole air route in Figure 5(g) through to Figure 5(i). Both of the numerical methods are effective in the simulation of the F-16 aircraft at the altitude of 1000 m; however the curve of RTPEC-34 demonstrates smaller fluctuations than that of AB4 in Figures 5(a) and 5(b), which means that the convergence speed of RTPEC-34 (13c) is faster than that of AB4. With the number of iteration increased, the accuracy of RTPEC-34 will be higher than AB4.Figure 5
Simulation results of different numerical methods for the F-16 aircraft model.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)The example of the F-16 aircraft simulation demonstrates that the proposed method is adaptive in the field of dynamic ODEs. The comparison with the classic multistep methods of the same order shows the good accuracy and speed of convergence of the RTPEC-34 (13c) and confirms that the proposed real-time fourth-order three-step predictor-corrector method achieves the highest accuracy.


## 4.1. Numerical Experiments

In this section, the numerical results obtained by using the highest accuracy RTPEC-34 method are presented in Example1. In addition, the method proposed is compared with the Runge-Kutta method of fourth-order (RK4) method to demonstrate its good performance in supporting real-time simulation in Example 2. Furthermore, the Rosenbrock method for stiff ODEs is used to evaluate the accuracy of the proposed method.Example 1.
The ODE with IVP (16) is used to compare the proposed methods (13a), (13b), and (13c) using different parameters. Consider(16)dydx=1+cos⁡(x),y(0)=0.The analytical solution of this ODE isy(x)=1+2x. Applying (13a), (13b), and (13c) to the ODE (16), the numerical calculation errors in different simulation settings with different step-size h are shown in Table 2. According to Figure 2, the accuracy of (13c) is better than that of (13a) and (13b) under the condition of h=0.005, h=0.01, and h=0.02. The RTPEC-34 methods using GA optimization with a punishment strategy (13c) are much more stable than the other two cases. Thus, we choose (13c) as the method with the highest accuracy after the optimization and comparison. It is used to demonstrate the efficiency of the proposed methods in other simulation experiments.Table 2
Numerical errors due to different values of the parameters in (13a), (13b), and (13c).
t
Formula (13a)
Formula (13b)
Formula (13c)
(FDM)
(QR)
(GA with a punishment strategy)
h
=
0.005
h
=
0.01
h
=
0.02
h
=
0.005
h
=
0.01
h
=
0.02
h
=
0.005
h
=
0.01
h
=
0.02
0.0000
0
e
-
4
0
e
-
3
0
e
-
3
0
e
-
4
0
e
-
3
0
e
-
3
0
e
-
4
0
e
-
4
0
e
-
3
0.0200
0.0065
e
-
4
-
0.0008
e
-
3
-
0.0013
e
-
3
0.0038
e
-
4
-
0.0008
e
-
3
-
0.0013
e
-
3
0.0029
e
-
4
-
0.0083
e
-
4
-
0.0013
e
-
3
0.0400
0.0355
e
-
4
0.0052
e
-
3
-
0.0067
e
-
3
0.0226
e
-
4
0.0031
e
-
3
-
0.0067
e
-
3
0.0179
e
-
4
0.0230
e
-
4
-
0.0067
e
-
3
0.0600
0.0834
e
-
4
0.0149
e
-
3
0.0136
e
-
3
0.0533
e
-
4
0.0094
e
-
3
0.0065
e
-
3
0.0425
e
-
4
0.0734
e
-
4
0.0039
e
-
3
0.0800
0.1499
e
-
4
0.0284
e
-
3
0.0413
e
-
3
0.0960
e
-
4
0.0181
e
-
3
0.0245
e
-
3
0.0767
e
-
4
0.1431
e
-
4
0.0184
e
-
3
0.1000
0.2352
e
-
4
0.0457
e
-
3
0.0765
e
-
3
0.1507
e
-
4
0.0291
e
-
3
0.0473
e
-
3
0.1205
e
-
4
0.2319
e
-
4
0.0366
e
-
3
0.1200
0.3391
e
-
4
0.0666
e
-
3
0.1192
e
-
3
0.2173
e
-
4
0.0426
e
-
3
0.0748
e
-
3
0.1738
e
-
4
0.3398
e
-
4
0.0587
e
-
3
0.1400
0.4617
e
-
4
0.0913
e
-
3
0.1693
e
-
3
0.2958
e
-
4
0.0585
e
-
3
0.1071
e
-
3
0.2367
e
-
4
0.4667
e
-
4
0.0846
e
-
3
0.1600
0.6028
e
-
4
0.1197
e
-
3
0.2269
e
-
3
0.3862
e
-
4
0.0767
e
-
3
0.1442
e
-
3
0.3090
e
-
4
0.6127
e
-
4
0.1142
e
-
3
0.1800
0.7625
e
-
4
0.1519
e
-
3
0.2919
e
-
3
0.4885
e
-
4
0.0973
e
-
3
0.1860
e
-
3
0.3909
e
-
4
0.7776
e
-
4
0.1477
e
-
3
0.2000
0.9406
e
-
4
0.1877
e
-
3
0.3642
e
-
3
0.6025
e
-
4
0.1202
e
-
3
0.2325
e
-
3
0.4822
e
-
4
0.9614
e
-
4
0.1850
e
-
3Figure 2
Comparison of numerical error for (13a), (13b), and (13c).
(a)
(b)Example 2.
To compare the proposed method (13c) with the RK4 method, the real-time simulation procedure of an aircraft propulsion system [27] is considered in which the motion ODE with IVP has the following form:(17)dydx=-10y2+1+sin2πx,x∈0,1,y(0)=0.Applying (13c) and the RK4 to system (17), numerical solutions can be obtained, as shown in Figure 3. It is shown in the curves in Figure 3 that the solutions obtained using the RTPEC-34 method come earlier in time (for about one) than the RK4 method, which is a significant phenomenon in the real-time simulation. This means the RTPEC-34 method (13c) is much more adaptive than RK4 when the aircraft dynamics simulation requires the numerical solutions in real time.Figure 3
The numerical solutions obtained using the RTPEC-34 method and the RK4 method.Example 3.
Due to the quality of being A-stable, the Rosenbrock method is a half-implicit RK method used for solving stiff ODEs. The Rosenbrock method of order three has the following form:(18)yn+1=yn+w1k1+w2k2,k1=h1-ha1fyxn,yn-1fxn,yn,k2=h1-ha2fyxnc1h,yn+c2k1-1×fxn+d1h,yn+d2k1,where a1=1.40824829, a2=0.59175171, c1=c2=0.17378667, w1=-0.41315432, d1=d2=0.17378667, and w2=0.41315432. However, it is difficult to estimate the truncation error directly. Hence, the following ODE (19) is used to compare the RTPEC-34 method (13c) with the Rosenbrock method in terms of accuracy:(19)dydx=2xy,x∈0,1,y(0)=1.The analytical solution of ODE (18) is y(x)=ex2.Table3 shows the exact solutions and numerical solutions using the RTPEC-34 method (13c) and the Rosenbrock method in the interval [0,1]. It is noted that the accuracy of RTPEC-34 method (13c) is much better than that of the Rosenbrock method at h=0.1 in Figure 4. It is indicated in this phenomenon that ODEs can be solved more accurately by the proposed method unless they are extremely stiff.Table 3
Comparison of numerical solutions obtained with different step sizes.
x
Theoretical value
Rosenbrock method
RTPEC-34 method (13c)
h
=
0.05
h
=
0.1
h
=
0.05
h
=
0.1
0
1.0000
1.0000
1.0000
1.0000
1.0000
0.1
1.0101
1.0075
1.0049
1.0050
1.0100
0.2
1.0408
1.0355
1.0303
1.0405
1.0300
0.3
1.0942
1.0859
1.0777
1.0991
1.0822
0.4
1.1735
1.1617
1.1501
1.1843
1.1714
0.5
1.2840
1.2679
1.2522
1.3019
1.2934
0.6
1.4333
1.4118
1.3910
1.4601
1.4567
0.7
1.6323
1.6038
1.5765
1.6705
1.6737
0.8
1.8965
1.8588
1.8228
1.9498
1.9616
0.9
2.2479
2.1978
2.1501
2.3217
2.3451
1.0
2.7183
2.6511
2.5875
2.8203
2.8599Figure 4
Comparison of the numerical solutions obtained by the RTPEC-34 and Rosenbrock methods.
(a)
(b)


## 4.2. Aircraft Dynamics Experiment

The aircraft dynamics experiment is focused on the simulation of the motion model, which is a system of 12 scalar order differential equations [1]. To avoid the singularities of derivatives of roll angular rate p˙ and yaw angular rate r˙ when pitch angle θ passes through ±(π/2), quaternion methods are used for the aircraft orientation representation [28]. We have got an aircraft system representation consisting of 13 scalar first order differential equations as follows:(20a)u˙=ru-qw+1mX-+FT+2q1q3-q0q2g,v˙=pw-ru+1mY-+2q2q3+q0q2g,w˙=qu-pv+1mZ-+q02-q12-q22+q32g,(20b)p˙=c1r+c2pq+c3L-+c4N-+hEq,q˙=c5pr-c6p2-r2+c7M--hEr,r˙=c8p-c2rq+c4L-+c9N-+hEq,(20c)q˙0q˙1q˙2q˙3=120-p-q-rp0r-qq-r0prq-p0q0q1q2q3,(20d)x˙Ey˙Ez˙E=q02+q12-q22-q322q1q2-q0q32q1q3+q0q22q1q2+q0q3q02-q12+q22-q322q2q3-q0q12q1q3-q0q22q2q3+q0q1q02-q12-q22+q32×uvw,where(21)q0q1q2q3=±cos⁡ϕ2cos⁡θ2cos⁡ψ2+sinϕ2sinθ2sinψ2sinϕ2cos⁡θ2cos⁡ψ2-cos⁡ϕ2sinθ2sinψ2cos⁡ϕ2sinθ2cos⁡ψ2+sinϕ2cos⁡θ2sinψ2cos⁡ϕ2cos⁡θ2sinψ2-sinϕ2sinθ2cos⁡ψ2.u=VTcos⁡αcos⁡β,v=VTsinβ,w=VTsinαcos⁡β,The 12 aircraft variables, [VT,α,β], [p,q,r], [xE,yE,zE], and [ϕ,θ,ψ], represent velocity, sideslip angle, attack angle, body-axis rolling rate, pitch rate and yaw rate,x-position,y-position, andz-position with respect to earth, rolling angle, pitch angle, and yaw angle, respectively. For the sake of calculation simplicity, 7 parameters are introduced, where [u,v,w] are velocity in x-axis, y-axis, and z-axis direction and [q0,q1,q2,q3] are quaternion components which do not have any physical meaning.To demonstrate the effectiveness and efficiency of the proposed method (13c), it has been applied to a real aircraft dynamics simulation problem. A number of comparisons with other classic linear multistep methods such as the fourth-order Adams-Bashforth method (AB4) have been made in the simulation which has high real-time requirements (22)yn+1=yn+124(55fn-59fn-1+37fn-2-9fn-3).The nonlinear dynamics model of the F-16 aircraft [29] is used in the experiment as the simulation in such an engineering problem requires a detailed model and practical data. For the atmospheric data relative to the coefficient of formulas (20a), (20b), (20c), and (20d) an approximation is used based on the guidelines by the International Standard Atmosphere (ISA) [30]. In the experiment, the flight status of the F-16 aircraft with the altitude at 1000 m and the velocity at 200 m/s and the initial values of variables are calculated by using the ISA atmospheric model, aerodynamics model, and engine model. The simulation is performed for the F-16 aircraft dynamical model using different numerical methods, the RTPEC-34 (13c) and the AB4 method. The configuration for the simulation is shown in Table 4.Table 4
Simulation configuration for the F-16 aircraft dynamics model.
Initial values of variables
[
V
T
,
α
,
β
]
=
[
200
,
-
0.0552,0.0102
] [q0,q1,q2,q3]=[1,0,0.0051,0] [p,q,r]=[0,0,0] [xE,yE,zE]=[0,0,-1000]
Simulation period
0~10 seconds
Step size
0.02 secondsAs demonstrated in these simulation experiments, the aircraft variables curves in Figure5 can illustrate the real state of a whole fight, where the roll rate, pitch rate, and yaw rate [p,q,r] tend to be stable in Figures 5(a)~5(c). This is also the case for [α,β] in Figure 5(d) through to Figure 5(f) and the coordinates [xE,yE,zE] of the fight position in the whole air route in Figure 5(g) through to Figure 5(i). Both of the numerical methods are effective in the simulation of the F-16 aircraft at the altitude of 1000 m; however the curve of RTPEC-34 demonstrates smaller fluctuations than that of AB4 in Figures 5(a) and 5(b), which means that the convergence speed of RTPEC-34 (13c) is faster than that of AB4. With the number of iteration increased, the accuracy of RTPEC-34 will be higher than AB4.Figure 5
Simulation results of different numerical methods for the F-16 aircraft model.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)The example of the F-16 aircraft simulation demonstrates that the proposed method is adaptive in the field of dynamic ODEs. The comparison with the classic multistep methods of the same order shows the good accuracy and speed of convergence of the RTPEC-34 (13c) and confirms that the proposed real-time fourth-order three-step predictor-corrector method achieves the highest accuracy.


## 5. Conclusions

In this paper, a novel real-time multistep method based on Predict-Evaluate-Correct scheme of three-step fourth-order (RTPEC-34) method is proposed and developed for the real-time simulation of aircraft dynamics, which is improved by obtaining the predictor-corrector parameters using optimization algorithms. The method of using GA optimization with a punishment strategy is more stable and accurate than others both theoretically and practically. This work involves theoretical analysis of the truncation error of the predictor-corrector for real-time problems as well as of the stability of the proposed RTPEC-34 method. The analysis work can be used by other applications that involve improvement of accuracy and stability. Both numerical examples and engineering examples are used in simulation experiments to evaluate the performance of the RTPEC-34 method by comparing it with the RK4 and the Rosenbrock methods. It is shown in the evaluation that the proposed method achieves improved performance in terms of accuracy, stability, and support of real-time simulation. Moreover, the successful application of the proposed method in the F-16 aircraft experiment has shown that the proposed method is adaptive to solve the multivariable ODEs popular in aircraft dynamics simulation.



---

*Source: 193179-2015-05-04.xml*