I am a quite new to the area of digital signal processing. I am currently doing a project on sine wave generation. I know that according to Gibbs phenomenon, many sine waves add up to form a square wave. So, square wave would contain many frequencies. If we filter that square wave stage by stage using low pass and band pass filters, will I be able to get a sine wave at expected fundamental frequency? Please help.
Square waves are composed of sine waves at the odd harmonics- i.e. 1st, 3rd, 5th, etc. So yes, you can produce a sine wave from a square wave if you filter it with a low-pass filter whose bandwidth is at least as big as the first harmonic frequency, and whose cutoff frequency is lower than the third harmonic.
Please provide more information on exactly what you need to do, and what tools you have available. Also the title is very misleading and even logically incorrect. The gibbs phenomenon is the fact that to represent a square wave with a finit number of harmonics, the edges of the sharp transition present an overshoot which has a lower bound on amplitud but which area decreses as the number of harmonics increases.
So, do you need to build a digital system that can generate a Sine wave? Do you need to generate other waveforms? Does the sinewave you want to generate have a fixed frequency, or is it expected to be able to change?
the Easies way to generate a sinewave is to build an oscillator circuit. They can even be done with discrete components, but there are several very good integrated circuits that can be used.
If it needs to be done digitally, a Look up table is a very good way to do it. But there are other methods, any book on real-time embedded systems would have a chapter or a section about signal generation.