class

CrySpace::PIDController

Inherits Reference < Object

Constructors

new(kp : Float64, ki : Float64, kd : Float64, tf : Float64 = 0.01, u_min : Float64 = -Float64::INFINITY, u_max : Float64 = Float64::INFINITY)
Source

Instance methods

integral
Source
integral=(integral : Float64)
Source
kd=(kd : Float64)
Source
ki=(ki : Float64)
Source
kp=(kp : Float64)
Source
prev_derivative
Source
prev_derivative=(prev_derivative : Float64)
Source
prev_error
Source
prev_error=(prev_error : Float64)
Source
reset
Source
tf=(tf : Float64)
Source
u_max
Source
u_max=(u_max : Float64)
Source
u_min
Source
u_min=(u_min : Float64)
Source
update(error : Float64, dt : Float64) : Float64

Computes control output u(t) given the error e(t) and time step dt, applying clamping anti-windup to prevent integral windup when saturated.

Source