Main Content

Aero.FixedWing.Coefficient Class

Namespace: Aero

Create Aero.FixedWing aircraft coefficient set

Description

Aero.FixedWing.Coefficient creates an Aero.FixedWing coefficient set that describes the behavior and body of an aircraft.

Class Attributes

Sealed
true

For information on class attributes, see Class Attributes.

Creation

Description

fixedWingCoefficient = Aero.FixedWing.Coefficient creates a single Aero.FixedWing.Coefficient object with default property values.

fixedWingCoefficient = Aero.FixedWing.Coefficient(N) creates an N-by-N matrix of Aero.FixedWing.Coefficient objects with default property values.

fixedWingCoefficient = Aero.FixedWing.Coefficient(M,N,P,...) or Aero.FixedWing.Coefficient([M N P ...]) creates an M-by-N-by-P-by-... array of Aero.FixedWing.Coefficient objects with default property values.

fixedWingCoefficient = Aero.FixedWing.Coefficient(size(A)) creates an Aero.FixedWing.Coefficient object that is the same size as A and all Aero.FixedWing.Coefficient objects.

fixedWingCoefficient = Aero.FixedWing.Coefficient(__,property,propertyValue) creates an array of Aero.FixedWing.Coefficient objects with property, propertyValue pairs applied to each of the Aero.FixedWing.Coefficient array objects. For a list of properties, see Properties.

Input Arguments

expand all

Number of fixed-wing coefficient objects, specified as a scalar.

Number of fixed-wing coefficient objects, specified as a scalar.

Number of fixed-wing coefficient objects, specified as a scalar.

Size of fixed-wing coefficient object, specified as a scalar.

Properties

expand all

Public Properties

Coefficient values, specified in a 6-by-N table. Each row in the table must be a member of and in the same order as the StateOutput property.

Setting the Table property also sets the contents of the Values property and StateVariables to the Table property variables. To have a Simulink.LookupTable object and a constant value in the same column, use the setCoefficient or set the desired content of the Values property. Setting the Table property does not set the ReferenceFrame.

Note

Tables must have a single data type per column. If there are both constant values and Simulink.LookupTable objects in a given column, the Table property automatically converts the constants to Simulink.LookupTable objects.

Attributes:

GetAccess
public
SetAccess
public

Data Types: double

Coefficient values, specified as a 6-by-N cell array. Each entry in the cell array must be a single coefficient value corresponding to the StateOutput (row) and StateVariable (column) properties. Each coefficient value must be a scalar numeric value, Aero.Aircraft.CompositeCoefficient, or a Simulink.LookupTable object. If a value is a Simulink.LookupTable object, the FieldName of each breakpoint must be a valid property of the Aero.FixedWing.State object.

Unlike the Table property, Values do need to be a single data type per column.

Attributes:

GetAccess
public
SetAccess
public

Data Types: double

State variable names, specified as a 1-by-N vector of strings. Each entry in this property corresponds to a column in the Values property. Each entry in StateVariables must be a valid property in the Aero.FixedWing.State object. Adding a state variable adds a column of zeros to the end of the Values cell array.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Axes in which aerodynamic coefficients are defined, specified as Wind, Body, or Stability with these outputs.

Reference FrameCoefficient OutputNotes

Wind

Forces:

  • drag (CD)

  • crosswind (CC = -CY)

  • lift (CL)

If the center of pressure is not coincident with the center of gravity, the object generates a moment due to this offset and includes it in the output moments.

Body

Forces:

  • X (CX)

  • Y (CY)

  • Z (CZ)

The object applies the forces and moments to the aircraft center of gravity (CG) and expresses them in the body-fixed coordinate system.

Stability

Forces:

  • drag (CD)

  • Y (CY)

  • lift (CL)

If the center of pressure is not coincident with the center of gravity, the object generates a moment due to this offset and includes it in the output moments.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Option to multiply coefficients by state variables when calculating forces and moments. To multiply coefficients by state variables, set this property to 'on'. Otherwise, set this property to 'off'.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Option to specify that nondimensional coefficients. To specify nondimensional coefficients, set this property to 'on'. If NonDimensional is set to 'on', the object multiplies the coefficients by the dynamic pressure and appropriate reference lengths or areas to compute the dimensional forces and moments.

Otherwise, set this property to 'off'.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Aero.Aircraft.Properties object, specified as a scalar.

Attributes:

GetAccess
public
SetAccess
public

Protected Properties

Current state output, returned as one of these 6-by-1 vectors:

WindBodyStability

CD

CX

CD

CY

CY

CY

CL

CZ

CL

Cl

Cl

Cl

Cm

Cm

Cm

Cn

Cn

Cn

This property depends on ReferenceFrame.

Attributes:

GetAccess
Restricts access
SetAccess
protected

Data Types: char | string

Methods

expand all

Examples

collapse all

Set aircraft coefficients for an Aero.FixedWing object and use these coefficients to compute aircraft forces and moments.

Create a fixed-wing object.

aircraft = Aero.FixedWing(...
  "ReferenceArea", 16,...
  "ReferenceSpan", 11,...
  "ReferenceLength", 1.5);

Set aircraft coefficients.

coeffs = {
  'CD', 'Zero', 0.027;
  'CL', 'Zero', 0.307;
  'Cm', 'Zero', 0.04;
  'CD', 'Alpha', 0.121;
  'CL', 'Alpha', 4.41;
  'Cm', 'Alpha', -0.613;
};
aircraft = setCoefficient(aircraft, coeffs(:,1), coeffs(:,2), coeffs(:,3))
aircraft = 
  FixedWing with properties:

        ReferenceArea: 16
        ReferenceSpan: 11
      ReferenceLength: 1.5000
         Coefficients: [1×1 Aero.FixedWing.Coefficient]
     DegreesOfFreedom: "6DOF"
             Surfaces: [1×0 Aero.FixedWing.Surface]
              Thrusts: [1×0 Aero.FixedWing.Thrust]
          AspectRatio: 7.5625
           Properties: [1×1 Aero.Aircraft.Properties]
           UnitSystem: "Metric"
    TemperatureSystem: "Kelvin"
          AngleSystem: "Radians"

Define the aircraft state.

state = Aero.FixedWing.State(...
    "Mass", 1400,...
    "Airspeed", 67,...
    "AltitudeMSL",2000,...
    "Alpha",0)
state = 
  State with properties:

                     Mass: 1400
                  Inertia: [3×3 table]
          CenterOfGravity: [0 0 0]
         CenterOfPressure: [0 0 0]
              AltitudeMSL: 2000
             GroundHeight: 0
                       XN: 0
                       XE: 0
                       XD: -2000
                        U: 67
                        V: 0
                        W: 0
                 Airspeed: 67
                      Phi: 0
                    Theta: 0
                      Psi: 0
                        P: 0
                        Q: 0
                        R: 0
                    Alpha: 0
                     Beta: 0
                 AlphaDot: 0
                  BetaDot: 0
                   Weight: 13734
              AltitudeAGL: 2000
              GroundSpeed: 67
               MachNumber: 0.1969
             BodyVelocity: [67 0 0]
           GroundVelocity: [67 0 0]
                       Ug: 67
                       Vg: 0
                       Wg: 0
          FlightPathAngle: 0
              CourseAngle: 0
     InertialToBodyMatrix: [3×3 double]
     BodyToInertialMatrix: [3×3 double]
         BodyToWindMatrix: [3×3 double]
         WindToBodyMatrix: [3×3 double]
    BodyToStabilityMatrix: [3×3 double]
    StabilityToBodyMatrix: [3×3 double]
          DynamicPressure: 2.7495e+03
              Environment: [1×1 Aero.Aircraft.Environment]
            ControlStates: [1×0 Aero.Aircraft.ControlState]
         OutOfRangeAction: "Limit"
         DiagnosticAction: "Warning"
               Properties: [1×1 Aero.Aircraft.Properties]
               UnitSystem: "Metric"
        TemperatureSystem: "Kelvin"
              AngleSystem: "Radians"

Compute the forces and moments on the aircraft.

[F1, M1] = forcesAndMoments(aircraft, state)
F1 = 3×1
103 ×

   -1.1878
         0
    0.2284

M1 = 3×1
103 ×

         0
    2.6395
         0

Increase the angle of attack and recompute the forces and moments.

state.Alpha = deg2rad(2);
[F2, M2] = forcesAndMoments(aircraft, state)
F2 = 3×1
103 ×

   -0.6651
         0
   -6.5793

M2 = 3×1
103 ×

         0
    1.2275
         0

This example shows how to get coefficient values from different fixed-wing coefficient objects.

Get CD_alpha on Fixed-Wing Coefficient Object

C182 = astC182();
CD_alpha = getCoefficient(C182, "CD", "Alpha")
CD_alpha = 
0.1210

Get Vector of Coefficient Values

C182 = astC182();
coeffs = getCoefficient(C182, ["CY"; "Cm"], ["Aileron"; "Aileron"], "Component", "Aileron")
coeffs = 1×2

     0     0

Get Simulink.LookupTable Coefficient

SkyHogg = astSkyHogg();
Cl_zero = getCoefficient(SkyHogg, "Cl", "Zero")
Cl_zero = 
0

Get Simulink.LookupTable Coefficient and Include State

[SkyHogg, CruiseState] = astSkyHogg();
Cl_zero = getCoefficient(SkyHogg, "Cl", "Zero", "State", CruiseState)
Cl_zero = 
0

Set a coefficient on a Aero.FixedWing object.

C182 = astC182();
C182 = setCoefficient(C182, "CD", "Alpha", {5})
C182 = 
  FixedWing with properties:

        ReferenceArea: 174
        ReferenceSpan: 36
      ReferenceLength: 4.9000
         Coefficients: [1×1 Aero.FixedWing.Coefficient]
     DegreesOfFreedom: "6DOF"
             Surfaces: [1×3 Aero.FixedWing.Surface]
              Thrusts: [1×1 Aero.FixedWing.Thrust]
          AspectRatio: 7.4483
           Properties: [1×1 Aero.Aircraft.Properties]
           UnitSystem: "English (ft/s)"
    TemperatureSystem: "Fahrenheit"
          AngleSystem: "Radians"

Limitations

  • This class requires a Simulink® license if the coefficient table contains Simulink.LookupTable objects.

  • You cannot subclass Aero.FixedWing.Coefficient.

Version History

Introduced in R2021a