Download laboratorio de señales y comunicaciones

Document related concepts
no text concepts found
Transcript
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
LABORATORIO DE SEÑALES Y
COMUNICACIONES
Ingeniería Técnica de Telecomunicación
Sistemas de Telecomunicación
Apellidos
Nombre
No de matrícula o DNI
Grupo
MAÑANA [ ]
Firma
19-VI-04
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
19-VI-04
LABORATORIO DE SEÑALES Y COMUNICACIONES
(Tiempo: 1 hora y 30 minutos.)
No
No escriba en las zonas con recuadro grueso
1
Apellidos
2
Nombre
o
N de matrícula o DNI
Grupo
Firma:
3
4
T
NOTA: En el anexo, al final del examen, están las ayudas de
MATLAB para todas las funciones que se utilizan a lo largo de las
distintas preguntas.
E1.- El señor González trabaja en una empresa que desarrolla sistemas digitales.
Una parte de su trabajo consiste en lo siguiente: a partir de una entrada d[n] a un
Sistema Lineal e Invariante en el Tiempo Discreto, determinar la salida y[n]
correspondiente. González decide usar MATLAB para calcular y representar y[n] en
el rango 0 ! n ! 5 . Para ello implementa el siguiente código:
>> d=[1 1 2 2 0 0];
>> n=0:5;
>> a=1;
>> b=[1 1 -1];
>> y=filter(b,a,d);
>> stem(n,y);
¿Cuál será el valor de y[n] para n=3?.(2 puntos).
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
19-VI-04
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
19-VI-04
E.2
a) Sea una señal x(t) de frecuencia fc=100Hz y muestreada a una frecuencia de
fs=1Khz, cuyo espectro en frecuencia entre 0 y fs es el que sigue:
Se le aplica un diezmado por 2 (se toma 1 dato de cada 2) usando la función
X1=decimate(X,2).
Cual de los siguientes espectros en frecuencia es correcto y corresponde a la
nueva señal? Justifique su respuesta (2 puntos).
1)
2)
3)
4)
b) Si la señal fuese de 300hz., en vez de 100hz., sería posible realizar el
diezmado? Justifique su respuesta (1 punto).
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
19-VI-04
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
19-VI-04
E3.- Dada la siguiente secuencia de instrucciones de Matlab:
bits=rand(1,50)<0.5;
bits_unip=wave_gen(bits,'unipolar_nrz');
oscilador=osc(5000);
tx=mixer(bits_unip,oscilador);
rx=channel(tx,1,0,40e3);
rx_bb=mixer(oscilador,rx);
rx_ad=conv(rx1,filtro_adaptado_unipolar_nrz);
Se pide:
a) Explique qué realiza cada línea de código del programa. Para ello, dibuje un
diagrama de bloques del sistema simulado. (1.5 puntos)
b) A continuación se muestran las figuras de las PSD’s de las señales
bits_unip, tx, rx_bb y rx_ad. Indique a qué señal corresponde cada una de
las PSD’s justificando su respuesta. (Nota: la tasa binaria es Rb=1000 bps)
(1.5 puntos)
PSD Function
0
PSD Function
0
10
10
-2
10
-2
10
-4
]
-4
W 10
[
]
W
[
r
e
w
o
P
r
e
w
o
P
-6
10
10
-6
10
-8
10
-8
10
-10
10
-10
10
-12
10
-12
10
-14
0
5
10
15
20
25
30
Frequency [kHz]
35
40
45
10
50
0
5
10
15
20
25
30
Frequency [kHz]
PSD 1
40
45
50
PSD 2
PSD Function
0
35
PSD Function
2
10
10
-2
10
0
10
-4
]
W
[
r
e
w
o
P
10
]
-2
W 10
[
-6
10
r
e
w
o
P
-8
10
-4
10
-6
10
-10
10
-8
10
-12
10
-14
10
-10
0
5
10
15
20
25
30
Frequency [kHz]
35
40
45
PSD 3
50
10
0
5
10
15
20
25
30
Frequency [kHz]
35
40
45
PSD 4
50
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
19-VI-04
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
19-VI-04
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
19-VI-04
E4.- Se transmite una secuencia binaria por un canal que añade ruido aditivo,
blanco y gaussiano. Se pide:
a) Escriba una función que estime la probabilidad de error de un sistema a
partir de la secuencia de bits transmitida y la recuperada. (1 punto)
b) Suponga que en la transmisión de 1000 bits por este canal se recuperan
todos correctamente. ¿Qué valor devuelve su función? ¿Cómo interpretaría
este resultado? (1 punto)
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
19-VI-04
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
ANEXO
FILTER One-dimensional digital filter.
Y = FILTER(B,A,X) filters the data in vector X with the
filter described by vectors A and B to create the filtered
data Y. The filter is a "Direct Form II Transposed"
implementation of the standard difference equation:
a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
- a(2)*y(n-1) - ... - a(na+1)*y(n-na)
If a(1) is not equal to 1, FILTER normalizes the filter
coefficients by a(1).
FILTER always operates along the first non-singleton dimension,
namely dimension 1 for column vectors and non-trivial matrices,
and dimension 2 for row vectors.
[Y,Zf] = FILTER(B,A,X,Zi) gives access to initial and final
conditions, Zi and Zf, of the delays. Zi is a vector of length
MAX(LENGTH(A),LENGTH(B))-1, or an array with the leading dimension
of size MAX(LENGTH(A),LENGTH(B))-1 and with remaining dimensions
matching those of X.
FILTER(B,A,X,[],DIM) or FILTER(B,A,X,Zi,DIM) operates along the
dimension DIM.
DECIMATE Resample data at a lower rate after lowpass filtering.
Y = DECIMATE(X,R) resamples the sequence in vector X at 1/R times the
original sample rate. The resulting resampled vector Y is R times shorter,
LENGTH(Y) = LENGTH(X)/R.
DECIMATE filters the data with an eighth order Chebyshev Type I lowpass
filter with cutoff frequency .8*(Fs/2)/R, before resampling.
Y = DECIMATE(X,R,N) uses an N'th order Chebyshev filter.
Y = DECIMATE(X,R,'FIR') uses the 30 point FIR filter generated by
FIR1(30,1/R) to filter the data.
Y = DECIMATE(X,R,N,'FIR') uses the N-point FIR filter.
Note: For large R, the Chebyshev filter design might be incorrect
due to numeric precision limitations. In this case, DECIMATE will
use a lower filter order. For better anti-aliasing performance, try
breaking R up into its factors and calling DECIMATE several times.
See also INTERP, RESAMPLE.
help wave_gen
WAVE_GEN .... Generates a waveform coded in binary signalling formats.
X = WAVE_GEN(B,LINECODE,Rb) will generate samples of the time
19-VI-04
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
waveform X using LINECODE binary signalling format.
The allowed selections for the LINECODE parameter are:
'unipolar_nrz' 'unipolar_rz' 'polar_nrz'
'polar_rz'
'bipolar_nrz' 'bipolar_rz'
'manchester'
'triangle'
'nyquist'
'duobinary'
'mod_duobinary'
B : binary input sequence.
Rb : binary data rate specified in Hz, e.g 2000.
The pulse amplitude is set to 1 such that any other scaling
has to be done externally.
X = WAVE_GEN(B,LINECODE) is the same but uses the default binary data
rate specified by the variable "BINARY_DATA_RATE".
[X,t] = WAVE_GEN(...) returns sampled values of the waveform,
where X is the sampled values and "t" is the vector of
time values at which the samples in "X" are defined.
See alse WAVEPLOT..
help osc
OSC .........
Sinusoid generating oscillator.
OSC(fc,Phase) generates the sinusoidal waveform:
sin(2*pi*fc*t + Phase);
OSC(fc) assumes Phase = 0.
help mixer
MIXER ....... Mix (multiply) two input sequences.
Z = MIXER(X,Y) generates the sequence Z such that: Z(n) = X(n)*Y(n).
help channel
CHANNEL ..... Defines a communications channel and generates the channel
output for a given input sequence.
19-VI-04
EPS-UCIIIM
Departamento de Teoría de Señal y Comunicaciones
[Y] = CHANNEL(X,GAIN,NOISE_POWER,BANDWIDTH) generates the
sequence Y from the input sequence X based on a transmission
channel with frequency response H(f):
Noise
|
+-----------+
v
X --------->| H(f) |----------- + ----> Y
+-----------+
where 2
|H(f)| = { GAIN, |f| in BANDWIDTH;
( 0,
otherwise.
arg(H(f) = -2*pi*f, |f| in BANDWIDTH.
If BANDWIDTH = [f_cutoff] then channel is low-pass type, and
if BANDWIDTH = [fl, fu] then channel is band-pass type.
The channel noise is Gaussian(0,NOISE_POWER).
CHANNEL(...) with no output arguments displays the magnitude and
phase response functions of H(f).
help conv
CONV Convolution and polynomial multiplication.
C = CONV(A, B) convolves vectors A and B. The resulting
vector is length LENGTH(A)+LENGTH(B)-1.
If A and B are vectors of polynomial coefficients, convolving
them is equivalent to multiplying the two polynomials.
See also DECONV, CONV2, CONVN, FILTER and, in the Signal
Processing Toolbox, XCORR, CONVMTX.
Overloaded methods
help gf/conv.m
19-VI-04