What you learn today
- Charge and discharge thresholds
- PowerMode and charge levels
- Reserve for the night
At noon lights, heating and workshop run, the batteries are full. At two in the morning life support fails because comfort drained the battery. A battery strategy prevents exactly that.
Charge and discharge thresholds
The battery is a buffer, not a power plant. A strategy defines how far it may be discharged and from when it has to be charged again:
| Threshold | Meaning |
|---|---|
| discharge threshold | below it unimportant loads leave the grid |
| reconnect threshold | only above it may they come back – with a gap, i.e. hysteresis |
| charge threshold | below it the generator starts |
Reserve for the night
During the day the sun refills the battery. Comfort may happily pull it down to 30 % then. At night nothing comes in – enough for life support until morning has to remain. So the threshold depends on the daylight:
select reserve light DAY_RESERVE NIGHT_RESERVE
sge tmp level reserve
and comfort comfort tmp
The daylight sensor delivers Activate for that. If it is missing, the chip assumes night – sgtz turns NaN into 0.
PowerMode and charge levels
Two different numbers are called “Mode” in the game:
| Device | Mode means |
|---|---|
| Station battery | charge level: 0 Empty, 1 Critical, 2 VeryLow (from 10 %), 3 Low (from 25 %), 4 Medium (from 50 %), 5 High (from 75 %), 6 Full |
| Area power control | PowerMode.: 0 Idle, 1 Discharged, 2 Discharging, 3 Charging, 4 Charged |
You write the values of PowerMode. as a namespace, such as define DISCHARGING PowerMode.Discharging. They describe what the battery in the device is doing right now – charging, discharging, full. The battery's charge level only says how full it is.
Do not mix the two up: a station battery with Mode 4 is half full, an APC with Mode 4 reports “Charged”, i.e. full. For thresholds use Ratio (0 to 1) anyway – it is more precise than any level.
With several batteries, Mode with Minimum shows the weakest. For the charge of the whole bank Ratio with Average is right.
Exercise
Task
The battery bank “Akku” supplies the comfort lights “Komfort”. The daylight sensor “Sonne” delivers Activate.
- Comfort off below the reserve: 30 % during the day, 60 % at night (or without sensor)
- Back on only 10 percentage points above the reserve
- Display “Akku”: charge in percent, display “Stufe”: lowest charge level (
ModewithMinimum) - Batteries gone: comfort off, both displays −1
Hints
Hint 1
Reserve: select reserve light DAY_RESERVE NIGHT_RESERVE.
Hint 2
Hysteresis with sge: first and with the reserve, then or with reserve + GAP, finally and with ok.
Hint 3
Displays with select … ok … -1.
Quiz
4 questions. You pass from 60 % – the server does the grading.
Complete the day
- Passed the simulator exercise
- Passed the quiz with at least 60 %
Without an account progress is saved in this browser only.
Report a mistake in this lesson
Please sign in to report. Sign in