Signal generation and processing
A signal can be looked at in two ways: how it changes in time —what the oscilloscope shows— or what frequencies it is made of. Both describe exactly the same thing, and learning to go from one to the other is the central tool of communications.
01The two domains
| Time domain | Frequency domain | |
|---|---|---|
| What it shows | Amplitude moment by moment | How much amplitude there is at each frequency |
| Instrument | Oscilloscope | Spectrum analyzer |
| Used to see | Waveform, timing, overshoot, synchronization | Harmonics, interference, occupied bandwidth, noise |
| Question it answers | What does the signal look like? | What is it made of and what place does it occupy in the spectrum? |
02Fourier: everything is sine waves
Any periodic signal can be written as the sum of sine waves whose frequencies are integer multiples of the fundamental: the harmonics. And any non-periodic signal can be described as a continuous sum of sine waves, which is the Fourier transform.
It is not a convenient mathematical approximation: it is the reason a filter distorts a square wave, the reason an amplifier “sounds different” and the reason a signal occupies a particular place in the spectrum.
| Signal | Which harmonics it has | How they decrease | Consequence |
|---|---|---|---|
| Sine wave | Only the fundamental | — | A single line in the spectrum. It is the test signal par excellence. |
| Symmetric square wave | Odd: 3, 5, 7… | 1/n | Occupies a great deal of spectrum. It is never transmitted “raw” over radio. |
| Triangle wave | Odd | 1/n² | A much more concentrated spectrum. |
| Sawtooth | All | 1/n | Rich in harmonics: used as a sweep and in sound synthesis. |
| Narrow pulse | All, widely spread | sin(x)/x envelope | The narrower the pulse, the wider its spectrum. |
| White noise | All equally | Flat | It is the noise floor that every signal competes against. |
- Fundamental at 1 kHz, with amplitude 4A/π = 1.27 A.
- Third harmonic at 3 kHz, one third: 0.42 A (−9.5 dB relative to the fundamental).
- Fifth at 5 kHz, one fifth: 0.25 A (−14 dB). Seventh at 7 kHz…
- A 4 kHz low-pass filter passes only the fundamental and the third: on the oscilloscope you see a rounded wave with ripples, not a square wave.
That experiment —square wave, filter, oscilloscope— is the most direct demonstration that harmonics exist and are not an abstraction.
03Bandwidth
It is how much spectrum a signal occupies, and it is the resource that is bought, allocated and paid for. In communications, everything is ultimately measured against the available bandwidth.
| Signal | Bandwidth | Note |
|---|---|---|
| Telephone voice | 300 – 3400 Hz | Enough to understand and recognize a voice. The channel is allocated with 4 kHz including guard bands. |
| High-fidelity audio | 20 Hz – 20 kHz | The limit of human hearing. |
| AM radio | 10 kHz per channel | Audio limited to 5 kHz: that is why AM sounds “dull.” |
| FM radio | 200 kHz per channel | Audio up to 15 kHz plus stereo: that is why it sounds much better. |
| Analog video | ≈ 5 MHz | An image demands a thousand times more bandwidth than voice. |
| WiFi | 20 to 160 MHz | The wider the channel, the higher the speed and the fewer channels available. |
It is a law, not a technological limitation: Shannon's theorem relates the maximum capacity of a channel to its bandwidth and its signal-to-noise ratio. Capacity can be gained by widening the channel or by improving the signal-to-noise ratio, and nothing else. All digital modulation techniques —QAM, OFDM— are ways of approaching that limit, not of surpassing it.
04The spectrum analyzer
Frequency on the horizontal axis and amplitude —almost always in dBm— on the vertical. Each signal appears as a line or a bump at its place in the spectrum.
Main controls: center frequency and span (which stretch of spectrum is viewed), RBW (resolution bandwidth: how fine the lines look) and reference level.
- Seeing whether a transmitter is on its frequency and within its bandwidth.
- Detecting harmonics and spurious signals that interfere with other services.
- Finding the source of interference: you see it and track it down.
- Measuring the noise floor and the signal-to-noise ratio.
- Checking filters: their response is seen directly.
The input of an analyzer withstands on the order of +30 dBm as an absolute maximum, and its first stage is expensive. A 5 W transmitter is 37 dBm: it destroys it. Always measure with a suitable attenuator, a directional coupler or an antenna at a distance. The same precaution applies to DC: use a blocking capacitor if there is a risk of superimposed DC voltage.
05Generating signals
| Method | How it works | When it is used |
|---|---|---|
| LC or crystal oscillator | A feedback loop with a selective network (oscillators) | Fixed carriers, clocks, references |
| Voltage-controlled oscillator (VCO) | A varactor changes the tank frequency | Tuning, frequency modulation, PLL loops |
| PLL synthesizer | A VCO locked to a crystal through programmable dividers | Any frequency with the stability of the crystal: it is what is inside every modern radio |
| DDS (direct digital synthesis) | A phase accumulator, a sine lookup table and a DAC | Frequency and phase with millihertz resolution, instantaneous changes. Today's laboratory generators are DDS |
| Software generation | The samples are calculated and output through a DAC | Software-defined radio: modulation is done with mathematics, not with circuits |
A phase comparator looks at the difference between a stable reference —a divided crystal— and the VCO output divided by N. The error, filtered, corrects the VCO until the two coincide. Since the output ends up at N times the reference, by changing N in software you choose the frequency: that is how a radio, a handheld radio or a cell phone tunes. The programmable dividers are the same counters from Year 5.
06In the lab
Generate a 1 kHz square wave and pass it through an RC low-pass filter with adjustable cutoff. Observe on the oscilloscope how it becomes rounded as the cutoff is lowered, and note below what frequency it stops looking like a square wave. If a spectrum analyzer is available, look at the lines at 1, 3, 5 and 7 kHz and measure their relative heights: they should match 1, 1/3, 1/5 and 1/7.
With three generators —or with a program— add sine waves of 1, 3 and 5 kHz with amplitudes 1, 1/3 and 1/5 and observe the result. It is Figure 2 done on the bench: you do not get a perfect square wave, but you can clearly see where it is heading.
Measure the rise time of a fast pulse with the oscilloscope and calculate the bandwidth required with BW ≈ 0.35/tr. Compare it with the oscilloscope's own rated bandwidth: if they are similar, the instrument is limiting the measurement and the real edge is faster than what you see.
With an inexpensive SDR receiver and its software, view as a waterfall the spectrum of the FM band, the aviation band and the 433 MHz ISM band. Identify signals, measure their approximate width and observe the noise floor. It is the cheapest way to have a spectrum analyzer in the classroom.
07Common mistakes
| Symptom | Usual cause |
|---|---|
| The square wave looks rounded | The bandwidth of the cable, the circuit or the oscilloscope itself cuts off the high harmonics. |
| The transmitter interferes with other services | Harmonics: the output must be filtered. They are seen immediately on the spectrum analyzer. |
| A digital signal is transmitted unfiltered | Fast edges occupy an enormous spectrum. All digital modulation is filtered before transmission. |
| Trying to get more speed in the same channel | Shannon rules: without more bandwidth or a better signal-to-noise ratio, there is no more capacity. |
| The analyzer was damaged | Power above its limit was applied. Always use an attenuator. |
| Lines appear that do not exist | Intermodulation products generated inside the analyzer itself by excess level. Lower the input level and see whether they disappear. |
08Self-assessment
What does Fourier analysis say about a periodic signal?
That it can be written as a sum of sine waves whose frequencies are integer multiples of the fundamental: the harmonics, each with its own amplitude and phase.
Which harmonics does a symmetric square wave have, and how do they decrease?
Only the odd ones —3, 5, 7…— with amplitude proportional to 1/n. The triangle wave also has only odd ones, but they decrease as 1/n².
A 2 kHz square wave goes through a 5 kHz filter. What is left?
The 2 kHz fundamental and nothing else, because the third harmonic is at 6 kHz. At the output you see a sine wave, not a square wave.
What bandwidth is needed for a pulse with 10 ns edges?
BW ≈ 0.35/10 ns = 35 MHz. If the instrument or the channel has less, the edge looks slower than it really is.
Why does AM radio sound worse than FM?
Because its channel is only 10 kHz wide and limits the audio to about 5 kHz, whereas FM has 200 kHz and transmits up to 15 kHz in stereo. FM is also much less sensitive to amplitude noise.
What does a spectrum analyzer show that an oscilloscope does not?
What frequencies the signal is composed of: harmonics, spurious signals, interference, occupied bandwidth and noise floor. The oscilloscope shows the shape, not the composition.
What is the fundamental precaution when using a spectrum analyzer?
Do not exceed the maximum input level —on the order of +30 dBm— or apply DC voltage to it. Measure with an attenuator, directional coupler or antenna, never by connecting a transmitter directly.
How does a PLL generate a stable, adjustable frequency?
It compares the phase of a crystal reference with the output of a VCO divided by N and corrects the VCO until they are equal. The output ends up at N times the reference, so by changing N in software you choose the frequency with the stability of the crystal.
What is direct digital synthesis?
Generating the signal by calculation: a phase accumulator steps through a sine lookup table and a DAC produces the wave. It allows millihertz resolution and instantaneous changes of frequency and phase.
Why does a narrower pulse occupy more spectrum?
Because fast changes require high-frequency components. Time and frequency are inverses: the shorter the phenomenon in time, the wider its spectrum.