ArticleslgStudy

engineering

Sample-rate conversion

Sample-rate conversion is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Sample-rate conversion rather than just read about it. In short: Sample-rate conversion, sampling-frequency conversion or resampling is the process of changing the sampling rate of a discrete signal to obtain a new discrete representation of the underlying continuous signal. Application areas include image scaling and audio/visual systems, where different sampling rates may be used for engineering, economic, or historical reasons.

Key takeaways

  • Sample-rate conversion belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Sample-rate conversion to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Sample-rate conversion from memory before moving on to harder problems.

Reference excerpt

Sample-rate conversion, sampling-frequency conversion or resampling is the process of changing the sampling rate of a discrete signal to obtain a new discrete representation of the underlying continuous signal. Application areas include image scaling and audio/visual systems, where different sampling rates may be used for engineering, economic, or historical reasons. For example, Compact Disc Digital Audio and Digital Audio Tape systems use different sampling rates, and American television, European television, and movies all use different frame rates. Sample-rate conversion prevents changes in speed and pitch that would otherwise occur when transferring recorded material between such systems. More specific types of resampling include: upsampling or upscaling; downsampling, downscaling, or decimation; and interpolation. The term multi-rate digital signal processing is sometimes used to refer to systems that incorporate sample-rate conversion.

Techniques Conceptual approaches to sample-rate conversion include: converting to an analog continuous signal, then resampling at the new rate, or calculating the values of the new samples directly from the old samples. The latter approach is more satisfactory since it introduces less noise and distortion. Two possible implementation methods are as follows:

If the ratio of the two sample rates is (or can be approximated by) a fixed rational number L/M: generate an intermediate signal by inserting L − 1 zeros between each of the original samples. Low-pass filter this signal at half of the lower of the two rates. Select every M-th sample from the filtered output to obtain the result. Treat the samples as geometric points and create any needed new points by interpolation. Choosing an interpolation method is a trade-off between implementation complexity and conversion quality (according to application requirements). Commonly used are: zero-order hold (for film/video frames), cubic (for image processing) and windowed sinc function (for audio). The two methods are mathematically identical: picking an interpolation function in the second scheme is equivalent to picking the impulse response of the filter in the first scheme. Linear interpolation is equivalent to a triangular impulse response; windowed sinc approximates a brick-wall filter (it approaches the desirable brick-wall filter as the number of points increases). The length of the impulse response of the filter in method 1 corresponds to the number of points used in interpolation in method 2. In method 1, a slow pre-computation (such as the Remez algorithm) can be used to obtain an optimal (per application requirements) filter design. Method 2 will work in more general cases, e.g., where the ratio of sample rates is not rational, or two real-time streams must be accommodated, or the sample rates are time-varying. See decimation and upsampling for further information on sample-rate conversion filter design/implementation.

Examples

Film and television The slow-scan TV signals from the Apollo Moon missions were converted to the conventional TV rates for the viewers at home. Digital interpolation schemes were not practical at that time, so analog conversion was used. This was based on a TV-rate camera viewing a monitor displaying the Apollo slow-scan images. Movies (shot at 24 frames per second) are converted to television (roughly 50 or 60 fields per second). To convert a 24-frame/second movie to 60-field/second television, for example, alternate movie frames are shown 2 and 3 times, respectively. For 50 Hz systems such as PAL, each frame is shown twice. Since 50 is not exactly 2 × 24, the movie will run 50 / 48 = 4% faster, and the audio pitch will be 4% higher, an effect known as PAL speed-up. This is often accepted for simplicity, but more complex methods are possible that preserve the running time and pitch. Every twelfth frame can be repeated 3 times rather than twice, or digital interpolation (see above) can be used in a video scaler.

Audio Audio on Compact Disc has a sampling rate of 44.1 kHz; to transfer it to a digital medium that uses 48 kHz, method 1 above can be used with L = 160, M = 147 (since 48000 / 44100 = 160 / 147). For the reverse conversion, the values of L and M are swapped. Per above, in both cases, the low-pass filter should be set to 22.05 kHz.

Operating systems Microsoft Windows and Android are examples of operating systems that perform sample-rate conversion.

Media players Many media player software (such as foobar2000) include an internal sample-rate conversion feature. Compared to operating system level audio resampling, the media player software itself may implement high-quality audio resampling algorithms, but uses more CPU resources.

See also Sample rate conversion in multiple dimensions:

Multivariate interpolation Techniques and processing that may involve sample-rate conversion:

Oversampling Transcoding Techniques used in related processes:

Dither

Notes

References

Further reading Crochiere, R.E.; Rabiner, L.R. (1983). Multirate Digital Signal Processing. Englewood Cliffs, NJ: Prentice-Hall. ISBN 0136051626.

External links Digital Audio Resampling Home Page Multi-Rate Processing and Sample Rate Conversion: A Tutorial The Quest For The Perfect Resampler (PDF) Digital resampling by using polynomial interpolation. Farrow filter Archived 2018-10-01 at the Wayback Machine Using Farrow filter on the basis of piecewise cubic polynomial interpolation for digital signal resampling Archived 2018-09-29 at the Wayback Machine

Worked examples

Example 1 — a first encounter with Sample-rate conversion

Start with the simplest possible case. Write down what Sample-rate conversion claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Sample-rate conversion before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Sample-rate conversion ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Sample-rate conversion

In research
Sample-rate conversion appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Sample-rate conversion in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Sample-rate conversion is common in secondary-school and first-year university syllabi. It links to neighbouring topics Audio engineering, Digital audio, Digital signal processing, so understanding it makes those chapters shorter.
In everyday life
Look for Sample-rate conversion outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Sample-rate conversion in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Sample-rate conversion means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Sample-rate conversion out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Sample-rate conversion in simple terms?

Sample-rate conversion, sampling-frequency conversion or resampling is the process of changing the sampling rate of a discrete signal to obtain a new discrete representation of the underlying continuous signal. Application areas include image scaling and audio/visual systems, where different sampli…

Why does Sample-rate conversion matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Sample-rate conversion?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Sample-rate conversion.

Tags

  • Audio engineering
  • Digital audio
  • Digital signal processing

Keep exploring