Sie sind auf Seite 1von 43

1

AIM
To implement Direct Sequence Spread Spectrum techniques using MATLAB Simulation
Packages.
APPARATUS REQUIRED REQUIRED
S.No Apparatus Required
1 MATLAB Simulation Package
2 PC
PROCEDURE
Step 1: Create a Pseudo random number and round it oI the values.
Step 2: Create an Array which contains zeros or ones as per condition.
Step 3: Plot the pattern.
Step 4: Create a logical truth table Ior pattern, spreadsig.
Step 5: Calculate cosine values Ior product oI 2, Ic,pi,t.
Step 6: Create a ,matrix with dssssig as row and c1 as column.
Step 7: Plot the Iigure Ior dssssig and absolute oI IIt oI dssssig where IIt is the discrete
Iourier transIorm oI vector X.
Step 8: Stop the process.
Exp. No.:
Date:
IMPLEMENTATION OF DIRECT SEQUENCE
SPREAD SPECTRUM
2
OUTPUT:
3
CODING:
clc;
clear;
bround(rand(1,20));
pattern||;
Ior k1:20
iI b(1,k)0
sigzeros(1,6);
else
sigones(1,6);
end
pattern|pattern sig|;
end
plot(pattern);
axis(|-1 130 -.5 1.5|);
title('\bI\it original bit sequence');
spreadsiground(rand(1,120));
Iigure,plot(spreadsig);
axis(|-1 130 -.5 1.5|);
title('\bI\it original random bit sequence');
hoppedsigxor(pattern,spreadsig);
dssssig||;
t|0:100|;
Ic0.1;
c1cos(2*pi*Ic*t);
c2cos(2*pi*Ic*t*pi);
Ior k1:120
iI hoppedsig(1,k)0
dssssig|dssssig c1|;
else
dssssig|dssssig c2|;
4
5
end
end
Iigure,plot(|1:12120|,dssssig);
axis(|-1 12220 -1.5 1.5|);
title('\bI\it DSSS signal');
Iigure,plot(|1:12120|,abs(IIt(dssssig)));
RESULT:
Thus the Direct Sequence Spread Spectrum was implemented and the output was veriIied.
6
7
AIM
To simulate audio compression algorithm using MATLAB.
APPARATUS REQUIRED
S.No Apparatus Required
1 MATLAB Simulation Package
2 PC
PROCEDURE
Step 1: Start the program.
Step 2: To identiIy the number oI segments and the time sequence oI the Iirst segment.
Step 3: Calculate LPC co-eIIicients and error signal Ior Iirst segment is deIined.
Step 4: PerIorm the input sequence and reconstruct sequence and plot the graph between
data length and amplitude.
Step 5: IdentiIy the sequence Ior the rest oI signal reconstructed sequence using EET.
Step 6: PerIorm regeneration Ior input and reconstructed sequence usinI EET.
Step 7: Generate EET input sequence and EET reconstructed sequence and plot the graph
be between data length vs amplitude spectral power.
Step 8: Stop the process.
Exp. No.:
Date:
SIMULATION OF AUDIO COMPRESSION USING
MATLAB
8
CODING
clc;
clear all;
close all;
Sampn200;
order20;
overlap20;
window0;
|Iilename,pathname|uigetIile('*.wav','Input a Wave Eile');
voicewavread(num2str('dspaIxI'));
iI window1
voicevoice.*hamming(length(voice));
else
window0;
end
numSegmentsIloor(length(voice)/Sampn); Number oI segments
t|0:Sampn-1overlap|; Time Sequence oI the Iirst segment
Calculating LPC coeIIicients and the error signal Ior the Iirst segment
xvoice(1:Sampnoverlap); Input Signal
x1x(1:Sampn); Eirst Segment oI Input sequence
|A,G|lpc(x,order);
Eor the rest oI Signal
Ior curSegment 2:numSegments
xvoice(1(curSegment-1)*Sampn-overlap:Sampn*curSegment);
x1|x1;x(overlap1:length(x))|;
|An Gn| lpc(x,order);
A|A;An|;
9
G|G;Gn|;
end
Sound(x1,22050);
Regenerating the Signal
y0zeros(Sampn,1);
Initializing
Preparing the white noise
n1 (1/16)*.39*sin(2*pi*200*t);
n2 (1/16)*.80*sin(2*pi*1584*t);
n3 (1/16)*.67*sin(2*pi*849*t);
n4 (1/16)*.67*sin(2*pi*433*t);
n5 (1/16)*.39*sin(2*pi*515*t);
n6 (1/8)*.67*(randn(Sampnoverlap,1));
Nn1'n2'n3'n4'n5'n6;
Regenerating the Iirst segment
ynIilter(G(2),A(2,:),N);
y0|y0;yn(1:length(yn)-overlap)|;
Regenerating rest oI the signal
Ior curSegment2:numSegments-1
ynIilter(G(curSegment1),A(curSegment1,:),N);
y0|y0;yn(overlap1:length(yn))|;
end
Eourier TransIorms oI inputs and Reconstruction Sequences
IItx1abs(IIt(x1));
IIty0abs(IIt(y0));
Iigure;
10
subplot(2,1,1);plot(x1);
title('Input Sequence'); ylabel('Amplitude');
subplot(2,1,2);plot(y0);
title('Reconstructed Sequence');ylabel('Amplitude'):xlabel('Datalength');
Iigure;
subplot(2,1,1);plot(IItx1(2:length(IItx1)/21));
title('EET oI Input Sequence');
ylabel('Spectral Power');
subplot(2,1,2);plot(IIty0(2:length(IIty0)/21));
title('EET oI Reconstructed Sequence');
ylabel('Spectral Power');xlabel('Data Length');
sound(y0,22050);
RESULT
Thus the audio compression algorithm was implemented and the output was veriIied.
11
OUTPUT
12
AIM
To implement direct sequence CDMA technique using MATLAB simulation package.
APPARATUS REQUIRED
S.No Apparatus Required
1 MATLAB Simulation Package
2 PC
PROCEDURE
Step 1: Create 2 matrix oI size 1 to 31 Iull oI zeros.
Step 2: Assign an integer value Ior some variables needed.
Step 3: Use looping Irom 2 to 10 assigns pns value to an array.
Step 4: Calculate signal to noise ratio and Iind its square root.
Step 5: Create a random matrix, and calculates its bit error rate.
Step 6: Continue the same process Ior 15 users and draw graph Ior perIormance
analysis oI additive white Gaussian noise
Step 7: Calculate PN sequence value and mix with original signal.
Step 8: Spread the signal, and receive the inIormation about the signal with noise.
Step 9: De-spread the inIormation and calculate bit error rate.
Step 10: Plot the perIormance graph Ior Signal to noise ratio and bit error rate.
Step 11: Compare the AWGN Ior 10 and 15 users.
Step 12: Plot the comparative graph.
Step 13: Stop the process.
Exp. No.:
Date:
IMPLEMENTATION OF DIRECT SEQUENCE
CDMA TECHNIQUE
13
CODING
clc;
clear all;
close all;
Lc16;
channel single tap
h|1;1|;
snr-20:1:0;
noise variance in diIIerent snr
Svnorm(h(1,:))*(10.`(-snr/10));
no oI symbols in each snr
N200;
S1||;
S2||;
no oI time repeating
Navg400;
transmitter
Ior PN1:2
iI PN1
non orthogonal PN sequence
S1|1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1|;
S2|-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1|;
St '(non-orthogonal)';
else
orthogonal PN sequence
S1|1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1|;
S2|-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1|;
St '(orthogonal)';
end
Ior t1:Navg
|'progress:',num2str(t*100/Navg),'',St|
Ior j1:length(snr)
v(Sv(j))`.5*randn(1,Lc*N);
b12*(randint(N,1)-0.5);
b22*(randint(N,1)-0.5);
t1||;
t2||;
Ior i1:N
t1|t1 b1(i)*S1|;
t2|t2 b2(i)*S2|;
end
transmitter data Ior Nsymbols
Th(1)*t1h(2)*t2;
14
receiver
receiver data Ior N symbol
RTv;
correlation
Y1||;
Y2||;
Ior i1:N
Y1(i)R(Lc*(i-1)1:Lc*i)*S1';
Y2(i)R(Lc*(i-1)1:Lc*i)*S2';
end
bhat1sign(Y1);
bhat2sign(Y2);
erroe probability
er1(j)(length(Iind(bhat1~b1')))/N;
er2(j)(length(Iind(bhat2~b2')))/N;
end
eer1(t,:)er1;
eer2(t,:)er2;
end
plotting
BER1(PN,:)mean(eer1);
BER2(PN,:)mean(eer2);
end
semilogy(snr,BER1(1,:),'r-',snr,BER1(2,:),'b*-');
legend('Non orthogonal','orthogonal');
grid on;
xlabel('snr(db)');
ylabel('Ber');
title('single table channel');
15
RESULT:
Thus a MATLAB program is implemented to compare ds-cdma Ior some users in additive white
Gaussian noise and output is veriIied.
16
OUTPUT
17
AIM
To simulate image processing technique using MATLAB simulation package.
APPARATUS REQUIRED
S. No. Apparatus Required
1 MATLAB Simulation Package
2 PC
PROCEDURE
Step 1: Start the process.
Step 2: Read an image which is stored in local disk.
Step 3: Show original image to user.
Step 4: Create a histogram oI adjusted original image and show it.
Step 5: Resize the image to 95 and show it.
Step 6: Rotate the image to 180
o
by imrotate Iunction and show it.
Step 7: Crop the original image Irom original points to some lesser points inside the image
Step 8: Show it to user.
Step 9: Euse two images in to a single image and show it.
Step 10: Show complemented color image oI original image.
Step 11: Show the histogram oI complemented image.
Step 12: Stop the process.
Exp. No.:
Date:
IMPLEMENTATION OF IMAGE PROCESSING
TECHNIQUE
18
CODING
clc;
clI;
To read an image
Iimread('cameraman.tiI');
To display the image
subplot(3,3,1);
imshow(I);
title('Original image');
To Adjust image intensity values or colormap.
kimadjust(I,|0.3,0.7|,||);
To display the histogram oI the adjusted image
subplot(3,3,2);
imhist(k);
title('histogram oI adjusted image');
To resize the image');
simresize(I,|96 96|);
subplot(3,3,3);
imshow(s);
title('resized image');
To rotate the image
gimrotate (I,180);
subplot(3,3,4);
imshow(g);
title('rotated image');
To crop the image g
Iimcrop(I,|75 68 130 112|);
subplot(3,3,5);
imshow(I);
title('cropped image');
To combine two images I and J
Jimread('rice.png');
ximadd(I,J);
subplot(3,3,6);
imshow(x);
title('Iused image');
19
To subtract images J Irom I
yimsubtract(I,J);
subplot(3,3,7);
imshow(y);
title('subtract image');
To complemented the image I
cimcomplement(I);
subplot(3,3,8);
imshow(c);
title('complemented image');
To display the histogram oI complemented image
subplot(3,3,9);
imhist(c);
title('hist oI c image');
RESULT
Thus a MATLAB program is implemented to manipulate some stored image in various
techniques and output is veriIied
20
OUTPUT
21
AIM
To implement Erequency Hoping Spread Spectrum using MATLAB Simulation package.
APPARATUS REQUIRED
S.No Apparatus Required
1 MATLAB Simulation Package
2 PC
PROCEDURE
Step 1: Start the program.
Step 2: Create two samples Ior one cosine and generate some 20 bits pattern.
Step 3: Set 120 minus one Ior bit 0 and 120 plus Ior bit 1.
Step 4: Generate original bit sequence.
Step 5: Plot BPSK modulation signal Ior modulated signal.
Step 6: Prepare 6 new carrier Irequencies and BPSK modulated signal.
Step 7: Create random Irequency hops to Iorm spread signal.
Step 8: Generate spread spectrum signals with 6 Irequencies.
Step 9: Spread BPSK signal into wider bandwidth total oI 12 Irequencies and to generate
EHSS and its EET.
Step 10: Stop the program
Exp. No.:
Date:
IMPLEMENTATION OF FREQUENCY HOPING
SPREAD SPECTRUM
22
CODING
clc;
clear;
sround(rand(1,25));
signal||;
carrier||;
t|0:2*pi/119:2*pi|;
Ior k1:25
iI s(1,k)0
sig-ones(1,120);
else
sigones(1,120);
end
ccos(t);
carrier|carrier c|;
signal|signal sig|;
end
subplot(4,1,1);
plot(signal);
axis(|-100 3100 -1.5 1.5|);
title('\bI \it original bit sequence');
bpsksigsignal.*carrier;
subplot(4,1,2);
plot(bpsksig);
axis(|-100 3100 -1.5 1.5|);
title('\bI \it BPSK modulated signal');
t1|0:2*pi/9:2*pi|;
t2|0:2*pi/19:2*pi|;
t3|0:2*pi/29:2*pi|;
t4|0:2*pi/39:2*pi|;
t5|0:2*pi/59:2*pi|;
t6|0:2*pi/119:2*pi|;
c1cos(t1);
c1|c1 c1 c1 c1 c1 c1 c1 c1 c1 c1 c1 c1|;
c2cos(t2);
c2|c2 c2 c2 c2 c2 c2|;
23
c3cos(t3);
c3|c3 c3 c3 c3|;
c4cos(t4);
c4|c4 c4 c4|;
c5cos(t5);
c5|c5 c5|;
c6cos(t6);
spreadsignal||;
Ior n1:25
crandint(1,1,|1 6|);
switch(c)
case(1)
spreadsignal|spreadsignal c1|;
case(2)
spreadsignal|spreadsignal c2|;
case(3)
spreadsignal|spreadsignal c3|;
case(4)
spreadsignal|spreadsignal c4|;
case(5)
spreadsignal|spreadsignal c5|;
case(6)
spreadsignal|spreadsignal c6|;
end
end
subplot(4,1,3);
plot(|1:3000|, spreadsignal);
axis(|-100 3100 -1.5 1.5|);
title('\bI \it spread signal with 6 Irequencies');
Ireqhoppedsigbpsksig.*spreadsignal;
subplot(4,1,4);
plot(|1:3000|,Ireqhoppedsig);
axis(|-100 3100 -1.5 1.5|);
title('\bI \it Irequency hopped spread spectrum');
Iigure, subplot(2,1,1);
plot(|1:3000|,Ireqhoppedsig);
24
axis(|-100 3100 -1.5 1.5|);
title('\bI \it Irequency hopped spread spectrum signal and its EET');
subplot(2,1,2);
plot(|1:3000|,abs(IIt(Ireqhoppedsig)));
Result:
Thus a MATLAB program is implemented to show EHSS technique and output is
veriIied.
25
OUTPUT
26
AIM:
To simulate 802.11b IEEE standard MAC using MATLAB.
APPARATUS REQUIRED
S.No Apparatus Required
1 MATLAB Simulation Package
2 PC
PROCEDURE:
Step 1: Start the program.
Step 2: IdentiIy the range oI noise levels to calculate Bit error rate and to ignore the preamble
and synchronization bits.
Step 3: Set the spreading parameter and barker sequence.
Step 4: Up sample the spreading rate oI Iilter order and coeIIicients root raised cosine.
Step 5: Set multiples oI samples per chip and to make delay calculation easy.
Step 6: Initialize the system and simulate measurements state and to calculate the BER.
Step 7: Transmit the TxIilter through AWGN channel assuming old band width inout power
and to de-spread the sample symbol.
Step 8: Demodulate the signal and then to calculate BER with that to add bit delay to
Txsignal to align with Rxsignal.
Step 9: Plot the graph oI 802.11b 1Mbps DBPSK BER between BER and Es/No(db).
Step 10: Stop the process.
Exp. No.:
Date:
IMPLEMENTATION OF 802.11B MAC PROTOCOL
27
CODING
EsNoRange 0:2:10; Range oI noise levels to calculate BER
NumPackets 2;
PacketSizeBytes 1024;
PacketSizeBits PacketSizeBytes*8; Ignore preamble and sync bits
clear BERResults;
clear ErrorResults;
Spreading parameters
Barker |1 -1 1 1 -1 1 1 1 -1 -1 -1|'; Barker sequence
SpreadingRate length(Barker); Spreading rate
Upsampling rate
SamplesPerChip8;
Eilter order and coeIIicients - root raised cosine
EilterOrder 40; Set to multiple oI SamplesPerChip to make delay calculation easy
h Iirrcos(EilterOrder,7e6,.7,88e6,'rolloII','sqrt',EilterOrder/2,kaiser(EilterOrder1,1));
BitDelay 1;
ChipDelayAdd 6;
NumEsNos length(EsNoRange);
ErrorResults zeros(1,NumEsNos);
Set state oI random number generator
randn('state',2006);
disp(' ');disp('Start Simulation');
Ior EsNoIndex 1:NumEsNos
EsNo EsNoRange(EsNoIndex);
disp(|'Simulating: Es/No' num2str(EsNo) 'dB'|);
SNR EsNo10*log10(1/SpreadingRate)10*log10(1/SamplesPerChip);
Initialize system and simulation measurements state
Bits
TotalBits Ialse; Bit count Ior BER calculation
ErrorBits Ialse; Error count Ior BER calculation
LastTxSymbol 1; Set DBPSK Modulator state
LastRxSymbol 1; Set DBPSK Demodulator state
Eilters
Rxchipsdelayedstore zeros(ChipDelayAdd,1);
Txbitsdelayedstore Ialse(BitDelay,1);
28
TxEilterState h(1:end-1); Eill Iilter with a 1 symbol
RxEilterState h(1:end-1); Eill Iilter with a 1 symbol
Main simulation loop
Each packet is transmitted, and the received bits compared with the
transmitted bits to calculate the BER.
Ior Packet 1:NumPackets
Construct Irame oI bits
rand('twister', 0);
Txbits rand(PacketSizeBits,1)~.5; Random bits
Modulate
Txbitsbp (1-2*Txbits); Convert to bipolar 0,1 --~ 1, -1
Txsymbols LastTxSymbol*cumprod(Txbitsbp); New DBPSK symbol previous * 1 or -
1 LastTxSymbol Txsymbols(end); Store modulator state (last symbol)
Spread symbols with Barker code, upsampling by spreading rate
Txchips reshape(Barker*Txsymbols',||,1); Multiply by Barker and reshape to a column
Txchips complex(Txchips); Make complex to ensure correct baseband transmission
Upsample chips by SamplesPerChip Iactor
Txsamples zeros(length(Txchips)*SamplesPerChip,1); Create empty Txsamples
Txsamples(1:SamplesPerChip:end,1) sqrt(SamplesPerChip)*Txchips; Normalize power due
to upsampling
Tx Eilter
|TxsamplesIiltered,TxEilterState| Iilter(h,1,Txsamples,TxEilterState); Eilter
TxsamplesIiltered TxsamplesIiltered*2.495; Set output power to 1W
var(TxsamplesIiltered); Calculate Tx signal power, view by removing ';'
Transmit though AWGN Channel assuming 0dBW input power (check
with line above)
RxsamplesunIiltered awgn(TxsamplesIiltered,SNR,0);
Rx Eilter
|RxsamplesIiltered,RxEilterState| Iilter(h,1,RxsamplesunIiltered,RxEilterState);
Downsample - sample chips
Rxchips RxsamplesIiltered(1:SamplesPerChip:end);
Add 1 chip delay to move signal to 11 chip boundary
Rxchipsdelayed |Rxchipsdelayedstore; Rxchips(1:end-ChipDelayAdd)|;
Rxchipsdelayedstore Rxchips((end-ChipDelayAdd1):end); Store delayed chips
Despread - sample symbol
29
Rxsymbols Barker'*reshape(Rxchipsdelayed,SpreadingRate,PacketSizeBits); Multiply by
Barker
Rxsymbols Rxsymbols(:)/SpreadingRate; Make a column and normalize
Demodulate
Rxsymbolspluslast |LastRxSymbol; Rxsymbols|;
Rxsymbolspluslastmult Rxsymbolspluslast(1:end-
1).*conj(Rxsymbolspluslast(2:end));
Rxbits Rxsymbolspluslastmult 0;
LastRxSymbol Rxsymbols(end); Demodulator state
Calculate BER
Add BitDelay to Tx signal to align with Rx signal
Txbitsdelayed |Txbitsdelayedstore; Txbits(1:end-BitDelay)|;
Txbitsdelayedstore Txbits(end-BitDelay1:end); Store delayed symbol
iI Packet1 Ignore delayed bits on Iirst packet
TotalBits TotalBitslength(Rxbits)-BitDelay;
ErrorBits ErrorBitssum(Txbitsdelayed(BitDelay1:end)~Rxbits(BitDelay1:end));
else
TotalBits TotalBitslength(Rxbits); Calculate total bits
ErrorBits ErrorBitssum(Txbitsdelayed~Rxbits); Compare Tx and Rx bits
end
end
ErrorResults(EsNoIndex) ErrorBits; error bits
end
BERResults ErrorResults/TotalBits; Calculate BER
semilogy(EsNoRange,BERResults,'*-');
grid;
title('802.11b 1Mbps DBPSK BER');
ylabel('BER')
xlabel('Es/No (dB)');
RESULT
Thus the simulation oI IEEE 802.11b MAC protocol was implemented and output was
veriIied.
30
OUTPUT
31
AIM
To simulate the Asynchronous TransIer Mode switches using OPNET IT GURU ACADEMIC
EDITION.
APPARATUS REQUIRED
S.No Apparatus Required
1 OPNET IT GURU Academic Edition
2 PC
PROCEDURE
Create a New Project:
1. Start OPNET IT Guru Academic Edition -~Choose New Irom the Eile menu.
2. Select Project and click OK -~Name the project your initials~ATM, and the scenario
CBRUBR -~Click OK.
3. In the Startup Wizard: Initial Topology dialog box, make sure that Create Empty
Scenario is selected -~Click Next -~Select Choose Erom Maps Irom the Network
Scale list -~Click Next -~Choose USA Irom the maps -~Click Next -~Erom the
Select Technologies list, include the atmadvanced Model Eamily as shown in the
Iollowing Iigure -~Click Next -~Click OK.
Create and Configure the Network:
Initialize the Network:
1. The Object Palette dialog box should now be on the top oI your project workspace. II it
is not there, open it by clicking . Make sure that atmadvanced is selected Irom the
pull-down menu on the object palette.
2. Add to the project work space the Iollowing objects Irom the palette:
Application ConIig, ProIile ConIig, two atm8crossconnadv switches, and a subnet.
a. To add an object Irom a palette, click its icon in the object palette -~Move your
mouse to the workspace and click to place the object -~Right-click to get out oI
'object creation mode.
3. Close the Object Palette dialog box and rename (right-click on the node -~Set Name)
the objects you added as shown and then save your project:
Configure the Applications:
1. Right-click on the Applications node -~Edit Attributes -~Expand the Application
DeIinitions attribute and set rows to 3 -~Name the rows:
2. ETP, EMAIL, and VOICE.
a. Go to the ETP row -~Expand the Description hierarchy -~Assign High Load to ETP.
b. Go to the EMAIL row -~Expand the Description hierarchy -~Assign High Load to
Email.
c. Go to the VOICE row -~ Expand the Description hierarchy -~Assign PCM Quality
Speech to Voice.
2. Click OK and then save your project.
Exp. No.:
Date:
SIMULATION OF ATM SWITCHES USING OPNET
32
Configure the Profiles:
1. Right-click on the ProIiles node-~Edit Attributes-~Expand the ProIile ConIiguration
attribute and set rows to 3.
a. Name and set the attributes oI row 0 as shown:
b. Name and set the attributes oI row 1 as shown:
c. Name and set the attributes oI row 2 as shown. (Note: To set the Duration to
exponential(60), you will need to assign 'Not Used to the 'Special Value) -~Close the
Object Palette dialog box. ConIigure the NorthEast Subnet:
1. Double-click on the NorthEast subnet node.You get an empty workspace, indicating
that the subnet contains no objects.
2. Open the object palette and make sure that atmadvanced is selected Irom the pull-
down menu on the object palette.
3. Add the Iollowing items to the subnet workspace: one atm8crossconnadv switch, one
atmuniserveradv, Iour atmuniclientadv, and connect them with bidirectional
atmadv links -~Close the palette -~Rename the objects as shown.
4. Change the data rate attribute Ior all links to DS1.
5. Eor both NEVoice1 and NEVoice2, set the Iollowing attributes:
a. Set ATM Application Parameters to CBR only.
b. Expand the ATM Parameters hierarchy -~Set Queue ConIiguration to CBR only.
c. Expand the Application: Supported ProIiles hierarchy -~Set rows to 1 -~Expand
the row 0 hierarchy -~Set ProIile Name to VOICEP.
d. Application: Supported Services -~Edit its value -~Set rows to 1 -~Set Name oI
the added row to VOICE -~Click OK.
e. Expand the Application: Transport Protocol hierarchy -~Voice Transport
AAL2.
6. Eor NEVoice1, select Edit Attributes -~Edit the value oI the Client Address attribute
and write down NEVoice1.
7. Eor NEVoice2, select Edit Attributes -~Edit the value oI the Client Address attribute
and write down NEVoice2.
8. ConIigure the NEDataServer as Iollows:
a. Application: Supported Services -~Edit its value -~Set rows to 2 -~Set Name oI
the added rows to: EMAIL and ETP -~Click OK.
b. Expand the Application: Transport Protocol SpeciIication hierarchy -~Voice
Transport AAL2.
c. Edit the value oI the Server Address attribute and write down NEDataServer.
9. Eor both NEData1 and NEData2, set the Iollowing attributes:
a. Expand the ATM Parameters hierarchy -~Set Queue ConIiguration to UBR.
b. Expand the Application: Supported ProIiles hierarchy -~Set rows to 2 -~Set
ProIile Name to ETPP (Ior row 0) and to EMAILP (Ior row 1).
10. Eor NEData1, select Edit Attributes -~Edit the value oI the Client Address attribute
and write down NEData1.
11. Eor NEData2, select Edit Attributes -~Edit the value oI the Client Address attribute
and write down NEData2.
12. Save your project.
Add Remaining Subnets:
1. Now you completed the conIiguration oI the NorthEast subnet. To go back to the
project space, click the Go to the higher level button. The subnets oI the other regions
should be similar to the NorthEast one except Ior the names and client addresses.
2. Make three copies oI the subnet we just created.
3. Rename (right-click on the node -~Set Name) the subnets and connect them to the
switches with bidirectional atmadv links as shown. (Note: You will be asked to pick the
node inside the subnet to be connected to the link. Make sure to choose the 'switch
33
inside each subnet to be connected.)
4. Change the data rate Ior all links to DS1.
5. Select and double-click each oI the new subnets (total Iour subnets) and change the
names, client address, and server address oI the nodes inside these subnets as appropriate
(e.g., replace NE with SW Ior the SouthWest subnet).
6. Eor all voice stations in all subnets (total oI eight stations), edit the value oI the
Application: Destination PreIerences attribute as Iollows:
a. Set rows to 1 -~Set Symbolic Name to Voice Destination -~Click on (.) under
the Actual Name column -~Set rows to 6 -~Eor each row choose a voice station
that is not in the current subnet. The Iollowing Iigure shows the actual names Ior
one oI the voice stations in the NorthEast subnet:
7. Eor all data stations in all subnets (total oI eight stations), conIigure the Application:
Destination PreIerences attribute as Iollows:
a. Set rows to 2 -~Set Symbolic Name to ETP Server Ior the one row and Email
Server Ior the other row -~Eor each symbolic name (i.e., ETP Server and Email
Server), click on (.) under the Actual Name column -~Set rows to 3 -~Eor each
row choose a data server that is not in the current subnet. The Iollowing Iigure
shows the actual names Ior one oI the data stations in the NorthEast subnet:
8. Eor all switches in the network (total oI six switches), conIigure the MaxAvailBW oI
the CBR queue to be 100, as shown below, and the MinGuaranBW to be 20.
9. Save your project.
Choose the Statistics:
To test the perIormance oI the applications deIined in the network, we will collect one oI
the many available statistics as Iollows:
1. Right-click anywhere in the project workspace and select Choose Individual Statistics
Irom the pop-up menu.
2. In the Choose Results dialog box, choose the Iollowing statistics:
EMAIL downloads Delay
ETP download Delay
Voice end-end delay
Voice Packet delay
3. Click OK.
Configure the Simulation:
Here we need to conIigure the duration oI the simulation:
1. Click on the ConIigure/Run Simulation button: .
2. Set the duration to be 10.0 minutes.
3. Click OK. We will be running the simulation later.
Duplicate the Scenario:
In the network we just created, we used the CBR service class Ior the Voice application
and the UBR service class Ior the ETP and Email applications. To analyze the eIIect oI
such diIIerent classes oI services, we will create another scenario that is similar to the
CBRUBR scenario we just created but it uses only one class oI service, UBR, Ior all
applications. In addition, to test the eIIect oI the ATM adaptation layer, in the new
scenario we will use AAL5 Ior the Voice application rather than AAL2.
1. Select Duplicate Scenario Irom the Scenarios menu and give it the name UBRUBR -
~Click OK.
2. Eor all voice stations in all subnets, reconIigure them as Iollows. (Check the note below
Ior a Iaster way to carry out this step.)
a. Set ATM Application Parameters to UBR only.
b. ATM Parameters -~Set Queue ConIiguration to UBR.
34
c. Application: Transport Protocol -~Set Voice Transport to AAL5.
3. Save your project.
Run the Simulation:
To run the simulation Ior both scenarios simultaneously:
1. Go to the Scenarios menu -~Select Manage Scenarios.
2. Change the values under the Results column to collect~ (or
recollect~) Ior both scenarios. Compare to the Iollowing Iigure.
3. Click OK to run the two simulations. Depending on the speed oI your processor, this
may take several minutes to complete.
4. AIter the two simulation runs complete, one Ior each scenario, click Close.
5. Save your project.
View the Results:
To view and analyze the results:
1. Select Compare Results Irom the Results menu.
2. Change the drop-down menu in the right-lower part oI the Compare
3. Select the voice Packet Delay Variation statistic and click Show. The resulting graph
should resemble the one below. (Note: Result may vary slightly due to diIIerent node
placement.)
RESULT
Thus Asynchronous TransIer Mode Switches are simulated, Voice and Email delays variations on
both scenarios are plotted
35
OUTPUT
36
37
COMPARISION GRAPHS
Time Average |in voice end-end delay|
38
Time Average |in ETP Download Response Time|
Time Average|EMAIL Download Response Time|
39
Time Average|Voice Packet Delay Variation|
40
AIM
To simulate congestion control algorithm Ior Asynchronous TransIer Mode switches using
OPNET IT GURU ACADEMIC EDITION.
APPARATUS REQUIRED
S. No. Apparatus Required
1 OPNET IT GURU Academic Edition
2 PC
PROCEDURE
Choose the Statistics:
To test the perIormance oI the applications deIined in the network, we will collect one oI
the many available statistics as Iollows:
1. Right-click anywhere in the project workspace and select Choose Individual Statistics
Irom the pop-up menu.
2. In the Choose Results dialog box, choose the Iollowing statistics under ATM:
Cell Delay
Cell Delay Variation
UBR Cell Delay
UBR Cell Delay Variation
3. Click OK.
Configure the Simulation:
Here we need to conIigure the duration oI the simulation:
1. Click on the ConIigure/Run Simulation button: .
2. Set the duration to be 10.0 minutes.
3. Click OK. We will be running the simulation later.
Duplicate the Scenario:
In the network we just created, we used the CBR service class Ior the Voice application
and the UBR service class Ior the ETP and Email applications. To analyze the eIIect oI
such diIIerent classes oI services, we will create another scenario that is similar to the
CBRUBR scenario we just created but it uses only one class oI service, UBR, Ior all
applications. In addition, to test the eIIect oI the ATM adaptation layer, in the new
scenario we will use AAL5 Ior the Voice application rather than AAL2.
1. Select Duplicate Scenario Irom the Scenarios menu and give it the name UBRUBR -
~Click OK.
2. Eor all voice stations in all subnets, reconIigure them as Iollows. (Check the note below
Ior a Iaster way to carry out this step.)
a. Set ATM Application Parameters to UBR only.
b. ATM Parameters -~Set Queue ConIiguration to UBR.
c. Application: Transport Protocol -~Set Voice Transport to AAL5.
3. Save your project.
Exp. No.:
Date:
SIMULATION OF CONGESTION CONTROL
ALGORITHM IN ATM
41
Run the Simulation:
To run the simulation Ior both scenarios simultaneously:
1. Go to the Scenarios menu -~Select Manage Scenarios.
2. Change the values under the Results column to collect~ (or
re-collect~) Ior both scenarios. Compare to the Iollowing Iigure.
3. Click OK to run the two simulations. Depending on the speed oI your processor, this
may take several minutes to complete.
4. AIter the two simulation runs complete, one Ior each scenario, click Close.
5. Save your project.
View the Results:
To view and analyze the results:
1. Select Compare Results Irom the Results menu.
2. Change the drop-down menu in the right-lower part oI the Compare
3. Select the voice Packet Delay Variation statistic and click Show. The resulting graph
should resemble the one below. (Note: Result may vary slightly due to diIIerent node
placement.)
RESULT
Thus congestion control algorithm in Asynchronous TransIer Mode Switches was simulated and
cell delay and UBR cell delay are plotted on both scenarios.
42
OUTPUT
Cell Delay
Cell Delay Variation
43
UBR Cell Delay
UBR Cell Delay Variation

Das könnte Ihnen auch gefallen