Time Domain Sim works fine, Frequency Domain Sim does not match

When I perform a Time Domain simulation using V4, 1mV, 1KHz, the peak signal at node "stage5" is 2.179 for a gain of 579 -- reasonably close to the designed gain of 551.

However, for the Frequency Domain simulation using V4, 1Hz to 4kHz, 20 points/decade, node "stage5" shows a gain loss of -8dB at 1KHz. In fact, the entire graph seems wrong.

Playing around with other op-amp models (such as TL081) does seem to give more consistent results. Why does my custom model work fine in the Time Domain but not for the Frequency Domain?

https://www.circuitlab.com/circuit/9bvkme/sensor-coil-amplifier-filter/

by FolsomMike
July 12, 2014

After boosting the op-amp's A_OL to better match what I believe to be the true open-loop gain (datasheets are pretty vague), the results are much better.

I get a 54.94 dB (558 Gain) reading at 1Khz which is reasonably close. Fortunately, my Time Domain results are still good.

So...why does the Time Domain simulation seem to ignore A_OL while the Frequency Domain simulation is very sensitive to it? It seems like both sims would have to use that parameter to obtain accurate results.

by FolsomMike
July 12, 2014

The amplitude of a time domain signal source is set by the "Edit parameters" boxes and are pretty obvious however these are not the parameters used for a frequency domain sweep.

You need to understand how CL deals with Frequency domain signal sources.

Have a look at:

https://www.circuitlab.com/docs/the-basics/#frequency_domain_simulation

and this thread:

https://www.circuitlab.com/forums/feature-requests/topic/cs5774ts/signal-amplitudes-with-multiple-ac-sources-rather-than-gain/

:)

by signality
July 12, 2014

I understand that Frequency Domain sim does not use the settings in the "Edit Parameters" boxes for sources.

I'm just surprised that changing an op-amp's A_ON affects Freq Dom but not Time Dom sims. It would seem that both sims would need to use the op-amp's parameters to derive results.

by FolsomMike
July 12, 2014

If I set up a parameter

avol = 1e6

then edit the A_OL parameters value of each opamp to:

'avol'

and then run both a time domain and a frequency domain sweep with:

Sweep parameter : Yes (tick)

Parameter: avol

Sweep type: Custom

Values: 1e2, 1e5, 1e6

then the sets of traces for A_OL = 1e5 and A_OL = 1e6 shows no significant difference between the two gain values whilst the traces for A_OL = 1e2 shows an expected reduction in overall gain..

What A_OL did you start with before you set it to the 1e6 that is in your sim at the time of my writing this?

Have you tried exploring the effect you think you are seeing in a simple single opamp circuit without all the succession of input high pass, gain and low pass filtering stages in your circuit?

by signality
July 12, 2014

That will take me a while to chew through.

I started with the same gain as the default TL08, i.e. 300000.

I keep seeing posts in the forum with cool tricks such as using a "parameter" such as you did above, but I can't seem to find a good explanation of these techniques.

Is the only documentation at https://www.circuitlab.com/docs/expressions/ or is there a more comprehensive manual/tutorial somewhere?

For example, the documentation for "DC Sweep Simulation" seems to cover the entire topic in 8 lines of text. It mentions sweeping over an element's parameters, but doesn't mention "set up a parameter" such as you did with "avol = 1e6". Where in the documentation is that covered?

I read documentation for all simulations, "Expressions", and searched for "set up a parameter" but can't find an explanation of how you did that. Looks pretty useful and I'd like to learn more...where should I look?

by FolsomMike
July 12, 2014

I spent several hours stripping the circuit apart piece by piece, this is the minimum circuit which exhibits the problem:

https://www.circuitlab.com/circuit/sxqztj/known-bad/

When not working, node "stage5" gives -200dB. When working, gives 15dB.

Making superfluous changes nearly anywhere in the circuit makes it "work"...seemingly random changes such as:

disconnecting R18 connecting R18 to GND instead of 1.6V changin OA3 or OA6 to non-rail version changing OA6 to an LMC6484-3V changing OA5 & OA6 to an TL081 (rail version) changing R15 to a short removing connection between OA5 and OA6 connecting various resistors to GND instead of 1.6V

Changing from the TL081 to some other op-amps solves the problem; some work, some don't.

To the best of my intuition, it seems that mixing some op-amps with rails is the root of the problem. When all op-amps are the same or all op-amps with rails are the same, it seems to work.

When there is a mixture of different amps with rails, the simulation varies in response to seemingly random and irrelevant circuit modifications.

by FolsomMike
July 12, 2014

Thanks. I'll study those examples.

by FolsomMike
July 13, 2014

Post a Reply

Please sign in or create an account to comment.