One of the non-linear behaviors that are sometimes required in analog circuits is rectification. Rectification is a process of separating the positive and negative portions of a waveform from each other and selecting from them what part of the signal to retain. In the case of half-wave rectification, we can choose to keep one polarity while discarding the other.
The circuit above accepts an incoming waveform and as usual with op amps, inverts it. However, only the positive-going portions of the output waveform, which correspond to the negative-going portions of the input signal, actually reach the output. The direct feedback diode shunts any negative-going output back to the “-” input directly, preventing it from being reproduced. The slight voltage drop across the diode itself is blocked from the output by the second diode.
The second diode allows positive-going output voltage to reach the output. Furthermore, since the output voltage is taken from beyond the output diode itself, the op amp will necessarily compensate for any non-linear characteristics of the diode itself. As a result, the output voltage is a true and accurate (but inverted) reproduction of the negative portions of the input signal. Thus, this circuit operates as a precision half-wave rectifier. If Rf is equal to Rin as is the usual case, the output voltage will have the same amplitude as the input voltage.