Skip to content

Commit

Permalink
pid cal
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Jul 5, 2024
1 parent f154956 commit d657a65
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ description: Manual
- [Temperature Sensor](#temperature-sensor)
- [Zero-Cross Detection](#zero-cross-detection)
- [Compatibility with EV box like OpenEVSE](#compatibility-with-ev-box-like-openevse)
- [PID Tuning](#pid-tuning)
- [Help and support](#help-and-support)

## Quick Start
Expand Down Expand Up @@ -581,10 +582,43 @@ You can use this value to inject in the EV box in order to prioritize EV chargin
This is usually acceptable to give the EV box a priority over the water tank, because the water tank only need a small amount of routed energy to start heating, while the EV usually requires a threshold to start charging.
So the router will take whatever is not used by the EV box.

### PID Tuning

The back config page `http://<ip>/config` has a PID tuning section which allows you to tune the PID, if you know what you are doing.
You can change the PID calibration at runtime and teh effect will appear immediately.

When `DEBUG`mdoe is activated, a WebSocket endpoint is available at `/ws/debug/pid` and will stream all the PID data in real time in a `CSV` format when automatic dimmer control is activated.
You can quickly show then and process then in `bash` with `websocat` by typing for example:

```bash
❯ websocat ws://192.168.125.123/ws/debug/pid
pMode,dMode,icMode,rev,setpoint,kp,ki,kd,outMin,outMax,input,output,error,pTerm,iTerm,dTerm,sum
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,630.37,0.00,-630.37,-189.11,0.00,-63.04,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,631.60,0.00,-631.60,-189.48,0.00,-0.12,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,643.14,0.00,-643.14,-192.94,0.00,-1.15,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,655.29,0.00,-655.29,-196.59,0.00,-1.21,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,641.70,0.00,-641.70,-192.51,0.00,1.36,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,626.32,0.00,-626.32,-187.90,0.00,1.54,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,632.62,0.00,-632.62,-189.79,0.00,-0.63,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,623.50,0.00,-623.50,-187.05,0.00,0.91,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,625.54,0.00,-625.54,-187.66,0.00,-0.20,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,629.77,0.00,-629.77,-188.93,0.00,-0.42,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,627.03,0.00,-627.03,-188.11,0.00,0.27,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,630.68,0.00,-630.68,-189.20,0.00,-0.36,0.00
1,1,1,0,0.00,0.30,0.00,0.10,0.00,10000.00,628.52,0.00,-628.52,-188.55,0.00,0.22,0.00
```

You can also stream this data directly to a command-line tool that will plot in real time the graphs.
Example of such tools:

- https://github.com/keithknott26/datadash
- https://github.com/cactusdynamics/wesplot

## Help and support

- **Facebook Group**: [https://www.facebook.com/groups/yasolr](https://www.facebook.com/groups/yasolr)

- **GitHub Discussions**: [https://github.com/mathieucarbou/YaSolR-OSS/discussions](https://github.com/mathieucarbou/YaSolR-OSS/discussions)

- **GitHub Issues**: [https://github.com/mathieucarbou/YaSolR-OSS/issues](https://github.com/mathieucarbou/YaSolR-OSS/issues)
```

0 comments on commit d657a65

Please sign in to comment.