I am trying to generate a sinusoidal wave whose frequency I can control based on the input being a triangular wave. I am getting the sinusoidal waveform by integrating the triangular wave through an op-amp integrator.
The issue is that as the frequency of the input triangle wave increases, the amplitude of the sine wave decreases. I basically want automatic gain control, so I do not want to manually compensate for it by adding a gain stage with just a potentiometer.
I know that I might be missing something obvious, if so, please point it out.
As I understand, the integration takes place on the -20dB/decade of the low pass filter which explains the gain loss as frequency increases. My initial thought was to have a second stage with a frequency dependent resistor(capacitor) which would adjust the gain based on the frequency as below:
The problem is that this created a differentiator which undoes the sinewave and converts it back to a triangle wave.