Experiment #2: Continuous-Time Signal Representation I. Objectives
Experiment #2: Continuous-Time Signal Representation I. Objectives
II. DISCUSSION
INTRODUCTION
The analysis of continuous- and discrete-time signals is very important and is a
requirement in the analysis of feedback control systems. This chapter will
introduce you to different techniques in generating and analyzing continuous-
and discrete-time signals using MATLAB®.
Listing 2-2
>> t = 0:.01:40*pi;
>> y=20*sin(t).*sin(t./20);
1
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
>> plot(t,y)
Listing 2-2 shows a script that produces an amplitude modulated signal with the
equation
y = 20sin(t)sin(t / 20) . (2-2)
The plot is shown in Figure 2-2.
2
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
Listing 2-3
>> t = -5:0.01:10;
>> y = [zeros(1,length(-5:0.01:0-0.01))…
10*ones(1,length(0:0.01:10))];
3
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
>> plot(t,y,’+’)
Since the entire function will be a vector of values (which is actually 1501
values), it is better divide the vector into two: a sub-vector of ‘0’s as the first
element, and a sub-vector of ‘1’s as the second element. The idea is to first
generate a sub-vector of ‘1’ which is possibly done with
ones(1,length(0:0.01:10)). This sub-vector will be the second element of the step
function vector to be generated. This will produce 1001 copies of ‘1’s in the
vector. The next step is to generate a sub-vector of ‘0’s which is possibly done
with zeros(1,length(-5:0.01:0-0.01)). This sub-vector will be the first element of
the step function vector. Finally, a multiplicative factor of 10.0 is multiplied in the
sub-vector of ‘1’s.
Listing 2-3 is a straightforward way of generating a step function. Another method
is by first defining the two sub-vectors in a two variables. The two variables are
then used as the two entries in the step function vector.
Listing 2-4
>> t = -5:0.01:10;
>> y1 = zeros(1,length(-5:0.01:0-0.01));
>> y2 = 10*ones(1,length(0:0.01:10));
>> y = [y1 y2];
>> plot(t,y,’+’)
Ramp Function
A ramp function is a function that increases in amplitude as time increases from
zero to infinity. It is mathematically defined as
At, t>0
f s(t)= (2-4)
0, t<0
4
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
Figure 2-4. A plot of the ramp function with a multiplicative factor of 2.0.
Listing 2-5
>> t1=-5:0.01:0-0.01;
>> t2=0:0.01:10;
>> t=[t1 t2];
>> y1 = zeros(1,length(t1));
>> y2 = 2*ones(1,length(t2)).*t2;
>> y=[y1 y2];
>> plot(t,y,’+’)
5
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
(2-5)
IV. PROCEDURES
1. Generate a step function with an amplitude of 5.0. Plot the signal at the range
of −10 ≤ t ≤ 20 seconds with a resolution of 0.01 secs.
2. Make a delay shift to the step function generated in No. 1 by 2 secs. Plot the
signal at the range and resolution given in No. 1.
3. Generate a pulse train with a period of 5 secs. and a duty cycle of 50%. Plot
the pulse train at the range of 0 ≤ t ≤ 20 with a resolution of 0.01 secs.
4. Plot the function x (t) = 2cos (100π t ) +1 . The plot must show only the first
five periods of the sinusoid.
Procedure 1:
7
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
Procedure 2:
8
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
Procedure 3:
9
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
Procedure 4:
10
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
Procedure 5:
11
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
VI. QUESTIONS
1. What is a pulse train and discuss any application where you can use it?
The impulse function, similarly known as a Dirac delta function, helps you
measure a spike that occurs in one instant of time. Impulse forces occur for a
short period of time, and the impulse function allows you to measure them. An
12
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
ideal impulse function is a function that is zero everywhere but at the origin,
where it is infinitely high. However, the area of the impulse is finite. Using the
impulse as an input signal to a system, you can reveal the output behavior or
character of a system. After you know the behavior of the system for an
impulse, you can describe the system’s output behavior for any input.
The Heaviside step function, or the unit step function, typically denoted by
H or θ (but sometimes u, 1 or 𝟙), is a discontinuous function whose value is
zero for negative arguments and one for positive arguments. It is an example
of the general class of step functions, all of which can be represented as linear
combinations of translations of this one. Its general definition is step function is
equal to 0 when time t is negative and is equal to 1 when time t is 0 or positive.
The unit ramp is a signal whose magnitude increase same as time. It can be
obtained by integrating unit step. There are some physical components making
up a system that have some highest voltage/current specifications. Suppose
your components have a maximum spec of 10V and you apply a ramp of
1V/sec, then in about 10 seconds, your components will start burning out. So,
in order to use ramps, they are cut out and transformed to saw tooth signals.
One application is in electronic music production where the basic building
blocks for electronic systems that generate music are square waves and ramp
(saw tooth) waveforms.
The period of the function given in procedure no. 4 is from 0 to 0.1 with an
increment of 0.01.
13
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
VII. CONCLUSION
After the experiment, I learned that the continuous-time signals is uniquely defined,
characteristics which are marked in the correlation of the time and amplitude of the
signals. Also, continuous time signal really helps because it generates three
different functions namely step function, ramp function, impulse function and
sinusoidal wave. This functions has many application especially in signals and
14