How can I find DC gain via AC simulation in LTspice

In summary, the dc gain is the ratio of two resistors and can be found by graphing the AC response and assuming a constant gain.
  • #1
Homework Statement
opamp
Relevant Equations
ltspice
I use this netlist and simulation result came out as shown. I need to find the dc gain here and circuit diagram, but I'm not sure how. I would be very grateful if you could give me the answer.
 

Attachments

  • 1.png
    1.png
    4.4 KB · Views: 208
  • 2.png
    2.png
    9.7 KB · Views: 197
Physics news on Phys.org
  • #2
Can you post a screenshot of the schematic view?
 
  • #3
I'm sorry, but I don't have data on the schematic. Because of the professor's instructions, I only have the netlist, and I have to run the simulation through it and find out the results. The result of the ac simulation is like the picture, and I don't know how to find the dc gain here.
 
  • #4
song youngill said:
I'm sorry, but I don't have data on the schematic. Because of the professor's instructions, I only have the netlist, and I have to run the simulation through it and find out the results. The result of the ac simulation is like the picture, and I don't know how to find the dc gain here.
OK, but I suspect your professor is an idiot, schematics are how we communicate in electronics, JMHO. For a simple circuit like this we can usually read the DC gain as the ratio of some resistors, without any simulation.

Anyway, you can approximate DC as ##f \rightarrow 0##. So, if you graph the AC response and you get the same constant gain at the small values of ##f##, then you can usually assume that that is the DC gain. For bonus points you can also check that the phase shift is ##0^o## or ##180^o##, which is what you normally get when the gain isn't changing.

Since you are only asking about simulation results, you could also ask the computer by changing the '.ac' line to a '.dc' command. Time to use google search, I'd start with "ltspice dc analysis", myself.

Other tricks for DC analysis, in general: replace all of the capacitors with an open circuit, and replace all of the inductors with a short circuit. Those won't affect the DC gain and might make it easier to see a simple answer.
 
  • #5
I very much agree that the professor is an idiot. You said that the part that is kept constant becomes the dc gain, and in that graph, 100dB seems to be constant. But 100dB itself can't be gain, so please tell me what additional steps should be performed through ltspice to get dc gain. I've looked it up on Google before, but I've given up on it because it's so vast and has so many irrelevant answers.
#Is 20log(V input) a dc gain?
 
  • #6
song youngill said:
But 100dB itself can't be gain, ...
100 dB can be the voltage gain. The input is AC 1 volt.
Convert 100 dB to a voltage ratio or;
Select the left axis of plot, manual change from dB log to linear, then read off the DC gain = your answer.
Attached is the D_gain_2.asc for LTspice.
 

Attachments

  • D_gain_2.asc.txt
    286 bytes · Views: 148
  • Like
Likes berkeman
  • #7
dB is nearly always used to express a ratio, or gain (dimensionless). For a ratio of powers ##dB=10log(\frac{P_2}{P_1})##, for voltages or currents it is ##dB=20log(\frac{V_2}{V_1})##. The idea behind the factor of 20 instead of 10 is that it was originally defined as a power ratio and power is proportional to ##V^2## (or ##I^2##), and ##10log((\frac{V_2}{V_1})^2) = 20log(\frac{V_2}{V_1})##

We also use dB for values that aren't ratios, but then people should designate that with an added symbol. This is essentially the same as above except P_1 or V_1 are replaced with a fixed predefined value like 1mW, 1V, 1uA, etc.

Some common versions are:
##dBm=10log(\frac{P}{1mW})## by far the most common
##dBv=20log(\frac{V}{1V})##
##dBuA=20log(\frac{I}{1uA})## used a lot in EMC standards
##dBc=10log(\frac{P_{recieved}}{P_{carrier}})## for radios

People can be sloppy with this, so sometimes you'll need to ask or just know from the context what their version is.
 
  • #8
song youngill said:
I very much agree that the professor is an idiot.
Maybe not. I think the schematic is not given in the hope that the student will create a schematic by learning to decypher the spice source code using the help files. It is worth the exercise.
 
  • Like
Likes berkeman

1. What is the purpose of finding DC gain via AC simulation in LTspice?

The purpose of finding DC gain via AC simulation in LTspice is to determine the voltage gain of a circuit at different frequencies. This allows for the analysis of a circuit's frequency response and can be useful in designing filters, amplifiers, and other electronic systems.

2. How do I perform an AC simulation in LTspice?

To perform an AC simulation in LTspice, you must first set up your circuit in the schematic editor. Then, click on the "Simulate" menu and select "Edit Simulation Command". In the dialog box that appears, change the "Analysis type" to "AC Analysis" and enter the desired frequency range and step size. Finally, click on the "Run" button to start the simulation.

3. How do I calculate the DC gain from the AC simulation results?

To calculate the DC gain from the AC simulation results, you will need to plot the output voltage versus the input voltage on a logarithmic scale. The DC gain can then be determined by finding the slope of the linear portion of the plot. Alternatively, you can use the cursor tool to measure the voltage gain at a specific frequency.

4. Can I perform an AC simulation on a circuit with nonlinear components?

Yes, you can perform an AC simulation on a circuit with nonlinear components in LTspice. However, the results may not be accurate as LTspice uses linear approximations for these components. It is recommended to use a more advanced simulation tool for circuits with nonlinear components.

5. How can I improve the accuracy of my DC gain calculation in LTspice?

To improve the accuracy of your DC gain calculation in LTspice, you can increase the number of frequency points in the AC simulation or use a smaller frequency step size. Additionally, you can use the ".OPTIONS" directive in the LTspice netlist to specify a higher precision level for the simulation.

Suggested for: How can I find DC gain via AC simulation in LTspice

Replies
6
Views
2K
Replies
38
Views
2K
Replies
4
Views
325
Replies
7
Views
1K
Replies
17
Views
836
Replies
4
Views
477
Replies
1
Views
176
Replies
8
Views
538
Back
Top