gncpy.math.get_state_jacobian

get_state_jacobian(t, x, fncs, f_args, u=None, **kwargs)[source]

Calculates the jacobian matrix for the state of a state space model.

Notes

Numerically calculates the jacobian using the central difference method for the state of the standard statespace model

\[\dot{x} = f(t, x, u)\]
Parameters:
  • t (float) – timestep to evaluate at.

  • x (N x 1 numpy array) – state to calculate the jocobain about.

  • fncs (list) – 1 function per state in order. They must have the signature f(t, x, u, *f_args) if u is given or f(t, x, *f_args) if u is not given.

  • f_args (tuple) – Additional arguemnts to pass to each function in fncs.

  • u (Nu x 1 numpy array, optional) – the control signal to calculate the jacobian about. The default is None.

  • **kwargs (dict, optional) – Additional keyword arguments for gncpy.math.get_jacobian().

Returns:

jac – Jaccobian matrix.

Return type:

N x N numpy array