# About negative gain in Bode plot regarding the op-amp circuit design and its relationship with the feedback resistor

I am new to circuit simulation and now I am using Tina to simulate an op-amp circuit for a photodetector. I have some questions regarding the Bode plot.

Below is the circuit design, based on the general calculation, $$V_\text{out}=I_\text{pd} \times R_5 \times (1+R_1/R_2) \geq 1$$ However, when I try to do a AC analysis using Tina to generate the Bode plot, the Bode plot starts from a negative value. What does this mean? Is there anything wrong with the simulation? In addition, when I increased the $$\R_1\$$ value from 26.5 k&ihm; to 10 MΩ, the Bode plot looked like a high-pass one What does this Bode plot mean, and why?

Based on The Photon's advice, I have changed the Vin+ and Vin- to the correct position and also increased Vin+ to 15 V to meet the requirement of the LM318. The transient response indicated that the signal was successfully amplified, as shown here: However, the Bode plot still has a negative starting point like the first one shown above. Why is it a negative one but the transient response showed that the signal was amplified?

The updated circuit schematic is shown here: but still the Bode plot starts from negative.

• HInt: what are the minimum supply voltage range and minimum common mode input voltage for LM318? Feb 19, 2022 at 17:42
• Also it looks like you are connecting your positive power supply to the negative supply terminal of the op-amp. Notice pin 7 has a "+" symbol, indicating it should be connected to the positive supply. Also checking the datasheet confirms that pin 7 should be the positive supply. Feb 19, 2022 at 17:43
• @ThePhoton Hey, thank you for your reply. I just followed your instruction and updated the result in my post. However, the bode plot still starts from negative. Could you tell me why? Feb 19, 2022 at 18:11
• Please update the schematic to show what circuit you simulated. Feb 19, 2022 at 18:12
• And check that you followed the input common mode range recommendations from the LM318 datasheet. Feb 19, 2022 at 18:13

Referring to the LM318 datasheet:

Gain (set by R1 and R2) is over 10000. Any input offset voltage of the op-amp will be multiplied by that gain. For this device, input offset voltage (datasheet page 2) is typically 4mV. Multiplied by 10000 this means the output will try to be 40V, but will saturate (and be stuck) near the supply potential.

Even if that weren't a problem, your input biasing still is. Acceptable input potentials are defined on page 3, under "Input voltage range". Here it tells you that for supplies of ±15V, the input cannot fall below -11.5V, or rise above +11.5V. This can be interpreted to mean that the input must always be at least 3.5V above the negative supply. Since your negative supply to the op-amp is 0V, neither input can ever be less than +3.5V.

You have −1mA (IG1) flowing through 1kΩ (R5), resulting in -1V at the op-amp's non-inverting input. The behaviour of the op-amp in this condition is undefined, but it is also probably causing the op-amp output to be saturated. Even if current in IG1 were reversed, that input would be at +1V, still outside the acceptable range.

Both of these above conditions cause the op-amp output to be clamped hard against one or the other supply rail, and fluctuations of input potentials will hardly cause the output potential to change at all in that saturated state.

Small signal AC analysis (giving you the bode plot) is just that - small signal. It is the response of the system to tiny (infinitesimally tiny) fluctuations somewhere in the circuit, which is presumably the source IG1 in your analysis. During the analysis, these small signals do not invoke changes to the DC state of the circuit. The potential at the non-inverting input is kept at −1V, and the output will stay stuck to the supply rail.

Gain on a bode plot refers to signal amplitudes (as opposed to instantaneous values), a negative value does not mean inversion, and 0dB does not mean ×0. A gain of +20dB on the gain plot means ×10, a gain of 0dB is ×1, and −20dB corresponds to ×0.1. −60dB is ×0.001. In other words, a large negative gain on the bode plot means a huge attenuation. Your bode plots make sense, because the op-amp's output is saturated, unable to move, and any input signal change will cause almost nothing to happen at the output.

To obtain a meaningful bode plot, you must have a DC operating point in which the op-amp output is not saturated. To do that you must lower the gain (a lot), and bring the non-inverting input to well within the op-amp's supply potentials. With supplies of +15V and 0V, inputs must be between +3.5V and +11.5V.

For a Bode plot, you need a sin generator in series with the sensor.
And, in this schematic, I use two supplies.
NB: 10 Meg is too high for LM318 (Voff=3mV).
Use OP27 (Voff=10 uV) (or better) with lower "offset voltage" !
For one supply ... some changes are needed.
Updated ... I replaced by V. • Hey, thank you for your reply. I made some change based on your advice and now it worked! Really appreciate it! I do have a follow-up question, I notice that the op-amp amplification ratio is not a direct linear relationship with the feedback resistor. It will first increase as the resistor's value increases and then decrease as the resistor's value increases. Could you tell me why? Thanks! Feb 20, 2022 at 4:44
• Yes. I notice that also for the LM318 when trying... )-: ...Don't have tested for another op-amp. I think it is because of "current offset". But not sure. It can be another well-asked question. Feb 20, 2022 at 8:29
• Use an OP27 ... It is better. Feb 20, 2022 at 8:44
• Confirmed. It is not "current" offset ... but "Voltage" offset! Just make a (variable) compensation. Feb 20, 2022 at 9:09
• Updated in answer. Feb 20, 2022 at 9:21