Skip to content

Lesson 2 of 313 min Essential path

Kinds of signals

Six questions that sort a signal, from how often you measure it to whether it is zero before now.

Before thisWhat a signal is (1.1)

Before this1.1
Chapter 1 · Lesson 2 of 3

First, the picture

A day of room temperature that you may read only at the dots. Drag Measurements per day up and down, and watch the curve underneath.

Looking every so often

The curve never changes, only how often we're allowed to look at it.

continuous readingmeasurements
24
Describe this picture

One plot: a day of room temperature in °C against the time of day. A smooth grey curve, “continuous reading”, runs underneath, and dots on stems, “measurements”, mark where the temperature is read. The “Measurements per day” slider runs from 4 to 96 and starts at 24, one an hour.

A handful of questions

In What a signal is (1.1) I said a signal is something that changes, with one value at each moment you look at it. That is true, but it does not tell you much about any particular signal. A heartbeat trace and a burst of radio static are both signals, and they have almost nothing else in common.

A short list of questions tells them apart. How often can you look at the signal? How fine are the values it lands on? Can you predict where it is going? Does it repeat? Is it symmetric? Does it start at some moment, or was it already going before you started watching?

Ask these six questions about any signal and you have described its main features.

Looking every so often

Picture a thermometer on your wall. Someone checks it once an hour and writes the number down. Between those checks the temperature keeps rising and falling smoothly, but you never see it. All you have is one number per hour.

Compare a thermometer with a pen attached that traces the temperature onto a moving strip of paper. There, a value exists at every instant, not only once an hour.

A signal you only get to look at now and then, at separate moments, is called discrete-time. A signal defined at every instant is called continuous-time. Nothing about the underlying temperature changed between the two descriptions, only how often you were allowed to look at it. Each separate measurement is called a sample.

To write a discrete-time signal down, give each sample a whole number nn (the first one, the second one, and so on) and write x[n]x[n] for its value. A continuous-time signal is written x(t)x(t), with tt any real number of seconds.

Go back to the picture at the top of the page. The curve underneath never changes as you drag Measurements per day. Only the dots marking where you may read a value change. With enough measurements a day, the dots sit so close together that they look like the smooth curve itself.

A ruler with only so many marks

Now think about the values themselves, not when you get to look at them. A dimmer switch can set a lamp’s brightness anywhere in a continuous range: 41%, 41.2%, any number you like. A lamp with four brightness buttons can only be at one of those four settings, with nothing in between.

A signal whose value can only land on one of a fixed set of levels, like that four-button lamp, is called digital. A signal whose value can be anything in a range, like the dimmer, is called analog. This is a separate question from discrete-time versus continuous-time: one is about when you’re allowed to look, the other is about which values you’re allowed to see.

Drag Number of levels from many down to just a few.

A ruler with only so many marks

The same curve, rounded to a fixed set of levels.

originalrounded to the nearest levelallowed levels
8
Describe this picture

One plot: the day’s temperature curve in °C against the time of day. The original smooth curve is grey, the allowed levels are thin horizontal lines, and the curve rounded to the nearest level is drawn over it. The “Number of levels” slider runs from 2 to 64 and starts at 8.

Watch the smooth curve turn into a staircase, each step landing on the nearest allowed level. With 3 levels the rounded curve has only three heights. Fewer levels means a coarser staircase, whether you measure light, sound or anything else.

Predictable, or not

Listen to a metronome clicking at a steady beat. If you know the tempo, you can say exactly when the next click will land, and the one after that, forever. Now listen to static hissing from an untuned radio. You could say roughly how loud it tends to be, but not what its exact value will be one second from now.

A signal whose entire future is fixed by a rule, like the metronome, is called deterministic. A signal that only has statistical regularities, no formula you could run forward to get the exact next value, like the static, is called random.

Switch between Steady tone and Noise, and look for a shape that comes back.

Predictable, or not

One repeats exactly forever; the other never repeats.

Kind of signal
Describe this picture

One plot, a value against time in seconds, and two buttons under “Kind of signal”: “Steady tone” and “Noise”. The tone repeats the same shape exactly; the noise never repeats, though one stretch looks statistically like the next.

Both traces look busy at a glance. The tone repeats its shape exactly, forever, while the noise never settles into a repeating pattern.

The maths behind it · random processes

What this page calls a random signal is what a statistics course calls a random process: a signal whose values are described by probabilities rather than a formula. Random variables for signals (24.1) picks this up when it asks how to summarize a random signal with numbers like its mean and variance.

Does it repeat?

Hold a single note on an organ. Its waveform settles into a shape that comes back again and again, cycle after cycle, for as long as you hold the key.

Now cough once. There is no shape to repeat: it happens, and then it is over.

A signal whose shape repeats forever at some fixed spacing is called periodic; that fixed spacing is called its period. A signal that does not repeat is called aperiodic. Many everyday recordings, such as a single cough, a knock or a spoken word, are aperiodic: they happen once.

In symbols, a discrete-time signal with period NN samples satisfies x[n+N]=x[n]x[n+N]=x[n] for every nn.

Related to this is how long a signal lasts. A cough is nonzero only for a limited stretch of time, so it has finite duration. A steady tone continues without end, so it has infinite duration.

Switch the excerpt between Musical note and Cough, then switch Show it once to Repeat it for each.

Does it repeat?

A note already repeats itself; a cough happens once, so repeating it is something we do to it.

Which signal
Show it once, or tile it
Describe this picture

One plot, a value against time in milliseconds, and two pairs of buttons: “Musical note” or “Cough” under “Which signal”, and “Show it once” or “Repeat it”, which tiles the excerpt three times.

Notice that repeating the note changes nothing about its shape, because the note already repeated. Repeating the cough gives three copies in a row. That row is periodic because we built it that way, but the cough on its own is not. Being periodic means the signal itself repeats forever, not that you can copy it.

If you add two periodic discrete-time signals together, the sum is still periodic, and its period can be longer than either one alone.

The rule: if one signal repeats every N1N_1 samples and the other every N2N_2 samples, their sum repeats every lcm(N1,N2)\mathrm{lcm}(N_1, N_2) samples. The lcm (least common multiple) is the smallest count that both N1N_1 and N2N_2 divide evenly. For example, a signal with period 6 added to one with period 8 repeats every lcm(6,8)=24\mathrm{lcm}(6, 8) = 24 samples.

Both signals start a new period together after 24 samples, and not before. The sum itself can sometimes repeat sooner, if the two signals happen to cancel in a helpful way, so 24 is a guaranteed repeat and not always the shortest one.

A mirror in time, and is it zero before now?

Pick a single moment in a signal and call it your origin, the point you measure time from. Now imagine folding the signal in half at that origin, like a mirror. If the folded halves land exactly on top of each other, the signal is symmetric about that origin.

The widget below uses two pulses, one even and one odd. If the two halves match exactly, the signal is called even about that origin. If the two halves are exact opposites, mirrored and flipped upside down, it is called odd. Most signals are neither: fold them and the two halves do not match.

Choose Even pulse or Odd pulse, then drag Mirror position and watch whether the mirror image matches.

A mirror in time

Fold a pulse at the mirror line: drag the line, or use the slider.

even pulsemirror imagemirror line

Mirror image matches.

Which pulse
0.00
Describe this picture

One plot, a value against time, with a pulse, a faint mirror image of it reflected about the mirror line, and the mirror line itself. “Which pulse” chooses “Even pulse” or “Odd pulse”; for the odd pulse the mirror image is also flipped upside down. The line can be dragged, or moved with the “Mirror position” slider. At exactly 0 the readout says “Mirror image matches.”; anywhere else it says “Mirror image doesn’t match.”

The mirror image matches only at exactly 0. The even or odd question depends on where you put the origin, not on the waveform alone.

Separately, ask where the signal is nonzero relative to that same origin. If it is zero everywhere before the origin and only turns on afterward, like a trace that starts the instant a sensor is switched on, it is called causal. If it is zero everywhere after the origin instead, it is called anticausal.

If it is nonzero on both sides, like a pulse that starts before the origin and ends after it, it is neither. Any signal that is not causal is called non-causal.

Switch between Only after now, Only before now and Both sides, and watch which side of now is held at zero.

Is it zero before now?

The shaded side, before now, is held at zero.

Which side to show
Describe this picture

One plot, a value against time, with the origin marked in the middle and labelled “now”. Three buttons choose “Only after now”, “Only before now” or “Both sides”. The side held at zero is shaded and labelled “held at zero”, and the subtitle says which side that is, or, for both sides, that nothing is shaded.

A causal signal is one you could record starting from switch-on: nothing happened before you turned the sensor on, because there was nothing to record.

Where you’ll meet these

These six questions come back constantly. Whether a signal is discrete-time or continuous-time decides whether you can run it through a digital computer, which only handles discrete-time, digital signals. How you get there is the subject of Sampling & aliasing (10.1).

The lcm\mathrm{lcm} rule comes back when you add periodic discrete-time signals. Even and odd symmetry becomes a useful shortcut when we break signals into simpler pieces in Decomposing signals (2.3).

A real-time system can only use samples that have already arrived. That is why causality comes back in System properties (4.2).

Reference card

TermMeaning
Discrete-time / continuous-timeDefined only at separate, measured instants, or at every instant
Digital / analogValue can only be one of a fixed set of levels, or can be anything in a range
Deterministic / randomFuture entirely fixed by a rule, or only predictable in a statistical sense
Periodic, with period NNIts shape repeats every NN samples: x[n+N]=x[n]x[n+N] = x[n] for every nn
AperiodicDoesn’t repeat
Sum of two periodic discrete-time signalsRepeats every lcm(N1,N2)\mathrm{lcm}(N_1, N_2) samples (sometimes sooner)
Even / odd (about a chosen origin)Mirrors exactly about the origin, or mirrors and flips upside down
Causal / anticausalZero before the origin, or zero after it. Non-causal means not causal
Finite / infinite durationNonzero only over a limited stretch of time, or continuing without end

End of lesson 1.2

Where to go next.

Phasorium
LibraryEvery lesson, in order

Parts

About Phasorium
Look