Adjustable frequency & amplitude function generator

shteii01

Joined Feb 19, 2010
4,644
Hello, guys...

I have achieved to get two of the waveforms(square and triangle) I need, amplitude stable over frequency. However, when I integrate the triangle to get the sine, this sine changes its amplitude as I change the frequency. How could I fix this?
I have attached the design. Hope you can help me out...

View attachment 108486
It is called Bandwidth Product. As your frequency increases, gain decreases.
Use additional op amp configured as amplifier to do just one thing, to amplify the signal.
 

RichardO

Joined May 4, 2013
2,270
I need, amplitude stable over frequency. However, when I integrate the triangle to get the sine, this sine changes its amplitude as I change the frequency. How could I fix this?
To get a sine wave that does not change in amplitude you want to put the triangle wave through a nonlinear diode or transistor shaping circuit.
 

AnalogKid

Joined Aug 1, 2013
11,044
It is called Bandwidth Product.
Not in this case. His amplitude is decreasing with frequency because the integrator is acting as a single pole lowpass filter. As mentioned in previous posts, he needs to use a sine-shaping circuit that is based on voltage levels rather than time constants.

ak
 

MrAl

Joined Jun 17, 2014
11,480
Hello, guys...

I have achieved to get two of the waveforms(square and triangle) I need, amplitude stable over frequency. However, when I integrate the triangle to get the sine, this sine changes its amplitude as I change the frequency. How could I fix this?
I have attached the design. Hope you can help me out...

View attachment 108486
Hi,

Just so you know, when you integrate a ramp you do not get a sine wave, but if you do it right you get something that looks like a sine wave but will have distortion. Also, the amplitude as a rule will in fact change with frequency, and that means you need some sort of AGC also.

The plot shows the difference between 1/4 cycles of x^2 and cosine functions. The x^2 function shown is what you get after the integration, ideally.

x_squared_vs_cos-1b.gif

Just to note, the 3rd harmonic amplitude is 1/27 which is about 3.7 percent, and the 5th is 1/125 which is 0.8 percent, and the 7th is 1/343 which is about 0.3 percent, and of course they keep getting lower and lower the higher we go. So the x^2 (or rather t^2) wave isnt that bad as long as it is done right.
Computing the THD over harmonics from 3 to 1111 i get a little over 3.8 percent.

Also, to do it right you may need an auto zeroing circuit (which can come in many forms) in order to ensure that any offset does not cause the integration to ramp up or down into output saturation. If that were to happen you'd get terrible distortion.
 
Last edited:
Top