主要内容

Aero.trajectory.polynomialTrajectory

Generate reference signals for polynomial path

Since R2026a

Description

refSignals = Aero.trajectory.polynomialTrajectory(Name=Value) generates reference signals for tracing a polynomial trajectory. Use name-value arguments to define the polynomial trajectory. By default, the function uses a quadratic polynomial in parametric form and upgrades automatically to cubic if needed. Inputs and outputs are specified in the north-east-down (NED) coordinate frame. For more information, see Algorithms.

example

Examples

collapse all

This example shows how to generate signals for a polynomial trajectory starting at [0,0] meters with a 90-degree initial heading, ending at [50,50] meters.

refPolynomial = Aero.trajectory.polynomialTrajectory(InitialPosition = [0,0], ...
    FinalPosition = [50,50],InitialHeading = pi/2, ...
    Altitude = 50,Speed = 1,Units = 'Metric (MKS)')
refPolynomial = struct with fields:
                 xNorth: [1×1 timeseries]
                  yEast: [1×1 timeseries]
                  Speed: [1×1 timeseries]
               Altitude: [1×1 timeseries]
                Heading: [1×1 timeseries]
          WaypointIndex: [1×1 timeseries]
    LateralAcceleration: [1×1 timeseries]

Name-Value Arguments

collapse all

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.

Example: FinalPosition = [50,50]

Initial position of trajectory, specified as a 1-by-2 or 2-by-1 vector in the units specified in Units.

Example: InitialPosition = [0,0]

Data Types: double

Final position of trajectory, specified as a 1-by-2 or 2-by-1 vector in the units specified in Units.

Example: FinalPosition = [50,50]

Data Types: double

Initial heading of trajectory, specified as a real scalar between 0 and 2*pi, in radians. Specify at least one or both InitialHeading and FinalHeading.

Example: InitialHeading = pi

Data Types: double

Final heading of trajectory, specified as a finite real double scalar between 0 and 2*pi, in radians. Specify at least one or both InitialHeading and FinalHeading.

Example: FinalHeading = pi

Data Types: double

Speed of trajectory, specified as a finite real double scalar in the units specified in Units.

Example: Speed = 10

Data Types: double

Shape factor constant, specified as a positive finite real double scalar between 0 and 10, that controls the rate at which the heading changes near the initial and final positions, which in turn affects the flatness of the trajectory. For more information, see Algorithms.

Example: ShapeFactor = 2

Data Types: double

Altitude of the vehicle trajectory, specified as a finite real scalar double in the units specified in Units. This value is constant throughout the vehicle path.

Example: Altitude = 10

Data Types: double

Number of samples in the output signals, specified as a scalar.

Example: NumberOfSamples = 10

Data Types: double

Reference signal type, specified as lateral-acceleration or turnrate. Depending on the selection, either lateral acceleration or turn rate is included as an additional reference signal. A reference signal is a predefined, desired path or sequence of positions, velocities, or attitudes (orientations) that aerospace vehicles are intended to follow over time.

Example: ReferenceSignalType="turnrate"

Data Types: char | string

Initial time of trajectory operation, specified as a datetime object.

Example: StartTime=datetime('now')

Input and output units, specified as one of these values:

Units

Position

Altitude

Speed

Metric (MKS)

Meters

Meters

Meters per second

English (Velocity in ft/s)

Feet

Feet

Feet per second

English (Velocity in kts)

Nautical miles

Feet

Knots

Example: Units = 'Metric (MKS)'

Data Types: double

Output format of reference signals data, specified as timeseries or timetable.

Example: OutputFormat = timeseries

Prior trajectory tracking data, specified as a timeseries or timetable object. These objects must contain these fields:

  • Altitude

  • Heading

  • Speed

  • WaypointIndex

  • xNorth

  • yEast

  • LateralAcceleraion/Turnrate

Output Arguments

collapse all

Trajectory reference signals, returned as a timeseries struct or timetable object.

Algorithms

Use Aero.trajectory.polynomialTrajectory to define the parameters of a polynomial trajectory.

Aero.trajectory.polynomialTrajectory uses the parametric forms of cubic and quadratic polynomials. The parametric form of a cubic polynomial curve is given by:

  • x = a0+a1p+a2p2+a3p3

  • y = b0+b1p+b2p2+b3p3

where a0, a1, a2, b1, b2, b3 are coefficients to be determined and p is a parameter that takes the value 0 at the start of the trajectory and a value 1 at the end. The function uses this logic to fit the polynomial trajectory:

  • The vehicle initial and final positions and headings are translated into constraints on the curve.

  • The function uses the shape factor to scale the derivative constraints dxdp and dydp, while ensuring that the initial and final headings are still satisfied. This action allows control over the flatness of the trajectory.

  • If either the initial or final heading is not specified, a3 and b3 are set as 0, and the result is a quadratic polynomial trajectory.

The reference signal is calculated using this logic:

  • The heading is determined from the tangent direction to the path.

  • The lateral acceleration and turn rate are computed from the radius of curvature (ρ) of the path using these equations:

    • Lateral acceleration: α = V2

    • Turn rate: ω = V/ρ, where V is the speed of the vehicle.

Version History

Introduced in R2026a