# Q: How to analyze Precision rectifier op amp configuration

I been scratching my head for the past couple of hours, and might be going mad. If someone can shine some light on this I would be extremely happy. This is probably root elementary to some but I am struggling extremely hard right now.

simulate this circuit – Schematic created using CircuitLab

All starts with this circuit,

I had a gentlemen earlier tell me that on the positive cycle of the input (Vin) since the V- > V+ the op-amp will drive the output to GND and thus cause current to flow from Vin to Vo, putting the diode in reverse bias, in conjunction making the NFB (Negative feedback network) "Turn off". This all make sense.

Isn't the op-amp seeing 0V at both the V- and V+ why is it driving anything to any the rails? In terms of having V- > V+ driving it to GND and having V+ > V- driving it to VCC.

Isn't this a Inverting amplifier, why is it acting like a comparator?

The way I would approach this is by doing an analysis on the 0V node and analyze it from there.

## KCL Analysis at 0V Node

Assuming all current is leaving the node making the diode in reverse bias

$Node 1: \frac{0-V_{IN}}{R1}+\frac{0-V_{OUT}}{R2} = 0$

$Node 1: \frac{0-1}{1k}+\frac{0-V_{OUT}}{1k} = 0$

$Node 1: V_{OUT} = -V_{IN}*\frac{R2}{R1}$

$Node 1: V_{OUT} = -1*\frac{1k}{1k} = -1$

I know this is wrong, but why?

I understand since I made the diode reverse bias that should indicate my method is wrong as the op-amp isn't driving any current thus can't assume ideal op-amp laws, however how would one approach this then? I assumed current is leaving and etc what if I assume current is going in would result in the samething.

What I am trying to say what is the proper way to see the actual operation of this configuration of op amp. To me this is very confusing as I think its a inverting amplifier however the gentlemen above got the correct operation by seeing it as a comparator.

And here is the actual right model of the op amp when Vin is at the positive cycle.

simulate this circuit

I believe I figured out the analysis

Analysis of Positive Cycle

Assumption: V+ = V-, Current travels High voltage potential to low voltage potential.

Using KCL - Schematic so it saves space finding Vo endings up being = -1V this doesn't make sense as current is trying to go into the diode which is reversed bias, thus meaning our assumption is wrong by using the ideal op-amp laws. Thus meaning the diode has to be in reverse bias

thus meaning our V+ = V- assumption was wrong and needs to be re-checked, this time however 0V being an unknown node this time, and re-solving it will get you Vin = Vo which now make sense as the feedback is not operative

simulate this circuit

• The point labelled 0V won't be 0V if the input is positive. – user253751 Jul 11 '18 at 23:59
• Oh? Why is that? Isn't that how op-amps work? – Leoc Jul 11 '18 at 23:59
• Most op-amp circuits, yes. In this circuit, what do you suppose the op-amp does when the input is positive? – user253751 Jul 12 '18 at 0:02
• Personally, I have no idea. I am actually dumb founded by this. As said in the post I would just start doing a KCL and the 0 node and actually believe ill get the answer once Vo is calculated. Like I want to say its comparing the V- and V+ which to me is 0 Volts so it shouldnt be driving anything I have no idea to be honest. If you some how tell me its comparing the Vin to GND ill be more lost than the tv show lost. – Leoc Jul 12 '18 at 0:04
• I'll step back a level then: What does an op-amp do? – user253751 Jul 12 '18 at 0:18