# Frequency

In physics the frequency of a phenomenon that has a trend consisting of events that are repeated identical or almost identical in time, is given by the number of events that are repeated in a given unit of time, also the angular velocity is part of the general concept of speed (variation of a quantity), in this case expresses the variation of an angle in time. One way to calculate such a frequency is to set a time interval, count the number of occurrences of the event that is repeated in that time interval, and then divide the result of this count by the magnitude of the time interval. Alternatively, one can measure the time interval between the initial instants of two successive events (the period) and then calculate frequency as the inverse quantity of this duration.

\[f=\dfrac{1}{T}\]

where \(T\) represents the period. The result is given in the unit of measurement called hertz (Hz), by the German physicist Heinrich Rudolf Hertz. The hertz measurement, abbreviated Hz, is the number of waves that pass by per second. For example, an “A” note on a violin string vibrates at about 440 Hz (440 vibrations per second).

## Sampling frequency

The sampling frequency is one of the fundamental parameters that characterize the analog-to-digital conversion process in electronic information processing systems. The sampling frequency describes in hertz the number of samples present in one second of digital signal (from “digit” which in the computer/electronic world varies to mean “binary digit”).

In an electronic system, information is usually encoded in a time-varying voltage signal. We speak of analog signal if it varies continuously at each instant of time, of numeric signal if it can take only a finite number of discrete values or digital signal if the values that can take are only 0 and 1, in precise instants of time. The sampling process allows to convert an analog signal into a digital signal and consists in measuring and recording, in precise instants of time (sampling instants) the instantaneous value of the analog signal under consideration. The sequence of these values, called samples, constitutes the digital signal. The device that performs the conversion from analog signal to digital signal is called A/D converter. The sampling rate indicates the number of samples recorded in one second: the Nyquist-Shannon Theorem states that, in order to reconstruct the analog signal from its samples, it is necessary that the sampling rate is at least twice the highest frequency contained in the spectrum of the starting signal: \(f_c \geqslant 2f_{max}\).

Each individual measurement of the signal corresponds to a stored number, and is called sample; in the production of samples generally occur countless sampling errors, attributable mainly to the same digital form with which they are stored, which by force of things must be represented on a finite number of digits; if in theory it is sufficient, known the bandwidth of the signal, to apply the Nyquist-Shannon sampling theorem to obtain the ideal frequency, such as to allow the complete reconstruction of the signal from its samples, in practice the perfect reconstruction is often impossible, and indeed are introduced voluntarily errors of precision to reduce the number of digits needed, process that takes the name of quantization. In most applications this is not a problem, because an approximate representation is more than sufficient to allow a correct interpretation of the signal (for example in the case of sound, graphic or multimedia signals).

For example, an audio signal has a spectrum between 20 Hz and 20 kHz: in order to record the signal on a digital medium, the sampling frequency must be at least 40 kHz. Usually, this sampling is done at 44.1 kHz at 16 bits, a value that fully satisfies the Nyquist-Shannon sampling theorem and that allows to faithfully reconstruct the starting analog signal.