EveryCircuit
Contact
Reviews
Home
PrathikP
modified 5 years ago

Deriving a Sine Wave from a Square Wave

3
14
146
01:59:36
A square wave is the sum of an infinite series of sine waves, having a fundamental and harmonics of higher frequencies. The fundamental can be seperated from the rest of the harmonics by filtering it out using multiple stages of a low pass filter. Here, I'm using 4 stages of a 2nd order active low pass filter. All stages, except the third, have a passband gain of 1. The third stage has a passband gain of 2 to boost the voltage of the obtained sine wave, as it too gets attenuated by the filter due to the fact that it lies near the cut-off frequency. Note that the square wave has a frequency of 1kHz, which means that it has a fundamental sine wave of 1kHz frequency and is seen at the output. Adding anymore filter stages will yield diminishing returns.
published 5 years ago
kiani
5 years ago
what is THD !
PrathikP
5 years ago
Donno. Probably low I guess, given that it has been filtered 4 times? There are no math functions here so I can't calculate TDH
kiani
5 years ago
you could use an LCR (in series) filter (notch) to eat all 1khz stuff. whats left is THD.
Molar
5 years ago
Nice, clean circuit and detailed description. Thanks.
fatcat2
5 years ago
What response characteristic does this filter posses with a D.F. of 1, bessel? I have the transfer function for a butterworth sallen key filter and so, I though that I would manually find the THD (it takes a great deal of time!) but I don't know what response does this filter possess. In that case, the best idea is to use a notch.
Molar
5 years ago
Haha. Love your comments. Don’t understand them thanks to my inferior brain, but love them.☺️
PrathikP
5 years ago
@fatcat2 I have cascaded 4 Butterworths, so simple raise the transfer function to the power 4. Now working with the transfer function and doing manual math is an absolute waste of time.
PrathikP
5 years ago
Don't worry too much about TDH. I have cascaded 4 second order low pass filters, so the output should be sufficiently pure.
fatcat2
5 years ago
@Molar --- 🥰
PrathikP
5 years ago
What do you mean "how is this a Butterworth"? Just look at the circuit. Do you not recognise it? It is 4 Butterworths connected in series!
fatcat2
5 years ago
Hey there! All of this depends on the caps ratio. I simulated various values in multisim and I got different results; if the ratio is 1:2, it is butterworth whereas if it is 11:15, it shows a bessel response. Cool! For the latter case (i.e., the Bessel filter), cutoff frequency is not equal to 1/2pi.sq.(RC). I didn't believe it first but then I understood it. I got this info from small signal BJT design by Douglas Self.
fatcat2
5 years ago
Sorry, the transfer function doesn't change but the response changes according to DF. It was indeed a careless mistake... This is certainly not a butterworth filter.
kiani
5 years ago
looks like copy paste replys..! LOL....very interesting thank you @fatcat2
fatcat2
5 years ago
I just wanted an answer. Hey, it's not a copy of my previous one. It's what's called #give&taketheknowledge! I told you about this because I found it very interesting.

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy