The FirstOrderLowpassFilter utility is derived from the FirstOrderTransferFunction and extends it with functions useful when creating low-pass filters of the first order.
More...
|
| void | initialize (double timestep, double wc, double u0=0.0, double y0=0.0, double min=-1.5E+300, double max=1.5E+300) |
| | Initialize the filter utility.
|
| |
|
double | breakFrequency () const |
| | Return the break frequency for this filter.
|
| |
|
void | initialize (double timestep, double num[2], double den[2], double u0=0.0, double y0=0.0, double min=-1.5E+300, double max=1.5E+300) |
| |
|
void | initializeValues (double u0, double y0) |
| |
| void | setBackupLength (size_t nSteps) |
| | Setup the number of backup steps to remember (size of the backup buffer)
|
| |
|
void | setMinMax (double min, double max) |
| |
|
void | setNum (double num[2]) |
| |
|
void | setDen (double den[2]) |
| |
|
void | setNumDen (double num[2], double den[2]) |
| |
| void | restoreBackup (size_t nSteps=1) |
| | Restore the backup at the given step.
|
| |
| void | backup () |
| | Pushes a backup of transfer function states into the backup buffer.
|
| |
| double | update (double u) |
| | Updates the transfer function.
|
| |
| double | updateWithBackup (double u) |
| | Make a backup of states and then calls update.
|
| |
| double | value () const |
| | Read current transfer function output value.
|
| |
|
double | delayedU () const |
| |
|
double | delayedY () const |
| |
| bool | isSaturated () const |
| | Check if the transfer function is saturated (has reached the set limits)
|
| |
|
|
double | mValue |
| |
|
double | mDelayedU |
| |
|
double | mDelayedY |
| |
|
double | mCoeffU [2] |
| |
|
double | mCoeffY [2] |
| |
|
double | mMin |
| |
|
double | mMax |
| |
|
double | mTimeStep |
| |
|
bool | mIsSaturated |
| |
|
Delay | mBackupU |
| |
|
Delay | mBackupY |
| |
The FirstOrderLowpassFilter utility is derived from the FirstOrderTransferFunction and extends it with functions useful when creating low-pass filters of the first order.
◆ initialize()
| void initialize |
( |
double | timestep, |
|
|
double | wc, |
|
|
double | u0 = 0.0, |
|
|
double | y0 = 0.0, |
|
|
double | min = -1.5E+300, |
|
|
double | max = 1.5E+300 ) |
Initialize the filter utility.
- Parameters
-
| [in] | timestep | The (fixed) simulation timestep used |
| [in] | wc | The break frequency in rad/s |
| [in] | timestep | The (fixed) simulation timestep used |
| [in] | u0 | Initial input signal |
| [in] | y0 | Initial output value |
| [in] | min | Filter minimum value (saturation) |
| [in] | max | Filter maximum value (saturation) |