User Tools

Site Tools


Sidebar

bms:bestpractice:roomcontrol:headpage
Approved 2022/02/15 19:39 by mk (version: 4) Newest approved

This is an old revision of the document!


Room control

Controlling the environment in a room can be tricky. Often it's based on an economic viewpoint. I will try explaining different sensors and outputs and what I've seen used practically with good results.

I will try explaining “Best Practice” or “Ideas of best practice” below with increasing advancements.

Room control Heat

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.

Regulation types

Regulators can be a difficult subject that requires a comprehensive explaination. For now I'll just explain 2 types.

Control curve

Control curves can be 2 points and upwards (Often no more then 10 points) For heating, imagine 2 points in a curve, where X is the temperature below setpoint eg. 10 to 0 degrees below, and Y is a percentage from 100% to 0%. See the graph below.

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's in a basic PID regulator, 3 variables, proportional gain (P or P-band), integral gain (I or I-time) and derivative gain (D)

You can use 3 methods, P, PI or PID

P-regulator

A P-regulator, will measure the “error” from ( setpoint - control variable ), if setpoint is 23 and control variable is 20, the “error” will be 3. It will then take the output variable and add the error. If the output was 0, after the calculation it will be 3. Thus the P regulator, as seen in below picture as blue, will never reach it's setpoint.

Pseudo code

On Wikipedia there's a lot of information about this regulator, but I will highlight one thing from there, a pseudo code examble.

  • 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

With a little help from this guy I was able to put together 3 live test simulations of P, PI and PID regulators. Theese simulations open out side this wiki, so you have to press back button to get back here. What you can do is change the control variable and adjust parameters accordingly. TIP: Change control variable slowly to simulate a change in temperature or pressure.

Sensors explained

A sensor is basically anything inbound information, from temperature to light status.

Sensor typeShortname ENShortname DKUnitDescription
TemperatureRTTR°C or °fRoom temperature is the most basic sensor, used for controlling heating.
Carbon dioxideCo2Co2 or LKppmCo2 is used to determine “air quality” or “the human influence” in the room.
Relative
Humidity
RHRH%RH“Relative humidity” is the amount of water vapor present in air expressed as a percentage (%RH) of the amount needed to achieve saturation at the same temperature. Too low or high values have significant impact on air quality.
Pressence detectionPDPIROn or off Pressence detection is often used with a motion detector, but could also be infrared sensors or an ultrasonic detection system (rare or in combination with motion detection).
Light levelLUXLX or LUXlxMeasurement of the illuminance of a surface (lx), used to regulate output of the lightsource.
Window sensorWSVKOpen or ClosedWindows sensor is typically a magnet switch, used to regulate air valves and temperature

Discussion

Enter your comment. Wiki syntax is allowed:
G H᠎ Q
 
bms/bestpractice/roomcontrol/headpage.1644950380.txt.gz · Last modified: 2022/02/15 19:39 by mk