Author Topic: STRANGE LTSPICE SIMULATION  (Read 3567 times)

0 Members and 1 Guest are viewing this topic.

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
STRANGE LTSPICE SIMULATION
« on: November 06, 2016, 12:49:36 am »
I'm back again.
I have found a bit of a strange behavior in LTSPICE.
I have included 2 screen snapshots to show my findings.
Both snapshots are of 2 different circuits, a project circuit and test circuit.
Both have 2 voltage sources both labeled V1 and V2
When I run the simulator on my main circuit which is on the left, I got different results to what I was expecting.
simulation...  .dc V1 -15 -30 1 V2 15 30 1
V1 is a negitive supply Ie. positive grounded.
It simulated as I expected with a single diagonal line running from -30v to -15
simulating V2 gave me multiple parallel lines with no noticeable voltage drop.
This behavior occurs throughout the non-invertingmode circuit.

I then created a new test drawing as seen on the right.
simulation ...   .dc V1 0 30 1 V2 0 30 1
I tried running V1 as a negative supply and as a positive supply and the results were once again as I expected.
But once again simulating V2 gave me multiple parallel lines with no noticeable voltage drop.
I swapped the names of the two supplies and still had the same results.
V1 as I expected, V2  not.
The simulation shown has both voltage supplies as positive output.

Does anyone have any idea why This should be happening?

Thank you.
BILL.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: STRANGE LTSPICE SIMULATION
« Reply #1 on: November 06, 2016, 12:56:03 am »
Please attach the simulations and saved plot settings so we can attempt to reproduce your results.

Edit:
Zip and attach the actual .asc and .plt files from your two simulations - its difficult to tell what's going on just from screenshots.
« Last Edit: November 06, 2016, 01:19:13 am by Ian.M »
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: STRANGE LTSPICE SIMULATION
« Reply #2 on: November 06, 2016, 12:58:41 am »
Sorry about that

Bill
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: STRANGE LTSPICE SIMULATION
« Reply #3 on: November 06, 2016, 01:19:18 am »
Please post the .asc files.....     :-//
The easiest person to fool is yourself. -- Richard Feynman
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: STRANGE LTSPICE SIMULATION
« Reply #4 on: November 06, 2016, 01:42:02 am »
Ok
Here are all of the files in question.
Hope this is able to help.

BILL.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: STRANGE LTSPICE SIMULATION
« Reply #5 on: November 06, 2016, 02:07:39 am »
I'm back again.
I have found a bit of a strange behavior in LTSPICE.
I have included 2 screen snapshots to show my findings.
Both snapshots are of 2 different circuits, a project circuit and test circuit.
Both have 2 voltage sources both labeled V1 and V2
When I run the simulator on my main circuit which is on the left, I got different results to what I was expecting.
simulation...  .dc V1 -15 -30 1 V2 15 30 1
V1 is a negitive supply Ie. positive grounded.
It simulated as I expected with a single diagonal line running from -30v to -15
simulating V2 gave me multiple parallel lines with no noticeable voltage drop.
This behavior occurs throughout the non-invertingmode circuit.

I then created a new test drawing as seen on the right.
simulation ...   .dc V1 0 30 1 V2 0 30 1
I tried running V1 as a negative supply and as a positive supply and the results were once again as I expected.
But once again simulating V2 gave me multiple parallel lines with no noticeable voltage drop.
I swapped the names of the two supplies and still had the same results.
V1 as I expected, V2  not.
The simulation shown has both voltage supplies as positive output.

Does anyone have any idea why This should be happening?

Thank you.
BILL.

Bill,

I ran your simulation, I removed the Zener diodes D1 and D2. The Zener are not in my library of parts so they generate an error.

When you have multiple sources in the DC sweep statement like this:

.dc V1 -15 -30 1 V2 15 30 1

The two voltage sources V1 and V2 are not changed simultaneously.

The line is interpreted like this:

With V2 values of 15 to 30 step 1V sweep the value of V1 from -15V to -30V in 1V steps.

In the other words the simulation runs 16 times.

Solution

I have labelled the voltage at V1 In1.

I have replaced V2 with a behavioural voltage sourced and specified V=-V(In1)

Now, I only need to sweep V1

Model



Results



Regards,

Jay_Diddy_B

 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: STRANGE LTSPICE SIMULATION
« Reply #6 on: November 06, 2016, 03:28:19 am »
Jay_Diddy_B
Thank you for your reply.
I tried as you suggested but all that happened is the non inverting section has a straight line at 0 Volts.
The inverted section works as normal
Have I missed something from your reply.
Is there a reason you renamed V2 to B1
Thanks

I have attached the file as it is now and also an error message I get while Simulating.

The Zener diodes are there to limit the voltage when driving an analog input of a PIC.
How do you change the Simulator output screen colour from black to white?

Got to go now, have to start preparing pizza bases for dinner.
I'm the cook on sundays.

BILL.

 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: STRANGE LTSPICE SIMULATION
« Reply #7 on: November 06, 2016, 03:34:39 am »
Hi,

Here is my model.

I didn't just change the name, I changed the source V2 from a voltage source to behavioural voltage source.

You can change the colors for the waveforms and the schematic from the menu TOOLS -> Color Preferences.

Regards,

Jay_Diddy_B

 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: STRANGE LTSPICE SIMULATION
« Reply #8 on: November 06, 2016, 03:56:15 am »
Jay_Diddy_B
could you tell me what is a  behavioural voltage source.
Is it a Voltage Source that behaves like another??
How do I change  a voltage source to a behavioural voltage source.

Please forgive all of these silly questions, but I've only had LTSpice for less than a week.

Thank You,

BILL.
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: STRANGE LTSPICE SIMULATION
« Reply #9 on: November 06, 2016, 04:02:14 am »
Jay_Diddy_B
Found the behavioural voltage source

It'sOK
thankyou for your help

BILL.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: STRANGE LTSPICE SIMULATION
« Reply #10 on: November 06, 2016, 04:08:09 am »
Jay_Diddy_B
could you tell me what is a  behavioural voltage source.
Is it a Voltage Source that behaves like another??
How do I change  a voltage source to a behavioural voltage source.

Please forgive all of these silly questions, but I've only had LTSpice for less than a week.

Thank You,

BILL.


A behavioural source is basically a source that is defined by at least one voltage and may be a mathematical equations.

for example V=I(V1)* V(IN1)

V is equal to the product of the voltage and current of source V1. That is the power coming out of V1. Assumes that you label the node IN1.

The simple way is to delete the voltage source, vol, and insert a new component BV (or BI if you want current).

Go HELP -> HELP Topics, type BV and then click list topics. Select B and then display.

Regards,

Jay_Diddy_B
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: STRANGE LTSPICE SIMULATION
« Reply #11 on: November 06, 2016, 04:33:09 am »
Thanks for that.

BILL.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf