• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • CDP Linux
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - Equipment
  • MotorLifeByTempMath
  • 5.1.0

MotorLifeByTempMath Class

(Equipment::MotorLifeByTempMath)

Estimates remaining motor life from temperature samples. More...

Header: #include <MotorLifeByTempMath>
Inherits: CustomMetricMath
  • List of all members, including inherited members

Public Functions

MotorLifeByTempMath()

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

NameDescription
ReferenceLifetimeHoursReference lifetime at ReferenceTemperatureC (hours).
ReferenceTemperatureCReference temperature (°C).
InitialDamageInitial damage fraction [0..1] used when no saved state exists and on Reset.

Outputs

PropertyDescription
DamageAccumulated damage fraction [0..1] (saved).
AgingRateCurrent aging rate (1/hour).
LifetimeHoursTemperature dependent lifetime estimate (hours).
RemainingLifeHoursInstantaneous 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().

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2026 CDP Technologies. Privacy and cookie policy.

Return to top