1#ifndef FASTCAT_THREE_NODE_THERMAL_MODEL_H_
2#define FASTCAT_THREE_NODE_THERMAL_MODEL_H_
5#include "fastcat/device_base.h"
11#include "fastcat/signal_handling.h"
12#include "fastcat/yaml_parser.h"
13#include "jsd/jsd_print.h"
14#include "jsd/jsd_time.h"
Definition device_base.h:20
Class implementing a Three-Node Thermal Model for estimating internal motor temperatures,...
Definition three_node_thermal_model.h:23
double motor_current_
this value is retrieved from a motor controller measurement
Definition three_node_thermal_model.h:90
uint32_t persistence_limit_
be exceeded before throwing a fault
Definition three_node_thermal_model.h:75
bool Write(DeviceCmd &cmd) override
Commands device Currently, only the SEED_THERMAL_MODEL_TEMPERATURE_CMD, used to reseed the model is a...
Definition three_node_thermal_model.cc:175
static constexpr size_t MOTOR_ON_STATUS_IDX
Definition three_node_thermal_model.h:112
std::vector< double > max_allowable_temps_
Definition three_node_thermal_model.h:74
static constexpr size_t FC_TNTM_NUM_SIGNALS
Definition three_node_thermal_model.h:106
double exp_smoothing_alpha_
Definition three_node_thermal_model.h:81
double ref_temp_
Definition three_node_thermal_model.h:78
double k1_
Definition three_node_thermal_model.h:71
double thermal_res_nodes_2_to_3_
thermal resistance from node 2 to 3 (deg C / W)
Definition three_node_thermal_model.h:67
bool motor_on_status_
this value is retrieved from the motor controller status
Definition three_node_thermal_model.h:92
double thermal_mass_node_2_
Definition three_node_thermal_model.h:64
double thermal_mass_node_1_on_
Definition three_node_thermal_model.h:62
double winding_thermal_cor_
coefficient of resistance
Definition three_node_thermal_model.h:70
ThreeNodeThermalModel()
ThreeNodeThermalModel constructor.
Definition three_node_thermal_model.cc:6
double thermal_mass_node_1_off_
Definition three_node_thermal_model.h:63
bool ConfigFromYaml(const YAML::Node &node) override
Parses input yaml file to set model constants and temperature limits.
Definition three_node_thermal_model.cc:12
std::vector< size_t > node_overtemp_persistences_
Definition three_node_thermal_model.h:100
double k2_
Definition three_node_thermal_model.h:71
double thermal_res_nodes_1_to_2_
thermal resistance from node 1 to 2 (deg C / W)
Definition three_node_thermal_model.h:65
static constexpr size_t NODE_3_TEMP_IDX
Definition three_node_thermal_model.h:108
bool awaiting_seed_temp_
Definition three_node_thermal_model.h:84
double k3_
weights for T4 estimate
Definition three_node_thermal_model.h:71
bool Read() override
Reads in most recent temperature and current signal values, and stores them for further calculations.
Definition three_node_thermal_model.cc:106
double motor_res_
Definition three_node_thermal_model.h:94
std::vector< double > node_temps_
Definition three_node_thermal_model.h:97
static constexpr size_t MOTOR_CURRENT_IDX
Definition three_node_thermal_model.h:110
double winding_res_
motor winding electrical resistance (ohms)
Definition three_node_thermal_model.h:69
FaultType Process() override
Performs one update step of the thermal prediction model, tracking the most recently predicted temper...
Definition three_node_thermal_model.cc:132
Definition device_base.h:18