Signals and Systems Lab Manual-2020
Signals and Systems Lab Manual-2020
LAB MANUAL
For the course
Instructor name:__________________________________
Student name:____________________________________
Roll no: Batch:___________________
Semester: Year:________________
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
LAB MANUAL
For the course
Approved By
______________________ _____________________
______________________ ____________________
______________________ _____________________
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
CONTENTS
Psychomotor / Cognitive Level:
CLO/PLO:
Objective:
To get introduced with the basic features and functions of Oscilloscope, function generator
and DC power supply.
Theory:
Introduction to Oscilloscope:
It is an instrument which is used to display the waveform or time vs value curves of electrical signals.
1
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
a) Basic Purpose
It is an instrument which is used to display the waveform or time vs value curves of electrical
signals.
Setting Up Connections;
Before using the Oscilloscope, the proper grounding is very important for safety purpose, not
for the user but also for testing the integrated circuits (ICs), necessary because if a high voltage
contacts with any grounded part, the current travels through the grounding path to earth,
rather harming the user.
➢ Passive Oscilloscope Probe: In passive Oscilloscope probe there are no active components
such as transistors or amplifiers in the probe and therefore passive probes do not need to be
powered.
Probe of an Oscilloscope
Most of the Oscilloscope have at least two input channels and each channel display a waveform on
the screen. Both of the channels are used to compare the waveforms. Digital Oscilloscope has
AUTOSET button, which is used to produce a stable waveform when waveform scale is larger than
the screen scale. During setting up the Oscilloscope make sure the following things are done.
b) Features Explored
1. Vertical Controls
The Vertical control is used to set or modify the Vertical Scale, position and other signal
conditioning for each of the analog input channels. There is a set of vertical controls for each
input channel. These controls are used to scale, position, and modify that channel’s input signal
so it can be viewed appropriately on the oscilloscope display.
2. Horizontal Controls
The horizontal controls are used to scale and position the time axis of the oscilloscope display.
There is a dedicated front-panel control for setting the horizontal scale (time/division) of the
display and another for setting the horizontal position of the displayed signals.
3. Trigger Controls
The trigger defined when a signal is acquired and stored in memory. For a repetitive signal, a
trigger is required to stabilize the display.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
4. Channel Parameters
For selecting channel parameters press CH button, a menu will open. It will have several
more parameters and those parameters can be changed by function keys F1, F2, F3, F4 and
F5.
Coupling: In our case the coupling is the connection from function generator to the
oscilloscope. Input coupling determines which part of the signal is displayed. The coupling
can be set to DC, AC and ground.
iii) GROUND: Ground coupling disconnects the input signal to show where 0 volts is on
the screen, it means no signal will be read at ground. We can easily bring position of signal
or channel to the central reference line or mean after selecting ground.
AC and DC Coupling
Invert: It is used to change the orientation of the voltage signal i.e. negative voltages become
positive and positive voltages become negative.
Probe: It is basically the multiplication factor of the signal. We can multiply our signal by 1, 10 and
100.
THE 1X PROBE: The 1X probes are suitable for low frequency applications, they offer the same
impedance as the oscilloscope which is 1M ohm.
THE 10X PROBE: The 10X probe will reduced our signal by ten it means that the signal entering the
oscilloscope itself is reduced.
THE 100X PROBE: The 100X probes are used when very high voltages are need to be monitored.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Impedance: Every oscilloscope will add a certain impedance to a circuit called the input
impedance which is generally represented as a large resistive impedance of 1Mohm.
Oscilloscope can bear 1MV /1A. If more than 1 ampere current is applied, it can damage the
oscilloscope.
5. Display
Display Characteristics
1. Dots and Vectors: We can represent our waveform in dots and in vectors. Dot
drawing displays the waveform in points form. Vector drawing connects the dot with the
lines.
2. Accumulate: Press the second function button accumulates will be ON. When
accumulate is ON our waveform is recorded continuously on the display. If our waveform is
changing with time then it will show our previous image until accumulate is switched OFF
by pressing the second function button again.
5. Grid: Grid is selected by pressing the fifth function button. There are three grid
settings; full, cross and frame. In full grid, the axes and all grid lines are displayed. In cross
grid, only the axes are displayed. In frame grid, no axes and grid lines are displayed.
By limiting the bandwidth, we can reduce the noise that sometimes appears on the
displayed waveform which results in a cleaner display signal.
6. Cursor
The cursors allow you to get very accurate readings of either time or voltage differences
between different parts of a wave. Its application is in under-damped, over-damped,
critically damped circuits etc.
7. Measure
With the help of measure button, we can measure two types of characteristics: Time
characteristics and voltage characteristics.
1. Time Characteristics: -
i. Frequency and Time period: Frequency is defined as the number of cycles in 1 second
while time period is its reciprocal. We can measure frequency and time period of a wave
form with the help of an oscilloscope. It can be selected with the help of function key
parallel to it.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
ii. Duty Cycle: Duty cycle is defined as the percentage of on time to total fundamental time.
It is a property of a square wave. It can be measured through an oscilloscope. It can be
selected with the help of function key parallel to it.
iii. Rise and Fall time: The duration of a wave going from a low point to a high point is
called rise time. It is important when we determine how fast a circuit can respond to
signals. It can be measured through an oscilloscope. It can be selected with the help of
function key parallel to it.
2. Voltage Characteristics: -
i. Amplitude: It is the measure of the magnitude of a signal. There are two types of
amplitudes: Peak voltage and peak to peak voltage. Peak voltage is the measure from 0V to
the peak value. Peak to peak voltage is the measure from negative peak to positive peak. It
can be measured through an oscilloscope. It can be selected with the help of function key
parallel to it.
ii. Maximum and Minimum Voltage: Oscilloscope can tell you exactly how high and low
the voltage of your signal can get. Voltage from peak to peak can be calculated as
Vpp=Vmax-min.
iii. Average and Vrms Voltage: Oscilloscope can measure the mean and root mean square
value of your signal and it can also tell the mean and average value of your signal's
maximum and minimum voltage. Also, Oscilloscope helps to calculate Vamp=Vhigh-Vlow.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
a) Basic Purpose
Setting Up Connections;
Power on the generator and select the desired output signal: square wave, sine wave or triangle
wave. Connect the output leads to an oscilloscope to visualize the output signal and set its
parameters using the amplitude and frequency controls. Attach the output leads of the function
generator to the input of the circuit you wish to test. Attach the output of your circuit to a meter
or oscilloscope to visualize the resulting change in signal.
b) Features Explored
1. DC Offset
DC offset is a mean amplitude displacement from zero. With this utility of function generator, we
can clamp up or down the output wave form. It adds a specific amount of DC voltage to the time-
varying waveform. It basically changes the DC reference level.
DC Offset
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
2. Types of Waves
3. Duty Cycle
The term duty cycle describes the proportion of 'on' time to the total fundamental time. For 90%
it is ‘ON’ time and for 10% it is for ‘OFF’ time. It is only for square waves.
Duty Cycle
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
DC Power Supply
a) Basic Purpose
It is an instrument use to supply electric power to electric loads, also it is used to convert current
draw from electric source to appropriate voltage, current and frequency to power the load because of
this ability power supplies are called electric power converters.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Setting Up Connections;
In power supply, there are 2 independent voltage sources which are internally connected. For
internal connections the buttons are available. These independent sources can be connected in
series and parallel. To achieve higher voltage, these sources are connected in series.
b) Features Explored
1. Controlling Current
Two voltage sources are present in a power supply, if we short positive and negative terminals
of anyone of the voltage source we can control the current to maintain the healthy condition of
the circuit. We can set a current by rotating a knob basically we are selecting its input
impedance that how much current we want to flow through the circuit. If the value of current
exceeds the value which we have set our circuit can destroy. To prevent this condition, we short
the two terminals to safe our circuit. At voltage zero we set the maximum value of current
which circuit can bear.
In a voltage source, voltage is controlled but infinite current is drawn. We can use short circuit
method for infinite current. Similarly, in current source we should have controlled current. To
maintain constant current, we need to apply infinite impedance. As impedance becomes infinite
voltage also becomes infinite between terminals. Due to infinite voltage it starts flowing without
any medium because of this device destroys itself that is why we do not have any current
source practically but it can exist in any branch or in any circuit as shown in Fig. 1.17.
2. Reference Node
Reference node is a node with maximum number of elements. Generally, grounds have the
most elements and will therefore be chosen as the reference node. The ground of a circuit is
only a reference for the circuit and it is common for the whole circuit. By referencing
everything to a common ground, different circuit components are able to interact with each
other else the connection is supposed to be incomplete due to the reason that a common
reference point is not provided to the circuit.
Reference Node
We can control one battery by another battery, connecting them in parallel combination to act
as Master and Slave. The Fig. 1.15 illustrates the Channel1 as Master and Channel2 as Slave,
connecting these batteries in parallel combination as shown in Fig. 1.19(b), we can have a
control on Channel2(Slave Battery). In series combination of batteries there is no such
controlling or Master and Slave mode exist.
Procedure:
1. Power the Oscilloscope and function generator. Use two channels of function generator to
generate two signals of 50V, one with a frequency of 100Hz and another with 50Hz.
2. Select Sine wave as input signal by the function generator.
3. Connect two signals in series so that the signals can add.
4. Connect wires to complete the rest of the circuitry.
5. Select the reference node (ground) to which the reference is common to the whole circuit.
6. Connect probes to display the signal on the oscilloscope and use Oscilloscope to align the
signal.
7. Check the insights of the signal on the oscilloscope and use multimeter to verify the voltages
at different nodes.
OBSERVATION
CONCLUSION
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Objective:
Theory:
Defining Variables
[Note: Semicolon’s are not used if user want to display value on command window.]
>> a = 2
a=
[Note: Variable names should start from letter, MATLAB default variables cannot be used such as pi,
i, ans, NaN etc.]
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Basic Operations
ans =
ans =
-1
ans =
ans =
0.6667
ans =
1.5000
>> a+b-a*c/a\b
ans =
0.5000
Numerical Formats
ans =
3.1416
ans =
3.141592653589793
ans =
355/113
ans =
3.1416e+00
ans =
1.7321
ans =
1.7321
ans =
6.9078
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
ans =
3
>> cos(60*pi/180) %Trigonometric Functions are evaluated with arguments in radians
ans =
0.5000
ans =
1.0472
ans =
ans =
ans =
1.4142
>> angle(1+i)*180/pi %Evaluates Angular distance from '+x' axis for 2-D problems
ans =
45
a=
1
2
3
4 5 6
ans =
1 2 3
c=
2
4
6
ans =
3
6
9
ans =
ans =
120
start = 0;
final = 1;
increment = 0.2;
x = start: increment: final
y=
c=
d=
e=
0 0 0 0 0 0
0 0.0080 0.0160 0.0240 0.0320 0.0400
0 0.0320 0.0640 0.0960 0.1280 0.1600
0 0.0720 0.1440 0.2160 0.2880 0.3600
0 0.1280 0.2560 0.3840 0.5120 0.6400
0 0.2000 0.4000 0.6000 0.8000 1.0000
f=
1.8000
ans =
6
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
ans =
ans =
1.4832
1.4832
>> size(x)
ans =
1 6
A=
1 2 3
4 5 6
7 8 9
B=
2 4 6
8 10 12
14 16 18
3 6 9
12 15 18
21 24 27
D=
28 64 100
64 154 244
100 244 388
E=
2 8 18
32 50 72
98 128 162
d=
2
5
8
e=
4 5 6
Plotting Command
Observation:
• Contour Plots
Observation:
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
• Surface Plots
>> surf(x,y,z), xlabel('x'), ylabel('y'), zlabel('-(x^2+y^2)'); % Develop 3-D surface
>> surfc(x,y,z), xlabel('x'), ylabel('y'), zlabel('-(x^2+y^2)'); % Develop 3-D surface with their contour on xy plane
Code 04: Contour Plot from 3D information using MATLAB
Observation:
Observation:
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Fig. 2.6 illustrates the GUI (Graphical User Interface) of MATLAB plotting. GUI helps to
customize the plotted figures; labels, orientation, colours and many of its insights.
GUI
Fig.2.7 depicts the menu bar and tool bar of GUI of plotting figures. Below Following fig. 2.8 shows the
options of menu bar. They are very helpful to copy image with high quality, label axis, Zoom In-Out, scaling
etc. On a side, tool bar has shortcut keys like 3D rotation, coloring, Zoom In-Out etc.
File Menu Edit Menu Insert Menu Tools Menu View Menu
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Activity 1:
For given Matrices:
Activity 2:
Difference between a^2, a.^2 & a*a where ‘a’ is any matrix
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Object:
Plotting of Basic Signals in MATLAB & familiarization with procedural
programming in MATLAB
Theory:
Plotting in MATLAB
Plot the function y=cos(x) between -π ≤x≤π
Code (write in m file):
clear all;
close all;
clc;
x=-pi:0.001:pi;
y=cos(x);
plot(x,y);
xlabel(‘Time’)
ylabel(‘y=cos(x)’);
legend(‘cos(x)’);
title(‘Graph of cosine waveform’);
grid on;
Example:
x = 10sinπt
MATLAB Commands:
t = [-2:0.002:2]
x = 10 * sin (pi * t)
plot(t, x)
title(‘Example Sinusoid’)
xlabel(‘time(sec)’)
ylabel(‘Amplitude’)
Multiple Plots:
For drawing multiple signals on the same graph, write first signal’s x and y axis vectors
followed by the next signal.
Syntax:
plot(X1,Y1,…,Xn,Yn)
In order to differentiate them by colors, write line style specifies and color code.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Example
plot (t, y, ’r-’, t, x, ’g-’);
legend (’Sine curve’, ’Cosine
curve’)
Generating Subplots
x=10*sin(-2*pi*t)
y=10*cos(-2*pi*t)
u=10*sin(-5*pi*t)
v=10*cos(-5*pi*t)
t = [-2:0.002:2]
subplot(2, 2, 1), (t, x);
xlabel(’t’),ylabel(‘x’);
subplot(2, 2, 2), plot(t, y);
xlabel(’t’),ylabel(’y’);
\subplot(2, 2, 4), plot(t, u);
xlabel(’t’),ylabel(‘u’);
subplot(2, 2, 3), plot(t, v);
xlabel(’t’), ylabel(’v’);
DT Plots:
while(termination condition)
statement1
statement2
statement3
end
b) for-loop
for var=startvalue: step : endvalue
statement1
statement2
statement3
end
◼ Examples:
for k = 1:100
(counter = k, the loop will be executed 100 times)
for i = 1:2:7
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
(counter = i, the counter will be incremented by a value of 2 each time until its value
reaches 7. Therefore, the loop will be executed 4 times (i = 1,3,5, and 7)
◼ The loop ends with an end statement
◼ In M-files, the MATLAB editor will automatically indent text between the for and end
statements:
Can you determine what the variable x will be after running this M-file?
Explanation of the loop run:
◼ The first time through the loop, j = 1
◼ The calculations are not performed until the end statement is entered
◼ Remember that if you leave off the semi-colon, the results of the calculations will be
written to the screen in every loop:
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
y = 0;
for k = 1:5
y = y + k;
end
y
y = 0;
for k = 2:2:8
y = y + k;
end
y
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
for k = 1:5
y(k)=k^2;
end
y
Nested Loops:
for j = 1:3
for k = 1:3
T(j,k) = j*k;
end
end
T
◼
◼ Plot this equation using ‘for loop’ for values of x from -10 to 10.
◼ Hint: Use a for loop to calculate and store x and y values in one-dimensional arrays
for i = 1:21
x(i) = -10 +(i-1);
y(i) = 2^(0.4*x(i)) + 5;end
◼ After running these lines of code, two one-dimensional arrays, x and y, have been
created, each with 21 elements
◼ The stored arrays can be plotted with the command: plot(x,y)
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
◼ Any two one-dimensional arrays can be plotted, as long as they are exactly the same
size
◼ The plot will be created in a new window
Now, add x label, y label and set x limit and y limit yourself.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Activity: Acquire 1000 points of cosine wave having frequency of 60Hz using for loop. Plot the Signal.
Observation
Conclusion
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Objective:
Theory
• Imaginary Power
• Real Power
• Complex Power
The plot is in the form of Sine and Cosine wave curves. When we plot imaginary values, cycles are to
be appeared, negative cycles classified them into decay of exponential plot as they are dealt in
negative signs. Similarly, for the oscillatory exponential signal these cycles are positive cycles as
they are dealt in positive sign. They just differ by signs which kept them different and classified into
Decay and Oscillatory Exponential cycles when they are imaginary values. But these are not useful
to us because they cannot be described in our physical world.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
OBSERVATION
OBSERVATION
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
OBSERVATION
Run the following codes on MATLAB and attach the output and comment on it.
OBSERVATION
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
OBSERVATION
OBSERVATION
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
OBSERVATION
OBSERVATION
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
PROCEDURE
For basic circuit model on Simulink we use Simcscape and its sub-libraries, power systems library
is most frequently used. All the required components can be find out in the libraries. The sample
model is shown in Fig. 3.14.
Searching the required components from the tool bar as shown in fig. 3.11. RLC branches,
PowerGUI, Step, Controlled Voltage source, Multimeter, Scope. This search may reduce our work
and search throughout all the sub-libraries.
Component Searching
BLOCK PARAMETERS
The basic parameters of branches can be changed by simply double clicking on them as shown in
figure below. It sets the value for RLC and also sets initial and final value of storing elements
(C,L). Voltage and current response can also be measured by using multimeter.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
SOLVER SELECTION
1. Ode 45 solver:
It works on the numerical method called R-K method. It selects a step size at the beginning of
a response and plots the whole response with the same step size regardless of the changing
differences between the values.
2. Ode 23 solver:
It is the most suitable solver for ODEs as it adjusts its step size according to the responses
changing with respect to time. It is a dynamic solver.
[Note: We prefer “ode23tb” over “ode45tb” for fast simulation and more accurate result.]
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Sample Model
OBSERVATION
CONCLUSION
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Objective:
a) Statement
“Any periodic signal can be expressed as a linear combination of sinusoids or infinite sum of
sines and cosines”
b) Analysis Equation
The Fourier series can be analyzed in trigonometric form, compact trigonometric form and
exponential form. Where, “a0” is the zero harmonic (i.e. DC Offset at zeroth harmonic) and
“n” is no. of harmonics.
i. Trigonometric Form
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
MATLAB CODE
OBSERVATIONS
CONCLUSION
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
b. The signal y(t) can be obtained by time reversal of x(t) shown below. Use this fact to
obtain the Fourier series for y(t) from the results in your textbook “Example 6.1”. Verify
that the Fourier series thus obtained is identical to that found in part (a).
c. Show that, in general, time reversal of a periodic signal does not affect the amplitude
spectrum, and the phase spectrum is also unchanged except for the change of sign.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Objective:
To study different types of signal using MATLAB
THEORY
• Singularity Functions:
Singularity functions are discontinuous functions, or their derivatives are
discontinuous. A singularity is a point at which a function does not possess a
derivative. In other words, a singularity function is discontinuous at its singular points.
Singularity functions are a class of discontinuous functions that
contain singularities, i.e. they contain points in which their derivatives do not exist. In
other words, a singularity function is discontinuous at its singular points.
• Elementary Signals:
The elementary signals are used for analysis of systems. Such signals are,
1. Step
2. Impulse
3. Ramp
4. Exponential
5. Sinusoidal
3. Ramp Sequence:
The ramp function is a unary real function which is 0 for negative inputs; output equals
input for non-negative inputs.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
4. Sinc Function:
The sinc function , also called the "sampling function," is a function that arises
frequently in signal processing and the theory of Fourier transforms. The full name of
the function is "sine cardinal," but it is commonly referred to by its abbreviation,
"sinc."
5. Rect Function:
The Rect Function is a function which produces a rectangular-shaped pulse with a
width of 1 centered at t = 0. The Rect function pulse also has a height of 1. A rect
function cn be written in the form :
𝑡−𝑋
Rect ( )
𝑌
where the pulse is centered at X and has width Y.
6. Signum Function:
The sign function or signum function is an odd mathematical function that extracts
the sign of a real number.
The signum function of a real number x is defined as follows:
Alternatively,
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
7. Square Wave:
A square wave is a non-sinusoidal periodic waveform in which the amplitude
alternates at a steady frequency between fixed minimum and maximum values, with
the same duration at minimum and maximum.
It can be defined as simply the sign function of a sinusoid:
8. Sawtooth wave:
The sawtooth wave, called the "castle rim function" is the periodic function given by
Objective:
Theory:
Time Constant ( τ )
The delay in the time delay circuits is generally known as the Time Constant of the
circuit and is defined as;
“The time required for the response to decay to a factor of 1/e or ≈36.8% of its initial value,
conversely, the time required to charge the capacitor from an initial voltage of zero to ≈63.2%
of the value of an applied source voltage”
The time constant of a circuit mainly depends upon the reactive components either
capacitive or inductive connected to it and is a measurement of the response time with
the unit of Tau (τ).
• R=1.8k Ω
• C=1µF
• VS = 5Vpp
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Series RC circuit
The Fig. 5.1 shows a resistor (R) in series with a capacitor (C) forming a series RC Circuit
connected to a function generator that gives a square wave of peak to peak voltage. The
output of this simulink model is shown in Fig.5.2 (as shown below).
RC time constant:
The capacitor will charge up gradually through the resistor until the voltage across the
capacitor reaches that of the supplied voltage. The transient response required for the
capacitor to fully charge is equivalent to about 5-time constants or 5τ.
𝜏 = 𝑅𝐶 = (1.8x1000)(1x10−6 )
𝝉 = 𝟏. 𝟖𝒎𝒔 (Transient response)
In our time delay circuit, we would like to observe the complete charging and discharging
of the capacitor this is why we selected the elemental values carefully for a time constant of
1.8ms. As the time required by a capacitor to fully charge or discharge is approximately
equal to 5τ, we will setup the function generator to produce a square wave of 5VPP with
ON time and OFF time both of 5τ = 9ms or greater than that, setting frequency f = 30 Hz.
∵ T = 1/f = 1/30 = 33ms
Since, the time period of square wave is 33ms > 18 ms (i.e. 10 τ) which implies that the RC
response can be easily observed for this input. However, the circuit impedance should be
high for an input of low frequency otherwise the input waveform will be deformed. For the
circuit in Fig. 5.1 the total impedance is;
Z = R + 𝑋 = 7.105kΩ
ANALYSIS OF RC RESPONSE
a) Natural Response
In RC circuit, natural response is the system's response to initial conditions with all
external independent voltage sources set to zero volts (short circuit).
Integrating;
Where, Vo is the initial voltage stored in capacitor at the instant of discharging i.e. t=0.
This shows that the natural response of an RC circuit is an exponential decay of its initial
voltage.
b) Forced Response
The forced response is the system's response with source turned on but with the initial
conditions set to zero. The forced response of a circuit is its behavior for a long time after
the excitation is applied.
Integrating;
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
This is the response of the RC circuit to abrupt change of source when the capacitor was
initially charged to some voltage Vo at t – instant. Since the voltage of a capacitor cannot
change abruptly, therefore
Objective :
Theory:
TIME CONSTANT
In an RC circuit, the product of Resistance and capacitance of the circuit is called RC time
constant (). It has a good contribution in the time delay of RC circuits. Mathematically;
Where R is the resistance of the circuit and C is the capacitance of the circuit.
The value of time constant is measured in seconds. It is the value of time that shows how
much a capacitor will be charged and discharged. One must note that five times the time
constant (tau) refers to the state when a capacitor is either fully charged or fully
discharged depending on whether an RC circuit is charging or discharging.
RESPONSE OFSYSTEM:
I. Initial conditions at t = 0
II. Input of system at t ≥0
The total response of system is sum of two components.
TYPES OF RESPONSE:
Zero-state response:
Response that results from input x(t) for t ≥ 0, with initial conditions (at t = 0)
are zero.
TOTALRESPONSE
Activity 3: Observe Zero-Input response using Simulink’s scope element and observe
values as mentioned in each column below:
Activity 1: Simulate RL Circuit using Simulink. Assume the values of each element
Activity 2: Calculate Time Constant and draw the graph of current through inductor
Activity 3: Observe Zero-Input response using Simulink’s scope element and observe values
of parameters mentioned in the table below:
Objective:
Time Domain Analysis of SECOND ORDER Circuit – To simulate, understand, and validate
Zero-Input Response of RLC Series Circuit
Theory:
Circuits that include an inductor, capacitor, and resistor connected in series or in parallel are
second-order circuits.
If you can use a second-order differential equation to describe the circuit you’re looking at,
then you’re dealing with a second-order circuit.
TIME CONSTANT
In an RC circuit, the product of Resistance and capacitance of the circuit is called RC time constant
or (). It has a good contribution in the time delay of RC circuits.
Mathematically; for RC Circuit,
𝜏 = 𝑅𝐶
For RL circuit,
𝑅
𝜏=
𝐿
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Where R is the resistance of the circuit, C is the capacitance, and L is inductance of the circuit.
Activity:
Construct a series RLC circuit using Simulink with R = 3 Ohms, L=1 H, C=1.5 F. Visualize the response of
circuit as voltage across capacitor and current through the circuit.
Simulate zero input response of RLC Series circuit, given Vc (0) = y (0) = 5V and visualize the
response as current through inductor
C = 0.22F, R = 1-Ohm, L = 1H, Initial Conditions: Vc (0) = y (0)=5V
Activity 2:
Simulate zero input response of RLC Series circuit, given Vc (0) = y (0) = 5V and visualize the
response as current through inductor
C = 4F, R = 1-Ohm, L = 1H, Initial Conditions: Vc (0) = y (0)=5V
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Objective:
Theory:
CONVOLUTION
Convolution between two continuous time signals 𝑥(𝑡) and ℎ(𝑡) is defined as:
∞
𝑥(𝑡)ℎ(𝑡) = ∫ 𝑥(𝜏)ℎ(𝑡 − 𝜏)𝑑𝜏
−∞
Where, τ is a dummy variable for integration.
Activity 1: Perform Continuous Time Convolution using Matlab and draw graphs of signals and
convolutional integral using Matlab for following signal,
Matlab Script:
t0=0;
tf=12;
N=5000;
dt=(tf-t0)/N;
t=t0:dt:tf;
for k=1:length(t)
if t(k) < 2
x(k)=0;
else if t(k) < 4
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
x(k)= 0.05;
else
x(k)=0;
end
end
end
h=exp(-3*t);
y=conv(x,h);
subplot(3,1,1), plot(t,x,'r')
axis([t0,tf,0,0.1])
ylabel('x(t)'), xlabel('t')
subplot(3,1,2), plot(t,h,'r')
axis([t0,tf,0,2])
ylabel('h(t)'), xlabel('t')
subplot(3,1,3), plot(t,y(1:length(t)),'r')
axis([t0,tf,0,10])
ylabel('y(t)'),xlabel('t')
OUTCOME
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Activity 2: Perform convolution analytically and draw graphs. Compare the graphs drawn in matlab to
the manual graph of analytically derived C.I.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Objective:
Theory:
An ordinary differential equation (ODE) is defined as the equation that contains one or more functions
of one independent variable and its derivatives.
𝑑𝑦(𝑡)
+ 𝑦(𝑡) = 𝑡 , where y(t) is function of independent variable t
𝑑𝑡
The solution of such equation contains two parts.
1) Homogeneous Solution, which is computed with assumption that Input to the system is Zero.
2) Particular Solution, which is calculated assuming Zero Initial Conditions.
3) The total solution is linear sum of both homogeneous solution and particular solution as given
below:
Matlab Script:
POST-LAB ACTIVITIES
Activity 1:
Solve a differential equations solved examples from B.P. Lathi’s book suggested in your course using
this command and compare it with analytical solutions.
(Write example equation, Matlab expression and fill following table)
Activity 2: Explore the command ‘ODE solver’ and use it in the solving of differential equation to
achieve complete response choosing any solved examples from your textbook.
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
Objective:
Theory:
A low-pass filter (LPF) is a filter that passes signals with a frequency lower than a selected cutoff
frequency and attenuates signals with frequencies higher than the cutoff frequency. The
exact frequency response of the filter depends on the filter design. The filter is sometimes called a high-
cut filter, or treble-cut filter in audio applications.
RC FILTER
A simple RC low-pass filter circuit consists of a resistor in series with a load, and a capacitor in parallel
with the load. The capacitor exhibits high reactance at low frequencies, and hence forcing lo the load
instead. At higher frequencies the reactance drops, and the capacitor effectively functions as a short
circuit. The combination of resistance and capacitance gives the time constant of the filter
𝝉 = 𝑹𝑪
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
This circuit may be understood by considering the time the capacitor needs to charge or discharge
through the resistor:
o At low frequencies, there is plenty of time for the capacitor to charge up to practically the same
voltage as the input voltage.
o At high frequencies, the capacitor only has time to charge up a small amount before the input
switches direction. The output goes up and down only a small fraction of the amount the input
goes up and down. At double the frequency, there's only time for it to charge up half the amount.
𝑽𝒐𝒖𝒕
𝑮𝒂𝒊𝒏 =
𝑽𝒊𝒏
Activity 1:
You are given a Cut off frequency. Choose your components accordingly such that when you make
observations, the gain starts to drops when frequency of sinusoidal input (from function generator)
increases the cut off frequency. The cut off frequency is your roll number if it’s one digit, roll number / 2
if it’s 2 digit and below 40, if two digit and between 40 and 60, it is roll number /3. The frequencies
should be from 5 hertz to 20 hertz. Choose your own formula if you have bigger roll numbers. You may
also choose cut off frequencies higher that 20 Hz if supported by function generator and you can get the
components accordingly. Plot the graph, Frequency Vs Gain.
Objective:
Theory:
A ligh-pass filter (HPF) is a filter that passes signals with the frequencies higher than a
selected cutoff frequency and attenuates signals with frequencies lower than the cutoff
frequency. The exact frequency response of the filter depends on the filter design. The filter
is sometimes called a Low-Cut Filter in audio applications.
RC FILTER:
A simple RC high-pass filter circuit consists of a resistor in series with a capacitor and
the load. The capacitor exhibits low reactance for high frequencies reactance in series and
blocks them. It exhibits low reactance for high frequency signals, forcing them through the
load instead. At higher frequencies the reactance drops, and the capacitor effectively
functions as a short circuit. The combination of resistance and capacitance gives the time
constant of the filter
𝝉 = 𝑹𝑪
Laboratory Session Signals &Systems (EE-231)
Department of Electrical Engineering NED University of Engineering and Technology
𝟏
𝒇=
𝟐𝝅𝝉
GAIN
Gain is the ration of output voltage to input voltage
𝑽𝒐𝒖𝒕
𝑮𝒂𝒊𝒏 =
𝑽𝒊𝒏
Activity 1:
You are given a Cut off frequency. Choose your components accordingly such that when
you make observations, the gain starts to drops when frequency of sinusoidal input (from
function generator) is less than cut off frequency.
The cut off frequency is your roll number if it’s one digit, roll number / 2 if it’s 2 digit and
below 40, if two digit and between 40 and 60, it is roll number /3. The frequencies should
be from 5 hertz to 20 hertz. Choose your own formula if you have bigger roll numbers. You
may also choose cut off frequencies higher that 20 Hz if supported by function generator
and you can get the components accordingly.