Mix red and blue streams to make perfect purple. Tune your controller, reject disturbances, and compete for the highest reproducible score.
🏁 The objective: Minimize the average difference between actual purple and target purple, while avoiding frantic valve movement.
⚡ Disturbances: Red feed changes at 55, 115, and 150 s. All runs use identical timing, initial color, and equipment.
🔁 Compare attempts: Select a previous run below to overlay its response. Try to beat your best PID score.
| Run | Mode | Score | On-spec | Kp | τi (s) | τd (s) | Compare |
|---|---|---|---|---|---|---|---|
| No completed runs yet. Start the mixer to set the first score. | |||||||
The red stream enters at a baseline of 1.00 L/s. The controller changes the blue feed (0–2.50 L/s). A perfectly mixed, fixed-volume tank discharges the combined feed.
We track the fraction of blue liquid in the tank. The actuator has a short lag, the color sensor has a short lag, and the PID uses ideal-form Kp, τi, and τd, with derivative-on-measurement filtering and anti-windup. τi at the far right represents infinite integral time (integral OFF); τd = 0 at the far left disables derivative action.
Every run starts at 18% blue, with the blue valve at 0.20 L/s. Red-flow disturbances are predetermined. Manual mode is scored but excluded from the PID best score.
The colors are visual representations of composition (not an exact optical mixing model). Final score = 100 × exp(−4 × mean absolute composition error − 0.07 × total variation in blue valve flow). History is stored locally on this device, not shared across students.