Control Links: Multi-Constraint & MISO Overrides
In complex industrial facilities, equipment operation is rarely determined by a single sensor. A water pump might need to fill a tank, but it must also respect electrical grid tariffs, low-suction safety switches, and water quality limits.
R-THYM handles these complex relationships using Multi-Constraint Control and Multi-Input Single-Output (MISO) logical overrides.
Equipment with Multiple Control Links
In R-THYM, any controllable component (such as a Pump, Valve, or Power Switch) can have multiple incoming Control Links.
┌──────────────┐
│ Tank Level │ ───┐
└──────────────┘ │
├───> ┌───────────┐
┌──────────────┐ │ │ PUMP │ (Actuator)
│ Grid Tariff │ ───┘ └───────────┘
└──────────────┘
For example, a pump can be monitored by: 1. Link A (Tank Level): A control link originating from a Tank, set to turn the pump ON when water level is low. 2. Link B (Utility Grid): A control link originating from a Utility Grid, set to turn the pump OFF during peak-tariff hours.
Logical AND Override (MISO)
When a component has multiple control constraints, the R-THYM automation orchestration engine evaluates them using a Logical AND paradigm.
For the actuator to run (turn ON or speed up), all incoming rules must agree that it should be ON. If even a single control link dictates that the component should be OFF, the override is triggered and the component is deactivated.
Scenario: Peak Hours vs. Low Tank
- Tank Condition: The tank water level drops below its lower threshold. Link A sends an
ONrequest. - Grid Condition: The electricity tariff enters a high-pricing peak period. Link B sends an
OFFrequest. - Orchestration Logic:
ON(Link A) ANDOFF(Link B) =OFF. - Result: The pump remains OFF, avoiding expensive energy rates even though the tank level is low. The pump will only turn ON once either the peak pricing window ends (both links agree to
ON) or the tank hits a critical emergency reserve threshold that overrides the grid constraint.
Design Pattern: Smart Water-Energy Microgrids
One of the most powerful applications of multi-constraint controls is designing smart, self-sustaining microgrids that combine solar power, batteries, and water pumps.
Objective
We want to design a system that: 1. Runs the water pump primarily using green power generated from local Solar Panels. 2. Stores excess solar energy in a Battery (Energy Storage). 3. Draws power from the Utility Grid only when the battery is depleted and the tank level drops to a critical emergency minimum. 4. Exports excess solar energy back to the grid when the battery is full.
┌─────────────────┐ ┌─────────────────┐
│ Solar Generator │ ───> │ Battery Storage │
└─────────────────┘ └─────────────────┘
│ │
├─────── Control Links ───┤
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Power Switch │ ◄─── │ Water Pump │
└─────────────────┘ └─────────────────┘
▲
│
Utility Grid
Implementation Steps in R-THYM
To model this scenario, use Power Switches to route energy and Control Links to coordinate the logic:
Step 1: Set Up the Physical Network
- Place a Solar Generator and a Battery on the canvas, and link them to a shared DC power bus.
- Route a line from the DC bus to the Water Pump's power connector.
- Connect a Utility Grid component to a Power Switch, and connect the outlet of the switch to the pump's power bus.
Step 2: Configure the Battery-to-Pump Constraint (Link 1)
- Draw a Control Link from the Battery to the Water Pump.
- Set the strategy to Simple Control and configure it to:
Turn ON when Battery State-of-Charge (SoC) > 20%This ensures that the pump is allowed to run on local battery power as long as the battery is not depleted.
Step 3: Configure the Tank-to-Pump Constraint (Link 2)
- Draw a Control Link from the destination Tank to the Water Pump.
- Set the strategy to Deadband Control:
Turn ON when Tank Level < 10 ftTurn OFF when Tank Level > 18 ft
Because of the Logical AND override, the pump will now run to fill the tank only if the battery has charge (> 20%). If the battery dies, the pump stops, even if the tank is not yet full.
Step 4: Configure the Emergency Grid Fallback (Link 3 & 4)
To prevent the tank from going completely dry when solar/battery power is unavailable, configure the grid backup:
1. Draw a Control Link from the Tank to the Power Switch (controlling grid power input).
2. Set the strategy to Simple Control:
Turn ON when Tank Level < 5 ft (Critical emergency level).
3. Draw a second Control Link from the Battery to the Power Switch.
4. Set it to:
Turn ON when Battery State-of-Charge (SoC) < 10%.
When the tank drops below 5 ft and the battery is depleted, the Power Switch closes, importing grid power directly to the pump bus to run the pump and prevent service interruption. Once the tank climbs back above the emergency limit, the grid switch opens, returning the system to local solar/battery operation.