Bot'n Roll ONE A+ - Raspberry Pi 5 library
 
Loading...
Searching...
No Matches
onepi.utils.pdfb_controller.PdfbController Class Reference

Public Member Functions

 __init__ (self, kp, kd, min_value=-100, max_value=100)
 
 change_setpoint (self, setpoint)
 
 compute_output (self, input_value)
 
 reset_controller (self)
 

Public Attributes

 kp = kp
 
 kd = kd
 

Static Protected Attributes

int _min_value = -100
 
int _max_value = 100
 
int _setpoint = 0
 
bool _change_sign = False
 

Constructor & Destructor Documentation

◆ __init__()

onepi.utils.pdfb_controller.PdfbController.__init__ ( self,
kp,
kd,
min_value = -100,
max_value = 100 )
Initialize the PdfbController with proportional (kp)
and derivative (kd) gains.

Member Function Documentation

◆ change_setpoint()

onepi.utils.pdfb_controller.PdfbController.change_setpoint ( self,
setpoint )
Change the setpoint or reference value.
This is the value the PID controller is trying to reach.
setpoint: reference value

◆ compute_output()

onepi.utils.pdfb_controller.PdfbController.compute_output ( self,
input_value )
Computes the output command by applying the PDFB control algorithm
input_value: current input value
return: float output command value

◆ reset_controller()

onepi.utils.pdfb_controller.PdfbController.reset_controller ( self)
resets the gains

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