Controlled Switch
Physical Networks
Run the live example
Free · no sign-up · runs in your browser
Signal-controlled electrical switch (ideal MOSFET/IGBT) for PWM motor drives, half-bridges, and full H-bridge topologies. Conducts when the Gate signal exceeds threshold and dissipates switching/conduction losses on the optional H thermal port.
Mathematical Model
Given the gate signal (or initialGate when unwired), threshold , and transition width :
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | p |
+ | number | Required |
| → In | n |
- | number | Required |
| → In | in |
Gate | number | Optional |
| → In | H |
H | number | Optional |
| ← Out | q_diss |
Q_diss | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
threshold |
Gate Threshold (Vth) | number | 0.5 |
Gate signal level at which the switch transitions from OFF to ON |
onResistance |
On Resistance (Ron) | number | 0.01 |
Closed-state channel resistance |
initialGate |
Default Gate State | number | 0 |
Gate level used when the Gate port is not wired (0 = open, 1 = closed) |
offConductance |
Off Conductance (Goff) | number | 0.000001 |
Open-state leakage conductance (prevents floating H-bridge nodes) |
transitionWidth |
Transition Width | number | 0.05 |
Smoothness width around Vth for numerical stability |
Usage Examples
Example 1: PWM Switched Load
Drive the Gate port with a PulseGenerator (0..1) to switch a DC supply across a resistor or motor.
Example 2: H-Bridge DC Motor Drive
Combine four ControlledSwitch blocks with anti-parallel Diode blocks to reverse polarity across a DCMotor.
Remarks & Best Practices
- Non-Singular Off State: Keeping
offConductance > 0prevents singular floating nodes when all switches in an H-bridge are open. - Thermal Losses: Power dissipation is exported on
q_dissand the optionalHthermal port.
Related Components
- Diode/docs.md" class="bw-link">Diode
- DCMotor/docs.md" class="bw-link">DCMotor
- PulseGenerator/docs.md" class="bw-link">PulseGenerator