Sunteți pe pagina 1din 6

Fall 2016

EE 102
Christina Fragouli
TAs: Gaurav, Yulia

Signals and Systems


Homework 1 Solutions

Problem 1 (4 points) Sketch each of the following functions in the time interval 5 <= t <= 5,
and then plot these using MATLAB.

(i) r(t 1) + u(t + 1)

(ii) 2( t 2 1 ) (t 4)

1 % problem 1
2

3 t= 5:0.01:5;
4 r = @( t ) t . d o u b l e ( t >=0) ; % ramp f u n c t i o n
5 u = @( t ) d o u b l e ( t >=0) ; % u n i t s t e p f u n c t i o n
6 Pi = @( t ) d o u b l e ( t >= 0.5 & t <=0.5) ; % u n i t p u l s e f u n c t i o n
7 Tr = @( t ) (1 abs ( t ) ) . d o u b l e ( t>= 1 & t <=1) ; % t r i a n g l e f u n c t i o n
8 s u b p l o t ( 2 , 1 , 1 ) , p l o t ( t , r ( t 1)+u ( t +1) ) , x l a b e l ( t ) ,
9 y l a b e l ( $ $ r ( t 1)+u ( t +1) $$ , I n t e r p r e t e r , l a t e x ) ;
10 s u b p l o t ( 2 , 1 , 2 ) , p l o t ( t , 2 Pi ( ( t 1) / 2 ) Tr ( t 4) ) , x l a b e l ( t ) ,
11 y l a b e l ( $$2 \ Pi ( \ f r a c { t 1}{2}) \Lambda ( t 4) $$ , I n t e r p r e t e r , l a t e x ) ;

0
-5 -4 -3 -2 -1 0 1 2 3 4 5
t

1.5

0.5

-0.5

-1
-5 -4 -3 -2 -1 0 1 2 3 4 5
t

Problem 2 (5 points)
Find the fundamental period for following signals (if they are periodic). Also decompose them into
odd and even part. Point out if there are even or odd.
(i) x(t) = ej2t cos(5t) + ej3t

(ii) x(t) = (u(t) sin(4t))2

(iii) x(t) = sin(2t + ) + sin(5t)

(iv) x(t) = cos(5t) + cos(2t) + cos(5t + )


P
1
j(t kTs )
(v) x(t) = e (t kTs )
k= 1

Solution

(i) x(t) = ej2t cos(5t) + ej3t


Not Periodic
xo (t) = j sin(2t) cos(5t) + j sin(3t)
xe (t) = cos(2t) cos(5t) + cos(3t)

(ii) x(t) = (u(t) sin(4t))2


Not Periodic

x(t) = u2 (t) + sin2 (4t) 2 sin(4t)u(t)


= u(t) + sin2 (4t) 2 sin(4t)u(t)
x( t) = u2 ( t) + sin2 (4t) + 2 sin(4t)u( t)
= u( t) + sin2 (4t) + 2 sin(4t)u( t)
u(t) u( t)
xo (t) = sin(4t)(u(t) + u( t))
2
(u(t) + u( t))
xe (t) = + sin2 (4t) + sin(4t) (u( t) u(t))
2
8
>
< 0.5 sin(4t) if t < 0
xo (t) = 2 sin(4t) if t = 0
>
:
0.5 sin(4t) if t > 0
8
2
>
< 0.5 + sin (4t) + sin(4t) if t < 0
xe (t) = 1 if t = 0
>
: 2
0.5 + sin (4t) sin(4t) if t > 0

(iii) x(t) = sin(2t + ) + sin(5t)


Periodic, Period = 2; (common multiple of 1 and 0.4)
xe = sin(2t+) 2 sin(2t )
xo = sin(2t+)+sin(2t
2
)
+ sin(5t)

(iv) x(t) = cos(5t) + cos(2t) + cos(5t + )


Periodic, Period = 1 ; (2 is also the period but not fundamental)

x(t) = cos(5t) + cos(2t) + cos(5t + )


= cos(5t) + cos(2t) cos(5t) {as cos(A + ) = cos(A)}
= cos(2t)
xe (t) = cos(2t)
xo (t) = 0
Signal is Even.
P
1
j(t kTs )
(v) x(t) = e (t kTs )
k= 1

1
X
j(t+Ts kTs )
x(t + Ts ) = e (t + Ts kTs )
k= 1
X1
j(t (k 1)Ts )
= e (t (k 1)Ts )
k= 1
X1
j(t (k0 )Ts )
= e (t (k 0 )Ts )
k0 = 1

= x(t)

Periodic, Period = Ts
1
X
j( t kTs )
x( t) = e ( t kTs )
k= 1
X1
j( t+k0 Ts )
= e ( t + k 0 Ts ) {replacing k by k 0 }
k0 =1
X 1
j( (t k0 Ts ))
= e ( (t k 0 Ts ))
k0 =1
1
X
k 0 Ts )
= ej(t (t k 0 Ts ) { being an even function}
k0 =1
X1
k 0 Ts )
= ej(t (t k 0 Ts )
k0 = 1
X 1
= ej(t kTs )
(t kTs )
k= 1

P
1
xe (t) = cos(t kTs ) (t kTs )
k= 1
P
1
xo (t) = j sin(t kTs ) (t kTs )
k= 1

Problem 3 (2 points)

Use Eulers identity, ej = cos () + j sin (), to obtain an expression for ej( ) = ej e j ; obtain
its real and imaginary components and show the following identities:

(i) cos ( ) = cos () cos ( ) + sin () sin ( )

(ii) sin ( ) = sin () cos ( ) sin ( ) cos ()

Hint: Find real and imaginary parts of ej e j and of ej( ).

Solution
Eulers identity:
ej = cos() + j sin()

Therefore:
ej ej = (cos () + j sin ()) (cos ( ) + j sin ( ))
= (cos () cos ( ) sin () sin ( )) + j (sin () cos ( ) + sin ( ) cos ())

Thus,
h i
j(+ )
Re e = cos ( + ) = cos () cos ( ) sin () sin ( )
h i
Im ej(+ ) = sin ( + ) = sin () cos ( ) + sin ( ) cos ()

Problem 4 (3 points)

Simplify the following complex-valued expressions in both Cartesian form (x + jy) and polar form
(rej ):

(i) 4ej/3 3e j/6

p p 2
(ii) 2 6j

(iii) Im jej/ 3

(i)
p
j/3 j/6 4 4 3 3p 3
4e 3e = +j 3+j
2 2 2 2
= 0.5981 + j4.9641
= 5ej1.6907

(ii)
p p 2
j1.0472 2
2 6j = 2.8284e

= 0.1250ej2.0944
= 0.0625 + j0.1083

(iii)
n o
Im jej/3 = cos
3
= 0.5 + j0
= 0.5ej

Problem 5 (6 points)
The triangle function
( with a parameter a > 0 is:
1 a1 |t|, |t| a
a (t) = (t/a) =
0, |t| > a
The graph is:
a (t) 1

a 0 +a

The parameter a specifies the width, namely 2a. Alternately, a determines the slopes of the sides:
the left side has slope 1/a and the right side has slope 1/a. We can modify a by scaling the
height and shifting horizontally, forming ba (t c) (b can be negative). The slopes of the sides of
the scaled function are then b/a. The graph is:

ba (t c)

c a c c+a

Express each of the following as a sum of two shifted, scaled triangle functions b1 a1 (t c1 ) +
b2 a2 (t c2 ). Think of the summation as left-triangle plus a right-triangle (right meaning to
the right, not having an angle of 90 ) or as top-triangle minus a bottom-triangle. For part (d),
the values x1 , x2 , x3 , and y2 cannot be arbitrary. Rather, to be able to express the plot as the sum
of two s they must satisfy a relationship that you should determine.

2
2

1 1

2 1 3 4 2 1 1 3 4

(a) (b)

2
(x2 , y2 )

2 0 4 (x1 , 0) (x3 , 0)

(c) (d)

Solution

(a) We can write the big triangle as 63 (t 1). The small triangle can be written as 42 (t 1).
Hence, we can write the sum of two triangle functions: 63 (t 1) 42 (t 1).

(b) We can write the big triangle as 33 (t 1). For the small triangle,we can write it as 2 (t 1).
Hence, we can write the sum of two triangle functions: 33 (t 1) 2 (t 1).
(c) We can write the big triangle as 24 (t). For the small triangle,we can write it as 2 (t + 2).
Hence, we can write the sum of two triangle functions: 24 (t) 2 (t + 1).

(d)

y2
y

x1 x2 x x3

y2
The sum of two triangle functions is y2 x2 x1 (t x2 ) + 2 x2 x1 (t (2x2 x1 )).
The additional constraints is x3 = 3x2 2x1 .

S-ar putea să vă placă și