2164-models.lib 368 B

12345678910111213
  1. .subckt SII2161_ideal iin vc iout
  2. R1 iin n1 1n
  3. V1 n1 0 0
  4. R2 vc 0 10k
  5. * Create output current based on the input current and the control voltage
  6. B1 0 iout I=limit(I(V1), -1m, 1m)*2**(-5.0505*V(vc))
  7. ;B1 0 iout I=I(V1)*2**(-5.0505*V(vc))
  8. * Limit output voltage with a specialized diode
  9. D1 iout 0 clamp_diode
  10. .model clamp_diode D(Ron=10 Roff=1Meg Vfwd=.1 Vrev=.1)
  11. .ends