How are the Ltspice library optocouplers modeled? E.g. PC817 has this one:
.subckt PC817 1 2 3 4
R1 N003 2 2
D1 1 N003 LD
G1 3 N004 N003 2 {Igain}
C1 1 2 18p
Q1 3 N004 4 [4] NP
.model LD D(Is=1e-20 Cjo=18p)
.model NP NPN(Bf=1200 Vaf=140 Ikf=100m Rc=1 Cjc=19p Cje=7p Cjs=7p C2=3e-15)
.ends PC817
It looks like the input diode is connected in series with a resistor and voltage across the resistor is fed to a voltage-controlled current source. The source is connected between the base and collector of the output transistor.
If this interpretation is correct, how much is the source A/V gain? I can only see {Igain}
but no link to anything. And what does [4]
mean? My search for the general meaning of curly and square braces failed to deliver results.
PC817
device (as inX1 a b c d PC817 Igain=10
) or as part of a.param
statement \$\endgroup\$