Skip to content

[Review pre pull request] PID controller for moddable #190

Description

@wilberforce

Please see:

https://gist.github.com/wilberforce/88231ea867bc190199c33538c039201f

This is a class for a PID controller - example usage is to monitor the temperature and throttle the output of the heater so it does not over shoot.

I use it to brew beer ;-)

I can do a pull request for this - just not sure where it fits - it could go into contributed, however you might want a folder under /modules/data

The simulator is not the best - but gives and idea:

Output : 1000 ; Temp : 11.68°c setpoint:21°c
Output : 1000 ; Temp : 12.68°c setpoint:21°c
Output : 1000 ; Temp : 13.68°c setpoint:21°c
Output : 1000 ; Temp : 14.68°c setpoint:21°c
Output : 1000 ; Temp : 15.68°c setpoint:21°c
Output : 1000 ; Temp : 16.68°c setpoint:21°c
Output : 1000 ; Temp : 17.68°c setpoint:21°c
Output : 1000 ; Temp : 18.68°c setpoint:21°c
Output : 971 ; Temp : 19.63°c setpoint:21°c
Output : 519 ; Temp : 19.91°c setpoint:21°c
Output : 707 ; Temp : 20.47°c setpoint:21°c
Output : 295 ; Temp : 20.41°c setpoint:21°c
Output : 620 ; Temp : 20.85°c setpoint:21°c
Output : 173 ; Temp : 20.6°c setpoint:21°c
Output : 614 ; Temp : 21.03°c setpoint:21°c
Output : 88 ; Temp : 20.66°c setpoint:21°c
Output : 649 ; Temp : 21.13°c setpoint:21°c
Output : 11 ; Temp : 20.65°c setpoint:21°c
Output : 710 ; Temp : 21.21°c setpoint:21°c
Output : 0 ; Temp : 20.71°c setpoint:21°c
Output : 686 ; Temp : 21.24°c setpoint:21°c
Output : 0 ; Temp : 20.74°c setpoint:21°c
Output : 671 ; Temp : 21.25°c setpoint:21°c
Output : 0 ; Temp : 20.75°c setpoint:21°c
Output : 668 ; Temp : 21.25°c setpoint:21°c

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions