Algorithm 3 - Proportional Integral
Last updated
Last updated
This algorithm is an implementation of a typical PI algorithm.
Both the proportional gain Kp and the integral gain Ki can be set with 5 decimal places after the comma.
The algorithm will run on 3 occasions:
- Periodic run (by default every 10 minutes)
- New target temperature is set
- T(measured) - T(target) > 2 degrees Celsius
There's a in place, which prevents the movement of the motor unless the error is > Thys.
The implementation does not have integral reset time - it integrates all previous errors. There's an integral anti wind-up and anti wind-down in place, which limits the integral to 0-50 degrees by default. You can change the maximum value via the command below, increasing the error limit.
Byte Index | Byte value - meaning |
---|
Example command: 0x4C012C
I[15:0] = 012C[HEX] = 300
Integral = I[DEC] / 10 = 300 / 10 = 30
The error is set to its maximum allowed value of 30Β°C
Default: I[15:0] = 01F4[HEX] = 50[DEC] = 50Β°C
Example downlink: Setting Kp to 2.74688: 37 05 7E 67
2.74688*131072 = 360039 = 0x05 7E 67
Example downlink: Setting Ki to 0.412678: 3E 00 D3 4A 0.412678*131072 = 54090 = 0x00D34A
The value of the integral is pre-multiplied by 10 by the device, so it can use 0,1 resolution.
Example uplink:
If the integral is 2.5, the complete command response is going to be: 0x3F0019
Integral [15:0] = 0x0019 = 25
Integral = 25/10 = 2.5
Example downlink:
0x410F - sets the run period to 15 minutes.
Min. acceptable value of Thys is 0.2C
Example downlink:
0x4303 - sets the temperature hysteresis to 0.3 degrees Celsius.
Byte Index | Byte value - meaning |
---|
Byte index | Sent request | Response - Meaning |
---|
Byte index | Sent request | Response - Meaning |
---|
Byte index | Sent request | Response - Meaning |
---|
Byte index | Sent request | Response - Meaning |
---|
Byte index | Sent request | Response - Meaning |
---|
Byte Index | Byte value - meaning |
0 | 37 - The command code |
1 | A[23:16] |
2 | A[15:8] |
3 | A[7:0] |
A[23:0] = Kp * 131072 (default value Kp = 6) |
0 | 36 β The command code. | 36 β The command code. |
1 |
| A[23:16] |
2 | A[15:8] |
3 | A[7:0] |
Kp = A[23:0]/131072 |
Byte Index | Byte value - meaning |
0 | 3E - The command code |
1 | B[23:16] |
2 | B[15:8] |
3 | B[7:0] |
B[23:0] = Ki * 131072 (default value: Ki = 1) |
0 | 3D β The command code. | 3D β The command code. |
1 |
| B[23:16] |
2 | B[15:8] |
3 | B[7:0] |
Ki = B[23:0]/131072 |
0 | 3F β The command code. | 3F β The command code. |
1 |
| Integral [15:8] |
2 |
| Integral [7:0] |
Byte Index | Byte value - meaning |
0 | 41 - The command code |
1 | XX = Run period in minutes. (default value: 10 minutes) |
0 | 40 β The command code. | 40 β The command code. |
1 |
| XX - Run period in minutes. |
Byte Index | Byte value - meaning |
0 | 43 - The command code |
1 | XX = Temperature hysteresis value (Thys), multiplied by 10. (default value: 0.2 deg. C) |
0 | 42 β The command code. | 42 β The command code. |
1 |
| XX - Temperature hysteresis value, multiplied by 10. |
Byte Index | Byte value - meaning |
0 | 4C - The command code |
1 | XX - I[15:8] |
2 | XX -I[7:0] |
0 | 4D β The command code. | 4D β The command code. |
1 |
| XX - I[15:8] |
2 | XX -I[7:0] |