Author Topic: LTSpice simulation doesn't like the the real circuit  (Read 1332 times)

0 Members and 1 Guest are viewing this topic.

Offline ZainiiiTopic starter

  • Contributor
  • Posts: 16
  • Country: us
LTSpice simulation doesn't like the the real circuit
« on: August 20, 2024, 01:54:33 am »
I built the function generator circuit on a breadboard. I applied a signal with an amplitude of 1.06Vpp and a frequency of 5MHz using the DDS 9851 and then sent it to the operational amplifier, AD 8001. After amplification, the signal increased to 4Vpp while maintaining the same 5MHz frequency. However, some distortion appeared in the signal after amplification. To address this, I connected a ferrite bead with a rating of 1kΩ in series with the signal. After using the ferrite bead, the signal became much cleaner with very little noise. This allowed me to remove the large laboratory function generator and apply the amplified signal directly to my sensor.

This is my first experience working with LTSpice software. I recreated the same circuit in LTSpice, using the same resistor values and one simulation with more resistors value. However, in the simulation, the signal amplitude did not increase as it did in my real circuit. The signal did not amplify after using the same operational amplifier in LTSpice. Do you think LTSpice should amplify the signal as much as the real circuit does when using a single operational amplifier?

I have drawn a picture of my real circuit, which I will show to you along with the LTSpice circuit and its results. Additionally, I will show you the signal results that I measured with an oscilloscope. Could anyone please share your experience and tell me whether this significant difference in signal amplitude between the real circuit and the LTSpice simulation is common when using simulation software? Or could this discrepancy be due to a mistake on my part, given that there are differences between reality and software simulations? I f there is some mistake on my side, can someone highlight my mistake please
 

Offline E-Design

  • Regular Contributor
  • *
  • Posts: 206
  • Country: us
  • Hardware Design Engineer
Re: LTSpice simulation doesn't like the the real circuit
« Reply #1 on: August 20, 2024, 03:49:12 am »
Well, your sim circuit gain of 7 doesnt match your paper.... the simulation circuit with a power supply of 6V cannot output 7V.. maybe thats whats wrong?
The greatest obstacle to discovery is not ignorance - it is the illusion of knowledge.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3247
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #2 on: August 20, 2024, 04:40:13 am »
I originally thought your +/- power rails were not configured correctly, but upon further consideration perhaps they are.

In any case, here's a more conventional and easier to understand way of defining a +/- power supply in LTspice:

From this video:

LTspice: How To Make A Dual Power Supply! -- Supersonic Tutorials
https://youtu.be/FhEsSpyHXtk

2345069-0

 
The following users thanked this post: Zainiii

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15215
  • Country: fr
Re: LTSpice simulation doesn't like the the real circuit
« Reply #3 on: August 20, 2024, 06:28:11 am »
(Wrong section.)

You have several problems.

Yes, the gain should be 7.
In LTSpice (and Spice in general), the amplitude of a voltage source is not peak-to-peak. So, 1.06V of amplitude means a signal between -1.06V and +1.06V. Times 7, that would be -7.42V to +7.42V.

Of course, with a +/-6V supply, the opamp can't possibly output that. You'll have to look at the datasheet. This one can't output above more or less 2V below the power rails, so at +/-6V, that would be about +/-4V max.

So of course, the output with the parameters you showed here will be severely distorted (clamped).

In any case, the signal you're showing in simulation just looks like the output of the voltage source, not the output of the opamp. There's 99.9% chance you're looking at the wrong signal.
The output of the opamp in LTSpice should show the clamping (and possibly high-freq oscillations too as this particular opamp is very fast).

If you really want a gain of 7 and an output voltage up to +/-7.5V, you'll need to power the opamp with +/-9.5V, but this one is rated for +/-6V max, so that's not going to work.
You'll have to pick another opamp, or decrease the gain.

Also, with such a fast opamp, you may want to add some frequency compensation. (You can start with a small capacitor in parallel with the feedback resistor.)
« Last Edit: August 20, 2024, 06:30:52 am by SiliconWizard »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5121
  • Country: bt
Re: LTSpice simulation doesn't like the the real circuit
« Reply #4 on: August 20, 2024, 07:16:36 am »
Your negative voltage source is wrongly wired..
Also mind the DDS' output when not decoupled via a capacitor has got a DC bias (also there should be a low pass output filter at the DDS output, perhaps you are using a off the shelf module where it is usually provided).

Below a simulation - the DC biased (at 1V) input 5MHz AC voltage is decoupled via a capacitor and the input amplitude is 0.503Vp (the LTspice is using an "amplitude" = Vpp/2).

PS: the R4=680ohm should be 850ohm (R1 || R2) to be exact.. (does not matter much here)..
PPS: the amplitude at your biosensor will depend on the (R2/R1+1) ratio and on the biosensor's impedance, of course..
Your opamp's V+ and V- have to be decoupled properly as well (ceramics + tantalum capacitors) and you have to use proper wiring/grounding..
« Last Edit: August 20, 2024, 08:03:27 am by iMo »
 
The following users thanked this post: Zainiii

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20417
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: LTSpice simulation doesn't like the the real circuit
« Reply #5 on: August 20, 2024, 10:50:16 am »
I built the function generator circuit on a breadboard.
...
However, some distortion appeared in the signal after amplification.
...
To address this, I connected a ferrite bead with a rating of 1kΩ in series with the signal. After using the ferrite bead, the signal became much cleaner with very little noise. This allowed me to remove the large laboratory function generator and apply the amplified signal directly to my sensor.

Define "some distortion"; show a picture.

Why did you decide to include ferrite beads? Why do you think they changed things?

Does your implementation have decoupling capacitors.

Your breadboard implementation was probably different to the circuit you simulated. For examples of typical differences, see https://entertaininghacks.wordpress.com/2024/03/16/practical-traps-with-a-one-transistor-audio-amplifier-solderless-breadboards-and-oscilloscopes/ Ferrite beads are mentioned in passing.

I suspect you are learning that a simulation is only as good as the model it is simulating. Apart from the issue of "stray" components not being included, the Spice primitives can be poor, e.g. https://www.eevblog.com/forum/beginners/please-help-understanding-relative-permiivity/msg5586663/#msg5586663
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline abraxalito

  • Contributor
  • Posts: 10
Re: LTSpice simulation doesn't like the the real circuit
« Reply #6 on: August 20, 2024, 11:34:48 am »

Also, with such a fast opamp, you may want to add some frequency compensation. (You can start with a small capacitor in parallel with the feedback resistor.)

That would be sound advice if the AD8001 were a traditional voltage-feedback type. However its a current-feedback type and a cap in that position will make it potentially unstable.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2417
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #7 on: August 20, 2024, 07:27:01 pm »
Take a look at the datasheet again; scroll down to "Recommended Component Values".  6k is way outside the recommended range.  This matters for CFB amplifiers.

And also "Figure 6. 0.1 dB Flatness vs. Frequency" to see how resistor values impact flatness.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15215
  • Country: fr
Re: LTSpice simulation doesn't like the the real circuit
« Reply #8 on: August 20, 2024, 10:24:51 pm »

Also, with such a fast opamp, you may want to add some frequency compensation. (You can start with a small capacitor in parallel with the feedback resistor.)

That would be sound advice if the AD8001 were a traditional voltage-feedback type. However its a current-feedback type and a cap in that position will make it potentially unstable.

Ah yes, didn't notice it. Adding a cap in the feedback network wouldn't be recommended then. Alternatively, to limit the bandwidth, one can place a RC lowpass filter right before the + input.

The rest of what I said holds. Oh, and, out of curiosity, I had a look in LTSpice and the AD8001 has no model (yet) in its Opamp library. So one may wonder where the OP got the model, whether they properly linked it to an opamp symbol, and whether they didn't just use a random opamp model and renamed it AD8001. Or maybe I missed it. Curious. Although I have a feeling that the OP may never come back. Oh well.

 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3247
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #9 on: August 21, 2024, 03:27:02 am »
Oh, and, out of curiosity, I had a look in LTSpice and the AD8001 has no model (yet) in its Opamp library.

You can get one from the Analog web page:

https://www.analog.com/en/products/ad8001.html

Scroll down to "Tools & Simulations" and look under "SPICE Model".

There are models for th -A, -AN and -AR variants.

« Last Edit: August 21, 2024, 03:28:43 am by ledtester »
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15215
  • Country: fr
Re: LTSpice simulation doesn't like the the real circuit
« Reply #10 on: August 21, 2024, 04:18:57 am »
Oh, and, out of curiosity, I had a look in LTSpice and the AD8001 has no model (yet) in its Opamp library.

You can get one from the Analog web page:

Yep, but somehow, for someone saying "This is my first experience working with LTSpice software", I can doubt they managed to properly create a new LTSpice symbol with the Spice model, assign pins to the right order, etc. Who knows. But this is a pretty FAQ, so a total beginner finding their way around for this, kudos.

Anyway from the only screenshot we got, we can only suspect the OP was looking at a trace for the input voltage source rather than the output of the opamp. Although only zooming at it would tell for sure. And without any label, and not providing the .asc file, net numbers are not very useful.

All that to answer the "why the simulation doesn't match reality" - which clearly it grossly didn't here. Obviously there are otherwise issues with the schematic that a few of us have already pointed out. But absolutely no reason why the OP could not get a reasonable simulation out of something this simple, as long as done properly.
 

Offline ZainiiiTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #11 on: August 23, 2024, 06:30:12 pm »
Dear I followed this tutorial and make the circuit but my results was different
 

Offline ZainiiiTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #12 on: August 23, 2024, 06:33:02 pm »
You are right, i did the same thing as you told and got the correct result, thanks for the advice Sir
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20417
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: LTSpice simulation doesn't like the the real circuit
« Reply #13 on: August 23, 2024, 06:34:25 pm »
Dear I followed this tutorial and make the circuit but my results was different

See reply #5 above.

Almost certainly the circuit you built was significantly different to the one you simulated.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20417
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: LTSpice simulation doesn't like the the real circuit
« Reply #14 on: August 23, 2024, 06:36:33 pm »
You are right, i did the same thing as you told and got the correct result, thanks for the advice Sir

We've no idea what you are referring to. Who is "you"? What did you do?

Please use the "quote" button above the message, and then add a response to that.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline ZainiiiTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #15 on: August 23, 2024, 09:05:42 pm »
Dear Sir
Thanks a lot for the reply.
The reason to add ferrite bead, is in the real circuit, when i applied to signal to operational amplifier the output i generate was very distorted and when i add the ferrite bead in series with the signal, the signal become very smooth.
I also used the o.01uF decoupling capacitor to input voltage of operational amplifier.
From the comment i have realized that , it important to add LF after the DDS owing to DC component inside the signal
 

Offline ZainiiiTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #16 on: August 23, 2024, 09:18:50 pm »
the reason to use AD 8001.
1) Other operational amplifier like AD 8001 features are not available in DPIP package and i have to draw the circuit on bread board, that why i used this, if it is not suitable can you recommend me some operational amplifier having such features and better than this.. My signal frequency would be 5Mhz-6Mhz and signal amplitude that i will provide would be 0.53Vp
2) other operational amplifier have either small skew rate of low bandwidth that's why i used this one having both rating very high  like
High Speed and Fast Settling
880 MHz, –3 dB Bandwidth (G = +1)
440 MHz, –3 dB Bandwidth (G = +2)
1200 V/s Slew Rate

3) before that i didn't use the capacitor in my circuit but after get the suggestion from experts they said i must use the LP filter after the DDS, so i am going to use it before the operational amplifier AD 8001.
 

Offline ZainiiiTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #17 on: August 23, 2024, 10:04:19 pm »
Dear Sir.
Thanks a a lot for the guidance, i will use the resistor value, that should be less than 1K as per the data sheet,
i have one question, if i will use the less current there would be more power dissipation in the circuit and more current will flow in it e.g. thermal issue. Moreover it will also put the load on the DDS from where i ma generating my signal that is 1.06Vpp and 5mHZ.
I have to adjust and use the most optimize and best one ?
 

Offline ZainiiiTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #18 on: August 23, 2024, 10:09:09 pm »
Dear Sir.
Thanks a lot for the reply, you are right AD 8001 symbol is not present in the directory, but i made the symbol using the You tube video, i successful made the symbol of AD 8001 and now my results are correct, i was doing mistakes actually, thanks for your response and time, highly appreciated Sir
i am going to attach the symbol picture in the comment
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3247
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #19 on: August 23, 2024, 10:15:56 pm »
Can you attach all of the files you used in the simulation -- .asc file, the 8001 Spice file and the symbol file? Then we can run the circuit ourselves.
 

Offline ZainiiiTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Re: LTSpice simulation doesn't like the the real circuit
« Reply #20 on: August 24, 2024, 04:06:28 pm »
I have attached the circuit file in the comments, dear sir. I have a question.

1)  I generated two signals: one is 2 V peak (Vp) and the second is 2.5 V peak (Vp), with frequencies of 5 MHz and 6 MHz, respectively. In the real circuit, if I don't use ferrite beads after the operational amplifier, both signals show a very high level of distortion. I managed to reduce the noise and distortion by using ferrite beads. However, in the LTSpice simulation, when I don't use ferrite beads and the low-pass filter (LPF), the signal amplitudes become very accurate. But when I use either the ferrite beads or the LPF (or both), there are fluctuations in the signal amplitude. For example, if I only consider the 2.5 Vp signal and check its amplitude throughout, in one cycle, the amplitude sometimes drops to 2.44 Vp, 2.48 Vp, or 2.49 Vp. How can I achieve a constant amplitude of 2.5 Vp? Why does adding the LPF and ferrite beads in the simulation cause amplitude fluctuations, whereas in reality, they improve the signal's distortion and noise levels?

2)  When I use the LPF before the operational amplifier, there is a slight drop in signal amplitude, but I understand this is a common occurrence. Could you please check my circuit and suggest any improvements or modifications?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf