SW

Controlled Switch

Physical Networks
运行在线示例 免费 · 无需注册 · 直接在浏览器中运行

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.

数学模型

Given the gate signal uu (or initialGate when unwired), threshold VthV_{\text{th}}, and transition width ΔV\Delta V:

α=12(1+tanh⁡(u−VthΔV)),Geff=Goff+α(1Ron−Goff),V+−V−=IGeff\alpha = \frac{1}{2}\left(1 + \tanh\left(\frac{u - V_{\text{th}}}{\Delta V}\right)\right), \qquad G_{\text{eff}} = G_{\text{off}} + \alpha \left(\frac{1}{R_{\text{on}}} - G_{\text{off}}\right), \qquad V_+ - V_- = \frac{I}{G_{\text{eff}}}

输入与输出

Direction ID Label 类型 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

参数

参数 Label 类型 默认值 描述
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

使用示例

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.

说明与最佳实践

  • Non-Singular Off State: Keeping offConductance > 0 prevents singular floating nodes when all switches in an H-bridge are open.
  • Thermal Losses: Power dissipation Qdiss=I2ReffQ_{\text{diss}} = I^2 R_{\text{eff}} is exported on q_diss and the optional H thermal port.

相关模块

  • Diode/docs.md" class="bw-link">Diode
  • DCMotor/docs.md" class="bw-link">DCMotor
  • PulseGenerator/docs.md" class="bw-link">PulseGenerator