Beruflich Dokumente
Kultur Dokumente
Integrantes:
Bozzeta de la Cruz, Fernando 1531526
Santos Mendoza, Ricardo 1212474
Teymundo Crisostomo, Giovanni 1120006
2018
Procesamiento Digital de Señales “UTP 2018-II”
c. Filtrado:
∫ ( ) ( ) ( )
I. ∫ ( )
= ( )|
= u( ) ( )
II. ∫ ( ) ( )
∫ ( ) (( )( ))
∫ ( ) ( )
∫ ( ) ( )
III. ∫ ( ) (( ) )
∫ ( ) ( )
∫ ( ) ( )
( ) ( )
( ) ( )
2
Procesamiento Digital de Señales “UTP 2018-II”
1. ( ) ( )
a) Programa:
t = -50:0.01:50;
x = -2*sin(-0.2*t + 5/3*pi);
plot(t,x,'m'),grid on
b) Gráfico:
𝜋
𝜔
𝑇
𝜋
0
𝑇
𝑇 0𝜋
2. ( ) ( )
a) Programa:
n = -50:0.01:50;
x = -2*sin(-0.2*n + 5/3*pi);
plot(n,x,'m'),grid on
b) Gráfico:
3
Procesamiento Digital de Señales “UTP 2018-II”
3. ( ) [ ( )]
a) Programa:
t = -5:0.1:5;
x = 0.5*((cos(2*t - pi/4)).^2);
plot(t,x,'m'),grid on
b) Gráfico:
𝜋
𝜔
𝑇
𝜋
4
𝑇
𝑇 𝜋
4. ( ) [ ( )]
a) Programa:
t = -5:0.01:5;
x = 0.5*cos(2*t.^2 - pi/4);
plot(t,x,'m'),grid on
b) Gráfico:
4
Procesamiento Digital de Señales “UTP 2018-II”
( )
5. ( )
a) Programa:
t=[-10:0.01:10];
x=exp(j*((pi/2)*t)-pi);
plot3(real(x),imag(x),t,'m'), grid on
b) Gráfica:
( )
6. ( )
a) Programa:
n=[-40:1:40];
x=exp(j*((n/2)-pi));
stem3(real(x),imag(x),n,'m'), grid on
b) Gráfica:
5
Procesamiento Digital de Señales “UTP 2018-II”
7. ( ) ( ) ( )
a) Programa:
t = -10:0.01:10;
x = 2*cos(2*pi*t) + sin(10*t);
plot(t,x,'m'),grid on
b) Grafica:
8. ( ) ( ) ( )
a) Programa:
t = -1:0.01:1;
x = 2*cos(4*pi*t).*sin(12*pi*t);
plot(t,x,'m'),grid on
b) Grafica:
6
Procesamiento Digital de Señales “UTP 2018-II”
9. ( ) ( )
a) Programa:
n = -4:1:4;
x = cos(2*pi*n.^2);
stem(n,x,'m‟),grid on
b) Grafica:
7
Procesamiento Digital de Señales “UTP 2018-II”
a) ( )
* Edit:
fuction h=tri1(t)
h = (t+1).*(t >= -1 & t < 1) + (-t+3).*(t >= 1 & t < 3);
* Command Window:
t=[-8:.001:8];
h=tri1(t+1);
plot(t,h,'r‟), grid on
* Gráfica:
1.8
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
-8 -6 -4 -2 0 2 4 6 8
b) ( )
* Edit:
fuction h=tri1(t)
h = (t+1).*(t >= -1 & t < 1) + (-t+3).*(t >= 1 & t < 3);
* Command Window:
t=[-8:.001:8];
h=tri1(2*t-3);
plot(t,h,'r‟), grid on
8
Procesamiento Digital de Señales “UTP 2018-II”
* Gráfica:
1.8
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
-8 -6 -4 -2 0 2 4 6 8
c) ( 0 ( 0))
*Edit:
fuction h=tri1(t)
h = (t+1).*(t >= -1 & t < 1) + (-t+3).*(t >= 1 & t < 3);
* Command Window:
t=[-14:.001:14];
h=tri1((0.5).*(t+10));
plot(t,h,'r‟), grid on
* Gráfica:
3.5
2.5
1.5
0.5
0
-15 -10 -5 0 5 10 15
9
Procesamiento Digital de Señales “UTP 2018-II”
d) ( ⁄ )[ ( ) ( )]
* Edit:
----------------------------------------------------------------------------------------------------------------
fuction h=tri1(t)
h = (t+1).*(t >= -1 & t < 1) + (-t+3).*(t >= 1 & t < 3);
----------------------------------------------------------------------------------------------------------------
fuction R=escalon(t)
R=1*(t>=0);
----------------------------------------------------------------------------------------------------------------
* Command Window:
t=[-12:.001:12];
h=tri1(t/2).*(escalon(t+2)-escalon(t-2));
plot(t,h,'r‟), grid on
* Gráfica:
1.8
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
-15 -10 -5 0 5 10 15
e) ( )
*Edit:
fuction h=tri1(t)
h = (t+1).*(t >= -1 & t < 1) + (-t+3).*(t >= 1 & t < 3);
* Command Window:
t=[-8:.001:8];
h=tri1(t.^2);
plot(t,h,'r‟), grid on
10
Procesamiento Digital de Señales “UTP 2018-II”
* Gráfica:
1.8
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
-8 -6 -4 -2 0 2 4 6 8
f) ( ⁄)
*Edit:
fuction h=tri1(t)
h = (t+1).*(t >= -1 & t < 1) + (-t+3).*(t >= 1 & t < 3);
* Command Window:
t=[-8:.001:8];
h=tri1(1./t);
plot(t,h,'r‟), grid on
* Gráfica:
1.8
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
-8 -6 -4 -2 0 2 4 6 8
11
Procesamiento Digital de Señales “UTP 2018-II”
g) [ ]
*Edit:
fuction h=delta(n)
h = 1*(n==0)+1*(n==1)+1*(n==2)+ 1*(n==3)+ 1*(n==4)+ 1*(n==5);
* Command Window:
t=[-3:1:10];
x=delta(n-1);
stem(n,x,'r‟), grid on
* Gráfica:
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-4 -2 0 2 4 6 8 10
h) [ ]
*Edit:
fuction h=delta(n)
h = 1*(n==0)+1*(n==1)+1*(n==2)+ 1*(n==3)+ 1*(n==4)+ 1*(n==5);
* Command Window:
t=[-3:1:10];
x=delta(2*n);
stem(n,x,'r‟), grid on
12
Procesamiento Digital de Señales “UTP 2018-II”
* Gráfica:
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-4 -2 0 2 4 6 8 10
i) [ ]
*Edit:
fuction h=delta(n)
h = 1*(n==0)+1*(n==1)+1*(n==2)+ 1*(n==3)+ 1*(n==4)+ 1*(n==5);
* Command Window:
t=[-3:1:10];
x=delta(n.^2);
stem(n,x,'r‟), grid on
* Gráfica:
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-4 -2 0 2 4 6 8 10
13
Procesamiento Digital de Señales “UTP 2018-II”
j) ⁄ ( [ ] ( ) [ ])
*Edit:
fuction h=delta(n)
h = 1*(n==0)+1*(n==1)+1*(n==2)+ 1*(n==3)+ 1*(n==4)+ 1*(n==5);
* Command Window:
t=[-3:1:10];
x=0.5*(delta(n)+((-1).^n).* delta(n));
stem(n,x,'r‟), grid on
* Gráfica:
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-4 -2 0 2 4 6 8 10
k) ( ( ))
*Edit:
fuction h=tri1(t)
h = (t+1).*(t >= -1 & t < 1) + (-t+3).*(t >= 1 & t < 3);
* Command Window:
t=[-8:.001:8];
h=(tri1(t)- tri1(-t))/2;
plot(t,h,'r‟), grid on
14
Procesamiento Digital de Señales “UTP 2018-II”
* Gráfica:
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
-8 -6 -4 -2 0 2 4 6 8
l) ( [ ])
*Edit:
fuction h=delta(n)
h = 1*(n==0)+1*(n==1)+1*(n==2)+ 1*(n==3)+ 1*(n==4)+ 1*(n==5);
* Command Window:
n=[-4:1:10];
x=(delta(n)+ delta(-n))/2;
stem(n,x,'r‟), grid on
* Gráfica:
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-4 -2 0 2 4 6 8 10
15
Procesamiento Digital de Señales “UTP 2018-II”
I. [ ] ( ) [ ]
0
∑ [( ) ]
∑[( )
( ) ( ) ( )
( 4 )
( 4)
II. ( ) ( )
| |
∫
[ ]|
0
[ ]
0
4
16
Procesamiento Digital de Señales “UTP 2018-II”
0
4
0
4
| |
∫
[ ]|
0
[ ]
III. ( )
( )
0 0
0
*
4
[ ]|
0
4 0
4 0
17
Procesamiento Digital de Señales “UTP 2018-II”
IV. ( ) ( )
0
[ ]
∫ | |
∫ ( )
4
[ ]|
4 0
V. [ ] ( )
∑( ( ))
∑( ( ))
( )
18
Procesamiento Digital de Señales “UTP 2018-II”
* Código:
r1=randn(1,1000); %secuencia nº1 “distribución normal”
figure;plot(r2);axis([0,1000,-4,4])
figure; hist(r1,10)
figure; hist(r2,10)
19
Procesamiento Digital de Señales “UTP 2018-II”
* Código:
r1=rand(1,1000); %secuencia nº1 “distribución uniforme”
figure;plot(r2);axis([0,1000,-4,4])
figure; hist(r1,10)
figure; hist(r2,10)
20
Procesamiento Digital de Señales “UTP 2018-II”
*Método 1:
%Voz de hombre
21
Procesamiento Digital de Señales “UTP 2018-II”
*Método 2:
% Voz de Hombre SEGUNDO METODO
[A,Fs,bits] = wavread('holaHombre');
siz = wavread('holaHombre','size');
t = 0:1:siz-1;
figure(1)
plot(t,A)
grid on
S=fft(A,1024);
f=(0:511)/512*(Fs/2);
Y=abs(S(1:512));
figure(2)
plot(f,Y)
grid on
B=find(Y==max(Y))
frec=f(B)
str=num2str(frec)
h=legend('frecmax=',str,1');
22
Procesamiento Digital de Señales “UTP 2018-II”
*Metodo 3:
%Voz de Mujer
x=wavread('holaMujer'); %archivo de audio
figure(1)
plot(x) %grafica en el dominio del tiempo
grid on
Y=fft(x); %transformada de fourier
A=Y.*conj(Y); %potencia de la señal
f=(100:4000); %espectro de frecuencia
figure(2)
plot(f,A(1:3901)) %grafica en el dominio de la frecuencia
grid on
Figura 1: Gráfica en el dominio del tiempo
23