Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/64j0/pid-fsharp

The code shows the implementation of a PID controller in F#. It's a translation from https://github.com/simorxb/PID-C-Struct.
https://github.com/64j0/pid-fsharp

control-theory pid-controller

Last synced: 2 days ago
JSON representation

The code shows the implementation of a PID controller in F#. It's a translation from https://github.com/simorxb/PID-C-Struct.

Awesome Lists containing this project

README

        

# PID in F#

A translation from [simorxb/PID-C-Struct](https://github.com/simorxb/PID-C-Struct) from C to F#.

* Notice that the txt result is different from `simorxb`'s since in his implementation, due to C specificities, the program loses precision after time `2.700000`. You can find more information regarding this C problem here: [link](https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/build/why-floating-point-numbers-may-lose-precision.md).

## Simulation results

!["PID controller command per time"](./assets/pid-command-per-time.png)

!["Setpoint and response comparison per time"](./assets/setpoint-and-response-per-time.png)