EE441 Data Structures (Fall 2004)

Download Report

Transcript EE441 Data Structures (Fall 2004)

Course Outline (Tentative)

Fundamental Concepts of Signals and Systems



Linear Time-Invariant (LTI) Systems








Fourier Transform & Properties …
Modulation (An application example)
Discrete-Time Frequency Domain Methods


Response to complex exponentials
Harmonically related complex exponentials …
Fourier Integral


Convolution integral and sum
Properties of LTI Systems …
Fourier Series


Signals
Systems
DT Fourier Series
DT Fourier Transform
Sampling Theorem
Z Transform
Laplace Transform
Chapter I
Signals and Systems
What is Signal?


Signal is the variation of a physical phenomenon / quantity with
respect to one or more independent variable
A signal is a function.
Example 1: Voltage on a capacitor as a function of time.
R
+
Vs I
i
RC circuit
C
Vc
-
What is Signal?
Example 2 : Closing value of the stock exchange
index as a function of days
Index
M T
W T
F
Fig. Stock exchange
S
S
Example 3:Image as a function of x-y coordinates
(e.g. 256 X 256 pixel image)
Continuous-Time vs. Discrete Time



Signals are classified as continuous-time (CT) signals and
discrete-time (DT) signals based on the continuity of the
independent variable!
In CT signals, the independent variable is continuous (See
Example 1 (Time))
In DT signals, the independent variable is discrete (See
Ex 2 (Days), Example 3 (x-y coordinates, also a 2-D
signal))


DT signal is defined only for specified time instants!
also referred as DT sequence!
Continuous-Time vs. Discrete Time



The postfix (-time) is accepted as a convention, although some
independent variables are not time
To distinguish CT and DT signals, t is used to denote CT independent
variable in (.), and n is used to denote DT independent variable in [.]
 Discrete x[n], n is integer
 Continuous x(t), t is real
Signals can be represented in mathematical form:



x(t) = et, x[n] = n/2
0
y(t) =  2
 t
,t  5
,t  5
Discrete signals can also be represented as sequences:

{y[n]} = {…,1,0,1,0,1,0,1,0,1,0,…}
Continuous-Time vs. Discrete-Time
Graphically,
x[n]
x(t )
x[2] ...
x[1]
x[2]
x[1] x[0]
... x[3]
0
t
... -3 -2 -1
0 1 2 3 4 ...
n
(Fig.1.7 Oppenheim)


It is meaningless to say 3/2th sample of a DT signal because it is not defined.
The signal values may well also be complex numbers (e.g. Phasor of the
capacitor voltage in Example 1 when the input is sinusoidal and R is time
varying)
Signal Energy and Power

In many applications, signals are directly related to physical quantities
capturing power and energy in physical systems
t2

Total energy of a CT signal x(t ) over t1  t  t2 is
t2


The time average of total energy is
average power of x(t ) over t1  t  t2

2
x(t ) dt
t1
1
2
x
(
t
)
dt and referred to as

(t2  t1 ) t1
Similarly, total energy of a DT signal x[n] over n1  n  n2 is
n2
 x[n]
n1

Average power of x[n] over n1  n  n2 is
n2
1
2
x[n]

(n2  n1  1) n1
2
Signal Energy and Power

For infinite time intervals:

Energy: accumulation of absolute of the signal


T
E  lim

x(t ) dt 
2
T  T


2
x(t ) dt
Total energy in CT signal

N
E  lim  x[n] 
2
T  n  N
E  


x[n]
2
Total energy in DT signal
n 

Signals with

In order to define the power over infinite intervals we need to take limit of
the average:

T
are of finite energy
Note: Signals with E  
1
E
2

P  lim
x
(
t
)
dt

lim
T  2T 
T  2T
have P  0

T
N

1
E
2
P  lim
x
[
n
]

lim

N  2 N  1
N  2 N  1
n N
Signal Energy and Power



Energy signal iff 0<E<, and so P=0
 e.g:
 0, t  0
x(t )   t
e , t  0
Power signal iff 0<P<, and so E=
 e.g: {x[n]}  ...  1,1,  1,1,1,1...}
Neither energy nor power, when both E and P are infinite


.
e.g:
x(t )  et
Transformation of Independent
Variable

Sometimes we need to change the independent variable
axis for theoretical analysis or for just practical purposes
(both in CT and DT signals)

Time shift x[n]  x[n  n0 ]

Time reversal x(t )  x(t )

Time scaling
x(t )  x(t / 2)
(reverse playing of magnetic tape)
(slow playing, fast playing)
Examples of Transformations
Time shift
x[n]
...
...
n
x[n-n0]
........
...
n0
If n0 > 0  x[n-n0] is the delayed version of x[n]
(Each point in x[n] occurs later in x[n-n0])
n
Examples of Transformations
x(t)
Time shift
t
x(t-t0)
t
t0
t0 < 0  x(t-t0) is an advanced version of x(t)
Examples of Transformations
x(t)
Time reversal
t
x(-t)
t
Reflection about t=0
Examples of Transformations
Time scaling
x(t)
t
x(2t)
compressed!
t
x(t/2)
stretched!
t
Examples of Transformations


It is possible to transform the independent variable with a general nonlinear
function h(t) ( we can find x(h(t)) )
However, we are interested in 1st order polynomial transforms of t, i.e.,
x(at+b)
x(t)
1
Given the signal x(t):
0
1
x(t+1)
1
Let us find x(t+1):
(It is a time shift to the left)
-1
0
1
t
x(-t+1)
1
Let us find x(-t+1):
(Time reversal of x(t+1))
t
2
-1
0
1
t
Examples of Transformations
For the general case, i.e., x(at+b),
1. first apply the shift (b),
2. and then perform time scaling (or reversal) based on a.
x(t+1)
Example: Find x(3t/2+1)
1
-1
0
1
t
x((3/2)t+1)
1
-2/3
0
2/3
t
Periodic Signals

A periodic signal satisfies:
x(t )  x(t  T ) t , T  0
Example: A CT periodic signal
x(t )
 2T
T
0
T
x(t )  x(t  mT) for m  Z 

If x(t) is periodic with T then

Thus, x(t) is also periodic with 2T, 3T, 4T, ...

2T
The fundamental period T0 of x(t) is the smallest value of T for which
x(t )  x(t  T ) t , T  0 holds
Periodic Signals


A non-periodic signal is called aperiodic.
For DT we must have
Period must be
integer!
x[n  N ]  x[n] n, N  0
Here the smallest N can be 1, 

a constant signal
The smallest positive value N0 of N is the fundamental
period
Even and Odd Signals

If
x(t )  x(t ) or x[n]  x[n]
even signal (symmetric wrt y-axis)

If
x(t )   x(t ) or x[n]   x[n]
odd signal (symmetric wrt origin)
x(t)
x(t)
odd
even
t

Decomposition of signals to even and odd parts:
EV x(t ) 
1
x(t )  x(t )
2
OD x(t ) 
1
x(t )  x(t )
2
x(t )  EV x(t ) ODx(t )
t
Exponential and Sinusoidal Signals


Occur frequently and serve as building blocks to construct many other
signals
CT Complex Exponential:
x(t )  Ce
at
where a and C are in general complex.

Depending on the values of these parameters, the complex exponential
can exhibit several different characteristics
a>0
Real Exponential
(C and a are real)
x(t)
C
a<0
x(t)
t
C
t
Exponential and Sinusoidal Signals

Periodic Complex Exponential (C real, a purely imaginary)
x(t )  e

j0t
Is this function periodic?
x(t )  e
j0t
e
j0 ( t T )
for periodicity
e
j0t
.e
j0T
2πn
T
ω0
n Z 
=1
2

The fundamental period is T0 

Thus, the signals ejω0t and e-jω0t have the same fundamental
period
0
Exponential and Sinusoidal Signals

Using the Euler’s relations:
e j  cos   j sin 
e  j  cos   j sin 
and by substituting
  0 t   , we can express:
e j0t  cos0t  j sin 0t






A j (0t  )  j (0t  )
A j j0t
A cos(0t   )  e
e
 e e  e  j e  j0t
2
2
A j (0t  )  j (0t  )
A j j0t  j  j0t
A sin(0t   ) 
e
e

e e e e
2j
2j

Sinusoidals in terms of complex exponentials

Exponential and Sinusoidal Signals
Alternatively,

A sin( t   )  A Ime


A cos(0t   )  A Re e j (0t  )
0
x(t )
T0 
j (0t  )
2
0
CT sinusoidal signal
A cos
t
x(t )  A cos(0t   )
A cos(0t   )
Exponential and Sinusoidal Signals

Complex periodic exponential and sinusoidal signals are of infinite
total energy but finite average power
E period 
T T0

e
j0t 2
dt 
T
Pperiod



T T0
 1 dt  (T  T )  T  T
0
0
T
1

E period  1
(T  T0 )  T
As the upper limit of integrand is increased as T  2T0 , T  3T0 ,...Eperiod 
However, always
Thus,
Pperiod  1
T
Finite average power!
1
j0t 2
P  lim
 e
dt  1
T  2T 
T
Harmonically Related Complex
Exponentials

Set of periodic exponentials with fundamental frequencies that are
multiplies of a single positive frequency 0
xk (t )  e
jk0t
for k  0,1,2,...
k  0  xk (t ) is a constant
k  0  xk (t ) is periodic with fundamental frequency
and fundamental period



k ω0
T
2
2
 0 , where T0 
k 0 k
0
kth harmonic xk(t) is still periodic with T0 as well
Harmonic (from music): tones resulting from variations in acoustic
pressures that are integer multiples of a fundamental frequency
Used to build very rich class of periodic signals
General Complex Exponential Signals
Here, C and a are general complex numbers
Say,
C  C e j and a  r  j0 x(t )  Ceat
Then x(t )  Ceat  C ert e j (0t  )  C ert cos(0t   )  j C ert sin(0t   )
(Real and imaginary parts) Growing and damping sinusoids for r>0 and r<0
x(t )
t, r  0
envelope
t, r  0
x(t )  Cert cos(0t   )
DT Complex Exponential and Sinusoidal
Signals
xn  Ca n where C and a are in generalcomplexnumbers
It is moreconvenientand customaryto use α insteadof ean
Real exponentia
l signals : C and a are real
for a  1,0  a  1,1  a  0, a  1
(Sign alternation for a  0)
a 1
0 a 1
1  a  0
a  1
DT Sinusoidal Signals
Consider e j0 n we thenhavesimilar totheCT case
A j j0 n  j  j0 n
A cos(0 n   )  (e e
e e
)
2
Infinite energy, finite average power with 1.
a 1
General complex exp signals
If C anda are in polarformas
C  C e j , a  a e j0
then
Ca n  C a cos(0 n   )  j C a sin(0 n   )
n
n
a 1
Real and imaginarypartsof DT generalcomplexexp are
sinusoidals (growing a  1, and decayinga  1)
Periodicity Properties of DT Signals
Consider the DT complexexp: e jω0n
j 2πn
Let's find e j(ω0 2π)n  e jω0n e
1


So the signal with freq 0 is the same as the signal with 0+2
This is very different from CT complex exponentials

CT exponentials has distinct frequency values 0+2k, k  Z
Result:
It is sufficient to consider an interval from 0 to 0+2 to completely
characterize the DT complex exponential!
Periodicity Properties of DT Signals
One usually takes 0  0  2 or -   0  
 For CT exp as 0  therateof oscillation  indefinitely
 For DT exp as 0  from0 to , therateof oscillation ,
as 0  moreuntil 2 , therateof oscillation  to zero.
Hence,low freq (slow varying)DT complexexp is around0  0 and 0  2
High freq (rapidly varying)DT complexexp is around0  
What about the periodicity of DT complex exponentials?
Periodicity Properties of DT Signals
jω0 N
Periodicity condition: e jω0(n N)  e jω0n e
(*)
must be unity
T hisholds if 0 N is an integermultipleof 2 . (**)
In other words, for someintegerm we must have0 N  2m
0 m
Or equivalently
 (** *)
2 N
We have theconditionsfrom(*) and (**) thatm and N must be integers.
So DT exp is periodic when
0 m
 is a rationalnumber,not periodicotherwise!!!
2 N
Periodicity Properties of DT Signals
T akethecommonfactorout
T hefundamental frequencyis then
2 0

N
m
 2
T hefundamental periodis then N  m
 0

 (** **)

T hereforeto find thefund. freq.of a complexexp.we need to express
(T hesame development is also validfor DT sinusoidal signals.)!!
0
as in (** *)
2
Periodicity Properties of DT Signals
Examples
Ex: x[n]  cos( 2 n
x[n]  cos( 2 n
12
12
)
)  cos(0 n) 0 
2
12

0 1

no factors in common,
2 12
 12 
so by using (****) , N  1   12 periodic with fund period 12.
1
Ex: x[n]  cos( 4 n
x[n]  cos( 4 n
12
12
)
)  cos(0 n) 0 
4
12

0 2
(n  1)


,
2 12
( N  6)
 12 
then using (****) , N  1   6 is periodic with fundamental period 6.
 2
Periodicity Properties of DT Signals
Examples

OBSERVATION:


With no common factors between N and m, N in (***) is the
fundamental period of the signal
Hence, if we take common factors out
0 1

N 6
2 6

Comparison of Periodicity of CT and DT Signals:

Consider x(t) and x[n]
x(t)  cos( 2πt
) x[n]  cos( 2πn )
12
12
x(t) is periodic with T=12, x[n] is periodic with N=12.
Periodicity Properties of DT Signals
Examples

x(t )  cos 8t

31
and

x[n]  cos 8n

31

if
x(t) is periodic with 31/4.

In DT there can be no fractional periods, for x[n] we have
0
4

2
31
then N=31.
 6
If x(t )  cos t
and
 6
x[n]  cos n
x(t) is periodic with 12, but x[n] is not periodic, because
is no way to express it as in (***)
.
0
1

2 12
there
Harmonically Related Complex
Exponentials (Discrete Time)

Set of periodic exponentials with a common period N

2
Signals at frequencies multiples of
N
k [n]  e
 2 
jk 
n
N


(from 0N=2m)
for k  0,1,2,...

jk t
In CT, all of the HRCE, e 0 for k  0,1,2,... are distinct

Different in DT case!
Harmonically Related Complex
Exponentials (Discrete Time)

Let’s look at (k+N)th harmonic:
k  N [n]  e
 2
j ( k  N )
 N

n

e
 2 
jk 
n
N


j 2n
.e
 k [n]
1

Only N distinct periodic exponentials in

That is,
0[n]  1, 1[n]  e
j
2
n
N
, 2 [n]  e
0[n]  N [n], 1[n]  N 1[n]
j
4
n
N
k[n] !!
,, N 1[n]  e
j ( N 1)
2
n
N
Unit Impulse and Unit Step
Functions

Basic signals used to construct and represent other signals
0, n  0
DT unit impulse:  [n]  
1, n  0
δ[n]
- - -
Unit impulse (unit sample)
- - n
DT unit step:
0, n  0
u[n]  
1, n  0
u[n]
- - -
- - -
Relation between DT unit impulse and unit step (?):
 [n]  u[n]  u[n  1]
(DT unit impulse is the first difference of the DT step)
n
Unit Impulse and Unit Step
Functions
Interval of summation

u[n]    [n - k]
k 0
[n-k]
- - -
n
(DT step is the
running sum of DT
unit sample)
- - 0
k
Interval of summation
[n-k]
- - -
- - -
x[n] [n]  x[0] [n]
n<0
0
n
n>0
k
More generally for a unit impulse [n-n0] at n0 :
x[n] [n  n0 ]  x[n0 ] [n  n0 ]
Sampling property
Unit Impulse and Unit Step
Functions (Continuous-Time)
CT unit step:
0, t  0
u (t )  
1, t  0
u(t)
t
δ(t)
CT impulse:
du (t )
 (t ) 
dt
t
u(t )    ( )d

1
t
0
CT unit impulse is
the 1st derivative of
the unit sample
CT unit step is the running integral
of the unit impulse
Continuous-Time Impulse

CT impulse is the 1st derivative of unit step
du (t )
 (t ) 
dt

There is discontinuity at t=0, therefore we define u  (t ) as
u (t )  lim u  (t )
u (t )
 0
1
0 
du  (t )
  (t ) 
dt
t
  (t )  lim   (t )
 0
 (t )
  (t )
1/
0 
1
t
t
0
Continuous-Time Impulse
REMARKS:
 Signal of a unit area
 Derivative of unit step function


Sampling property x(t ) (t  t0 )  x(t0 ) (t  t0 )
The integral of product of (t) and (t) equals (0) for
any (t) continuous at the origin and if the interval of
integration includes the origin, i.e.,
t2
  ( ) ( )d
t1
 (0)
for t1  0  t 2
CT and DT Systems
What is a system?



A system: any process that results in the transformation
of signals
A system has an input-output relationship
Discrete-Time System: x[n]  y[n] :y[n] = H[x[n]]
x[n]

DT
System
y[n]
Continuous -Time System: x(t)  y(t) : y(t) = H(x(t))
x(t)
CT
System
y(t)
CT and DT Systems
Examples


In CT, differential equations are examples of systems
Zero state response of the capacitor voltage in a series
RC circuit
R
Vs I
i
RC circuit


C
+
V
c
-
dvc (t ) 1
1

vc (t ) 
vs (t )
dt
RC
RC
vc(t): output, vs(t): input
In DT, we have difference equations
Consider a bank account with %1 monthly interest rate
added on:
y[n]  1.01y[n  1]  x[n]
y[n]: output: account balance at the end of each month
x[n]: input: net deposit (deposits-withdrawals)
Interconnection of Systems

Series (or cascade) Connection: y(t) = H2( H1( x(t) ) )
x(t)


System 1
H1
y(t)
System 2
H2
e.g. radio receiver followed by an amplifier
Parallel Connection:
x(t)
y(t) = H2( x(t) ) + H1( x(t) )
System 1
H1
+
y(t)
System 1
H2

e.g. phone line connecting parallel phone microphones
Interconnection of Systems

Previous interconnections were “feedforward systems”


The systems has no idea what the output is
Feedback Connection: y(t) = H2( y(t) ) + H1( x(t) )
x(t)
+
System 1
H1
y(t)
System 2
H2



In feedback connection, the system has the knowledge of output
e.g. cruise control
Possible to have combinations of connections..
System Properties
Memory vs. Memoryless Systems

Memoryless Systems: System output y(t) depends only on
the input at time t, i.e. y(t) is a function of x(t).


e.g. y(t)=2x(t)
Memory Systems: System output y(t) depends on input at
past or future of the current time t, i.e. y(t) is a function
of x() where - <  <.

Examples:

A resistor:
y(t) = R x(t)
t

1
A capacitor:
y(t )   x( )d
C 
A one unit delayer: y[n] = x[n-1]

An accumulator:

y[n] 
n
 x[k ]
k  
System Properties
Invertibility


A system is invertible if distinct inputs result in distinct outputs.
If a system is invertible, then there exists an inverse system which
converts output of the original system to the original input.

Examples:
x(t)
System
y(t )  4 x(t )
y(t)
y[n] 
Inverse
System
n
 x[k ]
k  
w(t ) 
1
y (t )
4
y(t )  x 4 (t )
w[n]  y[n]  y[n  1]
Not invertible
w(t)=x(t)
t
y(t )   x(t )dt

w( t ) 
dy (t )
dt
System Properties
Causality


A system is causal if the output at any time depends only on values of
the input at the present time and in the past
Examples:

Capacitor voltage in series RC circuit (casual)
y(t )  2 x(t  4)
Non-causal
y[n]  x[n]
Non-causal
y(t )  2 x(t  4) cos(t  1)


(For n<0, system requires future
inputs)
Causal
Systems of practical importance are usually casual
However, with pre-recorded data available we do not constrain
ourselves to causal systems (or if independent variable is not time, any
example??)
M
y[n] 
1
x[n  k ]

2M  1 k   M
Averaging system in a block of data
System Properties
Stability


A system is stable if small inputs lead to responses that do not diverge
More formally, a system is stable if it results in a bounded output for any
bounded input, i.e. bounded-input/bounded-output (BIBO).


If |x(t)| < k1, then |y(t)| < k2.
Example:
t
y (t )   x (t ) dt
y[n]  100x[n]
stable
0
Ball at the base of valley
Ball at the top of hill
x(t)
y(t)
y(t)
x(t)

M
1
x[n  k ]
Averaging system: y[n] 

2M  1 k   M

Interest system:
y[n]  1.01y[n  1]  x[n]
stable
unstable (say x[n]=[n],
y[n] grows without bound
System Properties
Time-Invariance


A system is time-invariant if the behavior and characteristics of
the system are fixed over time
More formally: A system is time-invariant if a delay (or a timeshift) in the input signal causes the same amount of delay (or
time-shift) in the output signal, i.e.:
x(t) = x1(t-t0)  y(t) = y1(t-t0)
x[n] = x1[n-n0]  y[n] = y1[n-n0]

Examples:
y[n]  nx[n]
y(t )  x(2t )
y(t )  sin x(t )
x1[n]  y1[n]  nx1[n]
x2[n]  x1[n  n0 ]  y2[n]  nx1[n  n0 ]
y1[n  n0 ]  (n  n0 ) x1[n  n0 ]  y2[n]
Not TIV
Not TIV
(explicit operation
on time)
TIV
When showing a system is not TIV, try to
find counter examples…
System Properties
Linearity


A system is linear if it possesses superposition property,
i.e., weighted sum of inputs lead to weighted sum of
responses of the system to those inputs
In other words, a system is linear if it satisfies the
properties:



It is additivity:
x(t) = x1(t) + x2(t)  y(t) = y1(t) + y2(t)
And it is homogeneity (or scaling): x(t) = a x1(t)  y(t) = a y1(t),
for a any complex constant.
The two properties can be combined into a single
property:

Superposition:
x(t) = a x1(t) + b x2(t)  y(t) = a y1(t) + b y2(t)
x[n] = a x1[n] + b x2[n]  y[n] = a y1[n] + b y2[n]

How do you check linearity of a given system?
System Properties
Linearity

Examples:
y(t )  x (t )
2
y[n]  2 x[n]  3
y[n]  Re{x[n]}
x1[n]  r[n]  js[n]  y1[n]  r[n]
nonlinear
x2 [n]  ax1[n]  j (r[n]  js[n])
for a  j
 x2 [n]  s[n]  jr[n]
x2 [n]  y2 [n]  s[n]  ay1[n]
x1[n]  2, x2 [n]  3
x1[n]  y1[n]  2.2  3  7
x2 [n]  y2 [n]  2.3  3  9
x1[n]  x2 [n]  2  3  5
x1[n]  x2 [n]  y1 2 [n]  2.5  3  13
y1[n]  y2 [n]  7  9  16  y1 2 [n]
nonlinear
nonlinear
y[n]  2 x[n  1]
linear
Superposition in LTI Systems

For an LTI system:


given response y(t) of the system to an input signal x(t)
it is possible to figure out response of the system to any signal
x1(t) that can be obtained by “scaling” or “time-shifting” the input
signal x(t), i.e.:
x1(t) = a0 x(t-t0) + a1 x(t-t1) + a2 x(t-t2) + … 
y1(t) = a0 y(t-t0) + a1 y(t-t1) + a2 y(t-t2) + …


Very useful property since it becomes possible to solve a
wider range of problems.
This property will be basis for many other techniques that
we will cover throughout the rest of the course.
Superposition in LTI Systems

Exercise: Given response y(t) of an LTI system to the input signal x(t) below,
find response of that system to the input signals x1(t) and x2(t) shown below.
y(t)
x(t)
2
1
t
t
-1
1
x1(t)
2
1
1
x2(t) 4
3
t
2
t
-1
-1/2 1/2 1