Main Content

constturnjac

Jacobian of state transition function based on constant turn-rate and velocity-magnitude motion

Description

Jx = constturnjac(state) returns the Jacobian of the state transition function based on the constant turn-rate and velocity-magnitude motion model. The default time step is 1 second. By default, constturnjac returns the Jacobian Jx with respect to the input state, state. Constant turn-rate mean that motion in the xy-plane follows a constant angular velocity and motion in the vertical z directions follows a constant velocity model.

example

Jx = constturnjac(state,dt) specifies the time step, dt.

example

[Jx,Jw] = constturnjac(state,w,dt) also specifies noise, w, and returns the Jacobian, Jw, of the state transition function with respect to the noise.

Examples

collapse all

Compute the Jacobian for a constant turn-rate motion state. Assume the turn rate is 12 degrees/second. The time step is one second.

state = [500,0,0,100,12];
jacobian = constturnjac(state)
jacobian = 5×5

    1.0000    0.9927         0   -0.1043   -0.8631
         0    0.9781         0   -0.2079   -1.7072
         0    0.1043    1.0000    0.9927   -0.1213
         0    0.2079         0    0.9781   -0.3629
         0         0         0         0    1.0000

Compute the Jacobian for a constant turn-rate motion state. Assume the turn rate is 12 degrees/second. The time step is 0.1 second.

state = [500,0,0,100,12];
jacobian = constturnjac(state,0.1)
jacobian = 5×5

    1.0000    0.1000         0   -0.0010   -0.0087
         0    0.9998         0   -0.0209   -0.1745
         0    0.0010    1.0000    0.1000   -0.0001
         0    0.0209         0    0.9998   -0.0037
         0         0         0         0    1.0000

Input Arguments

collapse all

State vector for a constant turn-rate motion model in 2-D or 3-D, specified as a real-valued vector.

  • When you specify the input state as a five-element vector, the state vector describes 2-D motion in the xy-plane. You can specify the state vector as a row or column vector. The components of the state vector are [x;vx;y;vy;omega] where,

    • x and y represent the x-coordinate and y-coordinate in meters.

    • vx and vy represent the velocity in the x and y direction in meters/second.

    • omega represents the turn-rate in degrees/second.

  • When you specify the input state as a seven-element vector, the state vector describes 3-D motion. You can specify the state vector as a row or column vector. The components of the state vector are [x;vx;y;vy;omega;z;vz] where,

    • x, y, and z represent the x-, y-, and z-coordinate in meters.

    • vx, vy, and vz represent the velocity in the x, y, and z direction in meters/second.

    • omega represents the turn rate in degrees/second.

Position coordinates are in meters. Velocity coordinates are in meters/second. Turn rate is in degrees/second.

Example: [5;0.1;4;-0.2;0.01]

Data Types: double

Time step interval, specified as a positive scalar. Time units are in seconds.

Example: 0.5

Data Types: single | double

State noise, specified as a scalar or real-valued M-by-(D+1)-length vector. D is the number of motion dimensions. D is two for 2-D motion and D is three for 3-D motion. The vector components are [ax;ay;alpha] for 2-D motion or [ax;ay;alpha;az] for 3-D motion. ax, ay, and az are the linear acceleration noise values in the x-, y-, and z-axes, respectively, and alpha is the angular acceleration noise value. If specified as a scalar, the value expands to a (D+1) vector.

Data Types: single | double

Output Arguments

collapse all

Jacobian of the state transition function with respect to the input state, returned as a real-valued 5-by-5 matrix or 7-by-7 matrix depending on the size of the state vector. The function constructs the Jacobian from the partial derivatives of the state at the updated time step with respect to the state at the input time step.

Jacobian of the state transition function with respect to the noise, returned as a real-valued 5-by-(D+1) matrix where D is two for 2-D motion or a real-valued 7-by-(D+1) matrix, where D is three for 3-D motion. The function constructs the Jacobian from the partial derivatives of the state at the updated time step with respect to the noise components.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2017a

See Also

Functions

Objects