Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josh-tracey/PIDController
Rust PID Controller library
https://github.com/josh-tracey/PIDController
pid pid-controller rust
Last synced: about 1 month ago
JSON representation
Rust PID Controller library
- Host: GitHub
- URL: https://github.com/josh-tracey/PIDController
- Owner: josh-tracey
- License: gpl-3.0
- Created: 2019-12-28T23:46:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-15T05:26:00.000Z (about 4 years ago)
- Last Synced: 2024-09-24T16:10:02.444Z (5 months ago)
- Topics: pid, pid-controller, rust
- Language: Rust
- Homepage:
- Size: 67.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-list - josh-tracey/PIDController - tracey/PIDController?style=social"/> : Rust PID Controller library. Rust Crate: [https://crates.io/crates/adriftdev_pid](https://crates.io/crates/adriftdev_pid) (Motion Control)
- awesome-rust-list - josh-tracey/PIDController - tracey/PIDController?style=social"/> : Rust PID Controller library. Rust Crate: [https://crates.io/crates/adriftdev_pid](https://crates.io/crates/adriftdev_pid) (Motion Control)
README
# PID Controller library
Rust Crate: https://crates.io/crates/adriftdev_pid
Proportional, integral, and derivative controller module designed to allow easy calculation of outputs based on feedback loop from plant equipment (sensors / microcontrollers). output of PID controller can control motors, servos, or any component that can output a varities of outputs to achieve targeted outcome.
## RoadMap
- Smoothing of output curve.
- PID Stack control - can use any variety of controller pattern, not just PID, eg PD, PI, P, or PID controller configurations.
- General microcontroller optimisations## Example Usage
Tuning of the PID Controllers is as simple as changing the gain for each controller component for a module.
below is a small example of creating a PID Control Module
```rust
use adriftdev_pid::control;fn main() {
let mut pid = control::Module::new(
control::PController::new(0.2),
control::IController::new(0.2),
control::DController::new(0.2),
); // Total of 0.6 gain
pid.set_setpoint(2000.0);
while pid.output < 1999.0 {
println!("{}", pid.compute());
}
}
```## Possible Applications
There are plenty of uses for PID Controllers this is just a small sample of usages.
### Air Conditioner
- Temperature regulation - through controlled output and feebback loop from temp sensors`
### Quadcopter
- Altitude control
- Speed control
- Rotation control
- Tilt control
- Advanced Navigation### Electric Skateboard
- Speed Control
- Brake Control