Go Down

### Topic: What is 'spectrum' anyway? How can multiple frequencies exist in one signal? (Read 3621 times)previous topic - next topic

#### JoeN

OK, so this is my problem.  I think digitally, or at least one dimensionally.  To me, the electromagnetic wave on a wire measured at a point in time is a voltage and a current, two values that can be measured somewhat precisely with the right equipment (an oscilloscope).  For digital, that signal is taken as 0 or 1 and fluctuates between two voltages, let's say 0V and 5V, and maybe overshoots these a bit but it is a pretty obvious and easy to understand signal.  For analog, on an oscilloscope, it can get greatly more complex but really it's still an electromagnetic wave with a voltage and current at a certain point in time.

Frequency is repeating changes.  If the change in voltage is regular and repeats 1,000 times per second we say that the signal has a 1KHz frequency.  So far, so good.  But when we talk about real world signals such as radio or audio, the signal is very complex.  Looking at it on an oscilloscope it is all over the place.  But it still has one and only one voltage at a given moment of time, does it not?  But something like an audio signal with a 100Hz, 200Hz, and 300Hz tone in it, though it is one signal with one voltage at one time (rapidly changing) when played back out of that signal clearly gives the 100Hz, 200Hz, and 300Hz tones.  Ok, that's what I don't understand.  How can we look at this complex wave and say it is actually 100Hz, 200Hz, and 300Hz?  How does a spectrum analyzer (which I have no experience with but appears to me to do this job) do this?   It feels like the world is multiplexing multiple signals into one signal, which is then that changing voltage on a wire, and at the other end it can be demultiplexed, even by something as simple as a speaker which just puts the signal into the air for us.

Anyway, I don't know what I am asking for here.  What can I read on this to clear up my lack of understanding?  I guess I just don't understand analog signals at all.
I will never ask you to do anything that I wouldn't do myself.

#### oric_dan

#1
##### Jan 23, 2013, 06:46 pmLast Edit: Jan 23, 2013, 06:49 pm by oric_dan Reason: 1
See here now - we know you love maths,

http://en.wikipedia.org/wiki/Fourier_transform

The magic word is "superposition", which is just a fancy term for signals adding together. A
square wave pulsetrain is fundamentally a sine wave, but with all the odd harmonics superimposed.
The harmonics are what give you the sharp edges.

Pretty pictures here,

#### AWOL

Quote
For digital, that signal is taken as 0 or 1 and fluctuates between two voltages, let's say 0V and 5V, and maybe overshoots these a bit but it is a pretty obvious and easy to understand signal

Even the "simple" square wave is the sum of sines.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

#### robtillaart

Another explanation - http://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/ -
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

#### JoeN

#4
##### Jan 23, 2013, 08:37 pmLast Edit: Jan 23, 2013, 08:39 pm by JoeN Reason: 1

Quote
For digital, that signal is taken as 0 or 1 and fluctuates between two voltages, let's say 0V and 5V, and maybe overshoots these a bit but it is a pretty obvious and easy to understand signal

Even the "simple" square wave is the sum of sines.

So you are saying that the shape of the wave is fundamental, not the voltage at a certain point in time?  I would say that the voltage at a point in time is fundamental, that is the real thing, what is the strength of the electromagnetic wave at this point and time, and that the concept of sum of sines to say what frequencies exist at that point is the artificial part.  But I know that I don't understand this a whit and that is the problem.

Of course I am informed by the point Larry makes in A Serious Man, so I guess I will have to try to understand the math.

Quote
You can't really understand the physics without understanding the math. The math tells how it really works. That's the real thing; the stories I give you in class are just illustrative; they're like, fables, say, to help give you a picture. An imperfect model. I mean - even I don't understand the dead cat. The math is how it really works.
I will never ask you to do anything that I wouldn't do myself.

#### KeithRB

You've gotten some good answers, but I just wanted to point out that if you take a CW signal, it does occupy a very small amount of spectrum depending on the quality of your signal source. The only way to keep it that narrow is to use Morse Code like the Ham's do with "CW" modulation.

But a constant, single frequency that goes on forever contains no information, other than some sort of "I am here!". The minute you add information - whatever that may be - you *modulate* the signal, and all forms of modulation AM, FM, IQ... *always* smoosh out the signal in accordance with the amount of information you are trying to impose on that signal.  You can choose to spread it out a little or a lot, but the more information you need to carry, the wider the bandwidth has to be.

#### oric_dan

In point of fact, this maths stuff is all goobledegook. After all, to create a digital on-off
[square wave] output, the Arduino isn't adding up a bunch of sine waves, it just says on
or off.

But you asked about a "spectrum", and spectral decomposition is what Fourier discovered.
It happens to be the most important thing in electrical engineering after Ohm's Law
[or maybe need to squeeze Maxwell's Equations in there].

#### cmiyc

I would say that the voltage at a point in time is fundamental, that is the real thing, w

What is defined as a "point in time"?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

#### SirNickity

You've entered the exciting world of The Time Domain.

A voltage and current on a wire is a snapshot; a sample.  You can use a voltmeter to see this.  In reality, it's not a single point in time, it's an average over some small window that is updated constantly to always show you what's happening "now", "now", "now", etc..  An oscilloscope can takes this simple voltage measurement and repeat it in rapid succession to add a historical view.  What is the voltage "now", plus "then", plus "before that", etc...

So, yes, frequency is a changing voltage over a defined period of time, that is cyclical.  If you stack two waves (100Hz and 200Hz, for example), the two waves will add and subtract to make a "mutant" wave that looks like neither 100Hz nor 200Hz, but a bumpy conglomerate of both.  It also stops sounding like a pure sine wave.  However, you can filter out changes that are slower than, or faster than, or both slower and faster than some reference to isolate that one frequency.  (Really, that one, plus those to the sides -- the "Q" or quality factor of the filter defines how wide a net you've cast.)

For example, if you take the period of a wave in microseconds, and you discard any amplitude changes that take longer than this period, plus any changes that occur more quickly, you can extract a pure sine back from a complex mixed signal.  This is the basis of Fourier transforms -- which is how a spectrum analyzer works.  It filters many individual bands this way, and measures the amplitude of the resulting pure tones.  (Well, again, with a wider Q, it's not pure tones but relatively narrow bands instead.)

In the analog domain, you can do this with caps (to extract frequencies higher than some given point), and inductors (to extract lower frequencies).  The window between the points is your passband.  Cascading additional stages will sharpen the decline to either side of the passband.  In theory, you can cascade infinite LC filters to implement an infinitely sharp Q that only passes a single frequency, but in practice that's exceedingly difficult to achieve.

Does that help?

#### DVDdoug

#9
##### Jan 23, 2013, 11:12 pmLast Edit: Jan 23, 2013, 11:34 pm by DVDdoug Reason: 1
Another example of superposition is when two people in a room are talking at the same time.    When the 2nd person starts talking, the 1st voice is not affected an any way.  The two sounds are literally summed together acoustically (superimposed).     An analog mixer sums audio signals in a similar way, or signals can be summed digitally in a computer.

Of course, a human voice is not a sinewave or one-single frequency.  Different voices have different harmonics & overtones and that's why no two singers sound alike, even when singing the exact-same notes.

Quote
it's still an electromagnetic wave with a voltage and current at a certain point in time.
At one point in time, there is no frequency.   Frequency is the rate of change over a period of time.  When you digitally sample a waveform, you take multiple points-in-time (CDs are sampled at 44100 samples-per-second).   Then when you "connect the dots", you can reconstruct the waveform over a period of time.

P.S.
Waves in the water will also superimpose...   If you make two waves moving toward each other in the opposite directions, the wave heights will be added when they "collide".   And after passing-through each other, the waves will continue-on as if nothing happened.

Another thing you can do with digital audio is mix two signals (say a singer and a guitar), and then if you invert the guitar mix it in again, the guitar will be subtracted-out and you'll just have the singer.   (This is easy to do digitally, but in analog it's hard to get the phase-time  aligned precisely).

#10

#### Jack Christensen

#11
##### Jan 24, 2013, 01:07 amLast Edit: Jan 24, 2013, 01:19 am by Jack Christensen Reason: 1
The music analogy is a useful one. Many instruments, singers, etc., all with different frequencies. Yet they all combine into a single signal that can always be described by a single amplitude (voltage) at any given point in time. So we can record music (the sum total) by encoding a single number. In the case of CDs or CD-quality music, we do this 44,100 times per second; the sampling rate is 44.1kHz.

All of AC circuit analysis is based on how the circuits respond to sinusoids. If we don't have a sine wave, all bets are off. A different analysis would be needed for every variation of signal, of which there are an infinite number. The thing that makes the Fourier transform so massively useful and powerful is that it lets us decompose any signal into sinusoidal components, which is the only thing we know how to analyze. This in turn lets us design things like the audio amplifiers for that CD to play through, and know in advance how the circuits will perform.

Even cooler is that the Fourier transform carries over to other disciplines. For example, in mechanical engineering, sprung systems can be modeled and analyzed as an electrical analog. So modeling how a car's springs and shock absorbers respond to a pothole might have a lot in common with how an electrical circuit responds to an impulse input.

Even the "simple" square wave is the sum of sines.

Charts showing how a square wave is built up from the odd harmonics of the fundamental. A fun exercise in Excel or whatever graphing tool you may have:
http://www.mathworks.com/products/matlab/examples.html?file=/products/demos/shipping/matlab/xfourier.html

#### JoeN

I would say that the voltage at a point in time is fundamental, that is the real thing, w

What is defined as a "point in time"?

It's a concept, like infinity or the infinitesimal.  You know exactly what it is, it's me not being very specific because I don't know this area very well.
I will never ask you to do anything that I wouldn't do myself.

#### MarkT

In point of fact, this maths stuff is all goobledegook. After all, to create a digital on-off
[square wave] output, the Arduino isn't adding up a bunch of sine waves, it just says on
or off.

In the quantum world things are that weird though...   There's probably a whole discussion
to be had about causality, wavefunctions and the impossibility of the Heaviside step function.
But perhaps that's for another time!

Quote

But you asked about a "spectrum", and spectral decomposition is what Fourier discovered.
It happens to be the most important thing in electrical engineering after Ohm's Law
[or maybe need to squeeze Maxwell's Equations in there].

Its actually more fundamental than that I think - its not just a mathematical trick, electromagnetic
signals are carried by photons and photons have a frequency.  Maser amplifiers for instance
directly use stimulated emission to amplify microwave signals entirely in the quantum domain...

And as for a voltage at a point in time - that's subject to Heisenberg's uncertainty principle...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### Jack Christensen

In point of fact, this maths stuff is all goobledegook.

Actually, it's what makes it all possible.

Quote

After all, to create a digital on-off [square wave] output, the Arduino isn't adding up a bunch of sine waves, it just says on
or off.

Of course. But for circuit analysis, we must decompose the signal to sine waves.

Go Up