Current-controlled switch

Symbol

../../../_images/SwitchC.svg

Information

../../../_images/SwitchC.png

A current controlled switch is a type of switch whose operation is controlled by the input current across at the nodes pc and nc, and the switch is turned on or off (open or close) between the nodes p and n.

The current-controlled switch described with the following equation:

switch position on
\[ \begin{align}\begin{aligned}if(I_c >=I_{on})\\Switch [on] \Rightarrow Rs=R_{on}\end{aligned}\end{align} \]
switch position off
\[ \begin{align}\begin{aligned}if(I_c <=I_{off})\\Switch[off] \Rightarrow Rs=R_{off}\end{aligned}\end{align} \]
  • The \(Rs\) is resistance of switch.

  • The \(I_c\) is current control.

  • The \(I_{on}\) is current for on switch.

  • The \(I_{off}\) is current for off switch.

Ports

  • \(pc\) Positive control voltage terminal.

  • \(nc\) Negative control voltage terminal.

  • \(n\) The switch connects.

  • \(p\) The switch connects.

Symbol description

Field

Value

Symbol.name

current controlled switch

Symbol.file

Switch.sym

Symbol.directory

Basic

Symbol.referance

S

Model.name

SwitchC

Model.file

SwitchC.py

PyAMS model

The current controlled switch model in PyAMS is

from PyAMS import model,signal,param
from electrical import voltage,current
from Resistor import Resistor

#Switch control current Model--------------------------------------------------
class SwitchC(model):
  def __init__(self, pc,nc,p,n):
      #Signals declarations---------------------------------------------------
      self.Ic = signal('in',current,pc,nc)

      #Resistor model---------------------------------------------------------
      self.Rs=Resistor(p,n)

      #Parameters declarations------------------------------------------------
      self.Ion=param(1e-3,'A','Current for on switch')
      self.Ioff=param(-1e-3,'A','Current for off switch')
      self.Ron=param(10.0,'Ω','Resistance on value')
      self.Roff=param(1e+6,'Ω','Resistance on value')
      self.Rint=param(10.0,'Ω','Resistance intiale value')

  def sub(self):
      self.Rs.R=self.Rint
      return [self.Rs]


  def analog(self):
      #Switch on vlaue
      if(self.Ic>=self.Ion):
          self.Rs.R=self.Ron;

      #Switch off vlaue
      if(self.Ic<=self.Ioff):
          self.Rs.R=self.Roff;

Command syntax

#import model
from SwitchC import *

#Sname: is the name of the model.
#pc,nc,p,n: The connection position in the circuit.
Sname=SwitchC(pc,nc,p,n)