This is a peak detector taken from page 21 of the opamp ADA4610:
I need it to capture peaks from 500KHz sine wave. I can't understand why when the sine starts it goes above the peak and then discharge with a costant (I think determined by C5*R3). Look at the screen below: purple track is VI in the schematic and the green one is VO. VI is a 500KHz unipolar sinewave with 200mVpp, R3=10k
Here is the same test with C5=470nF, R3=10k:
Same test at 50kHz with C5=47nF, R3=10k and Vipp=400mV:
50kHz with C5=470nF, R3=10k and Vipp=100mV:
Somehow it seems the system is underdamped, but adding a compensation cap across D1 does not solve it. Could someone help me to fix this?
DATASHEETS: