• 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

  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - CDP Core
  • Integrator
  • 4.11.3

Integrator Class

The integrator class produces an integral of the input signal. More...

Header: #include <Filter/Filter.h>
Inherits: CDPBaseObject
  • List of all members, including inherited members

Public Functions

Integrator()
double GetGti()
double Getk()
void Init(double Gti, double yMin, double yMax, double k = 1)
virtual double Integrate(double x)
void SetGti(double Gti)
void SetLimits(double min, double max)
void SetValue(double newValue)
void Setk(double newk)
double Value()

Reimplemented Public Functions

virtual void Create(const char *shortName, CDPBaseObject *pParent)
virtual std::string GetNodeTypeName() const override
  • 42 public functions inherited from CDPBaseObject
  • 26 public functions inherited from CDP::StudioAPI::CDPNode
  • 22 public functions inherited from CDP::StudioAPI::ICDPNode

Additional Inherited Members

  • 1 static public member inherited from CDPBaseObject
  • 1 protected function inherited from CDP::StudioAPI::CDPNode
  • 9 protected variables inherited from CDPBaseObject

Detailed Description

The integrator class produces an integral of the input signal.

See also Init(), Integrate(), IIRFilter, and RateLimitedFilter.

Member Function Documentation

Integrator::Integrator()

Set default values to prevent errors if Init() has not been called.

[virtual] void Integrator::Create(const char *shortName, CDPBaseObject *pParent)

Reimplemented from CDPBaseObject::Create().

Create the integrator with a shortName and a pParent object.

double Integrator::GetGti()

Returns Gti parameter

[override virtual] std::string Integrator::GetNodeTypeName() const

Reimplemented from ICDPNode::GetNodeTypeName().

Returns "Integrator"

double Integrator::Getk()

Returns k parameter

void Integrator::Init(double Gti, double yMin, double yMax, double k = 1)

Initialize integrator, set Gti integrator gain, yMin minimum output value limit and yMax maximum output value limit. The k integrator gain is set to 1 by default. This function can also be used to reset the Integrator output.

[virtual] double Integrator::Integrate(double x)

Integrates x. The output is calculated in following way: y = k * y_n + Gti * x, where x is input and y_n is the previous output value. The output is limited within a minimum and a maximum value. Should be called periodically to run the integrator. The method returns the new output value.

Note: To read the output more than once each period, use Value() method to prevent the integrator from calculating a new value.

void Integrator::SetGti(double Gti)

Sets Gti parameter.

void Integrator::SetLimits(double min, double max)

Sets integrator limits min and max

void Integrator::SetValue(double newValue)

Sets current output value to newValue.

void Integrator::Setk(double newk)

Sets k parameter.

double Integrator::Value()

Returns current output value without calculating new.

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

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

    © Copyright 2022 CDP Technologies. Privacy and cookie policy.

    Return to top