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
song youngill
6
0
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: 223
  • 2.png
    2.png
    9.7 KB · Views: 212
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: 159
  • 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. How do I set up an AC simulation in LTspice?

To set up an AC simulation in LTspice, go to the "Simulate" menu and select "Edit Simulation Command". In the pop-up window, select "AC Analysis" as the type of simulation and specify the desired frequency range and number of points. Then click "OK" to run the simulation.

2. How do I find the DC gain in an AC simulation in LTspice?

To find the DC gain in an AC simulation in LTspice, plot the output voltage or current and measure its value at the desired frequency. Alternatively, you can use the ".meas" command to calculate the gain at a specific frequency and display the result in the waveform viewer.

3. Can I use LTspice to find the DC gain of a specific component in a circuit?

Yes, you can use the ".meas" command in LTspice to find the DC gain of a specific component in a circuit. Simply specify the component name and the desired frequency, and the simulation will calculate and display the gain in the waveform viewer.

4. How can I adjust the frequency resolution in an AC simulation in LTspice?

To adjust the frequency resolution in an AC simulation in LTspice, go to the "Simulate" menu and select "Edit Simulation Command". In the pop-up window, click on the "Options" button and adjust the "Points per decade" value to increase or decrease the frequency resolution. Keep in mind that a higher resolution will result in a longer simulation time.

5. Is there a way to plot the AC gain in LTspice on a logarithmic scale?

Yes, you can plot the AC gain on a logarithmic scale in LTspice by selecting "Logarithmic" as the "X-axis" type in the plot settings. This will display the frequency in logarithmic scale, which is useful for visualizing the gain over a wide range of frequencies.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
898
  • Engineering and Comp Sci Homework Help
Replies
21
Views
3K
Replies
7
Views
1K
  • Electrical Engineering
Replies
26
Views
2K
  • Electrical Engineering
2
Replies
39
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
3K
Replies
1
Views
967
  • Engineering and Comp Sci Homework Help
Replies
9
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
12
Views
1K
Back
Top