Docsity

Transformada Z (Matlab), Ejercicios de Procesamiento y Análisis de Señales

Toggle sidebar
bg1
BENÉMERITA UNIVERSIDAD AUTÓNOMA DE PUEBLA
FACULTAD DE INGENIERIA
COLEGIO DE GEOFÍSICA
UNIDAD DE APRENDIZAJE: ANÁLISIS DE SEÑALES
MAESTRO: JOSÉ SERRANO ORTÍZ
EJERCICIOS TRANSFORMADA Z
VENTURA MARROQUÍN JULIA ISABEL
PRIMAVERA 2020
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Vista previa parcial del texto

¡Descarga Transformada Z (Matlab) y más Ejercicios en PDF de Procesamiento y Análisis de Señales solo en Docsity!

BENÉMERITA UNIVERSIDAD AUTÓNOMA DE PUEBLA

FACULTAD DE INGENIERIA

COLEGIO DE GEOFÍSICA

UNIDAD DE APRENDIZAJE: ANÁLISIS DE SEÑALES

MAESTRO: JOSÉ SERRANO ORTÍZ

EJERCICIOS TRANSFORMADA Z

VENTURA MARROQUÍN JULIA ISABEL

PRIMAVERA 202 0

1.- Realizar los códigos de comprobación que vienen remarcados en color amarillo del PDF

actividad transformada z.

Example 4.4.- X 1

(z)=2+3z

  • 1

+4z

  • 2

and X 2

(z)=3+4z

  • 1

+5z

  • 2

+6z

  • 3 . Determine X 3

(z)=X 1

(z)X 2

(z). From

the definition of the z-transform, we observe that

1

2

Then the convolution of these two sequences will give the coefficients of the required

polynomial product.

Script:

%Example 4.

x1=[2,3,4];

x2=[3,4,5,6];

x3=conv(x1,x2)

Example 4.5.- X 1

(z)=z+2+3z

  • 1

and X 2

(z)=2z

2

+4z+3+5z

  • 1 . Determine X 3

(z)=X 1

(z)X 2

(z).

Para que pudiera correr el script, se corrió antes el archivo conv_m proporcionado.

Script:

%Example 4.

x11=[1,2,3];

n1=[-1:1];

x22=[2,4,3,5];

n2=[-2:1];

[x33,n33]=conv_m(x11,n1,x22,n2)

Example 4.6.- Matlab verification: To check that this X(z) is indeed the correct expression,

let us compute the first 8 samples of the sequence x(n) corresponding to X(z), as discussed

before.

ROC

1

: 1 < |𝑧| < ∞. Here both poles are on the interior side of the ROC 1

; that is, |𝑧

1

𝑥−

= 1 and |𝑧

2

| ≤ 1. Hence from

Which is a right-sided sequence.

Script:

%Example 4.

b=[0,1]; a=[3,-4,1];

figure (1); zplane(b,a);title(‘Pole-Zero’);grid on

Otra forma:

z=tf('z')

F=(0.5(1/(1-(z^-1))))-(0.5(1/(1-(0.3333*(z^-1)))))

[ceros,polos,K]= zpkdata(F,'v')% zpk es para buscar polos y ceros

[num,den]=tfdata(F,'v') % ubicacion de los polos y ceros

zplane(num,den) % ploteo

grid on

Example 4.8.- 𝑥

𝑧

− 1

3 − 4 𝑧

− 1

+𝑧

− 2

0 +𝑧

− 1

3 − 4 𝑧

− 1

+𝑧

− 2

%Example 4.

b=[0,1];

a=[3,-4,1];

[R,p,C]=residuez(b,a)

[b,a]=residuez(R,p,C)

Example 4.10.- Determine the inverse z-transform of

So that the resulting sequence is causal and contains no complex numbers.

Script:

Script:

%Example 4.

%a)

b2=[1,0];

a2=[1,-0.9];

figure (1); zplane(b2,a2);title('Pole-Zero');grid on

%b)

[H,w]=freqz(b2,a2,100);

magH=abs(H);

phaH=angle(H);

figure (2)

subplot(2,1,1);plot(w/pi,magH);grid

xlabel('frequency in pi units');ylabel('Magnitude');ylim([0 15]);

title('Magnitude Response');

subplot(2,1,2);plot(w/pi,phaH/pi);grid

xlabel('frequency in pi units');ylabel('Phase in pi units');

title('Phase Response');

Example 4. 13 .- A causal LTI system is described by the following difference equation:

a. The system function H(z),

b. The unit impulse response h(n),

c. The frequency response function H(e

jω

), and plot its magnitude and phase over 0 ≤

ω ≤ π.

a. - Talking the z-transform of both sides of the difference equation and then solving for

Y(z)/X(z) or using (4.20), we obtain

b.-

c.- Substituting 𝑧 = 𝑒

𝑗𝑤

in 𝐻(𝑧),

𝑗𝑤

𝑗 2 𝑤

𝑗 2 𝑤

Script:

%Example 4.

%b)

b3=[1,0,-1];

  • Fig. 2.- Resultados obtenidos con N=
  • Fig. 3.- Resultados obtenidos con N=

Script:

clear all

close

clc

f=50;

t=1:25;

N=4;

a=sin((2pif/500)*t);

%########################################################################

f2=100;

a2=sin((2pif2/500)*t);

f3=125;

a3=sin((2pif3/500)*t);

x=a+a2+a3;

figure(1)

subplot(2,1,1);stem(x);title('Señal Original')

axis ([0 25 - 2 4])

num=(1/N)*ones(1,N);

y=filter(num,1,x);

subplot(2,1,2);stem(y);title('Señal Filtrada');xlabel('Muestras')

axis ([0 25 - 1 2])

3 .- Realice o investigue el resultado de 3 transformadas Z y plotee los polos y los ceros

(revisar el ejemplo del código Matlab)

1.- Un sistema discreto obtiene su salida y[n] realizando las siguientes operaciones con su

entrada x[n]

[

]

[

]

[

]

[

]

𝑦[𝑛 − 2 ]

𝑦[𝑛] +

𝑦[𝑛 − 2 ] = 𝑥[𝑛] − 𝑥[𝑛 − 1 ] + 𝑥[𝑛 − 2 ]

− 2

− 1

− 2

− 2

− 1

− 2

− 1

− 2

− 2

Script:

%Ejercicio 2

z=tf('z');

Xz=(1)/((1-(1/2z^-1))(1-(1/3*z^-1)));

[ceros,polos,K]=zpkdata(Xz,'v')

[num,den]=tfdata(Xz,'v'); % ubicacion de los polos y ceros

zplane(num,den) % ploteo

grid on

[

]

𝑛

[

]

𝑛

𝑢[−𝑛 − 1 ]

− 1

− 1

− 1

− 1

− 1

Script:

%Ejercicio 3

z=tf('z');

Xz=(1/(1-(0.9z^-1)))+(1/(1-(1.1z^-1)));

[ceros,polos,K]=zpkdata(Xz,'v');

[num,den]=tfdata(Xz,'v'); % ubicacion de los polos y ceros

zplane(num,den) % ploteo

grid on