This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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 the ratio RON/ROFF as small as possible, and less than 1e+12.

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

  • Decrease the Max step size parameter value (in the Configuration Parameters block dialog box).

    Note

    This increases the simulation time.

Ports

+

Positive electrical input and output ports.

-

Negative electrical input and output ports.

Parameters

Threshold voltage, VT

The voltage above which the block interprets the controlling voltage as HIGH. The default value is 0 V.

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.

Hysteresis voltage, VH

The amount by which the controlling voltage must exceed or fall below the Threshold voltage, VT parameter value to change the state of the switch. The default value is 0 V.

On resistance, RON

The resistance of the switch when it is closed. The default value is 1 Ohm.

Off resistance, ROFF

The resistance of the switch when it is open. The default value is 1e+12 Ohm.

Initial switch state

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. This is the default option.

  • 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 MATLAB® Coder™.

Introduced in R2009a