GearLifeBySpeedAndTorqueMath Class
(Equipment::GearLifeBySpeedAndTorqueMath)Estimates remaining gear life from torque and speed samples. More...
| Header: | #include <GearLifeBySpeedAndTorqueMath> |
| 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 gear life from torque and speed samples.
This custom metric math integrates consumed equivalent life based on a torque/speed dependent damage rate:
- Torque is Measure[0], speed is Measure[1].
- T* = 0 when |T| < TorqueIgnoreThreshold, otherwise T* = |T|.
- DamageRatePerSecond = (T* / NominalTorque)^WohlerExponent * (|n| / NominalSpeed) (units: 1/s)
- ConsumedLifeHours += DamageRatePerSecond * Δt / 3600
- RemainingLifeHours = max(0, NominalLifetimeHours - ConsumedLifeHours)
For window diagnostics it also computes a Wöhler exponent based equivalent torque:
- EquivalentTorque = (Σ(|T|^m * Δt) / Σ(Δt))^(1/m)
- LogTorqueThreshold = 0.5 * EquivalentTorque
When LoggingFlags include S (EverySample), this math requests sink flushes only when |T| >= LogTorqueThreshold.
Model attributes
| Name | Description |
|---|---|
| NominalTorque | Nominal torque (same unit as input torque). |
| NominalSpeed | Nominal speed (same unit as input speed). |
| WohlerExponent | Wöhler exponent (fatigue sensitivity). |
| NominalLifetimeHours | Nominal lifetime in hours. |
| TorqueIgnoreThreshold | Torques with |T| below this threshold are ignored. |
Outputs
| Property | Description |
|---|---|
| RemainingLifeHours | Remaining useful life in hours. |
| ConsumedLifeHours | Accumulated equivalent life consumed in hours (saved). |
| DamageRatePerSecond | Current damage rate (1/s). |
| EquivalentTorque | Damage-equivalent torque over the current window. |
| LogTorqueThreshold | Logging threshold (0.5 * EquivalentTorque). |
Member Function Documentation
GearLifeBySpeedAndTorqueMath::GearLifeBySpeedAndTorqueMath()
Default constructs an instance of GearLifeBySpeedAndTorqueMath.
[override virtual] void GearLifeBySpeedAndTorqueMath::Consume(const std::vector<MetricEvent> &events)
Reimplemented from IMetricMath::Consume().
[override virtual] void GearLifeBySpeedAndTorqueMath::Create(const char *shortName, CDPBaseObject *parent)
Reimplemented from CDPBaseObject::Create().
[override virtual] void GearLifeBySpeedAndTorqueMath::Destroy()
Reimplemented from CDPBaseObject::Destroy().
[override virtual] void GearLifeBySpeedAndTorqueMath::FinishWindow()
Reimplemented from IMetricMath::FinishWindow().
[override virtual] void GearLifeBySpeedAndTorqueMath::InitDone()
Reimplemented from IMetricMath::InitDone().
[override virtual] void GearLifeBySpeedAndTorqueMath::Initialize(int measureType, const std::vector<MetricChannelSpec> &channels, const MetricOptions &opts, IMetricPropertyFactory &factory, const MetricCallbacks &callbacks)
Reimplemented from IMetricMath::Initialize().
[override virtual] void GearLifeBySpeedAndTorqueMath::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.