Analog to digital signal conversion Part 3


Free Download Mp4Gain
picture

Analog to digital signal conversion Part 3

Analog to digital

Keywords can be streamed in parallel or serial.

Analog to digital

For parallel transmission, n communication lines must be used (n = 4). The codeword symbols are transmitted simultaneously over the lines within the sampling interval. For serial transmission, the sampling interval must be divided into n subintervals: cycles. In this case, the characters of the word are transmitted sequentially along a line and a clock cycle is assigned for the transmission of one character of the word. Each character of the word is transmitted by one or more discrete signals: pulses. Therefore, converting an analog signal into a sequence of code words is often called pulse code modulation. The way words are represented by certain signals is determined by the format of the code. You can, for example, set the signal level high within the clock cycle if a binary character 1 is transmitted in this clock cycle, and low – if a binary character 0 is transmitted (this representation method, shown in the Fig. 6, it is called BVN format – No return to zero).

In the example of Fig. 6 it uses 4-bit binary words (this allows 16 levels of quantization). In a parallel digital stream, 1 bit of a 4-bit word is transmitted on each line within the sampling interval. In a serial stream, the sampling interval is divided into 4 clocks, in which the bits of a 4-bit word are transmitted (starting with the most significant). 6 uses 4-bit binary words (this allows 16 levels of quantization). In a parallel digital stream, 1 bit of a 4-bit word is transmitted on each line within the sampling interval. In a serial stream, the sampling interval is divided into 4 clocks, in which the bits of a 4-bit word are transmitted (starting with the most significant). 6 uses 4-bit binary words (this allows 16 levels of quantization). In a parallel digital stream, 1 bit of a 4-bit word is transmitted on each line within the sampling interval. In a serial stream, the sampling interval is divided into 4 clocks, in which the bits of a 4-bit word are transmitted (starting with the most significant).

Operations related to converting an analog signal to digital form (sampling, quantizing, and encoding) are performed by one device: an analog-to-digital converter (ADC). Today, an ADC can simply be an integrated circuit. Reverse procedure, ie restoring an analog signal from a sequence of code words is performed in a digital-to-analog converter (DAC). Now there are technical possibilities for implementing all image and sound signal processing, including recording and transmission, in digital form. However, analog devices are still used as signal sensors (for example, a microphone, a TV transmission tube, or a charge-coupled device) and sound and image reproduction devices (for example, a speaker, a kinescope ).

Digital signals can be described using typical parameters of analog technology, such as bandwidth. But its applicability in digital technology is limited. An important indicator characterizing digital flow is the data transfer rate. If the length of the word is n and the sampling rate is FD, then the data rate, expressed in the number of binary symbols per unit time (bit / s), is calculated as the product of the length of the word by the sampling frequency: C = nFD.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Analog to digital signal conversion Part 2

Analog to digital signal conversion Part 2

Analog to digital

If you need no distortion of the TV signal during the sampling process with a cutoff frequency, for example 6 MHz, then the sampling frequency must be at least 12 MHz.

Image result for Analog to digital

However, the closer the sample rate is to twice the cutoff frequency of the signal, the more difficult it is to create a low-pass filter, which is used in the reconstruction and also in the pre-filtering of the original analog signal. This is due to the fact that as the sampling frequency approaches the doubling cutoff frequency of the sampled signal, increasingly stringent requirements are imposed on the shape of the frequency characteristics of the reconstruction filters: it must correspond more and more precisely to a rectangle. characteristic. It should be noted that a rectangular filter cannot be physically implemented. Such a filter, as theory shows, must introduce an infinitely large delay into the transmitted signal. Therefore, in practice, there is always a certain interval between the doubled cutoff frequency of the original signal and the sampling frequency.

Quantification
– represents the replacement of the count value of the signal with the closest value of a set of fixed values ​​- quantization levels. In other words, quantization is the rounding of the count value. Quantization levels divide the entire range of possible changes in signal values ​​into a finite number of intervals: quantization steps. The location of the quantization levels is determined by the quantization scale. Uniform and non-uniform scales are used. In Fig. 3 shows the original analog signal and its quantized version obtained by means of a uniform quantization scale, as well as the corresponding image signals.

Signal distortions that occur during the quantization process are called quantization noise. In instrumental noise estimation, the difference between the original signal and its quantized copy is calculated and, for example, the root mean square value of this difference is taken as objective noise indicators. The timing diagram and the image of the quantization noise are also shown in Fig. 3 (the image of the quantization noise is shown on a gray background). Unlike jitter noise, quantization noise is correlated with the signal, so quantization noise cannot be removed by post-filtering. The quantization noise decreases as the number of quantization levels increases.

With a relatively large number of levels, the quantization noise is similar to the usual jitter noise. The noise oscillation was reduced, so it was necessary to increase this oscillation 128 times when obtaining an image of quantization noise to make the noise noticeable. A few years ago, it seemed sufficient to use 256 levels to quantify a television video signal. It is now considered the norm to quantify a video signal at 1024 levels. The number of quantization levels in the formation of a digital audio signal is much greater – from tens of thousands to millions.

Digital encoding
A quantized signal, unlike the original analog signal, can only take on a finite number of values. This allows a number equal to the ordinal number of the quantization level to be represented within each sampling interval. In turn, this number can be expressed by a combination of some signs or symbols. The set of characters (symbols) and the system of rules by which data is represented as a set of characters is called a code. The final sequence of code symbols is called a code word. The quantized signal can be converted into a sequence of code words. This operation is called encoding. Each codeword is transmitted within a sampling interval. Binary code is widely used to encode audio and video signals. If the quantized signal can take N values, then the number of binary symbols in each codeword is n> = log2N. A bit, or character in a word represented in binary code, is called a bit. Generally, the number of quantization levels is equal to an integer power of 2, that is, N = 2n.

Analog to digital signal conversion

Analog to digital signal conversion

Analog to digital

To convert any analog signal (sound, image) into digital format, three basic operations must be performed: sampling, quantization and encoding.

Analog to digital

Sampling
– presentation of a continuous analog signal by means of a sequence of its values ​​(samples). These samples are taken at times separated from each other by an interval called the sampling interval. The reciprocal of the interval between samples is called the sample rate. In Fig. 1 shows the original analog signal and its sampled version. The images below the timing diagrams are obtained assuming that the signals are one line television video signals, the same for the entire television screen.

Analog to digital conversion. Sampling

It is clear that the shorter the sampling interval, and therefore the higher the sampling frequency, the smaller the difference between the original signal and its sampled copy. The stepped structure of the sampled signal can be smoothed with a low-pass filter. This is how the analog signal is restored from the sampled one. But the reconstruction will be accurate only if the sampling frequency is at least 2 times the bandwidth of the original analog signal (this condition is determined by the well-known Kotelnikov theorem). If this condition is not met, the sampling is accompanied by irreversible distortions. The fact is that, as a result of sampling, additional components appear in the frequency spectrum of the signal, which lie around the harmonics of the sampling frequency in the range, equal to twice the bandwidth of the original analog signal. . If the maximum frequency in the frequency spectrum of the analog signal exceeds half the sampling frequency, then the additional components fall within the frequency band of the original analog signal. In this case, it is no longer possible to restore the original signal without distortion. The theory of sampling is covered in many books.

Analog to digital conversion. Distortion sampling

An example of sampling distortions is shown in Fig. 2. An analog signal (again, suppose it is a TV line video signal) contains a wave, the frequency of which first increases from 0.5 MHz to 2.5 MHz and then decreases to 0.5 MHz. This signal is sampled at 3 MHz. In Fig. 2 the images are shown sequentially: the original analog signal, the sampled signal, the restored analog signal after sampling. The low-pass reconstruction filter has a 1.2 MHz bandwidth. As you can see, the low-frequency components (less than 1 MHz) are restored without distortion. The 1.5 MHz wave disappears and becomes a relatively flat field. The 2.5 MHz wave after recovery became a 0.5 MHz wave (this is the difference between the 3 MHz sampling frequency and the original 2.5 MHz frequency). These image diagrams illustrate the distortion associated with an insufficiently high spatial sample rate of the image. If the subject of the television recording is an object that is moving very fast or, for example, a rotating object, then sampling distortions in the time domain may occur. An example of distortion associated with an insufficiently high sample rate (and this is the frame rate of television decay) is an image of a fast moving car on stationary wheels or, for example, slowly turning in one direction or other, the spokes of the wheel (stroboscopic effect). There is no sampling distortion when the bandwidth of the original signal is limited from above and does not exceed half the sampling frequency. associated with insufficiently high spatial sampling rate of the image. If the subject of the television recording is an object that is moving very fast or, for example, a rotating object, then sampling distortions in the time domain may occur. An example of distortion associated with an insufficiently high sample rate (and this is the frame rate of television decay) is an image of a fast moving car on stationary wheels or, for example, slowly turning in one direction or other, the spokes of the wheel (stroboscopic effect). There is no sampling distortion when the bandwidth of the original signal is limited from above and does not exceed half the sampling frequency.

From analog to digital and vice versa

From analog to digital and vice versa

Analog-to-digital

Today, almost 99% of sound recording, sound reproduction studio equipment, and music synthesizers are digital devices.

Everyone knows that even a typical home CD player uses a digital-to-analog converter and that music on CDs is written in 16-bit numbers. However, both the original sound and musical material (voice, classical musical instruments, electric guitars, etc.) and the sound output of your music center are analog signals, not digital signals. Therefore, for today’s recording industry, the key is to convert analog signals to digital and convert digital data to analog audio signals. Let’s try to find out how these transformations take place. The analog signal represents is a continuous process in time and amplitude, and its digital representation is a sequence or series of numbers that consists of a finite number of bits. The conversion of an analog signal to digital consists of two stages: time sampling and amplitude quantization. Time sampling means that the signal is represented by a series of its samples taken at regular intervals. For example, when we say that the sample rate is 44.1 kHz, it means that the signal is measured 44100 times per second. The main problem in the first stage of converting an analog to digital signal (digitization) is choosing the sampling frequency of the analog process. The answer is given by the well-known Nyquist theorem, which states that for an analog signal (continuous in time) occupying the frequency range 0 Hz to F Hz to be reconstructed with absolute precision from its samples, the frequency of The sample rate must be at least twice the maximum audio frequency F. Therefore, if the actual analog signal that we are going to convert to digital format contains frequency components from 0 Hz to 20 kHz, then the sampling frequency of that signal it should not be less than 40 kHz. Let’s take a closer look at what happens to an analog signal and its spectrum when sampled.

During sampling, the frequency spectrum changes significantly. The original analog signal tends to have a spectrum mainly concentrated in the frequency band from 20 Hz to about 20 kHz, since the usual pickups and microphones from which it is taken have about this frequency response. In addition, the signal often contains interference with frequencies of up to several hundred kilohertz. These are various “vans” difficult to remove from computer equipment, industrial and electrical appliances, trams, trolleybuses, etc. After sampling, the signal is a sequential time series of very narrow pulses with different amplitudes and with a very wide spectrum of up to several megahertz (a mathematical fact: the narrower the pulse, the broader its spectrum). Therefore, in general, the spectrum of such a pulse sequence expands to the same several megahertz. Therefore, the spectrum of the sampled signal is much broader than the spectrum of the original analog signal. Let’s take a closer look at how this new broad spectrum is set up. There are two important processes. First, the “convolution” of the entire original spectrum of the analog signal extending from approximately 20 Hz to several hundred kilohertz within the frequency band from 0 Hz to half the sampling frequency.

Convolution means that all components of the original analog signal, with frequencies above half the sample rate (and this is mostly inaudible noise)) fall in the frequency range audible to the human ear from 20 Hz to ” Average sampling frequency “Hz, ie Inaudible interference becomes audible and therefore the signal-to-noise ratio may deteriorate. All of this seems very unusual, not to say that it even contradicts common sense! It turns out that there is a sampling of high-frequency signals with frequency components that are significantly higher than not just half the sample rate, but also the sample rate itself. At first glance, this even contradicts the Nyquist theorem mentioned above. But let’s look at Fig. 4. It shows the process of sampling a high-frequency sinusoidal signal at more than two times less than its sampling frequency.

Analog vs Digital: a fight that never happened

Analog vs Digital: a fight that never happened

Analog vs Digital Audio

This article is not intended to foment a holy war between fans of analog and digital audio. The goal is to show the fundamental differences between the two technologies. The author of the article (that is, me) takes the side of digital technology as the most perfect and wants to explain his point of view to everyone, not only from the subjective side, but also from the scientific one. Knowledge of the principle of digital sound recording, together with an understanding of the scientific side of this matter, clearly excludes any doubt about the superiority of digital over analog technologies.

Analogue Vs. Digital

ANALOG AUDIO RECORDING.
In fact, sound (vibration of air particles) is analogous in nature. Sound propagates in airspace, it can be distorted depending on a variety of conditions: distance to the sound source, reflection from surrounding objects, speed of movement relative to the source, etc. The range of sound vibrations perceived by the human ear is considered to be the range of 20 Hz to 20 kHz. In fact, 20 kHz is a pretty optimistic figure, few can boast that they actually listen to that frequency. Most of the adults I met did not hear frequencies above 15-16 kHz, so I would say with a high degree of certainty that the average hearing threshold is 15 kHz. However, in terms of pitch, our ear perceives frequencies only up to 5 kHz; all that is higher are additional overtones, overtones, sounds, etc. However, correct reproduction of high components (cut-off frequency) is basically a measure of the quality of a sound recording, usually indicated in the technical specifications of any serious sound recording device.

In the world of analog sound recording, air vibration is first converted to electrical vibration through a microphone. The electrical vibration is then applied to a magnetic recording head (in the case of magnetic tape) or a mechanical cutter (in the case of vinyl). In the first case, the information is recorded on a magnetized tape, in the second – in the slot of the plate. To reproduce the sound, it is enough to stretch the magnetic tape along the magnetic head at the same speed at which the recording was made: the head converts the alternating magnetic field back into electrical oscillations, which are amplified and fed to the system of sound reproduction (speaker). The sound reproduction system vibrates the air and we hear sound. In the case of a plate, just drive the needle along the groove,

Purely from the point of view of common sense, it follows from all the above that vinyl is the worst option to record sound in principle, because in the recording / playback process there is an approximate mechanics (paradoxically, for some reason, conservatives they tend to advocate vinyl and not magnetic tapes, although the latter at the peak of their development had significantly higher quality characteristics). Among other things, almost all more or less normal vinyls were written from magnetic tapes. I simply had no where to record: mastering and mixing were done on tape, as on disk it is, in principle, impossible. That is, the sound of vinyl is the sound of a magnetic tape, only complemented by its own shortcomings of vinyl: creaks, hisses, and other outrages from “music lovers”,

In fact, analog audio recording is imperfect at almost every stage. For example, when recording on a magnetic tape, a lot depends on the quality of the magnetic head; its calibration with respect to the tape is paramount (eternal headache). Add to this detonation (inconsistency of belt speed due to inaccuracies in the belt transport mechanism), self-stretching of the belt, changes in the characteristics of the belt along its length, random bumps / foreign particles in she. Vinyl? Detonation, debris falling into the groove, disc warping, deterioration in sound quality after each playback due to “squashing” of the groove. But the main disadvantage of analog recording is the impossibility of creating an exact copy: any copy of the original will be of inferior quality. Also, any analog media, even if not in use,

DIGITAL SOUND RECORDING.
Digital sound recording has been made possible by the enormous technological advances of the last decades. In fact, digital sound recording is based on a fairly old theory – it just became possible to turn theory into practice.

Differences between analog and digital audio

Differences between analog and digital audio

Analog and Digita

Very often we hear definitions such as “digital” or “discrete” signal, how is it different from “analog”?

Actual] Difference between Analog and Digital Signal with Examples -  ETechnoG

The difference is that the analog signal is continuous in time (blue line), while the digital signal consists of a limited set of coordinates (red dots). If everything is reduced to coordinates, then any segment of an analog signal consists of an infinite number of coordinates.

For a digital signal, the coordinates along the horizontal axis are located at regular intervals, according to the sampling frequency. In the popular audio CD format, this is 44,100 points per second. Vertically, the precision of the coordinate height corresponds to the digit capacity of the digital signal, for 8 bits it is 256 levels, for 16 bits = 65536 and for 24 bits = 16777216 levels. The greater the bit depth (the number of levels), the closer the vertical coordinates will be to the original wave.

Analog sources are cassette tapes and vinyl. Digital sources are: CD-Audio, DVD-Audio, SA-CD (DSD) and files in WAVE and DSD formats (including those derived from APE, Flac, Mp3, Ogg, etc.).

Advantages and disadvantages of the analog signal

The advantage of the analog signal is that it is in the analog form that we perceive sound with our ears. And although our auditory system converts the perceived sound stream into digital form and transmits it to the brain in this way, science and technology have not yet reached the possibility of connecting players and other sound sources directly in this way. Currently, this research is being actively carried out for people with disabilities, and we exclusively enjoy analog sound.

The downside to an analog signal is the ability to store, transmit, and replicate the signal. When recording on tape or vinyl, the quality of the signal will depend on the properties of the tape or vinyl. Over time, the tape will degauss and the quality of the recorded signal will deteriorate. Each read gradually destroys the medium and rewriting introduces additional distortion, where additional deviations are added by the next medium (tape or vinyl), devices for reading, recording and transmitting a signal.

Making a copy of an analog signal is like taking another photograph to copy a photograph.

Advantages and disadvantages of a digital signal

The advantages of a digital signal include precision when copying and transmitting an audio stream, where the original is no different from the copy.

The main disadvantage can be considered that the digital signal is an intermediate stage and the precision of the final analog signal will depend on how detailed and precise the coordinates of the sound wave are. It is quite logical that the more points there are and the more precise the coordinates, the more precise the wave will be. But there is still no consensus on how many coordinates and data precision is sufficient to say that the digital representation of the signal is sufficient to accurately reconstruct the analog signal, indistinguishable from the original by our ears.

In terms of data volume, the capacity of a conventional analog audio cassette is only 700-1.1 MB, while a normal CD is 700 MB. This gives an indication of the need for high capacity media. And this results in a separate war of compromises with different requirements for the number of descriptive points and for the precision of the coordinates.

Today, it is considered sufficient to represent a sound wave with a sampling frequency of 44.1 kHz and a bit depth of 16 bits. With a sampling frequency of 44.1 kHz, you can recall up to 22 kHz. As psychoacoustic studies show, a further increase in sample rate is unremarkable, but an increase in bit depth provides a subjective improvement.

How DACs Build the Wave

A DAC is a digital-to-analog converter, an item that converts digital sound to analog. We’ll take a quick look at the basics. If the comments show interest in considering various points in more detail, a separate material will be published.

Multibit DAC

Most often, the wave is presented in the form of steps, which is due to the architecture of the first generation of R-2R multi-bit DACs, which function similar to a relay switch.