Fourier Question

18 and 20 is a LOT more like it! Thanks for the correction.
Reply to
Robert Baer
Loading thread data ...

Then, there is the fact that it is a square wave, and that screws up all your cumulative 'math'.

Bring the slew rate of the switch into it, or more precisely, the capacity of the 19 Hz supply to drive if the switch is closed at TDC.

Oh, wait... It's the PARD that causes the bulb to light. Hahahahahha!

Reply to
MrTallyman

I don't know what you mean by 'Nyquist frequency', in this context. Nowhere does it say that the signal was sampled. Do the math: You should see peaks at 18 and 20, yes, but also progressively smaller ones at 16 and 22, 14 and 24, 12 and 26 and so on.

Jeroen Belleman

Reply to
Jeroen Belleman

So far so good. But you seem to have forgotten that the specified modulation was a *SQUARE* wave and that it contains many more Fourier components than just the fundamental. Namely all the odd ones:

SquareWave(t) = Sum{ sin(t) - sin(3t)/3 + sin(5t)/5 - sin(7t)/7 + ...

The harmonic content of the voltage waveform can be most easily computed by using the multiplication in real space is convolution in Fourier space rule. It contains all the sum and difference components of every odd harmonic from the square wave in appropriate proportions:

= sin(18t) + sin(20t) + (sin(16t)+sin(22t))/3 + (sin(14t)+sin(24t))/5 general term + ... [ (sin( (19-(2N+1))t) + sin((19+(2N+1))t))/(2N+1) ] summed N=0 to infinity - subject to typos and back of envelope errors

There is no Nyquist frequency in theoretical Fourier analysis. These functions can be modelled pretty much exactly as infinite series. Mathematicians would haggle about convergence in the vicinity of the edge discontinuities but physicists and engineers ignore such things. Nyquists theorem only becomes relevant when you are sampling a signal.

Regards, Martin Brown

Reply to
Martin Brown

Thanks for causing me to rethink the problem.

Reply to
Bob Penoyer

Sampling is inherent with FFTs. The algorithm requires samples. In that regard, if you take 2^N samples of the time domain waveform, you get 2^N data points in the frequency domain results. Half of those are a mirror image of the other half, the halfway point (the frequency about which the mirroring occurs) is the Nyquist frequency.

I _did_ the math--via FFT. I reported the results in this thread.

Challenge: YOU do the math: compute the Fourier transform analytically and let everyone know what you find.

Reply to
Bob Penoyer

I used an FFT. Sampling is inherent with FFTs. The algorithm requires samples. In that regard, if you take 2^N samples of the time domain waveform, you get 2^N data points in the frequency domain results. Half of those are a mirror image of the other half. The halfway point (the frequency about which the mirroring occurs) is the Nyquist frequency.

I _did_ the math--via FFT. HOWEVER, as a result of your and Martin Brown's responses, I took another look at my results. I discovered an error and re-ran the FFT. You are correct: with 18 and 20 as the main terms, 16 and 22, 14, and 24, etc are also present.

Reply to
Bob Penoyer

If you do it numerically then to get the answer exactly right you need either translational boundary conditions with a radix 38 DFT or mirror boundary conditions with a radix 19 DFT (not my favourite choice of FFT radix) or you need to do some work to sort out aliasing problems from discontinuities at the boundaries if using a length of 2^N.

And for such a small transform I'd be inclined to use the slow DFT 19*19 isn't all that much worse than 19*5 for a one off.

NlogN really pays off when the data to transform gets long.

2^9 isn't a bad choice since (2^9 mod 19) = 18 which leaves a fairly small discontinuity error

FFTW would do it with relative ease.

I did. It is posted in an adjacent msg dated 1 June. Jeroen is correct.

Regards, Martin Brown

Reply to
Martin Brown

Nothing was forgotten. I reversed the phase of the "19" sine wave every half cycle of the "1" square wave. This is equivalent to multiplying the two waveforms, or flipping a switch as the OP described.

Yup. Thinking this way would have made me realize my error immediately.

Right, but I didn't use theoretical Fourier analysis; I used an FFT. See my response to Jeroen Belleman regarding Nyquist frequency.

Reply to
Bob Penoyer

I didn't want a refined result. All I wanted was what a 2^N FFT computation would provide. Alas, a couple of errors prevented me from arriving at the correct harmonic content.

A combination of bad timing on my part and good timing on your part was a problem here. After posting the text that you have responded to, I realized my error and rescinded my message. You received it before the rescission occurred and the "challenge" was removed.

Reply to
Bob Penoyer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.