OpenControl.ADP_control.system
¶
Module Contents¶
Classes¶
This class present state-space LTI system. |
|
This class represent non-linear system by |
- class OpenControl.ADP_control.system.LTI(A, B, C=1, D=0)¶
This class present state-space LTI system.
- dimension¶
(n_state, n_input).
- Type
tuple
- model¶
{A, B, C, D, dimension}.
- Type
dict
- max_step¶
define max step for ODEs solver algorithms. Defaults to 1e-3.
- Type
float, optional
- algo¶
RK45, RK23 or DOP853 . Defaults to ‘RK45’.
- Type
str, optional
- t_sim¶
time for simualtion (start, stop). Defaults to (0,10).
- Type
tuple, optional
- x0¶
the initial state. Defaults to np.ones((n,)).
- Type
1xn array, optional
- sample_time¶
the sample time. Defaults to 1e-2.
- Type
float, optional
- _check_model(self)¶
- setSimulationParam(self, max_step=0.001, algo='RK45', t_sim=(0, 10), x0=None, sample_time=0.01)¶
Run this function before any simulations
- Parameters
max_step (float, optional) – define max step for ODEs solver algorithms. Defaults to 1e-3.
algo (str, optional) – RK45, RK23 or DOP853 . Defaults to ‘RK45’.
t_sim (tuple, optional) – time for simualtion (start, stop). Defaults to (0,10).
x0 (1xn array, optional) – the initial state. Defaults to np.ones((n,)).
sample_time (float, optional) – the sample time. Defaults to 1e-2.
- integrate(self, x0, u, t_span)¶
- class OpenControl.ADP_control.system.NonLin(dot_x, dimension)¶
This class represent non-linear system by
ODEs
.- dot_x¶
the dx/dt function, return 1D array output
- Type
func(t,x,u)
- dimension¶
(n_state, n_input)
- Type
tuple
- max_step¶
define max step for ODEs solver algorithms. Defaults to 1e-3.
- Type
float, optional
- algo¶
RK45, RK23 or DOP853 . Defaults to ‘RK45’.
- Type
str, optional
- t_sim¶
time for simualtion (start, stop). Defaults to (0,10).
- Type
tuple, optional
- x0¶
the initial state. Defaults to np.ones((n,)).
- Type
1xn array, optional
- sample_time¶
the sample time. Defaults to 1e-2.
- Type
float, optional
- setSimulationParam(self, max_step=0.001, algo='RK45', t_sim=(0, 10), x0=None, sample_time=0.01)¶
Run this function before any simulations
- Parameters
max_step (float, optional) – define max step for ODEs solver algorithms. Defaults to 1e-3.
algo (str, optional) – RK45, RK23 or DOP853 . Defaults to ‘RK45’.
t_sim (tuple, optional) – time for simualtion (start, stop). Defaults to (0,10).
x0 (1xn array, optional) – the initial state. Defaults to np.ones((n,)).
sample_time (float, optional) – the sample time. Defaults to 1e-2.
- integrate(self, x0, u, t_span, t_eval=None)¶