$search

ethercat_hardware::MotorHeatingModel Class Reference

#include <motor_heating_model.h>

Inheritance diagram for ethercat_hardware::MotorHeatingModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

double calculateMotorHeatPower (const ethercat_hardware::MotorTraceSample &sample, const ethercat_hardware::ActuatorInfo &actuator_info)
void diagnostics (diagnostic_updater::DiagnosticStatusWrapper &d)
 Appends heating diagnostic data to status wrapper.
double getHousingTemperature ()
 Gets current winding temperature estimate (for testing).
double getWindingTemperature ()
 Gets current winding temperature estimate (for testing).
bool hasOverheated () const
 Not thread save, should be called by same thread that calls update().
bool loadTemperatureState ()
 Load saved temperature estimate from directory.
 MotorHeatingModel (const MotorHeatingModelParameters &motor_params, const std::string &actuator_name, const std::string &hwid, const std::string &save_directory)
 Constructor.
void reset ()
 Resets motor overheat flag.
bool saveTemperatureState ()
bool startTemperaturePublisher ()
bool update (const ethercat_hardware::MotorTraceSample &sample, const ethercat_hardware::ActuatorInfo &actuator_info, double ambient_temperature, double duration)
bool update (double heating_power, double ambient_temperature, double duration)
 Updates motor temperature estimate.
void updateFromDowntime (double downtime, double saved_ambient_temperature)
 Updates estimated motor temperature for long period of off-time.
double updateFromDowntimeWithInterval (double downtime, double saved_ambient_temperature, double interval, unsigned cycles)
 Updates estimated motor temperature for certain amount of downtime.

Protected Attributes

std::string actuator_name_
 name of actuator (ex. fl_caster_rotation_motor)
double ambient_temperature_
 Last recorded ambient temperature : in Celcius.
double ambient_temperature_sum_
 Sum of (abient heat * time) over last sample interval.
double duration_since_last_sample_
 Time (in seconds) since late sample interval occurred.
double heating_energy_sum_
 Sum of heat energy for last sample interval.
double housing_temperature_
 Temperature estimate of motor housing : in Celcius.
double housing_thermal_mass_inverse_
 Inverse of thermal mass for motor housing : in Joules/C.
double housing_to_ambient_thermal_conductance_
 Thermal conductance between motor housing and ambient : in Watt/C.
std::string hwid_
 Hardware ID of device (ex. 680500501000).
MotorHeatingModelParameters motor_params_
boost::mutex mutex_
 mutex protects values updates by realtime thread and used by diagnostics thread
bool overheat_
 True if most has overheat, once set, will only clear when reset() is called.
realtime_tools::RealtimePublisher
< ethercat_hardware::MotorTemperature > * 
publisher_
 Sample interval for trace (in seconds).
std::string save_filename_
 path to file where temperature data will be saved
double winding_temperature_
 Temperature estimate of motor winding : in Celcius.
double winding_thermal_mass_inverse_
 Inverse of thermal mass for motor winding : in Joules/C.
double winding_to_housing_thermal_conductance_
 Thermal conductance between motor winding and housing : in Watt/C.

Detailed Description

Definition at line 153 of file motor_heating_model.h.


Constructor & Destructor Documentation

ethercat_hardware::MotorHeatingModel::MotorHeatingModel ( const MotorHeatingModelParameters motor_params,
const std::string &  actuator_name,
const std::string &  hwid,
const std::string &  save_directory 
)

Constructor.

Parameters:
motor_params Heating parameters used by motor heating model
actuator_name Name of actuator (ex: fl_caster_roataion_motor)
save_directory Directory where motor temperature will be routinely saved
device_position Position of device on EtherCAT chain. Used to prevent multiple motor models from saving at same time

Definition at line 214 of file motor_heating_model.cpp.


Member Function Documentation

double ethercat_hardware::MotorHeatingModel::calculateMotorHeatPower ( const ethercat_hardware::MotorTraceSample sample,
const ethercat_hardware::ActuatorInfo actuator_info 
)

Determines power being put into motor as heat (in Watts)

Definition at line 272 of file motor_heating_model.cpp.

void ethercat_hardware::MotorHeatingModel::diagnostics ( diagnostic_updater::DiagnosticStatusWrapper d  ) 

Appends heating diagnostic data to status wrapper.

Definition at line 397 of file motor_heating_model.cpp.

double ethercat_hardware::MotorHeatingModel::getHousingTemperature (  )  [inline]

Gets current winding temperature estimate (for testing).

Definition at line 189 of file motor_heating_model.h.

double ethercat_hardware::MotorHeatingModel::getWindingTemperature (  )  [inline]

Gets current winding temperature estimate (for testing).

Definition at line 187 of file motor_heating_model.h.

bool ethercat_hardware::MotorHeatingModel::hasOverheated (  )  const [inline]

Not thread save, should be called by same thread that calls update().

Definition at line 185 of file motor_heating_model.h.

bool ethercat_hardware::MotorHeatingModel::loadTemperatureState (  ) 

Load saved temperature estimate from directory.

Definition at line 555 of file motor_heating_model.cpp.

void ethercat_hardware::MotorHeatingModel::reset (  ) 

Resets motor overheat flag.

Definition at line 388 of file motor_heating_model.cpp.

bool ethercat_hardware::MotorHeatingModel::saveTemperatureState (  ) 

Saves current temperature estimate to file given directory.

Filename will be named : <actuator_name>_motor_temp Update of file should be atomic.

Definition at line 669 of file motor_heating_model.cpp.

bool ethercat_hardware::MotorHeatingModel::startTemperaturePublisher (  ) 

Definition at line 254 of file motor_heating_model.cpp.

bool ethercat_hardware::MotorHeatingModel::update ( const ethercat_hardware::MotorTraceSample sample,
const ethercat_hardware::ActuatorInfo actuator_info,
double  ambient_temperature,
double  duration 
) [inline]

Definition at line 176 of file motor_heating_model.h.

bool ethercat_hardware::MotorHeatingModel::update ( double  heating_power,
double  ambient_temperature,
double  duration 
)

Updates motor temperature estimate.

This uses motor data to determine how much heat power was put into motor over last control cycle. The control cycle is assumed to be relatively short so the update is done as a linear estimation of differential equation

Returns true if motor winding temperature is below acceptable limit, false if motor has overheated and halting enabled.

Definition at line 309 of file motor_heating_model.cpp.

void ethercat_hardware::MotorHeatingModel::updateFromDowntime ( double  downtime,
double  saved_ambient_temperature 
)

Updates estimated motor temperature for long period of off-time.

Between runs of this program the motor temperature estimate is stored to a file. When the program is run again this saved temperature estimate needs to be updated base on time between runs. This function makes the assumption that no power was being put into motor between runs.

Because the motor may have been disabled for a long time, this function does not always use a interative approach to calculate new temperature

Definition at line 361 of file motor_heating_model.cpp.

double ethercat_hardware::MotorHeatingModel::updateFromDowntimeWithInterval ( double  downtime,
double  saved_ambient_temperature,
double  interval,
unsigned  cycles 
)

Updates estimated motor temperature for certain amount of downtime.

Runs motor temperture simulation with a certain step interval and for a given number of cycles. Will stop early if downtime reaches 0. Returns remaining downtime

Definition at line 337 of file motor_heating_model.cpp.


Member Data Documentation

name of actuator (ex. fl_caster_rotation_motor)

Definition at line 296 of file motor_heating_model.h.

Last recorded ambient temperature : in Celcius.

Definition at line 276 of file motor_heating_model.h.

Sum of (abient heat * time) over last sample interval.

Definition at line 287 of file motor_heating_model.h.

Time (in seconds) since late sample interval occurred.

Definition at line 289 of file motor_heating_model.h.

Sum of heat energy for last sample interval.

Definition at line 285 of file motor_heating_model.h.

Temperature estimate of motor housing : in Celcius.

Definition at line 274 of file motor_heating_model.h.

Inverse of thermal mass for motor housing : in Joules/C.

Definition at line 268 of file motor_heating_model.h.

Thermal conductance between motor housing and ambient : in Watt/C.

Definition at line 264 of file motor_heating_model.h.

Hardware ID of device (ex. 680500501000).

Definition at line 298 of file motor_heating_model.h.

Definition at line 295 of file motor_heating_model.h.

mutex protects values updates by realtime thread and used by diagnostics thread

Definition at line 279 of file motor_heating_model.h.

True if most has overheat, once set, will only clear when reset() is called.

Definition at line 282 of file motor_heating_model.h.

Sample interval for trace (in seconds).

realtime publisher for MotorHeatingSample

Definition at line 293 of file motor_heating_model.h.

path to file where temperature data will be saved

Definition at line 297 of file motor_heating_model.h.

Temperature estimate of motor winding : in Celcius.

Definition at line 272 of file motor_heating_model.h.

Inverse of thermal mass for motor winding : in Joules/C.

Definition at line 266 of file motor_heating_model.h.

Thermal conductance between motor winding and housing : in Watt/C.

Definition at line 262 of file motor_heating_model.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


ethercat_hardware
Author(s): Rob Wheeler (email: wheeler@willowgarage.com), Maintained by Derek King (email: dking@willowgarage.com)
autogenerated on Fri Mar 1 16:52:23 2013