Hello all lets see the circuit of Simple Peak detector using Opamp
This is the Peak detector circuit
Initially
case 1) IF vin>vc (1u capacitor)output(6) i.e Point before the anode of the diode gets positive saturation voltage.So diode gets forward biased. So There will be feedback to negative terminal of opamp(i.enegative feedback)
Capacitor gets charged to maximum Input voltage.
If the input is less than capacitor voltage,Capacitor retains the previous maximum voltage itself(As there is no discharge path)
case 2) If vin<vc(capacitor) Point 6 is at negative saturation so the diode is reverse biased. The opamp is in open loop configuration.. The output is still the original "maximum input voltage which charged the capcitor"
The capacitor gets charged if vin>vc.
The first part R and C is a circuit which generates a random input voltage denoted by green probe. Red probe denotes the output.
Look at Red probe(output) which detects the Peak of the input voltage and hence the name Peak detector.