Here is my SC integrator circuit, and then there is the output. Im not exactly sure why i have jagged lines in the output. It is indeed a cosine curve, so the circuit is performing correctly, however im not getting a smooth curve. Could i please have some suggestions on why this could be?
Use charge injection compensation techniques on
both side of the amplifier.
What is the GBW of the amplifier, it should be at least 7 times bigger than your clock frequency
It seems that you have big charge injection/clock feedthrough from the switches - that causes glitches that we see. Try to used delayed phase clocks in the swithes connected to the bottom plate of the cap.
Also look at RonC constant of the switch and GBW o fteh opamp - althouth it should cause not glitches but incomplete charge transfer (integrator leakage).