0% found this document useful (0 votes)
102 views12 pages

1 Objectives: First Unit: Speach Processing

This document summarizes a lab experiment on speech processing and audio signal filtering. The objectives were to use Matlab tools to design filters and process audio signals to reduce noise. Key concepts covered include the Nyquist theorem, additive noise modeling, the fast Fourier transform (FFT), and different types of filters like low-pass, high-pass, and band-pass. Practical exercises included adding noise to signals, analyzing voice recordings in time and frequency domains, and using filters to remove noise and isolate or eliminate specific tones from voiced audio. Filters were designed using Matlab's fdatool and applied to processed signals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views12 pages

1 Objectives: First Unit: Speach Processing

This document summarizes a lab experiment on speech processing and audio signal filtering. The objectives were to use Matlab tools to design filters and process audio signals to reduce noise. Key concepts covered include the Nyquist theorem, additive noise modeling, the fast Fourier transform (FFT), and different types of filters like low-pass, high-pass, and band-pass. Practical exercises included adding noise to signals, analyzing voice recordings in time and frequency domains, and using filters to remove noise and isolate or eliminate specific tones from voiced audio. Filters were designed using Matlab's fdatool and applied to processed signals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

First Unit: Speach Processing

January 18, 2020

Lab 1
Group: IET7-1 Mark:
Students:
MARIO VALENCIA ESPINO
CARLOS QUISPE NUÑEZ

1 Objectives
• Used data acquisition systems for audio processing.

• Design filters with the fdatool from Matlab.


• Process audio signals to reduce noise.

2 Theory
2.1 Nyquist Theorem
Nyquist theorem is a fundamental theorem in way of digitalizing signals. Mainly, it ensures a correct
sampling time Ts to adequately discretize signals. Given a baseband signal with maximum frequency f ,
then

fs ≥ 2f (1)
1
where fs = Ts is the sampling frequency.

2.2 Additive Noise


A common assumption is to model the noise r(t) as additive signal, so that the signal under consideration
can be express as follows

y (t) = x (t) + r (t) (2)


in general, if x (t) is samples at every Ts steps, the sampled points are

y (nTS ) = [y (Ts ) ; y (2Ts ) ; · · · ; y (nTs )] (3)


or considering a simplified version of Eq. 3

y [n] = [y [1] ; y [2] ; · · · ; y [n]] (4)

1
2.3 FFT
Fast Fourier Transform (FFT) is a tool to map time domain signals, like voice or audio signals, to the
frequency domain. It is defined as:
N
X 2πj
X (k) = x [n] e− N (n−1)(k−1) (5)
n=1

or its inverse transform IFFT


N
1 X 2πj
x [n] = X (k) e N (n−1)(k−1) (6)
N
k=1

Example 1: generate some seconds of a two-tone signal with frequencies f1 = 110Hz and f2 = 220Hz
with mixing coefficients w1 = 0.5 and w2 = 1, i.e.:

x(t) = w1 x1 (t) + w2 x2 (t) (7)


where x1 (t) and x2 (t) are sinusoidal signal at frequencies f1 and f2 , respectively. Use fs = 44.1KHz.
Command lines in Fig. 1 shows how to the F F T (x(t)) by employing fft command from Matlab.

L = length(x);
NFFT = 2^nextpow2(L);
Xf = fft(x,NFFT)/L;
%
f = fs/2*linspace(0,1,NFFT/2+1);
Xf_one = Xf(1:NFFT/2+1);
%
plot(f,2*abs(Xf_one))
xlabel(’f(Hz)’)
ylabel(’|X(f)|’)

Figure 1: Sequence of command in Matlab to plot FFT of x(t) in logarithmic scale.

2.4 Filters
The general form of a filter is given by

b0 + b1 z −1 + b2 z −2 + · · · + bq z −q
H (z) = (8)
1 + a1 z −1 + a2 z −2 + · · · + ap z −p
where z = e−jw and b = [b0 ; b1 ; · · · ; bq ] and a = [a0 ; a1 ; · · · ; ap ] are the filter coefficients.
In the context of audio processing, filters are systems that help us with elimination of noise or unwanted
frequencies. They are classified in:
• Low pass filters
• High pass filters
• Band pass filters
• Notchband filters
There are several ways of designing filters, however this lab guide focuses on next -most common- filters:
• Butterworth
• Chebyshev I

2
• Chebyshev II
• Eliptic

Every filter presents different characteristics resume in Tab.

Order n Rice
Butterworth high No
Chebyshev I moderate in pass band
Chebyshev II moderate in rejected band
Elliptic low both

Table 1: Main features of filters.

2.4.1 Filter design


Matlab offers several ways of designing filters, among them, the fdatool is the easiest way to configure a
filter and obtain its filter coefficients (Fig. 2)

Figure 2: fdatool GUI from Matlab.

Once the filter coefficients are obtained, the filter command can be used.

3
3 Practical
3.1 AWGN
1. Add AWGN noise r(t) to signal x(t) = sin(2πf1 t) with f1 = 100Hz

r(t) ∼ N µ, σ 2

(9)

where µ and σ 2 are the mean and variance of the signal which should be set to 0 and 0.2, respectively.
2. Plot the spectral power distribution of new signal y(t)

y(t) = x(t) + r(t) (10)

3. Design a LPF with cut frequency set to fc = 300Hz and make a comparison of both the x(t) and
y(t). Comment the observed differences in time domain and frequency domain.
(a) Filters to be used are those listed in Section 2.4.

3.2 Voice
1. 1 Record some seconds of your voice.

Usaremos el siguiente codigo para grabar nuestra voz.

Figure 3: Codigo para grabar audio.

Se usará el siguiente codigo para leer la voz grabada y le aplicaremos la transformada.

4
Figure 4: Leer el audio y sacar transformada

Representación de la señal de voz en el tiempo y frecuencia:


1. 2 Plot the baseband representations of the recorded signal.

Figure 5: Señal de la voz en dominio de tiempo y frecuencia

1. 3 Select an adequate cuto frequency and listen and compare to with the unfiltered one.

Se diseño un filtro paso bajo con una frecuencia de corte de 1000 para filtrar la señal de voz grabada.

5
Figure 6: Codigo para filtrar la señal

*Se obtiene que:

6
Figure 7: Señal filtrada y señal original

*La señal original esta siendo cortada desde los 1000 Hz gracias al LPF construido.

1. 4 Add Gaussian noise at different powers, represent it in the frequency domain.


Se añadira ruido a la señal original para eso se implemento el siguinete codigo.

Figure 8: Añadiendo ruido a la señal original

Se aplicara el proceso anterior para ver el comportamineto del filtrado pero ahora con ruido.6

7
1. 5 Select and adequate cuto frequency, play the filtered voice and comment the differences based on
the ploting in both domains time and frequency.

Figure 9: Señal con ruido filtrada

1. 6 Add a tone with frequency f1 outside the bandwidth of your voice (e.g. BW 2KHz) and design
a filter to eliminate such signal.

Se agregará un señal nueva a la señal de voz para luego con el uso de los filtros poder eliminarla

Figure 10: Codigo que genera otra señal

Mostramos la señal nueva en el dominio de la frecuencia junto con la señal de voz.

8
Figure 11: Señal de voz y tono nuevo en la frecuencia

Se implementará codigo para eliminar la señal de ruido agregada recien.

Figure 12: Codigo de filtrado de tono agregado

Se visualiza el comportamineto de la señal extra y su respuesta a la salida del filtro.

9
Figure 13: Señal de tono y voz es filtrada en la frecuencia

La señal de tono se filtra y como respuesta desaparece.


*El filtro usado fue un paso bajo, porque solo se necesitaba cortar una parte del espectro ya que el
tono agregado esta en los 2000 Hz.

Figure 14: Diseño de LPF para eliminar el tono extra

1. 7 Add a tone with a frequency f2 inside the bandwidth of your voice and design a filter to eliminate
such signal.

Se incluira el tono extra en una parte del espectro que solape con la señal original de la voz para despues
poder eliminar cierta señal con el uso de un filtro sin alterar mucho la señal original de la voz.

10
Figure 15: Codigo para agregar el tono en la banda de la señal de voz

Figure 16: Señal mas tono agregado en banda de 500Hz

La señal es sometida a un filtro rechaza banda porque solo se se necesitaba cortar una parte del espectro
ya que el tono agregado esta en los 600 Hz.

11
Figure 17: Diseño del filtro rechaza banda

Señal resultante a la salida del filtro.

Figure 18: Señal original en el espectro

Se obtiene la señal de voz pero con una parte recortada.

4 Conclusiones
• Los filtros son una herramienta para el tratamiento y procesado de señales, con estos podemos
rechazar,pasar o cortar partes de la señal que solo queremos tener, existen variedades de filtros y
cada uno de estos tienen comportamientos distintos.
• Al añadir ruido a una señal es un caso cotidiano real, al momento de transmitir el ruido esta siempre
presente, las señales transmitidas nunca estan completamnete limpias, para lo cual se usan los filtros
para dar soluciones.

12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy