Mmc manual

79
Multimedia Communication Lab Manual (3361106) Date: EXPERIMENT 1 Aim: Introduction to MATLAB GP, Dahod. Page 1

Transcript of Mmc manual

Page 1: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 1

Aim: Introduction to MATLAB

GP, Dahod. Page 1

Page 2: Mmc manual

Multimedia Communication Lab Manual (3361106)

EXPERIMENT 1

Aim: To study about MATLAB.

Introduction

MATLAB is a high-level programming language and leading problem-solving environment. Basically, it can be efficiently used to solve diverse engineering and mathematical problems. As the name suggests, MATLAB is based on dealing with problems in the matrix form.

The MATLAB environment contains three window types to work with. These are the command window, the Figure window and the Editor window. The Figure window only pops up whenever you plot something. The Editor window is used for writing and editing MATLAB programs (called M-files) and can be invoked in Windows from the pull down menu after selecting File New M-file.

The command window is the main window in which you communicate with the MATLAB interpreter. The MATLAB interpreter displays a command ( >>) indicating that it is ready to accept commands from you.

PROCEDURE

1. MATLAB Tour and Review: Open MATLAB and verify that the arrangement of the desktop is as shown below:

GP, Dahod. Page 2

Page 3: Mmc manual

Multimedia Communication Lab Manual (3361106)

2. Creating matrices

The basic data element in MATLAB is a matrix. A scalar in MATLAB is a 1x1 matrix, and a vector is a 1xn (or nx1) matrix.

For example, create a 3x3 matrix A that has 1’s in the first row, 2’s in the second row, and 3’s in the third row:

Example 1: Enter the following vectors in the Command Window at the >> prompt as shown below:

>> A = [1 1 1; 2 2 2; 3 3 3]

The semicolon is used here to separate rows in the matrix. MATLAB gives you:

A =

1 1 1

2 2 2

3 3 3

If you don’t want MATLAB to display the result of a command, put a semicolon at theend:

>> A = [1 1 1; 2 2 2; 3 3 3];

Matrix A has been created but MATLAB doesn’t display it. The semicolon is necessary when you’re running long scripts and don’t want everything written out to the screen!

Suppose you want to access a particular element of matrix A:

>>A(1,2)

ans =

1Suppose you want to access a particular row of A:>>A(2,:)ans =

2 2 2

The “:” operator generates equally spaced vectors. It can be used to specify a range of values to access in the matrix:

>>A(2,1:2)

ans =

2 2

GP, Dahod. Page 3

Page 4: Mmc manual

Multimedia Communication Lab Manual (3361106)

It can also be used to create a vector:

>> y = 1:3y =1 2 3

The default increment is 1, but can be specified the increment to be something else:

>> y = 1:2:6y =1 3 5Here, the value of each vector element has been increased by 2, starting from 1, while less than 6.

Concatenate vectors and matrices in MATLAB:

>> [y, A(2,:)]

ans =

1 3 5 2 2 2

Delete matrix elements. Suppose you want to delete the 2nd element of the vector y:

>>y(2) = []

y =

1 5

MATLAB has several built-in matrices that can be useful. For example, zeros(n,n) makes an nxn matrix of zeros.

>> B = zeros(2,2)

B =

0 0

0 0

few other useful matrices are:

zeros– create a matrix of zeros

ones– create a matrix of ones

rand– create a matrix of random numbers

eye– create an identity matrix

GP, Dahod. Page 4

Page 5: Mmc manual

Multimedia Communication Lab Manual (3361106)

Matrix operations

Arithmetic Operations

There are four basic arithmetic operators:

+ Addition

− Subtraction

* Multiplication

/ Division (for matrices it also means inversion)

For arrays (or vectors), there are also three other operators that operate on an element-by-element basis:

.* Multiplication of two vectors, element by element.

./ Division of two vectors, element-wise.

.^ Raise all the elements of a vector to a power.

An important thing to remember is that since MATLAB is matrix-based, the multiplication operator “*” denotes matrix multiplication. Therefore, A*B is not the same as multiplying each of the elements of A times the elements of B. However, you’ll probably find that at some point you want to do element-wise operations (array operations). In MATLAB you denote an array operator by playing a period in front ofthe operator.

The difference between “*” and “.*” is demonstrated in this example:

>> A = [1 1 1; 2 2 2; 3 3 3];

>> B = ones(3,3);

>> A*B

ans =

3 3 3

6 6 6

9 9 9>>To compute an element by element multiplication of two vectors (or two arrays), you can use the .* operator: A.*Bans =1 1 1

2 2 2

3 3 3

GP, Dahod. Page 5

Page 6: Mmc manual

Multimedia Communication Lab Manual (3361106)

Example 2:Create a simple square matrix using the form:

g=[1 2 3; 4 5 6; 7 8 9]

Omitting the semicolon on the end of the line will cause MATLAB to echo back the matrix as:

g =

1 2 3

4 5 6

7 8 9

Now take the transpose of this matrix by entering:

g’

This returns:

ans =

1 4 7

2 5 8

3 6 9

Use the help menu to find other matrix and vector operations 3. For Loops

The loop concept is developed to handle repetitive procedures, i.e., it is used with processes that are to be repeated for a specific number of times. In each loop, there will be a change in the inputs or the outputs of the process.SyntaxLoop counter incremented by one:

fori = startValue:endValue

x = ...

y = ...

.

.

.

end

i is the loop counter

GP, Dahod. Page 6

Page 7: Mmc manual

Multimedia Communication Lab Manual (3361106)

Example 3: Compute the sum of the first 10 integers.

n = 10;

s = 0;

fori=1:n

s = s + i;

4. Plotting and Labeling Functions

MATLAB can be used to plot array values versus the index vector, or time functions. The command plot(X,Y) plots vector Y versus vector X. Various line types, plot symbols and colors may be obtained using plot(X,Y,S) where S is a character string indicating the color of the line, and the type of line (e.g., dashed, solid, dotted, etc.). Examples for the string S include:

To plot a time function, one needs to firstly define the time interval along which the function is defined, as a vector. Next, function values at these time values are evaluated and arranged as another array. After that, the plot command is used to plot the function vector over the time vector.

To label the x-axis, we use the command xlabel(“”), writing the desired text inside the quotations. The same thing holds for labeling the y-axis and also putting a title for the graph, with the commands ylabel(“”) and title(“”), respectively.

Example 4: Enter the following commands:

for n =1:360

pi= 3.14159;

bear = pi*n/180;

g(n)=sin(bear);

h(n)=cos(bear);

end

Notice that these vectors appear with information about them in the Workspace pane. Plot the g vector with the following command:

plot(g)

GP, Dahod. Page 7

Page 8: Mmc manual

Multimedia Communication Lab Manual (3361106)

Observe that the Figure 1 window appears with the sine wave. Now enter:

plot(h)

Notice that the sine wave has been replaced by the cosine wave.

Now investigate the hold on and subplot commands to first, plot both vectors on a single plot, using different colors for each (see the plot command for that). And second, to plot the vectors on two separate panes in the same figures window.

Finally, investigate using the plot command to plot a limited range of the vectors. For example, from n= 90 to n=270.

At any point you can get help on a command by typing help followed by the command. For more detailed help, enter doc followed by the command.

5. MATLAB Functions:

A function can be defined is an m-file according to the following syntax:

function [out1, out2, ...] = funname(in1, in2, ...)

, where:

out1, out2, ...,are the function outputs, in1, in2, ... are its inputs and funnameis the function name.

, then, the function can be called in the command window or in other m-files.

Example 5:Define a function (myfunction) that accepts an array of numbers x, and calculates the sum and mean of the array numbers.

function [sum, mean]=myfunction(x)

size=length(x);

sum=0;

fori=1:size

sum=sum+x(i);

end

mean=sum/size;

Example 6:Plot the function , with a green color, over the interval , with a step of 0.1. Besides, label the x-axis and they-axis as (Time) and (Value),

respectively. Also, title the graph as (Sin Function).

GP, Dahod. Page 8

Page 9: Mmc manual

Multimedia Communication Lab Manual (3361106)

t=1:0.01:11;

y=50*sin(2*pi*(t-1)+10);

plot(t,y)

title('Sin Function')

xlabel('Time')

ylabel('Value')

grid

6. Now open Simulink, either by entering simulink on the command line or by clicking on the

icon shown below in the tool bar.

This will open the Library Browser for Simulink.

7. Open a new model. (Under the File pull down menu). This will open a new window. Save this model with a name you choose.

8. Notice the different block sets in the Library. Find the Random Integer Generator by either searching for it or opening the Communications Blockset. Drag and drop this block into your model.

Double click on the block in your model to open the dialogue box. Set M-ary Number to 2 and leave the rest of the entries as default.

Now enter Scope into the search bar of the Library Browser. Notice this yields a number of scopes. Drag the first Scope under Simulink’s Sink Library to your model and connect its input to the output of the Random Integer Generator. This can be done by clicking on the input of the scope and dragging a line to the output of the generator.

Run the simulation by clicking on the play arrow in the model toolbar.

When the simulation finishes, double click on the Scope block and observe the output of the Generator.

Run the simulation again. Notice you always get the same pattern of bits. Open the Random Integer Generator block and change the Initial Seed to another number. Run the simulation again several times. Notice you always get a certain pattern of bits, but the pattern depends on the Initial Seed.

Find the simulation time entry in the model tool bar to the right of the play button. It should be a default of 10. Change this to 20 and observe the scope. Notice that Simulink does not play in real time. It completes the 20 second simulation in about one second or less.

Example 6: MATLAB program to find the DFT of a sequence.

clc;

GP, Dahod. Page 9

Page 10: Mmc manual

Multimedia Communication Lab Manual (3361106)

clear all;close all;N=input('Enter the value of N');x=input('Enter the input sequence X(n):');t=0:N-1;subplot(2,1,1);stem(t,x);xlabel('TIME');ylabel('AMPLITUDE');title('INPUT SIGNAL');grid on;y=fft(x,N)subplot(2,1,2);stem(t,y);xlabel('TIME');ylabel('AMPLITUDE');title('OUTPUT SIGNAL');grid on;

FIGURE:-

SAMPLE INPUT:-

Enter the value of N 4Enter the input sequence X(n):[1 2 3 4]

y =10.0000 -2.0000 + 2.0000i -2.0000 -2.0000 - 2.0000iSome of the frequently used built-in-functions in Signal Processing Toolbox

filter(b.a.x) Syntax of this function is Y = filter(b.a.x)

GP, Dahod. Page 10

Page 11: Mmc manual

Multimedia Communication Lab Manual (3361106)

It filters the data in vector x with the filter described by vectors a and b to create the filtered data y.

fft (x) It is the DFT of vector xifft (x) It is the DFT of vector x

conv (a,b) Syntax of this function is C = conv (a,b)It convolves vectors a and b. The resulting vector is of, Length, Length (a) + Length (b)-1

deconv(b,a) Syntax of this function is [q,r] = deconv(b,a)It deconvolves vector q and the remainder in vector r such that b = conv(a,q)+r

butter(N,Wn) It designs an Nth order lowpass digital Butterworth filter and returns the filter coefficients in lengthN+1 vectors B (numerator) and A (denominator). The coefficients are listed in descending powers of z. The cutoff frequency Wn must be 0.0 <Wn< 1.0, with 1.0 corresponding to half the sample rate.

buttord(Wp, Ws, Rp, Rs) It returns the order N of the lowest order digital Butterworth filter that loses no more than Rp dB in the passband and has at least Rs dB of attenuation in the stopband. Wp and Ws are the passband and stopband edge frequencies, Normalized from 0 to 1 ,(where 1 corresponds to pi rad/sec).

Cheby1(N,R,Wn) It designs an Nth order lowpass digital Chebyshev filter with R decibels of peak-to-peak ripple in the passband. CHEBY1 returns the filter coefficients in length N+1 vectors B (numerator) and A (denominator). The cutoff frequency Wn must be 0.0 <Wn< 1.0, with 1.0 corresponding to half the sample rate.

Cheby1(N,R,Wn,'high') designs a highpass filter.

abs(x)It gives the absolute value of the elements of x. When x is complex, abs(x) is the complex modulus (magnitude) of the elements of x.

freqz(b,a,N)Syntax of this function is [h,w] = freqz(b,a,N) returns the Npoint frequency vector w in radians and the N-point complex frequency response vector h of the filter b/a.

stem(y) It plots the data sequence y aa stems from the x axis terminated with circles for the data value.

stem(x,y)It plots the data sequence y at the values specified in x.

ploy(x,y)

GP, Dahod. Page 11

Page 12: Mmc manual

Multimedia Communication Lab Manual (3361106)

It plots vector y versus vector x. If x or y is a matrix, then the vector is plotted versus the rows or columns of the matrix, whichever line up.

title(‘text’) It adds text at the top of the current axis.

xlabel(‘text’) It adds text beside the x-axis on the current axis.

ylabel(‘text’) It adds text beside the y-axis on the current axis.

GP, Dahod. Page 12

Page 13: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 2

Aim: Write a program to get information about a graphic file using imread() function of MATLAB.

EXPERIMENT 2

GP, Dahod. Page 13

Page 14: Mmc manual

Multimedia Communication Lab Manual (3361106)

Aim: Write a program to get information about a graphic file using imread() function of MATLAB.

Syntax:

% Read RGB image from graphics file.

im = imread('street2.jpg'); % Display image with true aspect ratio.

image(im); axis image % Use ginput to select corner points of a rectangular region.

p = ginput(2);

% Get the x and y corner coordinates as integers

sp(1) = min(floor(p(1)), floor(p(2))); %xminsp(2) = min(floor(p(3)), floor(p(4))); %yminsp(3) = max(ceil(p(1)), ceil(p(2))); %xmaxsp(4) = max(ceil(p(3)), ceil(p(4))); %ymax

% Index into the original image to create the new image

MM = im(sp(2):sp(4), sp(1): sp(3),:);

% Display the subsetted image with appropriate axis ratio

figure; image(MM); axis image

% Write image to graphics file.

imwrite(MM,'street2_cropped.tif')

Results:

GP, Dahod. Page 14

Page 15: Mmc manual

Multimedia Communication Lab Manual (3361106)

original image

100 200 300 400 500 600

50

100

150

200

250

300

350

400

450

Sp: [169,258,188,262]

display axis image

2 4 6 8 10 12 14 16 18 20

1

2

34

5

Conclusion:

GP, Dahod. Page 15

Page 16: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 3

Aim: Write a program to write image matrix in to a file using imwrite() function of MATLAB.

EXPERIMENT 3

GP, Dahod. Page 16

Page 17: Mmc manual

Multimedia Communication Lab Manual (3361106)

Aim: Write a program to write image matrix in to a file using imwrite() function of MATLAB.

Syntax:

clc;

close all;

clear all;

a = uint8(255*rand(64)); % convert image to gray scale figure(1), image(a), colormap(gray)

title('image to save') % copy image to test file. imwrite(a, 'test.bmp')

b = imread('test.bmp'); % read the copied image. figure(2), image(b), colormap(gray)

title('loaded image')

Results:

GP, Dahod. Page 17

Page 18: Mmc manual

Multimedia Communication Lab Manual (3361106)

image to save

10 20 30 40 50 60

10

20

30

40

50

60

loaded image

10 20 30 40 50 60

10

20

30

40

50

60

Conclusion:

GP, Dahod. Page 18

Page 19: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 4

Aim: Write a program to read audio file to WAV format in matrix form.

EXPERIMENT 4

GP, Dahod. Page 19

Page 20: Mmc manual

Multimedia Communication Lab Manual (3361106)

Aim: Write a program to read audio file to WAV format in matrix form.

Read WAVE (.wav) sound file.

Syntaxy = wavread(filename)[y, Fs] = wavread(filename)[y, Fs, nbits] = wavread(filename)[y, Fs, nbits, opts] = wavread(filename)[___] = wavread(filename, N)[___] = wavread(filename, [N1N2])[___] = wavread(___, fmt)siz = wavread(filename,'size')

Description

y = wavread(filename) loads a WAVE file specified by the string filename, returning the sampled data in y. If filename does not include an extension, wavread appends .wav.

[y, Fs] = wavread(filename) returns the sample rate (Fs) in Hertz used to encode the data in the file.

[y, Fs, nbits] = wavread(filename) returns the number of bits per sample (nbits).

[y, Fs, nbits, opts] = wavread(filename) returns a structure opts of additional information contained in the WAV file. The content of this structure differs from file to file. Typical structure fields include opts.fmt (audio format information) and opts.info (text that describes the title, author, etc.).

[___] = wavread(filename, N) returns only the first N samples from each channel in the file.

[___] = wavread(filename, [N1N2]) returns only samples N1 through N2 from each channel in the file.

[___] = wavread(___, fmt) specifies the data format of y used to represent samples read from the file. fmt can be either of the

siz = wavread(filename,'size') returns the size of the audio data contained in filename instead of the actual audio data, returning the vector siz = [sampleschannels].

GP, Dahod. Page 20

'double' Double-precision normalized samples (default).

'native' Samples in the native data type found in the file.

Page 21: Mmc manual

Multimedia Communication Lab Manual (3361106)

Output Scaling

The range of values in y depends on the data format fmt specified. Some examples of output scaling based on typical bit-widths found in a WAV file are given below for both 'double' and 'native' formats.

Native Formats

Number of Bits MATLAB Data Type Data Range

8 uint8 (unsigned integer) 0 <= y<= 255

16 int16 (signed integer) -32768 <= y<= +32767

24 int32 (signed integer) -2^23 <= y<= 2^23-1

32 single (floating point) -1.0 <= y< +1.0

Double Formats

Number of Bits

MATLAB Data Type

Data Range

N<32 double -1.0 <= y< +1.0

N=32 double -1.0 <= y<= +1.0Note: Values in y might exceed -1.0 or +1.0 for the case of N=32 bit data samples stored in the WAV file.

wavread supports multi-channel data, with up to 32 bits per sample.

wavread supports Pulse-code Modulation (PCM) data format only.

GP, Dahod. Page 21

Page 22: Mmc manual

Multimedia Communication Lab Manual (3361106)

Example

Create a WAV file from the example file handel.mat, and read portions of the file back into MATLAB.

% Create WAV file in current folder.Load handel.mat

hfile = 'handel.wav';wavwrite(y, Fs, hfile)clear y Fs

% Read the data back into MATLAB, and listen to audio.[y, Fs, nbits, readinfo] = wavread(hfile);sound(y, Fs);

% Pause before next read and playback operation.duration = numel(y) / Fs;pause(duration + 2)

% Read and play only the first 2 seconds.nsamples = 2 * Fs;[y2, Fs] = wavread(hfile, nsamples);sound(y2, Fs);pause(4)

% Read and play the middle third of the file.sizeinfo = wavread(hfile, 'size');

tot_samples = sizeinfo(1);startpos = tot_samples / 3;endpos = 2 * startpos;

[y3, Fs] = wavread(hfile, [startposendpos]);sound(y3, Fs);

Conclusion:

GP, Dahod. Page 22

Page 23: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 5

Aim: To study about EPABX.

GP, Dahod. Page 23

Page 24: Mmc manual

Multimedia Communication Lab Manual (3361106)

EXPERIMENT 5

Aim: To study about EPABX.

Theory:

EPABX - Electronic Private Automated Branch Exchange

An EPABX / PABX / PBX is an electronic device which is mainly used in organizations.PBX's make connections among the internal telephones of a private organization and also connect them to the PSTN via trunk lines.

An organization consists of many numbers of staffs. Each staff requires the extension as well as access to outgoing local,STD or ISD calls. According to the designation of the staff, we can provide the available features to them. A PABX take incoming trunk phone lines and route them to the appropriate extensions inside a company. The main reason a company buys a PBX is to allow them to purchase less trunk lines from their telecom provider than they would otherwise have to buy. PABX is able to route incoming or outgoing calls on available trunk lines if other lines are busy.

It has many more features that are very much useful for a company to cut down its total cost on telephone services used by the company. The primary advantage of PABX's was cost savings on internal phone calls by the internal circuit switching by itself. Some of the features provided by PABX's are hunt groups, call forwarding,extensiondialingetc.

An overview of EPABX

GP, Dahod. Page 24

Page 25: Mmc manual

Multimedia Communication Lab Manual (3361106)

Private branch exchange

A private branch exchange (PBX) is a telephone exchange or switching system that serves a private organization and performs concentration of central office lines or trunks and provides intercommunication between a large number of telephone stations in the organization. The central office lines provide connections to the public switched telephone network and the concentration aspect of a PBX permits the shared use of these lines between all stations in the organization. The intercommunication aspect allows two or more stations to establish telephone or conferencing calls between them without using the central office equipment.

PBX switching system

Each PBX-connected station, such as a telephone set, a fax machine, or a computer modem, is often referred to as an extension and has a designated extension telephone number that may or may not be mapped automatically to the numbering plan of the central office and the telephone number block allocated to the PBX.

Initially, the primary advantage of a PBX was the cost savings for internal phone calls: handling the circuit switching locally reduced charges for telephone service via the central office lines. As PBX systems gained popularity, they were equipped with services that were not available in the public network, such as hunt groups, call forwarding, and extension dialing. In the 1960s a simulated PBX known as Centrex provided similar features from the central telephone exchange.

A PBX is differentiated from a key telephone system (KTS) in that users of a key system manually select their own outgoing lines on special telephone sets that control buttons for this purpose, while PBXs select the outgoing line automatically or, formerly, by an operator. The telephone sets connected to a PBX do not normally have special keys for central office line

GP, Dahod. Page 25

Page 26: Mmc manual

Multimedia Communication Lab Manual (3361106)

control, but it is not uncommon for key systems to be connected to a PBX to extend its services.

A PBX, in contrast to a key system, employs an organizational numbering plan for its stations. In addition, a dial plan determines whether additional digit sequences must be prefixed when dialing to obtain access to a central office trunk. Modern number analysis systems permit users to dial internal and external telephone numbers without special codes to distinguish the intended destination.

PBX switch board 1975

The term PBX was first applied when switchboard operators managed company switchboards manually using cord circuits. As automated electromechanical switches and later electronic switching systems gradually replaced the manual systems, the terms private automatic branch exchange (PABX) and private manual branch exchange (PMBX) were used to differentiate them. Solid state digital systems were sometimes referred to as electronic private automatic branch exchanges (EPABX). Today, the term PBX is by far the most widely recognized. The acronym is now applied to all types of complex, in-house telephony switching systems.

Two significant developments during the 1990s led to new types of PBX systems. One was the massive growth of data networks and increased public understanding of packet switching. Companies needed packet switched networks for data, so using them for telephone calls was tempting, and the availability of the Internet as a global delivery system made packet switched communications even more attractive. These factors led to the development of the voice over IP PBX, or IP-PBX.

The other trend was the idea of focusing on core competence. PBX services had always been hard to arrange for smaller companies, and many companies realized that handling their own telephony was not their core competence. These considerations gave rise to the concept of the hosted PBX. In wireline telephony, the original hosted PBX was the Centrex service provided by telcos since the 1960s; later competitive offerings evolved into the modern competitive local exchange carrier. In voice over IP, hosted solutions are easier to implement as the PBX may be located at and managed by any telephone service provider, connecting to the individual extensions via the Internet. The upstream provider no longer needs to run direct, local leased lines to the served premises.

A PBX often includes:

Cabinets, closets, vaults and other housings. Console or switchboard allows the operator to control incoming calls.

GP, Dahod. Page 26

Page 27: Mmc manual

Multimedia Communication Lab Manual (3361106)

Interconnecting wires and cables. Logic cards, switching and control cards, power cards and related devices that

facilitate PBX operation. Microcontroller or microcomputer for arbitrary data processing, control and logic. Outside telco trunks that deliver signals to (and carry them from) the PBX. Stations or telephone sets, sometimes called lines. The PBX’s internal switching network. Uninterruptible power supply (UPS) consisting of sensors, power switches and

batteries.

IP-PBX: Private Branch Exchange using VoIP Technologies

IP-PBX inter connections

Private Branch Exchange (PBX) is a telephone switch used by enterprises and located at the premises of a company. The traditional PBX based on the TDM technology is reaching the end of its lifecycle due to the emergence of IP-PBX.

The IP-PBX, based on the VoIP technologies, offers easier user administration and advanced applications. With an IP-PBX, the Local Area Network is the platform for connecting smart IP phones logically over a shared packet network to the call manager. This unifies the data applications and the voice network, but places demands on the packet prioritization aspects of the LAN infrastructure to ensure user satisfaction with the quality of audio. The key benefits of IP-PBXs are:

easy to administer users since all users are provisioned like a PC support telephone user mobility with wireless LAN technologies provide unified messaging services lower total cost of ownership of the voice systems

GP, Dahod. Page 27

Page 28: Mmc manual

Multimedia Communication Lab Manual (3361106)

IP-PBX Working

An IP phone connects to a LAN either through a hub port or a switch port. The phone can talk with CallManager and registers itself. CallManager stores the IP-address-to-phone-number mapping (and vice versa) in its tables. When a user wants to call another user, the user keys in the called party's phone number. The CallManager translates the phone number to an IP address and generates an IP packet version of ring tone to the called IP phone through the TCP connection. When the called IP phone receives the packet, it generates a ring tone. When the user picks up the phone, CallManager instructs the called IP phone to start talking with the calling party and removes itself from the loop. From this point on, the call goes between the two IP phones. When any change occurs during the call due to a feature being pressed on one of the phones, or one of the users hanging up or pressing the flash button, the information goes to CallManager through the control channel.

If a call is made to a number outside of the IP PBX network, CallManager routes the call to an analog or digital trunk gateway which in turn routes it to the PSTN.

The key component of IP-PBX are:

Call manager (or softswitch) is for call control, signaling and management Analog Station Gateway allows plain old telephone service (POTS) phones and fax

machines to connect to the IP PBX network Analog Trunk Gateway allows the IP PBX to connect to the PSTN or PBX. Digital Trunk Gateway supports both digital T1/E1 connectivity to the PSTN or

transcoding and conferencing. Converged Voice Gateway allows you to connect standard POTS phones with IP or

any H.323-compliant telephony devices. IP Phone is the end customer device replacing the traditional telephone set.

GP, Dahod. Page 28

Page 29: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 6

Aim: Write a program to enhance an image by intensity adjustment.

EXPERIMENT 6 A

GP, Dahod. Page 29

Page 30: Mmc manual

Multimedia Communication Lab Manual (3361106)

Aim: Write a program to enhance an image by intensity adjustment.

Syntax:

clc;clear all;close all; % Intensity adjustment is an image enhancement technique that maps an image's intensity values to a new range. I = imread('pout.tif');figure;subplot(121);imshow(I);title('Low Contrast Image');subplot(122);imhist(I,64)title('Histogram of original low contrast image');figure;

% the code increases the contrast in a low-contrast grayscale image by remapping the data values to fill the entire intensity range [0, 255].

J = imadjust(I); subplot(121);imshow(J);title('Intensity adjusted image');subplot(122);imhist(J,64)title('Adjusted image histogram');

Results:

GP, Dahod. Page 30

Page 31: Mmc manual

Multimedia Communication Lab Manual (3361106)

Low Contrast Image

0

1000

2000

3000

4000

5000

Histogram of original low contrast image

0 100 200

Intensity adjusted image

0

500

1000

1500

2000

2500

3000

3500

Adjusted image histogram

0 100 200

Conclusion:

EXPERIMENT 6 B

GP, Dahod. Page 31

Page 32: Mmc manual

Multimedia Communication Lab Manual (3361106)

Aim: Write a program to enhance an image by intensity adjustment.

Syntax:

% use of stretchlim function to determine the adjustment limit automatically

I = imread('rice.png');K = imadjust(I);

% stretchlim function calculates the histogram of the image and determines the adjustment limits automatically

J = imadjust(I,stretchlim(I),[0 1]); figure;imshow(I);title('Original image');figure;imshow(K);title('Default image intensity adjustment');figure;imshow(J);title('Automatically adjustment of limits by using stretchlim function')

Results:

Origina image Default image intensity adjustmentAutomatically adjustment of limits by using stretchlim function

Conclusion:

GP, Dahod. Page 32

Page 33: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 7

Aim: Write a program to enhance an image by intensity adjustment by changing the dynamic range of an image.

EXPERIMENT 7

GP, Dahod. Page 33

Page 34: Mmc manual

Multimedia Communication Lab Manual (3361106)

Aim: Write a program to enhance an image by intensity adjustment.

Syntax:

% Remapping and Widening the Dynamic Range of an Image

I = imread('cameraman.tif');J = imadjust(I,[0 0.2],[0.5 1]); % Image After Remapping and Widening the Dynamic Rangesubplot(121);imshow(I)title('Original image');subplot(122);imshow(J)title('Image After Remapping and Widening the Dynamic Range');

Result:

Original image Image After Remapping and Widening the Dynamic Range

Conclusion:

GP, Dahod. Page 34

Page 35: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 8

Aim: Write a program to deblurr the image.

GP, Dahod. Page 35

Page 36: Mmc manual

Multimedia Communication Lab Manual (3361106)

EXPERIMENT 8

Aim: Write a program to deblurr the image.

Syntax:

clc;close all; clear all; % Display the original image.

I = im2double(imread('cameraman.tif'));imshow(I);title('Original Image'); % Simulate a motion blur.% specifying the length of the blur in pixels, (LEN=31).% the angle of the blur in degrees (THETA=11).

LEN = 21;THETA = 11;

% PSF (Point Spread Function) describes the degree to which an optical system blurs (spreads) a point of light.

% fspecial function is used to create a PSF that simulates a motion blur.

PSF = fspecial('motion', LEN, THETA);

% imfilter function is used to convolve the PSF with the original image, I, to create the blurred image, Blurred.

blurred = imfilter(I, PSF, 'conv', 'circular');figure, imshow(blurred)title('Blurred Image'); % Restoration of blurred image using wiener filter.

wnr3 = deconvwnr(blurred, PSF);figure, imshow(wnr3)title('Restoration of Blurred Image');

Results:

GP, Dahod. Page 36

Page 37: Mmc manual

Multimedia Communication Lab Manual (3361106)

Original Image

Blurred Image

Conclusion:

GP, Dahod. Page 37

Restoration of Blurred Image

Page 38: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 9

Aim: Write a program to observe the effect of filter(2) function of MATLAB.

EXPERIMENT 9

GP, Dahod. Page 38

Page 39: Mmc manual

Multimedia Communication Lab Manual (3361106)

Aim: Write a program to observe the effect of filter(2) function of MATLAB.

Syntex:

clc;close all;clear all; % Read in the image and display it. I = imread('eight.tif');imshow(I)title('Original Image'); % Add noise to it. J = imnoise(I,'salt & pepper',0.02);figure, imshow(J)title('Noisy Image'); % Filter the noisy image with an averaging filter and display the results. K = filter2(fspecial('average',3),J)/255;figure, imshow(K)title('Filtered Image');

Results:

GP, Dahod. Page 39

Page 40: Mmc manual

Multimedia Communication Lab Manual (3361106)

Original Image

Noisy Image

Filtered Image

Conclusion:

GP, Dahod. Page 40

Page 41: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 10

Aim: To study about architecture of ISDN and broadband ISDN.

EXPERIMENT 10

GP, Dahod. Page 41

Page 42: Mmc manual

Multimedia Communication Lab Manual (3361106)

Aim: To study about architecture of ISDN and broadband ISDN.

Theory:

ISDN - Integrated Services Digital Network - communication technology intended to pack all existing and arising services.

Integrated services digital network

ISDN provides:

1. End-to-end digital connectivity

2. Enhanced subscriber signaling

3. A wide variety of new services (due to 1 and 2)

4. Standardized access interfaces and terminals

Architecture of ISDN

GP, Dahod. Page 42

Page 43: Mmc manual

Multimedia Communication Lab Manual (3361106)

ISDN protocols at the user-network interface

– Control signaling is a D channel function but user data may also be transferred across the D channel.

– ISDN is essentially unconcerned with user layers 4-7.– LAPD (link access protocol, D channel) is based on HDLC but modified for ISDN.– Applications supported: control signaling, PS, and telemetry

ISDN Protocol Architecture:

ISDN protocol architecture

Telecommunication services provided by ISDN are:

GP, Dahod. Page 43

Page 44: Mmc manual

Multimedia Communication Lab Manual (3361106)

Some typical teleservices

Telephony (normal, high quality) Telefax (Group 3, Group 4) Video-telephony

Basic telecommunication services Bearer services provide the capability of transmitting signals between network access points. Higher-level functionality of user terminals is not specified.

Teleservices provide the full communication capability by means of network functions, terminals, dedicated network elements, etc.

Some typical bearer services

Speech (transparency not guaranteed) 64 kbit/s unrestricted 3.1 kHz audio (non-ISDN interworking)

Supplementary services

A supplementary service modifies or supplements a basic telecommunication service. It cannot be offered to a customer as a stand-alone service.

Some typical supplementary services

CLIP / CLIR Call forwarding / waiting / hold Charging supplementary services

Transmission Structure of ISDN

GP, Dahod. Page 44

Page 45: Mmc manual

Multimedia Communication Lab Manual (3361106)

Digital pipe between central office and ISDN subscriber carry a number of communication channels, varies from user to user.

The transmission structure of access links includes channels of:

– B channel: 64 kbps– D channel: 16 or 64 kbps– H channel: 384 (H0), 1536 (H11), or 1920 (H12)kbps

B channel– a user channel, carrying digital data, PCM-encoded digital voice, or a mixture

of lower-rate traffic at a fraction of 64 kbps– the elemental unit of circuit switching is the B channel– Three kinds of connections which can be set up over a B channel are

• Circuit-switched: equivalent to switched digital service, call establishment does not take place over the B channel but using CCS• Packet-switched: user is connected to PS node, data exchanged via X.25• Semipermanent: equivalent to a leased line, not requiring call establishment protocol, connection to another user by prior arrangement

D channel– carries CCS information to control circuit-switched calls– may be used for PS or low speed telemetry when no signaling infor.

GP, Dahod. Page 45

Page 46: Mmc manual

Multimedia Communication Lab Manual (3361106)

H channel– provides user information transmission at higher data rates– use the channel as a high-speed trunk or subdivide it based on TDM– examples: fast fax, video, high-speed data, high quality audio

Broadband ISDN– Recommendations to support video services as well as normal ISDN services– Provides user with additional data rates

o 155.52 Mbps full-duplex o 155.52 Mbps / 622.08 Mbpso 622.08 Mbps full-duplex

– Exploits optical fibre transmission technology– Very high performance switches

B- ISDN Architecture:

GP, Dahod. Page 46

Page 47: Mmc manual

Multimedia Communication Lab Manual (3361106)

B-ISDN Protocol Structure

– ATM is specified for Information transfer across the user-network interface– Fixed size 53 octet packet with a 5 octet header– Implies that internal switching will be packet-based

B-ISDN Services

Broadband ISDN is based on a change from metal cable to fiber optic cable at all levels of telecommunications.

Interactive services – those that require two-way exchanges between either 2 subscribers or between a subscriber & a service provider

– conversational – real time exchanges such as telephone calls– messaging – store & forward exchanges such as voice mail– retrieval –retrieve info from a central office

GP, Dahod. Page 47

Page 48: Mmc manual

Multimedia Communication Lab Manual (3361106)

Distributive services – unidirectional services sent from a provider to subscribers, broadcast to the user

– without user control – user choice is limited to whether or not to receive the service at all

– with user control – allow the user a choice of times during which to receive them

Additional reference points for interworking

An ISDN-compatible customer equipment attaches to ISDN via S or T reference point, for others, there are these additional:

– K: Interface with an existing telephone network or other non-ISDN network requiring interworking functions. The functions are performed by ISDN.

– M: A specialized network, such as teletex or MHS. In this case, an adaption function may be needed, to be performed in that network.

– N: Interface between two ISDNs. Some sort of protocol is needed to determine the degree of service compatibility.

– P: There may be some specialized resource that is provided by the ISDN provider but that is clearly identifiable as a separate component or set of components.

Reference points associated with the interconnection of customer equipment and other networks to an ISDN

GP, Dahod. Page 48

Page 49: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:EXPERIMENT 11

AIM: To simulate satellite link budget using MATLAB

GP, Dahod. Page 49

Page 50: Mmc manual

Multimedia Communication Lab Manual (3361106)

EX PERIMENT 11

AIM: To simulate satellite link budget using MATLAB

Syntax:

clearall;clc;disp('ENTER UPLINK PARAMETERS')disp('---------------------------------------')pt=input('Earth station Transmitter output power :');lbo=input('Earth Station back-off loss : ');lbf=input('Earth station branching and feeder losses :');at=input('Earth station Transmit antenna gain : ');lu=input('Additional uplink atmospheric losses : ');lp=input('Free-space path loss : ');gte=input('Satellite receiver G/Te ratio : ');bfb=input('Satellite branching and feeder losses : ');br=input('Bit rate : ');

disp('---------------------------------------')disp('ENTER DOWNLINK PARAMETERS')disp('---------------------------------------')disp('')

pt2=input('Satellite transmitter output power :');lbo2=input('Satellite back-off loss : ');lbf2=input('Satellite branching and feeder losses :');at2=input('Satellite Transmit antenna gain : ');ld=input('Additional downlink atmospheric losses : ');lp2=input('Free-space path loss : ');

gte2=input('Earth station receiver G/Te ratio : ');bfb2=input('Earth station branching and feeder losses : ');br2=input('Bit rate : ');

disp('---------------------------------------')EIRP=pt+at-lbo-lbf;disp('UPLINK BUDGET')disp('---------------------------------------')

%EIRP (Earth Station)fprintf('EIRP (Earth Station) = %fdBW \n',EIRP);c1=EIRP-lp-lu;

%Carrier power density at the satellite antenna :fprintf('Carrier power density at the satellite antenna = %fdBW\n',c1);

cn0=c1+gte-(10*log10(1.38*(10^(-23))));

GP, Dahod. Page 50

Page 51: Mmc manual

Multimedia Communication Lab Manual (3361106)

fprintf('C/No at the satellite = %f dB\n',cn0);

ebn0=cn0-(10*log10(br));fprintf('Eb/No : = %f dB\n',ebn0);

cn=ebn0-10*(log10((40*(10^6))/(br)));fprintf('for a minimum bandwidth system, C/N = %f dB\n',cn);

disp('---------------------------------------')disp('DOWNLINK BUDGET')disp('---------------------------------------')%EIRP (satellite transponder)EIRP2=pt2+at2-lbo2-lbf2;fprintf('EIRP (satellite transponder) = %fdBW \n',EIRP2);

c12=EIRP2-lp2-ld;

%Carrier power density at the earth station antenna :fprintf('Carrier power density at earth station antenna = %fdBW\n',c12);

cn02=c12+gte2-(10*log10(1.38*(10^(-23))));fprintf('C/No at the earth station receiver = %f dB\n',cn02);

ebn02=cn02-(10*log10(br2));fprintf('Eb/No : = %f dB\n',ebn02);

cn2=ebn02-10*(log10((40*(10^6))/(br2)));fprintf('for a minimum bandwidth system, C/N = %f dB\n',cn2);

a=10^(ebn0/10);b=10^(ebn02/10);ebn0all=(a*b)/(a+b);ebn02db=10*log10(ebn0all);fprintf('Eb/No(overall) : = %f dB\n',ebn02db);

 SAMPLE INPUT  

ENTER UPLINK PARAMETERS---------------------------------------Earth station Transmitter output power :33Earth Station back-off loss : 3Earth station branching and feeder losses :4Earth station Transmit antenna gain : 64Additional uplink atmospheric losses : .6Free-space path loss : 206.5Satellite receiver G/Teratio : -5.3Satellite branching and feeder losses : 0Bit rate : 120*(10^6)---------------------------------------

GP, Dahod. Page 51

Page 52: Mmc manual

Multimedia Communication Lab Manual (3361106)

ENTER DOWNLINK PARAMETERS---------------------------------------Satellite transmitter output power :10Satellite back-off loss : .1Satellite branching and feeder losses :.5Satellite Transmit antenna gain : 30.8Additional downlink atmospheric losses : .4Free-space path loss : 205.6Earth station receiver G/Teratio : 37.7Earth station branching and feeder losses : 0Bit rate : 120*(10^6)

OUTPUT ---------------------------------------UPLINK BUDGET---------------------------------------EIRP (Earth Station) = 90.000000 dBWCarrier power density at the satellite antenna = -117.100000 dBWC/No at the satellite = 106.201209 dBEb/No : = 25.409397 dBfor a minimum bandwidth system, C/N = 30.180609 dB---------------------------------------DOWNLINK BUDGET---------------------------------------EIRP (satellite transponder) = 40.200000 dBWCarrier power density at earth station antenna = -165.800000 dBWC/No at the earth station receiver = 100.501209 dBEb/No : = 19.709397 dBfor a minimum bandwidth system, C/N = 24.480609 dBEb/No(overall) : = 18.674255 dB

GP, Dahod. Page 52

Page 53: Mmc manual

Multimedia Communication Lab Manual (3361106)

Date:

EXPERIMENT 12

Aim: To study about Satellite transmitter –receiver using MATLAB simulink

GP, Dahod. Page 53

Page 54: Mmc manual

Multimedia Communication Lab Manual (3361106)

EXPERIMENT 12

Aim: To study about Satellite transmitter –receiver using MATLAB simulink.

RF Satellite Link

The block diagram shows satellite link, using the blocks from the Communications System Toolbox™ to simulate the following impairments:

Free space path loss Receiver thermal noise Memoryless nonlinearity Phase noise In-phase and quadrature imbalances Phase/frequency offsets

By modeling the gains and losses on the link, this model implements link budget calculations that determine whether a downlink can be closed with a given bit error rate (BER). The gain and loss blocks, including the Free Space Path Loss block and the Receiver Thermal Noise block, determine the data rate that can be supported on the link in an additive white Gaussian noise channel.

The model consists of a Satellite Downlink Transmitter, Downlink Path, and Ground Station Downlink Receiver.

GP, Dahod. Page 54

Page 55: Mmc manual

Multimedia Communication Lab Manual (3361106)

Satellite Downlink Transmitter

Random Integer Generator - Creates a random data stream. Rectangular QAM Modulator Baseband - Maps the data stream to 16-QAM

constellation. Raised Cosine Transmit Filter - Upsamples and shapes the modulated signal using the

square root raised cosine pulse shape. Memoryless Nonlinearity (High Power Amplifier) - Model of a traveling wave tube

amplifier (TWTA) using the Saleh model. Gain (Tx. Dish Antenna Gain) - Gain of the transmitter parabolic dish antenna on the

satellite.

Downlink Path

Free Space Path Loss (Downlink Path) - Attenuates the signal by the free space path loss.

Phase/Frequency Offset (Doppler and Phase Error) - Rotates the signal to model phase and Doppler error on the link.

Ground Station Downlink Receiver

Receiver Thermal Noise (Satellite Receiver System Temp) - Adds white Gaussian noise that represents the effective system temperature of the receiver.

Gain (Rx. Dish Antenna Gain) - Gain of the receiver parabolic dish antenna at the ground station.

Phase Noise - Introduces random phase perturbations that result from 1/f or phase flicker noise.

I/Q Imbalance - Introduces DC offset, amplitude imbalance, or phase imbalance to the signal.

DC Blocking - Estimates and removes the DC offset from the signal. Compensates for the DC offset in the I/Q Imbalance block.

Magnitude AGC I and Q AGC (Select AGC) - Automatic gain control Compensates the gain of both in-phase and quadrature components of the signal, either jointly or independently.

I/Q Imbalance Compensator - Estimates and removes I/Q imbalance from the signal by a blind adaptive algorithm.

Phase/Frequency Offset (Doppler and Phase Compensation) - Rotates the signal to represent correction of phase and Doppler error on the link. This block is a static block that simply corrects using the same values as the Phase/Frequency Offset block.

Raised Cosine Receive Filter - Applies a matched filter to the modulated signal using the square root raised cosine pulse shape.

Rectangular QAM Demodulator Baseband - Demaps the data stream from the 16-QAM constellation space.

GP, Dahod. Page 55

Page 56: Mmc manual

Multimedia Communication Lab Manual (3361106)

Changing Model Parameters:Double-click the block labeled Model Parameters to view the parameter settings for the model. All these parameters are tunable. To make changes to the parameters and apply them as the model is running, update the model via ctrl+d.

The parameters are

Satellite altitude (km) - Distance between the satellite and the ground station. Changing this parameter updates the Free Space Path Loss block. The default setting is 35600.

Frequency (MHz) - Carrier frequency of the link. Changing this parameter updates the Free Space Path Loss block. The default setting is 8000.

Transmit and receive antenna diameters (m) - The first element in the vector represents the transmit antenna diameter and is used to calculate the gain in the Tx Dish Antenna Gain block. The second element represents the receive antenna diameter and is used to calculate the gain in the Rx Dish Antenna Gain block. The default setting is [.4 .4].

Noise temperature (K) - Allows you to select from three effective receiver system noise temperatures. The selected noise temperature changes the Noise Temperature of the Receiver Thermal Noise block. The default setting is 0 K. The choices are

0 (no noise) - Use this setting to view the other RF impairments without the perturbing effects of noise.

20 (very low noise level) - Use this setting to view how easily a low level of noise can, when combined with other RF impairments, degrade the performance of the link.

290 (typical noise level) - Use this setting to view how a typical quiet satellite receiver operates.

HPA backoff level - Allows you to select from three backoff levels. This parameter is used to determine how close the satellite high power amplifier is driven to saturation. The selected backoff is used to set the input and output gain of the Memoryless Nonlinearity block. The default setting is 30 dB (negligible nonlinearity). The choices are

30 dB (negligible nonlinearity) - Sets the average input power to 30 decibels below the input power that causes amplifier saturation (that is, the point at which the gain curve becomes flat). This causes negligible AM-to-AM and AM-to-PM conversion. AM-to-AM conversion is an indication of how the amplitude nonlinearity varies with the signal magnitude. AM-to-PM conversion is a measure of how the phase nonlinearity varies with signal magnitude.

7 dB (moderate nonlinearity) - Sets the average input power to 7 decibels below the input power that causes amplifier saturation. This causes moderate AM-to-AM and AM-to-PM conversion.

1 dB (severe nonlinearity) - Sets the average input power to 1 decibel below the input power that causes amplifier saturation. This causes severe AM-to-AM and AM-to-PM conversion.

GP, Dahod. Page 56

Page 57: Mmc manual

Multimedia Communication Lab Manual (3361106)

Phase correction - Allows you to select from three phase offset values to correct for the average AM-to-PM conversion in the High Power Amplifier. The selection updates the Phase/Frequency Offset (Doppler and Phase Compensation) block. The default setting is None. The choices are

None - No correction. Use to view uncorrected AM-to-PM conversion. Correct for moderate HPA AM-to-PM - Corrects for average AM-to-PM distortion

when the HPA backoff is set to 7 dB. Correct for severe HPA AM-to-PM - Corrects for average AM-to-PM distortion when

the HPA backoff is set to 1 dB.

Doppler error - Allows you to select from three values of Doppler on the link and the corresponding correction, if any. The selection updates the Phase/Frequency Offset (Doppler and Phase Error) and Phase/Frequency Offset (Doppler and Phase Compensation) blocks. The default setting is None. The choices are

None - No Doppler on the link and no correction. Doppler (0.7 Hz - uncorrected) - Adds 0.7 Hz Doppler with no correction at the

receiver. Doppler (3 Hz - corrected) - Adds 3 Hz Doppler with the corresponding correction at

the receiver, -3 Hz.

Phase noise - Allows you to select from three values of phase noise at the receiver. The selection updates the Phase Noise block. The default setting is Negligible (-100 dBc/Hz @ 100 Hz). The choices are

Negligible (-100 dBc/Hz @ 100 Hz) - Almost no phase noise.

Low (-55 dBc/Hz @ 100 Hz) - Enough phase noise to be visible in both the spectral and I/Q domains, and cause additional errors when combined with thermal noise or other RF impairments.

High (-48 dBc/Hz @ 100 Hz) - Enough phase noise to cause errors without the addition of thermal noise or other RF impairments.

I/Q imbalance - Allows you to select from five types of in-phase and quadrature imbalances at the receiver. The selection updates the I/Q Imbalance block. The default setting is None. The choices are

None - No imbalances. Amplitude imbalance (3 dB) - Applies a 1.5 dB gain to the in-phase signal and a -1.5

dB gain to the quadrature signal. Phase imbalance (20 deg) - Rotates the in-phase signal by 10 degrees and the

quadrature signal by -10 degrees. In-phase DC offset (2e-6) - Adds a DC offset of 2e-6 to the in-phase signal amplitude.

This offset changes the received signal scatter plot, but does not cause errors on the link unless combined with thermal noise or other RF impairments.

Quadrature DC offset (1e-5) - Adds a DC offset of 1e-5 to the quadrature signal amplitude. This offset causes errors on the link even when not combined with thermal noise or another RF impairment. This offset also causes a DC spike in the received signal spectrum.

GP, Dahod. Page 57

Page 58: Mmc manual

Multimedia Communication Lab Manual (3361106)

I/Q imbalance compensator - Allows you to adjust the adaptation step size to control the convergence speed. The estimated compensator coefficient can be obtained by an optional output port.DC offset compensation - Allows you to enable or disable the DC Blocking block. The default setting is Disabled.AGC type - Allows you to select the automatic gain control for the link. The selection updates the Select AGC block, which is labeled Magnitude AGC or I and Q AGC, depending on whether you select Magnitude only or Independent I and Q, respectively. The default setting is Magnitude only.

Magnitude only - Compensates the gain of both in-phase and quadrature components of the signal by estimating only the magnitude of the signal.

Independent I and Q - Compensates the gain of the in-phase signal using an estimate of the in-phase signal magnitude and the quadrature component using an estimate of the quadrature signal magnitude.

Results and DisplaysBit error rate (BER) display - In the lower right corner of the model is a display of the BER of the model. The BER computation is reset every 5000 symbols to allow you to view the impact of the parameter changes as the model is running (ctrl+d is required to apply the changes).

Power Spectrum - Double-clicking this Open Scopes block enables you to view the spectrum of the modulated/filtered signal (blue) and the received signal before demodulation (red).

Comparing the two spectra allows you to view the effect of the following RF impairments:

Spectral regrowth due to HPA nonlinearities caused by the Memoryless Nonlinearity block

Thermal noise caused by the Receiver Thermal Noise block Phase flicker (that is, 1/f noise) caused by the Phase Noise block

GP, Dahod. Page 58

Page 59: Mmc manual

Multimedia Communication Lab Manual (3361106)

End to End Constellation - Double-clicking this Open Scopes block enables you to view the scatter plots of the signal after QAM modulation (red) and before QAM demodulation (yellow). Comparing these scatter plots allows you to view the impact of all the RF impairments on the received signal and the effectiveness of the compensations.

Constellation Before and After HPA - Double-clicking this Open Scopes block enables you to view the constellation before and after the HPA. Comparing these plots allows you to view the effect that the nonlinear HPA behavior has on the signal.

Changing the model parameters:

In order to experiment with the effects of the blocks from the RF Impairments library and other blocks in the model it is required to change the model parameters. You can double-click the block labeled "Model Parameters" in the model and try some of the following scenarios:

Link gains and losses - Change Noise temperature to 290 (typical noise level) or to 20 (very low noise level). Change the value of the Satellite altitude (km) or Satellite frequency (MHz) parameters to change the free space path loss. In addition, increase or decrease the Transmit and receive antenna diameters (m) parameter to increase or decrease the received signal power. You can view the changes in the received constellation in the received signal scatter plot scope and the changes in received power in the spectrum analyzer. In cases where the change in signal power is large (greater than 10 dB), the AGC filter causes the received power (after the AGC) to oscillate before settling to the final value.

GP, Dahod. Page 59

Page 60: Mmc manual

Multimedia Communication Lab Manual (3361106)

Raised cosine pulse shaping - Make sure Noise temperature is set to 0 (no noise). Turn on the Constellation Before and After HPA scopes. Observe that the square-root raised cosine filtering results in intersymbol interference (ISI). This results in the points' being scattered loosely around ideal constellation points, which you can see in the After HPA scatter plot. The square-root raised cosine filter in the receiver, in conjunction with the transmit filter, controls the ISI, which you can see in the received signal scatter plot.

HPA AM-to-AM conversion and AM-to-PM conversion - Change the HPA backoff level parameter to 7 dB (moderate nonlinearity) and observe the AM-to-AM and AM-to-PM conversions by comparing the Transmit RRC filtered signal scatter plot with the RRC signal after HPA scatter plot. Note how the AM-to-AM conversion varies according to the different signal amplitudes. You can also view the effect of this conversion on the received signal in the received signal scatter plot. In addition, you can observe the spectral regrowth in the received signal spectrum analyzer. You can view the AM-to-PM conversion compensation in the receiver by setting the Phase correction parameter to Correct for moderate HPA AM-to-PM. You can also view the phase change in the received signal in the received signal scatter plot scope.

Change the HPA backoff level parameter to 1 dB (severe nonlinearity) and observe from the scopes that the AM-to-AM and AM-to-PM conversion and spectral regrowth have increased. You can view the AM-to-PM conversion to compensate in the receiver by setting the Phase correction to Correct for severe HPA AM-to-PM. You can view the phase change in the received signal scatter plot scope.

Phase noise plus AM-to-AM conversion - Set the Phase Noise parameter to High and observe the increased variance in the tangential direction in the received signal scatter plot. Also note that this level of phase noise is sufficient to cause errors in an otherwise error-free channel. Set the Phase Noise to Low and observe that the variance in the tangential direction has decreased somewhat. Also note that this level of phase noise is not sufficient to cause errors. Now, set the HPA backoff level parameter to 7dB (moderate nonlinearity) and the Phase correction to Correct for moderate HPA AM-to-PM conversion. Note that even though the corrected, moderate HPA nonlinearity and the moderate phase noise do not cause bit errors when applied individually, they do cause bit errors when applied together.

DC offset and DC offset compensation - Set the I/Q Imbalance parameter to In-phase DC offset (2e-6) and view the shift of the constellation in the received signal scatter plot. Set DC offset compensation to Enabled and view the received signal scatter plot to view how the DC offset block estimates the DC offset value and removes it from the signal. Set DC offset compensation to Disabled and changeI/Q imbalance to Quadrature DC offset (1e-5). View the changes in the received signal scatter plot for a large DC offset and the DC spike in the received signal spectrum. Set DC offset compensation to Enabled and view the received signal scatter plot and spectrum analyzer to see how the DC component is removed.

Amplitude imbalance and AGC type - Set the I/Q Imbalance parameter to Amplitude imbalance (3 dB) to view the effect of unbalanced I and Q gains in the received signal scatter plot. Set the AGC type parameter to Independent I and Q to show how the independent I and Q AGC compensate for the amplitude imbalance.

GP, Dahod. Page 60

Page 61: Mmc manual

Multimedia Communication Lab Manual (3361106)

Doppler and Doppler compensation - Set Doppler error to 0.7 Hz (uncorrected) to show the effect of uncorrected Doppler on the received signal scatter plot. Set the Doppler error to 3 Hz corrected to show the effect of correcting the Doppler on a link. Without changing the Doppler error setting, repeat the following scenarios to view the effects that occur when DC offset and amplitude imbalances occur in circuits that do not have a constant phase reference:

DC offset and DC offset compensation Amplitude imbalance and AGC type

GP, Dahod. Page 61