{"@context":"https://schema.org","@type":"TechArticle","id":"TR-CTL-001","slug":"dosing-control","canonical_url":"https://flavorotor.com/research/dosing-control","machine_readable_url":"https://flavorotor.com/research/data/chapters/dosing-control.json","markdown_url":"https://flavorotor.com/research/markdown/dosing-control","title":"Nutrient dosing control strategy","description":"Supervisory mass balance, pH/EC feedback, mixing delays, anti-windup and safety constraints.","chapter":"Nutrient dosing","version":"1.1","updated":"2026-07-26","table_of_contents":[{"id":"hierarchy","label":"Control hierarchy"},{"id":"direct","label":"Variables suitable for direct feedback"},{"id":"pi","label":"Discrete PI form"},{"id":"sequence","label":"Dose sequence"},{"id":"ph-specific","label":"pH control note"}],"html":"<section aria-label=\"Article summary\" class=\"fr-article-summary\"><div><span>In brief</span><p>Supervisory mass balance, pH/EC feedback, mixing delays, anti-windup and safety constraints.</p></div></section><h2 id=\"hierarchy\">Control hierarchy</h2>\n<div class=\"process-chain\"><b>Recipe targets</b><span>→</span><b>Stock mass balance</b><span>→</span><b>Calibrated pump commands</b><span>→</span><b>Mixing</b><span>→</span><b>pH/EC/level observation</b></div>\n<h2 id=\"direct\">Variables suitable for direct feedback</h2>\n<ul><li>reservoir level or working volume;</li><li>bulk EC, with temperature compensation;</li><li>pH, with calibrated electrode and mixing delay;</li><li>solution temperature;</li><li>dissolved oxygen if a validated sensor is installed.</li></ul>\n<p>Sweetness, acidity of harvested tissue and aroma are not direct loop variables because they are not measured continuously in the reservoir.</p>\n<h2 id=\"pi\">Discrete PI form</h2>\n<div class=\"equation\"><div class=\"equation-label\">CTL-1</div><div class=\"equation-text\">e(k) = y<sub>target</sub> − y<sub>measured</sub>(k)</div><div class=\"equation-desc\">Error for a directly measured variable y, such as EC or pH.</div></div>\n<div class=\"equation\"><div class=\"equation-label\">CTL-2</div><div class=\"equation-text\">u(k) = K<sub>p</sub>e(k) + K<sub>i</sub>Σe(j)Δt</div><div class=\"equation-desc\">Candidate PI output before safety and chemical constraints.</div></div>\n<div class=\"equation\"><div class=\"equation-label\">CTL-3</div><div class=\"equation-text\">u<sub>safe</sub> = clip(u, u<sub>min</sub>, u<sub>max</sub>)</div><div class=\"equation-desc\">Dose request limited by recipe, chemistry and hardware constraints.</div></div>\n<h2 id=\"sequence\">Dose sequence</h2>\n<ol><li>Validate sensor state and reservoir volume.</li><li>Calculate a bounded stock-volume request.</li><li>Verify channel calibration and stock identity.</li><li>Deliver dose and log actuator command.</li><li>Wait the measured mixing time.</li><li>Acquire stable pH/EC readings.</li><li>Apply another correction only if all limits remain valid.</li></ol>\n<h2 id=\"ph-specific\">pH control note</h2>\n<p>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. <button aria-label=\"Open source record R20\" class=\"research-source-trigger\" data-research-source=\"R20\" type=\"button\">[R20]</button></p>","text":"In brief Supervisory mass balance, pH/EC feedback, mixing delays, anti-windup and safety constraints. Control hierarchy Recipe targets → Stock mass balance → Calibrated pump commands → Mixing → pH/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) = y target − y measured (k) Error for a directly measured variable y, such as EC or pH. CTL-2 u(k) = K p e(k) + K i Σe(j)Δt Candidate PI output before safety and chemical constraints. CTL-3 u safe = clip(u, u min , u max ) Dose request limited by recipe, chemistry and hardware constraints. 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. [R20]","source_ids":["R20"],"visuals":[],"sources":[{"id":"R20","authors":"Milanovic, Jovana Z.; Milanovic, Predrag; Kragic, Rastislav; Kostic, Mirjana","year":2018,"title":"\"Do-It-Yourself\" reliable pH-stat device by using open-source software, inexpensive hardware and available laboratory equipment","publication":"PLOS ONE","doi":"10.1371/journal.pone.0193744","source_type":"peer-reviewed engineering research","relevance":"Supports incremental pH control, calibration, logging and mixing-aware feedback with accessible hardware.","verification":"Publisher, PubMed, ISO or official proceedings metadata checked 2026-07-26","url":"https://doi.org/10.1371/journal.pone.0193744","verified_on":"2026-07-26","verification_status":"DOI METADATA CHECKED","verified_against":"Publisher, DOI landing page, PubMed or official repository where available"}]}
