0% found this document useful (0 votes)
92 views14 pages

Experiment #2: Continuous-Time Signal Representation I. Objectives

The document discusses generating and plotting various continuous-time signals like step functions, ramp functions, sinusoidal waves, and impulse functions using MATLAB. It provides the objectives, discussion of signal types, MATLAB code examples, procedures, and results for generating different signals and plotting them over certain time ranges and resolutions.

Uploaded by

Marvin Atienza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views14 pages

Experiment #2: Continuous-Time Signal Representation I. Objectives

The document discusses generating and plotting various continuous-time signals like step functions, ramp functions, sinusoidal waves, and impulse functions using MATLAB. It provides the objectives, discussion of signal types, MATLAB code examples, procedures, and results for generating different signals and plotting them over certain time ranges and resolutions.

Uploaded by

Marvin Atienza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

DE LA SALLE LIPA

COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING


ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL

EXPERIMENT #2: CONTINUOUS-TIME SIGNAL REPRESENTATION


I. OBJECTIVES
1. To have an overview on the different continuous-time signals.

2. To generate step functions, ramp functions, impulse functions and


sinusoidal wave (sine wave) function using MATLAB® commands.

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®.

CONTINUOUS-TIME SIGNALS OVERVIEW

A continuous-time signal is uniquely defined at all ‘time’ as an independent


variable, for a certain time domain except for discontinuities at denumerable set
of points. (Nagrath, et al, 2001). An example of a continuous-time signal with the
function
f (t ) = t3 + 20sin (3t ) (2-1)
is shown in Figure 2-1.
Listing 2-1 shows a script that produces a continuous-time plot of Equation 2-1.
Listing 2-1
>> t = -5:.01:5;
>> f = t.^3+20*sin(3.*t);
>> plot(t,f)

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.

Figure 2-1. An example of a continuous-time signal

Figure 2-2. An example of an amplitude-modulated signal

2
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL

SOME IDEAL SIGNALS


Step Function

Figure 2-3. A plot of the step function with amplitude 10.0.


A step function represents a sudden change as indicated in Figure 2-3. It is
mathematically defined as
A, t>0
fs(t) = (2-3)
0, t<0
where, A is the amplitude of the function. If the amplitude A is 1.0, then the
function is called a unit step function, which is sometimes denoted as u(t). a step
function with amplitude of 10.0 can be plotted using the listing below.

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

where, A is a multiplicative factor that dictates the steepness of the ramp. If A is


1.0, the ramp function is called a unit ramp function. An example of a ramp
function with a multiplicative factor of 2.0 is shown in Figure 2-4. The MATLAB®
script is shown in Listing 2-5.

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

Sine Wave (Sinusoidal) Function


A sinusoidal function is expressed as

(2-5)

where, A is the amplitude of the sinusoid, T is the fundamental period of the


wave in seconds, and φ is the phase angle in radians. Since the fundamental
period is equal to the reciprocal of the fundamental frequency, the sinusoid can
be expressed as
(2-6)
where, f is the fundamental frequency, and ω is the frequency in rad/s.
An example of a sinusoid with the function
x(t) = 5sin(t)
is shown in Figure 2-5. The sinusoidal signal has a fundamental period of 2π
Hertz. The Matlab® script is shown in Listing 2-6.
Listing 2-6
>> t=0:2*pi/100:4*pi;
>> y=5*sin(t);
>> plot (t, y)

Figure 2-5. An example of a sinusoid


6
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL

III. SOFTWARE NEEDED


ITEM NO. DESCRIPTION QUANTITY
Matlab® 2010 1

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.

5. Generate a sequence of impulses with amplitude of 1.0 at the range of 0 ≤ t ≤


5 seconds with a resolution of 0.01 secs. The interval between pulses in 1 sec.

V. MATLAB COMMANDS AND RESULTS

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?

By definition, a pulse train is a kind of non-sinusoidal waveform that is


analogous to a square wave, but does not have the symmetrical shape like the
perfect square wave. It is used in programming and pulse train has a
continuous function. In addition, only the number of rising or falling edges are
measure because pulses are counted and compared against a fixed time base
in some frequency measurement applications.

2. What is the application of each of the different ideal functions?

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.

3. What is the period of the function given in procedure no. 4?

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,

it is a must which is needed in feedback control systems. It has different

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

helps to determine the characteristic of a system.

14

You might also like