The FirstOrderTransferFunction class implements a first order time discrete transfer function using bilinear transform.
More...
|
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 FirstOrderTransferFunction class implements a first order time discrete transfer function using bilinear transform.
To declare a filter like
the syntax is filter.setNumDen(num, den) where , and ,
◆ backup()
Pushes a backup of transfer function states into the backup buffer.
- Note
- Only the delayed states are backed up, not the current value or the coefficients
◆ isSaturated()
bool isSaturated |
( |
| ) |
const |
Check if the transfer function is saturated (has reached the set limits)
- Returns
- true or false
◆ restoreBackup()
void restoreBackup |
( |
size_t | nSteps = 1 | ) |
|
Restore the backup at the given step.
- Parameters
-
[in] | nSteps | The number of steps backwards in time to restore (1=last step) must be >=1 |
- Note
- The function assumes that the backup buffer has been allocated
- See also
- setBackupLength
◆ setBackupLength()
void setBackupLength |
( |
size_t | nSteps | ) |
|
Setup the number of backup steps to remember (size of the backup buffer)
- Parameters
-
[in] | nSteps | The number of steps to remember |
◆ update()
double update |
( |
double | u | ) |
|
Updates the transfer function.
- Parameters
-
- Returns
- The current transfer function output value after update
◆ updateWithBackup()
double updateWithBackup |
( |
double | u | ) |
|
Make a backup of states and then calls update.
- Parameters
-
- Returns
- The current transfer function output value after update
◆ value()
Read current transfer function output value.
- Returns
- The filtered actual value.