Main Content

ctrectjac

Jacobian of state transition function for constant turn-rate motion model for rectangular targets

Description

Jx = ctrectjac(state) returns the Jacobian of the state transition function based on the constant turn-rate motion model for rectangular targets. The default time step is 1 second. By default, ctrectjac returns the Jacobian Jx with respect to the input state, state.

Jx = ctrectjac(state,dt) specifies the time step dt in seconds.

example

[Jx,Jw] = ctrectjac(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

Define a state vector for the model.

state = [1;2;2;30;1;4.7;1.8];

Compute the Jacobian. dt = 1 second.

jac = ctrectjac(state)
jac = 7×7

    1.0000         0    0.8616   -0.0177   -0.0089         0         0
         0    1.0000    0.5075    0.0301    0.0150         0         0
         0         0    1.0000         0         0         0         0
         0         0         0    1.0000    1.0000         0         0
         0         0         0         0    1.0000         0         0
         0         0         0         0         0    1.0000         0
         0         0         0         0         0         0    1.0000

Compute the Jacobian. dt = 0.1 second without noise.

jac = ctrectjac(state,0.1)
jac = 7×7

    1.0000         0    0.0866   -0.0017   -0.0001         0         0
         0    1.0000    0.0501    0.0030    0.0002         0         0
         0         0    1.0000         0         0         0         0
         0         0         0    1.0000    0.1000         0         0
         0         0         0         0    1.0000         0         0
         0         0         0         0         0    1.0000         0
         0         0         0         0         0         0    1.0000

Compute the Jacobian. dt = 0.1 second with noise.

jac = ctrectjac(state,0.01,0.1)
jac = 7×7

    1.0000         0    0.0866   -0.0017   -0.0001         0         0
         0    1.0000    0.0501    0.0030    0.0002         0         0
         0         0    1.0000         0         0         0         0
         0         0         0    1.0000    0.1000         0         0
         0         0         0         0    1.0000         0         0
         0         0         0         0         0    1.0000         0
         0         0         0         0         0         0    1.0000

Input Arguments

collapse all

Input state, specified as a 1-by-7 real-valued vector. The sate of the constant-turn rectangular target model is [x; y; s; θ; ω; L; W]. The meaning of these variables and their units are:

VariableMeaning Unit
x

Position of the rectangle center in x direction

m
y

Position of the rectangle center in y direction

m
s

Speed in the heading direction

m/s
θ

Orientation angle of the rectangle with respect to x direction

degree
ω

Turn-rate

degree/s
L

Length of the rectangle

m
W

Width of the rectangle

m

Example: [1;2;2;30;1;4.7;1.8]

Data Types: single | double

Time step, specified as a real-valued positive scalar in second.

Data Types: single | double

Process noise, specified as a two-element real-valued vector. The first element specifies the process noise in linear acceleration (m/s2). The second element specifies the process noise in yaw acceleration (degrees/s2).

Data Types: single | double

Output Arguments

collapse all

Jacobian of the state transition function with respect to the input state, returned as a 7-by-7 matrix. 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.

Data Types: double

Jacobian of the state transition function with respect to the noise, returned as a 7-by-2 matrix. The function constructs the Jacobian from the partial derivatives of the state at the updated time step with respect to the noise components.

Data Types: double

Extended Capabilities

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

Version History

Introduced in R2019b