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

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
   XN                   0           0           0           1           0           0
   XE                   0           0           0           0           1           0
   XD                   0           0           0           0           0           1
   U                    0           0           0    -0.02574  -6.661e-10     0.08865
   V                    0           0           0           0     -0.1873           0
   W                    0           0           0     -0.2926  -7.183e-09      -2.115
   P                    0           0           0           0     -0.1375           0
   Q                    0           0           0     0.01265   3.331e-10    -0.07866
   R                    0           0           0           0     0.04268           0
   RollAngle            0           0           0           0           0           0
   PitchAngle           0           0           0           0           0           0
   YawAngle             0           0           0           0           0           0
 
                        P           Q           R   RollAngle  PitchAngle    YawAngle
   XN                   0           0           0           0     -0.0011     -0.0011
   XE                   0           0           0           0           0       220.1
   XD                   0           0           0           0      -220.1           0
   U                    0           0           0           0       -32.2           0
   V               -7.867           0      -197.7        32.2           0           0
   W                    0        -189           0   -0.000161   -0.000161           0
   P               -158.7           0       26.16           0           0           0
   Q                    0        -388           0           0           0           0
   R                -4.37           0      -14.87           0           0           0
   RollAngle            1           0           0           0           0           0
   PitchAngle           0           1           0           0           0           0
   YawAngle             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       2215
   V                   0      19.62          0          0
   W                   0          0     -45.11          0
   P               75.07      4.819          0          0
   Q                   0          0     -42.84          0
   R              -7.963     -12.78          0          0
   RollAngle           0          0          0          0
   PitchAngle          0          0          0          0
   YawAngle            0          0          0          0
 
  C = 
                       XN          XE          XD           U           V           W
   XN                   1           0           0           0           0           0
   XE                   0           1           0           0           0           0
   XD                   0           0           1           0           0           0
   U                    0           0           0           1           0           0
   V                    0           0           0           0           1           0
   W                    0           0           0           0           0           1
   P                    0           0           0           0           0           0
   Q                    0           0           0           0           0           0
   R                    0           0           0           0           0           0
   RollAngle            0           0           0           0           0           0
   PitchAngle           0           0           0           0           0           0
   YawAngle             0           0           0           0           0           0
 
                        P           Q           R   RollAngle  PitchAngle    YawAngle
   XN                   0           0           0           0           0           0
   XE                   0           0           0           0           0           0
   XD                   0           0           0           0           0           0
   U                    0           0           0           0           0           0
   V                    0           0           0           0           0           0
   W                    0           0           0           0           0           0
   P                    1           0           0           0           0           0
   Q                    0           1           0           0           0           0
   R                    0           0           1           0           0           0
   RollAngle            0           0           0           1           0           0
   PitchAngle           0           0           0           0           1           0
   YawAngle             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
   RollAngle           0          0          0          0
   PitchAngle          0          0          0          0
   YawAngle            0          0          0          0
 
Continuous-time state-space model.

Version History

Introduced in R2021a