Main Content

linearize

Class: Aero.FixedWing
Namespace: Aero

Return linear state-space model

Since R2021a

Syntax

linsys = linearize(aircraft,state)
linsys = linearize(___,Name,Value)

Description

linsys = linearize(aircraft,state) returns a linear state-space representation of a fixed-wing aircraft linearized around a point given by state.

linsys = linearize(___,Name,Value) returns the linear system using additional options specified by one or more Name,Value pair arguments.

Input Arguments

expand all

Aero.FixedWing object, specified as a scalar.

Aero.FixedWing.State object, specified as a scalar.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'RelativePerturbation','1e-5'

Relative perturbation of the system, specified as a scalar numeric. This perturbation takes the form of:

Perturbation TypeDefinition

System State perturbation

statePert = RelativePerturbation+1e-3*RelativePerturbation*|baseValue|

System input perturbation

ctrlPert = RelativePerturbation+1e-3*RelativePerturbation*|baseValue|

To calculate the Jacobian of the system, linearize uses the result of these equations in conjunction with the DifferentialMethod property.

Example: 'RelativePerturbation',1e-5

Data Types: double

Direction while perturbing model, specified as:

DirectionDescription

'Forward'

Forward difference method that adds statePert and ctrlPert to the base states and inputs, respectively.

'Backward'

Backward difference method that adds statePert and ctrlPert to the base states an inputs, respectively.

'Central'

Central difference method that adds and subtracts statePert and ctrlPert to and from the base states and inputs, respectively.

Example: 'DifferentialMethod','Backward'

Data Types: char | string

Output Arguments

expand all

Linear state-space model, returned as a scalar. The inputs and outputs of the state-space model depend on the degrees of freedom of the fixed-wing model and the number of control states on the model.

Examples

expand all

This example shows how to calculate the linear state-space model of a Cessna 182 during cruise.

[C182, CruiseState] = astC182();
linSys = linearize(C182, CruiseState)
linSys =
 
  A = 
                  XN          XE          XD           U           V           W           P           Q           R         Phi       Theta         Psi
   XN              0           0           0           1           0    -0.00729           0           0           0           0       1.603     -0.0011
   XE              0           0           0           0           1           0           0           0           0      -1.605           0       220.1
   XD              0           0           0     0.00729           0           1           0           0           0  -8.023e-06      -220.1  -8.023e-06
   U               0           0           0      -30.21  -4.093e-07     0.08729           0           0           0  -1.182e-06      -32.18  -1.182e-06
   V               0           0           0           0     -0.1873           0     -0.6433           0      -218.3       32.19           0     -0.2346
   W               0           0           0     -0.2873  -6.023e-09      -2.186           0       213.6           0  -0.0001595      0.2324           0
   P               0           0           0           0     -0.1375           0      -12.97           0       2.139           0           0           0
   Q               0           0           0     0.01617   3.331e-10     -0.1886           0      -6.855           0   1.865e-06   -0.002718           0
   R               0           0           0           0     0.04267           0     -0.3573           0      -1.216           0           0           0
   Phi             0           0           0           0           0           0           1           0    -0.00729           0           0           0
   Theta           0           0           0           0           0           0           0           1           0           0           0           0
   Psi             0           0           0           0           0           0           0           0           1           0           0           0
 
  B = 
            Aileron   Elevator     Rudder  Propeller
   XN             0          0          0          0
   XE             0          0          0          0
   XD             0          0          0          0
   U              0          0          0      3.356
   V              0          0      19.61          0
   W              0     -44.69          0          0
   P          75.07          0      31.47          0
   Q              0     -42.69          0          0
   R         -7.962          0     -10.44          0
   Phi            0          0          0          0
   Theta          0          0          0          0
   Psi            0          0          0          0
 
  C = 
             XN     XE     XD      U      V      W      P      Q      R    Phi  Theta    Psi
   XN         1      0      0      0      0      0      0      0      0      0      0      0
   XE         0      1      0      0      0      0      0      0      0      0      0      0
   XD         0      0      1      0      0      0      0      0      0      0      0      0
   U          0      0      0      1      0      0      0      0      0      0      0      0
   V          0      0      0      0      1      0      0      0      0      0      0      0
   W          0      0      0      0      0      1      0      0      0      0      0      0
   P          0      0      0      0      0      0      1      0      0      0      0      0
   Q          0      0      0      0      0      0      0      1      0      0      0      0
   R          0      0      0      0      0      0      0      0      1      0      0      0
   Phi        0      0      0      0      0      0      0      0      0      1      0      0
   Theta      0      0      0      0      0      0      0      0      0      0      1      0
   Psi        0      0      0      0      0      0      0      0      0      0      0      1
 
  D = 
            Aileron   Elevator     Rudder  Propeller
   XN             0          0          0          0
   XE             0          0          0          0
   XD             0          0          0          0
   U              0          0          0          0
   V              0          0          0          0
   W              0          0          0          0
   P              0          0          0          0
   Q              0          0          0          0
   R              0          0          0          0
   Phi            0          0          0          0
   Theta          0          0          0          0
   Psi            0          0          0          0
 
Continuous-time state-space model.

Version History

Introduced in R2021a