[HCL] Human-centric lighting (HCL)
The function block Human-centric lighting (HCL) calculates the lighting setpoint color temperature and the brightness adjustment for the current day of year and time of day based on configured time-of-day-specific basic characteristics.
HCL calculates the lighting setpoint color temperature and the brightness adjustment for the current day of year and time of the day based on configured time-of-day-specific basic characteristics.
The function block Human-centric lighting (HCL) can approximate the natural lighting course over a day and year without instantiating schedulers. It aligns the artificial lighting to natural lighting.
The HCL function block calculates the lighting setpoint color temperature and the brightness adjustment for the current time of day based on configured time-of-day-specific basic characteristics. The time-of-day-specific basic characteristics are valid for March 20 (solar equinox). The length of day and the sun elevation for that day (March 20) are used as a reference to stretch or shrink the graph for time-of-day-specific basic characteristics both in time and magnitude.
The length of the current day is calculated and used in the HCL function block to stretch or shrink the graph for time-of-day-specific basic characteristics on the time axis. The maximum sun elevation above the horizon for the current day is used in the HCL function block to stretch or shrink the graph for time-of-day-specific basic characteristics on the value axis (magnitude).
If the length of the current day is longer than the length of day on March 20, then the graph for time-of-day-specific basic characteristics is stretched on the time axis, otherwise it is shrunk. When stretching or shrinking on the time axis, the actual local noon time of the day (highest solar elevation of the day) is used as a center point for stretching or shrinking. This means that the actual local noon time is not stretched or shrunk.
If the maximum sun elevation for the current day is higher than the sun elevation for March 20, then the graph for the time-of-day-specific basic characteristics is stretched on the value axis (magnitude), otherwise it is shrunk. When stretching or shrinking on the value axis, the minimal value in the graph for the time-of-day-specific basic characteristics is used as a starting point for stretching or shrinking. This means that the minimum value is not stretched or shrunk.
Stretching (shrinking) on the value axis and on the time axis is calculated independently from each other.
The HCL function block calculates the results once a minute.
The following graphs visualize the conceptual result (stretching and shrinking) of the independently performed value adjustment on the time and the value axis for a given time-of-day-specific basic characteristic for equinox (e.g. SpTColor as a function of time).
|
|
|
Configuration
The time-of-day-specific basic characteristics for lighting color temperature are configured at inputs [TColorVal] and [TColorTi]. The time-of-day-specific basic characteristics for lighting brightness adjustment are configured at inputs [BrgtVal] and [BrgtTi]. Inputs [TColorNumPt] and [BrgtNumPt] are used to define the number of points used in the characteristics (starting from the first point). The configuration 0 for the number of used characteristic points is interpreted as a disabled calculation for the respective characteristic.
The configurations for the time-of-day-specific basic characteristics are valid for March 20 (solar equinox).
Shrinking or stretching on the time axis
The length of the current day (sunrise to sunset) is used to stretch or shrink the characteristics on the time axis. The stretching or shrinking is based on the scaling factor formed by the ratio between the current length of the day and the length of day of March 20.
Inputs [TColorLmTiSum] and [BrgtLmTiSum] are used to limit the stretching.
Inputs [TColorLmTiWin] and [BrgtLmTiWin] are used to limit the shrinking.
The limits are applied to points in the configured time-of-day specific basic characteristics that are 6 hours away from the noon time. Values of points in the configured time-of-day specific basic characteristics that are 6 hours away from noon are not increased or decreased more than the configured limits. Thus, shrinking or stretching of the graph depends on the limits applied to the points that are 6 hours away.
The limits are applied to both the left and right sides of the characteristics: once on the left side, for points 6 hours before noon and once on the right side, for points 6 hours after noon.
The scaling factor is applied to all points in the graph. The values of the points are thus proportionally increased or decreased. Values of points in the configured characteristics that are more than 6 hours away from noon are increased or decreased more than the configured limits, so that these sections of the graph are stretched or shrunk more than the configured limits. Values of points that are less than 6 hours away from the noon time are increased or decreased less than the configured limits, so that these sections of the graph are stretched or shrunk less than the configured limits. If all points of the configured time-of-day specific base characteristic are less than 6 hours away from noon, the values of all points are increased or decreased less than the configured limit.
The configuration 0 for inputs [TColorLmTiSum], [BrgtLmTiSum], [TColorLmTiWin] and [BrgtLmTiWin] is used when stretching or shrinking on the time axis is not wished.
If the limits for stretching or shrinking on the time axis are not specified in the customer's requirements, the maximum limit of 1 day can be set for [TColorLmTiSum], [BrgtLmTiSum], [TColorLmTiWin] and [BrgtLmTiWin].
The following graphs visualize the conceptual result of the applied limits on the left and on the right side to the noon interval and the resulting stretched graphs for a given time-of-day-specific basic characteristic for equinox (e.g. SpTColor as functions of time with the limit from TColorLmTiSum).
|
|
Shrinking or stretching on the value axis
The maximum sun elevation (at noon time) is used to stretch or shrink the time-of-day-specific basic characteristics on the value axis (magnitude).
In contrast to the time axis, no limitation is applied to the value axis. The value axis (magnitude) undergoes a correction.
Inputs [TClrCorrValSum] and [BrgtCorrValSum] define the stretching on the value axis: when the sun elevation is at its maximum position within the whole year, the time-of-day-specific basic characteristics are stretched so that the maximum value in the time-of-day-specific basic characteristics (this value may not be at noon time) will be raised by the configured value.
Inputs [TClrCorrValWin] and [BrgtCorrValWin] define the shrinking on the value axis: when the sun elevation is at its minimum position within the whole year, the time-of-day-specific basic characteristics are shrunk so that the maximum value in the time-of-day-specific basic characteristics (this value may not be at noon time) will be lowered by the configured value.
Configuration 0 for inputs [TClrCorrValSum], [BrgtCorrValSum], [TClrCorrValWin] and [BrgtCorrValWin] is used when stretching or shrinking on the value axis (magnitude) is not wanted.
The following graph visualizes the conceptual result of the applied corrections for the maximum values and the resulting stretched graph for a given time-of-day-specific basic characteristic for equinox (SpTColor as a function of time with the correction from TClrCorrValSum).
|
|
Geographical position
Length of day (sunrise to sunset), maximum sun elevation (at noon time) and actual local time are dependent on the Earth’s geographical position. The geographical position is configured at inputs [Latit] and [Lngit].
Positive values for [Latit] are considered as north latitude and negative values as south latitude.
Positive values for [Lngit] are considered as east longitude and negative values as west latitude.
Length of day (sunrise to sunset), maximum sun elevation (at noon time) and actual local time are also dependent on UTC offset and daylight-saving time state. The HCL function block reads the UTC offset and the daylight-saving time state from the device object of the automation station. These properties are set automatically based on the configured time zone for the automation stations.
The geographical position and the UTC offset must be consistent for the proper calculation of length of day, maximum sun elevation and actual local time.
The HCL function block gets the current local date and time from the internal clock of the automation station.
Configuration validation
Shrinking on the time axis is internally limited to 1 hour: when shrinking, the function block will leave at least 1 hour as time range for the graph for the time-of-day-specific basic characteristics and will not shrink it more although the configuration would allow it.

Before calculating the results, the HCL function block validates the user's configuration. If the validation does not pass, output [ErrSta] is set to 1 and outputs [SpTColor] and [BrgtAdj] are set to 0.
The following points are validated:
- At least one characteristic must be enabled ([TColorNumPt] or [BrgtNumPt] > 0).
- More than 1 point should be configured in the enabled characteristics.
- Enabled characteristics must have a minimum time range of 1 hour.
- The time difference between neighboring points on the graph must be 1 minute at the minimum.
In addition, output [ErrSta] will be set to 1 if the access to the device object was not successful.
Simulation
The HCL function block can simulate elapsing time with configured speed. Input [EnSim] enables the simulation of time in the HCL function block. Input [TiFacSim] defines the speed of the simulated time: the value 1.0 means that the speed of the simulated time is the same as the real time; the value 2.0 means that the speed of the simulated time is twice the speed of the real time.
Input [DaTiStts] defines the starting time of the simulation and input [DaTiStps] defines the stop time of the simulation. When the simulated time reaches the stop time, the simulation restarts from the beginning.
If [DaTiStps] is earlier than [DaTiStts], the HCL function block calculates the result only for the time at [DaTiStts].
Output [SimActv] indicates if the simulation is currently in progress.
Output [DaTi] displays the current simulated time. If the simulation is disabled, [DaTi] displays the current time of the automation station.
Leap years and daylight-saving time are not simulated by the HCL function block.
The simulation in the HCL function block uses daylight-saving time and UTC offset from the device object in the controller for the entire duration of the simulated period.
Input | Description | Data type | Default value |
|---|---|---|---|
Latit | North latitude | Real | 47.17 [°] (Zug, Switzerland) |
Lngit | East longitude | Real | 8.52 [°] (Zug, Switzerland) -180...180.0 [°] |
BrgtCorrValSum | Brightness correction for value summer | Real | 0.0 [%] |
BrgtLmTiSum | Brightness limit for time summer | Time | 0 ms |
BrgtCorrValWin | Brightness correction for value winter | Real | 0.0 [%] |
BrgtLmTiWin | Brightness limit for time winter | Time | 0 ms |
BrgtNumPt | Number of brightness adjustment points | Integer | 0 |
BrgtVal | Brightness values | Structure | - |
BrgtVal | Value 1...Value 20 | Real | 0.0 [%] |
BrgtTi | Brightness times | Structure | - |
BrgtTi | Time 1...Time 20 | Time | 0 ms 0 ms...1 d |
TClrCorrValSum | Color temperature correction for value summer | Real | 0.0 [K] |
TColorLmTiSum | Color temperature limit for time summer | Time | 0 ms |
TClrCorrValWin | Color temperature correction for value winter | Real | 0.0 [K] |
TColorLmTiWin | Color temperature limit for time winter | Time | 0 ms |
TColorNumPt | Number of color temperature auxiliary points | Integer | 0 |
TColorVal | Color temperature values | Structure | - |
TColorVal | Value 1...Value 20 | Real | 0.0 [K] |
TColorTi | Color temperature times | Structure | - |
TColorTi | Time 1...Time 20 | Time | 0 ms 0 ms...1 d |
EnSim | Enable simulation | Boolean | 0 |
DaTiStts | Date and time for start simulation | DateAndTime | 1990-1-1-0:0:0.0 |
DaTiStps | Date and time for stop simulation | DateAndTime | 1991-1-1-0:0:0.0 |
TiFacSim | Time conversion factor simulation | Real | 1.0 1.0...10800.0 |
Output | Description | Data type | Default value |
|---|---|---|---|
BrgtAdj | Brightness adjustment | Real | 0.0 [%] |
SpTColor | Setpoint color temperature | Real | 0.0 [K] |
DaTi | Date and time of day | DateAndTime | 1990-1-1-0:0:0.0 |
SimActv | Simulation active | Boolean | 0 |
Sunrise | Sunrise If there is no sunrise, the output is set to -1s. | Time | 0 ms |
Sunset | Sunset If there is no sunset, the output is set to 1d. | Time | 0 ms |
ErrSta | Error state | Boolean | 0 |






