• Transfer of discrete data at the physical level. Lectures Computer networks. Physical level. Theoretical basis of data transmission

    When transmitting discrete data over communication channels, two main types of physical coding are used - based on a sinusoidal carrier signal and based on a sequence of rectangular pulses. The first method is often called modulation or analog modulation, emphasizing the fact that encoding is carried out by changing the parameters of the analog signal. The second method is usually called digital coding. These methods differ in the width of the spectrum of the resulting signal and the complexity of the equipment required for their implementation.

    When using rectangular pulses, the spectrum of the resulting signal is very wide. This is not surprising if we remember that the spectrum of an ideal pulse has an infinite width. The use of a sine wave results in a spectrum of much smaller width at the same information transfer rate. However, to implement sinusoidal modulation, more complex and expensive equipment is required than to implement rectangular pulses.

    Currently, increasingly, data that was originally in analog form - speech, television images - is transmitted over communication channels in discrete form, that is, in the form of a sequence of ones and zeros. The process of representing analog information in discrete form is called discrete modulation. The terms "modulation" and "coding" are often used interchangeably.

    At digital coding potential and pulse codes are used for discrete information. In potential codes, only the potential value of the signal is used to represent logical ones and zeros, and its drops, which form complete pulses, are not taken into account. Pulse codes allow you to represent binary data either as pulses of a certain polarity, or as part of a pulse - a potential drop in a certain direction.

    When using rectangular pulses to transmit discrete information, it is necessary to choose a coding method that would simultaneously achieve several goals: have the smallest spectral width of the resulting signal at the same bit rate; provided synchronization between the transmitter and receiver;

    Possessed the ability to recognize mistakes; had a low selling price.

    Networks use so-called self-synchronizing codes, the signals of which carry instructions for the transmitter at what point in time it is necessary to recognize the next bit (or several bits, if the code is focused on more than two signal states). Any sharp change in the signal - the so-called edge - can serve as a good indication for synchronizing the receiver with the transmitter. Recognition and correction of distorted data is difficult to carry out using physical layer means, so most often this work is taken over by higher-lying protocols: channel, network, transport or application. On the other hand, recognizing errors at the physical level saves time, since the receiver does not wait for the frame to be completely placed in the buffer, but rejects it immediately upon placement. knowledge of erroneous bits within the frame.

    Potential code without returning to zero, potential encoding method, also called encoding without returning to zero (Non Return to Zero, NRZ). The last name reflects the fact that when transmitting a sequence of ones, the signal does not return to zero during the clock cycle (as we will see below, in other encoding methods a return to zero occurs in this case). The NRZ method is simple to implement, has good error recognition (due to two sharply different potentials), but does not have the property of self-synchronization. When transmitting a long sequence of ones or zeros, the signal on the line does not change, so the receiver is unable to determine from the input signal the moments in time when it is necessary to read the data again. Even with a high-precision clock generator, the receiver may make a mistake with the moment of data collection, since the frequencies of the two generators are never completely identical. Therefore, at high data rates and long sequences of ones or zeros, a small clock mismatch can lead to an error of a whole clock cycle and, accordingly, an incorrect bit value being read.

    Bipolar coding method with alternative inversion. One of the modifications of the NRZ method is the bipolar coding with alternative inversion (Bipolar Alternate Mark Inversion, AMI). This method uses three potential levels - negative, zero and positive. To encode a logical zero, a zero potential is used, and a logical one is encoded either by a positive potential or a negative one, with the potential of each new unit being opposite to the potential of the previous one. Thus, a violation of the strict alternation of signal polarity indicates a false pulse or the disappearance of a correct pulse from the line. A signal with incorrect polarity is called prohibited signal (signal violation). The AMI code uses not two, but three signal levels on the line. The additional layer requires an increase in transmitter power of approximately 3 dB to provide the same bit fidelity on the line, which is a common disadvantage of codes with multiple signal states compared to codes that distinguish only two states.

    Potential code with inversion at one. There is code similar to AMI, but with only two signal levels. When transmitting a zero, it transmits the potential that was set in the previous cycle (that is, does not change it), and when transmitting a one, the potential is inverted to the opposite one. This code is called potential code with inversion at one (Non Return to Zero with ones Inverted, NRZI). This code is convenient in cases where the use of a third signal level is highly undesirable, for example in optical cables, where two signal states - light and darkness - are stably recognized.

    Bipolar pulse code In addition to potential codes, pulse codes are also used in networks, when the data is represented by a full pulse or part of it - the front. The simplest case of this approach is bipolar pulse code, in which one is represented by a pulse of one polarity, and zero by another . Each pulse lasts half a beat. Such code has excellent self-synchronizing properties, but a constant component may be present, for example, when transmitting a long sequence of ones or zeros. In addition, its spectrum is wider than that of potential codes. Thus, when transmitting all zeros or ones, the frequency of the fundamental harmonic of the code will be equal to NHz, which is two times higher than the fundamental harmonic of the NRZ code and four times higher than the fundamental harmonic of the AMI code when transmitting alternating ones and zeros. Due to its too wide spectrum, the bipolar pulse code is rarely used.

    Manchester code. In local networks, until recently, the most common encoding method was the so-called Manchester code. It is used in Ethernet and TokenRing technologies. In the Manchester code, a potential difference, that is, the edge of a pulse, is used to encode ones and zeros. With Manchester encoding, each measure is divided into two parts. Information is encoded by potential drops that occur in the middle of each clock cycle. A unit is encoded by an edge from a low signal level to a high one, and a zero is encoded by a reverse edge. At the beginning of each clock cycle, an overhead signal drop may occur if you need to represent several ones or zeros in a row. Since the signal changes at least once per transmission cycle of one data bit, the Manchester code has good self-synchronizing properties. The bandwidth of the Manchester code is narrower than that of the bipolar pulse. On average, the bandwidth of the Manchester code is one and a half times narrower than that of the bipolar pulse code, and the fundamental harmonic fluctuates around the value of 3N/4. The Manchester code has another advantage over the bipolar pulse code. The latter uses three signal levels for data transmission, and the Manchester one uses two.

    Potential code 2B 1Q. Potential code with four signal levels for encoding data. This is the code 2B 1Q, the name of which reflects its essence - every two bits (2B) are transmitted in one clock cycle by a signal having four states (1Q). Bit pair 00 corresponds to a potential of -2.5V, bit pair 01 corresponds to a potential of -0.833V, pair 11 corresponds to a potential of +0.833V, and pair 10 corresponds to a potential of +2.5V. With this coding method, additional measures are required to deal with long sequences of identical bit pairs, since in this case the signal turns into a constant component. With random alternation of bits, the signal spectrum is twice as narrow as that of the NRZ code, since at the same bit rate the clock duration is doubled. Thus, using the 2B 1Q code, you can transfer data over the same line twice as fast as using the AMI or NRZI code. However, to implement it, the transmitter power must be higher so that the four levels are clearly distinguished by the receiver against the background of interference.

    Logic coding Logic coding is used to improve potential codes such as AMI, NRZI or 2Q.1B. Logic coding must replace long sequences of bits that result in a constant potential with interspersed ones. As noted above, logical coding is characterized by two methods -. redundant codes and scrambling.

    Redundant codes are based on breaking the original bit sequence into chunks, often called symbols. Each original character is then replaced with a new one that has more bits than the original.

    To ensure a given line capacity, a transmitter using a redundant code must operate at an increased clock frequency. So, to transmit 4V/5V codes at a speed of 100Mb/s, the transmitter must operate at a clock frequency of 125MHz. In this case, the spectrum of the signal on the line expands compared to the case when a pure, non-redundant code is transmitted along the line. Nevertheless, the spectrum of the redundant potential code turns out to be narrower than the spectrum of the Manchester code, which justifies the additional stage of logical coding, as well as the operation of the receiver and transmitter at an increased clock frequency.

    Scrambling. Shuffling the data with a scrambler before passing it onto the line using a potential code is another way of logical encoding. Scrambling methods involve bit-by-bit calculation of the resulting code based on the bits of the source code and the bits of the resulting code obtained in previous clock cycles. For example, a scrambler might implement the following relation:

    Asynchronous and synchronous transmission

    When exchanging data at the physical layer, the unit of information is a bit, so the physical layer always maintains bit synchronization between the receiver and transmitter. Usually it is enough to ensure synchronization at these two levels - bit and frame - so that the transmitter and receiver can ensure a stable exchange of information. However, when the quality of the communication line is poor (usually this applies to telephone dial-up channels), additional synchronization means are introduced at the byte level to reduce the cost of equipment and increase the reliability of data transmission.

    This mode of operation is called asynchronous or start-stop. In asynchronous mode, each byte of data is accompanied by special start and stop signals. The purpose of these signals is, firstly, to notify the receiver of the arrival of data and, secondly, to give the receiver enough time to perform some synchronization-related functions before the next byte arrives. The start signal has a duration of one clock interval, and the stop signal can last one, one and a half, or two clock periods, so it is said that one, one and a half, or two bits are used as the stop signal, although these signals do not represent user bits.

    In synchronous transmission mode, there are no start-stop bits between each pair of bytes. Conclusions

    When transmitting discrete data over a narrowband voice-frequency channel used in telephony, the most suitable methods are analog modulation, in which the carrier sinusoid is modulated by the original sequence of binary digits. This operation is carried out by special devices - modems.

    For low-speed data transmission, a change in the frequency of the carrier sinusoid is used. Higher-speed modems operate on combined methods of quadrature amplitude modulation (QAM), which is characterized by 4 levels of carrier sinusoid amplitude and 8 levels of phase. Not all of the possible 32 combinations of the QAM method are used for data transmission; prohibited combinations make it possible to recognize corrupted data at the physical level.

    On broadband communication channels, potential and pulse coding methods are used, in which data is represented by different levels of constant signal potential or pulse polarities or his front.

    When using potential codes, the task of synchronizing the receiver with the transmitter is of particular importance, since when transmitting long sequences of zeros or ones, the signal at the receiver input does not change and it is difficult for the receiver to determine the moment of picking up the next data bit.

    The simplest potential code is the non-return-to-zero (NRZ) code, but it is not self-clocking and produces a DC component.

    The most popular pulse code is the Manchester code, in which the information is carried by the direction of the signal drop in the middle of each clock cycle. The Manchester code is used in Ethernet and TokenRing technologies.

    To improve the properties of a potential NRZ code, logical coding methods are used that eliminate long sequences of zeros. These methods are based on:

    On the introduction of redundant bits into the source data (4B/5B type codes);

    Scrambling of source data (codes like 2B 1Q).

    Improved potential codes have a narrower spectrum than pulse codes, so they are used in high-speed technologies such as FDDI, FastEthernet, GigabitEthernet.

    2 Functions of the physical layer Representation of bits by electrical/optical signals Coding of bits Synchronization of bits Transmission/reception of bits over physical communication channels Coordination with the physical environment Transmission speed Range Signal levels, connectors In all network devices Hardware implementation (network adapters) Example: 10 BaseT - UTP cat 3, 100 ohm, 100m, 10Mbit/s, MII code, RJ-45






    5 Data transmission equipment Converter Message - El. signal Encoder (compression, correction codes) Modulator Intermediate equipment Improving communication quality - (Amplifier) ​​Creating a composite channel - (Switch) Channel multiplexing - (Multiplexer) (PA may be absent in a LAN)


    6 Main characteristics of communication lines Throughput (Protocol) Reliability of data transmission (Protocol) Propagation delay Amplitude-frequency response (AFC) Bandwidth Attenuation Noise immunity Crosstalk at the near end of the line Unit cost






    9 Attenuation A – one point on the frequency response A= log 10 Pout/Pin Bel A=10 log 10 Pout/Pin deciBel (dB) A=20 log 10 Uout/Uin deciBel (dB) q Example 1: Pin = 10 mW, Pout =5 mW Attenuation = 10 log 10 (5/10) = 10 log 10 0.5 = - 3 dB q Example 2: UTP cat 5 Attenuation >= -23.6 dB F= 100 MHz, L= 100 M Typically A is indicated for the fundamental frequency of the signal = -23.6 dB F= 100 MHz, L= 100 M Typically A is indicated for the main signal frequency">




    11 Noise immunity Fiber optic lines Cable lines Wired overhead lines Radio lines (Shielding, twisting) Immunity to external interference Immunity to internal interference Near-end crosstalk attenuation (NEXT) Far-end crosstalk attenuation (FEXT) (FEXT - Two pairs in one direction)


    12 Near End Cross Talk loss – NEXT For multi-pair cables NEXT = 10 log Pout/Pin dB NEXT = NEXT (L) UTP 5: NEXT


    13 Reliability of data transmission Bit Error Rate – BER Probability of data bit corruption Causes: external and internal interference, narrow bandwidth Struggle: increasing noise immunity, reducing NEXT interference, expanding bandwidth Twisted pair BER ~ Fiber optic cable BER ~ No additional means of protection:: corrective codes, protocols with repetition






    16 Twisted pair Twisted Pair (TP) foil screen braided wire screen insulated wire outer sheath UTP Unshielded Twisted Pair category 1, UTP cat pairs in sheath STP Shielded Twisted Pair Types Type 1…9 Each pair has its own screen Each pair has its own step twists, your own color Noise immunity Cost Laying complexity




    18 Fiber Optics Total internal reflection of a beam at the interface of two media n1 > n2 - (refractive index) n1 n2 n2 - (refractive index) n1 n2"> n2 - (refractive index) n1 n2"> n2 - (refractive index) n1 n2" title="18 Fiber Optics Total internal reflection of a beam at the boundary of two media n1 > n2 - (refractive index) n1 n2"> title="18 Fiber Optics Total internal reflection of a beam at the interface of two media n1 > n2 - (refractive index) n1 n2"> !}








    22 Fiber optic cable Multi Mode Fiber MMF50/125, 62.5/125, Single Mode FiberSMF8/125, 9.5/125 D = 250 µm 1 GHz – 100 km BaseLH5000 km - 1 Gbit/s (2005) MMSM


    23 Optical signal sources Channel: source - carrier - receiver (detector) Sources LED (Light Emitting Diode) nm incoherent source - MMF Semiconductor laser coherent source - SMF - Power = f (t o) Detectors Photodiodes, pin diodes, avalanche diodes




    25 Structured cabling systems - SCS Structured Cabling System - SCS The first LANs - various cables and topologies Unification of the SCS cable system - open LAN cabling infrastructure (subsystems, components, interfaces) - independence from network technology - LAN cables, TV, security systems, etc. p. - universal cabling without reference to a specific network technology -Konstruktor




    27 SCS standards (main) EIA/TIA-568A Commercial Building Telecommunications Wiring Standard (USA) CENELEC EN50173 Performance Requirements of Generic Cabling Schemes (Europe) ISO/IEC IS Information Technology - Generic cabling for customer premises cabling For each subsystem: Data transmission medium . Topology Allowable distances (cable lengths) User connection interface. Cables and connecting equipment. Throughput (Performance). Installation practice (Horizontal subsystem - UTP, star, 100 m...)


    28 Wireless Communications Wireless Transmission Advantages: convenience, inaccessible areas, mobility. rapid deployment... Disadvantages: high level of interference (special means: codes, modulation...), difficulty in using some ranges Communication line: transmitter - medium - receiver LAN characteristics ~ F(Δf, fн);









    34 2. Cellular telephony Dividing the territory into cells Reuse of frequencies Low power (dimensions) In the center - Europe base station - Global System for Mobile - GSM Wireless telephone communication 1. Low-power radio station - (handset-base, 300m) DECT Digital European Cordless Telecommunication Roaming - switching from one core network to another - the basis of cellular communications


    35 Satellite communications Based on a satellite (reflector-amplifier) ​​Transceivers - transponders H~50 MHz (1 satellite ~ 20 transponders) Frequency ranges: C. Ku, Ka C - Down 3.7 - 4.2 GHz Up 5.925-6.425 GHz Ku - Down 11.7-12.2 GHz Up 14.0-14.5 GHz Ka - Down 17.7-21.7 GHz Up 27.5-30.5 GHz


    36 Satellite communications. Types of satellites Satellite communications: microwave - line of sight Geostationary Large coverage Fixed, Low wear Repeater satellite, broadcast, low cost, cost does not depend on distance, Instant connection establishment (Mil) Tz=300ms Low security, Initially large antenna (but VSAT) Mid-orbit km Global Positioning System GPS - 24 satellites Low-orbit km low coverage low latency Internet access


    40 Spread Spectrum Techniques Special Modulation and Coding Techniques for Wireless Communications C (Bit/s) = Δ F (Hz) * log2 (1+Ps/P N) Power Reduction Noise Immunity Stealth OFDM, FHSS (, Blue-Tooth), DSSS, CDMA

    Physical layer deals with the actual transmission of raw bits over

    communication channel.

    Data transfer in computer networks from one computer to another is carried out sequentially, bit by bit. Physically, data bits are transmitted over data links in the form of analog or digital signals.

    The set of means (communication lines, data transmission and reception equipment) used to transmit data in computer networks is called a data transmission channel. Depending on the form of transmitted information, data transmission channels can be divided into analog (continuous) and digital (discrete).

    Since data transmission and reception equipment works with data in discrete form (i.e., discrete electrical signals correspond to ones and zeros of data), when transmitting them through an analog channel, conversion of discrete data to analog (modulation) is required.

    When receiving such analog data, an inverse conversion is required - demodulation. Modulation/demodulation – processes of converting digital information into analog signals and vice versa. During modulation, information is represented by a sinusoidal signal of the frequency that the data transmission channel transmits well.

    Modulation methods include:

    · amplitude modulation;

    · frequency modulation;

    · phase modulation.

    When transmitting discrete signals via a digital data channel, coding is used:

    · potential;

    · pulsed.

    Thus, potential or pulse coding is used on high quality channels, and modulation based on sine waves is preferable in cases where the channel introduces severe distortion into the transmitted signals.

    Typically, modulation is used in wide area networks to transmit data over analog telephone links, which were designed to carry voice in analog form and are therefore not well suited to transmit pulses directly.

    Depending on the synchronization methods, data transmission channels of computer networks can be divided into synchronous and asynchronous. Synchronization is necessary so that the sending data node can transmit some signal to the receiving node so that the receiving node knows when to start receiving incoming data.

    Synchronous data transmission requires an additional communication line to transmit clock pulses. The transmission of bits by the transmitting station and their reception by the receiving station is carried out at the moments of the appearance of clock pulses.

    For asynchronous data transfer, no additional communication line is required. In this case, data transmission is carried out in fixed-length blocks (bytes). Synchronization is carried out by additional bits (start bits and stop bits), which are transmitted before and after the transmitted byte.

    When exchanging data between computer network nodes, three data transfer methods are used:

    simplex (unidirectional) transmission (television, radio);

    half-duplex (reception/transmission of information is carried out alternately);

    duplex (bidirectional), each node simultaneously transmits and receives data (for example, telephone conversations).

    | next lecture ==>

    Two main types of physical encoding are used - based on a sinusoidal carrier signal (analog modulation) and based on a sequence of rectangular pulses (digital encoding).

    Analog modulation - for transmitting discrete data over a channel with a narrow bandwidth - telephone networks voice-frequency channel (bandwidth from 300 to 3400 Hz) A device that performs modulation and demodulation - a modem.

    Analog modulation methods

    n amplitude modulation (low noise immunity, often used in conjunction with phase modulation);

    n frequency modulation (complex technical implementation, usually used in low-speed modems).

    n phase modulation.

    Modulated signal spectrum

    Potential code- if discrete data is transmitted at a speed of N bits per second, then the spectrum consists of a constant component of zero frequency and an infinite series of harmonics with frequencies f0, 3f0, 5f0, 7f0, ..., where f0 = N/2. The amplitudes of these harmonics decrease slowly - with coefficients of 1/3, 1/5, 1/7, ... from the amplitude f0. The spectrum of the resulting potential code signal when transmitting arbitrary data occupies a band from a certain value close to 0 to approximately 7f0. For a voice frequency channel, the upper limit of the transmission rate is achieved for a data transfer rate of 971 bits per second, and the lower limit is unacceptable for any speed, since the channel bandwidth starts at 300 Hz. That is, potential codes are not used on voice frequency channels.

    Amplitude modulation- the spectrum consists of a sinusoid of the carrier frequency fc and two side harmonics fc+fm and fc-fm, where fm is the frequency of change of the information parameter of the sinusoid, which coincides with the data transmission rate when using two amplitude levels. The fm frequency determines the line capacity for a given coding method. With a small modulation frequency, the signal spectrum width will also be small (equal to 2fm), and the signals will not be distorted by the line if the bandwidth is greater than or equal to 2fm. For a voice frequency channel, this method is acceptable at a data transfer rate of no higher than 3100 / 2 = 1550 bits per second.



    Phase and frequency modulation- the spectrum is more complex, but symmetrical, with a large number of rapidly decreasing harmonics. These methods are suitable for transmission over a voice frequency channel.

    Quadrate Amplitude Modulation - phase modulation with 8 phase shift values ​​and amplitude modulation with 4 amplitude values. Not all 32 signal combinations are used.

    Digital coding

    Potential codes– to represent logical ones and zeros, only the value of the signal potential is used, and its drops, which formulate completed pulses, are not taken into account.

    Pulse codes– represent binary data either as pulses of a certain polarity, or as part of a pulse - as a potential difference in a certain direction.

    Requirements for the digital coding method:

    At the same bit rate, it had the smallest spectrum width of the resulting signal (a narrower signal spectrum makes it possible to achieve a higher data transfer rate on the same line; there is also a requirement for the absence of a constant component, that is, the presence of a direct current between the transmitter and the receiver);

    Provided synchronization between the transmitter and the receiver (the receiver must know exactly at what point in time to read the necessary information from the line, in local systems - clock lines, in networks - self-synchronizing codes, the signals of which carry instructions for the transmitter about at what point in time it is necessary to carry out recognition of the next bit);

    Possessed the ability to recognize mistakes;

    It had a low cost of implementation.

    Potential code without returning to zero. NRZ (Non Return to Zero). The signal does not return to zero during the clock cycle.

    It is easy to implement, has good error recognition due to two sharply different signals, but does not have the property of synchronization. When transmitting a long sequence of zeros or ones, the signal on the line does not change, so the receiver cannot determine when the data needs to be read again. Another disadvantage is the presence of a low-frequency component, which approaches zero when transmitting long sequences of ones and zeros. The code is rarely used in its pure form; modifications are used. Attractiveness – low frequency of the fundamental harmonic f0 = N /2.

    Bipolar coding method with alternative inversion. (Bipolar Alternate Mark Inversion, AMI), modification of the NRZ method.

    To encode zero, a zero potential is used, a logical unit is encoded either by a positive potential or a negative one, with the potential of each subsequent unit being opposite to the potential of the previous one. Partially eliminates the problems of constant component and lack of self-synchronization. In the case of transmitting a long sequence of units, a sequence of multi-polar pulses with the same spectrum as the NRZ code transmitting a sequence of alternating pulses, that is, without a constant component and a fundamental harmonic N/2. In general, the use of AMI results in narrower spectrum than NRZ and therefore higher link capacity. For example, when transmitting alternating zeros and ones, the fundamental harmonic f0 has a frequency of N/4. It is possible to recognize erroneous transmissions, but to ensure reliable reception it is necessary to increase the power by about 3 dB, since signal level adjustments are used.

    Potential code with inversion at one. (Non Return to Zero with ones Inverted, NRZI) AMI-like code with two signal levels. When transmitting a zero, the potential of the previous cycle is transmitted, and when transmitting a one, the potential is inverted to the opposite. The code is convenient in cases where the use of the third level is not desirable (optical cable).

    Two methods are used to improve AMI, NRZI. The first is adding redundant units to the code. The property of self-synchronization appears, the constant component disappears and the spectrum narrows, but the useful throughput decreases.

    Another method is to “mix” the initial information so that the probability of the appearance of ones and zeros on the line becomes close - scrambling. Both methods are logical coding, since they do not determine the shape of the signals on the line.

    Bipolar pulse code. One is represented by a pulse of one polarity, and zero by another. Each pulse lasts half a beat.

    The code has excellent self-synchronizing properties, but when transmitting a long sequence of zeros or ones, there may be a constant component. The spectrum is wider than that of potential codes.

    Manchester code. The most common code used in Ethernet networks is Token Ring.

    Each measure is divided into two parts. Information is encoded by potential drops that occur in the middle of a clock cycle. A one is encoded by a drop from a low signal level to a high one, and a zero is coded by a reverse drop. At the beginning of each clock cycle, a service signal drop may occur if several ones or zeros need to be represented in a row. The code has excellent self-synchronizing properties. The bandwidth is narrower than that of a bipolar pulse; there is no constant component, and the fundamental harmonic in the worst case has a frequency of N, and in the best - N/2.

    Potential code 2B1Q. Every two bits are transmitted in one clock cycle by a four-state signal. 00 - -2.5 V, 01 - -0.833 V, 11 - +0.833 V, 10 - +2.5 V. Additional means are required to deal with long sequences of identical bit pairs. With random alternation of bits, the spectrum is twice as narrow as that of NRZ, since at the same bit rate the clock cycle duration is doubled, that is, it is possible to transmit data over the same line twice as fast as using AMI, NRZI , but you need more transmitter power.

    Logic coding

    Designed to improve potential codes such as AMI, NRZI, 2B1Q, replacing long sequences of bits leading to a constant potential with interspersed units. Two methods are used - redundant coding and scrambling.

    Redundant codes are based on breaking the original sequence of bits into portions, which are often called symbols, after which each original symbol is replaced by a new one that has more bits than the original.

    The 4B/5B code replaces sequences of 4 bits with sequences of 5 bits. Then, instead of 16 bit combinations, you get 32. Of these, 16 are selected that do not contain a large number of zeros, the rest are considered forbidden codes (code violation). In addition to eliminating the DC component and making the code self-synchronizing, redundant codes allow the receiver to recognize corrupted bits. If the receiver receives prohibited codes, it means that the signal has been distorted on the line.

    This code is transmitted over the line using physical encoding using a potential encoding method that is sensitive only to long sequences of zeros. The code guarantees that there will not be more than three zeros in a row on the line. There are other codes, such as 8B/6T.

    To ensure a given throughput, the transmitter must operate at a higher clock frequency (for 100 Mb/s - 125 MHz). The signal spectrum expands compared to the original one, but remains narrower than the Manchester code spectrum.

    Scrambling - mixing data with a scrambler before transmission from the line.

    Scrambling methods involve bit-by-bit calculation of the result code based on the bits of the source code and the bits of the result code obtained in previous clock cycles. For example,

    B i = A i xor B i -3 xor B i -5 ,

    where B i is the binary digit of the resulting code obtained at the i-th clock cycle of the scrambler, A i is the binary digit of the source code received at the i-th clock cycle at the input of the scrambler, B i -3 and B i -5 are the binary digits of the resulting code , obtained in previous cycles of work.

    For the sequence 110110000001, the scrambler will give 110001101111, that is, there will be no sequence of six consecutive zeros.

    After receiving the resulting sequence, the receiver will transmit it to the descrambler, which will apply the inverse transformation

    C i = B i xor B i-3 xor B i-5 ,

    Different scrambling systems differ in the number of terms and the shift between them.

    There are simpler methods of dealing with sequences of zeros or ones, which are also classified as scrambling methods.

    To improve Bipolar AMI the following are used:

    B8ZS (Bipolar with 8-Zeros Substitution) – corrects only sequences consisting of 8 zeros.

    To do this, after the first three zeros, instead of the remaining five, he inserts five signals V-1*-0-V-1*, where V denotes a one signal that is prohibited for a given polarity cycle, that is, a signal that does not change the polarity of the previous one, 1* - the one signal is of the correct polarity, and the asterisk sign marks the fact that in the source code there was not a one in this clock cycle, but a zero. As a result, at 8 clock cycles the receiver observes 2 distortions - it is very unlikely that this happened due to noise on the line. Therefore, the receiver considers such violations to be an encoding of 8 consecutive zeros. In this code, the constant component is zero for any sequence of binary digits.

    The HDB3 code corrects any four consecutive zeros in the original sequence. Every four zeros are replaced by four signals, in which there is one V signal. To suppress the DC component, the polarity of the V signal is alternated in successive replacements. In addition, two patterns of four-cycle codes are used for replacement. If before replacement the source code contained an odd number of units, then the sequence 000V is used, and if the number of units was even, the sequence 1*00V is used.

    Improved potential codes have a fairly narrow bandwidth for any sequences of zeros and ones that occur in the transmitted data.

    Information transmitted over a communication line is usually subject to special coding, which helps to increase the reliability of transmission. In this case, additional hardware costs for encoding and decoding are inevitable, and the cost of network adapters increases.

    Coding of information transmitted over a network is related to the relationship between the maximum permissible transmission speed and the throughput of the transmission medium used. For example, with different codes, the maximum transmission speed over the same cable may differ by a factor of two. The complexity of network equipment and the reliability of information transmission also directly depend on the selected code.

    To transmit discrete data over communication channels, two methods of physical encoding of the original discrete data are used - based on a sinusoidal carrier signal and based on a sequence of rectangular pulses. The first method is often called analog modulation, because coding is carried out by changing the parameters of the analog signal (amplitude, phase, frequency). The second method is called digital coding. Currently, data in analog form (speech, television images) is transmitted over communication channels in discrete form. The process of representing analog information in discrete form is called discrete modulation.

    5.1Analog modulation

    The representation of discrete data as a sinusoidal signal is called analog modulation. Analog modulation allows information to be represented as a sinusoidal signal with different levels of amplitude, or phase, or frequency. You can also use combinations of changing parameters - amplitude and frequency, amplitude-phase. For example, if you generate a sinusoidal signal with four amplitude levels and four frequency levels, this will give 16 states of the information parameter, which means 4 bits of information per change.

    There are three main methods of analog modulation:

      amplitude,

      frequency,

    Amplitude modulation (AM) With amplitude modulation, one amplitude level of the carrier frequency sine wave is selected for a logical one, and another level for a logical zero (see Fig. 5.1). The signal frequency remains constant. This method is rarely used in its pure form in practice due to low noise immunity, but is often used in combination with another type of modulation - phase modulation.

    Rice. 5.1 Different types of modulation

    Frequency modulation. ( World Cup) With frequency modulation, the values ​​of logical 0 and logical 1 of the source data are transmitted as sinusoids with different frequencies - f 1 and f 2 (see Fig. 5.1). The signal amplitude remains constant. This modulation method does not require complex circuitry in modems and is usually used in low-speed modems.

    Phase modulation. (FM) With phase modulation, logical values ​​0 and 1 correspond to signals of the same frequency, but with different phases (inverted), for example, 0 and 180 degrees or 0.90,180 and 270 degrees. The resulting signal looks like a sequence of inverted sinusoids (see Fig. 5.1). The amplitude and frequency of the signal remain constant.

    To increase the transmission speed (increase the number of bits per cycle of an information parameter), combined modulation methods are used. The most common methods quadrature amplitude modulation (Quadrature Amplitude Modulation, QAM). These methods use a combination of phase modulation with 8 phase shift values ​​and amplitude modulation with 4 amplitude levels. With this method, 32 signal combinations are possible. And although not all of them are used, the speed still increases significantly, and due to redundancy, errors during data transmission can be controlled. For example, in some codes, only 6, 7 or 8 combinations are allowed to represent the original data, and the remaining combinations are prohibited. Such coding redundancy is required for the modem to recognize erroneous signals resulting from distortions due to interference, which on telephone channels, especially dial-up ones, are very significant in amplitude and long-lasting in time.

    Let's determine on which lines analog modulation can work, and to what extent this method satisfies the throughput of a particular transmission line used, for which we consider the spectrum of the resulting signals. For example, let's take the amplitude modulation method. The spectrum of the resulting signal during amplitude modulation will consist of a sinusoid of the carrier frequency f With and two side harmonics:

    (f With -f m ) And (f With +f m ), Where f m- modulation frequency (changes in the information parameter of the sinusoid), which will coincide with the data transfer rate if two amplitude levels are used.

    Rice. 5.2 Signal spectrum with amplitude modulation

    Frequency f m determines the line capacity for a given coding method. At a low modulation frequency, the signal spectrum width will also be small (equal to 2f m see Fig. 5.2), so the signals will not be distorted by the line if its bandwidth is greater than or equal to 2f m .

    Thus, with amplitude modulation, the resulting signal has a narrow spectrum.

    With phase and frequency modulation, the signal spectrum is more complex than with amplitude modulation, since more than two side harmonics are formed here, but they are also symmetrically located relative to the main carrier frequency, and their amplitudes quickly decrease. Therefore, these types of modulation are also well suited for transmitting data over lines with narrow bandwidths. A typical representative of such lines is the voice frequency channel provided to users of public telephone networks.

    From the typical amplitude-frequency response of a voice-frequency channel, it can be seen that this channel transmits frequencies in the range from 300 to 3400 Hz, and thus its bandwidth is equal to 3100 Hz (see Fig. 5.3).

    Rice. 5.3 Frequency response of the voice frequency channel

    Although the human voice has a much wider range - from approximately 100 Hz to 10 kHz - for acceptable speech quality, the 3100 Hz range is a good solution. Strict limitation of voice channel bandwidth is associated with the use of multiplexing and channel switching equipment in telephone networks.

    Thus, for a voice-frequency channel, amplitude modulation provides a data transfer rate of no more than 3100/2=1550bit/s. If you use several levels of information parameter (4 amplitude levels), then the throughput of the voice frequency channel is doubled.

    Most often, analog coding is used when transmitting information over a channel with a narrow bandwidth, for example, over telephone lines in global networks. It is rarely used in local networks due to the high complexity and cost of both encoding and decoding equipment.

    Currently, almost all equipment that works with analog signals is developed on the basis of expensive microcircuits DSP (Digital Signal Processor). In this case, after modulating and transmitting the signal, it is necessary to carry out demodulation during reception, and this is again expensive equipment. To perform the function of carrier sinusoid modulation on the transmitting side and demodulation on the receiving side, a special device is used, which is called modem (modulator-demodulator). A 56,000 bps modem costs $100, and a 100 Mbps network card costs $10.

    In conclusion, we present the advantages and disadvantages of analog modulation.

      Analog modulation has many different information parameters: amplitude, phase, frequency. Each of these parameters can take on several states per change in the carrier signal. And hence the resulting signal can transmit a large number of bits per second.

      Analog modulation provides a resulting signal with a narrow spectrum, and therefore it is good where it is necessary to work on poor lines (with a narrow bandwidth), it is capable of providing high transmission rates there. Analog modulation can also work on good lines; another advantage of analog modulation is especially important here - the ability to shift the spectrum to the desired area, depending on the bandwidth of the line used.

      Analog modulation is difficult to implement and the equipment that does this is very expensive.

      Analog modulation is used where it cannot be avoided, but in local networks other coding methods are used, the implementation of which requires simple and cheap equipment. Therefore, most often in local networks when transmitting data over communication lines, the second physical encoding method is used - digital encoding

    5. 2.Digital coding

    Digital coding- presentation of information by rectangular pulses. For digital coding use potential And pulse codes.

    Potential codes. In potential codes, only the value of the signal potential during a clock period is used to represent logical ones and zeros, and its drops that form completed pulses are not taken into account. The only thing that matters is what value the resulting signal has during the clock period.

    Pulse codes. Pulse codes represent logical zero and logical one either as pulses of a certain polarity, or as part of a pulse - a potential difference in a certain direction. The value of the pulse code includes the entire pulse along with its drops.

    Let's determine the requirements for digital coding. For example, we need to transfer discrete data (a sequence of logical zeros and ones) from the output of one computer - the source - to the input of another computer - the receiver via a communication line.

    1. To transmit data, we have communication lines that do not pass all frequencies; they have certain capacities depending on their type. Therefore, when encoding data, it is necessary to take into account that the encoded data is “passed” by the communication line.

    2. Sequences of discrete data must be encoded in the form of digital pulses of a certain frequency. In this case, of course, it is best to achieve:

    a) that the frequencies of the encoded signals be kept low to generally match the bandwidths of the communication links.

    b) that the encoded signals provide a high transmission rate.

    So good code should have less Hertz and more bits per second.

    3. The data that needs to be transmitted is an unpredictably changing sequence of logical zeros and ones.

    Let us encode this data with digital pulses in a certain way, how can we determine what frequency the resulting signal has? In order to determine the maximum frequency of a digital code, it is enough to consider the resulting signal when encoding private sequences such as:

      sequence of logical zeros

      sequence of logical ones

      alternating sequence of logical zeros and ones

    Next, it is necessary to decompose the signal using the Fourier method, find the spectrum, determine the frequencies of each harmonic and find the total frequency of the signal; it is important that the main spectrum of the signal falls within the bandwidth of the communication line. In order not to do all these calculations, it is enough to try to determine the fundamental harmonic of the signal spectrum; to do this, it is necessary to guess the first sinusoid from the signal shape, which follows its contour of its shape, then find the period of this sinusoid. Period is the distance between two signal changes. Then you can determine the frequency of the fundamental harmonic of the signal spectrum as F = 1/T, Where F- frequency, T- signal period. For the convenience of further calculations, we assume that the bit rate of change of the signal is equal to N.

    Such calculations can be made for each digital encoding method to determine the frequency of the resulting signal. The resulting signal in digital coding is a specific sequence of rectangular pulses. To represent a sequence of rectangular pulses as a sum of sinusoids to find the spectrum, a large number of such sinusoids are needed. The spectrum of a sequence of square wave signals will, in general, be much wider than that of modulated signals.

    If we apply a digital code to transmit data on a voice-frequency channel, then the upper limit for potential coding is achieved for a data transfer rate of 971 bps, and the lower limit is unacceptable for any speed, since the channel bandwidth starts at 300 Hz.

    That's why digital codes on voice-frequency channels they are simply never used. But they work very well in local networks that do not use telephone lines for data transmission.

    Thus, Digital encoding requires a wide bandwidth for high-quality transmission.

    4. When transmitting information over communication lines from a source node to a receiver node, it is necessary to ensure such a transmission mode in which the receiver will always know exactly at what point in time it receives data from the source, i.e. it is necessary to ensure synchronization source and receiver. In networks, the problem of synchronization is more difficult to solve than when exchanging data between blocks inside a computer or between a computer and a printer. At short distances, a scheme based on a separate clock communication line works well. In such a scheme, information is removed from the data line only at the moment the clock pulse arrives (see Fig. 5.4).

    Rice. 5.4 Synchronization of receiver and transmitter over short distances

    This synchronization option is absolutely not suitable for any network due to the heterogeneity of the characteristics of the conductors in the cables. Over long distances, uneven signal propagation speed can cause the clock pulse to arrive so late or before the corresponding data signal that the data bit is skipped or read again. Another reason why networks refuse to use clock pulses is the saving of conductors in expensive cables. Therefore, networks use so-called self-synchronizing codes.

    Self-timed codes- signals that carry instructions for the receiver at what point in time it is necessary to recognize the next bit (or several bits, if the code is focused on more than two signal states). Any sudden change in signal - the so-called front- can serve as a good indication for synchronizing the receiver with the transmitter. An example of a self-timed code would be a sine wave. Since changing the amplitude of the carrier frequency allows the receiver to determine the moment the input code appears. But this applies to analog modulation. There are also techniques in digital coding that create self-timed codes, but more on that later.

    Thus, a good digital code should ensure synchronization

    Having considered the requirements for a good digital code, let's move on to considering the digital coding methods themselves

    5. 2.1 Potential code without returning to zero NRZ

    This code got its name because when transmitting a sequence of ones, the signal does not return to zero during the clock cycle (as we will see below, in other encoding methods a return to zero occurs in this case).

    Code NRZ (Non Return to Zero)- without returning to zero - this is the simplest two-level code. The resulting signal has two potential levels:

    Zero corresponds to the lower level, one to the upper level. Information transitions occur at bit boundaries.

    Let's consider three special cases of data transmission by code NRZ: an alternating sequence of zeros and ones, a sequence of zeros and a sequence of ones (see Fig. 5.5, a).

    Rice. 5.5 NRZ code

    Let's try to determine whether this code satisfies the listed requirements. To do this, it is necessary to determine the fundamental harmonic of the spectrum during potential coding in each of the presented cases in order to more accurately determine which NRZ code has requirements for the communication line used.

    The first case - information is transmitted consisting of an infinite sequence of alternating ones and zeros (see Fig. 5.5,b).

    This figure shows that when alternating ones and zeros, two bits 0 and 1 will be transmitted in one clock cycle. With the sinusoid shape shown in Fig. 4.22, b When N- bit rate of transmission, the period of this sinusoid is equal to T=2N. The fundamental harmonic frequency in this case is equal to f 0 = N/2.

    As you can see, with such a sequence of this code, the data transmission speed is twice the signal frequency.

    When transmitting sequences of zeros and ones, the resulting signal is a direct current, the frequency of the signal change is zero f 0 = 0 .

    The spectrum of the actual signal is constantly changing depending on what data is transmitted over the communication line and one should be wary of transmissions of long sequences of zeros or ones, which shift the signal spectrum towards lower frequencies. Because The NRZ code has a constant component when transmitting long sequences of zeros or ones.

    From signal theory it is known that in addition to the width requirements, another very important requirement is put forward for the spectrum of the transmitted signal - absence of constant component(the presence of direct current between the receiver and transmitter), because the use of various transformer junctions the communication line does not allow direct current to pass through.

    Consequently, some information will simply be ignored by this communication line. Therefore, in practice, they always try to get rid of the presence of a constant component in the spectrum of the carrier signal already at the encoding stage.

    Thus, we have identified another requirement for a good digital code the digital code should not have a constant component.

    Another disadvantage of NRZ is - lack of synchronization. In this case, only additional synchronization methods will help, which we will talk about later.

    One of the main advantages of the NRZ code is its simplicity. In order to generate rectangular pulses, two transistors are needed, and complex microcircuits are needed to implement analog modulation. The potential signal does not need to be encoded and decoded, since the same method is used to transmit data within a computer.

    As a result of everything shown above, we will draw several conclusions that will help us when considering other digital encoding methods:

      NRZ is very easy to implement and has good error recognition (due to two sharply different potentials).

      NRZ has a DC component when transmitting zeros and ones, which makes it impossible to transmit in lines with transformer isolations.

      NRZ is not a self-timed code and this makes it difficult to transmit on any line.

    The attractiveness of the NRZ code, which makes it worthwhile to improve it, is the fairly low frequency of the fundamental harmonic fо, which is equal to N/2 Hz, as shown above. So the code NRZ operates at low frequencies from 0 to N/2 Hz.

    As a result, the NRZ code in its pure form is not used in networks. However, its various modifications are used, which successfully eliminate both the poor self-synchronization of the NRZ code and the presence of a constant component.

    The following digital encoding methods have been developed with the goal of somehow improving the capability of the NRZ code

    5. 2.2. Bipolar coding method with alternative inversion AMI

    Bipolar Alternate Mark Inversion (AMI) method is a modification of the NRZ method.

    This method uses three potential levels - negative, zero and positive. Three signal levels are a disadvantage of the code because in order to distinguish between three levels a better signal-to-noise ratio is needed at the input to the receiver. The additional layer requires an increase in transmitter power of approximately 3 dB to provide the same bit fidelity on the line, which is a common disadvantage of multi-state codes compared to two-level codes. In the AMI code, a zero potential is used to encode a logical zero, a logical one is encoded either by a positive potential or by a negative one, with the potential of each new unit being opposite to the potential of the previous one.

    Rice. 5.6 AMI code

    This coding technique partially eliminates the problems of constant component and lack of self-synchronization inherent in the NRZ code when transmitting long sequences of units. But the problem of the constant component when transmitting sequences of zeros remains for him (see Fig. 5.6).

    Let's consider special cases of the code and determine the fundamental harmonic of the spectrum of the resulting signal for each of them. With a sequence of zeros - signal - direct current - fo = 0 (Fig. 5.7a)

    Rice. 5.7 Determination of the main spectrum frequencies for AMI

    For this reason, the AMI code also requires further improvement. When transmitting a sequence of ones, the signal on the line is a sequence of multi-polar pulses with the same spectrum as the NRZ code, transmitting alternating zeros and ones, that is, without a constant component and with a fundamental harmonic fo = N/2 Hz.

    When transmitting alternating ones and zeros, the fundamental harmonic fo = N/4 Hz, which is half that of the NRZ code.

    In general, for different bit combinations on a line, using the AMI code results in a narrower signal spectrum than the NRZ code, and therefore higher line capacity. The AMI code also provides some capabilities for recognizing erroneous signals. Thus, a violation of the strict alternation of signal polarity indicates a false pulse or the disappearance of a correct pulse from the line. A signal with incorrect polarity is called a prohibited signal. (signal violation).

    The following conclusions can be drawn:

      AMI eliminates the DC component when transmitting a sequence of ones;

      AMI has a narrow spectrum - from N/4 - N/2;

      AMI partially eliminates synchronization problems

      AMI uses not two, but three signal levels on the line and this is its drawback, but the following method managed to eliminate it.

    5. 2.3 Potential code with inversion with NRZI unit

    This code is completely similar to the AMI code, but only uses two signal levels. When transmitting a zero, it transmits the potential that was set in the previous cycle (that is, does not change it), and when transmitting a one, the potential is inverted to the opposite one.

    This code is called potential code with inversion at one (Non Return to Zero with ones Inverted, NRZI).

    It is convenient in cases where the use of a third signal level is highly undesirable, for example, in optical cables, where two signal states are consistently recognized - light and darkness.

    Rice. 5.8 NRZI code

    The NRZI code differs in the shape of the resulting signal from the AMI code, but if you calculate the fundamental harmonics for each case, it turns out that they are the same. For a sequence of alternating ones and zeros, the fundamental frequency of the signal fo=N/4.(see Fig. 5.9,a). For a sequence of units - fo=N/2. With a sequence of zeros, the same disadvantage remains fo=0- direct current in the line.

    Rice. 5.9 Determination of the main spectrum frequencies for NRZI

    The conclusions are as follows:

    NRZI - provides the same capabilities as the AMI code, but uses only two signal levels and is therefore more suitable for further development. Disadvantages of NRZI are a constant component with a sequence of zeros, and lack of synchronization during transmission. The NRZI code has become central to the development of more improved coding methods at higher levels.

    5. 2.4 MLT3 code

    Three-level transmission code MLT-3 (Multi Level Transmission - 3) has much in common with the NRZI code. Its most important difference is its three signal levels.

    One corresponds to a transition from one signal level to another. A change in the level of the linear signal occurs only if a one is received at the input, however, unlike the NRZI code, the generation algorithm is chosen in such a way that two adjacent changes always have opposite directions.

    Rice. 5.10 Potential MLT-3 code

    Let's consider special cases, as in all previous examples.

    When transmitting zeros, the signal also has a constant component, the signal does not change - fo = 0 Hz (See Fig.5.10). When transmitting all ones, information transitions are fixed at the bit boundary, and one signal cycle contains four bits. In this case fo=N/4 Hz - maximum code frequency MLT-3 when transferring all units (Fig. 5.11, a).

    Rice. 5.11 Determination of the main spectrum frequencies for MLT-3

    In the case of an alternating sequence, the code MLT-3 has a maximum frequency equal to fo=N/8, which is two times less than the NRZI code, therefore, this code has a narrower bandwidth.

    As you noticed, the disadvantage of the MLT-3 code, like the NRZI code, is the lack of synchronization. This problem is solved with the help of additional data transformation, which eliminates long sequences of zeros and the possibility of desynchronization. The general conclusion can be drawn as follows - the use of three-level coding MLT-3 allows you to reduce the clock frequency of the linear signal and thereby increase the transmission speed.

    5. 2.5 Bipolar pulse code

    In addition to potential codes, pulse codes are also used, when the data is represented by a full pulse or part of it - an edge.

    The simplest case of this approach is bipolar pulse code, in which one is represented by a pulse of one polarity, and zero by another. Each pulse lasts half a beat (Fig. 5.12). Bipolar pulse code is a three-level code. Let's consider the resulting signals when transmitting data using bipolar coding in the same special cases.

    Rice. 5.12 Bipolar pulse code

    A special feature of the code is that there is always a transition (positive or negative) in the center of the bit. Therefore, each bit is labeled. The receiver can extract a clock pulse (strobe), which has a pulse repetition rate, from the signal itself. The binding is performed on each bit, which ensures that the receiver is synchronized with the transmitter. Such codes, which contain a strobe, are called self-synchronizing. Let's consider the spectrum of signals for each case (Fig. 5.13). When transmitting all zeros or ones, the frequency of the fundamental harmonic of the code fo=N Hz, which is two times higher than the fundamental harmonic of the NRZ code and four times higher than the fundamental harmonic of the AMI code. When transmitting alternating ones and zeros - fo=N/2

    Rice. 5.13 Determination of the main spectrum frequencies for a bipolar pulse code.

    This disadvantage of the code does not provide a gain in data transfer speed and clearly indicates that pulsed codes are slower than potential ones.

    For example, to transmit data over a line at a speed of 10 Mbit/s, a carrier signal frequency of 10 MHz is required. When transmitting a sequence of alternating zeros and ones, the speed increases, but not much, because the frequency of the fundamental harmonic of the code is fo=N/2 Hz.

      The bipolar pulse code has a great advantage over previous codes - it is self-synchronizing.

      Bipolar pulse code has a wide signal spectrum and is therefore slower.

      The bipolar pulse code uses three levels.

    5. 2.6 Manchester code

    Manchester code was developed as an improved bipolar pulse code. The Manchester code also refers to self-synchronizing codes, but unlike the bipolar code, it has not three, but only two levels, which provides better noise immunity.

    In the Manchester code, a potential difference, that is, the edge of a pulse, is used to encode ones and zeros. With Manchester encoding, each measure is divided into two parts. Information is encoded by potential drops that occur in the middle of each clock cycle. It happens like this:

    A one is encoded by an edge from a low signal level to a high one, and a zero is encoded by a reverse edge. At the beginning of each clock cycle, an overhead signal drop may occur if you need to represent several ones or zeros in a row.

    Let's consider special cases of coding (sequences of alternating zeros and ones, all zeros, all ones), and then we will determine the fundamental harmonics for each of the sequences (see Fig. 5.14). In all cases, you can see that with Manchester encoding, changing the signal at the center of each bit allows you to easily isolate the clock signal. Therefore, the Manchester code has good self-synchronizing properties.

    Rice. 5.14 Manchester code

    Self-synchronization always makes it possible to transmit large packets of information without loss due to differences in the clock frequencies of the transmitter and receiver.

    So, let's determine the fundamental frequency when transmitting only ones or only zeros.

    Rice. 5.15 Determination of the main spectrum frequencies for the Manchester code.

    As can be seen when transmitting both zeros and ones, there is no constant component. Fundamental frequency fo=NHz, as with bipolar coding. Thanks to this, galvanic isolation of signals in communication lines can be performed in the simplest ways, for example, using pulse transformers. When transmitting alternating ones and zeros, the frequency of the fundamental harmonic is equal to fo=N/2Hz.

    Thus, the Manchester code is an improved bipolar code, improved by using only two signal levels for data transmission, and not three, as in bipolar. But this code is still slow compared to NRZI, which is twice as fast.

    Let's look at an example. Let's take a communication line with bandwidth for data transmission 100 MHz and speed 100 Mbit. If earlier we determined the data rate at a given frequency, now we need to determine the frequency of the signal at a given line speed. Based on this, we determine that to transmit data using the NRZI code, a frequency range from N/4-N/2 is sufficient for us - these are frequencies from 25 -50 MHz, these frequencies are included in the bandwidth of our line - 100 MHz. For the Manchester code, we need a frequency range from N/2 to N - these are frequencies from 50 to 100 MHz, in this range the main harmonics of the signal spectrum are located. For the Manchester code, it does not satisfy the bandwidth of our line, and, therefore, the line will transmit such a signal with large distortions (such a code cannot be used on this line).

    5.2.7Differential Manchester code.

    Differential Manchester code is a type of Manchester encoding. It uses the middle of the linear signal clock interval only for synchronization, and the signal level always changes at it. Logical 0 and 1 are transmitted by the presence or absence of a change in signal level at the beginning of the clock interval, respectively (Fig. 5.16)

    Rice. 5.16 Differential Manchester code

    This code has the same advantages and disadvantages as the Manchester code. But in practice it is the differential Manchester code that is used.

    Thus, the Manchester code used to be very actively used in local networks (when high-speed lines were a great luxury for a local network), due to its self-synchronization and the absence of a constant component. It is still widely used in fiber optic and electrical networks. However, recently developers have come to the conclusion that it is better to use potential coding, eliminating its shortcomings using the so-called logical coding.

    5.2.8Potential code 2B1Q

    Code 2B1Q- potential code with four signal levels for data encoding. Its name reflects its essence - every two bits (2B) transmitted in one clock cycle by a signal having four states (1Q).

    A couple of bits 00 corresponds to potential (-2.5 V), a couple of bits 01 corresponds to potential (-0.833 V), couple 11 - potential (+0.833 V), and a couple 10 - potential ( +2.5 V).

    Rice. 5.17 Potential code 2B1Q

    As can be seen in Figure 5.17, this coding method requires additional measures to deal with long sequences of identical bit pairs, since this turns the signal into a constant component. Therefore, when transmitting both zeros and ones fo=0Hz When alternating ones and zeros, the signal spectrum is twice as narrow as that of the code NRZ, since at the same bit rate the clock duration doubles - fo=N/4Hz.

    Thus, using the 2B1Q code, you can transfer data over the same line twice as fast as using the AMI or NRZI code. However, to implement it, the transmitter power must be higher so that the four potential levels (-2.5V, -0.833 V, +0.833 V, +2.5 V) are clearly distinguished by the receiver against the background of interference.

    5. 2.9 PAM5 code

    All signal encoding schemes we considered above were bit-based. With bit coding, each bit corresponds to a signal value determined by the protocol logic.

    With byte coding, the signal level is determined by two bits or more. In a five-level code PAM 5 5 voltage levels (amplitudes) and two-bit coding are used. Each combination has its own voltage level. With two-bit encoding, four levels are needed to transmit information (two to the second power - 00, 01, 10, 11 ). Transmitting two bits at the same time reduces the frequency of the signal by half. A fifth level is added to create redundancy in the code used to correct errors. This provides additional signal-to-noise ratio reserve.

    Rice. 5.18 PAM code 5

    5. 3. Logic coding

    Logic coding runs until physical coding.

    At the stage of logical coding, the shape of the signals is no longer generated, but the disadvantages of physical digital coding methods are eliminated, such as the lack of synchronization and the presence of a constant component. Thus, first, corrected sequences of binary data are formed using logical coding tools, which are then transmitted over communication lines using physical coding methods.

    Logical coding involves replacing the bits of the original information with a new sequence of bits that carries the same information, but also has additional properties, for example, the ability for the receiving side to detect errors in the received data. Accompanying each byte of source information with one parity bit is an example of a very commonly used logical encoding method when transmitting data using modems.

    There are two logical coding methods:

    Redundant codes

    Scrambling.

    5. 3.1 Redundant codes

    Redundant codes are based on breaking the original bit sequence into chunks, often called symbols. Each original character is then replaced with a new one that has more bits than the original. A clear example of redundant code is 4V/5V logic code.

    Logic code 4V/5V replaces the original 4-bit characters with 5-bit characters. Since the resulting symbols contain redundant bits, the total number of bit combinations in them is greater than in the original ones. Thus, a five-bit scheme produces 32 (2 5) two-digit alphanumeric characters having a decimal value from 00 to 31. While the original data may contain only four bits or 16 (2 4) characters.

    Therefore, in the resulting code you can select 16 such combinations that do not contain a large number of zeros, and count the rest prohibited codes (code violation). In this case, long sequences of zeros are interrupted, and the code becomes self-synchronizing for any data transmitted. The constant component also disappears, which means the signal spectrum narrows even more. But this method reduces the useful capacity of the line, since redundant units of user information are not carried, and only “take up airtime”. Redundant codes allow the receiver to recognize corrupted bits. If the receiver receives an illegal code, it means that the signal has been distorted on the line.

    So let's look at the work logic code 4V/5V. The converted signal has 16 values ​​for information transfer and 16 redundant values. In the receiver decoder, five bits are decoded as information and service signals.

    Nine symbols are allocated for service signals, seven symbols are excluded.

    Combinations with more than three zeros are excluded (01 - 00001, 02 - 00010, 03 - 00011, 08 - 01000, 16 - 10000 ) . Such signals are interpreted by the symbol V and the receiver team VIOLATION- failure. The command indicates an error due to high interference or transmitter failure. The only combination of five zeros (00 - 00000 ) refers to service signals, means symbol Q and has the status QUIET- no signal on the line.

    This data encoding solves two problems - synchronization and improving noise immunity. Synchronization occurs by eliminating sequences of more than three zeros, and high noise immunity is achieved by the data receiver on a five-bit interval.

    The price for these advantages with this method of data encoding is a reduction in the transmission speed of useful information. For example, as a result of adding one redundant bit to four information bits, the efficiency of frequency band use in protocols with code MLT-3 and data encoding 4B/5B decreases accordingly by 25%.

    Coding scheme 4V/5V presented in the table.

    Binary code 4B

    Result code 5B

    So, according to this table, the code is generated 4V/5V, is then transmitted over the line using physical encoding using one of the potential encoding methods sensitive only to long sequences of zeros - for example, using the NRZI digital code.

    The 4B/5B code symbols, 5 bits long, guarantee that no matter how they are combined, more than three zeros in a row cannot appear on the line.

    Letter IN in the name of the code means that the elementary signal has 2 states - from English binary- binary. There are also codes with three signal states, for example, in the code 8V/6T To encode 8 bits of source information, a code of 6 signals is used, each of which has three states. Code redundancy 8V/6T higher than code 4V/5V, since for 256 source codes there are 3 6 = 729 resulting symbols.

    As we said, logical encoding occurs before physical encoding, therefore, it is carried out by network link level equipment: network adapters and interface units of switches and routers. Because, as you have seen, the use of a lookup table is a very simple operation, so the logical redundancy coding method does not complicate the functional requirements for this equipment.

    The only requirement is that to ensure a given line capacity, a transmitter using a redundant code must operate at a higher clock frequency. So, to transmit codes 4V/5V at speed 100 Mb/s the transmitter must operate at a clock frequency 125 MHz. In this case, the spectrum of the signal on the line expands compared to the case when a pure, non-redundant code is transmitted along the line. However, the spectrum of the redundant potential code turns out to be narrower than the spectrum of the Manchester code, which justifies an additional stage of logical coding, as well as operation of the receiver and transmitter at an increased clock frequency.

    Thus, we can draw the following conclusion:

    Basically, for local networks it is simpler, more reliable, better, faster - to use logical data encoding using redundant codes, which will eliminate long sequences of zeros and ensure signal synchronization, then at the physical level use fast digital code for transmission NRZI, rather than using a slow but self-synchronizing device for data transmission without prior logical coding Manchester code.

    For example, to transmit data over a line with a throughput of 100M bit/s and a bandwidth of 100 MHz, the NRZI code requires frequencies of 25 - 50 MHz, this is without 4V/5V coding. And if you use it for NRZI Also 4V/5V encoding, now the frequency band will expand from 31.25 to 62.5 MHz. But nevertheless, this range still “fits” into the line bandwidth. And for the Manchester code, without the use of any additional coding, frequencies from 50 to 100 MHz are required, and these are the frequencies of the main signal, but they will no longer be transmitted by a 100 MHz line.

    5. 3.2 Scrambling

    Another method of logical coding is based on preliminary “mixing” of the original information so that the probability of the appearance of ones and zeros on the line becomes close.

    Devices or blocks that perform such an operation are called scramblers (scramble - dump, disorderly assembly).

    At scrambling the data is mixed according to a certain algorithm and the receiver, having received the binary data, transmits it to descrambler, which restores the original bit sequence.

    In this case, excess bits are not transmitted over the line.

    The essence of scrambling is simply a bit-by-bit change in the data flow passing through the system. Almost the only operation used in scramblers is XOR - "bitwise exclusive OR", or they also say - addition by module 2. When adding two ones by exclusive OR, the highest one is discarded and the result is written as 0.

    The scrambling method is very simple. First they come up with a scrambler. In other words, they come up with a ratio to mix the bits in the original sequence using “exclusive OR”. Then, according to this relationship, the values ​​of certain bits are selected from the current bit sequence and added together XOR among themselves. In this case, all bits are shifted by 1 bit, and the newly received value ("0" or "1") is placed in the freed least significant bit. The value that was in the most significant bit before the shift is added to the encoding sequence, becoming its next bit. This sequence is then output to the line, where, using physical encoding methods, it is transmitted to the receiving node, at the input of which this sequence is descrambled based on the inverse ratio.

    For example, a scrambler might implement the following relation:

    Where Bi- binary digit of the resulting code obtained at the i-th clock cycle of the scrambler, Ai- binary digit of the source code, arriving at the i-th clock cycle at the input of the scrambler, B i-3 and B i-5- binary digits of the resulting code, obtained in the previous clock cycles of the scrambler, respectively 3 and 5 clock cycles earlier than the current clock cycle; - exclusive OR operation (addition modulo 2).

    Now let's define an encoded sequence, for example, for such an initial sequence 110110000001 .

    The scrambler defined above will produce the following result code:

    B 1 = A 1 = 1 (the first three digits of the resulting code will coincide with the original one, since there are no necessary previous digits yet)

    Thus, the sequence will appear at the output of the scrambler 110001101111 . Which does not contain the sequence of six zeros present in the source code.

    After receiving the resulting sequence, the receiver passes it to the descrambler, which reconstructs the original sequence based on the inverse relationship.

    There are various other scrambling algorithms, they differ in the number of terms that give the resulting code digit, and the shift between the terms.

    The main problem with coding based on scramblers - synchronization of transmitting (encoding) and receiving (decoding) devices. If even one bit is omitted or inserted incorrectly, all transmitted information is irreversibly lost. Therefore, in scrambler-based coding systems, great attention is paid to synchronization methods .

    In practice, a combination of two methods is usually used for these purposes:

    a) adding synchronizing bits to the information stream that are known in advance to the receiving side, which allows it, if such a bit is not found, to actively begin searching for synchronization with the sender,

    b) the use of high-precision time pulse generators, which allows, in moments of loss of synchronization, to decode received bits of information “from memory” without synchronization.

    There are simpler methods of dealing with sequences of units, also classified as scrambling.

    To improve the code Bipolar AMI two methods are used, based on artificially distorting the sequence of zeros with prohibited characters.

    Rice. 5. 19 Codes B8ZS and HDB3

    This figure shows the use of the method B8ZS (Bipolar with 8-Zeros Substitution) and method HDB3 (High-Density Bipolar 3-Zeros) to correct the AMI code. The source code consists of two long sequences of zeros (8 in the first case and 5 in the second).

    Code B8ZS corrects only sequences consisting of 8 zeros. To do this, after the first three zeros, instead of the remaining five zeros, he inserts five digits: V-1*-0-V-1*.V here denotes a signal of a unit that is prohibited for a given polarity cycle, that is, a signal that does not change the polarity of the previous unit, 1 * - the unit signal is of the correct polarity, and the asterisk sign marks the fact that in the source code in this clock cycle there was not a unit, but a zero. As a result, at 8 clock cycles the receiver observes 2 distortions - it is very unlikely that this happened due to line noise or other transmission failures. Therefore, the receiver considers such violations to be an encoding of 8 consecutive zeros and, after reception, replaces them with the original 8 zeros.

    The B8ZS code is constructed in such a way that its constant component is zero for any sequence of binary digits.

    Code HDB3 corrects any 4 consecutive zeros in the original sequence. The rules for generating the HDB3 code are more complex than the B8ZS code. Every four zeros are replaced by four signals, in which there is one V signal. To suppress the DC component, the polarity of the signal V alternates with successive replacements.

    In addition, two patterns of four-cycle codes are used for replacement. If before replacement the source code contained an odd number of ones, then the sequence is used 000V, and if the number of ones was even - the sequence 1*00V.

    Thus, the use of logical coding together with potential coding provides the following advantages:

    Improved candidate codes have a fairly narrow bandwidth for any sequences of ones and zeros that occur in the transmitted data. As a result, codes obtained from potential by logical encoding have a narrower spectrum than Manchester, even at an increased clock frequency.