100% found this document useful (1 vote)
91 views11 pages

Lab 6

The document discusses the conversion between different filter representations including: 1) Converting transfer functions to lattice parameters and ladder coefficients using TF2LATC. 2) Converting second-order sections to zero-pole-gain models using SOS2ZP. 3) Converting lattice filters to transfer functions using LATC2TF. Examples are provided to plot poles and zeros, draw lattice structures, and convert between lattice and direct forms for various FIR and IIR systems.

Uploaded by

pkrsuresh2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
91 views11 pages

Lab 6

The document discusses the conversion between different filter representations including: 1) Converting transfer functions to lattice parameters and ladder coefficients using TF2LATC. 2) Converting second-order sections to zero-pole-gain models using SOS2ZP. 3) Converting lattice filters to transfer functions using LATC2TF. Examples are provided to plot poles and zeros, draw lattice structures, and convert between lattice and direct forms for various FIR and IIR systems.

Uploaded by

pkrsuresh2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 11

LAB-6

TITLE-CASECADE AND LATTICE STRUCTURE OF THE SYSTEM.

THEORY:-

[K,V] = TF2LATC(NUM,DEN) finds the lattice parameters K and the ladder


parameters V for an IIR (ARMA) lattice-ladder filter, normalized by
DEN(1). Note that an error may be generated if any poles of the
transfer function lie on the unit circle.

SOS2ZP Second-order sections to zero-pole-gain model conversion.


[Z,P,K] = SOS2ZP(SOS,G) returns the zeros Z, poles P and gain K
of the system given by the gain G and the matrix SOS in
second-order sections form.

LATC2TF Lattice filter to transfer function conversion.


[NUM,DEN] = LATC2TF(K,V) finds the transfer function numerator
NUM and denominator DEN from the IIR lattice coefficients K and
ladder coefficients V.

Q.1 H1(Z)= {0.007378(1+2z^-1+z^-2)}

(1+2.686z^-1+0.7051z^-2)

H2(Z)= (1+2z^-1+z^-2)

(1-0.9044z^-1+0.2155z^-2)

a) Plot zeo and poles of individual system and frequency response.

CODE:

clear all
num=[0.007338 0.007338*2 0.007338]
dem=[1 -1.2686 0.7051]
w=0:0.01:2*pi
[h,ph]=freqz(num,dem,w)
subplot(3,1,1)
plot(ph,abs(h))
ylabel('magnitude')
subplot(3,1,2)
plot(ph,angle(h))
ylabel('phase in radian')

1
title('System response of IIR ')
subplot(3,1,3)
[z,p]=tf2zp(num,dem)
zplane(z,p)
title('ZERO POLE plot')

0.2
magnitude

0.1

0
0 1 2 3 4 5 6 7
System response of IIR
5
phase in radian

-5
0 1 2 3 4 5 6 7
ZERO POLE plot
1
Imaginary Part

2
0

-1
-5 0 5
Real Part

For H2(Z)
CODE: clear all
num=[1 2 1 ]
dem=[1 -0.9044 0.2155]
w=0:0.01:4*pi
[h,ph]=freqz(num,dem,w)
figure(1)
plot(ph,abs(h))
ylabel('magnitude')
figure(2)
plot(ph,angle(h))
ylabel('phase in radian')
title('System response of IIR ')
figure(3)
[z,p]=tf2zp(num,dem)
zplane(z,p)
title('ZERO POLE plot')

2
14

12

10

8
magnitude

0
0 2 4 6 8 10 12 14

Fig1-magnitude response.
System response of IIR
4

1
phase in radian

-1

-2

-3

-4
0 2 4 6 8 10 12 14

3
ZERO POLE plot

0.8

0.6

0.4
Imaginary Part

0.2
2
0

-0.2

-0.4

-0.6

-0.8

-1

-1 -0.5 0 0.5 1
Real Part

b) cascade all systems.

FOR H1(Z)
Code:

Clear all
figure(1)
[z,p]=sos2zp([0.007378 0.007378*2 0.007378,1 -1.268 0.7051])
zplane(z,p)

4
cascade

0.8

0.6

0.4
Imaginary Part

0.2
2
0

-0.2

-0.4

-0.6

-0.8

-1

-1 -0.5 0 0.5 1
Real Part

Fig-cascade system.

FOR H2(Z).

Code:

figure(1)
[z,p]=sos2zp([1 2 1,1 -0.9044 0.2155])
zplane(z,p)
title('cascade')

5
cascade

0.8

0.6

0.4
Imaginary Part

0.2
2
0

-0.2

-0.4

-0.6

-0.8

-1

-1 -0.5 0 0.5 1
Real Part

Fig-cascade system.

Q.2 Draw lattice structure of

a)H(Z)=(1+2.5z^-1+1.12z^-2+0.7z^-3-0.456z^-4)

Code:
num=[1 2.5 1.12 0.7-0.456]
dem=[1]
k=tf2latc(num,dem)

k =

1.5352
0.5423
0.2440

6
b) H(Z)= 1/(1-1.268z^-1+0.751z^-2)

code:
num=[1]
dem=[1 -1.268 0.751]
[k,c]=tf2latc(num,dem)

k=

-0.7242
0.7510

c=

1
0
0

7
c) H(Z)= 1+2z^-1+z^-2

1-0.75z^-1+0.125z^-2

Code:

num=[1 2 1]
dem=[1 -0.75 0.125]
[k,c]=tf2latc(num,dem)

k =

-0.6667
0.1250

c =

2.7083
2.7500
1.0000

8
Q.3 Conversion lattice to direct form.

FIR
K1=0.345
K2=0.2653
K3=-0.967

CODE:
k=[0.345 0.2653 -0.967]
[num]=latc2tf(k,'fir')

num =

1.0000 0.1800 -0.1568 -0.9670

9
IIR
K1=0.25 C1=0.8281
K2=0.3 C2=1.4583
K3=-0.6 C3=1

Code:

k=[0.25 0.3 -0.6]


c=[0.8281 1.4583 1]
[num,dem]=latc2tf(k,c)

num =

1.4927 1.7833 1.0000 0

dem =

1.0000 0.1450 0.1050 -0.6000

CONCLUSION- We observed and plot lattice structure and lattice ladder structure of FIR
and IIR system and conversion lattice to direct structure.

10
11

You might also like