So to give the sinewave the final touch, i use an integrator to generate a sine wave.
However, using only an integrator will make the output run away since the slightest offset will also get integrated over time.
The solution: a PID controller..... well ... just an I-Controller

The output follows the input and wont exceed this. By playing around with the integration factor (making R60 a potentiometer), i get this:

BEAUTIFUL !
Also as a comparison, without the preshaping:

You can see, the sinewave is slightly skewed to the left side..... NOT BEAUTIFUL
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.