˜ ALES Y SISTEMAS I. UNIVERSIDAD NACIONAL DE COLOMBIA, SEN
1
Se˜ Senales n˜ ales y sistemas I - Taller 1. Juan Camilo Ram´ırez ırez Gonz´alez alez
[email protected] [email protected]
1. CT, DT and digital signals concepts.
Debi Debido do a que que es una una func funciion o´ n finita finita esta esta repres represent entaa una se˜ senal n˜ al de energ´ energ´ıa. ıa.
1.1. Given is the following sequence of bits where a7 = 1 corresponds for a nonnegative number, and a7 = 0 for a negative number:
c) x(t) = 10sin(2πt ) ∞
2
a0
a1
2
−
−
2
1
a2
2
a3
0
2
a4
1
2
a5
2
3
2
a6
a7
4
signbit
2
a) If the sequence sequence to be transm transmitt itted ed is 011010 01101011, 11, find its decimal equivalent. De acuerdo con la secuencia presentada es posible obtener qu´ que: e´ :
−∞
1 lim T 2T →∞
T
100sin2 (2πt )dt = 50 T
−
De acuerdo con la resoluci on o´ n delas anteriores ecuaciones esta es una se nal n˜ al de potencia. d) x(t) = 10e2t .
(2 2 ∗ 0) + (2 1 ∗ 1) + (20 ∗ 1) + (21 ∗ 0) + (22 ∗ 1) + (23 ∗ 0) + (24 ∗ 1) = 21.5 −
100sin2 (2πt )dt = ∞
−
Y debido a que el bit de signo es 1, es un n umero u´ mero no negativo y por lo tanto:
∞
−∞
1 lim T 2T →∞
01101011 → 21.5 b) Compute Compute the number number of quantizati quantization on levels. levels. El nivel de cuantizaci on o´ n es la cantidad de valores posible que puede tomar el n´umero umero que se analiza, que en este 8 caso ser´ ser´ıa ıa igual a 2 = 256 c) How large is the quantizat quantization ion step? En este caso se hace referencia al valor m´ınimo ınimo que puede −2 tomar la secuencia, siendo este 2 .
100e4t dt = ∞ T
100e4t dt = ∞
T
−
Acor Acorde de con con lo ante anteri rior or no es se˜ senal n˜ al de ener energ g´ıa ni de potencia. 1.3. Find the even and odd parts of the following signals: a) z (t) = t 2 + 4t − 10 Partes pares: t 2 , −10. Partes impares: 4 t. b) h(t) as shown shown in Figure 1.
1.2. Determine whether the following signals are energy or power signals (or if they are not): a) x(t)=sinc(t)= x(t)=sinc(t)= sint . t ∞
−∞
1 lim T 2T →∞
sin2 t dt = π t2
T T
−
sin2 t dt = 0 t2
Por lo tanto es una se nal n˜ al de energ´ energ´ıa. ıa. b) x(t) = 2[u(t)-u 2[u(t)-u(t-4 (t-4)] )] where u(t) corresponds corresponds to the unit step function.
Figura 1: Signal h(t) for Exercise 1.3. Se define la senal n˜ al de la figura 1 como:
˜ UNIVERSIDAD NACIONAL DE COLOMBIA, SENALES Y SISTEMAS I.
h(t) = u (t) − u(t − 1) Siendo posible encontrar su parte impar como sigue:
1 Odd[h(t)] = [h(t) − h(−t)] 2 1 Odd[h(t)] = [u(t) − u(t − 1) − u(−t) + u(−t + 1)] 2 E igualmente su parte par como se muestra a continuaci o´ n:
Even[h(t)] =
1 [h(t) + h(−t)] 2
1 [u(t) − u(t − 1) + u(−t) − u(−t + 1)] 2 1 Even[h(t)] = [1 − u(t − 1) − u(−t + 1)] 2 1 Even[h(t)] = [u(t + 1) − u(t − 1)] 2
Even[h(t)] =
1.4. Engineering design problem. Consider a DT signal x[n] decomposed into its even and odd parts x [n] = x e [n] + xo [n]. Let xr [n] be the part of x[n] that occurs for n ≥ 0:
x[n] x [n] = 0
n≥0
r
otherwise
Let x l [n] represent the part of x [n] that occurs for n < 0 :
x[n] x [n] = 0
n < 0
l
•
2
No es posible determinar x [0] a partir de la informaci o´ n dada, ya que xo [0] = 0 y xl [0] = 0. De esta manera, es imposible reconstruir x [n] a partir de xo [n] y x l [n]. 1.5. Determine if each of the following signals is periodic or not. If it is, find the fundamental period. a) x[n] = sin[0.9n] → Dado que su frecuencia angular no es multiplo de π la se˜nal no es periodica. b) x(t) = 2 + cos (0.6t) + 2sin(3.6t) → Es peri´odica, con un periodo fundamental T 0 = 02.π6 ≈ 10, 47s siendo este el m´as grande entre las componentes periodicas. c) x(t) = 4e(5+2j )t → Esta sen˜ al no es peri o´ dica debido a que posee una parte real. 2 π 3
3 π 4
d) x[n] = e j n + ej n → Es peri´odica siendo su periodo el mayor entero entre las dos componentes, T 0 = 2kπ = 83k , de esta manera cuando k = 6 su periodo fundamental ser a´ T 0 = 16s. 3π 4
2. Signal transformation. 2.1. Express each of the following signals in terms of singularity functions (impulses,steps, ramps, etc): a)
0 8 x(t) = 2t + 6 0
t < 0
0 < t < 2 2 < t < 6 t > 6
La expresion ´ que representa dicha se n˜ al es la siguiente:
otherwise
Is it possible to determine x[n] (for all n) from xe [n] and xr [n]? If yes, explain a procedure for doing so. If no, explain why not.
x(t) = 8u(t)+ 2r (t − 2)+2u(t − 2) − 2r(t − 6) − 18u(t − 6) b) x[n] as shown in Figure 2.
Inicialmente:
x[n] = x r [n] → n ≥ 0 Debido a que xo [n] = x[n] − xe [n], as´ı se concibe que xo [n] = xr [n] − xe [n] para n ≥ 0. Posteriormente para n < 0 se utiliza la propiedad de que xo [n] es siempre −xo [−n] para obtener que xo [n] = −xr [−n] + x e [−n] para n < 0. Una vez construido xo [n] para todo n, se reconstruye x[n] de la suma de xo [n] y xe [n]. Por lo tanto si es posible. •
Is it possible to determine x[n] (for all n) from xo [n] and xl [n]? If yes, explain a procedure for doing so. If no, explain why not.
Figura 2: Signal x[n] for Exercise 2.1.b). Se˜nal cuya respectiva expresi o´ n es:
˜ UNIVERSIDAD NACIONAL DE COLOMBIA, SENALES Y SISTEMAS I.
3
x[n] = 3δ [n] + 4 δ [n − 2] − 1.5δ [n − 3] d 2.2. Compute and graph dt [x(t)] for the signal x(t) = u (t) + u(t − 2) + r (t − 3) − 2r(t − 4).
Inicialmente realizamos la respectiva derivada de la se˜nal:
d [x(t)] = δ (t) + δ (t − 2) + u(t − 3) − 2u(t − 4) dt Para posteriormente hacer su correspondiente gr a´ fica.
Figura 5: Signal y1 (t) for Exercise 2.3.b.
y1 (t) = x (2t + 2) c) Determine an expression for y2 (t) in terms of x(t) (see Figure 6).
1
0.5
0
-0.5
-1 -2
-1
0
1
2
3
4
5
Figura 6: Signal y 2 (t) for Exercise 2.3.c. Figura 3: Graph for exercise 2.2.
2.3. CT Signal transformations.
y2 (t) = x (−t + 1) 2.4. DT signal transformations.
Figura 4: Signal x(t) for Exercise 2.3.
a) Express x(t) (Figure 4) in terms of singularity functions.
Figura 7: Signal for Exercise 2.4. For the signal shown in Figure 7:
x(t) = −r(t + 2) + 3r(t + 1) − 2r(t) − u(t − 2) b) Determine an expression for y1(t) in terms of x(t) (see Figure 5).
a) Write x [n] as a sum of singularity functions.
x[n] = −r [n + 3] + r [n] + 5 u[n] − r[n − 2] + r [n − 4]
˜ UNIVERSIDAD NACIONAL DE COLOMBIA, SENALES Y SISTEMAS I.
b) Sketch the signal y [n] = x [n − 3].
4
5
3
2
0 1
0
-1 -5 0
1
2
3
4
5
-2
Figura 10: Graph for exercise 3.1.a.
-3
0
2
4
6
Figura 8: Sketch y [n] = x [n − 3] for exercise 2.4.b. b) Compute and graph the signal c) Sketch the signal z [n] = x [n] − x[n − 1]. What does this signal represent?
e x (t) = 0
3t
−
−e
6t
−
t≥0
2
5
4
t < 0
3
in the time interval 0 ≤ t < 5 s, using a time increment of ∆t = 0.01s.
2
1
0
0.25
-1 -2
-4
-2
0
2
4
0.2
Figura 9: Sketch z [n] = x [n] − x[n − 1] for exercise 2.4.c. 0.15
Esta se˜nal es equivalente a la derivada de la se n˜ al x[n] en tiempo discreto.
0.1
0.05
3. Computer problems.
0 0
3.1. Introduction to signal representation in MATLAB
1
2
3
4
5
Figura 11: Graph for exercise 3.1.b.
In this exercise, we will explore methods of computing and graphing continuous-time signal models in MATLAB. c) Compute and graph the signal a) Compute the signal:
e x (t) = 0
3t
−
x1 (t) = 5sin(12t)
at 500 points in the time interval 0 ≤ t < 5 and graph the result.
−e
6t
−
t≥0
2
t < 0
in the time interval −2 ≤ t < 3 s, using a time increment of ∆ t = 0.01s.
˜ UNIVERSIDAD NACIONAL DE COLOMBIA, SENALES Y SISTEMAS I.
0.25
5
4 3.5
0.2 3 2.5
0.15
2 0.1
1.5 1
0.05 0.5 0 -2
0 -1
0
1
2
3
4
Figura 12: Graph for exercise 3.1.c.
4.5
5
5.5
6
6.5
7
7.5
8
Figura 14: Graph for exercise 3.1.e. f) Compute and graph the signal
d) Compute and graph the signal
x2 [n] = sin [0.2n] for the index range n = 0, 1, ..., 99. 1
e x (t) = 0
3t
−
−e
6t
0≤t≤1
−
3
otherwise
0.5
0
in the time interval −2 ≤ t < 3 s, using a time increment of ∆ t = 0.01s.
-0.5
-1 0
20
40
60
80
100
0.25
Figura 15: Graph for exercise 3.1.f. 0.2
g) Compute and graph the signal 0.15
sin[0.2n] x [n] = 0
0.1
n = 0,..., 39
3
0.05
otherwise
for the interval n = -20, ..., 39.
0 -2
-1
0
1
2
3
1
Figura 13: Graph for exercise 3.1.d. 0.5
Now, we will work with discrete-time signals using a stem plot to emphasize the discrete-time nature of the signal.
0
-0.5
e) Compute and graph the signal -1 -20
x1 [n] = {1.1, 2.5, 3.7, 3.2, 2.6}
-10
0
10
20
30
Figura 16: Graph for exercise 3.1.g.
40
˜ UNIVERSIDAD NACIONAL DE COLOMBIA, SENALES Y SISTEMAS I.
3.2 Periodic extension of a discrete-time signal
6
4 3.5
Sometimes a periodic discrete-time signal is specified using samples of one priod. Let x[n] be a length-N signal with samples in the interval n = 0,...,N − 1. Le us define the signal
3 2.5 2 1.5 1 0.5
∞
x ˜[n] =
x[n + mN ]
0 -15
m=−∞
-10
-5
0
5
10
15
Figura 18: Graph for exercise 3.2.a.
a) Complete the following code and use the resulting function ˜[n] for n = −15,..., 15 to graph the periodic extension x of a length-5 signal x[n] given by:
˜[n] in the same b) Compute a graph a time reversed version x interval. 4 3.5 3 2.5
x[n] = n
f or
n = 0, 1, 2, 3, 4
2 1.5 1 0.5 0 -15
-10
-5
0
5
10
15
Figura 19: Graph for exercise 3.2.b. 3.3. Using MATLAB, obtain an array representation for the first 100 values of the following sequence and make a stem plot. Additionally, compute its time constant. After how many samples the magnitude of the sequence decreases to less than 1% of its original value. And when |b| increases from 0.5 to 0.99?
x[n] = (−0.5)n
1
0.5
0
-0.5 0
Figura 17: Code for exercise 3.2.a.
20
40
60
80
Figura 20: Graph for exercise 3.3.a.
100
˜ UNIVERSIDAD NACIONAL DE COLOMBIA, SENALES Y SISTEMAS I.
7
Al cabo de 8 muestras la magnitud decrece por debajo del
Time Series Plot:
2.5
1% por lo tanto:
2
1.5
0.5 ∗ 0.1% = 0.005 x[8] = (−0.5)8 = 0 .0039
a t a d
1
0.5
Cuando | b| incrementa de 0.5 a 0.99 el resultado es:
0
-0.5 0
1
2
3
4
5
6
7
8
9
10
Time (seconds)
n
x[n] = ( −0.99)
Figura 23: Graph for exercise 3.4.b. Cuya respectiva gr´afica es: b) 1
0.5 Time Series Plot:
2.5
0
2
1.5 -0.5 a t a d
-1 0
20
40
60
80
1
0.5
100
0
Figura 21: Graph for exercise 3.3.b.
-0.5 0
1
2
3
4
5
6
7
8
9
10
Time (seconds)
Como es posible observar la secuencia no decrece por debajo del 1% en las primeras 100 muestras. 3.4. Using SIMULINK generate the signals shown in Figure of the tutorial with a = 0.5 (Hint: Use block diagrams to form the signals)
Figura 24: Graph for exercise 3.4.c.
c)
3.5. Engineering design problem. 2.5
2
1.5
1
0.5
0
-0.5 0
10
20
30
40
50
60
Peter the Panda, a secret agent from OWCA is involved in a very important mission. He intercepted a secret voice message and codified it so that it cannot be heard by any person. Unfortunately, nobody at OWCA took a “Signals and Systems” course and they have not yet been able to process the message. On a phone call, Peter claimed that he just ”inverted the signal time, increased two times its amplitude, changed the phase by 180◦ and compress it so that it lasted the half”.
Figura 22: Graph for exercise 3.4.a.
a)
Como resultado de decodificar y guardar la se n˜ al se obtuvo el siguiente codigo:
˜ UNIVERSIDAD NACIONAL DE COLOMBIA, SENALES Y SISTEMAS I.
Figura 25: Code for exercise 3.5.
8