0
\$\begingroup\$

How does the mathematics of a single or periodic rectangular pulse help us quickly visualize the frequency spectrum for a digital waveform? Develop the ideas behind this.

My professor posed this question and I had a hard time understanding how the digital waveform would contain any of the harmonics seen in an ideal squarewave, much less a singular pulse.

All I know is that a periodic rectangular wavefor holds the form of impulses at odd frequencies, and a singular rectangular pulse is a sinc function.

\$\endgroup\$
4
  • \$\begingroup\$ Are you asking how the Fourier transform is calculated? \$\endgroup\$
    – Eugene Sh.
    Oct 9, 2018 at 21:28
  • \$\begingroup\$ @Alex: See if an animation helps. For a periodic waveform see this one. \$\endgroup\$
    – Transistor
    Oct 9, 2018 at 21:33
  • \$\begingroup\$ Much too broad a topic for a text based answer. Suggest OP needs to see animations by @Transistor and do much reading on FFT. \$\endgroup\$
    – user105652
    Oct 10, 2018 at 1:01
  • \$\begingroup\$ Consider the various spectral-analysis methods as implementing correlation, and you'll see the "harmonic numbers" are simply the integer scale factors where the correlations peak. There is no magic. If you use very low-Q correlations (very few cycles of the input waveform), your "peaking" will be very broad in frequency. To see the narrow lines we are trained to expect, the math uses INFINITE input waveform duration, or INFINITE Q correlations. There is no magic. \$\endgroup\$ Oct 10, 2018 at 4:41

1 Answer 1

2
\$\begingroup\$

I believe you are referring to analog waveforms, just a rectangular one, or stream of pulses that are coninuous with time (analog)- unless you meant specifically a sampled square wave (which I would call a digital waveform).

In any event, the single rectangular pulse, and the repeated one are both a Sinc function in frequency! It is just when you repeat a waveform in time, it can only exist in frequency at multiples of the repetition rate. In the case of a single rectangular waveform, the Fourier Transform as you stated is a Sinc function, with the first null at 1/T where T is the width of the pulse. If you repeat that pulse in time, then the resulting frequency spectrum can only exist at that repetition rate and all higher harmonics, so you get samples (in frequency) of the same Sinc function!

The easiest way to understand why this occurs (that the frequency can only exist in individual tones) is to review the Fourier Series Expansion where you will see that the resulting pattern can not repeat in time unless each sinusoidal component is also repeating exactly within the 0 to T interval used for the expansion.

I will explain with some graphics:

First consider the Fourier Transforms below for an impulse, a rectangular pulse, and a constant level in time, and their associated transforms in Frequency. These are the results in the frequency domain for a single event of these waveforms in time. Important Fourier Transforms

Now consider a repeating stream of impulses in time. Notice we can derive the frequency domain result by first drawing the base function from above, and then knowing in this case since it is repeating every 2 seconds (1/2 Hz rate), it can only exist in Frequency at 0 (DC), and integer harmonics of 1/2 Hz as shown. So impulses in time result in impulses in frequency!

repeating impulses in time

Now for your example specifically. We do the same thing: We first draw the Fourier Transform of the base pulse which has a width of 0.05 seconds in this case, resulting in the first null of the Sinc function to be at 1/0.05 = 20 Hz. We then note that this waveform is repeating at a 10 Hz rate, so it can only exist at DC, 10 Hz and all higher harmonics in frequency. Interestingly in this case, all the even harmonics are nulls of the Sinc function, so for this case specifically, with a 50% duty cycle the frequency components are the 1st, 3rd, 5th, etc harmonics, but importantly samples of the same Sinc function!

50% Duty cylce square wave

Now consider a 25% duty cycle square wave. I show the 3 down-arrows and one up arrow as a take-away that the division in time of 4 results in the 4 harmonic to be in the null (a 10% duty cycle would have the 10th harmonic in the null). This is doing the same thing as before, we first draw the frequency envelope as a Sinc function, and then if the waveform is repeating we show the frequency locations as only existing at multiples of the repetition rate.

25% duty cycle

Now finally, for random bit streams we would get a continuous spectrum; if the bit stream is a stream of rectangular pulses, the result would be a continuous Sinc function in frequency given by the minimum pulse width. In this case, if truly random, there is no repetition pattern and therefore no individual frequency components, only a distribution. One way to visualize this is the resulting pattern can be decomposed into individual single rectangular pulses; each one creating the Sinc function in frequency. There phase relationship depends on when they each occur in time, and since that is random there will not be a consistent cancellation or addition to create any other pattern in frequency and a continuous spectrum is maintained (as such occurs when the repeat at a consistent rate).

\$\endgroup\$
5
  • \$\begingroup\$ Easiest conversion for logic is the spectrum for -3dB half power is fBW=0.35/Tr for rise time 10% to 90% Tr. up to pulse width 1/T. Then harmonics of that above are much lower than half power 1/n factor \$\endgroup\$ Oct 10, 2018 at 4:28
  • \$\begingroup\$ Yup! A great rule of thumb and applicable to first order systems. Caution using that for anything else. \$\endgroup\$ Oct 10, 2018 at 10:31
  • \$\begingroup\$ Any higher order filter is usually within 10% of this , but since in reality lumped filters have different f-3dB and Q’s to achieve some desired characteristic. Like Chebych. Bessel, Gaussian, even if way over damped with Q=0.1 \$\endgroup\$ Oct 10, 2018 at 11:37
  • \$\begingroup\$ Consider 2nd order underdamped systems for example with a much faster rise time at the expense of overshoot; I didn’t think that was restricted to 10% with a reasonable overshoot but could be wrong. Somewhat off topic however \$\endgroup\$ Oct 10, 2018 at 11:41
  • \$\begingroup\$ Excessive under damp and fast rise time are exclusive OR ...erhmm rather trade offs... try to simulate if you Are in doubt \$\endgroup\$ Oct 10, 2018 at 11:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.