You are on page 1of 53

T.

Ka

pu

tu

Po ly t

Part A: Signal Processing

ec

hn

ic

of

DIGITAL SIGNAL PROCESSING DSP820S

N am ib

T.

Ka

1.1 Signals 1.2 Sampling 1.3 Systems 1.4 Periodic Signals 1.5 Discrete-Time Sinusoidal Signals 1.6 Real Exponential Signals 1.7 Complex Exponential Signals 1.8 The Unit Impulse 1.9 Simple Manipulations of Discrete-Time Signals 1.10 Problem Sheet A1 & MATLAB Exercises

pu

tu

Po

ly t

ec

hn

ic

of

Chapter 1:

Signal and Systems

N am ib

Chapter 1: Signals and Systems


1.0 Introduction

T.

Ka

pu tu

Signals are various voltages and currents in the network. The signals are thus functions of time and they are related by a set of equations.

Po

The terms signals and systems are given various interpretations. For example, a system is an electric network consisting of resistors, capacitors, inductors and energy sources.

ly te

ch n

ic

of

am ib

Figure: 1.0: An electric circuit


T.

Ka

pu tu

The objective of system analysis is to determine the behaviour of the system subjected to a specific input or excitation

Po

ly te

ch n

+ -

i(t)

R i(t)

ic

of
+ vC(t) -

Example:

am ib

T.

Ka

pu

tu

Figure: 1.1: General representation of a system.

Po

ly t

Input

ec

System

hn
Output

ic

It is often convenient to represent a system schematically by means of a box as shown in Figure 1.1.

of

am ib

There are two types of signals:

T.

Ka

t Continuous time -independent variable (- < t < )

pu tu

In the case of a continuous-time signal, x(t), the independent variable t is continuous and thus x(t) is defined for all t (see Fig 1.2).

Po

ly te

ch n

(a) Continuous time signals (b) Discrete time signals

ic

of

1.1 Signals

am ib

T.

Ka

pu tu

n discrete time - independent variable ( n = -2, -1, 0, 1, 2,)

Po

ly te

On the other hand, discrete-time signals are defined only at discrete times and consequently the independent variable takes on only a discrete set of values (see Figure 1.2). A discrete- time signal is thus a sequence of numbers.

ch n

ic

of

am ib

1. A persons body temperature is a continuous-time signal.

T.

Ka

3. Voltages & currents are usually represented by continuous-time signals. They are represented also by discrete-time signals if they are specified only at a discrete set of values of t.

pu tu

Po

ly te

2. The prices of stocks printed in the daily newspapers are discrete-time signals.

ch n

ic

of

Examples:

am ib

Figure 1.2: Above: An example of continuous-time signals. Below: An example of discrete-time signals.

T.

Ka

pu tu

Po

ly te

ch n

ic

of

am ib

1.2 Sampling

A discrete-time signal is often formed by samples are equidistant then

sampling a continuous -time signal x(t). If the

T.

Ka

pu

Square brackets [ ] Discrete time signals Round Brackets ( ) Continuous signals

tu

Po

ly t

x[n] = x(t ) t = nT = x(nT )

ec

hn
(1.1)

ic

of

N am ib

Analogue Signal x(t)

Digital signal

1 the sampling frequency f s = Hz. T

T.

Ka

pu tu

Po

ly te

The constant T is the sampling interval or period and

ch n

1 fs = T

ic

x(nT ) = x[n]

of

am ib

Figure 1.4: An example of acquiring discrete-time signals by sampling continuous-time signals.

Ka

pu tu

x[n] = { 3.5, 4, 3.25, 2, n=-1 n=0 n=2

Po

ly te
2.5, 3.0 } n=4

T.

ch n

ic

of

am ib

T.

Ka

pu tu

x[n] is simply undefined for non-integer values of n.

Po

ly te

zero for n not an integer, say n=1.5.

ch n

not correct to think of x[n] as being

ic

only defined for integer values of n. It is

of

It is important to recognize that x[n] is

am ib

Sampling Theorem:

T.

Ka

pu

tu

Po

sampled at a rate fs 2 fmax then x(t) can be exactly recovered from its sample values using an interpolation function.

ly t

ec

hn

analogue signal x(t) is fmax and the signal is

ic

If the highest frequency contained in an

of

N am ib

This sampling frequency is slightly more than accepted upper limit of human hearing and perception of music sounds.

T.

Ka

pu tu

Po

ly te

2fmax [fmax = 20kHz], which is generally

ch n

kHz for storage of the digital audio signal.

ic

Audio CDs use a sampling rate, fs, of 44.1

of

Example:

am ib

T.

Ka

pu tu

Po

A continuous-time unit step function u(t) is defined by [Fig 1.5].

ly te

ch n

1 t 0 u (t ) = 0 t < 0

ic

of
(1.2)

Example:

am ib

T.

Ka

pu tu

1 n 0 u[n] = 0 n < 0

Po

ly te

ch n

at t = 0. Its samples u[n] = u(t)|t=nT form the discrete-time signal and defined by

ic

of

(1.3)

Note that the unit step is discontinuous

am ib

T.

Figure 1.5: Top: Continuous-time unit step function. Bottom: Discrete-time unit step function.

Ka

pu tu

Po

ly te

ch n

ic

of

am ib

Exercise:

T.

Ka

pu tu

Po

ly te

ch n

ic

of

Sketch the wave form: y[n] = u[n] u[n 1]

am ib

T.

Ka

pu tu

Po

ly te

ch n

ic

of

Sketch the waveform for y (t ) = u (t + 1) 2u (t ) + u (t 1)

Exercise:

am ib

ch n

and output y(t) are continuous time functions related by a rule as shown in Fig 1.6(a).

ic

of

A continuous-time system is one whose input x(t)

x(t) t

Po

ly te

x(t)

Continuous y(t) Time System

N
y(t) t

1.3 Systems

Fig 1.6 (a): General representation of continuous-time systems.

T.

Ka

pu tu

am ib

shown in Fig 1.6(b).

x[n] n

ly te

x[n]

ch n
Discrete Time System y[n]

ic
y[n] n Fig 1.6 (b): General representation of discrete-time systems.

T.

Ka

pu tu

Po

of

y[n] are discrete time function related by a rule as

A discrete system is one whose input x[n] and output

am ib

T.

Ka

pu tu

Po

ly te

ch n

ic

of

An important mathematical distinction between continuous-time and discrete-time systems is the fact that the former are characterized by differential equations whereas the latter are characterized by difference equations.

am ib

Example:

hn
i(t) e(t) input + -

ic

The RC circuit shown in Figure 1.7 is a continuous-time system

ec
R C i(t)

T.

Ka

Figure 1.7: A diagram of RC circuit as an example of continuous-time systems.

pu

tu

Po

ly t

of
+ vC(t) -

N am ib
output

i(t) e(t) input + -

C i(t)

obtain using simple circuit analysis

T.

Ka

dvC (t ) 1 1 + vC (t ) = e(t ) dt RC RC

pu

tu

Po

and vc(t) as the output signal, we

ly t

If we regard e(t) as the input signal

ec

hn
(1.4)

ic

of

+ vC(t) -

N am ib
output

dvC (t ) 1 1 + vC (t ) = e(t ) dt RC RC

T.

Ka

dvC (t ) vC (nT ) vC (nT T ) = dt t = nT T

pu tu

Po

ly te

From equation (1.4), a discrete -time system can be developed as follows: If the sampling period T is sufficiently small,

ch n

ic
(1.5)

of

N
(1.4)

am ib

vC(t) P T

ly te
nT-T

ch n
nT t Backward Euler approximation [Assuming T is sufficiently small] Figure 1.8: An approximation of discrete-time systems from the continuous-time systems.

T.

Ka

pu tu

Po

ic

vC(nT)-vC(nT-T)

of

vC(nT)

am ib

By substituting equation (1.5) into (1.4)

The difference equation is:

vC [n] vC [n 1] 1 1 + vC [n] = e[n] T RC RC

Ka

RC T vC[n] = vC[n 1] + e[n] RC+T RC+T

tu

Po

ly t

ec

hn

vC (nT ) vC (nT T ) 1 1 vC (nT ) = e(nT ) + T RC RC

ic
input

of

and replacing t by nT, we obtain:

output

T.

pu

previous output

N am ib
(1.6)
difference equation

pu tu

Digital input

Po

ly te

Differential Analogue output Analogue input Equations

Difference Equations

Ka

Discrete-Time System

T.

ch n

ic
Digital output

Continuous-Time System

of

Summary:

am ib

Analogue Signal 1.

Discrete-time signal

t=nT

hn ec
Sampling Period (T)

x(t) = eat
time

ic Po ly t
t=nT

x[n] = eanT
1 fs = Hz T
sampling frequency

Sample number [0,1,2,3,]

pu

tu

2.

x(t) = 10e-t 5e- 0.5 t

x[n] = 10e-nT 5e- 0.5 nT


sample number

T.

Ka

of

Example:

am ib

3.

x(t) = Acos(at)
Analogue frequency in radians a = 2fa

t=nT

x[n] = A cos(anT)

T.

x(t) = A(1+m cos(mt))cos(ct)

Ka

Exercise :

pu

=aT

tu

fa = 2 fs

Po

ly t
x[n] =?

= digital frequency

ec

fa = A cos(2 n) = A cos(n ) fs

hn

1 = A cos(2f a n ) fs

ic

of

N am ib

1.4 Periodic Signals


P. In this case we say x(t) is periodic with period P.

T.

Ka

pu

tu

In other words, a periodic signal has the property that is unchanged by a time shift of

Po

for all values of t.

ly t

x(t ) = x(t + P )

ec

of P for which

hn

has the property that there is a positive value

ic

signals. A periodic continuous-time signal x(t)

of

An important class of signals is the periodic

N am ib
(1.7)

Example :
x(t)

period = P

ec

hn

ic

of Ka
period N, where N is a positive integer, if for all values of n.

pu

time. A discrete-time signal x[n] is periodic with

tu

Periodic signals are defined analogously in discrete

Po

Figure 1.9A: An example of periodic signals

T.

x[n] = x[n + N ]

ly t

-P

2P

(1.8)

N am ib
t

T. N Ka pu tu Po ly te ch n

Example :

ic

of

am ib

1.5 Discrete-Time Sinusoidal Signals


fa = analogue frequency

A discrete - time sinusoidal signal may be expressed as

x[n] = x(t)|t=nT = x(nT)

T.

1 Sampling frequency f s = T fa = aT - Digital frequency = 2 fs

Ka

pu

x[n] = A sin( n )

tu

fa n) x[n] = A sin( naT ) = A sin( 2 fs

Po

ly t
(1.10)

ec

hn
(1.11)

ic

x(t ) = A sin (a t ) = A sin (2f a t )

of
(1.9)

A continuous-time sinusoidal signal is given by

N am ib

A discrete-time signal is said to be periodic with a

Ka

pu

T. N

2k N= = fa 2 fs

tu

2k

Po

(where k is an arbitrary integer)

ly t

which can only be satisfied for all n if N=2k

ec

hn

x[n + N ] = x[n] A sin ((n + N ) ) = A sin (n )

see equation (1.11)

ic

of

period length N, if N is the smallest integer for which

N am ib

8000 = 8 samples So if fa = 1000Hz & fs = 8000 Hz then N = 1000

T.

Ka

pu tu

Po

An example of a sinusoidal sequence is shown in Fig 1.10.

ly te

ch n

ic

of

fs N= k fa

(1.12)

am ib

Figure 1.10: An example of sinusoidal sequences. The


2n period, N, is 12 samples. x[n] = cos 12

T.

Ka

pu tu

Po

ly te

ch n

ic

of

am ib

Example:

Determine the fundamental period of x[n],

digital frequency =

The fundamental period is therefore (see equation (1.12))

T.

2 1 N= = 15 samples 2 15

Ka

pu

integer value. This is satisfied when k = 1.

tu

where k is the smallest integer for which N has an

Po

N=

ly t

2k

ec

2 15

hn

ic

2 x [n] = 10 cos n+ 5 15

of

N am ib

T.

Ka

pu

tu

Smallest value of

2 = = radians / cycle 10 5

Po

2k 2 = = k N 10

ly t

is obtained when k = 1

ec

smallest

for which x[n] is periodic:

hn

period N=10 samples. Determine the

ic

of

The sinusoidal signal x[n] has fundamental

Example:

am ib

T.

Ka

pu tu

numbers. Depending upon the values of these parameters, the complex exponential can exhibit several different characteristics.

Po

where c and a are, in general complex

ly te

x(t ) = ce

ch n
at

ic

The continuous-time complex exponential signal is of the form

(1.13)

of

1.6 Real Exponential Signals

am ib

x(t)

Growing exponential a>0.

c x(t)

ly te pu tu T. N Ka Po
c

t Figure 1.11: Characteristics of real exponential signals in terms of time, t. Top: For a>0, the signal grows exponentially. Bottom: For a<0, the signal decays exponentially.

ch n

ic
t Decaying exponential a<0

of

am ib

1.7 Complex Exponential Signal [8]


expressed in polar form, c = c e , and a in rectangular form, a = r + j 0 . Then
j

T.

Ka

pu

Thus, for r = 0, the real & imaginary parts of a complex exponential are sinusoidal.

tu

Po

=| c | e rt cos(0t + ) + j | c | e rt sin(0t + )

ly t

ce at =| c | e j e ( r + j0 )t =| c | e rt e j (0t + ) (1.14)

ec

hn

ic

of

Consider a complex exponential, ceat where c is

N am ib

ch n

Po

ly te

x(t) r>0

ic

For r < 0 Sinusoidal signals multiplied by a decaying exponential [ damped sinusoids] x(t) r<0

of

N
t

For r > 0 Sinusoidal signals multiplied by a growing exponential

T.

Growing sinusoidal signal Decaying sinusoidal signal Figure 1.12: Characteristics of complex exponential signals.

Ka

pu tu

am ib

In discrete time, it is common practice to write a real exponential signal as

x[n] = cn (1.15)

T.

Ka

pu

tu

Po

ly t

ec

have decaying exponential.

hn

are real and if ||>1 the magnitude of the signal grows exponentially with n, while if ||<1 we

ic

If c and

of

N am ib

T.

Figure 1.13: Examples of discrete-time exponential signals.

Ka

pu tu

Po

ly te

ch n

ic

of

am ib

1.8 The Unit Impulse


ly t Po
t

(t)
1

ec

denoted by (t) and is represented graphically by a vertical arrow.


Magnitude 1

pu

tu

hn

ic

An important concept in the theory of linear systems is the continuous time unit impulse function. This function, known also as the Dirac delta function is

T.

Figure 1.14: Characteristic of the continuous-time impulse function and the corresponding magnitude response in the frequency domain.

Ka

of

N am ib
Frequency

The impulse function (t) is a signal of unit area vanishing everywhere except at the origin.

Po

du (t ) (t ) = dt

ly t

function u(t).

ec

The impulse function (t) is the derivative of the step

Ka

pu

tu

u(t)

hn

( t ) dt

(1.17)
du(t ) (t ) = dt 1

ic

= 1

, ( t ) = 0 for t 0

of
(1.16)
t

T.

N am ib

counterpart. We also refer [n] as the unit sample.

ly te

ch n
1 n = 0 [n] = 0 n 0

ic T. N
Figure 1.15: Characteristic of discrete-time impulse function.

of

The discrete-time unit impulse function [n] is defined in a manner similar to its continuous time

Ka

pu tu

Po

am ib
(1.18)

1.9 Simple Manipulations of DiscreteTime Signals


A signal x[n] may be shifted in time by where k is an integer.

T.

Ka

If k<0 the time shift results in an advance of the signal by k samples.

pu

tu

the signal by k samples [ie. shifting a signal to the right]

Po

If k>0 the time shift results in a delay of

ly t

ec

hn

replacing the independent variable n by n-k

ic

of

N am ib

Figure 1.16: Top left: Original signal, x[n]. Top right: x[n] is delayed by 2 samples. Bottom left: x[n] is advanced by 1 sample.

T.

Ka

Advance: Shifting the signal to the left Delay: Shifting the signal to the right

pu tu

Po

ly te

ch n

ic

of

am ib

Summary of Part A: Chapter 1

The difference between signals and systems The sampling theorem, its limitations (e.g. aliasing), and the sampling frequency (fs) How to distinguish between continuous (analog) and discrete time (digital) signals How to distinguish between differential and difference equations

T.

Ka

pu

tu

Po

ly t

ec

hn

ic

of

At the end of this chapter, it is expected that you should know:

N am ib

Continuous and discrete periodic signals and their definitions

ec

2 f a frequency = fs

hn
2 k fsk = fa

Manipulation of discrete-time signals The unit impulse and its properties

T.

Ka

pu

tu

Po

The number of samples in a period: N = = Digital frequency

ly t

ic

The relationship between analog and digital

of

N am ib

You might also like