Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can I generate Sine wave from any periodic waveform that has low frequency?

Status
Not open for further replies.

Nurahmed

Junior Member level 1
Joined
May 27, 2019
Messages
19
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Location
Montreal, Canada
Activity points
172
I need to generate a low frequency sine wave from any waveforms (square wave, triangle wave, etc.). I know Class D amplifier has high efficiency, but the switching frequency of square wave is very high. Is there any waveforms that has lower switching frequency, and use some filters to generate a sine wave?

Thanks.
 

Hi,

There is no specifcation in your post .... thus we have to guess.

"Low frequency" for an RF designer may mean 1MHz....for an audio designer maybe 20Hz ... for another designer it may mean 0.0001Hz.

I don't understand what the switching frequency of a class D amplifier has to do with your application.

And why do you mention efficiency? What voltage and current are you talking about - for both input and output signal? What is the source if the signal? And what is the load/ target of the signal?

*******
Any non sinusoidal signal of a dedicated frequency contains other frequencies.
There may be a problem finding what output frequency you want as output.
--> You urgently need to specify the frequency range of interest.

Some ideas:
Input signal --> analog LPF --> comparator (to get square wave, independent of input signal waveform) --> LPF (to get rid of square wave overtones) --> sinewave.

Input signal --> analog LPF --> comparator (to get square wave, independent of input signal waveform) --> LPF (to get rid of square wave overtones) --> PLL (to multiply frequency) --> sine lookup table --> DAC --> LPF --> sinewave.

Input signal --> analog LPF --> ADC --> FFT --> select lowest frequency --> inverse FFT --> DAC --> LPF --> sinewave.
(This keeps the amplitude of the low frequency signal, the others don't)

Also consider what you expect to happen when the input signal is so low, that noise amplitude becomes significant. Noise contains a lot of signals....which may wrongly be interpreted as "true" input signal.

Klaus
 
Simplest is to construct a Low Pass Filter (LPF) with cutoff frequency just above your 'arbitrary waveforms' 1/T. The higher the filter order the better.

This essentially filters out everything except the fundamental.

For low freq - say below 10khz- there are some excellent Switched Cap Filter chips with 8th order lpf. All it needs is power and a switching freq input. e.g. MAX293, MAX294 etc
 
Last edited:

I need to generate a low frequency sine wave from any waveforms...

I do not know what is the objective of the said exercise, but you can always use a bandpass filter to get a sine wave from any arbitrary waveform.

Of course if you want to have a variable centre frequency, you have to do more work.

By the way, a square wave of frequency f (say 10kHz) will have sine wave components of f, 2f, 3f etc (but no sub-harmonics).

So if you want to have pure sine wave, you have to use a high order band pass filter. But using a digital filter may be simpler in many cases.
 
A 'square' wave does not have 1f 2f 3f.... It only has odd harmonics - 1f 3f 5f etc

- - - Updated - - -

A bandpass filter is much harder to design and achieve than an equal order lowpass. In any case, there is no need for a BPF, unless you are targeting one of the harmonic components.

- - - Updated - - -

The design of digital filters is a deceptively complex topic. Although filters are easily understood and calculated, the practical challenges of their design and implementation are significant and are the subject of much advanced research.

In addition the need for appropriate ADC, anti-alias filters, the actual DSP, develipment environment & toolchains, the DAC, another LPF after DACetc etc would definitely not make it 'simpler'. As illustrated by KlausS above also.

- - - Updated - - -

KlausST idea to use a comparator to 'square up' the wave is interesting, since then any 2f component is removed, and the LPF design made easier.
 
Hi,

KlausST idea to use a comparator to 'square up' the wave is interesting, since then any 2f component is removed, and the LPF design made easier.

It all depends on the OP's requirements and the input signal.

In worst case the input signal (including overtones) has more then one zero cross in a (low frequency) period. Making the comparator solution impossible. An LPF in front of the comparator may give improvements.

Another approach could be a LIA (lock in amplifier).

Klaus
 

If it has zero cross due to overtones then the LPF will filter it out. I don't see any problem in this.
 

A 'square' wave does not have 1f 2f 3f.... It only has odd harmonics - 1f 3f 5f etc...

You are right.

A square wave is an odd function and all the even harmonics are absent. But they are there for an arbitrary waveform.

Sorry for the oversight.
 
AFAIK lock-in-amps are used to detect presence of very weak but known frequencies, and not for OP's requirement.
 

Hi,

It is not mentioned whether the frequency is known or unknown...

Klaus
 

Hi,

It is not mentioned whether the frequency is known or unknown...

Klaus

That is irrelevant..... no ?
If it is unknown, then you cannot use LIA. And if it is known, then the LIA has to generate that frequency, in which case why do you need original signal ??

- - - Updated - - -

Maybe now we wait for OP to show some interest.
 

My principle answer to the original question is:

Use PWM. Sample the input signal with a rate above Nyquist (plus a margin accounting for feasible output filter order). Convert the sample magnitude to respective width of one center aligned pulse. Sinx/x correction required for frequencies near fs/2.
 

Nurahmed

please provide some information

what frequency, or frequency range is required?
adjustable or fixed?
harmonic content?

is it necessary to generate from a different wave form?
or can it be generated by an oscillator ?

what voltage and power level?
 

I have used a Switched Capacitor Butterworth Lowpass Filter IC to produce an audio sinewave with extremely low distortion (almost no harmonics) and others used the filter IC to produce a very good sinewave from a squarewave.
The cutoff frequency is set with an internal or external high frequency oscillator.
 

Could use a PLL to generate a 2^N*Fin clock, roll a counter
through a sine wave lookup ROM/PROM/EPROM and use that
data to control a second "on time" counter (load) for PWM
creating a sine at the far side of a suitable filter (if it's power)
or just use the PWM logic signal raw (maybe through offset /
gain / filter chain) if small signal.
 

I need to generate a low frequency sine wave from any waveforms (square wave, triangle wave, etc.). I know Class D amplifier has high efficiency, but the switching frequency of square wave is very high. Is there any waveforms that has lower switching frequency, and use some filters to generate a sine wave?

Thanks.

Dear All,

Thanks for the kind reply. Here are the more specific requirements:

Load_Requirements.jpg
Accuracy.jpg
 

Here are the more specific requirements
How P<=1W has to be read? Maximal real load power? Or what?

You didn't yet further explain your initial specification "generate a low frequency sine wave from any waveforms". Literally, the specification seems useless to me. It has been understood in the further discussion as class-D like switching power stage and the discussion went on about appropriate carrier frequency, switching pattern etc.

Seeing your latest THD and SNR specification, it becomes clear that some filter effort is involved, and that you shouldn't choose the carrier frequency too low to keep the filter feasible.
 

How P<=1W has to be read? Maximal real load power? Or what?

You didn't yet further explain your initial specification "generate a low frequency sine wave from any waveforms". Literally, the specification seems useless to me. It has been understood in the further discussion as class-D like switching power stage and the discussion went on about appropriate carrier frequency, switching pattern etc.

Seeing your latest THD and SNR specification, it becomes clear that some filter effort is involved, and that you shouldn't choose the carrier frequency too low to keep the filter feasible.

Hi,

You are right. P<=1W is the load power. As you can see in the spec I need to generate a sine wave that its frequency can be fallen any between DC to 10kHz. How can choose my carrier frequency? The carrier frequency shouldn't be too low, but how low it can go?

Thanks
 

Not lower than imposed by the Nyquist criterion. In practice at least 25 to 30 kHz, higher if you want to keep the filter effort low.
 

you specified a sin wav up tp 10 kHz, with THD < 5%

where does carrier frequency come in?
carrier frequency implies some sort of modulation.
is there any expected modulation?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top