Continue to Site

# Making an LTSpice model work in PSspice

Status
Not open for further replies.

#### elsalty

##### Newbie level 4
I know there are a few differences (for example LTSpice supports "ln" for log base e, but in pspice you have to use "log" for log base e), but I am a little confused on a couple of other things. One of them is the "B" sources. The LTSpice model I have has B sources like this:

B1 2 1 I=(V(d2,d1))/((0.0000184*((V(Tj))**2)+0.004523*(V(Tj))+0.43714)+1n)

I wasn't familiar with B sources, but they are an arbitrary behavioral voltage or current source. Pspice (or Hspice) does not seem to support this. Since this is a current source in this instance (I=) I changed it to

G1 2 1 VALUE = {(V(d2,d1))/((0.0000184*((V(Tj))**2)+0.004523*(V(Tj))+0.43714)+1n)}

So it is now a voltage dependent current source, and I also had to add the {} brackets. Would this be an equivalent change?

Another issue I had was with the .param and passing parameters on to subcircuits. The original model had something like

Code:
.param lf1=1
Xgd  d1 g1  gda params: lf=lf1
Rl 1 2 {26.8/af1}
CD 3 4 {8.64p*lf1}

.subckt gda d g
C_CG g d {1p*lf)
.ends gda

.end

The .params that passes the value lf=lf1=1 on to the subckt is supported in Pspice, however it gives me an invalid parameter error until I remove it and just replace all of the lf and lf1 instances with "1".

Thanks for any suggestions or help. I have been struggling with this for a while.

#### mvaseem

##### Full Member level 2
Regarding B device conversion, you seem to be doing the right thing.
For param issue - try below syntax ,

Code dot - [expand]1
2
3
4
5
6
7
8
.param lf1=1
Xgd d1 g1 gda params: lf={lf1}
Rl 1 2 {26.8/af1}
CD 3 4 {8.64p*lf1}

.subckt gda d g params: lf={lf1}
C_CG g d {1p*lf)
.ends gda

Last edited by a moderator:

Status
Not open for further replies.