RateLimitedFilter Class

The RateLimitedFilter class is a rate limited output nonlinear filter. More...

Header: #include <Filter/Filter.h>
Inherits: CDPBaseObject

Public Functions

RateLimitedFilter()
double Calculate(double x)
double GetYdt()
void Init(double ydtMax, double period)
void SetValue(double newValue)
void SetdYdt(double ydtMax)
double Value()

Reimplemented Public Functions

virtual void Create(const char *shortName, CDPBaseObject *pParent)
virtual std::string GetNodeTypeName() const override

Additional Inherited Members

Detailed Description

The RateLimitedFilter class is a rate limited output nonlinear filter.

See also IIRFilter and Integrator.

Member Function Documentation

RateLimitedFilter::RateLimitedFilter()

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

double RateLimitedFilter::Calculate(double x)

Calculates new output value based on x. This function must be called exactly once every process period for the filter to behave correctly. Call periodically.

Note: To read the output more than once each period, use Value() method to prevent a new output from being calculated again.

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

Reimplemented from CDPBaseObject::Create().

Creates the fiter with shortName and pParent as parent object.

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

Reimplemented from ICDPNode::GetNodeTypeName().

Returns "RateLimitedFilter"

double RateLimitedFilter::GetYdt()

Returns maximum output change per second

void RateLimitedFilter::Init(double ydtMax, double period)

Initializes the filter. Sets ydtMax to maximum output rate change per second, and set the period to the sample interval (1/Hz) This function can also be used to reset the filter memory and output.

void RateLimitedFilter::SetValue(double newValue)

Sets the output directly from newValue

void RateLimitedFilter::SetdYdt(double ydtMax)

Sets maximum output change per second from ydtMax

double RateLimitedFilter::Value()

Returns current output value.

© CDP Technologies AS - All rights reserved