Switch models

This section explains the types of switches in the Typhoon HIL software toolchain.

In Typhoon HIL software toolchain, we have different approaches to modeling switches, depending on the context.

For simulation in TyphoonSim switch is modeled as changeable resistance (Ron/Roff).

For real-time/VHIL simulation switch is modeled either as changeable resistance(Ron/Roff) or LC model.

Switch model in Real-time/VHIL simulation

Ron/off

In real-time/VHIL, Ron/Roff switch is modeled as Ron=0 and Roff=inf, which is considered ideal switch.

When a switch is represented as an ideal switch in circuit modeling, it behaves as:
  • a short circuit, exhibiting zero impedance, when closed (in its conductive state)
  • an open circuit, exhibiting infinite impedance, when open (in its non-conductive state)
In practical applications, using an ideal switch within a circuit can introduce unintended effects, often referred to as degenerations, which may necessitate additional components such as parallel snubbers to mitigate these effects.

Specifically, when an ideal open switch is connected in series with an inductive element, the circuit configuration will lead to the degeneration of the inductor by forcing its current to instantaneously reset to zero. Conversely, if an ideal closed switch is placed in parallel with a capacitive element, it will cause the degeneration of the capacitor by instantly resetting its voltage to zero. These effects arise due to the theoretical assumptions of switching, which neglects any transition time or intermediate impedance, thus resulting in abrupt changes in current and voltage across inductive and capacitive elements, respectively.

Figure 1. Ideal switch modeled as an open/short circuit

LC switch model

In circuit modeling, a switch represented as a LC model switch behaves as:
  • a small inductance in its closed (conductive) state
  • a small capacitance in its open (non-conductive) state
LC model switch introduces additional dynamic effects due to these parasitic inductive and capacitive components, which are influenced by both the switch’s resistance parameter and the simulation time step. The values of the equivalent inductance ( L L ) and capacitance ( C C ) associated with the switch are calculated based on the switch’s resistance R R and the simulation step size T s T_s for the electrical part of the model. The following equations define these relationships:

L = T s   R

C =   T s R

Where L and C are the calculated inductance and capacitance, Ts is the simulation step of electrical part of the model, R is the set resistance value.

These relationships imply that the choice of T s T_s and R R directly affects the transient behavior of the LC model switch, impacting the stability and accuracy of the simulation by introducing minor inductive and capacitive effects.

Figure 2. LC switch modeled as a capacitor/inductor

Switch model in TyphoonSim simulation

Ron/off

In TyphoonSim, in case that solver type is ODE, Ron/ Roff switch is modeled as Ron=0 and Roff=inf, which is considered ideal switch.

In case that solver type is DAE, you can set switch ON resistance, and switch OFF resistance is preset to 1e5.

These setting can be found in Schematic Editor → Model menu → Model Settings

When a switch is represented as an ideal switch in circuit modeling, it behaves as:
  • a short circuit, exhibiting zero impedance, when closed (in its conductive state)
  • an open circuit, exhibiting infinite impedance, when open (in its non-conductive state)
Figure 3. Ideal switch modeled as an open/short circuit