Showing posts with label Fundamentals. Show all posts
Showing posts with label Fundamentals. Show all posts

Voice Digitization Standard: DS0 by Hoang lihuo



  • - Quantization: 256 levels
  • - Sampling: 8,000 samples/second
  • - Coding: 8 bits/sample
  • - “Pulse Code Modulation” (PCM)
  • - 8,000 bytes per second
  • - 64,000 bits/second = 64 kb/s
  • - DS0 rate
    There are three steps in voice digitization: quantization, sampling and coding.
The telephone system quantizes the voice signal to 256 levels. This number is chosen to reduce the quantization error, which would be heard as noise after the signal is reconstructed, so that a person can’t hear it on the line. The diagram shows bin numbers 127 and 128 around zero volts.
The second step is sampling. Since this is a voiceband signal, the frequency bandwidth is about 3000 Hz, and so the sampling rate must be at least 6001 times per second, following the Dr. Nyquist’s sampling theorem. To ensure that there are no aliasing errors, the telephone system samples more often: 8,000 samples per second.
    The third step is coding. The telephone system uses 8 bits to code the value of each sample. This technique of using 8 bits per sample is called by some Pulse Code Modulation (PCM), which doesn’t really mean anything. To determine the number of bits per second required, multiply the number of samples per second (8,000) by the number of bits per sample (8) to get 64,000 bits per second, or 64 kb/s for short. This 64 kb/s rate is called a DS0 rate signal (Digital service level zero, or digital signal rate zero, just called “DS0s” in the business). This is the base rate of most transmission systems and digital voice systems. When someone talks about a channel on a digital transmission system, they usually mean a DS0.
Commercial transmission systems which are actually deployed were designed to carry digitized voice, and thus move multiple DS0s. Since they are digital systems, they can be easily be adapted to carry data or video as well as digitized voice.
    The bottom line: we move a byte (representing the value of the sample) 8,000 times/second from one end to the other, for each voice.

Voice Digitization Principles. by Hoang Lihuo

Voice Digitization Principles

    In this tutorial, we understand how voice is digitized - turned into a stream of 1s and 0s to be communicated over the IP packet-based telecommunications network.

    This is a necessary step for carrying Voice over IP, which is taking over the world, and was used on older channelized SONET and T1 trunk carrier systems.

There are three steps in voice digitization: quantization, sampling and coding:

  • Quantization: Change from continuous in value to discrete in value 
  • Sampling: Change from continuous in time to discrete in time 
  • Coding: Code value of sample into 1s and 0s 

    Quantization is the process of changing from a signal which is continuous in value to a signal which is discrete in value.

    This is accomplished by dividing the possible range of values into a number of "bins" or levels or steps, and assigning a number to each of these levels.

    Then, when asked what the value of the signal is, we say that the signal is "in level #42" rather than measuring its voltage.

    Another example of quantization is sugar cubes. Instead of putting some fractional value of a bag of sugar in your coffee, your choice is "one lump or two".The sugar has been quantized into uniform lumps.


    Sampling is the process of changing the signal from being continuous in time to one that is discrete in time. 


    On a regular basis, we take the value of the signal and record it. The value of the signal is the level number.

    How often do we need to sample the signal?

    A mathematician by the name of Nyquist proved that the signal has to be sampled more than twice as often as the frequency bandwidth of the signal to be able to reproduce it. This is called the Nyquist Rule. 


    Code: The value of the signal taken at each sample (the level number) must be coded into 1's and 0's so that it can be transmitted over a digital carrier system or stored in a computer.

    At the far end, we perform the reverse process: re-creating the analog waveform from the received codes by de-coding the level number, generating a voltage with a value equal to that of the center of the level, and smoothly changing the voltage in this manner as each new code comes down the line.

    The whole point in doing this is to move the analog voice signal from the near-end loop to the far-end loop without adding in any noise.

    There is in fact a small amount of noise added in, up front, as part of the analog-to-digital conversion.

    This is the quantization error, the difference in value between the center of the level, and where the signal actually was.

    How do we make the quantization error smaller on average? Make the levels finer.

    How many levels does the telephone company use? Enough so that a human can't hear the quantization error noise on the line. 

Analog Circuits by Hoang Lihuo


  • Telephones transmit information over copper wires using voltage
  • Voltage is a representation or analog of speaker’s voice
  • “Analog” circuit

The technique for representing information on an ordinary local loop is called analog. This term is often thrown about with little regard for its actual meaning, so we’ll spend a bit of time understanding of what is meant by “analog”.

The term analog comes from the design of the telephone: a microphone in the telephone handset is placed in the path of the sound pressure waves coming out of the speaker’s throat. As the sound pressure waves hit the microphone, they change its electrical characteristics.

We use the fact that the electrical characteristics of the microphone change as the sound pressure waves hit it to make a voltage on the telephone wires change.

This voltage is a representation or analog of the sound pressure waves.

This is all we mean by analog: representation.

The voltage on the wires is an analog of the sound pressure waves coming out of the speaker’s throat.

People then stretch the terminology to call the two copper wires which form the telephone line an analog circuit, which is not very accurate.

It would be more accurate to call the loop "two copper wires that were designed to be able to carry a voltage that is a direct representation of the strength of the sound pressure wave impacting on the microphone".  But that takes a long time to say, so people call them "analog circuits".

Note that the only thing analog in this story is the method for representing information on the copper wires.

We can use digital techniques on the same wires.


Public Switched Telephone Network (PSTN)by Hoang Lihuo.

   The public switched telephone network (PSTN) is the aggregate of the world's circuit-switched telephone networks that are operated by national, regional, or local telephonies operators, providing infrastructure and services for public telecommunication.

     The PSTN consists of telephone lines, fiber optic cable, microwave transmission links, cellular networks, communication satellites, and undersea telephone cables, all interconnected by switching centers, thus allowing most telephones to communicate with each other. Originally a network of fixed-line analog telephone systems, the PSTN is now almost entirely digital in its core network and includes mobile and other networks, as well as fixed telephones. 

    The technical operation of the PSTN adheres to the standards created by the ITU-T. These standards allow different networks in different countries to interconnect seamlessly. The E.163 and E.164 standards provide a single global address space  for telephone numbers. 

    The combination of the interconnected networks and the single numbering plan allow telephones around the world to dial each other. 

    Many communication technologies are based on those used in the Public Switched Telephone Network (PSTN), so regardless of whether you're interested in voice, data or networking, it is important to have an understanding of the structure and operation of the telephone network. 

    We begin with a basic model for the telephone network and will build on it in subsequent discussions. At the top of the diagram, we have a telephone and a telephone switch. The telephone is located in a building called a Customer Premise (CP), and the telephone switch is located in a building called a Central Office (CO). One could refer to the telephone as Customer Premise Equipment (CPE).


Operators:  

    The telephone is connected to the telephone switch with two copper wires, often called a local loop or a subscriber loop, or simply a loop. This a dedicated access circuit from the customer premise into the network. We usually have the same arrangement at the other end, with the far-end telephone in a different customer premise and the far-end telephone switch usually in a different central office.Copper is a good conductor of electricity - but not perfect: it has some resistance to the flow of electricity through it. Because of this, the signals on the loop diminish in intensity or attenuate with distance, and if the loop were too long, you wouldn't be able to hear the other person.The maximum resistance allowed is usually 1300 ohms, which works out to about 18,000 feet or 18 kft, which is 3 miles or 5 km on standard-thickness 26-gauge cable, but could be as long as 14 miles or 22 km on thicker 19-gauge cable.

    Thus, COs traditionally had a serving area of three miles radius around them, about 27 square miles or 75 square kms. With suburban sprawl, we can't build COs every five miles, so in practice, new subdivisions are served from remote switches, which are low-capacity switches in small huts or underground controlled environment vaults. The remote provides telephone service locally on the loops in the subdivision. The remote and the loops are connected back to the nearest CO via fiber or radio. Telephone switches are connected with trunks. While subscriber loops are dedicated access circuits, trunks are shared connections between COs. To establish a connection between one customer premise and another, the desired network address (telephone number) is signaled to the network (to the CO switch or remote) over the loop, then the switch seizes an unused trunk circuit going in the correct direction and the connects the loop to that trunk - for the duration of the call.When one end or the other hangs up, the trunk is released for someone else to connect between those two COs. This method for sharing the trunks is known as circuit switching. It was called dial-up when telephones had rotary dials. It is important to note that even though today there may be digital switching and digital transmission, the last 3 miles / 5 km of the network, the subscriber loop, most often still has its original characteristics, which date back to the late 1800s (!). Voice and data equipment that connects to the PSTN over regular telephone lines must work within the characteristics of the local loop, so an understanding of the characteristics and limitations of the local loop is essential.

Network topology:

The PSTN network architecture had to evolve over the years to support increasing numbers of subscribers, calls, connections to other countries, direct dialing and so on. The model developed by the United States and Canada was adopted by other nations, with adaptations for local markets. 

The original concept was that the telephone exchanges are arranged into hierarchies, so that if a call cannot be handled in a local cluster, it is passed to one higher up for onward routing. This reduced the number of connecting trunks required between operators over long distances and also kept local traffic separate. However, in modern networks the cost of transmission and equipment is lower and, although hierarchies still exist, they are much flatter, with perhaps only two layers.