Skip to content
/ ZiPID Public

PID controller in ZIG. Driven by discrete time series. Protected from integral part run-out and overflow. Tested.

License

Notifications You must be signed in to change notification settings

CreoOne/ZiPID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZiPID

PID controller implementation in ZIG

Supports integral clamping and overflow protection

Usage

var pid: ziPID = .{ .proportional = 1.0, .integral = 0.1, .derivative = 1.0 };
const deviation = -0.4; // control value -4/10th measurement units away from target/setpoint
const delta = 16e-3;    // ~60 times per time unit
const output = pid.advance(deviation, delta);

Testing

Go to sources/zipid.tests.zig

About

PID controller in ZIG. Driven by discrete time series. Protected from integral part run-out and overflow. Tested.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages