Maker Pro
Maker Pro

square wave harmonic theory (time domain)

T

Thomas Magma

Jan 1, 1970
0
Hello,
I'm trying to determine if the higher harmonics of a low frequency square
wave are actually AM modulated. For instance, I can see the harmonics of a 1
KHz square wave all the way up at 100 MHz if I zoom into them on a spectrum
analyzer. Are those harmonics really there when the 1 KHz square wave has
finished it's transition and is in a steady state for half a millisecond? If
I was to sample this steady state with a ultra fast ADC and FFT the samples,
would I see the harmonics extending up through 100 MHz?

It's a bit of a mind bender when converting between the time and frequency
domain in the case of a square wave.

Thanks,
Thomas Magma
 
M

Marra

Jan 1, 1970
0
Hello,
I'm trying to determine if the higher harmonics of a low frequency square
wave are actually AM modulated. For instance, I can see the harmonics of a 1
KHz square wave all the way up at 100 MHz if I zoom into them on a spectrum
analyzer. Are those harmonics really there when the 1 KHz square wave has
finished it's transition and is in a steady state for half a millisecond? If
I was to sample this steady state with a ultra fast ADC and FFT the samples,
would I see the harmonics extending up through 100 MHz?

It's a bit of a mind bender when converting between the time and frequency
domain in the case of a square wave.

Thanks,
Thomas Magma

I thought a square wave could be broken down into a sum of many sine
waves?
 
J

John Larkin

Jan 1, 1970
0
Hello,
I'm trying to determine if the higher harmonics of a low frequency square
wave are actually AM modulated. For instance, I can see the harmonics of a 1
KHz square wave all the way up at 100 MHz if I zoom into them on a spectrum
analyzer. Are those harmonics really there when the 1 KHz square wave has
finished it's transition and is in a steady state for half a millisecond? If
I was to sample this steady state with a ultra fast ADC and FFT the samples,
would I see the harmonics extending up through 100 MHz?

It's a bit of a mind bender when converting between the time and frequency
domain in the case of a square wave.

Thanks,
Thomas Magma

Assuming an ideal constant-frequency square wave, all the (odd)
harmonics are there all the time, invariant in phase or amplitude. It
is mind boggling.

In real life, any square wave has a little frequency modulation
(jitter, in the time domain) and that makes higher harmonics jump
around, essentially amplitude modulated sort of at random.

It would be hard to sample and FFT such as to resolve the 100,000th
harmonic of any waveform.

John
 
P

Phil Hobbs

Jan 1, 1970
0
Thomas said:
Hello,
I'm trying to determine if the higher harmonics of a low frequency square
wave are actually AM modulated. For instance, I can see the harmonics of a 1
KHz square wave all the way up at 100 MHz if I zoom into them on a spectrum
analyzer. Are those harmonics really there when the 1 KHz square wave has
finished it's transition and is in a steady state for half a millisecond? If
I was to sample this steady state with a ultra fast ADC and FFT the samples,
would I see the harmonics extending up through 100 MHz?

It's a bit of a mind bender when converting between the time and frequency
domain in the case of a square wave.

Thanks,
Thomas Magma

Fourier's theorem is correct, yes.

Maybe it's easier to see in the case of a delta-function, whose
transform is 1 (i.e. unit amplitude, zero phase at all frequencies). If
you imagine starting with a lowpass filter and gradually widening it,
you'd see the central spike getting taller (because all the frequency
components add in phase there), and narrower, because they all cancel
out everywhere else, once you turn the bandwidth up sufficiently.

Now make a periodic alternating sequence of those delta-functions, which
gets rid of the frequencies that aren't harmonics of the rep
rate--you'll be left with individual unit-strength spikes in the
spectrum, placed at all the odd harmonics of the rep rate.

Now integrate. That multiplies all those spikes by 1/(j omega), and
presto, a square wave.

HTH,

-_-_-_Phil-_Hobbs-_-_-_-_-_
 
J

Jim Backus

Jan 1, 1970
0
Hello,
I'm trying to determine if the higher harmonics of a low frequency square
wave are actually AM modulated.

No, they aren't.
For instance, I can see the harmonics of a 1
KHz square wave all the way up at 100 MHz if I zoom into them on a spectrum
analyzer. Are those harmonics really there when the 1 KHz square wave has
finished it's transition and is in a steady state for half a millisecond? If
I was to sample this steady state with a ultra fast ADC and FFT the samples,
would I see the harmonics extending up through 100 MHz?

Of course you would.
It's a bit of a mind bender when converting between the time and frequency
domain in the case of a square wave.

Yes it is, but if you have any programming skills, try working the
other way round. Start with a sine wave at 1 kHz, then add the
appropriate level of 3rd, 5th, 7th etc. harmonics and see the sum of
the components gradually turning into a square wave. You'll see that
each frequency term is present continuously.

HTH

Jim
 
T

Thomas Magma

Jan 1, 1970
0
It would be hard to sample and FFT such as to resolve the 100,000th
harmonic of any waveform.

I was only kind of talking a theoretical ADC. Even though there are ADC's up
in the Giga samples per second, lets talk about a theoretical test with an
ADC that samples at 1Gsps with 24 bit resolution (kick-ass ADC). If I took a
1 KHz square wave and triggered my ADC on the rising edge of the
pulse...delayed a bit waiting for the transistor to settle (say
200uS)...then took 65536 samples (65uS) of the steady state and did an FFT
on them...what would I see? In the time domain it would appear I was
sampling DC. If the FFT shows high frequencies relating to 1KHz where are
they coming from?

Thomas
 
S

Steve

Jan 1, 1970
0
Thomas Magma said:
I was only kind of talking a theoretical ADC. Even though there are ADC's
up in the Giga samples per second, lets talk about a theoretical test with
an ADC that samples at 1Gsps with 24 bit resolution (kick-ass ADC). If I
took a 1 KHz square wave and triggered my ADC on the rising edge of the
pulse...delayed a bit waiting for the transistor to settle (say
200uS)...then took 65536 samples (65uS) of the steady state and did an FFT
on them...what would I see? In the time domain it would appear I was
sampling DC. If the FFT shows high frequencies relating to 1KHz where are
they coming from?

Thomas

The fundamental assumption for the FFT is that the data taken during your
sampling interval repeats from negative infinity to positive infinity. If
you take 65K samples of an unchanging DC level, you will get only DC energy
in the result, (plus all the artifacts from windowing, roundoff, etc.)

So as John pointed out - the harmonics are really there if you sample the
entire 1 kHz wave and it has instantaneous rise/fall times. But if you only
look at a piece of the signal, you get a completely different result.

To minimize the sampling artifacts, make the sample interval an exact
multiple of your waveform's period, so that the "repeating to infinity"
assumption is valid. Since its not usually practical to do that exactly,
window functions are used to reduce the artifacts that will appear when the
FFT algorithm "assumes" its seeing an integral number of periods of an
infinitely repeating waveform.

Steve
 
J

Jamie

Jan 1, 1970
0
Thomas said:
Hello,
I'm trying to determine if the higher harmonics of a low frequency square
wave are actually AM modulated. For instance, I can see the harmonics of a 1
KHz square wave all the way up at 100 MHz if I zoom into them on a spectrum
analyzer. Are those harmonics really there when the 1 KHz square wave has
finished it's transition and is in a steady state for half a millisecond? If
I was to sample this steady state with a ultra fast ADC and FFT the samples,
would I see the harmonics extending up through 100 MHz?

It's a bit of a mind bender when converting between the time and frequency
domain in the case of a square wave.

Thanks,
Thomas Magma
In theory, an ideal square wave should generate infinite frequencies in
harmonics.
But then again, we don't exist in a ideal world! .
 
T

Thomas Magma

Jan 1, 1970
0
I was only kind of talking a theoretical ADC. Even though there are ADC's
The fundamental assumption for the FFT is that the data taken during your
sampling interval repeats from negative infinity to positive infinity. If
you take 65K samples of an unchanging DC level, you will get only DC
energy in the result, (plus all the artifacts from windowing, roundoff,
etc.)

So as John pointed out - the harmonics are really there if you sample the
entire 1 kHz wave and it has instantaneous rise/fall times. But if you
only look at a piece of the signal, you get a completely different result.

So now I'm really confused, are you saying that during certain times of a
square wave there is no harmonic content? Would that not imply that the high
frequency harmonics are stronger at certain instances of time compared to
others?

Thomas
 
J

John Larkin

Jan 1, 1970
0
So now I'm really confused, are you saying that during certain times of a
square wave there is no harmonic content? Would that not imply that the high
frequency harmonics are stronger at certain instances of time compared to
others?

A square wave is forever. If you examine a little time slice of a
square wave, it's not a square wave... it's a rise, or a fall, or DC.

John
 
D

Don Lancaster

Jan 1, 1970
0
Thomas said:
Hello,
I'm trying to determine if the higher harmonics of a low frequency square
wave are actually AM modulated. For instance, I can see the harmonics of a 1
KHz square wave all the way up at 100 MHz if I zoom into them on a spectrum
analyzer. Are those harmonics really there when the 1 KHz square wave has
finished it's transition and is in a steady state for half a millisecond? If
I was to sample this steady state with a ultra fast ADC and FFT the samples,
would I see the harmonics extending up through 100 MHz?

It's a bit of a mind bender when converting between the time and frequency
domain in the case of a square wave.

Thanks,
Thomas Magma

As a general rule, if you modulate the fundamental, you modulate the
harmonics.

Digitize it and run a Fourier Transform.

Otherwise, phase lock to a harmonic and see what demods out.

http://www.tinaja.com/glib/magsn01.asp


--
Many thanks,

Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: [email protected]

Please visit my GURU's LAIR web site at http://www.tinaja.com
 
P

Phil Allison

Jan 1, 1970
0
"Thomas Magma"
I'm trying to determine if the higher harmonics of a low frequency square
wave are actually AM modulated.


** They simply do not exist in the " time domain".

For instance, I can see the harmonics of a 1 KHz square wave all the way
up at 100 MHz if I zoom into them on a spectrum analyzer.


** Sorry, that is not a " time domain" instrument.

Are those harmonics really there when the 1 KHz square wave has finished
it's transition and is in a steady state for half a millisecond?


** There is the sudden step change in voltage followed by a steady voltage
until the cycle repeats.

YOU asked for the " time domain" (ie real life ) view, so you cannot
simultaneously crap on about imaginary harmonics.

If I was to sample this steady state with a ultra fast ADC and FFT the
samples, would I see the harmonics extending up through 100 MHz?


** No - it is just a fixed voltage.

It's a bit of a mind bender when converting between the time and frequency
domain in the case of a square wave.


** Has no-one ever informed you the " frequency domain " does not really
exist - except as an abstract mathematical conception.

Albeit, a very useful one.



........ Phil
 
S

Steve

Jan 1, 1970
0
Thomas Magma said:
So now I'm really confused, are you saying that during certain times of a
square wave there is no harmonic content? Would that not imply that the
high frequency harmonics are stronger at certain instances of time
compared to others?

Thomas
What I am saying is that if you only look at a small piece of the wave
period, you do not get any information about what frequencies are required
to produce the parts you aren't looking at. The FFT cannot analyze portions
of a waveform it never saw. If all 64K samples are at 3.34578 volts, then
the FFT has to say its looking at a 3.34578 DC voltage. How can it know
anything else? That's why I pointed out that the assumption of infinite
periodicity must be considered when you interpret the results. Otherwise
it's garbage in garbage out analysis.

Steve
 
P

Phil Allison

Jan 1, 1970
0
"Steve the Jerk Off"
What I am saying is that if you only look at a small piece of the wave
period, you do not get any information about what frequencies are required
to produce the parts you aren't looking at.


** Read the damn heading - Steve !!!!!!!!!!!!!!!!!!!!!!!!!

Says " time domain" !!!!!!!!!!!!!!!!!!!!!!!!!!

Got the fucking faintest what that is ??????????

Obviously NOT !!!!!!!!!!! !!


The FFT cannot analyse portions of a waveform it never saw.


** It cannot " time domain" analyse any damn thing

- you dopey fuckwit !!


Why the **HELL** are so many otherwise quite knowledgeable folk * totally*
off the PLANET on such a simple issue.




........ Phil
 
M

MooseFET

Jan 1, 1970
0
On May 30, 1:50 pm, John Larkin
[....]
Assuming an ideal constant-frequency square wave, all the (odd)
harmonics are there all the time, invariant in phase or amplitude. It
is mind boggling.

Here's how I first go a grip on the idea in a time domain sense. It
may help others.

Imagine you have a tuned circuit with a very high Q being driven by
the squarewave. On each edge, the tuned circuit will be "shock
excited" and then start to ring down. This is like a bell being
struck, if you want to imagine a sound for it.

If the Q is high enough, when the next edge comes along, the circuit
is still ringing. If the tuned circuit is tuned to an odd harmonic,
the next edge will be timed perfectly to pump the ringing up.

Now imagine the shape of the envelope. It jumps up and decays and
jumps up and decays. The decay rate decreases for higher Qs. In your
mind crank the Q up. Luckily, you can imagine better inductors than
you can buy. At a stupendous Q value, there is no longer any
modulation and the signal is a good sine wave.

We know that the tuned circuit is a filter so it doesn't invent
frequencies just selects them. This means that the sine wave we see
on the output must have been in the input.
 
M

MooseFET

Jan 1, 1970
0
On May 30, 1:50 pm, John Larkin
[....]
Assuming an ideal constant-frequency square wave, all the (odd)
harmonics are there all the time, invariant in phase or amplitude. It
is mind boggling.

Here's how I first go a grip on the idea in a time domain sense. It
may help others.

Imagine you have a tuned circuit with a very high Q being driven by
the squarewave. On each edge, the tuned circuit will be "shock
excited" and then start to ring down. This is like a bell being
struck, if you want to imagine a sound for it.

If the Q is high enough, when the next edge comes along, the circuit
is still ringing. If the tuned circuit is tuned to an odd harmonic,
the next edge will be timed perfectly to pump the ringing up.

Now imagine the shape of the envelope. It jumps up and decays and
jumps up and decays. The decay rate decreases for higher Qs. In your
mind crank the Q up. Luckily, you can imagine better inductors than
you can buy. At a stupendous Q value, there is no longer any
modulation and the signal is a good sine wave.

We know that the tuned circuit is a filter so it doesn't invent
frequencies just selects them. This means that the sine wave we see
on the output must have been in the input.
 
S

Steve

Jan 1, 1970
0
Phil Allison said:
"Steve the Jerk Off"



** Read the damn heading - Steve !!!!!!!!!!!!!!!!!!!!!!!!!

Says " time domain" !!!!!!!!!!!!!!!!!!!!!!!!!!

Got the fucking faintest what that is ??????????

Obviously NOT !!!!!!!!!!! !!





** It cannot " time domain" analyse any damn thing

- you dopey fuckwit !!


Why the **HELL** are so many otherwise quite knowledgeable folk *
totally* off the PLANET on such a simple issue.




....... Phil

I didn't get hung up on the heading. I was trying to answer his question in
a way that is helpful instead of dismissive. Correcting his heading and
ignoring what he really asked just seems like a way to exhibit personal
indignation and feel superior, but it helps no one.

Steve
 
P

Phil Allison

Jan 1, 1970
0
"Steve the ASD Fucked Jerk Off"
I didn't get hung up on the heading.


** You failed to even read it - FUCKWIT !!!

I was trying to answer his question in a way that is helpful instead of
dismissive.


** You failed to n comprehend the OP's question

- FUCKWIT !!

Correcting his heading and ignoring what he really asked


** Exactly what ** YOU ** just did - fuckwit.

PISS OFF - BLOODY IMBECILE !!!!!!!!!!




........ Phil
 
Top