Skip to content

Ayase-252/pid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PID Filter

Build Status

This modules implements a PID filter in parallel form for use in various control loops. It has the following features :

  • Discrete PID in parallel form.
  • Maximum integrator value (ARW).

Usage

pid_filter_t pid;
pid_init(&pid);

/* PD controller. */
pid_set_gains(&pid, 10., 0, 4.);

while (1) {
    error = setpoint - motor_position;
    motor_pwm = pid_process(&pid, error);
}

Frequency compensation

The user of this module can specify a frequency for the PID loop and the gains will then be adjusted to allow the same gains to be used for various frequencies.

This is done using the function pid_set_frequency. By default there is no compensation for the frequency of the PID.

Dependencies

None

About

A PID controller implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 54.8%
  • C 45.2%