Vous êtes sur la page 1sur 3

Lab Session 07

BE (EL)

Digital Signal Processing

Studying Time Frequency Characteristics using Continuous


Time Fourier series (CTFS)
OBJECTIVE: The goal of this lab to develop the understanding of time and frequency domains and their
usage.
1. Generate a continuous time periodic pulse train signal with time period (1 sec) and pulse width (0.5
sec) for -10 < t < 10 sec.
2. Select one unique period and apply CTFS equation to compute first 20 spectral coefficients.
3. Observe the plots in time & frequency domain to verify the following properties.

THEORY:
As emphasized in lab-4, sinusoids are an important part of signal analysis. We noted that many signals
that occur in the real world are composed of sinusoids. Any periodic signal can be written exactly as a
sum of amplitude-scaled and phase-shifted sinusoids. Equivalently, we can use Eulers inverse formulas
(synthesis equation) to write periodic signals as sums of complex exponentials. The description of a
signal as a sum of sinusoids or complex exponentials is known as the spectrum of the signal.
The basic idea of frequency analysis/ spectral analysis/ harmonic analysis is that any signal can be
described as a sum or integral of sinusoidal signals. However, the exact form of the representation
depends on whether the signal is continuous-time or discrete-time and whether it is periodic or
aperiodic. The underlying mathematical framework is provided by the theory of Fourier series.
Why frequency domain?
Why do we need another representation for a signal? Isnt the usual time-domain representation
enough? It turns out that spectral (or frequency-domain) representations of signals have many
important properties.
First, a frequency domain representation may be simpler than a time-domain representation, especially
in cases where we cannot write an analytic expression for the complicated (non sinusoidal) signal.
Second, a frequency-domain representation of a signal can often tell us things about the signal that we
would not know from just the time-domain signal like which components of signal are significant or not.
Third, a signals spectrum provides a simple way to describe the effect of certain systems (like filters) on
that signal. There are many more uses for frequency-domain representations of a signal, and we will
examine many of them throughout this course. Spectral representations are one of the most central
ideas in signals and systems theory, and can also be one of the trickiest to understand.
Consider the following problem. Suppose that we have a signal that is actually the sum of two different
signals. Further, suppose that we would like to separate one signal from the other, but the signals
overlap in time. If the signals have frequency-domain representations that do not overlap, it is still
possible to separate the two signals. In this way, we can see that frequency-domain representations
provide another dimension to our understanding of signals.
The major justification for the frequency domain approach is that LTI systems have a simple behavior
with sinusoidal inputs: the response of a LTI system to a sinusoid is a sinusoid with the same frequency
but may have different amplitude and phase.

Lab Session 07

BE (EL)

Digital Signal Processing

Fourier analysis is like a glass prism, which splits a beam of light into frequency components
corresponding to different colors.
In this session, we will explore the relation between time domain properties of the signal (Time period
and Pulse Width) and frequency domain properties (Spectral spacing and Lobe width) using CTFS
equation.
The Analysis equation for CTFS is given as:

1 /2
() 2

/2

The set of coefficients { } are known as the Fourier series coefficients and is the Fundamental
Frequency which is the inverse of the Time period of the complicated (non-sinusoidal) signal.
1. The spectral spacing of the spectrum is equal to the inverse of the time period of the signal.
2. The Lobe width of the spectrum is equal to the inverse of the pulse width of the signal.
Sinc function: The function sin()/, known as a sinc function, arises frequently in Fourier analysis and
in the study of LTI systems. A commonly used definition is sinc() = sin /.

Note: The following properties of signals are transform pairs of each other.
Continuity

Non periodicity

Discreteness

Periodicity

PROCEDURE:
1. Make a folder at desktop and name it as your current directory within MATLAB.
2. Open M-file editor and write the following code:

clear all;
close all;
clc;
t = [-10:0.001:10];
Tp = 1;
tau = 0.5;
Fo = 1/Tp;

% step size-so small to approximate cont time


% Time Period of the signal
% Pulse Width - Duty Cycle
% Fundamental Frequency

x=(1+square(2*pi*Fo*t,tau*100))/2; % Generating pulse train signal


figure,
plot(t,x,'Linewidth',2);
xlabel('secs');
ylim([-1.2 1.2]);
grid
pause

% Press any key

Lab Session 07

BE (EL)

Digital Signal Processing

% Extracting a portion of the signal equal to its period.


time_period = find(t == -Tp/2) : find(t == Tp/2);
x_period = x(time_period ); % signal values in one periodic interval
figure,
plot(t(time_period),x_period,'Linewidth',2);
xlabel('secs');
ylim([-1.2 1.2]);
grid
pause

% Press any key

% Computing CTFS Coefficients


for k = 1:20
B = exp(-j*2*pi*(k-1)*Fo.*[-Tp/2:0.001:Tp/2]);%basis function for CTFS
C(k) = sum(x_period.*B)/(length(x_period)*Tp);
end
kFo = Fo*[0:k-1];

% Frequency Scale in Hz.

figure,
stem(kFo,abs(C),'filled','Linewidth',2);
title('CTFS Coefficients');
xlabel('Frequency (Hz)');
grid

RESULT:
Explain (write) in your own words the cause and effects of what you just saw.

EXERCISE/TASK:
Now make the following modifications one by one and observe the effects.
1) Keeping Tp to 1 sec and change tau to 1 sec.
2) Keeping Tp to 1 sec and change tau to 0.05 sec and observe first 100 spectral coefficients.
3) Keeping Tp to 1 sec and change tau to 0.0001 sec and observe first 50 spectral coefficients.
Make notes about all observations.

Vous aimerez peut-être aussi