This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
bms:bestpractice:roomcontrol:headpage [2022/02/13 12:25] – mk | bms:bestpractice:roomcontrol:headpage [2022/02/15 19:53] (current) – [PID Regulator] mk | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Room control ==== | + | ===== Room control |
Controlling the environment in a room can be tricky. Often it's based on an economic viewpoint. | Controlling the environment in a room can be tricky. Often it's based on an economic viewpoint. | ||
Line 6: | Line 6: | ||
I will try explaining "Best Practice" | I will try explaining "Best Practice" | ||
- | === Room control Heat === | + | ==== Room control Heat ==== |
Simplest automation, is a room temperature sensor controlling room heating. | Simplest automation, is a room temperature sensor controlling room heating. | ||
Heat setpoint at 23 °C, and when room temperature gets below this setpoint, you can start regulation your heat option. | Heat setpoint at 23 °C, and when room temperature gets below this setpoint, you can start regulation your heat option. | ||
- | === Regulation types === | + | ==== Regulation types ==== |
Regulators can be a difficult subject that requires a comprehensive explaination. | Regulators can be a difficult subject that requires a comprehensive explaination. | ||
For now I'll just explain 2 types. | For now I'll just explain 2 types. | ||
- | == Control curve == | + | === Control curve === |
Control curves can be 2 points and upwards (Often no more then 10 points) | Control curves can be 2 points and upwards (Often no more then 10 points) | ||
Line 25: | Line 25: | ||
</ | </ | ||
- | == PID Regulator == | ||
- | PID regulators is a bit more difficult to explain and understand. | ||
- | They use more system resources so often the control curve is preferred if the system is low on resources. | ||
- | I'll try a simple explanation first: | + | \\ |
- | If the temperature (Control variable) gets below setpoint, the regulator will increase the heating (Output variable) | + | \\ |
- | There' | + | \\ |
+ | === PID Regulator === | ||
- | You can use 3 methods, P, PI or PID | + | Please visit the [[bms: |
- | === P-regulator == | + | ==== Sensors explained |
- | A P-regulator, | + | |
- | It will then take the output variable and add the error. If the output was 0, after the calculation it will be 3. | + | |
- | + | ||
- | === Pseudo code === | + | |
- | + | ||
- | On [[https:// | + | |
- | + | ||
- | * Kp - proportional gain | + | |
- | * Ki - integral gain | + | |
- | * Kd - derivative gain | + | |
- | * dt - loop interval time | + | |
- | * previous_error := 0 | + | |
- | * integral := 0 | + | |
- | + | ||
- | loop: | + | |
- | error := setpoint − measured_value | + | |
- | proportional := error; | + | |
- | integral := integral + error × dt | + | |
- | derivative := (error − previous_error) / dt | + | |
- | output := Kp × proportional + Ki × integral + Kd × derivative | + | |
- | previous_error := error | + | |
- | wait(dt) | + | |
- | goto loop | + | |
- | + | ||
- | + | ||
- | + | ||
- | === Proportional or P-band === | + | |
- | + | ||
- | + | ||
- | + | ||
- | === Integral or I-time === | + | |
- | + | ||
- | === Derivative === | + | |
- | + | ||
- | === Illustrative examble === | + | |
- | === Sensors explained === | + | |
A sensor is basically anything inbound information, | A sensor is basically anything inbound information, | ||
Line 87: | Line 49: | ||
</ | </ | ||
<WRAP clear></ | <WRAP clear></ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
~~DISCUSSION~~ | ~~DISCUSSION~~ |