test_motorThermal
- test_motorThermal.test_motorThermal(show_plots, accuracy)[source]
Validation Test Description
This unit test script tests the temperature modelling of a general motor (in this case a reaction wheel). It sets up the reaction wheel and runs 4 test scenarios:
Nominal: the motor starts at the same temperature as the air surrounding it (20 degrees Celsius).
Motor is colder: the motor starts at a lower temperature (0 degrees Celsius) than the ambient temperature (20 degrees Celsius).
Motor is hotter: the motor starts at a higher temperature (20 degrees Celsius) than the ambient temperature (0 degrees Celsius).
Motor is hotter and friction is accounted for: the motor starts at a higher temperature (20 degrees Celsius) than the ambient temperature (0 degrees Celsius) and friction is modelled.
The sole reaction wheel is set up using the reaction wheel state effector, while taking advantage of the ability to change the reaction wheel’s properties on the fly. For simplicity, the torque is constant and set to the maximum value that the reaction wheel can handle. Finally, the temperature modelling comes from this motorThermal module.
The limitations of this test are the same as the ones discussed on the module’s .rst file. also, the value of the accuracy used is the limit for the test to pass.
Test Parameters
- Parameters:
accuracy (float) – absolute accuracy value used in the validation tests
Description of Variables Being Tested
In this file we are checking the values of the variables
rwTemp
which represents the array of motor temperatures. This array is compared to the
truthTemp
array, which contains the true values of the temperature.