Appearance
Switch Controller
Smooth S-curve transition between discrete states
Overview
The Switch Controller provides smooth transitions between two discrete output states using a logistic (S-curve) function. This prevents process upsets from sudden step changes while still providing essentially on/off control behavior.
When to Use
- Smooth state transitions: When step changes cause process upsets
- Soft start/stop: Equipment that benefits from gradual changes
- Process sensitivity: When abrupt changes stress the process
- Hybrid control: Between on/off and continuous modulation
Common Applications
| Application | Low State | High State | Transition Time |
|---|---|---|---|
| Blower ramp | 0% | 100% | 5-15 min |
| Chemical feed | 0 L/h | 100 L/h | 2-5 min |
| Valve position | Closed | Open | 1-3 min |
| Recycle flow | Min | Max | 5-10 min |
Control Theory
Concept
The logistic function provides smooth S-curve transition:
Output
100% ─────────────────────────────────────
╭──────────
╭──╯
╭──╯
╭──╯
╭──╯
╭──╯
0% ───────╯─────────────────────────────
Low Threshold High
PVMathematical Model
Logistic Function:
$$output = L + \frac{H - L}{1 + e^{-k(PV - threshold)}}$$
Where:
- $L$ = Low output value
- $H$ = High output value
- $k$ = Steepness parameter (higher = sharper transition)
- $PV$ = Process variable
- $threshold$ = Switch point
Transition Characteristics
| Steepness (k) | Transition Width | Behavior |
|---|---|---|
| 1 | ~4.5 × threshold | Very gradual |
| 5 | ~0.9 × threshold | Moderate |
| 10 | ~0.45 × threshold | Sharp |
| 20 | ~0.22 × threshold | Near step |
Parameters
| Parameter | Unit | Range | Default | Description |
|---|---|---|---|---|
| Threshold | same as PV | - | - | Switch point |
| Steepness | - | 1-50 | 10 | Transition sharpness |
| Low Output | % | 0-100 | 0 | Output when PV << threshold |
| High Output | % | 0-100 | 100 | Output when PV >> threshold |
| Hysteresis | same as PV | 0-5% span | 0.1 | Dead zone around threshold |
| Transition Time | days | 0-0.1 | 0.01 | Rate limiting |
| Action | - | direct/reverse | direct | Control direction |
Tuning Guidelines
Steepness Selection
- Process sensitivity: More sensitive = lower steepness
- Response speed: Faster needed = higher steepness
- Noise immunity: Noisy signal = lower steepness
Recommended Settings
| Application | Steepness | Transition Time | Hysteresis |
|---|---|---|---|
| Blower ramp | 5-10 | 0.01 (15 min) | 0.1 mg/L |
| Chemical feed | 10-15 | 0.005 (7 min) | 5% |
| Valve control | 15-20 | 0.002 (3 min) | 2% |
Configuration
Example: Smooth Blower Control
json
{
"id": "switch-blower-1",
"type": "Switch",
"enabled": true,
"targetNodeId": "aerobic-reactor-1",
"pvNodeId": "aerobic-reactor-1",
"pvVariable": "DO",
"manipulatedVariable": "blowerSpeed",
"threshold": 2.0,
"steepness": 10,
"lowOutput": 30,
"highOutput": 100,
"hysteresis": 0.2,
"action": "reverse",
"transitionTime": 0.01,
"mode": "auto"
}Integration Example
Smooth Aeration Ramping
Scenario: Ramp blower between 30% and 100% based on DO
- DO well above 2.0: Output near 30% (low)
- DO approaching 2.0: Output begins rising
- DO at threshold: Output at 65% (midpoint)
- DO below 2.0: Output rises toward 100%
- Rate limited: Cannot change faster than transition time allows
Response Curves
DO (mg/L)
3.0 ─────┐
│
2.5 │
│
2.0 ─ ─ ─│─ ─ ─ ─ ─ ─ ─ ─ threshold
│
1.5 └────────────────
Output %
100 ─────────────────────┐
╭──┘
╭──╯
╭──╯
30 ────────────╯Comparison: Switch vs Deadband
| Aspect | Switch | Deadband |
|---|---|---|
| Transition | Smooth curve | Instant step |
| Equipment stress | Low | Higher |
| Control precision | Continuous | Binary |
| Computation | More complex | Simple |
| Best for | VFDs, modulators | On/off actuators |
Best Practices
Match steepness to process
- Slower processes = lower steepness
- Faster processes = higher steepness
Use hysteresis for noise
- Prevents oscillation around threshold
- Typically 5-10% of expected variation
Set appropriate transition time
- Consider equipment ramp rates
- Account for process dynamics
Choose correct action
- Direct: Output increases as PV increases
- Reverse: Output increases as PV decreases
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Hunting | Steepness too high | Reduce steepness |
| Slow response | Steepness too low | Increase steepness |
| Oscillation at threshold | No hysteresis | Add hysteresis |
| Jerky transitions | No rate limit | Add transition time |
| Wrong direction | Action incorrect | Toggle action |
Mathematical Details
Logistic Function Properties
- Symmetric: Around threshold point
- Bounded: Always between low and high outputs
- Smooth: Infinitely differentiable
- Monotonic: Always increasing (direct) or decreasing (reverse)
Effective Transition Zone
The PV range over which output transitions from 5% to 95% of range:
$$\Delta PV_{transition} \approx \frac{4.4}{k}$$
For k=10: $\Delta PV \approx 0.44$ units
Related Controllers
- Deadband-Controller - Step transitions
- TimeOnOff-Controller - Time-based operation
- ContinuousP-Controller - Proportional-only modulation
References
- Verhulst, P.F. "Mathematical Researches into the Law of Population Growth Increase" (1845)
- Smith, C.L. "Digital Computer Process Control" (1972)