PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Definition of generic PID controller. More...
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | PID_t |
Typedefs | |
typedef __BEGIN_DECLS enum PID_MODE | pid_mode_t |
Enumerations | |
enum | PID_MODE { PID_MODE_DERIVATIV_NONE = 0, PID_MODE_DERIVATIV_CALC, PID_MODE_DERIVATIV_CALC_NO_SP, PID_MODE_DERIVATIV_SET } |
Functions | |
__EXPORT void | pid_init (PID_t *pid, pid_mode_t mode, float dt_min) |
__EXPORT int | pid_set_parameters (PID_t *pid, float kp, float ki, float kd, float integral_limit, float output_limit) |
__EXPORT float | pid_calculate (PID_t *pid, float sp, float val, float val_dot, float dt) |
__EXPORT void | pid_reset_integral (PID_t *pid) |
Definition of generic PID controller.
Definition in file pid.h.
typedef __BEGIN_DECLS enum PID_MODE pid_mode_t |
enum PID_MODE |
Definition at line 113 of file pid.cpp.
References dt, PID_t::dt_min, PID_t::error_previous, PID_t::integral, PID_t::integral_limit, PID_t::kd, PID_t::ki, PID_t::kp, PID_t::last_output, PID_t::mode, PID_t::output_limit, PID_MODE_DERIVATIV_CALC, PID_MODE_DERIVATIV_CALC_NO_SP, PID_MODE_DERIVATIV_SET, and SIGMA.
Referenced by RoverPositionControl::control_position(), and RoverPositionControl::control_velocity().
__EXPORT void pid_init | ( | PID_t * | pid, |
pid_mode_t | mode, | ||
float | dt_min | ||
) |
Definition at line 57 of file pid.cpp.
References PID_t::dt_min, PID_t::error_previous, PID_t::integral, PID_t::integral_limit, PID_t::kd, PID_t::ki, PID_t::kp, PID_t::last_output, PID_t::mode, and PID_t::output_limit.
Referenced by RoverPositionControl::~RoverPositionControl().
Definition at line 182 of file pid.cpp.
References PID_t::integral.
__EXPORT int pid_set_parameters | ( | PID_t * | pid, |
float | kp, | ||
float | ki, | ||
float | kd, | ||
float | integral_limit, | ||
float | output_limit | ||
) |
Definition at line 71 of file pid.cpp.
References PID_t::integral_limit, PID_t::kd, PID_t::ki, PID_t::kp, and PID_t::output_limit.
Referenced by RoverPositionControl::~RoverPositionControl().