SystemModel#
- class do_dpc.environments.legacy_coco_rocket.system_model.SystemModel(env)[source]#
Bases:
objectClass which wraps a RocketLander environment and calculates the system model
Methods#
calculate_linear_system_matrices#
- do_dpc.environments.legacy_coco_rocket.system_model.SystemModel.calculate_linear_system_matrices(self, x_eq=None, u_eq=None)#
Calculate the linearized system matrices
- If x_eq and u_eq are not provided, we default to:
x_eq = [0, 0, 0, 0, 0, 0] (x = [x, y, x’, y’, theta, theta’])
u_eq = [mass*gravity, 0, 0] (u = [Fe, Fs, phi])
- Parameters:
x_eq (np.ndarray, optional) – state equilibrium point. Defaults to None.
u_eq (np.ndarray, optional) – action equilibrium point. Defaults to None.
- Return type:
None
discretize_system_matrices#
- do_dpc.environments.legacy_coco_rocket.system_model.SystemModel.discretize_system_matrices(self, sample_time)#
Exact discretization of the linearized system matrices using the matrix exponential
- Parameters:
sample_time (float) – discrete sampling time in seconds
- Raises:
AttributeError – if calculate_linear_system_matrices has not been called first
- Return type:
None
get_continuous_linear_system_matrices#
- do_dpc.environments.legacy_coco_rocket.system_model.SystemModel.get_continuous_linear_system_matrices(self)#
Return the continuous-time linearized system matrices
- Raises:
AttributeError – if calculate_linear_system_matrices has not been called first
- Returns:
A, B
- Return type:
Tuple[np.ndarray, np.ndarray]
get_discrete_linear_system_matrices#
- do_dpc.environments.legacy_coco_rocket.system_model.SystemModel.get_discrete_linear_system_matrices(self)#
Return the discrete-time linearized system matrices
- Raises:
AttributeError – if discretize_system_matrices has not been called first
- Returns:
A, B
- Return type:
Tuple[np.ndarray, np.ndarray]