Voltage-Controlled Switch

Voltage-controlled switch with hysteresis

  • Library:
  • Simscape / Electrical / Additional Components / SPICE Passives

Description

The Voltage-Controlled Switch block represents the electrical characteristics of a switch whose state is controlled by the voltage across the input ports (the controlling voltage):

  • When the controlling voltage is greater than the sum of the Threshold voltage, VT and Hysteresis voltage, VH parameter values, the switch is closed and has a resistance equal to the On resistance, RON parameter value.

  • When the controlling voltage is less than the Threshold voltage, VT parameter value minus the Hysteresis voltage, VH parameter value, the switch is open and has a resistance equal to the Off resistance, ROFF parameter value.

  • When the controlling voltage is greater than or less than the Threshold voltage, VT parameter value by an amount less than or equal to the Hysteresis voltage, VH parameter value, the voltage is in the crossover region and the state of the switch remains unchanged.

Assumptions and Limitations

The block output resistance model is discontinuous during switching. The discontinuity might cause numerical issues. Try the following actions to resolve the issues:

  • Set the On resistance, RON and Off resistance, ROFF parameter values to keep RON divided by ROFF as large as possible, and more than 1e+12.

  • Increase the Hysteresis voltage, VH parameter value to reduce switch chatter.

  • If a variable-step solver is employed, decrease the Max step size parameter value (in the Configuration Parameters block dialog box).

    Note

    This increases the simulation time.

Ports

Conserving

expand all

Electrical conserving port associated with the voltage controlled switch positive input.

Electrical conserving port associated with the voltage controlled switch negative input.

Electrical conserving port associated with the voltage controlled switch positive output.

Electrical conserving port associated with the voltage controlled switch negative output.

Parameters

expand all

Voltage above which the block interprets the controlling voltage as HIGH.

Note

The controlling voltage must differ from the threshold voltage by at least the Hysteresis voltage, VH parameter value to change the state of the switch.

Amount by which the controlling voltage must exceed or fall below the Threshold voltage, VT parameter value to change the state of the switch.

Resistance of the switch when it is closed.

Resistance of the switch when it is open.

Select one of the following options for the state of the switch at the start of the simulation:

  • On — The switch is initially closed and its resistance value is equal to the On resistance, RON parameter value.

  • Off — The switch is initially open and its resistance value is equal to the Off resistance, ROFF parameter value.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2009a