# LTSpice vs PSPICE (orCAD)

Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446
Hello guys.

I have a schematic (already built by someone) ready-to-use to analyse it's output wave forms and I was trying to replicate it in LTSpice. But wave forms on LTSpice are way far from what PSPICE is showing up.

I'll attach files of LTSpice and screens of PSPICE. If anything else is needed, please ask!

I'm just not sure how to add 'series resistance' to the Voltage Controlled Switch! Not sure if it's important, or not!

#### Attachments

• 663 bytes Views: 10
Last edited:

#### crutschow

Joined Mar 14, 2008
24,980
Please post both circuit diagrams and both results.
I don't like zip files.

#### Jony130

Joined Feb 17, 2009
5,163
The Voltage Controlled Switch model should look something like this
.model SW SW(Ron=10 Roff=10Meg Vt=0.5 Vh=0.1)

Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446
AAC doesn't allow files not zipped but images!

Well, I'm not getting nice results from any of the circuits, so I'll post only LTSpice schematic screenshot. PSpice screenshots are alreay in my previous post.

Edited;
@Jony130 I only saw your post now! Going to change!

Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446
No difference... The only match is VSwitch plot?

#### Jony130

Joined Feb 17, 2009
5,163
AAC doesn't allow files not zipped but images!
But .asc files are also allowed.
Post orCAD file also.

Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446
Ok, here they go.

I've attached the file on it's own and also the folder where it should be because I think it won't work on it's own!

#### Attachments

• 1.3 KB Views: 4
• 269.7 KB Views: 2
• 4.1 KB Views: 1

#### Alec_t

Joined Sep 17, 2013
11,302
Try this :

#### Attachments

• 1.4 KB Views: 3
Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446

#### Jony130

Joined Feb 17, 2009
5,163
This is the closest I can get. Without knowing diode model and the switch.

#### Attachments

• 1.4 KB Views: 1
Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446
I can add here PSice diode parameters used...

The line that is not completely visible is:
Code:
d^@refdes %A, %K, mod^@refdes \n.model mod^@refdes d (rs=@rs)

Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446
Ok...
I'm using also Yahoo Groups for this because there is a very well know LTSpice Group that has a lot of very experienced LTSpice users, such has this Ms Helmut Sennewald. He just picked up my PSpice Net List file of the circuit in question and turned it into an LTSpice usabe file. The plots are quite similar. I just couldn't understand the description he did about the changes he made. I'll let them here properly quoted and 'credited'.

From Yahoo LTSpice Group

Helmut Sennewald said:
Hello,

top-level netlist "PSDIODE_custom.cir" copied to "PSDIODE_custom_ltspice.cir" just work on acopy.

I changed .tran
I commented ".lib nom.lib" (If you need models from it, copy it into the folder of this netlist.)
I commented ".INC "PSDIODE_custom.als" (LTspice doesn't understand these aliases for the plot)
See the final top-level netlist below.

No changes done in "PSDIODE_custom.net" in this case.
Please note that the switch model VSWITCH has been used. It's different from SW. That's why I have to use VSWITCH in the schematic.
.model SW VSWITCH(Ron=1m)
and the didoe model is not a MUR460.
.model DD D(Rs=1m)
Last but not least there is an ".option gmin=1u" in the PSPICE netlist.
When I do all these changes in the LTspice schematic, the result has been the same.
See my files Diode-PSPICE-LTspice.zip and PS-net-LTspice-schem.GIF.
https://groups.yahoo.com/neo/groups/LTspice/files/ Temp/

Final contents of PSDIODE_custom_ltspice.cir

** Analysis setup **
*.tran 1n 60ns 0 0.1n SKIPBP
.tran 0 60n 0 0.1n
.OPTIONS GMIN=1u

* From [PSPICE NETLIST] section of pspiceev.ini:
*.lib "nom.lib"

.INC "PSDIODE_custom.net"
*.INC "PSDIODE_custom.als"

.probe
.END

Best regards,
Helmut

I'll upload a zipped file containing all Ms Helmut work... It has 2 folders, one with LTSpice stuff and another with PSpice stuff.

#### Attachments

• 3.7 KB Views: 3

#### Alec_t

Joined Sep 17, 2013
11,302
Barely different from my LTSpice original circuit!
It is your circuit, but with the switch model corrected

Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446
It is your circuit, but with the switch model corrected
Yeah, I know! I didn't remember that the SW model should be changed to be a little bit more realistic! I thought that with the changes you made I would probably get more visible results and closer to what PSpice was plotting out!

Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446
Hello again...

In the circuit I posted above, how can I justify the voltage across the inductor of about 16V and also the voltage across the diode of 5V? I cannot understand these 2 values!

Thanks
Psy

Edited;
And also why there is no voltage reading across the inductor except for the moments when the controlled switch is activated/deactivated!

#### Alec_t

Joined Sep 17, 2013
11,302
I have never used Pspice, so I don't know how it behaves.

#### Jony130

Joined Feb 17, 2009
5,163
If my memory serves me well the voltage across the incudtor look like this:

VL = L* dI/dt

This equation indicates that inductance voltage depends not on current which actually flows through the inductance, but on its rate of change. This means that to produce the voltage across an inductance, the applied current must change. If the current is kept constant, no voltage will be induced, no matter how large the current. Conversely, if it is found that the voltage across an inductance is zero this means that the current must be constant but not necessary zero.

In summary:
When the current is increasing di/dt > 0, so V must be positive because L times a positive number yields a positive voltage.
When the current is decreasing di/dt < 0, so V must be negative because L times a negative number yields a negative voltage.
When we have no change in current over time then we cant have any voltage V = L*di/dt = L * 0 = 0.

As for the diode voltage 5V ?? when?

Thread Starter

#### PsySc0rpi0n

Joined Mar 4, 2014
1,446
@Jony130 I was wrong about the 5V on the diode. The scale tricked me! Thanks

#### Attachments

• 49.3 KB Views: 8