You are on page 1of 9

ECE 308 -2

ECE 308 Continuous-Time and Discrete-Time Signal Sampling of Analog Signals


Z. Aliyazicioglu Electrical and Computer Engineering Department Cal Poly Pomona

ECE 308-2 1

Continuous Time Signal


Lets have the following continuous-time sinusoidal signal:

xa (t ) = A cos(t + ), < t <


where A: the amplitude of the signal : the frequency in radians per second : the phase in radians The frequency can be expressed in cycles/s or Hertz (Hz)

F=

2
Tp =

The period is define as

1 F
ECE 308-2 2

Continuous Time Signal


Tp

The analog sinusoidal signal can repeat every period

xa (t + Tp ) = xa (t )
Increasing the frequency means decreasing the period of the signal, so that increase the rate of oscillation of the signal

ECE 308-2 3

Continuous Time Signal


The analog sinusoidal signal can be expressed in complex exponent for as
xa (t ) = A cos(t + ) =
Im

A j ( t + ) A j ( t + ) e + e 2 2

A/2 t+ t+ A/2

Re

ECE 308-2 4

Discrete-Time Sinusoidal Signal


A discrete-time sinusoidal signal may be expressed as

x(n) = A cos( n + ), < n <


where n : integer variable A : the amplitude of the signal : the frequency in radians per sample : the phase in radians The frequency can be expressed in cycles per sample

f =
and the signal is

x(n) = A cos(2 fn + ), < n <


ECE 308-2 5

Discrete-Time Sinusoidal Signal


Example: A sinusoidal signal with the amplitude A, frequency =/6 radians per sample (f=1/12) and phase =/3
x(n)

A discrete-time sinusoidal is periodic only if its frequency is rational number

x(n + N ) = x( n) cos[2 f 0 ( N + n) + ] = cos[2 f 0 n + ]


It is true if and only if

2 f 0 N = 2k

or

f0 = k / N
ECE 308-2 6

Discrete-Time Sinusoidal Signal


Discrete-time sinusoids whose frequencies are separated by an integer multiple of 2 are identical

cos[( 0 + 2 ) n + ] = cos( 0 n + 2 n + ) = cos( 0 n + )


xk (n ) = A cos( k n + ) = A cos[(0 + 2k )n + ], for k = 0,1,2...
are identical and where 0 The highest rate of oscillation in a discrete-time sinusoidal is attained when = (or =-) equivalent to f=1/2 (or f=-1/2)
x(nFor ) = A cos 0 n
f N 0 0 /8 1/16 16 /4 1/8 8 /2 1/4 4 1/2 2
ECE 308-2 7

Discrete-Time Sinusoidal Signal

If 0 2 , it creates an aliasing. How? Lets 1 = 0 which 0 2 and 2 = 2 0 which 0 2


x1 (n) = A cos 1n = A cos 0 n x2 (n) = A cos 2 n = A cos(2 0 )n = A cos 0 n
= x1 (n)

Hence, 2 is an alias of 1 .

ECE 308-2 8

Analog-to-Digital Conversion (ADC)


In many real-world application, the signals are analog. To process analog signal by digital, we need to convert them into digital signal This process is called Analog-to-Digital conversion and devices are A/D Converter (ADCs). A/D Conversion has three steps:
xa(t) Analog Signal Sampler x(n) Quantizer xq(n) Coder Digital Signal

Discrete-Time Signal

Quantized Signal

Sampling :

Conversion of a continuous-time signal into a discrete-time signal Taking samples of the continuous-time signal at discrete-time instants. x(n) = xa ( nT ) Sampling interval is T.
ECE 308-2 9

Analog-to-Digital Conversion (ADC)


2. Quantization: Conversion of a discrete-time continuous valued signal into a discrete-time, discrete valued digital signal xq (n) Digital signal values are a finite set of possible values. The differences between xq ( n) and x( n) ( xq (n) x(n) ) is called the quantization error. Discretetime Signals are defined only at certain specific values of time or variable.

3. Coding: Each discrete value is represented by a b-bit binary sequence.

ECE 308-2 10

Sampling of Analog Signals


xa(t) Fs=1/T x(n)=xa(nT) Discrete-time Signal

Analog Signal

>> x=0:0.1:10; >> y=x.^3-18*x.^2+81*x; >> plot(x,y)

>> x=0:10; >> y=x.^3-18*x.^2+81*x; >> stem(x,y)

ECE 308-2 11

Sampling of Analog Signals


The discrete-time signal x(n) is obtained by taking-samples of the analog signal xa (t ) every T second.

x ( n) = xa ( nT )
The time interval T is called the sampling period or sampling interval The sampling rate or the sampling frequency is found as
Fs = 1 [ Hz ] T

The relationship between the variable t of analog signal and the variable n of discrete-time signal is

t = nT =

n Fs
ECE 308-2 12

Sampling of Analog Signals


Consider an analog sinusoidal signal

xa (t ) = A cos(2 Ft + )
Sampling frequency is Fs = 1/ T , so that
x( n) = xa (nT ) = A cos(2 FnT + ) = A cos(2 F n + ) Fs

or

x(n) = A cos( n + )
f = F Fs

We call relative or normalize frequency that Equivalently,

2 F = = T Fs Fs
ECE 308-2 13

Sampling of Analog Signals


Relations between analog signals and Discrete-time signal
Continuous-time signal
= 2 F
[radians/s]
F [Hz]

Discrete-time signal
= 2 f [radians/sample]
f [cycles/sample]

=T , f = F / Fs
= /T , F = f .Fs

1 2

1 2

Range
< < < F <

Range

Fs F F 2 2 2
ECE 308-2 14

Sampling of Analog Signals


The fundamental different between analog signal and discrete-time signal is frequency range. The highest frequency in the discrete-time signal is = or , f = 1/ 2 the sampling rate Fs , the corresponding highest value of F and are

Fmax =

Fs 1 = 2 2T

max = Fs =

Example:

Consider two analog signal

x1 (t ) = cos 2 10t

x2 (t ) = cos 2 50t

The sampling rate is Fs = 40Hz Find discrete time signal x1(n) and x2(n)
ECE 308-2 15

Sampling of Analog Signals


Example:(cont) Corresponding discrete-time signals are
10 x (n) = cos 2 n = cos n 40 2 5 50 x(n) = cos 2 n = cos n 2 40

We know that
cos 5 n = cos 2 + n = cos n 2 2 2

Hence

x1 (n) = x2 (n)

The frequency F2 = 50Hz is an alias of the frequency F1 = 10Hz at the sampling rate of Fs = 40 Hz. Even
Fk = ( F1 + 40 k ), k = 1,2,3,...

are alias of F1 at the sampling rate at Fs = 40 Hz.


ECE 308-2 16

Sampling of Analog Signals


In general form, Fk = ( F0 + kFs ), k = 1, 2, 3,... are creates an alias for frequency F0 of analog signal, which are outside of

Fs F F 2 2 2

ECE 308-2 17

Sampling of Analog Signals

F=10 Hz

F=50 Hz T=0.025 s
>> t=0:0.001:0.2; >> x1=cos(2*pi*10*t); >> plot (t,x1,'--') >> hold on >> x2=cos(2*pi*50*t); >> plot (t,x2,'r--') >> n=0:0.025:0.2; >> y1=cos(2*pi*10*n); >> stem (t,y1,'g-') >> Title('Discrete-time signal with x1(t) and x2(t)')

Fs=40 Hz

ECE 308-2 18

You might also like