Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/creoone/zipid
PID controller in ZIG
https://github.com/creoone/zipid
pid pid-controller zig ziglang
Last synced: 4 days ago
JSON representation
PID controller in ZIG
- Host: GitHub
- URL: https://github.com/creoone/zipid
- Owner: CreoOne
- License: mit
- Created: 2024-12-17T20:08:46.000Z (5 days ago)
- Default Branch: master
- Last Pushed: 2024-12-17T20:53:29.000Z (5 days ago)
- Last Synced: 2024-12-17T21:25:34.008Z (5 days ago)
- Topics: pid, pid-controller, zig, ziglang
- Language: Zig
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZiPID
PID controller implementation in ZIG
_Supports integral clamping and overflow protection_
## Usage
```zig
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](./sources/zipid.tests.zig)