# Documentation

### This is machine translation

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

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# SPDT Switch

Model single-pole double-throw switch

## Library

Passive Devices/Switches

## Description

The SPDT Switch block models a single-pole double-throw switch:

• When the switch is closed, port `c` is connected to port `s2`.

• When the switch is open, port `c` is connected to port `s1`.

Closed connections are modeled by a resistor with value equal to the Closed resistance parameter value. Open connections are modeled by a resistor with value equal to the reciprocal of the Open conductance parameter value.

If the Threshold width parameter is set to zero, the switch is closed if the voltage presented at the `vT` control port exceeds the value of the Threshold parameter.

If the Threshold width parameter is greater than zero, then switch conductance G varies smoothly between off-state and on-state values:

`$G=\frac{x}{{R}_{closed}}+\left(1-x\right){G}_{open}$`

The block uses the function 3λ2 – 2λ3 because its derivative is zero for λ = 0 and λ = 1.

Defining a small positive Threshold width can help solver convergence in some models, particularly if the control port signal vT varies continuously as a function of other network variables. However, defining a nonzero threshold width precludes the solver making use of switched linear optimizations. Therefore, if the rest of your network is switched linear, MathWorks recommends that you set Threshold width to zero.

Optionally, you can add a delay between the point at which the voltage at `vT` passes the threshold and the switch opening or closing. To enable the delay, on the Dynamics tab, set the Model dynamics parameter to ```Model turn-on and turn-off times```.

## Parameters

### Main Tab

Closed resistance

Resistance between the `c` and `s` electrical ports when the switch is closed. The value must be greater than zero. The default value is `0.01` Ω.

Open conductance

Conductance between the `c` and `s` electrical ports when the switch is open. The value must be greater than zero. The default value is `1e-6` S.

Threshold

The threshold voltage for the control physical signal input `vT` above which the switch will turn on. The default value is `0` V.

Threshold width

The minimum increase in the control signal `vT` above the threshold value that will move the switch from fully open to fully closed. The default value is `0` V.

### Dynamics Tab

Model dynamics

Select whether the block models a switching delay:

• `No dynamics` — Do not model the delay. This is the default option.

• `Model turn-on and turn-off times` — Use additional parameters to model a delay between the point at which the voltage at vT passes the threshold and the switch opening or closing.

Turn-on delay

Time between the input voltage exceeding the threshold voltage and the switch closing. This parameter is only visible when you select ```Model turn-on and turn-off times``` for the Model dynamics parameter. The value must be greater than zero. The default value is `1e-3` seconds.

Turn-off delay

Time between the input voltage falling below the threshold voltage and the switch opening. This parameter is only visible when you select ```Model turn-on and turn-off times``` for the Model dynamics parameter. The value must be greater than zero. The default value is `1e-3` seconds.

Initial input value, vT

The value of the physical signal input `vT` at time zero. This value is used to initialize the delayed control voltage parameter internally. This parameter is only visible when you select ```Model turn-on and turn-off times``` for the Model dynamics parameter. The default value is `0` V.

## Ports

This block has the following ports:

`vT`

Physical signal that opens and closes the switch

`c`, `s1`, `s2`

Electrical conserving ports