# How can I find DC gain via AC simulation in LTspice

• Engineering
song youngill
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

Mentor
Can you post a screenshot of the schematic view?

song youngill
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.

Gold Member
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.

song youngill
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?

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: 79
• berkeman
Gold Member
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
• 