Supervisory mass balance, pH/EC feedback, mixing delays, anti-windup and safety constraints.
Control hierarchy
Variables suitable for direct feedback
- reservoir level or working volume;
- bulk EC, with temperature compensation;
- pH, with calibrated electrode and mixing delay;
- solution temperature;
- dissolved oxygen if a validated sensor is installed.
Sweetness, acidity of harvested tissue and aroma are not direct loop variables because they are not measured continuously in the reservoir.
Discrete PI form
ExplanationControl error is simply the target value minus the measured value.
ExplanationThe controller reacts to the present error and to accumulated error over time.
ExplanationThe requested action is kept between declared minimum and maximum limits.
Dose sequence
- Validate sensor state and reservoir volume.
- Calculate a bounded stock-volume request.
- Verify channel calibration and stock identity.
- Deliver dose and log actuator command.
- Wait the measured mixing time.
- Acquire stable pH/EC readings.
- Apply another correction only if all limits remain valid.
pH control note
Because pH is logarithmic and buffering varies with solution composition, the controller uses small empirical dose increments and measured response rather than converting pH error directly into a fixed acid/base volume. Open-source pH-stat work supports this calibration and logging approach.
