15 views

Uploaded by api-3770736

- Project 06
- j Dsp Especific Enviroment
- presentation of project
- Process Dynamics and Control Bits
- Lab Manual
- Adaptive Filters 1
- Syllabus Signal Processing
- 19670028182
- Sun-Fang-Xu
- EC 2302-DSP-AM15-QP
- 1-s2.0-S1434841116301510-main
- 2011 Circuit Theory
- Introduction to FIR Filter Design
- Real Time Pitch Extraction
- Frequency Response Design
- fir filter
- dsp
- tmpD463
- Palmer.09.Digital Processing Of Shallow Seismic Refraction Data.pdf
- s7300 Fm350 1 Operating Instructions en en-US

You are on page 1of 30

London Metropolitan University

Department of Computing, Communication Technology and

Mathematics

Broadband Networks

SK. Asif Bari Akash

Assignment: Signal Processing

Submitted to:

Dr. Bal Virdee

CTP003N

7th December 2006

Signal processing

MSc in Digital Communication Systems

A digital filter is a filter which operates in digital domain, for example sound

editing in computer. In this process the computer computes a sequence of numbers

which is the input to the digital filter and produces an output which is a new

sequence of number. In this way the filter removes unwanted parts of the signal such

as random noise and extracts useful information.

Digital filter

Input signal Output signal

Here, the digital filter block contains the transfer function of the filter. The

transfer function of the digital filter is given below:

( z 1)

H ( z)

( z 0.5)( z 2 z 0.5)

The transfer function normally used to analyze a signal input and signal output

of a particular event. The transfer function of digital filter is obtained from the

symmetrical form of the filter expression. This is a convenient and compact way to

express the filter characteristics.

Signal processing

impulse response of the filter. The transfer function above is a linear time inverient

discrete time filter and contain,

Here, the numerator Y(z) defined the z transform of the output signal y(n)

and the denominator X(z) denotes the z transform of the filters input signal x(n).

below:

h( z ) = =

den( z ) den0 z n + den1 z n −1 +.... + den n

The equation contains m+1 and n+1 number of numerator and denominator.

The co-efficients of equation contained by the num and den operator with descending

power of z.

A stable filter equation must have denominator greater then or equal to the

weighting of the numerator. So, the den must be a vector and num can be a vector

or a scalar component. The discrete transfer function of digital filter sometime

described with the polynomials in Z^-1, which is the delay operator.

The impulse response of a digital filter is simply the string of filter co-efficient.

The impulse response of the filter is the output sequence from the filter when a unit

impulse response is applied to its input. Impulse response is very simple input

sequence consisting of a single value of 1 at time, t=0 followed by zeros at all

subsequent sampling instant.

Signal processing

1.5 Numerator:

1.6 Denominator:

The zeros represented by the values from the numerator for which the

transfer function equals to zero. Other way the complex frequencies that make the

overall gain of the filter’s transfer function zero.

The poles of the system represented by the values from the denominator for

which the of the transfer function infinite. Other way the complex frequencies that

make the overall gain of the filter’s transfer function infinite.

The poles related to the output side and zeros related to the input side. The

number of poles exist in the system is equal to the number of sampling interval

between the most and least delayed output.

Signal processing

2.1 Part 1:

( z 1)

H ( z)

( z 0.5)( z 2 z 0.5)

Form the numerator, the zero of the system could be found. In order to

extract zero, the numerator must be equal to zero.

z 1 0.

So,

or , z 1

So, zero, Z1 = 1

The poles of the system could be extracted form the denominator of the

transfer function. In this case the denominator must be equal to zero.

z 0.5 0

or , z 0.5

So, P1 = -0.5.

The poles from the second term can be extracted by using the quadratic

equation, which states that,

2

b b _ 4ac

x

2a

Signal processing

b 2 4ac

again, >

2a

(1) 2 4.1.0.5

>

2

1 2

or , >

2

or , > 1/ 2

1 (1) 2 4.1.0.5

P2

2

1 1 2

or , P 2

2

1 j

or , P 2

2

or , P 2 0.5 0.5 j

And, the third pole value,

1 ( 1) 2 4.1.0.5

P3

2

1 1 2

or , P3

2

1 j

or , P 2

2

or , P3 0.5 0.5 j

So, for the given transfer function one zero value and three poles value were

extracted.

Signal processing

2.2 Part 2:

In this part the transfer function was manipulated to express it in the form of

the ratio of two polynomials of z.

The filter transfer function become,

z 1

H ( z)

( z 0.5)( z 2 z 0.5)

( z 1)

or , H ( z ) 3

z 0.5 z 0.25

Hence the co-efficient were deduced from the numerator and denominator

and assigned to the vectors num and den respectively.

num = [0,0,1,-1];

den = [1,-0.5,0,0.25];

2.3 Part 3:

A new m file was opened with suitable header and the two vectors were

declared.

2.4 Part 4:

In this part the poles and zeros of the filter were computed and plotted on the

z-plane. The command tf2zp was used to find the zeros, poles and gains of the filter.

[Z,P,K]=tf2zp(num,den);

The vector den specifies the co-efficient of the denominator and num

indicates the numerator co-efficient. The zero locations are returned in the column of

matrix Z and the poles locations are returned in the column vector P. The gains for

each numerator transfer function returned in vector K.

Signal processing

make the length of the numerator and denominator of the discrete-time transfer

function equal for correct result. In this case the eqtflength function were used.

[num,den] = eqtflength(num,den)

The poles and zeros of the system were plotted in the z-plane using the function

zplane which return the zeros num and poles den in column vectors with the unit

circle reference.

0.8

0.6

0.4

Imaginary Part

0.2

0.2

0.4

0.6

0.8

1

1 0.5 0 0.5 1

Real Part

The zero is represented by ‘0’ marked and the poles are marked with ‘x’.

Signal processing

While making the axis look square the function axis square were used. The plot is

given below:

250

200

150

100

50

Imaginary Part

50

100

150

200

250

1 0.5 0 0.5 1

Real Part

Comment:

It was seen that, the computed poles and zeros are same as the plotted poles and

zeros in MATLAB.

Signal processing

2.5 Part 5:

In this part of the experiment the transfer function obtained in part 2 was

expressed in the form below:

L

∑b z k

−k

H (z) = K =0

N

1 + ∑ ak z −k

K =1

To make the first component of the transfer function to 1 and convert all the

indices of the power to negative, the numerator and the denominator were multiplied

z 1

H ( z)

( z 0.5)( z 2 z 0.5)

( z 1)

or , H ( z ) 3

z 0.5 z 0.25

z 3.( z 1)

or , H ( z ) 3 3

z ( z 0.5 z 0.25)

z 2 z 3

or , H ( z )

1 0.5 z 2 0.25 z 3

Hence, the co-efficient of the transfer function were deduced from the

numerator and the denominator.

NUM1 = [0,0,1,-1];

DEN1 = [1,-0.5,0,0.25];

Signal processing

2.6 Part 6:

The filter were declared in terms of NUM1 and DEN1 coefficients and the

frequency response of the filter with magnitude and phase response were obtained.

The frequency response were computed for nfft= 256 frequency points on the

bandwidth it covers.

In order to obtain the frequency response the freqz function was used.

freqz(NUM1,DEN1,nfft,Fs);

The function freqz return the magnitude and phase response of the digital filter

without any output argument. The plot of the frequency response is given below:

Signal processing

Frequency response of the filter

20

Magnitude (dB) 0

20

40

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency (Hz)

200

Phase (degrees)

200

400

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency (Hz)

Another function used to obtained the magnitude and phase response plot separately

is given below:

[H,F] = freqz(NUM1,DEN1,nfft,Fs);

In this case the function returns the nfft points complex frequency response

vector H and nfft point frequency vector F where Fs is the sampling frequency. It was

found that the bandwidth covered by the filter is 4000Hz.

The magnitude response of the filter is given below:

Signal processing

Magnitude response

5

5

10

Magnitude (db)

15

20

25

30

35

40

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency (Hz)

From the poles/zero diagram, the zero is on the unit circle. So, the magnitude

response of the filter is within the finite range of the bandwidth of the filter. As the

unit circle value goes from 0 to 2Л, the zero must be on the unit circle to ensure the

finite magnitude response of the filter. If the zero value is such that it is located

outside the unit circle, then the magnitude response will be infinite range.

Signal processing

Phase response

2

1

Phase degree

2

3

4

5

6

7

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency(Hz)

It can be seen that, the phase response of the filter linearly decreases.

2.7 Part 7:

Signal processing

In this part of the experiment a new transfer function was obtained. The complex

conjugate poles of the system moves closer to the circumference of the unit circle

along 45 degree line and at a distance of 0.95 from the origin.

0.95 45° a

In this case the zero values from the numerator remain the same but the poles

values changes. The poles and zero values are declared using the vector,

NUM2 = [0,0,1,-1];

DEN2 = [1,-0.84,0.2278,.4489];

The calculation for the changed poles values are given below:

P 0.95

e j e 45

TransferFunction Pe j

0.95(cos 45 j sin 45)

0.95(0.707 j 0.707)

0.67 j 0.67

p 2 0.67(1 j 0.67)

p3 0.67(1 j 0.67)

The first pole of the system remain unchanged.

So, p1 0.5

Now, the denominator of the transfer function will be,

Deno min ator ( z p1).( z p 2).( z p3)

Where, p2 and p3 are complex conjugate poles of the system.

Signal processing

p 2 p3 0.67 j 0.67 0.67 j 0.67

1.34

The subtraction of complex poles,

p 2 p3 0.67 j 0.67 0.67 j 0.67

j1.34

The multiplication of the poles,

2.68

So the denominator,

z 3 0.5 z 2 1.34 z 2 0.67 z 0.8978 z 0.4489

z 3 0.84 z 2 0.2278 z 0.4489

( z 1)

TransferFunction 3

z 0.84 z 0.2278 z 0.4489

2

z z 3

2

1 0.84 z 1 0.2278 z 2 0.4489 z 3

2.8 Part 8:

Signal processing

NUM2 = [0,0,1,-1];

DEN2 = [1,-0.84,0.2278,.4489];

The new filter’s z-plane plot was obtained in terms of its new coefficients. The

plot is given below:

Zplane plot of number 8

0.8

0.6

0.4

Imaginary Part

0.2

0.2

0.4

0.6

0.8

1

1 0.5 0 0.5 1

Real Part

The freqz function were used to get the magnitude and phase response of the

filter and the codes are given below:

freqz(NUM3,DEN3,nfft,Fs);

[H,F] = freqz(NUM3,DEN3,nfft,Fs);

The second argument is used to get the magnitude and phase response in

separate diagram.

Signal processing

Frequency Response of Part 8

20

Magnitude (dB) 0

20

40

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency (Hz)

200

Phase (degrees)

200

400

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency (Hz)

Also the magnitude response and phase response characteristics are given below:

Signal processing

Magnitude response of Part 8

20

10

0

Magnitude (db)

10

20

30

40

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency (Hz)

Phase response of Part 8

2

1

Phase degree

2

3

4

5

6

7

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency(Hz)

2.9 Part 9:

Signal processing

It can be seen that, the filter is acting as a high pass filter with cut-off

frequency of 1KHz in terms of new coefficients. Also, by comparison with the filter’s

frequency responses it was observed that the closer the poles are to the unit circle

the higher the peak of the magnitude response of the new filter.

So, it can be stated that, the frequency response of a filter and the changes in

poles and zero position directly related to each other. An increase in poles or zero in

creases the frequency response of the filter.

The transfer function of part 7 was modified by replacing the zero at 1 by a

(z j)

H ( z)

z 0.84 z 0.2278 z 0.4489

3 2

z 2 z 3

or , H ( z )

1 0.84 z 1 0.2278 z 2 0.4489 z 3

Signal processing

The frequency response plot was obtained for the new transfer function where

the zero was replaced by a complex conjugate poles.

The frequency response plot is given below:

Frequency response of part 11

40

20

Magnitude (dB)

20

40

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency (Hz)

0

Phase (degrees)

100

200

300

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency (Hz)

It can be seen that, the filter responses as a notch filter which combine a low-

pass and a high pas filter.

Signal processing

Magnitude response of part 11

30

20

10

Magnitude (db)

10

20

30

40

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency (Hz)

Phase response of Part 11

0

1

2

3

Phase degree

4

5

6

7

8

9

10

0 500 1000 1500 2000 2500 3000 3500 4000

Frequency(Hz)

2.12 Part12:

Signal processing

In this part of the experiment the frequency response obtained for part 6, 8

and 11 were compared.

By comparing the three frequency response it can be said that, with the

change of poles and zero the frequency response of the filter changes. If the poles

and zeros of the filter increases so does the magnitude of the frequency response of

the filter.

From the part 6 the filter response comprises of one real zero and two

complex conjugate poles and posses a normal distribution of magnitude and phase

response. And there is no sharp peak in the magnitude response of the filter.

Part 6 2 KHz

Bandwidth

In part 8, the positions of the complex conjugate poles were changed. The

poles were moved along the 45 degree and distance of the 0.95 from the origin. So

the frequency response cut-off frequency will at 1KHz approximately.

2 KHz

Part 8

1KHz Bandwidth

Signal processing

Part 11 2 KHz

Bandwidth

In this case there were two transitions. The magnitude response curve has a

peak at 1KHz but breakdown at 2KHz and increases again up to the bandwidth it

covers, acting as a notch filter.

Signal processing

In this part the first 20 samples of the unit impulse response of the filter

obtained in part 10 was computed. A stem plot was provided and the horizontal axis

calibrated to represent 8KHz sampling frequency.

The argument used is given below:

[H,T]=impz(NUM3,DEN3,n,Fs);

The argument above computes n sample and scales T so that the samples are

spaced 1/Fs units apart.

The plot of the unit impulse response is given below:

Unit impulse response

1.5

0.5

Magnitude

0.5

1

1.5

0 0.5 1 1.5 2 2.5

Time

Signal processing

In this part of the experiment a signal Sin = [1,2,3,4] is input to the filter. By

convolution the first four values of the output of the filter were deduced.

From the unit impulse response of part 13, we can deduced the first four

values that will be convoluted with Sin.

h(n)=[0,1,0.8,1.5,0.6];

Sin = [1,2,3,4]

So, Convolution C = h(n) Sin.

The conv function was used to perform the convolution.

C = conv(h, Sin)

Convolves vectors h and Sin. The resulting vector is length

LENGTH(h)+LENGTH(Sin)-1.

From the definition of convolution,

3

C(n) = Σ h(m)* h(n-m)

m=0

C (0) 4 0 3 0 2 0 1 0

0.

C (1) 4 0 3 0 2 0 1 1

1.

C (2) 4 0 3 1 2 1 1 0.8

2.8

C (3) 4 0 3 1 2 0.8 1 1.5

6.1.

Signal processing

Convolution of the signal

7

4

Magnitude

0

1 1.5 2 2.5 3 3.5 4

Number

Form the figure it can be seen that, the first four values of the convolved

signal matches with the calculation.

3. Appendix 1:

Signal processing

% Experiment 3: Analysis of filter on the basis of poles and zero postion.

%

% Syntax: Experiment3.m

%

% In this experiment a sigital filter was declared in terms of its transfer

% function. The poles and zero position of the filter was obtained and

% plotted in the z-plane. The frequency response of the filter was obtained

% in terms of the poles and zero locations. The frequency reponses were

% compared for different poles and zero locations. The impulse of the

% filter was obtained and a output of the siganl was convoluted with an

% imput signal.

%

% Author: Sk. Asif Bari Akash.

% Date: 02/12/2006.

%

clear;

clc;

close all;

%--------------------------------------------------------------------------

%4. COmputes oles and Zeros of the filter and plot them on the z-plane.

%--------------------------------------------------------------------------

num = [0,0,1,-1];

den = [1,-0.5,0,0.25];

[num,den] = eqtflength(num,den) %make lengths equal.

figure(1);

[Z,P,K]=tf2zp(num,den); % Find poles and Zeros.

zplane (num,den); % Plots poles and zeros.

title('Ploes and Zero diagram');

axis square;

grid on;

%--------------------------------------------------------------------------

%6. Declare the filter in terms co-efficients and obtain frequency response

%--------------------------------------------------------------------------

NUM1 = [0,0,1,-1];

DEN1 = [1,-0.5,0,0.25];

Fs=8000; % Sampling rate.

nfft=256; % Frequency point on the bandwidth

figure(2);

freqz(NUM1,DEN1,nfft,Fs); % Frequency response.

title('Frequency response of the filter part 6');

[H,F] = freqz(NUM1,DEN1,nfft,Fs); % Frequency response.

figure(3);

plot(F,20*log10(abs(H)));%abs function retuns the magnitudes of the response

title('Magnitude response of part 6');

xlabel('Frequency (Hz)');

ylabel('Magnitude (db)');

grid on;

figure(4);

plot(F,unwrap(angle(H))); % angle returns the phase angle in radian.

title('Phase response part 6');

xlabel('Frequency(Hz)');

Signal processing

ylabel('Phase degree');

grid on;

%--------------------------------------------------------------------------

%7. Derive new Trnsfer function when the poles move closer to the circumf-

% rence of the unit circle.

%--------------------------------------------------------------------------

NUM2 = [0,0,1,-1];

DEN2 = [1,-0.84,0.2278,.4489];

[NUM2,DEN2]= eqtflength(NUM2,DEN2);

figure(5);

[Z,P,K] = tf2zp(NUM2,DEN2); % Finds poles and zeros.

zplane(NUM2,DEN2); % Plots poles and zeros.

title('Z-plane plot of number 8');

grid on;

%-------------------------------------------------------------------------

%9. Comparing the magnitudes of the frequency responses of part 6 and 8.

%-------------------------------------------------------------------------

Fs=8000; % Sampling rate.

nfft=256; % Frequency point on the bandwidth.

figure(6);

freqz(NUM2,DEN2,nfft,Fs);

title('Frequency Response of Part 8');

[H,F] = freqz(NUM2,DEN2,nfft,Fs);

figure(7);

plot(F,20*log10(abs(H)));%abs function retuns the magnitudes of the response

title('Magnitude response of Part 8');

xlabel('Frequency (Hz)');

ylabel('Magnitude (db)');

grid on;

figure(8);

plot(F,unwrap(angle(H)));% angle returns the phase angle in radian.

title('Phase response of Part 8');

xlabel('Frequency(Hz)');

ylabel('Phase degree');

grid on;

%--------------------------------------------------------------------------

%10. New transfer function in terms of zero=1 and complex conjugates poles

% at (+-j).

%--------------------------------------------------------------------------

NUM3=[0,1,0,1];

DEN3 = [1,-0.84,0.2278,.4489];

figure(9);

freqz(NUM3,DEN3,nfft,Fs);% Frequency reponse.

title('Frequency response of part 11');

[H,F] = freqz(NUM3,DEN3,nfft,Fs); % Frequency response.

figure(10);

plot(F,20*log10(abs(H)));%abs function retuns the magnitudes of the response

title('Magnitude response of part 11');

xlabel('Frequency (Hz)');

ylabel('Magnitude (db)');

grid on;

figure(11);

plot(F,unwrap(angle(H)));% angle returns the phase angle in radian.

Signal processing

xlabel('Frequency(Hz)');

ylabel('Phase degree');

grid on;

%--------------------------------------------------------------------------

%13. COmputes the first 20 samples of the unit impulse response.

%--------------------------------------------------------------------------

L=20; %Sample Number

n=0:1:(L-1);

t=n*(1/Fs);

t=t*1000;

figure(12);

[H,T]=impz(NUM3,DEN3,n,Fs); % Impulse response.

T=T*1000;

stem(T,H); % Provide Stem Plot

grid;

xlabel('Time');

ylabel('Magnitude');

title('Unit impulse response');

%--------------------------------------------------------------------------

%14. Convolution of the signal.

%--------------------------------------------------------------------------

h=[0,1,0.8,1.5,0.6];

Sin=[1,2,3,4];

figure(13);

C=conv(h,Sin); % Perform convolution.

stem(C(1:4));

grid on;

xlabel('Number');

ylabel('Magnitude');

title('Convolution of the signal');

%End%

%-------------------------------------------------------------------------%

- Project 06Uploaded byEngr Nayyer Nayyab Malik
- j Dsp Especific EnviromentUploaded byBryan Romero
- presentation of projectUploaded byvishalvikash
- Process Dynamics and Control BitsUploaded byrajaraghuramvarma
- Lab ManualUploaded byDeepika Palraj
- Adaptive Filters 1Uploaded bylonlinness
- Syllabus Signal ProcessingUploaded bySushanta Sahu
- 19670028182Uploaded byNayyar Mahmood
- Sun-Fang-XuUploaded byWseas Friends
- EC 2302-DSP-AM15-QPUploaded byMohan
- 1-s2.0-S1434841116301510-mainUploaded bySachin Pal
- 2011 Circuit TheoryUploaded byPathum Sudasinghe
- Introduction to FIR Filter DesignUploaded byiossifides
- Real Time Pitch ExtractionUploaded byBharavi K S
- Frequency Response DesignUploaded byمعروف المحجري
- fir filterUploaded byvivek2mb
- dspUploaded bykiruthi19
- tmpD463Uploaded byFrontiers
- Palmer.09.Digital Processing Of Shallow Seismic Refraction Data.pdfUploaded byAir
- s7300 Fm350 1 Operating Instructions en en-USUploaded byHiển Vũ
- Time Response AnalysisUploaded byAbdelnasir
- Energy Computation for Bci Using Dct and Moving Average Window for Noise SmootheningUploaded byBilly Bryan
- DRDOUploaded byamit
- 446 n 0035900Uploaded byEmilio Escalante
- Elsie ManualUploaded byNeelakanta Kalla
- Dc Motor ControlUploaded byAnonymous UXnFQSBh
- lecthr05Uploaded byjohan.duraan9540
- CS2403-QBUploaded byGururajan Loganathan
- UntitledUploaded byapi-251901021
- Sig ProcUploaded byCode-X

- DDV Training NewUploaded byragdapattice
- DistortionUploaded byroobleh
- Filter DesignUploaded byKarim Shahbaz
- Keele (1973-01 AES Published) - Simple PR Pink Noise GenUploaded byShreekanta Datta
- Control System - I: Weekly Lesson PlanUploaded bydebasishmee5808
- Ads 1282Uploaded byMussab Zubair
- hts3270_12skd_sm_3141-785-33331_090715Uploaded byCarlos Gonçalves
- Dm 00038862Uploaded byBravo Albert
- Compensation of Loudspeaker Nonlinearities.pdfUploaded byJude Villareal
- 04181667Uploaded byosvi009
- Micro LogUploaded bysugiantobarus
- result of cross simulationUploaded byUbaid Rauf
- EC 6405 Control SystemsUploaded byTapasRout
- Magnetic Bearings Theory and ApplicationsUploaded byYüksel Kurtalan
- Lab4 Frequency ResponseUploaded byAndrew Peeves
- Autodesk Nastran User's Manual 2018Uploaded byAmit Nirmal
- Lab 1Uploaded byMohd Fazli
- QFTManualUploaded byEDWARDURIBE
- Bode PlotUploaded byEr Akhilesh Singh
- Esog 210Uploaded byWong Ting Fung
- (NEB)Uploaded byAndrew Wageh
- Chapter 14Uploaded by●●●●●●●1
- Electronic Circuit Analysis Lab ManualUploaded bymahender1987
- Plecs Tl431Uploaded bykhsniper
- ece3084su14hw03Uploaded byJay Mehta
- imp_meas.pdfUploaded byMohd HelmiHazim
- 101-Ways-Extract-Modal-Parameters-Which-is-One-Me-.pdfUploaded byValentino de George
- CM6300Uploaded byAnonymous qidaEUCu2r
- Chapter 3 ControlUploaded bygeneve1
- Frequency ResponseUploaded bypaancute8982