Está en la página 1de 14

LABORATORIO N 01 P.D.S.

INTRODUCCIN

En el presente informe desarrollaremos las actividades previstas a


realizar en el laboratorio N01 de procesamiento digital de seales,
presentando diversas seales a operar desde un anlisis matemtico
y luego mediante el software MATLAB, tambin tendremos graficas
referentes a las seales. Manipularemos las seales para luego
obtener graficas requeridas. Tambin realizaremos la manipulacin de
sonido, en este caso de un sonido de voz, veremos la reflexin,
compresin y expansin de este.

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 1


LABORATORIO N 01 P.D.S.

LABORATORIO N01

1.-Impulsos continuos y discretos


a) Enuncie la propiedad de extraccin de la delta de Dirac.
+

x ( t ) . ( . a ) d=x (a)

b) Evale las siguientes integrales usando propiedades de la delta de


Dirac.
2t

I. (3)d
2 t
2t
2t =u ( 2 t 3 )u (2t3)
(3)d =u ( 3 )2t
2 t

II. u( /26) . ( /35) d



u( /26)3. ( 15)d =3u ( 15


2
6 )=3u(1.5)

2.-Seales Peridicas y Aperidicas


Para cada una de las siguientes seales, determine si es peridica o
aperidica. En el primer caso, especifique su periodo fundamental. Luego
grafique las seales en MATLAB utilizando un rango de valores adecuados
para que se note el tipo de seal que es. Para las seales complejas puede
graficas parte real e imaginaria, o mdulo y fase, o si acepta el desafo puede
probar con un grfico 3D (usando plot3).

a) 2

x(t)= -2*sin(-0.2*t+(5*pi/3)); 1

-1

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 2 -2

-3
-40 -30 -20 -10 0 10 20 30 40 50
LABORATORIO N 01 P.D.S.

>> t=[-40:0.01:50];
>> y=-2.*sin(-0.2.*t+(5*pi/3));
>> plot(t,y,'r'), grid on

3
b) x(n)= -2*sin(-0.2*n+(5*pi/3));
2

>> n=[-40:1:50]; 0

>> y=-2.*sin(-0.2.*n+(5*pi/3)); -1

-2
>> plot(n,y,'r'), grid on
-3
-40 -30 -20 -10 0 10 20 30 40 50

c) x(t)= 1/2*(cos(2*t-pi/4))^2;
0.5

0.4

>> t=[-40:0.01:50]; 0.3

0.2

>> y=1/2.*(cos(2.*t-pi/4)).^2; 0.1

>> plot(t,y,'r'), grid on 0

-0.1
-10 -5 0 5 10

d) x(t)= 1/2*(cos(2*(t^2)-pi/4)); 0.6

0.4

>> t=[-40:0.01:50]; 0.2

>> y=1/2.*(cos(2.*(t.^2)-pi/4)); -0.2

>> plot(t,y,'r'), grid on -0.4

-5 0 5

e) x (t)=e
j(
2
t )
; 0.5

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 3 -0.5

-1
1
0.5 30
0 20
10
-0.5 0
-10
-1 -20
LABORATORIO N 01 P.D.S.

>> t=[-20:0.01:30];
>> x=exp(j.*((pi/2).*t-pi));
>> plot3(t,real(x),imag(x),'r'), grid on

n
f) x (n)=e
j ( )
2 ;
1

0.5

0
>> n=[-20:1:30]; -0.5

>> x=exp(j.*((n./2)-pi)); -1
1
0.5 30
20
>> plot3(n,real(x),imag(x),'r'), grid on 0
-0.5
-10
0
10

-1 -20

g) x ( t )=2 cos ( 2 t ) + sen(10 t) ; 3

>> t=[-20:0.01:30]; 0

-1

>> y=2.*cos(2*pi*t)+sin(10*t); -2

>> plot(t,y,'r'), grid on -3

-5 0 5

h) x ( t )=2 cos ( 4 t ) sen (12 t) ; 2

1.5

0.5

>> t=[-20:0.01:30]; 0

-0.5
>> y=2.*cos(4*pi.*t).*sin(12*pi.*t); -1

>> plot(t,y,'r'), grid on -1.5

-2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

1.5

i) x ( n )=cos (2 n 2) ;

1
UNIVERSIDAD TECNOLO GICA DEL PERU P gin 4

0.5
-20 -10 0 10 20 30
LABORATORIO N 01 P.D.S.

>> n=[-20:1:30];
>> x=cos(2*pi.*(n.^2));
>> plot(n,x,'r'), grid on

3.-Manejo de Seales VIC y VID


Dadas las seales h(t) y x[n] de la figura, calcule y grafique las siguientes
seales.

Funcion h(t)

function h=tri1(t)
%TRI1seal del ejercicio 3 de la prctica 1
h=(t+1).*(t >= -1 & t < 1) + (-t+3).*(t >= 1 & t < 3);

Funcion u(t)

function l=u(t)

l=(1).*(t>=0);

Funcion x(n)

function x=dis(n)

x= (0).*(n<0 & n>4)+1.*(n<5 & n>-1);

2.5

a) h(t+1) 2

1.5

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 5


1

0.5

-0.5

-1
-3 -2 -1 0 1 2 3
LABORATORIO N 01 P.D.S.

>> t=[-2:0.001:8];
>> h=tri1(t+1);
>> plot(t,h)
>> grid on
>> axis([-3 3 0 2])

b) h(2t-3) 2.5

>> t=[-2:0.001:8];
1.5

>>h=tri1(2*t-3); 0.5

>>plot(t,h) 0

>>grid on
-0.5

-1
0 0.5 1 1.5 2 2.5 3 3.5 4

1 1

c) 2h(- (t+10)) 0.8

2 0.6

0.4

0.2

>> t=[-2:0.001:8]; 0

-0.2

>> h=tri1((-t/2) - 5); -0.4

>> plot(t,h)
-0.6

-0.8

>>grid on -1
-2 -1 0 1 2 3 4 5 6 7 8

t
d) h( ) [u(t+2)-u(t-2)] 3

2 2.5

1.5

>> t=[-2:0.001:8]; 1

>> h=tri1(t/2).*[u(t+2)-u(t-2)]; 0.5

>> plot(t,h) 0

-0.5

>> grid on -1
-3 -2 -1 0 1 2 3

e) h(t^2)
3

2.5

>> t=[-2:0.001:8]; 2

>> h=tri1(t.^2); 1.5

>> plot(t,h) 0.5

>> grid on 0

-0.5

-1
-3 -2 -1 0 1 2 3

2.5

f) h(t.^-1) 2

1.5

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 6


1

0.5

-0.5

-1
-3 -2 -1 0 1 2 3 4 5
LABORATORIO N 01 P.D.S.

>> t=[-2:0.001:8];
>> h=tri1(t.^-1);
>> plot(t,h)
>> grid on

1.5

g) x(n-1) 1

>> n=[-10:1:10]; 0.5

>> x=dis(n-1); 0

>> stem(n,x)
>> grid on -0.5
-2 0 2 4 6 8

1.5

h) x(2n)
1

>> n=[-10:1:10]; 0.5

>> x=dis(2*n);
0
>> stem(n,x)
>> grid on -0.5
-3 -2 -1 0 1 2 3 4 5 6

1.5
i) x( n2 )
1

>> n=[-10:1:10];
0.5
>> x=dis(n.^2);
>> stem(n,x) 0

>> grid on
-0.5
-5 0 5

1 n
j) {x [ n ] + (1 ) x [n]} 1.5
2
1

>> n=[-10:1:10];
0.5
>> x=(1/2).*(dis(n)+((-1).^n).*dis(n));
>> stem(n,x) 0

>> grid on
-0.5
-2 0 2 4 6 8
1.5

0.5

0
UNIVERSIDAD TECNOLO GICA DEL PERU P gin 7
-0.5

-1

-1.5
-3 -2 -1 0 1 2 3 4 5 6
LABORATORIO N 01 P.D.S.

k) Impar {h(t)}

>> t=[-2:0.001:8];
>> h=(tri1(t)-tri1(-t))./2;
>> plot(t,h)
>> grid on

l) Par {x ( n)} 1.5

>> n=[-5:1:8];
>> x=(dis(n)+dis(-n))./2; 0.5

>> stem (n,x) 0

>> grid on
-0.5
-6 -4 -2 0 2 4 6

function h=tri1(t)

h=(t+1).*(t>=-1&t<1)+(-t+3).*(t>=1&t<3);

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 8


LABORATORIO N 01 P.D.S.

t=[-2:.001:8];
h=tri1(2*t-3);
plot(t,h),grid on;

6.- a).- Genere dos secuencias de 1000 nmeros aleatorios con


distribucin normal estndar, y grafquelas.
>> r1=rand(1,1000);
>> r2=rand(1,1000);
>> figure(1), plot(r1), axis([0,1000,-0.5,1.5])
>> figure(2), plot(r2), axis([0,1000,-0.5,1.5])

1.5 1.5

1 1

0.5 0.5

0 0

-0.5 -0.5
0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000

Figure(1) Figure(2)
6.- b).-Obtenga los histogramas correspondientes a las
secuencias anteriores. Utilice 10 celdas.

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 9


LABORATORIO N 01 P.D.S.

>> r1=rand(1,1000);
>> r2=rand(1,1000);
>> figure(1), hist(r1,10)
>> figure(2), hist(r2,10)

140

120

100

80

60

40

20

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Figure (1)

120

100

80

60

40

20

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Figure (2)

7.- Manipulacin de Voz

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 10


LABORATORIO N 01 P.D.S.

Reproduccin de la voz y grfica.

>> close all


>> [x,fs,n]=wavread('sonido2.wav');
>> sound(x,fs)
>> t=1:1:length(x);
>> figure(1)
>> plot(t,x)

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8
0 1 2 3 4 5 6 7 8 9 10
4
x 10

Reflexin

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 11


LABORATORIO N 01 P.D.S.

>> xi=x(length(x):-1:1);
>> t=1:1:length(xi);
>> sound(xi,fs)
>> plot(t,xi)

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8
0 1 2 3 4 5 6 7 8 9 10
4
x 10

Compresin y expansin de la voz


sound(x,2*fs)

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 12


LABORATORIO N 01 P.D.S.

sound(x,0.5*fs)

r1=rand(1,1000);
r2=rand(1,1000);
subplot(221),plot(r1),subplot(222),plot(r2)
hist(r1)
hist(r2)
hist(r2,10)
hist(r2,20)
hist(r2,10)

r1=rand(1,1000);
r2=rand(1,1000);
subplot(221),plot(r1),subplot(222),plot(r2)
hist(r1)

r1=rand(1,100000);
hist(r1)

r1=rand(1,1000);
hist(r2)

r1=rand(1,1000);
plot(r1)
hist(r1)

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 13


LABORATORIO N 01 P.D.S.

CONCLUSIONES

Concluimos que podemos trabajar con las seales aplicndoles


procesos para poder manejarlas a como las deseemos.

Tambin concluimos que una seal se puede analizar tanto en el


dominio del tiempo como de la frecuencia

Podemos realizar modificaciones a un audio para procesarlo y emitir otro


tipo de sonido, ya sea a menor o mayor velocidad, o poder invertir el
audio.

UNIVERSIDAD TECNOLO GICA DEL PERU P gin 14

También podría gustarte