Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 33

Voice & PCM

Developed for the Cisco Networking Academy Community

1
Content
• Introduction
• Unified Communication Model
• Voice characteristics
• MOS, PESQ
• Sampling, quantization, coding
• Companding
• DSP Functions

2
Unified Communication Model
Endpoints IP Phones
IP Communicator
Applications Unity messaging
Emergency Responder
Unified Customer Contact Solution
Call Control Unified Communications Manager
Infrastructure Routing
Switching
Quality of Service (QoS)
Management
Security

3
Infrastructure
• Data, voice & video on the same hardware

• QoS gives priority to delay-sensitive traffic e.g.


voice

• Security is provided by Access Control List


(ACL) to limit the type of TCP/UDP traffic and
source IP addresses that can access the CM.

4
The Call Control Layer
• Call Manager (CM) resides on this layer.

• Functions provided:
– Call processing
– Call signaling
– Endpoint control
– Dial plan control
– Media resource management
– User management

5
The Applications Layer

• Provide value-added functionality

• Cisco Unity Express (CUE) provides voice mail


capabilities, also integrate with email system to
provide unified messaging features.

• Cisco Emergency Responder provides


information to emergency services when user
dial 995 or 999.

6
The Endpoints Layer

• Where all voice/video communications begin


and end

• The 2 signaling protocols used in this layer are


– SCCP
– SIP

7
Data
• Data tends to demand high bandwidth and bursty in
nature (high bandwidth requirement but over a short
period of time followed by zero usage)

• Generally, delay insensitive (large packets for packet


efficiency)

• Some data e.g. database query is delay sensitive. A


user can tolerate a few seconds delay but beyond that, it
becomes irritating.

• Error intolerance (error detection and correction)

8
Voice

• Voice requires low bandwidth and its demand on


the bandwidth is more evenly spread out.

• Delay sensitive (small packets).

• Can tolerate error (no need for error detection)

9
Properties of Speech
• Wide dynamic range
– From very soft to very loud
– We speak softly most of the time
– Companding is the technique used to accommodate
the wide dynamic range and at the same time maintain
a consistent signal to quantization noise ratio.

• The power attenuates at high frequencies.

• Bandwidth of telephone lines (0.3–3.4kHz)


– As a result: Sample at Nyquist frequency, fs (at least
twice the highest signal frequency)
– fs = 8000 Hz (standard for voice)
10
The Power Spectral Density of Voice

11
Curves of Equal Loudness

http://www.phys.unsw.edu.au/jw/hearing.html

12
Voice Quality Measurements

• Two methods of measurements


- MOS – trained human ear
- PESQ – equipment based

13
Mean Opinion Score (MOS)
• Uses a trained ear to judge the quality of voice.

• Pulse Code Modulation (PCM) score is 4.3


– PCM = Analog-Digital Conversion (ADC)

MOS Meaning
Score
1 Bad
2 Poor
3 Fair
4 Good
5 Excellent

14
PESQ
• Perceptual Evaluation of Speech Quality

• Digitally measures the difference in the original signal


and the signal after it passes through a CODEC.

• Assign the more familiar MOS values. For example, if a


particular CODEC has an MOS score of 4.1, then it
should also have a PESQ value of approximately 4.1.

15
Quality of IP Voice
• Quality of IP voice is determined by
- Delay: one way delay < 150ms
- Jitter: different queuing time
- Packet loss: due to heavy router load

• Design and implementation of VoIP must take into


account:
- Characteristics of the IP network
- Choice of speech codec.
- Codec = coder + decoder

16
Codec

• Digital Signal Processor (DSP) is used to convert analog


waveform to digital for processing. Converting A to D is
to code.

• At the receiver, the digital signal needs to be converted


back to analog waveform to drive the loudspeaker.
Converting D to A is to decode.

• Codec is derived from code and decode

17
How Voice is Coded Digitally for VoIP?
• Waveform Codec
– Companding PCM (Pulse Code Modulation) 64kbps
– ADPCM (Adaptive Differential PCM) 32 kbps

• Vocoder: LPC (Liner Predictive Coding) assumes specific


properties of human voice (e.g. it does not change abruptly) and
uses a more complex algorithm to digitize and compress voice
data. It works well for sending human utterances offering a low
data rate but is not suitable for transmitting music or fax. 8 kbps

• Hybrid coders e.g. CELP (Code Excited Linear Prediction) =


waveform + vocoder technique
– Application: GSM, long distance VoIP

18
Aliasing – Effect of Undersampling

• The alias frequency = sampling frequency – signal frequency


• Similar to the strobing effect:
- Wheels turning in the opposite direction as the car direction in
movies/TV
19
Waveform Encoding
• 8 bit per sample to describe the amplitude

• Bit rate = 8000 x 8 = 64 kbps

• Called Analog-to-Digital Conversion (ADC) in Electronic


Engineering.

• But the same thing is called Pulse Code Modulation


(PCM) in Communication Engineering.

• PCM is the standard against which all other methods are


compared.

20
PCM = Sampling + Quantizing + Encoding

Input Analog Signal

Sampler Switch: sampling


Sample & Hold Capacitor: holding

Discrete in time
Analog in amplitude

Quantizer

Discrete in time
Discrete in amplitude

Encoder

Output PCM Codeword


1’s and 0’s

21
Digitialisation
Switch: sampling Output PCM Codeword
Capacitor: holding 1’s and 0’s

Low Pass Sampler Quantizer Encoder


Filter Sample & Hold
Input Analog
Signal (Voice)
Sample at
8000 Hz for Discrete in time
Discrete in time
Voice Discrete in amplitude
Analog in amplitude

Frequency band
limited analog signal

Digitialisation = Filtering + Sampling + Quantizing + Encoding

22
Sampler is a Multiplier in Time

X
Sampler

23
Sampler is a Multiplier in Time

Input Analog Signal

Discrete in time
Analog in amplitude

24
Sample and Hold

Sampler

Discrete in time
Sample and Hold Analog in amplitude
Pulse Amplitude Modulation (PAM)

25
Quantization

• The amplitude of the sample and hold pulse is analog.

• The quantizer converts the analog amplitude into one of


several discrete amplitude levels (quantization levels).

• The range of the input signal varies from –Vp to +Vp.

• For a n-bit code, there are 2n distinct codes.

• Total number of steps, m = 2n – 1

• Step size is  = 2Vp/m.

26
Transmitter Compandor

Transmitter compandor transfer


characteristics:
Output versus input
characteristics
• Low input signals are
boosted more significantly to
survive the channel.
• Large input signals are also
amplified but to a smaller
extend.
Figure 3.14 Transmitter Analog Compandor
Transfer Characteristics

27
Receiver Compandor
Output
Voltage
The receiver characteristics is
inverse that of the transmitter
∆y
characteristics.

The net effect of the compandor


Input

∆x
Voltage at the transmitter and receiver is
a linear characteristics.

Figure 3.15 Receiver Analog


compandor Transfer Characteristics
28
A Law and  Law
• The companding characteristic is described by a
mathematical formula.

• The A law (E-carrier) characteristics is used in


Europe and most of the rest of the world.

• The  law (T-carrier, Cisco routers)


characteristics used in North America and Japan.

• The difference is so small that they can be


intermixed without much problem.

29
Digital Signal Processor (DSP)

• DSP is a specialized microprocessor for processing real-


time data

• Main functions of DSP in VoIP


- Analog to Digital Conversion
- Voice (analog) ↔ Packet (digital)
- Digital Transcoding
- Conversion between different codecs
- G.726 (mobile phone) ↔ G.729 (long distance VoIP)

30
Secondary Functions of DSP
• Echo cancellation
– Echo occurs when one hears the same sound after some delay.
– In a purely VoIP environment, echo is usually caused at the far
end due to acoustic feedback.
– Echo degrades the quality of the call when it is loud and delayed.
– Echo is more noticeable in VoIP than PSTN because of the
inherent delay in IP network.
– Echo cancellation is performed by default in VoIP.

• Dual-tone Multi-frequency Relay (DTMF) relay


– Relaying DTMF prevents loosing its signal integrity over VoIP
compressed codecs.
– The DSP does not compress DTMF signal.

31
Secondary Functions of DSP

• Media Termination Points are supplementary services


such as call holds, parks, transfers, and conferences.

• Multipoint Control Units (MCUs)


– Digital mixer: mixes different audio streams into a
single stream for conference calls
– Endpoint on a LAN that allows terminals and
gateways on LAN to participate in a conference.

32
Thank you

33

You might also like