Modelling and simulation of voice over internet protocol (VOIP)
Modelling and simulation of voice over internet protocol (VOIP)
1James Agajo, 2 Awolo C. I.3Sylvester Ezewele
Department of Electrical/Electronics
Federal Polytechnic, Auchi
Edo State ,Nigeria
Email:
Phone: +2348053312732
Abstract
Real time voice transmission is now widely used over the Internet and has become a very significant application. Voice quality is still however an open problem due to the loss of voice packets and the variation of end-to-end delay packet transmission; these two factors are a natural result of the simple best-effort service provided by the current network. Indeed, the nowadays Internet provides with a simple packet delivery service without any guarantee on bandwidth, delay or drop probability. The focus in this work was to simulate two types of models; a M/M/1 queue and the M/G/1 queue, both using an input of , size of buffer, number of buffers, and the codec type. The output that was examined is the Quality of service parameters such as the End to End Delay, Packet Loss and Jitter. These were combined together into an E-Model and MOS score, which represent a standardized score of the Quality of Service. It was found that in order to control system behavior its important to make sure that good tuning is used, as based on this project results; it can reduce the network congestion.
Keyword: Packet, internet, bandwidth, QOS, VOIP.
INTRODUCTION
1.1 BACKGROUND
Technological innovation has brought an improved form of making telephone (voice) calls. It brings with it several new capabilities that really change the meaning of the phrase telephone call. VoIP is the name of this new communication technology.
VoIP stands for Voice over Internet Protocol. Basically, VoIP means voice communication over a digital network. Convergence of the telephone network and the Internet is driving the move to packet-based transmission for telecommunications networks. Integration of voice and data onto a single network offers significantly improved efficiency for both private and public network operators.
Data is carried most efficiently on packet networks. Since data has overtaken voice as the major type of telecom traffic, and data traffic volume continues to grow faster than voice traffic volume, it is not surprising that the integrated network uses packet-based transmission.
Packet-based transmission of digital voice is a logical step, but it has some important implications for voice quality. Packet switched networks such as Internet had been developing very fast in the past decades. The advantages of packet switched networks, such as efficiency and flexibility, make them eventually become the terminator of traditional circuit switch networks, i.e. Public Switch Telephone Network (PSTN). VoIP (Voice over Internet Protocol or Voice over Packet) is one of the successful stories about applications of packet networks. Generally, VoIP service is the real time delivery of packetized voice traffic across packet switched networks such as Internet. It provides economical communication expense and suitable speech quality compared with traditional telephone networks.
1.2 Factors Affecting Quality of Service
Codec
A Codec (coder-decoder) converts the analog voice signal to a digitized bitstream at one end of a call and returns it to its analog state at the other end. It is also used to convert a signal from one digital form to another, a process known as transcoding [11].
1.3 VoIP Benefits and Applications
These are the benefits of transporting voice via packet networks:
1. Implementation of VoIP
VoIP is often referred to as IP (Internet Protocol) telephony because, it uses the latest innovations with popular and familiar IP protocols to make possible enhanced voice communications throughout the enterprise .It unites an organizations many locations-including mobile workers- into a single network.
1.4 RESEARCH METHODOLOGY
2.0 Method of Analysis
This section analyses different algorithm used to cancel noise in a voice signal.
2.1 Least Mean Square Algorithm
The LMS algorithm is one of the most widely used algorithm The general equation for this algorithm is shown below
W(n + 1) = w(n) + 2e(n)x(n) 2.1
2.2 Normalised Least Mean Square (NLMS) Algorithm.
One of the primary disadvantages of the LMS algorithm is having a fixed step size parameter for every iteration.
The recursion formula for the NLMS algorithm is stated below
W(n+1) = W(n) + . 1/XT(n)X(n)(e(n)x(n) 2.2
2.3 Recursive Least Square(RLS) Algorithm
The other class of adaptive filtering techniques studied in this project is known as Recursive Least Squares (RLS) algorithms. This algorithm is very costly to implement, and it does not perform well in practical situations.
3.0 SYSTEM DESIGN
3.1 Modelling
This chapter is divided into two sections, the first, gives an analysis of the performance evaluation of voice quality in V0IP system using E-MODEL, the second section, also analyses adaptive noise cancellation in VoIP using Lms algorithm.
3.2 E-MODEL
Speech quality measurements can be divided into two categories, subjective measurements and objective measurements. Under the Objective measurement, we have the intrusive and non-intrusive speech quality measurement. The E-model is a non-intrusive objective speech quality measurement, as it is parameter based, and does not require the help of original signal [20].
The E-Model Equation for Rating Factor is
R = Ro Is Id Ie + A [4] .3.1
The R factor result is represented from a scale that goes from 10 to 100, but typically the range used goes from 50 to 90 as it is possible to view in the Table 4-1 where S represent Satisfied and DS Dissatisfied. The graphical representation is shown in Fig below
Table 3.1
R-value
Range
100-90
90-80
80-70
70-60
60-50
Speech
Transmission
Quality
Category
Best
High
Medium
Low
(very)
Poor
Users
Satisfaction
Very S
S
Some
Users DS
Many users DS
Nearly
all users DS
3.3 MAPPING R FACTOR INTO MOS SCALE
We can map R into MOS scale by the following equations as defined by ITU (international telecommunication union).
1 , R 0
MOS = 1+0.035R+ R(R-60)(100-R)7x10-6, 0 4.5 , R 0 3.4 LEAST Mean Gradient Approximate Method (Method of steepest gradient) Given an adaptive filter with a input x(n), an impulse response w(n) and an output y(n) you will get a mathematical relation for the transfer function of the system. y(n) = wT(n)x(n) .3.2 and x(n) = [x(n),x(n-1),x(n-2),,x(n-(N-1)] where _ wT(n) = [wo(n),w1(n), w2(n)..wN-1(n)] are the time domain coefficients for an Nth order FIR filter. The super script T represents the transpose of a real valued vector or matrix. W(n+1) = w(n) - (n) where W(n+1) = new coefficient values for the next time interval = convergence factor or step size = is the ideal cost function with respect to w(n) Where (n) = e2(n);3.3 e(n) = d(n) y(n); and y(n) = xT(n)w(n) The gradient of the cost function, (n), can alternatively be expressed in the following form. E(n) = (e2(n) ) = e2 (n) / w..3.4 = 2e(n) (e(n) / w) = 2e(n) ( (d(n) y(n) )/ w) = -2e(n) ( ewT(n)x(n) / w) = -2e(n)x(n) Substituting this into the steepest descent algorithm of equation, we arrive at the recursion for the LMS adaptive algorithm w(n) = w(n) + e(n)x(n) [14] In the above equation is sometimes multiplied by 2, but here it will assume it is absorbed by the factor. 3.5 System Specification For this research work, the parameter and values assigned to each value is shown below. Filter Length = 40 Step size = 0.01 Number of iterations = 1000. 4.0 SYSTEM IMPLEMENTATION Each iteration of the LMS algorithm requires 3 distinct steps in this order: 1. The output of the FIR filter, y(n) is calculated using equation Y(n) = w(n)x(n-i) = wT(n)X(n) 4.1 The value of the error estimation is calculated using equation e(n) = d(n) y(n) 2 The tap weights of the FIR vector are updated in preparation for the next iteration, by equation W(n + 1) = w(n) + 2e(n)x(n)3.5 4.2 Simulation and Result The previous chapter provides a detailed sketch of an Adaptive Noise canceller. In this chapter the flowchart for the software simulation and the results of simulation of the Adaptive noise cancellation algorithm, which was performed in MATLAB are discussed. The idea that drove the simulation was to show that convincible results could be achieved in the software environment. 4.3 Why Matlab? The name MATLAB stands for matrix laboratory. MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation [10].It is a powerful, general-purpose, mathematical software package. MATLAB possesses excellent graphics and matrix handling capabilities. It integrates mathematical computing in a powerful language to provide a flexible environment for technical computing. 4.4 System Testing This section shows the test plan which is the simulation flowchart and software testing (simulation). 4.5 MATLAB SIMULATION OF ADAPTIVE FILTERING LMS ALGORITHM. Additive white Gaussian noise was generated in MATLAB using the command rand n and added to the original speech signal s(n). Random white noise provides signal at all digital frequencies to train the adaptive filter, the Lms algorithm parameters used for this simulation are convergence factor of 0.01, Filter length = 40 and Number of iterations = 1000. The clean speech signal s(n) equation is given below. s(n)= sin [ 2n / 10sin( ( 1000n ) / 3000) ] [14] .4.1 4.6 Implementation of Adaptive noise cancellation in VoIP The codec (the coder/decoders that convert analog voice to digital packets) used to stream the voice packet to the network is configured with the noise cancellation algorithm (Lms), to reduce the noise or preferably, we have purpose-built voice enhancement device (VED). The primary advantage of a VED is its integration of multiple voice quality enhancement features, including adaptive noise cancellation, acoustic and hybrid echo cancellation [7]. 4.7 Conclusion. Since the Quality of Service in VoIP networks is degraded by the various factors including noise, suitable technique is required to enhance QoS. The Noise cancellation algorithm presented in this research successfully attempted to find a software solution for the problem of noise in the telecommunications environment. The proposed algorithm was completely a software approach without utilizing any DSP hardware components. The algorithm was capable of running in any Computer with MATLAB software installed. REFERENCES [1] Alcatel; Assuring Voice Service Quality over Converged Networks, White paper, 2004. [2] Dennis Hardman; Noise and Voice Quality in VoIP Environment, Agilent Technologies, Inc., US, April 2003. [3] Ejaz Mahfuz; Packet Loss Concealment for Voice Transmission over IP Networks, McGill University, Montreal Canada, 2001. [4] Floriano De Rango, Mauro Tropea, Peppeno Fazio, Salvatore Marano;Subjective and Objective Measurement Methods, International journal of Computer Science and Network Security, January 2006. [5] Georgi I1iev and Nikola Kasabov; Adaptive filtering with Averaging in Noise Cancellation for Voice and Speech Recognition, Department of Information Science, University of Otago P.O Box 56,Dunedin, New Zealand,1995. [6] ; Competitive Analysis of Voice Extraction for Speech Signal Quality Enhancement, IC Tech, Inc., Michigan USA, 1999. [7] Mark A. Colgan; Investigations into using Matlab for Acoustical Adaptive filtering, Annual Research Journal vol. I, 2003. [8] Micheal Hutson ; Acoustic Echo Cancellation using Digital, John Wiley and sons, New York, November 2003. [9] Mohammed A Akhaee, Ali Ameri, Farokh A Marvasti; Speech Enhancement by Adaptive Noise Cancellation in wavelet Domain, IEEE Press, 2005. [10] MathWorks. (2001), Introduction to MATLAB. The MathWorks, Inc. Available: /access/helpdesk/help/techdoc/learn_MATLAB ch1intro.shtml#12671. [11] Nortel; Voice over Packet, Nortel Networks, Inc.,Canada,2001. [12] Sriniviasaprasath Raghavendran; Implementation of an Acoustic Echo Canceller, White Paper, October 15, 2003. [13] Tim Kelly; VoIP for Dummies, Wiley Publishing, Inc, Indianapolis Indiana, 2005. [14] Thomas Drumright; Adaptive filtering, Academic Publisher, USA, spring 1998. [15] V.R. Vijaykumar, P.T. Vanathi; Modified Adaptive filtering Algorithm for Noise Cancellation in Speech Signals // Electronics and Electrical Engineering- Kaunas: Technologija, 2007. [16] Wendell Odom and Micheal J. Cavanaugh; Cisco QoS, Cisco Press, Indianapolis USA, 2005. [17] Widrow, B.; Glover, J.R., Jr.; McCool, J.M.; kaunitz, J.; Williams, C.S; Hearn, R.H.; Zeidler, J.R.; Eugene Dong, Jr.; Goodlin, R.C.; Adaptive noise canceling: Principles and Applications, Proceedings of the IEEE, vol 63, issue 12, pp: 1692- 1716, December 1975. [18] Wikipedia; Noise canceling headphones, Wikimedia Foundation, 13 June 2008. APPENDIX A %Graph of R factor against MOS R=0:20:100 S=1+0.035.*R+(R.*(R-60).*(100-R))*7*10^-6 plot(R,S) ylim([0.5 4.5]) grid on xlabel('R-value') ylabel('MOS') title('Relation between R factor and MOS') APPENDIX B %Graph of clean speech signal against time lin=1000;% Number of iteration n=1:lin; % time s(n)=sin(2*pi.*n./abs(10*sin(pi*(1000+n)/3000)));% clean speech signal plot(n,s(n)) ylim([-3 4]) ylabel('clean speech signal') xlabel('time') title('Graph of s(n)against n') APPENDIX C %Graph of Adaptive noise Cancellation mu=.01;%Convergence factor len=40;%Filter Length lin=400;%Number of iterations n1=0.7*randn(lin,1);% input white noise n0=n1; mse=0; s=0; for n=1:lin s(n)=sin(2*pi*(n)/abs(10*sin(pi*(1000+n)/3000))); end % Apply the adaptive algorithm sn=s'+n1; x=0*(1:len)';%Initial input w=0*(1:len);%Initial filter coefs
4.5 , R 0
3.4 LEAST Mean Gradient Approximate Method
(Method of steepest gradient)
Given an adaptive filter with a input x(n), an impulse response w(n) and an output y(n) you will get a mathematical relation for the transfer function of the system.
y(n) = wT(n)x(n) .3.2
and
x(n) = [x(n),x(n-1),x(n-2),,x(n-(N-1)]
where _ wT(n) = [wo(n),w1(n), w2(n)..wN-1(n)] are the time domain coefficients for an Nth order FIR filter.
The super script T represents the transpose of a real valued vector or matrix.
W(n+1) = w(n) - (n)
where
W(n+1) = new coefficient values for the next time interval
= convergence factor or step size
= is the ideal cost function with respect to w(n)
Where (n) = e2(n);3.3
e(n) = d(n) y(n);
and y(n) = xT(n)w(n)
The gradient of the cost function, (n), can alternatively be expressed in
the following form.
E(n) = (e2(n) )
= e2 (n) / w..3.4
= 2e(n) (e(n) / w)
= 2e(n) ( (d(n) y(n) )/ w)
= -2e(n) ( ewT(n)x(n) / w)
= -2e(n)x(n)
Substituting this into the steepest descent algorithm of equation, we arrive at the recursion for the LMS adaptive algorithm
w(n) = w(n) + e(n)x(n) [14]
In the above equation is sometimes multiplied by 2, but here it will assume it is absorbed by the factor.
3.5 System Specification
For this research work, the parameter and values assigned to each value is shown below.
Filter Length = 40
Step size = 0.01
Number of iterations = 1000.
4.0 SYSTEM IMPLEMENTATION
Each iteration of the LMS algorithm requires 3 distinct steps in this order:
1. The output of the FIR filter, y(n) is calculated using equation
Y(n) = w(n)x(n-i) = wT(n)X(n)
4.1 The value of the error estimation is calculated using equation
e(n) = d(n) y(n)
2 The tap weights of the FIR vector are updated in preparation for the next iteration, by equation
W(n + 1) = w(n) + 2e(n)x(n)3.5
4.2 Simulation and Result
The previous chapter provides a detailed sketch of an Adaptive Noise canceller. In this chapter the flowchart for the software simulation and the results of simulation of the Adaptive noise cancellation algorithm, which was performed in MATLAB are discussed. The idea that drove the simulation was to show that convincible results could be achieved in the software environment.
4.3 Why Matlab?
The name MATLAB stands for matrix laboratory. MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation [10].It is a powerful, general-purpose, mathematical software package. MATLAB possesses excellent graphics and matrix handling capabilities. It integrates mathematical computing in a powerful language to provide a flexible environment for technical computing.
4.4 System Testing
This section shows the test plan which is the simulation flowchart and software testing (simulation).
4.5 MATLAB SIMULATION OF ADAPTIVE FILTERING LMS ALGORITHM.
Additive white Gaussian noise was generated in MATLAB using the command rand n and added to the original speech signal s(n). Random white noise provides signal at all digital frequencies to train the adaptive filter, the Lms algorithm parameters used for this simulation are convergence factor of 0.01, Filter length = 40 and Number of iterations = 1000. The clean speech signal s(n) equation is given below.
s(n)= sin [ 2n / 10sin( ( 1000n ) / 3000) ] [14] .4.1
4.6 Implementation of Adaptive noise cancellation in VoIP
The codec (the coder/decoders that convert analog voice to digital packets) used to stream the voice packet to the network is configured with the noise cancellation algorithm (Lms), to reduce the noise or preferably, we have purpose-built voice enhancement device (VED). The primary advantage of a VED is its integration of multiple voice quality enhancement features, including adaptive noise cancellation, acoustic and hybrid echo cancellation [7].
4.7 Conclusion.
Since the Quality of Service in VoIP networks is degraded by the various factors including noise, suitable technique is required to enhance QoS. The Noise cancellation algorithm presented in this research successfully attempted to find a software solution for the problem of noise in the telecommunications environment. The proposed algorithm was completely a software approach without utilizing any DSP hardware components.
The algorithm was capable of running in any Computer with MATLAB software installed.
REFERENCES
[1] Alcatel; Assuring Voice Service Quality over Converged
Networks, White paper, 2004.
[2] Dennis Hardman; Noise and Voice Quality in VoIP Environment,
Agilent Technologies, Inc., US, April 2003.
[3] Ejaz Mahfuz; Packet Loss Concealment for Voice Transmission over IP Networks, McGill University, Montreal Canada, 2001.
[4] Floriano De Rango, Mauro Tropea, Peppeno Fazio, Salvatore Marano;Subjective and Objective Measurement Methods, International journal of Computer Science and Network Security, January 2006.
[5] Georgi I1iev and Nikola Kasabov; Adaptive filtering with Averaging in Noise Cancellation for Voice and Speech Recognition, Department of Information Science, University of Otago P.O Box 56,Dunedin, New Zealand,1995.
[6] ; Competitive Analysis of Voice Extraction for Speech Signal Quality Enhancement, IC Tech, Inc., Michigan USA, 1999.
[7] Mark A. Colgan; Investigations into using Matlab for Acoustical Adaptive filtering, Annual Research Journal vol. I, 2003.
[8] Micheal Hutson ; Acoustic Echo Cancellation using Digital, John Wiley and sons, New York, November 2003.
[9] Mohammed A Akhaee, Ali Ameri, Farokh A Marvasti; Speech Enhancement by Adaptive Noise Cancellation in wavelet Domain, IEEE Press, 2005.
[10] MathWorks. (2001), Introduction to MATLAB. The MathWorks, Inc. Available:
/access/helpdesk/help/techdoc/learn_MATLAB ch1intro.shtml#12671.
[11] Nortel; Voice over Packet, Nortel Networks, Inc.,Canada,2001.
[12] Sriniviasaprasath Raghavendran; Implementation of an Acoustic Echo Canceller, White Paper, October 15, 2003.
[13] Tim Kelly; VoIP for Dummies, Wiley Publishing, Inc, Indianapolis Indiana, 2005.
[14] Thomas Drumright; Adaptive filtering, Academic Publisher, USA, spring 1998.
[15] V.R. Vijaykumar, P.T. Vanathi; Modified Adaptive filtering Algorithm for Noise Cancellation in Speech Signals // Electronics and Electrical Engineering- Kaunas: Technologija, 2007.
[16] Wendell Odom and Micheal J. Cavanaugh; Cisco QoS, Cisco Press, Indianapolis USA, 2005.
[17] Widrow, B.; Glover, J.R., Jr.; McCool, J.M.; kaunitz, J.; Williams, C.S; Hearn, R.H.; Zeidler, J.R.; Eugene Dong, Jr.; Goodlin, R.C.;
Adaptive noise canceling: Principles and Applications, Proceedings of the IEEE, vol 63, issue 12, pp: 1692- 1716, December 1975.
[18] Wikipedia; Noise canceling headphones, Wikimedia Foundation, 13 June 2008.
APPENDIX A
%Graph of R factor against MOS
R=0:20:100
S=1+0.035.*R+(R.*(R-60).*(100-R))*7*10^-6
plot(R,S)
ylim([0.5 4.5])
grid on
xlabel('R-value')
ylabel('MOS')
title('Relation between R factor and MOS')
APPENDIX B
%Graph of clean speech signal against time
lin=1000;% Number of iteration
n=1:lin; % time
s(n)=sin(2*pi.*n./abs(10*sin(pi*(1000+n)/3000)));% clean speech signal
plot(n,s(n))
ylim([-3 4])
ylabel('clean speech signal')
xlabel('time')
title('Graph of s(n)against n')
APPENDIX C
%Graph of Adaptive noise Cancellation
mu=.01;%Convergence factor
len=40;%Filter Length
lin=400;%Number of iterations
n1=0.7*randn(lin,1);% input white noise
n0=n1;
mse=0;
s=0;
for n=1:lin
s(n)=sin(2*pi*(n)/abs(10*sin(pi*(1000+n)/3000)));
end
% Apply the adaptive algorithm
sn=s'+n1;
x=0*(1:len)';%Initial input
w=0*(1:len);%Initial filter coefs