Sensors & Signal Processing

sampling rate & Nyquist

A real-world signal, like the wobble of a robot's joint or the sound of a motor, changes smoothly and continuously. But a computer cannot store something continuous; it can only take snapshots. The sampling rate is how many of those snapshots it grabs each second, measured in hertz (Hz). Sampling at 1000 Hz means the sensor's value is recorded a thousand times per second. Think of it like the frame rate of a video: more frames per second capture fast motion more faithfully, while too few frames make a spinning wheel look frozen or backward. The sampling rate sets the ceiling on how quickly a robot can notice change, so a fast-twitching balance sensor needs a much higher rate than a slow temperature reading.

There is a precise law for how fast is fast enough. The Nyquist limit says you must sample at more than twice the highest frequency present in the signal; sample any slower and fast wiggles do not just get blurred, they get disguised as slow ones that were never there. This false impostor is called aliasing, and it is the same illusion that makes wagon wheels appear to spin backward in films. Once aliasing has happened it is impossible to undo, because the genuine fast signal and the fake slow one look identical in the recorded data. So engineers either choose a sampling rate comfortably above twice the fastest motion they care about, or place a low-pass filter ahead of the sampler to strip out frequencies that are too high to capture honestly.

A motor vibrates at 300 Hz. Sample its sensor at only 400 Hz and the recording shows a phantom slow 100 Hz hum that the motor never produced; sampling above 600 Hz captures the real 300 Hz instead.

Sampling too slowly turns a real 300 Hz vibration into a fake 100 Hz one — that is aliasing.

Rule of thumb: sample at well over twice the fastest frequency you care about, or filter out what you can't sample.

Also called
sample rateNyquist limit采样频率取樣頻率奈奎斯特极限