bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
bitrl::control::PIDController Class Reference

PID controller implementation. More...

#include <pid_controller.h>

Public Types

typedef real_t ctrl_signal_type
 

Public Member Functions

 PIDController (real_t Kp, real_t Ki, real_t Kd)
 
real_t get_kp () const noexcept
 
real_t get_ki () const noexcept
 
real_t get_kd () const noexcept
 
bool is_limited () const noexcept
 
void set_control_limits (std::pair< real_t, real_t > limits)
 
ctrl_signal_type compute_ctrl_signal (real_t current, real_t target, real_t dt)
 

Detailed Description

PID controller implementation.

Member Typedef Documentation

◆ ctrl_signal_type

Constructor & Destructor Documentation

◆ PIDController()

bitrl::control::PIDController::PIDController ( real_t  Kp,
real_t  Ki,
real_t  Kd 
)
inline

Constructor

Parameters
Kp
Ki
Kd

Member Function Documentation

◆ compute_ctrl_signal()

real_t bitrl::control::PIDController::compute_ctrl_signal ( real_t  current,
real_t  target,
real_t  dt 
)

Compute the control signal to return

Parameters
current
target
dt
Returns

◆ get_kd()

real_t bitrl::control::PIDController::get_kd ( ) const
inlinenoexcept

◆ get_ki()

real_t bitrl::control::PIDController::get_ki ( ) const
inlinenoexcept

◆ get_kp()

real_t bitrl::control::PIDController::get_kp ( ) const
inlinenoexcept

◆ is_limited()

bool bitrl::control::PIDController::is_limited ( ) const
inlinenoexcept

Test the is_limited_ flag

Returns
True is the set_control_limits has been called

◆ set_control_limits()

void bitrl::control::PIDController::set_control_limits ( std::pair< real_t, real_t limits)
inline

Set the min/max threshold for the action

Parameters
limits

The documentation for this class was generated from the following files: