FlavoRotor is in developmentSee the current stage
Research

Nutrient dosing · TR-CTL-001

Nutrient dosing control strategy

Supervisory mass balance, pH/EC feedback, mixing delays, anti-windup and safety constraints.

MarkdownJSONRevised 2026-07-26
In brief

Supervisory mass balance, pH/EC feedback, mixing delays, anti-windup and safety constraints.

Control hierarchy

Recipe targetsStock mass balanceCalibrated pump commandsMixingpH/EC/level observation

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

CTL-1
e(k)=ytargetymeasured(k)e(k)=y_{\mathrm{target}}-y_{\mathrm{measured}}(k)
Error for a directly measured variable y, such as EC\mathrm{EC} or pH\mathrm{pH}.

ExplanationControl error is simply the target value minus the measured value.

CTL-2
u(k)=Kpe(k)+Kije(j)Δtu(k)=K_pe(k)+K_i\sum_j e(j)\Delta t
Candidate PI output before safety and chemical constraints.

ExplanationThe controller reacts to the present error and to accumulated error over time.

CTL-3
usafe=clip(u,umin,umax)u_{\mathrm{safe}}=\operatorname{clip}\left(u,u_{\min},u_{\max}\right)
Dose request limited by recipe, chemistry and hardware constraints.

ExplanationThe requested action is kept between declared minimum and maximum limits.

Dose sequence

  1. Validate sensor state and reservoir volume.
  2. Calculate a bounded stock-volume request.
  3. Verify channel calibration and stock identity.
  4. Deliver dose and log actuator command.
  5. Wait the measured mixing time.
  6. Acquire stable pH/EC readings.
  7. 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.

Article bibliography

Sources used on this page