Class implementing a Three-Node Thermal Model for estimating internal motor temperatures, through fastcat.
More...
#include "three_node_thermal_model.h"
Class implementing a Three-Node Thermal Model for estimating internal motor temperatures, through fastcat.
◆ ThreeNodeThermalModel()
| fastcat::ThreeNodeThermalModel::ThreeNodeThermalModel |
( |
| ) |
|
◆ ConfigFromYaml()
| bool fastcat::ThreeNodeThermalModel::ConfigFromYaml |
( |
const YAML::Node & |
node | ) |
|
|
overridevirtual |
Parses input yaml file to set model constants and temperature limits.
- Parameters
-
| node | The portion of the yaml file corresponding to this device. |
- Returns
- True if configuration completes without error; false otherwise.
Implements fastcat::DeviceBase.
◆ Process()
| FaultType fastcat::ThreeNodeThermalModel::Process |
( |
| ) |
|
|
overridevirtual |
Performs one update step of the thermal prediction model, tracking the most recently predicted temperature values at each node, and reporting a fault if any of the limits are exceeded.
- Returns
- FaultType enum value corresponding to appropriate fault state.
Reimplemented from fastcat::DeviceBase.
◆ Read()
| bool fastcat::ThreeNodeThermalModel::Read |
( |
| ) |
|
|
overridevirtual |
Reads in most recent temperature and current signal values, and stores them for further calculations.
- Returns
- True if device state is read without error; false otherwise.
Implements fastcat::DeviceBase.
◆ Write()
Commands device Currently, only the SEED_THERMAL_MODEL_TEMPERATURE_CMD, used to reseed the model is accepted.
- Parameters
-
| cmd | Command provided to the device, of a type that is a subclass of DeviceCmd |
- Returns
- boolean for if the command was accepted and successful or not
Reimplemented from fastcat::DeviceBase.
◆ awaiting_seed_temp_
| bool fastcat::ThreeNodeThermalModel::awaiting_seed_temp_ {false} |
|
protected |
this variable is used to delay setting initial temperatures until we read the first temperature for node 3 and sets all nodes to that starting temperature
◆ exp_smoothing_alpha_
| double fastcat::ThreeNodeThermalModel::exp_smoothing_alpha_ {1.0} |
|
protected |
this parameter specifies the extent to which smoothing is applied to the temperature sensor value
◆ FC_TNTM_NUM_SIGNALS
◆ k1_
| double fastcat::ThreeNodeThermalModel::k1_ {0.0} |
|
protected |
◆ k2_
| double fastcat::ThreeNodeThermalModel::k2_ {0.0} |
|
protected |
◆ k3_
| double fastcat::ThreeNodeThermalModel::k3_ {0.0} |
|
protected |
◆ max_allowable_temps_
| std::vector<double> fastcat::ThreeNodeThermalModel::max_allowable_temps_ {0.0, 0.0, 0.0, 0.0} |
|
protected |
◆ motor_current_
| double fastcat::ThreeNodeThermalModel::motor_current_ |
|
protected |
Initial value:
this value is retrieved from a motor controller measurement
◆ MOTOR_CURRENT_IDX
◆ motor_on_status_
| bool fastcat::ThreeNodeThermalModel::motor_on_status_ |
|
protected |
Initial value:
this value is retrieved from the motor controller status
◆ MOTOR_ON_STATUS_IDX
◆ motor_res_
| double fastcat::ThreeNodeThermalModel::motor_res_ {0.0} |
|
protected |
this value is estimated based on the temp 1 estimate and represents the resistance of the motor, which is used for calculated power
◆ NODE_3_TEMP_IDX
◆ node_overtemp_persistences_
| std::vector<size_t> fastcat::ThreeNodeThermalModel::node_overtemp_persistences_ |
|
protected |
Initial value:this is used as a counter for how many cycles node 1 has been over the temperature limit
◆ node_temps_
| std::vector<double> fastcat::ThreeNodeThermalModel::node_temps_ |
|
protected |
Initial value:this value is estimated from the model and represents winding temperature
◆ persistence_limit_
| uint32_t fastcat::ThreeNodeThermalModel::persistence_limit_ |
|
protected |
Initial value:
be exceeded before throwing a fault
represents how many time cycles a temperature limit is able to
◆ ref_temp_
| double fastcat::ThreeNodeThermalModel::ref_temp_ {0.0} |
|
protected |
the reference temperature for the winding resistance parameter, along with being used for calculating the dynamically varying resistance
◆ thermal_mass_node_1_off_
| double fastcat::ThreeNodeThermalModel::thermal_mass_node_1_off_ {0.0} |
|
protected |
◆ thermal_mass_node_1_on_
| double fastcat::ThreeNodeThermalModel::thermal_mass_node_1_on_ {0.0} |
|
protected |
◆ thermal_mass_node_2_
| double fastcat::ThreeNodeThermalModel::thermal_mass_node_2_ {0.0} |
|
protected |
◆ thermal_res_nodes_1_to_2_
| double fastcat::ThreeNodeThermalModel::thermal_res_nodes_1_to_2_ |
|
protected |
Initial value:
thermal resistance from node 1 to 2 (deg C / W)
◆ thermal_res_nodes_2_to_3_
| double fastcat::ThreeNodeThermalModel::thermal_res_nodes_2_to_3_ |
|
protected |
Initial value:
thermal resistance from node 2 to 3 (deg C / W)
◆ winding_res_
| double fastcat::ThreeNodeThermalModel::winding_res_ {0.0} |
|
protected |
motor winding electrical resistance (ohms)
◆ winding_thermal_cor_
| double fastcat::ThreeNodeThermalModel::winding_thermal_cor_ {0.0} |
|
protected |
coefficient of resistance
The documentation for this class was generated from the following files: