Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Periodic Signals: 1. Application Goal

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

1.

Periodic signals
1. Application goal
Periodic signals (square, sine, triangle wave) are analyzed in the frequency domain.
Signal distortion is measured at the output of signal generators for a sine wave.

2. Exponential Fourier expansion of periodic complex signals

A continuous-time signal x : R C is periodic if there is a constant strictly positive


T such that:
x ( t + T ) = x ( t ) , t R
(1)
The period is the smallest value of T that fulfills the equality from relation (1).
Property: If a function x(t ) is locally integrable and periodic of period T, then:
T

a +T

x ( t ) dt =

x ( t ) dt , a R

(2)

The integral computed over one period of the function does not depend on the starting
point of the interval of integration. This is simply denoted with:
x(t )dt
T

A periodic signal of period T, satisfies Dirichlet conditions if:


x(t ) is absolutely integrable over one period:

x(t ) dt <
T

x(t ) have a finite number of extrema (maxima and minima) in any given interval T.
x(t ) has a finite number of first-order discontinuities in any given interval T.
x(t ) is bounded.
If a periodic signal of period T, fulfills Dirichlet conditions, then it can be written
as an exponential Fourier expansion:

(3)
2
x(t ) = c k e jk0t , 0 =
T
k =
with
(4)
1
c k = x(t )e jk0t dt
T
T
where c k are the exponential Fourier coefficients.

3. Trigonometric and harmonic Fourier expansion for periodic real


signals
Consider periodic real signals x : R R , of period T, that satisfy Dirichlet conditions
then equation (3) can be written as:
- trigonometric Fourier series

(5)
x(t ) = a 0 + (a k cos k 0 t + bk sin k 0 t )
k =1

harmonic Fourier series

x(t ) = A0 + Ak cos(k 0 t + k )
k =1

(6)

Relations between coefficients from (3), (5) and (6) are:


c0 = a0 = A0

a k = Ak cos k = 2 c k cos(arg{c k }), k > 0

(7)

bk = Ak sin k = 2 c k sin (arg{c k }), k > 0


About relation (6):
- A0 is the DC offset component of the signal x(t )
-

The signal Ak cos(k 0 t + k ) is the k th order harmonic of signal x(t ) , k > 0


Ak

are root mean square (RMS) values of harmonics ( k > 0 )


2
The amplitude spectrum of a periodic signal x(t ) is the graphical representation
of Ak as a function of k 0 , k 0
The phase spectrum of a periodic signal x(t ) is the graphical representation of
k as a function of k 0 , k 0 .

4. Power of periodic signals


Consider a signal x(t ) . If the following limit converges:

2
1
PX = lim
x(t ) dt

2
it is called the power of the signal x(t ) .
We can show that if x(t ) is a periodic signal of period T, then we its power is
computed over one period:
2
(8)
1
PX = x(t ) dt
T
T

The following Parseval relation is valid:


PX =

ck

k =

A
2
= A0 + k
2
k =1

(9)

The first equality holds for any periodic signal; while the second one holds only for real
signals. Because the power of a sinusoid is the square of its RMS value then the power of
the periodic real signal is the sum of the power of the DC offset and the power for each
sinusoid (harmonics) in the harmonic Fourier expansion.

5. Relation between Fourier coefficients of a periodic signal and the


Fourier transform of the corresponding aperiodic signal
Consider x(t ) a periodic signal, of period T and x1 (t ) the signal:

T T
x (t ) , t ;
x1 ( t ) =
2 2
0, otherwise

(10)

Consider X 1 ( ) the Fourier transform of the signal x1 (t ) and c k the coefficients of the
exponential Fourier expansion of the signal x(t ) . We have:
(11)
1
2
, k ]
ck = X 1 ( k 0 ) , 0 =
T
T

6. Example
Consider the square wave in figure 1.

x(t )

t
T +

Fig.1 Square wave

The coefficients of the exponential Fourier series are in this case:


sin k 0 / 2 jk0 / 2
1
c k = A e jk0t dt = A
e
0
T
k

T +

(12)

The power of the square wave is:


PX =

(12`)

1 2
A
T

Taking into account (7) we have:


A0 = c0 = A

Ak = 2 c k = 2 A

sin k 0 / 2
k

k = arg{c k } =

(13)

k 0
k

+ 1 sgn sin 0
2
2


, k > 0
2

Amplitude and phase spectra are shown in figure 2 for the case of / T = 1/ 4 (duty
cycle).

Fig 2a) Amplitude spectrum of the square wave, / T = 1/ 4 .

Fig 2b) Phase spectrum of the square wave, / T = 1/ 4 .

7. Measurement of the signal distortion


If a sinusoidal signal is brought at the input of an analog linear time-invariant system, the
output is also sinusoidal.
In practice, the output is approximately sinusoidal, due to nonlinearities of real circuits.
Consider the input signal:
(14)
x(t ) = A cos( 0 t + )
and the output signal

(15)
y (t ) = A0 + Ak cos(k 0 t + k )
k =1

The distortion factor is defined as:


2

Ak

Pk

2
k =2
k =2
(16)
dY =
=
A1 / 2
P1
It is square root of the ratio sum of the powers of all harmonic frequencies above the
fundamental frequency, to the power of the fundamental harmonic.

8. Practical part
We use a signal generator, an oscilloscope and a spectrum analyzer. The signal
generator is the source of a periodic signal whose waveform can be sine wave, square
wave or triangle wave. The signal generators output 50 is connected to the input of
oscilloscope (channel 1) and to the input of the spectrum analyzer.
8.1. Visualize and sketch on graph paper the waveforms for periodic signals generated
using a function generator (square, sinusoidal, triangle wave). The signals are visualized
in time on the oscilloscope and in frequency using the spectral analyzer.
Signal generator:
fundamental frequency f0=1MHz
peak-to-peak amplitude App=1V
square wave: duty factor 0.5
Oscilloscope:
Amplitude scale 0.5V/div; Time scale 0.5s/div
Spectral analyzer:
Center frequency: 5MHz;
Reference level: 10dBm
Span width: 1MHz/div;
RBW:
200kHz
8.2 Compute Fourier coefficients Ak[V] for the harmonic series for the
sinusoidal wave x ( t ) = 0.5V sin 0t (use identification),
square wave with duty factor 0.5 (use the example in figure 1),
triangle wave.

Obs. The triangle wave can be written as:

x ( t ) = A0 + Ak cos ( k 0t + k ) =
k =1

8
1
1
1

sin 0t sin 30t + sin 50 t sin 70t + ...


2
2
2
2

3
5
7

8.3 Measure the RMS values of the harmonics for all signals using a spectrum analyzer.
Use Marker and Shift Marker to read the values in dBm. Do not forget the values
are either positive or negative.
Fill in the tables:
Table I. Sine wave
F
URMS [dBm]
f0
2f0
3f0
4f0
5f0

URMS[mV]

U[mV]

Ak[mV]

Table II. Square wave, duty factor 0.5. We ignore here the harmonics of even order,
they should be very small (close to zero).
URMS[mV]
U[mV]
Ak[mV]
f
URMS [dBm]
f0
3f0
5f0
7f0
9f0
Table III. Triangle wave
f
URMS [dBm]
f0
2f0
3f0
4f0
5f0

URMS[mV]

Useful:

20 lg

U RMS [ V ]
U ref

U[mV]

Ak[mV]

= U RMS [ dBm ]

The reference level is U ref = 223.6mV .


U RMS [ V ] =

U [V ]
2

8.4 Make a graphical representation of the amplitude spectra: measured and computed.
Compare the corresponding values.

8.5 Compute the distortion of the sine wave considering the RMS values from Table I
and equation (16).

9. Presentation of Matlab environment


MATLAB (MATrix LABoratory) is an interactive program, developed by Math Works
Inc.; its purpose is specially digital signal processing of data represented as vectors or
matrix.
MATLAB integrates digital computation with the ability of vizualizing the results; as
well as programming in a flexible environment.
MATLAB is an interactive system whose basic data element is an array that does not
require dimensioning. It allows us to solve many technical computing problems,
especially those with matrix and vector formulations, in a fraction of the time it would
take to write a program in a scalar noninteractive language.
MATLAB has evolved over a period of years with input from many users. In university
environments, it is the standard instructional tool for introductory and advanced courses
in mathematics, engineering, and science. In industry, MATLAB is the tool of choice for
high-productivity research, development, and analysis.
Working with MATLAB
After starting Matlab, a command window appears, that displays the prompter >> and
waits for the user to enter a command. Execution of a command is usually followed by
creating a variable in the workspace or by displaying a message and/or sketching a graph.
Take for example the command:
>>v=0:10
This will create the variable v and will display its elements on the screen.
Besides working in the command window, MATLAB offers the possibility of working
with M-files that contain code in the MATLAB language (with extension .m). There
are two kinds of M-files:
* Scripts, which do not accept input arguments or return output arguments. They
operate on data in the workspace.
* Functions, which can accept input arguments and return output arguments. Internal
variables are local to the function.
Scripts
When invoking a script, MATLAB simply executes the commands found in the file.
Scripts can operate on existing data in the workspace, or they can create new data on
which to operate. Although scripts do not return output arguments, any variables that they
create remain in the workspace, to be used in subsequent computations. In addition,
scripts can produce graphical output using functions like plot.
Scripts do not allow their integration in other programs, realized on the principle of
modularization. Script files are used to solve problems that require a long sequence of

commands in a successive order that would normally be difficult to execute for iterative
programming, such as in the command line.
Functions
The first line of a function M-file starts with the keyword "function". It gives the
function name and order of arguments. It differs from a script in the sense that it can
accept input arguments, and can return output arguments. Variables defined inside the
function are local to it; only the output variables remain.
Functions are used to extend MATLAB, to create new MATLAB commands. The
general form of the first line in a function can be written as:

function [param_output] = name_funcion (param_input)


where:
function keyword that declares the M-files as function (mandatory);
name_function name of function, also the name of the M-file, without the m extension.
It cannot be the same with a preexisting M-file name.
param_output output parameters separated by comma and delimited by square brackets.
If the functions has no output parameters, the square brackets and commas are removed.
param_input input parameters separated by comma and delimited by square brackets. If
the functions has no input parameters, the square brackets and
commas are removed.
Signals
Unit impulse

Unit impulse is defined as follows:


1, n = 0
0, n 0

[ n] =

Considering time shifting, we have:


1, n = n0
0, n n0

[ n n0 ] =

In MATLAB we cannot define infinite length sequences; we have to define the range for
the time n .
Define and plot in MATLAB the sequences:
1. x1 [ n ] = [ n ]
2. x2 [ n ] = [ n 1]
3. x3 [ n ] = [ n + 1] for 10 n 10 .
All vectors have 21 de elements.
8

x1.

% Generate unit impulse


clf; % erase old figure
n = -10:10; % generates a vector from -10 to 10 (time)
d = [zeros(1,10) 1 zeros(1,10)]; % generates the unit impulse
stem(n,d); % graphical representation in discrete-time
xlabel('n');ylabel('Amplitude');
title('Unit Impulse');
axis([-10 10 0 1.2]);
x2.

n=-10:10;
x2=zeros(size(n));
x2(12)=1;
stem(n,x2),grid,title(x2[n]),xlabel(n)
The moment of time n =1 corresponds to the 12-th element of the vector.
x3.

n=-10:10;
x3=zeros(size(n));
x3(10)=1;
stem(n,x3),grid,title(x3[n]),xlabel(n)
The moment of time n =-1 corresponds to the 10-th element of the vector.
Exercises
Define and plot in MATLAB the sequences:
for
1 n 20
1. x1 [ n ] = 0.7 [ n 5]
2. x1 [ n ] = 0.6 [ n ]
for
15 n 15
Unit step

The unit step is defined as follows:


1, n 0
0, n < 0

[ n] =

Considering time-shifting, we have:


1, n n0
0, n < n0

[ n n0 ] =

In MATLAB we cannot define infinite length sequences; we have to define the range for
the time n .
Define and plot in MATLAB the sequences:
1. x1 [ n ] = [ n ] for 10 n 10 .

2. x2 [ n ] = [ n 2] for 5 n 10 .
3. x3 [ n ] = [ n + 2] for 5 n 10 .
x1.
% Generate unit step
n = -10:10; % generates a vector from -10 to 10 (time)
u = [zeros(1,10) ones(1,11)]; % generates the unit step
stem(n,u); % graphical representation in discrete-time
xlabel('n');ylabel('Amplitude');
title('Unit step');
axis([-10 10 0 1.2]);
x2.
n=-5:10;
x2=[zeros(1,7),ones(1,9)];
stem(n,x2),grid,title('x_2[n]'),xlabel('n')
The moment of time n = 2 corresponds to the 18-th element of the vector.
x3.
n=-5:10;
x3=[zeros(1,3),ones(1,13)];
stem(n,x3),grid,title('x_3[n]'),xlabel('n')
The moment of time n = 2 corresponds to the 4-th element of the vector.
Exercises
Define and plot in MATLAB the sequences:
for
10 n 20
1. x1 [ n ] = 0.7 [ n ]
2. x2 [ n ] = [ n 7 ]
for
0 n 30
3. x3 [ n ] = 1.8 [ n + 3]
for
15 n 15

10

You might also like