|
| | ProportionalIntegralController (const std::string &symbol, const std::vector< double > &value, int number_signals, std::vector< double > refs={ 0 }) |
| | Construct a PI controller.
|
| |
| void | updateParameters (double newKp, double newKi, double newZeta, double newBandwidth) |
| | Replace Kp, Ki, damping ratio, and bandwidth.
|
| |
| virtual Eigen::VectorXd | define_equations (const Eigen::VectorXd &x, const Eigen::VectorXd &u, const Eigen::VectorXd &c) override |
| | Vector PI-controller dynamics.
|
| |
| virtual Eigen::VectorXd | define_equations (const double x, const double u, const double c) override |
| | Scalar PI-controller dynamics.
|
| |
| virtual void | printValues () override |
| | Print controller type, gains, damping, bandwidth, and references.
|
| |
| double | getKp () const |
| | Return the proportional gain Kp.
|
| |
| double | getKi () const |
| | Return the integral gain Ki.
|
| |
| double | getZeta () const |
| | Return the damping ratio.
|
| |
| double | getBandwidth () const |
| | Return the bandwidth (Hz).
|
| |
| virtual vector< double > | getParameters () const override |
| | Return { Kp, Ki, zeta, bandwidth }.
|
| |
| virtual void | setParameters (const vector< double > ¶ms) override |
| | Set parameters from { Kp, Ki, zeta, bandwidth }.
|
| |
| | Controller (const std::string &symbol, const vector< double > &value, int number_signals, std::vector< double > refs={ 0 }) |
| | Construct a controller with reference setpoints.
|
| |
| void | setReference (const std::vector< double > &ref) |
| | Replace all reference setpoints.
|
| |
| void | setReference (const double ref, int i) |
| | Set one reference channel.
|
| |
| std::vector< double > | getReference () const |
| | Return a copy of the current reference vector.
|
| |
| std::string | getControllerSymbol () const |
| | Return the controller symbol/name.
|
| |
| int | getNumberOfSignals () const |
| | Return the number of control channels.
|
| |
| virtual | ~Controller ()=default |
| |
PI controller with optional damping and bandwidth metadata.
Output per channel: Kp * error + Ki * integrator_state + c.
| Eigen::VectorXd ProportionalIntegralController::define_equations |
( |
const double |
x, |
|
|
const double |
u, |
|
|
const double |
c |
|
) |
| |
|
overridevirtual |
Scalar PI-controller dynamics.
Defines the differential equations for a scalar PI controller.
- Parameters
-
| x | Integrator state. |
| u | Measured input value. |
| c | Feed-forward output value. |
- Returns
- Vector containing state derivative and controller output.
This function computes the error between the reference and input, updates the integrator state, and calculates the PI controller output. The returned vector contains the state derivative and controller output.
- Parameters
-
| x | Integrator state (scalar). |
| u | Input (measured) value. |
| c | Constant/reference output signal. |
- Returns
- Eigen::VectorXd Vector containing state derivative and controller output.
Reimplemented from Controller.
References Controller::reference.
| Eigen::VectorXd ProportionalIntegralController::define_equations |
( |
const Eigen::VectorXd & |
x, |
|
|
const Eigen::VectorXd & |
u, |
|
|
const Eigen::VectorXd & |
c |
|
) |
| |
|
overridevirtual |
Vector PI-controller dynamics.
Defines the differential equations for a vector PI controller.
- Parameters
-
| x | Integrator state vector. |
| u | Measured input vector. |
| c | Feed-forward output vector. |
- Returns
- Concatenated state derivatives and controller outputs.
This function computes the error between the reference and input, updates the integrator state, and calculates the PI controller output for each channel. The returned vector concatenates the state derivatives and controller outputs.
- Parameters
-
| x | Integrator state vector. |
| u | Input (measured) vector. |
| c | Constant/reference output signal vector. |
- Returns
- Eigen::VectorXd Concatenated vector of state derivatives and controller outputs.
Reimplemented from Controller.
References Controller::reference.