MotorLifeByTempMath Class
(Equipment::MotorLifeByTempMath)Estimates remaining motor life from temperature samples. More...
| Header: | #include <MotorLifeByTempMath> |
| Inherits: | CustomMetricMath |
Public Functions
Reimplemented Public Functions
| virtual void | Consume(const std::vector<MetricEvent> &events) override |
| virtual void | Create(const char *shortName, CDPBaseObject *parent) override |
| virtual void | Destroy() override |
| virtual void | FinishWindow() override |
| virtual void | InitDone() override |
| virtual void | Initialize(int measureType, const std::vector<MetricChannelSpec> &channels, const MetricOptions &opts, IMetricPropertyFactory &factory, const MetricCallbacks &callbacks) override |
| virtual void | StartWindow(uint64_t fromTs, uint64_t toTs) override |
- 4 public functions inherited from CustomMetricMath
- 50 public functions inherited from CDPBaseObject
- 5 public functions inherited from MetricMathBase
- 30 public functions inherited from CDP::StudioAPI::CDPNode
- 5 public functions inherited from IMetricMath
- 25 public functions inherited from CDP::StudioAPI::ICDPNode
Additional Inherited Members
- 1 static public member inherited from CustomMetricMath
- 1 static public member inherited from CDPBaseObject
- 10 protected functions inherited from MetricMathBase
- 1 protected function inherited from CDP::StudioAPI::CDPNode
- 10 protected variables inherited from CDPBaseObject
- 10 protected variables inherited from MetricMathBase
Detailed Description
Estimates remaining motor life from temperature samples.
This custom metric math integrates a normalized damage value over time based on a temperature dependent lifetime model:
- LifetimeHours(T) = ReferenceLifetimeHours * 2^((ReferenceTemperatureC - T) / 10)
- AgingRate = 1 / LifetimeHours(T) (units: 1/hour)
- Damage += AgingRate * Δt (Δt computed from nanoseconds timestamps)
- RemainingLifeHours = (1 - Damage) / AgingRate
Model attributes
| Name | Description |
|---|---|
| ReferenceLifetimeHours | Reference lifetime at ReferenceTemperatureC (hours). |
| ReferenceTemperatureC | Reference temperature (°C). |
| InitialDamage | Initial damage fraction [0..1] used when no saved state exists and on Reset. |
Outputs
| Property | Description |
|---|---|
| Damage | Accumulated damage fraction [0..1] (saved). |
| AgingRate | Current aging rate (1/hour). |
| LifetimeHours | Temperature dependent lifetime estimate (hours). |
| RemainingLifeHours | Instantaneous remaining life if temperature stayed constant (hours). |
Member Function Documentation
MotorLifeByTempMath::MotorLifeByTempMath()
Default constructs an instance of MotorLifeByTempMath.
[override virtual] void MotorLifeByTempMath::Consume(const std::vector<MetricEvent> &events)
Reimplemented from IMetricMath::Consume().
[override virtual] void MotorLifeByTempMath::Create(const char *shortName, CDPBaseObject *parent)
Reimplemented from CDPBaseObject::Create().
[override virtual] void MotorLifeByTempMath::Destroy()
Reimplemented from CDPBaseObject::Destroy().
[override virtual] void MotorLifeByTempMath::FinishWindow()
Reimplemented from IMetricMath::FinishWindow().
[override virtual] void MotorLifeByTempMath::InitDone()
Reimplemented from IMetricMath::InitDone().
[override virtual] void MotorLifeByTempMath::Initialize(int measureType, const std::vector<MetricChannelSpec> &channels, const MetricOptions &opts, IMetricPropertyFactory &factory, const MetricCallbacks &callbacks)
Reimplemented from IMetricMath::Initialize().
[override virtual] void MotorLifeByTempMath::StartWindow(uint64_t fromTs, uint64_t toTs)
Reimplemented from IMetricMath::StartWindow().
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.