systems and circuits lab 1: signals 1. even and odd … 1/lab/eng/lab1_syc_08-09.pdf · systems and...

21
Systems and Circuits Lab 1: Signals Academic year 08/09 1. Even and Odd parts of a Continuos Signal In this first section, we will learn how to compute the even and odd parts of a signal with the aid of the software tool Matlab. First, we will perform the operations on continuous signals and then we will move on to discrete sequences. 1.1. Example 1 Please compute the even and odd parts of the following continuous signal. 1 -1 -2 1 t x(t) 1.2. Solution to the Example 1 with Matlab To evaluate the odd and even parts of any given signal, we must perform the following mathematical operations: Even{x(t)} = x p (t)= x(t)+ x(-t) 2 Odd{x(t)} = x i (t)= x(t) - x(-t) 2 Let’s see how we may perform this operations with Matlab. Please type, in the command window the following sentences 1 : close all; clc; clear; syms t; x = (t+2)*(heaviside(t+2)-heaviside(t+1)) - t*(heaviside(t+1)-heaviside(t)) +... t*(heaviside(t)-heaviside(t-1)) + heaviside(t-1); xEVEN = (x + subs(x,t,-t))/2; xODD = (x - subs(x,t,-t))/2; The first command line instructs Matlab to close any figure that may still be opened (close all;), to clear up any command that may still be written in the command window (clc;), and to clear the values of any variable that may be previously defined (clear;). In the sequel, we define the symbolic variable t (syms t;) which will be our time variable as well as the independent variable. Next, we need to define the signal x(t). Note, that we may construct it via straight lines and the step function (also called Unit Step function or Heaviside Step Function): x(t)=(t + 2) · [u(t + 2) - u(t + 1)] + (-t) · [u(t + 1) - u(t)] + (t) · [u(t) - u(t - 1) + u(t - 1)] + u(t - 1) 1 NOTE: there is no need to type in every line; you can copy the senteces from the .pdf and paste them in Matlab. However, you do need to spend time trying to understand what every command means, what is used for and how it should be used. 1

Upload: phungcong

Post on 30-Jul-2018

218 views

Category:

Documents


1 download

TRANSCRIPT

Systems and CircuitsLab 1: Signals

Academic year 08/09

1. Even and Odd parts of a Continuos Signal

In this first section, we will learn how to compute the even and odd parts of a signal with the aidof the software tool Matlab. First, we will perform the operations on continuous signals and thenwe will move on to discrete sequences.

1.1. Example 1

Please compute the even and odd parts of the following continuous signal.

1-1-2

1

t

x(t)

1.2. Solution to the Example 1 with Matlab

To evaluate the odd and even parts of any given signal, we must perform the following mathematicaloperations:

Even{x(t)} = xp(t) =x(t) + x(−t)

2

Odd{x(t)} = xi(t) =x(t) − x(−t)

2

Let’s see how we may perform this operations with Matlab. Please type, in the command window

the following sentences 1:

close all; clc; clear;

syms t;

x = (t+2)*(heaviside(t+2)-heaviside(t+1)) - t*(heaviside(t+1)-heaviside(t)) +...

t*(heaviside(t)-heaviside(t-1)) + heaviside(t-1);

xEVEN = (x + subs(x,t,-t))/2;

xODD = (x - subs(x,t,-t))/2;

The first command line instructs Matlab to close any figure that may still be opened (close all;),to clear up any command that may still be written in the command window (clc;), and to clearthe values of any variable that may be previously defined (clear;). In the sequel, we define thesymbolic variable t (syms t;) which will be our time variable as well as the independent variable.Next, we need to define the signal x(t). Note, that we may construct it via straight lines and thestep function (also called Unit Step function or Heaviside Step Function):

x(t) = (t + 2) · [u(t + 2) − u(t + 1)] + (−t) · [u(t + 1) − u(t)] + (t) · [u(t) − u(t − 1) + u(t − 1)] + u(t − 1)

1NOTE: there is no need to type in every line; you can copy the senteces from the .pdf and paste them in Matlab.However, you do need to spend time trying to understand what every command means, what is used for and howit should be used.

1

In Matlab, the step function is obtained with the function heaviside.Every time that we have a defined signal x(t), we can obtain its even and odd parts (named in thisapplication as xEVEN and xODD), applying the mathematical expresions given before. Please notethat if we wish to evaluate the signal in a point different to t, we have to use the subs function.Next, we will depict the three signals. Type in the command line:

figure(1);

ezplot(x,[-4,4]);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’x(t)’);

axis equal

grid

pause

figure(2);

ezplot(xEVEN,[-4,4]);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’EVEN PART’);

axis equal

grid

pause

figure(3);

ezplot(xODD,[-4,4]);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’ODD PART’);

axis equal

grid

With each block we open a new figure and we represent in it a new signal. It important to note,that we must use ezplot to draw or plot any signal that is defined in a symbolic way and thatwe can give the interval over which we desire to depict the signal (in this case, [-4, 4]). The rest ofthe lines are used for visualisation purposes (augmentation of the thickness of the line, title of thefigure, to even up the units of both x and y axes, to put a mesh or a grid on the background tobe able to identify the significant points of the signal, the command pause is used to temporarilyhalt the simulation until enter is pressed).

We then obtain the following result:

−4 −3 −2 −1 0 1 2 3 4

−2

−1

0

1

2

3

t

x(t)

2

−4 −3 −2 −1 0 1 2 3 4

−2

−1

0

1

2

3

t

EVEN PART

−4 −3 −2 −1 0 1 2 3 4

−3

−2

−1

0

1

2

3

t

ODD PART

1.3. Exercise 1

We will now try to automate the calculations made previously, programming a function that willperform all the instructions written above. This function can be called at any time, it will take asan input any continuous signal and it will offer as an output the even and odd parts of the signalas well as the three figures described above.Programming functions in Matlab is as simple as writing similar commands to the ones above ina M-file that we open in the Editor window and whose first line is:

function [VarOut1,VarOut2,...] = FunctionName(VarIn1,VarIn2,...)

Me must also save the file with the extension .m. From that moment and on there exists a newfunction in Matlab called FunctionName that we can execute from the command window, sameas any Matlab pre-defined function, as long as we save the file in the working directory (NOTE!),passing the corresponding input variables and obtaining the corresponding output variables.For our particular example, we will create a function called EvenOddCon”2. Please copy the followingsentences in a new file, that we can open from the Matlab editor, and save it with the nameEvenOddCon.m:

2It is recommendable to name the functions describing what they do (in this case: even, odd and continuoussignal).

3

function EvenOddCon(x,I)

%""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

% OBJECTIVE:

% Program that computes the Even and Odd parts of a Continuous

% signal and displays the resulting three signals.

%

% USE:

% EvenOddCon(x,I)

%

% ARGUMENTS...

% ...INPUT: x ---> Continuous Signal.

% I ---> (Independent variable) Interval, in which we are going to represent the signal

% ...OUTPUT: None

%

% COMMENTARIES:

% The signal has to be a symbolic function, with a unique independent variable,

% which has to be ’t’.

%

% SEE ALSO:

% EvenOddDis

%

%""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

% (C) STUDENT NAME, 2008.

% Version 1.0

%""""""""""""""""""""""""""""""""""""""""

syms t;

% Symbolic Independent Variable Definition

xEVEN = (x + subs(x,t,-t))/2;

% Even part of a signal.

xODD = (x - subs(x,t,-t))/2;

% Odd part of a signal.

F = figure(1);

set(F,’name’,’EVEN AND ODD PARTS (CONTINUOUS SIGNAL)’);

subplot(221)

ezplot(x,I);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’ORIGINAL SIGNAL: x(t)’);

axis equal

grid

subplot(223)

ezplot(xEVEN,I);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’EVEN PART: x_E(t)’);

axis equal

grid

subplot(224)

ezplot(xODD,I);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’ODD PART: x_O(t)’);

axis equal

grid

4

Please play attention to the following:

· The first line defines a new function which we will be able to use from now and on anytimewe wish to do so.

· The defined function (called EvenOddCon) has two input arguments and none for the output.

· Any line in the .m file which begins with the character % is a commentary, in other words,it does not belong to the code and will not be compiled or executed. Please note, that thecommentaries that precede the definition of the function, will be the definition of the functionin the help section and may facilitate the use of it by any person different to the programmer3.You may check this typing in the command line help EvenOddCon after you have saved thefile.

· The possibility of including several graphs in a single figure by the use if the function subplot.Type in help subplot, from the command line, to learn how to use it.

1.4. Milestone 1

Please compute the Even and Odd parts of the following continuous signals, using the functionEvenOddCon:

a. x1(t) = sen(t), represented in the interval [−4π, 4π].

b. x2(t) = |cos(t)|, in the interval [−3π, 3π].

c. x3(t) = 4 · {t · [u(t) − u(t − 1)] + (−t + 2) · [u(t − 1) − u(t − 2)]}, in the interval [−4, 4].

Please check that you obtain the results shown next. For the first signal:

−10 −5 0 5 10

−5

0

5

t

ORIGINAL SIGNAL: x(t)

−10 −5 0 5 10

−5

0

5

x

EVEN PART: xE(t)

−10 −5 0 5 10

−5

0

5

t

ODD PART: xO

(t)

Please pay attention to the fact that, this signal is classified as an Odd signal (that is, a signalwith Odd symmetry) and therefore the Even part of the signal is null (it has value zero) and itsOdd part is an identical copy of the signal.Note also, that this is a periodic signal, with a period of 2π, and therefore we can visualize a totalnumber of 4 periods (4 complete waves).

3These comments are also helpful for the programmer itself, if the function is used a while after it has beenprogrammed

5

For the second signal:

−5 0 5

−6

−4

−2

0

2

4

6

t

ORIGINAL SIGNAL: x(t)

−5 0 5

−6

−4

−2

0

2

4

6

t

EVEN PART: xE(t)

−5 0 5

−6

−4

−2

0

2

4

6

x

ODD PART: xO

(t)

In this case, the signal is an Even signal, therefore the Odd part is the null one and the Even partis the one identical to the original.Note as well, that the presence of the absolute value makes all the signal to exist above the abs-cissas (or x-axis) and the period to be π, so now the total number of complete visualized periodsis 6 (or 6 half-waves).

Please do not overlook in the two cases that:

· The even part of a signal always has even symmetry and the odd part always has evensymmetry.

· If we add up the even and odd parts of a signal we obtain the original signal.

6

2. Even and Odd Parts of a Discrete Sequence

2.1. Example 2

Estimate the even and odd parts of the following discrete sequence.

3 4

-3-4

1

n1 2

-1-2

. . .

. . .

-1

x[n]

2.2. Solution to the Example 2 with Matlab

To evaluate the even and odd parts of a sequence, we must perform the following mathematicaloperations:

Even{x[n]} = xp[n] =x[n] + x[−n]

2

Odd{x[n]} = xi[n] =x[n] − x[−n]

2

For the case of discrete sequences it is not necessary to use symbolic variables anymore as Matlabworks in terms of vectors and matrices (as we can guess from its name: MAT-rix LAB-oratory).This means that discrete sequences in Matlab are treated as vectors.

As we use vectors to represent the sequences we are faced with the problem of sequences of infinitelength (that is sequences with infinite non zero samples) as it is impossible to work with the full se-quence. Pay attention to these special cases and the implications that they entail. Note from now anon, that sometimes it will only be possible to obtain approximate results and qualitative behaviours.

To solve our example, we will create a new function called EvenOddDis whose code can be viewedin the following page. Have a look at it and pay special attention to the following:

· The way a discrete sequence is folded.

· The function used to graphically represent the discrete sequeces (stem). Type in help stem,in the command window to see the different versions of the command that we may use.

7

function EvenOddDis(x,n)

%""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

% OBJECTIVE:

% Program that computes the Even and Odd parts of a discrete sequence.

% It also displays the resulting three signals.

%

% USE:

% EvenOddDis(x,I)

%

% ARGUMENTS...

% ...INPUT: x ---> Discrete sequence samples.

% n ---> Discrete time vector

% ...OUTPUT: None

%

% COMMENTARIES:

% The samples of vector ’x’ have to be centered with respect to the origin,

% that is, they have to have the form of: [-L, ..., L].

%

% SEE ALSO:

% EvenOddCon

%

%""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

% (C) STUDENT NAME, 2008.

% Version 1.0

%""""""""""""""""""""""""""""""""""""""""

xEVEN = (x + x(end:-1:1))/2;

% Even part of the sequence. To determine x[-n], it is sufficient to read

% the samples from back to fromt, that is, staring from the last one and

% finishing with the first one.

xODD = (x - x(end:-1:1))/2;

% Odd part of the sequence.

F = figure(1);

set(F,’name’,’ODD AND EVEN PARTS (DISCRETE SEQUENCES)’);

subplot(221)

stem(n,x,’filled’);

xlabel(’n’);

grid

title(’ORIGINAL SEQUENCE: x[n]’);

subplot(223)

stem(n,xEVEN,’filled’);

xlabel(’n’);

grid

title(’EVEN PART: x_e[n]’);

subplot(224)

stem(n,xODD,’filled’);

xlabel(’n’);

grid

title(’ODD PART: x_o[n]’);

8

Once we have created the function, in order to determine the solution to the example, we mustwrite in the command window the following sentences:

close all; clc; clear;

x = [-1*ones(1,10),1*ones(1,11)];

n = -10:10;

EvenOddDis(x,n);

And we obtain the following result:

−10 −5 0 5 10−1

−0.5

0

0.5

1

n

ORIGINAL SEQUENCE: x[n]

−10 −5 0 5 100

0.2

0.4

0.6

0.8

1

n

EVEN PART: xe[n]

−10 −5 0 5 10−1

−0.5

0

0.5

1

n

ODD PART: xo[n]

2.3. Exercise 2

Please estimate the even and odd parts of the following discrete sequence:

3

4-3

-4

1

n1 2-1-2. . .

. . .

-1

[ ]x n

22

-1

5

-5

1

9

2.4. Milestone 2

Use the EvenOddDis program to resolve Exercise 2.

Make sure that you obtain the following result:

−5 0 5−1

−0.5

0

0.5

1

1.5

2

n

ORIGINAL SEQUENCE: x[n]

−5 0 5−0.5

0

0.5

1

1.5

n

EVEN PART: xe[n]

−5 0 5−1.5

−1

−0.5

0

0.5

1

1.5

n

ODD PART: xo[n]

Note that in discrete sequences, as well as in continuous signal, the even part has even symmetryand the odd part has odd symmetry and that the sum of both makes the original signal.

10

3. Basic Operations on Signals

Lastly, we will illustrate with several examples some basic operations on signals.

3.1. Example 3

Being x(t) the continuous signal of the figure, obtain x(

t2

+ 1)

:

1 2

1

t

x(t)

3.2. Solution to Example 3 with Matlab

To be able to work out the requested transformation we must perform a scaling and a shifting ope-ration both with respect to the x-axis. The order in which we make the operations is unimportant,as long as we make sure we perform them well. We may use the following Matlab commands toobtain x

(

t2

+ 1)

in two different ways:

close all; clc; clear;

syms t;

x = heaviside(t)-heaviside(t-1)+(-t+2)*(heaviside(t-1)-heaviside(t-2));

y1 = subs(x,t,t/2);

z1 = subs(y1,t,t+2);

figure(1);

subplot(321)

ezplot(x,[-3,5]);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’x(t)’);

axis equal

grid

pause

subplot(323)

ezplot(y1,[-3,5]);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’SCALE FIRST’);

ylabel(’y_1(t)=x(t/2)’);

axis equal

grid

pause

subplot(325)

ezplot(z1,[-3,5]);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

ylabel(’z_1(t)=y_1(t+2)=x(t/2+1)’);

title(’SHIFT NEXT’);

axis equal

grid

pause

11

y2 = subs(x,t,t+1);

z2 = subs(y2,t,t/2);

subplot(322)

ezplot(x,[-3,5]);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’x(t)’);

axis equal

grid

pause

subplot(324)

ezplot(y2,[-3,5]);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’SHIFT FIRST’);

ylabel(’y_2(t)=x(t+1)’);

axis equal

grid

pause

subplot(326)

ezplot(z2,[-3,5]);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

ylabel(’z_2(t)=y_2(t/2)=x(t/2+1)’);

title(’SCALE NEXT’);

axis equal

grid

So, we obtain successively the following graphs:

−2 0 2 4

−1

0

1

2

t

x(t)

−2 0 2 4

−1

0

1

2

t

SCALE FIRST

y 1(t)=

x(t/2

)

−2 0 2 4

−1

0

1

2

t

SHIFT NEXT

z 1(t)=

y 1(t+

2)=

x(t/2

+1)

−2 0 2 4

−1

0

1

2

t

x(t)

−2 0 2 4

−1

0

1

2

t

SHIFT FIRST

y 2(t)=

x(t+

1)

−2 0 2 4

−1

0

1

2

t

SCALE NEXT

z 2(t)=

y 2(t/2

)=x(

t/2+

1)

12

Pay attention to the following:

· Each column represents a different order in the operations (in the first column we first scaleand then shift; in the second column we first shift and then scale).

· We obtain the same results both ways.

· If we first scale and then shift, the quantities ob both operations have to be:1

2for the scaling and 2 for the shifting4.

· If we first shift and then scale, the quantities of both operations have to be:1 for the shifting and 1

2for the shifting, in other words, the quantities that are obtained via

visual inspection.

Once we get this idea straight, we can systematise or automate the operation, writting a functionthat will obtain and represent any transformation of a signal. Lets see how we may do this:

4Recall that, generally, if we express a signal as x(B · t + C), when we first scale and then shift, the scalingquantity has to be B, but the shifting one will be given by C

B.

13

function BasicOperations(x,Ix,y,Iy)

%""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

% OBJECTIVE:

% Program that takes as input a signal and its transformation and displays

% them.

%

% USE:

% BasicOperations(x,xI,y,Iy)

%

% ARGUMENTS...

% ...INPUT: x ---> Original signal.

% Ix ---> Visualization interval for the original signal.

% y ---> Transformed signal.

% Iy ---> Visualization interval for the transformed signal.

% ...OUTPUT: None

%

% COMMENTARIES:

% The signal has to be a symbolic function, with a unique independent variable,

% which has to be ’t’.

%

% SEE ALSO:

%

%""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

% (C) STUDENT NAME, 2008.

% Version 1.0

%""""""""""""""""""""""""""""""""""""""""

syms t;

F = figure(1);

set(F,’name’,’BASIC OPERATIONS WITH CONTINUOUS SIGNALS’);

subplot(211)

ezplot(x,Ix);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’x(t)’);

axis equal

grid

subplot(212)

ezplot(y,Iy);

Linea = findobj(’type’, ’line’);

set(Linea, ’linewidth’, 3);

title(’y(t)’);

axis equal

grid

14

With the help of the previous function, in order to solve example 4, we need only to type in thecommand window the following sentences:

close all; clc; clear;

syms t;

x = heaviside(t)-heaviside(t-1)+(-t+2)*(heaviside(t-1)-heaviside(t-2));

y = subs(x,t,t/2+1);

BasicOperations(x,[-4 4],y,[-4 4])

Therefore we obtain:

−4 −3 −2 −1 0 1 2 3 4

−0.5

0

0.5

1

1.5

t

x(t)

−4 −3 −2 −1 0 1 2 3 4

−0.5

0

0.5

1

1.5

t

y(t)

ORIGINAL SIGNAL

TRANSFORMED SIGNAL

3.3. Exercise 3

If x(t) is the following signal:

x(t)

t1 2 3 4-1

-1

1

2

15

please obtain the following signal transformations:

a. x(−t + 1)

b. x(2t − 1)

c. x(−2t + 4)

d. x(−t − 2)

e. x(

t+6

3

)

f. − 1

2· x

(

− t3

+ 2)

− 1

3.4. Milestone 3

Solve Exercise 3 with the help of function Se~nalesBasicas, and check that you obtain the follo-wing results:

x(−t + 1):

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

ORIGINAL SIGNAL: x(t)

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

TRANSFORMED SIGNAL: y(t)

x(2t − 1):

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

ORIGINAL SIGNAL: x(t)

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

TRANSFORMED SIGNAL: y(t)

16

x(−2t + 4):

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

ORIGINAL SIGNAL: x(t)

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

TRANSFORMED SIGNAL: y(t)

x(−t − 2):

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

ORIGINAL SIGNAL: x(t)

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

TRANSFORMED SIGNAL: y(t)

17

x(

t+6

3

)

:

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

ORIGINAL SIGNAL: x(t)

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

TRANSFORMED SIGNAL: y(t)

− 1

2· x

(

− t3

+ 2)

− 1:

−6 −4 −2 0 2 4 6

−1

0

1

2

3

t

ORIGINAL SIGNAL: x(t)

−6 −4 −2 0 2 4 6

−3

−2

−1

0

t

TRANSFORMED SIGNAL: y(t)

18

4. Hardware: Oscilloscope and Function Generator

4.1. Theoretical Background

The instruments we are about to use in the Hardware section of this lab session will be the following:

Signal Generator A signal generator is an instrument that provides electric signals. Spe-cifically, it is used ot obtain periodic signals (where voltage varies periodically with time)controlling the period (time in which a complete oscillation is carried out) and its amplitude(maximum value that the voltage takes). Typically it generates square, triangular and sinu-soidal signals. In the following figure we can see the front view of the function generator thatis available in our labs, as well as the most important control buttons for completing thisexercise.

Output

Selection Button

Frequency Amplitude Function

Type

Output Selection

Cursors

Display

Shift Cursors

Enter On/Off

Oscilloscope Its a tool that allows us to visualize the electric voltages that vary with time.When an electrical signal is applied to the input terminal (either Channel 1 or Channel 2) ofthe oscilloscope, in the display of it we will see a graphical representation of the voltage withrespect to time (as long as the oscilloscope control knobs are correctly adjusted). Usuallythe oscilloscope only allows us to visualise periodic signals, however this is sufficient for mostof the applications. In the oscilloscope we may not only see the signals, but we may alsomeasure their period or amplitude. In order to do so, we can use the horizontal and verticalscales situated in the display. In the following figure we can see the front view of one of theoscilloscopes of our lab, as well as the different functionality buttons.

On/Off Measure Autoset

Channel

Selection

Channel 1

Input

Channel 2

Input

19

4.2. How to Measure

As we mentioned before, the oscilloscope its a measuring tool, and therefore, any use or manipula-tion of it does not affect the signal itself. The modifications that we make in the generator, in theother hand, will affect the signal.

The display of the oscilloscope presents some higher divisions or partitions (which make up a meshor net) and some subdivisions in the main axis. These smaller subdivisions correspond to a 1

5of

the size of one of the higher divisions (in other words 0.2 of a big partition).

Any measurements made to a signal is as easy as counting the number of divisions (and subdi-visions) to determine the amplitude of it (as we would do it with a ruler or a measuring tape).The difference between the ruler and the oscilloscope is that we have the possibility of changingthe scale of the oscilloscope with the scale control knobs. This way, we can control the voltageamplitude and time scales and adjust then to the signal in order to improve visualisation. Theoptimal way to visualise and analyse a signal is amplifying to the maximum the amplitude, whichis what we wish to measure.

4.3. Exercise 4

The objective of the exercise which we are about to perform is to familiarise with the operationof these tools, therefore we will make a few measurements (of frequency, period, mean value, etc)using the oscilloscope to a sinusoidal signal generated in the function generator. The steps tofollow are described below:

1. Conect one end of the BNC-BNC cable to the function generator output and the other endto the input of Channel 1 on the oscilloscope.

2. Switch on the function generator and make sure that the correct output is selected (a greenlight should indicate if a channel is selected, if this is not the case, please press the channelselection button, as described in the previous figure)

3. Press the Func button to select the type of function that we are going to use. To see thedifferent options use the cursors up and down (indicated in the previous figure). Select asinusoid signal (sin) and confirm the changes pressing Enter.

4. Switch on the oscilloscope.

5. Adjust the oscilloscope display values to be able to see the signal correctly, pressing Autoset.

6. Measure the frequency, the mean value and the peak-to-peak value of signal making use ofthe buton Measure and reading the results in the right margin of the display.

4.4. Milestone 4

Please repeat the previous exercise for the following signals: square, triangular and ramp5. In thefollowing figures we can see the type of signals that we should obtain in the oscilloscope:

5NOTE! that to confirm any changes made in the function generator it is necessary to press Enter.

20

(a)

(b)

(c)

21