Skip to content

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 ​

ApplicationLow StateHigh StateTransition Time
Blower ramp0%100%5-15 min
Chemical feed0 L/h100 L/h2-5 min
Valve positionClosedOpen1-3 min
Recycle flowMinMax5-10 min

Control Theory ​

Concept ​

The logistic function provides smooth S-curve transition:

Output
100% ─────────────────────────────────────
                           ╭──────────
                        ╭──╯
                     ╭──╯
                  ╭──╯
               ╭──╯
            ╭──╯
  0% ───────╯─────────────────────────────
         Low      Threshold      High
                      PV

Mathematical 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 WidthBehavior
1~4.5 × thresholdVery gradual
5~0.9 × thresholdModerate
10~0.45 × thresholdSharp
20~0.22 × thresholdNear step

Parameters ​

ParameterUnitRangeDefaultDescription
Thresholdsame as PV--Switch point
Steepness-1-5010Transition sharpness
Low Output%0-1000Output when PV << threshold
High Output%0-100100Output when PV >> threshold
Hysteresissame as PV0-5% span0.1Dead zone around threshold
Transition Timedays0-0.10.01Rate limiting
Action-direct/reversedirectControl direction

Tuning Guidelines ​

Steepness Selection ​

  1. Process sensitivity: More sensitive = lower steepness
  2. Response speed: Faster needed = higher steepness
  3. Noise immunity: Noisy signal = lower steepness
ApplicationSteepnessTransition TimeHysteresis
Blower ramp5-100.01 (15 min)0.1 mg/L
Chemical feed10-150.005 (7 min)5%
Valve control15-200.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

  1. DO well above 2.0: Output near 30% (low)
  2. DO approaching 2.0: Output begins rising
  3. DO at threshold: Output at 65% (midpoint)
  4. DO below 2.0: Output rises toward 100%
  5. 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 ​

AspectSwitchDeadband
TransitionSmooth curveInstant step
Equipment stressLowHigher
Control precisionContinuousBinary
ComputationMore complexSimple
Best forVFDs, modulatorsOn/off actuators

Best Practices ​

  1. Match steepness to process

    • Slower processes = lower steepness
    • Faster processes = higher steepness
  2. Use hysteresis for noise

    • Prevents oscillation around threshold
    • Typically 5-10% of expected variation
  3. Set appropriate transition time

    • Consider equipment ramp rates
    • Account for process dynamics
  4. Choose correct action

    • Direct: Output increases as PV increases
    • Reverse: Output increases as PV decreases

Troubleshooting ​

IssueCauseSolution
HuntingSteepness too highReduce steepness
Slow responseSteepness too lowIncrease steepness
Oscillation at thresholdNo hysteresisAdd hysteresis
Jerky transitionsNo rate limitAdd transition time
Wrong directionAction incorrectToggle 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

References ​

  1. Verhulst, P.F. "Mathematical Researches into the Law of Population Growth Increase" (1845)
  2. Smith, C.L. "Digital Computer Process Control" (1972)