verify()

verify()#

PolynomialLifter.verify(states, t=None, tol: float = 0.0001)#

Verify that lift() and unlift() are consistent and that lift_ddts(), if implemented, gives valid time derivatives.

  • The lift() / unlift() consistency check verifies that unlift(lift(states)) == states.

  • The lift_ddts() consistency check uses opinf.ddt.ddt() to estimate the time derivatives of the states and the lifted states, then verfies that the relative difference between lift_ddts(states, opinf.ddt.ddt(states, t)) and opinf.ddt.ddt(lift(states), t) is less than tol. If this check fails, consider using a finer time mesh.

Parameters:
states(n, k) ndarray

Native state variables.

t(k,) ndarray or None

Time domain corresponding to the states. Only required if lift_ddts() is implemented.

tolfloat > 0

Tolerance for the finite difference check of lift_ddts(). Only used if lift_ddts() is implemented.