1#ifndef BITSIM_CONTROL_PID_CONTROLLER_H
2#define BITSIM_CONTROL_PID_CONTROLLER_H
68 bool is_limited_{
false};
75 bool has_err_old_{
false};
77 std::pair<real_t, real_t> limits_;
84 if (!(limits.first < limits.second))
86 throw std::invalid_argument(
"PIDController: the lower limit must be below the upper one");
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
bool is_limited() const noexcept
Definition pid_controller.h:41
real_t get_kp() const noexcept
Definition pid_controller.h:35
real_t get_kd() const noexcept
Definition pid_controller.h:37
real_t ctrl_signal_type
Definition pid_controller.h:26
PIDController(real_t Kp, real_t Ki, real_t Kd)
Definition pid_controller.h:80
void reset() noexcept
Forget the integral and the last error.
Definition pid_controller.h:59
ctrl_signal_type compute_ctrl_signal(real_t current, real_t target, real_t dt)
Definition pid_controller.cpp:11
real_t integral() const noexcept
Definition pid_controller.h:65
void set_control_limits(std::pair< real_t, real_t > limits)
Limit the output to [limits.first, limits.second].
Definition pid_controller.h:82
real_t get_ki() const noexcept
Definition pid_controller.h:36
Controllers: PID controllers, line following, a quadrotor flight controller, a fixed wing autopilot,...
Definition control_module.h:18
Definition dc_motor_backend_base.h:9
double real_t
real_t
Definition bitsim_types.h:20