![]() |
Documentation
Tools for embedded systems
|
A Smith Predictor implementation for compensating time delays in control systems. More...
#include <ltisys.hpp>
Public Member Functions | |
virtual | ~smithPredictor () |
smithPredictor (ltisys &modelTf, ITransportDelay &mDelay, const real_t initialCondition=0.0_re) | |
Constructs a Smith Predictor with a plant model, delay model, and optional initial output estimate. | |
smithPredictor (customProcessModel modelCustom, ITransportDelay &mDelay, const real_t initialCondition=0.0_re) | |
Constructs a Smith Predictor with a plant model, delay model, and optional initial output estimate. | |
smithPredictor (ltisys &modelTf, ITransportDelay &mDelay, ltisys &filterTf, const real_t initialCondition=0.0_re) | |
Constructs a Smith Predictor with a plant model, delay model, and optional initial output estimate. | |
smithPredictor (customProcessModel modelCustom, ITransportDelay &mDelay, ltisys &filterTf, const real_t initialCondition=0.0_re) | |
Constructs a Smith Predictor with a plant model, delay model, and optional initial output estimate. | |
bool | updatePrediction (const real_t ut, const real_t yt) noexcept |
Updates the internal prediction based on control input and measured plant output. | |
real_t | getPrediction () const noexcept |
Retrieves the current delay-free predicted output of the system. | |
bool | setFilter (ltisys &filterTf) noexcept |
Sets an optional filter for the internal Smith Predictor model. | |
bool | setModelData (void *data) noexcept |
Sets the model data when alternate when a custom delay-free plant model is used. | |
A Smith Predictor implementation for compensating time delays in control systems.
The Smith Predictor is a model-based feedforward control strategy designed to improve performance in systems with significant dead time. It estimates the delay-free output using an internal model of the process, a delay block, and optionally an output filter model.
|
inlinevirtual |
|
inline |
Constructs a Smith Predictor with a plant model, delay model, and optional initial output estimate.
[in] | modelTf | Reference to the LTI system model representing the delay-free plant. |
[in] | mDelay | Reference to the transport delay block modeling the plant’s dead time. |
[in] | initialCondition | Initial value for the internal output prediction (yp_hat ). Default is 0.0. |
|
inline |
Constructs a Smith Predictor with a plant model, delay model, and optional initial output estimate.
[in] | modelCustom | Reference to the system model representing the delay-free plant. User should define a custom function that recreates the system dynamics. |
[in] | mDelay | Reference to the transport delay block modeling the plant’s dead time. |
[in] | initialCondition | Initial value for the internal output prediction (yp_hat ). Default is 0.0. |
|
inline |
Constructs a Smith Predictor with a plant model, delay model, and optional initial output estimate.
[in] | modelTf | Reference to the LTI system model representing the delay-free plant. |
[in] | mDelay | Reference to the transport delay block modeling the plant’s dead time. |
[in] | filterTf | Reference to the LTI system used as the robustness filter. |
[in] | initialCondition | Initial value for the internal output prediction (yp_hat ). Default is 0.0. |
|
inline |
Constructs a Smith Predictor with a plant model, delay model, and optional initial output estimate.
[in] | modelCustom | Reference to the system model representing the delay-free plant. User should define a custom function that recreates the system dynamics. |
[in] | mDelay | Reference to the transport delay block modeling the plant’s dead time. |
[in] | filterTf | Reference to the LTI system used as the robustness filter. |
[in] | initialCondition | Initial value for the internal output prediction (yp_hat ). Default is 0.0. |
|
inlinenoexcept |
Retrieves the current delay-free predicted output of the system.
|
inlinenoexcept |
Sets an optional filter for the internal Smith Predictor model.
The filter is used to improve the system's robustness, attenuate measurement noise, and ensure internal stability, particularly in the case of unstable plant dynamics.
[in] | filterTf | Reference to the LTI system used as the robustness filter. |
true
if the filter was set successfully.
|
inlinenoexcept |
Sets the model data when alternate when a custom delay-free plant model is used.
[in] | data | The data passed to the user-defined model at the moment of evaluation |
true
on success. False otherwise Updates the internal prediction based on control input and measured plant output.
This method should be called at each control step. It updates the internal predicted output by propagating the input through the internal delay-free model and adjusting the prediction using the actual plant output.
[in] | ut | The control input applied to the real plant. |
[in] | yt | The actual measured output from the delayed plant. |
true
if the prediction was successfully updated, false
otherwise.