|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Public Member Functions | |
| setUp (self) | |
| test_controller_integration (self) | |
Public Attributes | |
| cfg | |
| PintleEngineConfig | engine_config = self._create_minimal_engine_config() |
| controller = RobustDDPController(self.cfg, self.engine_config) | |
| x0 | |
| float | F_ref = 5000.0 |
| dynamics_params = DynamicsParams.from_config(self.cfg) | |
Protected Member Functions | |
| PintleEngineConfig | _create_minimal_engine_config (self) |
| np.ndarray | _simulate_dynamics (self, np.ndarray x, np.ndarray u, EngineWrapper engine_wrapper) |
| Measurement | _measurement_from_state (self, np.ndarray x) |
Integration test for robust DDP controller.
Definition at line 38 of file test_robust_ddp_controller_integration.py.
|
protected |
Create minimal engine config for testing.
Definition at line 85 of file test_robust_ddp_controller_integration.py.
|
protected |
Create measurement from state.
Definition at line 199 of file test_robust_ddp_controller_integration.py.
Referenced by test_controller_integration().
|
protected |
Simulate one step of dynamics.
Parameters:
-----------
x : np.ndarray
Current state
u : np.ndarray
Control action
engine_wrapper : EngineWrapper
Engine wrapper for mass flow estimation
Returns:
--------
x_next : np.ndarray
Next state
Definition at line 162 of file test_robust_ddp_controller_integration.py.
References engine.control.robust_ddp.controller.RobustDDPController.cfg, engine.control.robust_ddp.identify.ParameterIdentifier.cfg, payload.cold_gas_thruster.ColdGasThruster.cfg, test_robust_ddp_actuation.TestActuation.cfg, cfg, engine.control.robust_ddp.controller.RobustDDPController.dynamics_params, and dynamics_params.
Referenced by test_controller_integration().
| test_robust_ddp_controller_integration.TestControllerIntegration.setUp | ( | self | ) |
Set up test fixtures.
Definition at line 41 of file test_robust_ddp_controller_integration.py.
| test_robust_ddp_controller_integration.TestControllerIntegration.test_controller_integration | ( | self | ) |
Test controller integration over 200 steps.
Definition at line 210 of file test_robust_ddp_controller_integration.py.
References _measurement_from_state(), _simulate_dynamics(), engine.control.robust_ddp.controller.RobustDDPController.cfg, engine.control.robust_ddp.identify.ParameterIdentifier.cfg, payload.cold_gas_thruster.ColdGasThruster.cfg, test_robust_ddp_actuation.TestActuation.cfg, cfg, backend.session.ControllerState.controller, backend.session.UserSession.controller, fsw::config::Config.controller, controller, engine.control.robust_ddp.reference.Reference.F_ref, fsw::control::RobustDDPController::Diagnostics.F_ref, fsw::control::RobustDDPController::Reference.F_ref, F_ref, feedtwin.engine.card.Table2D.x0, and x0.
| test_robust_ddp_controller_integration.TestControllerIntegration.cfg |
Definition at line 44 of file test_robust_ddp_controller_integration.py.
Referenced by _simulate_dynamics(), test_combustion_stability_audit.TestIntegration.test_acoustic_report_only_by_default(), test_robust_ddp_reference.TestReferenceGeneration.test_altitude_command(), test_robust_ddp_reference.TestReferenceGeneration.test_altitude_command_below_goal(), test_robust_ddp_reference.TestReferenceGeneration.test_build_reference_altitude_mode(), test_robust_ddp_reference.TestReferenceGeneration.test_build_reference_slew_rate(), test_robust_ddp_reference.TestReferenceGeneration.test_build_reference_thrust_mode(), test_combustion_stability_audit.TestIntegration.test_chug_gate_is_the_gain_margin_band_minimum(), test_robust_ddp_safety_filter.TestSafetyFilter.test_compute_action_cost(), test_controller_integration(), test_robust_ddp_reference.TestReferenceGeneration.test_estimate_thrust_bounds(), test_robust_ddp_safety_filter.TestSafetyFilter.test_filter_action_clamping(), test_robust_ddp_safety_filter.TestSafetyFilter.test_filter_action_safe(), test_robust_ddp_safety_filter.TestSafetyFilter.test_filter_action_unsafe_mr(), test_robust_ddp_safety_filter.TestSafetyFilter.test_filter_action_unsafe_ullage(), test_robust_ddp_safety_filter.TestSafetyFilter.test_find_best_safe_action(), test_robust_ddp_ddp_solver.TestDDPSolver.test_forward_rollout(), test_robust_ddp_safety_filter.TestSafetyFilter.test_generate_action_candidates(), test_robust_ddp_identify.TestParameterIdentification.test_get_params(), test_robust_ddp_identify.TestParameterIdentification.test_identify_alpha_F(), test_robust_ddp_identify.TestParameterIdentification.test_identify_alpha_O(), test_robust_ddp_identify.TestParameterIdentification.test_identify_copv_coefficients(), test_robust_ddp_identify.TestParameterIdentification.test_identify_tau_line_F(), test_robust_ddp_identify.TestParameterIdentification.test_identify_tau_line_O(), test_combustion_stability_audit.TestIntegration.test_missing_injector_drop_is_recorded_and_zero_is_zero(), test_combustion_stability_audit.TestIntegration.test_model_error_fails_closed(), test_robust_ddp_identify.TestParameterIdentification.test_parameter_bounds(), test_robust_ddp_reference.TestReferenceGeneration.test_project_thrust_bounds(), test_robust_ddp_reference.TestReferenceGeneration.test_project_thrust_slew_rate(), test_robust_ddp_ddp_solver.TestDDPSolver.test_running_cost(), test_robust_ddp_ddp_solver.TestDDPSolver.test_running_cost_with_errors(), test_robust_ddp_safety_filter.TestSafetyFilter.test_tube_violates_constraints_copv_min(), test_robust_ddp_safety_filter.TestSafetyFilter.test_tube_violates_constraints_mr(), test_robust_ddp_safety_filter.TestSafetyFilter.test_tube_violates_constraints_safe(), test_robust_ddp_safety_filter.TestSafetyFilter.test_tube_violates_constraints_ullage_max(), and test_robust_ddp_identify.TestParameterIdentification.test_update_config().
| test_robust_ddp_controller_integration.TestControllerIntegration.controller = RobustDDPController(self.cfg, self.engine_config) |
Definition at line 65 of file test_robust_ddp_controller_integration.py.
Referenced by test_controller_integration().
| test_robust_ddp_controller_integration.TestControllerIntegration.dynamics_params = DynamicsParams.from_config(self.cfg) |
Definition at line 83 of file test_robust_ddp_controller_integration.py.
Referenced by _simulate_dynamics().
| PintleEngineConfig test_robust_ddp_controller_integration.TestControllerIntegration.engine_config = self._create_minimal_engine_config() |
Definition at line 62 of file test_robust_ddp_controller_integration.py.
| test_robust_ddp_controller_integration.TestControllerIntegration.F_ref = 5000.0 |
Definition at line 80 of file test_robust_ddp_controller_integration.py.
Referenced by test_controller_integration().
| test_robust_ddp_controller_integration.TestControllerIntegration.x0 |
Definition at line 68 of file test_robust_ddp_controller_integration.py.
Referenced by test_robust_ddp_dynamics.TestDynamics.test_blowdown_decreases_pressure(), test_robust_ddp_dynamics.TestDynamics.test_control_clamping(), test_controller_integration(), test_robust_ddp_dynamics.TestDynamics.test_copv_blowdown(), test_robust_ddp_dynamics.TestDynamics.test_feed_pressure_lag(), test_robust_ddp_dynamics.TestDynamics.test_linearize_accuracy(), test_robust_ddp_dynamics.TestDynamics.test_linearize_shape(), test_robust_ddp_dynamics.TestDynamics.test_pressurization_increases_pressure(), test_robust_ddp_dynamics.TestDynamics.test_regulator_behavior(), test_robust_ddp_dynamics.TestDynamics.test_state_non_negative(), test_robust_ddp_dynamics.TestDynamics.test_step_basic(), test_robust_ddp_dynamics.TestDynamics.test_ullage_volume_increases(), and test_robust_ddp_dynamics.TestDynamics.test_zero_mass_flow().