{"@context":"https://schema.org","@type":"TechArticle","id":"FLV-ALG-001","slug":"recipe-control-algorithm","canonical_url":"https://flavorotor.com/research/recipe-control-algorithm","machine_readable_url":"https://flavorotor.com/research/data/chapters/recipe-control-algorithm.json","markdown_url":"https://flavorotor.com/research/markdown/recipe-control-algorithm","title":"Recipe and control algorithm","description":"A safe hierarchy separating user targets, recipe parameters, measured feedback, actuator calibration and learned sensory models.","chapter":"Flavour control","version":"1.1","updated":"2026-07-26","table_of_contents":[{"id":"hierarchy","label":"Control hierarchy"},{"id":"feedback","label":"Direct feedback loops"},{"id":"learned","label":"Learned sensory mapping"},{"id":"safety","label":"Safety constraints"},{"id":"state-conditioned","label":"State-conditioned treatment"}],"html":"<section aria-label=\"Article summary\" class=\"fr-article-summary\"><div><span>In brief</span><p>A safe hierarchy separating user targets, recipe parameters, measured feedback, actuator calibration and learned sensory models.</p></div></section>\n<h2 id=\"hierarchy\">Control hierarchy</h2>\n<div class=\"process-chain\"><b>User target</b><span>→</span><b>Validated recipe ID</b><span>→</span><b>Setpoints and schedules</b><span>→</span><b>Calibrated actuators</b><span>→</span><b>Measured environment</b><span>→</span><b>Outcome model</b></div>\n<h2 id=\"feedback\">Direct feedback loops</h2>\n<p>Closed-loop control is appropriate for directly measured variables such as pH, reservoir level, solution temperature, rotation speed and bulk EC. Individual-ion control requires ion-specific measurement or a constrained mass-balance model validated by chemical analysis. <button aria-label=\"Open source record R17\" class=\"research-source-trigger\" data-research-source=\"R17\" type=\"button\">[R17]</button> <button aria-label=\"Open source record R34\" class=\"research-source-trigger\" data-research-source=\"R34\" type=\"button\">[R34]</button> <button aria-label=\"Open source record R35\" class=\"research-source-trigger\" data-research-source=\"R35\" type=\"button\">[R35]</button> <button aria-label=\"Open source record R36\" class=\"research-source-trigger\" data-research-source=\"R36\" type=\"button\">[R36]</button></p>\n<div class=\"equation\"><div class=\"equation-label\">RCP-1</div><div class=\"equation-text\">e(k) = ytarget − ymeasured(k)</div><div class=\"equation-desc\">Error for a directly measured controlled variable.</div></div>\n<div class=\"equation\"><div class=\"equation-label\">RCP-2</div><div class=\"equation-text\">u(k) = clip[Kp e(k) + Ki Σ e(j)Δt, umin, umax]</div><div class=\"equation-desc\">Bounded PI action with explicit actuator and safety limits.</div></div>\n<h2 id=\"learned\">Learned sensory mapping</h2>\n<p>The sensory predictor is trained from completed FlavoRotor experiments. Its input data include genotype, developmental stage, measured environmental history, solution composition and harvest handling. Cross-validation is separated by cultivation cycle to prevent samples from the same run appearing in training and test sets.</p>\n<h2 id=\"safety\">Safety constraints</h2>\n<ul><li>no automatic dose with an expired channel calibration;</li><li>no correction while the mixing delay is active;</li><li>bounded dose and runtime per event;</li><li>sensor plausibility and redundancy checks;</li><li>fault-safe state after communication loss;</li><li>full event logging with recipe and firmware versions.</li></ul>\n<h2 id=\"state-conditioned\">State-conditioned treatment</h2>\n      <p>A recipe contains time limits and plant-state conditions. For example, a light phase can begin when a validated imaging model detects the required developmental stage, provided plant-health checks pass and the minimum and maximum calendar limits are respected.</p>\n      <div class=\"equation\"><div class=\"equation-label\">RCP-3</div><div class=\"equation-text\">x(t+1) = f(x(t), u(t), d(t), g, θ) + w(t)</div><div class=\"equation-desc\">x(t) is plant state; u(t) contains controlled inputs; d(t) contains measured disturbances; g identifies genotype; θ contains model parameters; and w(t) represents process variation.</div></div>\n      <div class=\"equation\"><div class=\"equation-label\">RCP-4</div><div class=\"equation-text\">y(t) = h(x(t)) + v(t)</div><div class=\"equation-desc\">The camera, sensors and laboratory measurements observe only part of the plant state; v(t) represents measurement error.</div></div>","text":"In brief A safe hierarchy separating user targets, recipe parameters, measured feedback, actuator calibration and learned sensory models. Control hierarchy User target → Validated recipe ID → Setpoints and schedules → Calibrated actuators → Measured environment → Outcome model Direct feedback loops Closed-loop control is appropriate for directly measured variables such as pH, reservoir level, solution temperature, rotation speed and bulk EC. Individual-ion control requires ion-specific measurement or a constrained mass-balance model validated by chemical analysis. [R17] [R34] [R35] [R36] RCP-1 e(k) = ytarget − ymeasured(k) Error for a directly measured controlled variable. RCP-2 u(k) = clip[Kp e(k) + Ki Σ e(j)Δt, umin, umax] Bounded PI action with explicit actuator and safety limits. Learned sensory mapping The sensory predictor is trained from completed FlavoRotor experiments. Its input data include genotype, developmental stage, measured environmental history, solution composition and harvest handling. Cross-validation is separated by cultivation cycle to prevent samples from the same run appearing in training and test sets. Safety constraints no automatic dose with an expired channel calibration; no correction while the mixing delay is active; bounded dose and runtime per event; sensor plausibility and redundancy checks; fault-safe state after communication loss; full event logging with recipe and firmware versions. State-conditioned treatment A recipe contains time limits and plant-state conditions. For example, a light phase can begin when a validated imaging model detects the required developmental stage, provided plant-health checks pass and the minimum and maximum calendar limits are respected. RCP-3 x(t+1) = f(x(t), u(t), d(t), g, θ) + w(t) x(t) is plant state; u(t) contains controlled inputs; d(t) contains measured disturbances; g identifies genotype; θ contains model parameters; and w(t) represents process variation. RCP-4 y(t) = h(x(t)) + v(t) The camera, sensors and laboratory measurements observe only part of the plant state; v(t) represents measurement error.","source_ids":["R17","R34","R35","R36"],"visuals":[],"sources":[{"id":"R17","authors":"Vought, Kelsey; Bayabil, Haimanote K.; Pompeo, Jean; Crawford, Daniel; Zhang, Ying; Correll, Melanie; Martin-Ryals, Ana","year":2024,"title":"Dynamics of micro and macronutrients in a hydroponic nutrient film technique system under lettuce cultivation","publication":"Heliyon","doi":"10.1016/j.heliyon.2024.e32316","source_type":"peer-reviewed research","relevance":"Directly supports the statement that maintaining bulk EC does not guarantee stable individual-ion concentrations.","verification":"Publisher, PubMed, ISO or official proceedings metadata checked 2026-07-26","url":"https://doi.org/10.1016/j.heliyon.2024.e32316","verified_on":"2026-07-26","verification_status":"DOI METADATA CHECKED","verified_against":"Publisher, DOI landing page, PubMed or official repository where available"},{"id":"R34","authors":"Cho, Woo-Jae; Gang, Min-Seok; Kim, Dong-Wook; Kim, JooShin; Jung, Dae-Hyun; Kim, Hak-Jin","year":2023,"title":"Decision-tree-based ion-specific dosing algorithm for enhancing closed hydroponic efficiency and reducing carbon emissions","publication":"Frontiers in Plant Science, 14, 1301490","doi":"10.3389/fpls.2023.1301490","source_type":"peer-reviewed engineering research","relevance":"Demonstrates ion-specific monitoring and multi-stock dosing while accounting for coupled ions in fertilizer salts.","verification":"Publisher metadata and full text checked 2026-07-26","url":"https://doi.org/10.3389/fpls.2023.1301490","verified_on":"2026-07-26","verification_status":"DOI METADATA CHECKED","verified_against":"Publisher, DOI landing page, PubMed or official repository where available"},{"id":"R35","authors":"Bamsey, Matthew; Graham, Thomas; Thompson, Cody; Berinstain, Alain; Scott, Alan; Dixon, Michael","year":2012,"title":"Ion-Specific Nutrient Management in Closed Systems: The Necessity for Ion-Selective Sensors in Terrestrial and Space-Based Agriculture and Water Management Systems","publication":"Sensors, 12, 13349–13392","doi":"10.3390/s121013349","source_type":"peer-reviewed review","relevance":"Explains why closed nutrient systems require ion-specific information when precise ionic balance is the objective.","verification":"Publisher metadata checked 2026-07-26","url":"https://doi.org/10.3390/s121013349","verified_on":"2026-07-26","verification_status":"DOI METADATA CHECKED","verified_against":"Publisher, DOI landing page, PubMed or official repository where available"},{"id":"R36","authors":"Miller, Alexander; Adhikari, Ranjeeta; Nemali, Krishna","year":2020,"title":"Recycling Nutrient Solution Can Reduce Growth Due to Nutrient Deficiencies in Hydroponic Production","publication":"Frontiers in Plant Science, 11, 607643","doi":"10.3389/fpls.2020.607643","source_type":"peer-reviewed research","relevance":"Shows that maintaining target EC in recycled hydroponics can mask individual nutrient deficiencies and unwanted-ion accumulation.","verification":"Publisher full text checked 2026-07-26","url":"https://doi.org/10.3389/fpls.2020.607643","verified_on":"2026-07-26","verification_status":"DOI METADATA CHECKED","verified_against":"Publisher, DOI landing page, PubMed or official repository where available"}]}
