Simulation Lab
Simulation Lab
Objectives:
1. To learn about the basic functions and their uses on MATLAB.
2. To learn about the basic mathematical operations by solving different mathematical
expressions using MATLAB.
3. To learn plotting figures using MATLAB.
Required apparatus:
MATLAB Online was used for this experiment.
Theory:
MATLAB (Matrix Laboratory) is a high-level numerical computing environment used for
mathematical analysis, algorithm development, data visualization, and simulation. It is widely
applied in engineering, science, and research due to its strong support for matrix operations
and its large collection of built-in toolboxes that address specialized application areas.
MATLAB provides a vast library of built-in functions that simplify mathematical and
engineering computations. These include functions for algebra, calculus, signal processing,
control systems, statistics, optimization, and visualization. Its programming language allows
users to write scripts, create functions, and develop complex models with minimal code.
MATLAB also supports advanced plotting capabilities for generating high-quality 2D and 3D
visualizations. It is used for various engineering works and experiments like
Matlab Code:
clc;
clear all;
close all;
a=input("Enter a : ");
b=input("Enter b : ");
disp("a = ");disp(a);
disp("b = ");disp(b);
c=a+b;
d=a-b;
e=a*b;
f=a/b;
disp("a + b = ");disp(c);
disp("a - b = ");disp(d);
disp("a x b = ");disp(e);
disp("a/b = ");disp(f);
Output:
Enter a : 5
Enter b : 8
a=
5
b=
8
a+b=
13
a-b=
-3
axb=
40
a/b =
0.6250
Matlab Code:
clc;
clear all;
close all;
a=input("Enter a : ");
b=input("Enter b : ");
c=input("Enter c : ");
disp("a = ");disp(a);
disp("b = ");disp(b);
disp("c = ");disp(c);
x=(1/(a-39))-(((8*b)/100)*(c/10));
disp("Value of the expression is ");disp(x);
Output:
Enter a : 6
Enter b : 4
Enter c : 8
a=
6
b=
4
c=
8
Value of the expression is
-0.2863
Matlab Code:
clc;
clear all;
close all;
a=input("Enter a ");
b=input("Enter b ");
c=input("Enter c ");
d=input("Enter d ");
disp("a = ");disp(a);
disp("b = ");disp(b);
disp("c = ");disp(c);
disp("d = ");disp(d);
x=(1/(a-3.^3))-((8*b)/((5*a.^2)-(3*c^2)))-(c/(d*a.^2));
disp("Value of the expression is ");disp(x);
Output:
Enter a : 5
Enter b : 8
Enter c : 1
Enter d : 2
a=
5
b=
8
c=
1
d=
2
Value of the expression is
-0.5900
Task 04: Solve the following equations using MATLAB
(a) 2x + 5 = 15
(b) x2 + 3x – 10 = 0
(c) x3 – 6x2 + 11x – 6 = 0
𝟏
(d) tan x =
√𝟑
Matlab Code:
clc;
clear all;
close all;
syms x;
% Solution to the 1st equation
solution1 = solve(2*x+5==15,x)
% Solution to the 2nd equation
solution2= solve(x^2+3*x-10==0,x)
% Solution to the 3rd equation
solution3= solve(x^3 - 6*(x^2) + 11*x -6 == 0,x)
% Solution to the 4th equation
solution4=solve(tan(x)==1/sqrt(3),x)
Output:
solution1 =
5
solution2 =
-5
2
solution3 =
1
2
3
solution4 =
pi/6
(e) x2 + y2 = 25
(f) y = x2 + 2x + 1
Matlab Code:
clc;
clear all;
close all;
r=5;
theta = linspace(0,2*pi,600);
x=r*cos(theta);
y=r*sin(theta);
subplot(2,1,1);
plot(x,y)
title('x^2+y^2=25')
axis equal;
subplot(2,1,2);
plot(x,y)
title('y=x^2+2x+1')
Figure 1:
Figure 2:
Summary Table of syntaxes used in MATLAB:
Syntax Operation
clc (Clear Command Window) Clears all text from the Command Window.
clear all Removes all variables from workspace.
close all Closes all open figure windows.
; Hides output of a command.
+ Adds numbers or matrices.
- Subtracts numbers or matrices.
* Multiplies numbers or matrices.
/ Divides numbers or matrices.
.^ Element-wise power operation.
input Reads and stores a user input value.
disp Displays a variable or expression.
plot Plots a set of data points.
title Sets a title for a plot.
axis Sets axis limits for a plot.
linspace Creates evenly spaced values in a range.
syms Defines symbolic variables.
solve Solves symbolic equations.
Experiment No: 02
Experiment Name: Experimental study of plotting and processing different signals using
MATLAB.
Objectives:
1. To learn plotting figures and waves using ‘MATLAB’
2. To learn about the basic functions for plotting waves in ‘MATLAB’
3. To plot and filter message and random noise signal using ‘MATLAB’
Required apparatus:
MATLAB Online was used for this experiment.
Theory:
MATLAB (Matrix Laboratory) is a high-level numerical computing environment used for
mathematical analysis, algorithm development, data visualization, and simulation. It is widely
applied in engineering, science, and research due to its strong support for matrix operations
and its large collection of built-in toolboxes that address specialized application areas.
MATLAB provides a vast library of built-in functions that simplify mathematical and
engineering computations. These include functions for algebra, calculus, signal processing,
control systems, statistics, optimization, and visualization. Its programming language allows
users to write scripts, create functions, and develop complex models with minimal code.
MATLAB also supports advanced plotting capabilities for generating high-quality 2D and 3D
visualizations. It is used for various engineering works and experiments like
1
Lab Task:
Task 01: Plot 3 different sine waves, add them and plot the combined waves in MATLAB.
Matlab Code:
clc;
clear all;
close all;
t=0:0.01:30;
x=2*pi*0.1*t;
y=2*pi*0.16*t;
z=2*pi*0.22*t;
combo=sin(x)+sin(y)+sin(z);
subplot(2,1,1);
plot(t,sin(x),'r','LineWidth',2);
hold on;
plot(t,sin(y),'b','LineWidth',2);
plot(t,sin(z),'m','LineWidth',2);
title('Individual Sine Waves');
xlabel('Time');
ylabel('Amplitude');
subplot(2,1,2);
plot(t,combo,'g','LineWidth',2);
title('Combined Wave');
xlabel('Time');
ylabel('Amplitude');
grid on;
Output:
2
Task 02: Plot sine wave, cosine wave in MATLAB.
Matlab Code:
clc;
clear all;
close all;
t=0:0.01:20;
x=cos(t+3);
y=sin(t-3);
plot(t,x);
hold on;
plot(t,y);
grid on;
Output:
Task 03: Plot a signal, random wave, combine them and filter it in MATLAB.
Matlab Code:
clc; clear all; close all; fs = 100; T = 1/fs;
t = 0:T:1-T; f = 2;
w = 2*pi*f; A = 10; C = 5;
signal = A*sin(w*t); noise = C*randn(size(t)); msg = signal + noise;
dlp = designfilt('lowpassfir', 'filterorder', 10, 'cutofffrequency', 11, 'samplerate', fs);
ylp = filter(dlp, msg);
ylz = filtfilt(dlp, msg);
dhp = designfilt('highpassfir', 'filterorder', 10, 'cutofffrequency', 2, 'samplerate', fs);
yhp = filter(dhp, msg);
yhz = filtfilt(dhp, msg);
figure;
subplot(4, 2, 1);
plot(t, signal, 'g', 'linewidth', 2); title('1. Signal');
xlabel('Time'); ylabel('Amplitude');
subplot(4, 2, 2);
3
plot(t, noise, 'r', 'linewidth', 2); title('2. Noise');
xlabel('Time'); ylabel('Amplitude');
subplot(4, 2, 3);
plot(t, msg, 'b', 'linewidth', 2);
title('3. Combined Signal (Noise + Signal)'); xlabel('Time');
ylabel('Amplitude');
subplot(4, 2, 4);
plot(t, ylp, 'm', 'linewidth', 2);
title('4. Low-pass Filtered Signal (Normal)');
xlabel('Time');
ylabel('Amplitude');
subplot(4, 2, 5);
plot(t, ylz, 'c', 'linewidth', 2);
title('5. Low-pass Filtered Signal (Zero-phase)');
xlabel('Time');
ylabel('Amplitude');
subplot(4, 2, 6);
plot(t, yhp, 'y', 'linewidth', 2);
title('6. High-pass Filtered Signal (Normal)');
xlabel('Time');
ylabel('Amplitude');
subplot(4, 2, [7,8]);
plot(t, yhz, 'k', 'linewidth', 2);
title('7. High-pass Filtered Signal (Zero-phase)');
xlabel('Time');
ylabel('Amplitude');
Output:
4
Task 04:
(i) Plot a sine wave and cosine wave of different frequencies, combine them, and
analyze their frequency spectrum using FFT in MATLAB.
Matlab Code:
clc;
clear all;
close all;
fs = 100;
t = 0:(1/fs):(1-(1/fs));
Fs = 5; Fc = 7;
xs = sin(2*pi*Fs*t); xc = cos(2*pi*Fc*t);
x = xs + xc;
subplot(2,2,1);
plot(t,xs);
grid on;
hold on;
plot(t,xc);
grid on;
title('Sine and Cosine Waves');
xlabel('Time');
ylabel('Amplitude');
subplot(2,2,2);
plot(t,x);
title('Combined wave');
xlabel('Time');
ylabel('Amplitude');
5
Output:
(ii) Create a square wave and a triangular wave, add random noise, and then denoise
the signal using a low-pass filter in MATLAB.
Matlab Code:
clc;
close all;
clear all;
t = 0:0.1:30;
s = square(t);
subplot(3,2,1);
plot(t,s);
title('1. Square Wave');
xlabel('Time');
ylabel('Amplitude');
tri = sawtooth(t,0.5);
subplot(3,2,2);
plot(t,tri);
title('2. Triangular Wave');
xlabel('Time');
ylabel('Amplitude');
noise = randn(size(t));
subplot(3,2,3);
plot(t,noise);
title('3. Noise');
xlabel('Time');
ylabel('Amplitude');
signal = s+tri+noise;
6
subplot(3,2,4);
plot(t,signal);
title('4. Signal');
xlabel('Time');
ylabel('Amplitude');
fs = 100;
dLowpass = designfilt('lowpassfir','filterorder',10,'cutofffrequency',11,'samplerate',fs);
sigLowpass = filter(dLowpass,signal);
subplot(3,2,[5,6]);
plot(t,sigLowpass);
title('5. Lowpass Signal');
xlabel('Time');
ylabel('Amplitude');
Output:
(iii) Simulate two sinusoidal signals with different amplitudes, add them together, and
separate them using a high-pass filter in MATLAB.
Matlab Code:
clc;
close all;
clear all;
fs = 100;
t = 0:0.1:20;
7
f = 0.25;
A1 = 30; A2 = 20;
sine1 = A1*sin(2*pi*f*t);
subplot(2,2,1);
plot(t,sine1);
title('(i) Sine Wave 1');
xlabel('Time');
ylabel('Amplitude');
sine2 = A2*sin(2*pi*f*t);
subplot(2,2,2);
plot(t,sine2);
title('(ii) Sine Wave 2');
xlabel('Time');
ylabel('Amplitude');
msg = sine1+sine2;
subplot(2,2,3);
plot(t,msg);
title('(iii) Combined Wave');
xlabel('Time');
ylabel('Amplitude');
subplot(2,2,4);
plot(t,msg_hp);
title('(iv) Highpass Signal');
xlabel('Time');
ylabel('Amplitude');
Output:
8
(iv) Generate a random binary sequence, modulate it with a sinusoidal carrier, and
demodulate it using a filter in MATLAB.
Matlab Code:
clc;
clear all;
close all;
carrier = sin(2*pi*fc*t);
modulated = signal .* carrier;
demodulated = modulated .* carrier;
dLowpass = designfilt('lowpassfir','filterorder',10,'cutofffrequency',11,'samplerate',Fs);
sigLowpass = filter(dLowpass,demodulated);
subplot(2,2,1);
stairs(data);
title('Binary Data');
grid on;
subplot(2,2,2);
plot(t, modulated);
title('Modulated Signal');
grid on;
xlabel('Time');
ylabel('Amplitude');
subplot(2,2,3);
plot(t, demodulated);
title('Demodulated Signal');
xlabel('Time');
ylabel('Amplitude');
grid on;
subplot(2,2,4);
plot(t, sigLowpass);
title('Demodulated Signal (Filtered)');
xlabel('Time');
ylabel('Amplitude');
grid on;
9
Output:
In this experiment, various signal generation, processing, and analysis techniques were
explored using MATLAB to understand how different waveforms behave under modulation,
filtering, and spectral examination. By creating signals, combining them, adding noise, and
applying different types of filters, we observed how MATLAB can accurately visualize
changes in both the time and frequency domains. The experiment also highlighted the
importance of Fourier analysis for identifying frequency components, as well as the role of
filters in extracting useful information and improving signal quality. Through modulation and
demodulation steps, the study reinforced fundamental communication principles and
demonstrated how digital data can be transmitted and recovered effectively. Overall, the
experiment provided a comprehensive understanding of practical signal processing operations
and proved MATLAB to be a powerful and versatile tool for analyzing, modifying, and
interpreting signals.
Syntax Operation
clc (Clear Command Window) Clears all text from the Command Window.
clear all Removes all variables from workspace.
close all Closes all open figure windows.
10
; Hides output of a command.
+ Adds numbers or matrices.
- Subtracts numbers or matrices.
* Multiplies numbers or matrices.
/ Divides numbers or matrices.
.^ Element-wise power operation.
./ Multiplies element-wise
plot Plots a set of data points.
subplot Creates subplots within a figure
title Sets a title for a plot.
axis Sets axis limits for a plot.
xlabel Adds a label to the x-axis of a plot.
ylabel Adds a label to the y-axis of a plot.
linspace Creates evenly spaced values in a range.
fft function that computes the Fast Fourier
Transform, which converts a time-domain
signal into its frequency-domain
representation.
designfilt Used for designing a filter
filter Used for passing the signal through a filter
randi Generates random integers within a specified
range.
randn Generates random numbers from a standard
normal
sawtooth Creates a sawtooth waveform for a given
time vector
11
Experiment No: 03
Experiment Name : Experimental study of-
i) different types of operations on arrays & processing signals in LPF using MATLAB
Objectives :
1. To understand mathematical operations of Arrays Using ‘MATLAB’
2. To learn how to plot waves, add noise with them and filter it using ‘MATLAB’
3. To understand the designing of circuits or systems in Simulink.
Required apparatus:
MATLAB Online was used for this experiment.
Theory:
MATLAB (Matrix Laboratory) is a high-level numerical computing environment used for
mathematical analysis, algorithm development, data visualization, and simulation. It is widely
applied in engineering, science, and research due to its strong support for matrix operations and its
large collection of built-in toolboxes that address specialized application areas. MATLAB provides
a vast library of built-in functions that simplify mathematical and engineering computations. These
include functions for algebra, calculus, signal processing, control systems, statistics, optimization,
and visualization. Its programming language allows users to write scripts, create functions, and
develop complex models with minimal code. MATLAB also supports advanced plotting
capabilities for generating high-quality 2D and 3D visualizations. It is used for various engineering
works and experiments like
1
Lab Task:
2
Lab Task 02 : Evaluate combination of sine, cosine, and random waves, followed by the
application of a low-pass filter to analyze the resulting signal in MATLAB.
Code :
clc;
close all;
clear all;
t = 0:0.1:30;
sine = sin(2*pi*0.22*t);
cosine = cos(2*pi*0.96*t);
noise = randn(size(t));
signal = sine+cosine+noise;
subplot(3,2,1);
plot(t,sine);
title('sine wave');
subplot(3,2,2);
plot(t,cosine);
title('cosine wave');
subplot(3,2,3);
plot(t,noise);
title('noise');
subplot(3,2,4);
plot(t,signal);
title('combined signal');
fs = 1000;
lowpass = designfilt('lowpassfir','filterorder',10,'cutofffrequency',11,'samplerate',fs);
lowpassed = filter(lowpass,signal);
lowpassedZeroFilt = filtfilt(lowpass,signal);
subplot(3,2,5);
plot(t,lowpassed);
title('lowpassed signal');
subplot(3,2,6);
plot(t,lowpassedZeroFilt);
title('lowpassed signal(zero phase shift)');
3
Output :
Simulink Figure:
4
Output :
Simulink Figure:
5
Output :
Simulink Figure:
Output :
6
Lab Task 06: Design of a Common-Collector BJT Circuit in MATLAB
Simulink.
Simulink Figure:
7
Output :
Review Questions:
1. How can you model a BJT (NPN or PNP) transistor in MATLAB Simulink, and what
parameters are required for accurate simulation?
We must also apply proper biasing and a ground reference, or the model may not initialize
correctly.
8
2. What are the key differences in biasing a BJT in common-emitter, common-base, and
common-collector configurations in Simulink?
9
3. How does changing the base resistance affect the collector current and voltage gain in
your simulated BJT amplifier circuit?
In a BJT amplifier simulated in Simulink, the base resistance (Rb) plays an important role in
controlling the base current and setting the operating point of the transistor. When the value of Rb
is increased, the base current decreases because less current is allowed to flow into the base. As a
result, the collector current also decreases, and the transistor moves closer to the cutoff region. On
the other hand, when Rb is reduced, the base current increases, which causes the collector current
to rise and pushes the transistor deeper into the active region. If the resistance becomes too low,
the transistor may move toward saturation.
The voltage gain of the amplifier is also affected because it depends on the transconductance (gm),
which is directly proportional to the collector current. When Rb is increased and the collector
current becomes smaller, the transconductance decreases, leading to a lower voltage gain. When
Rb is decreased and the collector current becomes larger, the transconductance increases, and the
amplifier produces higher voltage gain. However, excessively high gain can cause distortion if the
transistor shifts out of the linear operating region.
Bias stability is also influenced by the value of Rb. A very large base resistance makes the bias
point unstable and more sensitive to changes in transistor β and temperature. In contrast, a very
small base resistance wastes current and reduces the input impedance of the circuit, which may
undesirably load the previous stage.
10
+ Adds numbers or matrixes.
- subtracts numbers or matrixes.
* multiplies numbers or matrixes.
/ Divides numbers or matrixes.
; Used to hide anything from command window.
input Reads and evaluates a specified file.
disp Displays the value of a variable or expression.
figure Creates a new figure for plotting.
plot Plots a set of data points.
subplot Creates subplots within a figure.
title Sets the title of a plot.
xlabel Adds a label to the x-axis of a plot.
ylabel Adds a label to the y-axis of a plot.
solve Used for solving equations
syms Used to create symbolic variables and
functions
linspace A function used to generate a vector of equally
spaced points between two specified
endpoints.
Signal Generator Generates the input AC waveform (sine wave) for the
BJT amplifier.
Controlled Voltage Source Converts the Simulink signal into an electrical voltage
applied to the circuit.
Coupling Capacitor (10 µF) Blocks DC and allows AC signals to pass into and out
of the amplifier stage.
DC Voltage Source (Vcc) Provides the required DC supply to bias the transistor.
Voltage Sensor Measures voltage at different nodes and sends the data
to the Scope.
11
NPN Transistor Acts as the main amplifying element in the circuit.
10 kΩ Resistor (base) Helps set the base voltage and stabilise transistor
operation.
Output Coupling Capacitor (10 µF) Blocks DC from the output and passes only the
amplified AC signal.
12
Experiment No: 04
Experiment Name: Experimental Study of Low Pass Filter, High Pass Filter, Band Pass
Filter and Band Stop Filter Using MATLAB Simulink.
Objectives:
1. To design and simulate Low Pass, High Pass, Band Pass, and Band Stop filters using
MATLAB Simulink.
2. To study how each filter affects signals of different frequencies.
3. To compare input and output waveforms using Simulink scopes.
Required apparatus:
MATLAB 2024 was used for this experiment.
Theory:
Filters are essential signal processing systems that allow certain frequency components of a
signal to pass while attenuating others. A Low Pass Filter allows signals with frequencies lower
than a specified cutoff frequency to pass and reduces higher-frequency components, mainly to
remove noise. A High Pass Filter allows frequencies higher than the cutoff frequency to pass
while attenuating low-frequency components such as DC offsets. A Band Pass Filter allows
only a specific range of frequencies to pass while attenuating frequencies outside this range,
and a Band Stop Filter (notch filter) attenuates a particular range of frequencies while allowing
frequencies outside this range to pass. These filters are widely used in communication, control,
and signal conditioning systems. MATLAB Simulink provides a graphical simulation
environment to model and analyze these filters using standard blocks like signal sources,
transfer functions, and scope blocks, enabling clear visual observation and comparison of input
and output waveforms.
1
Lab Task:
Data Table:
No. of Input peak Frequency Output peak amplitude (V)
Observation amplitude (V)
1 30 1 29.66
2 30 2.5 27.92
3 30 3 27.55
4 30 4 26.02
5 30 6.5 21.99
Circuit Diagram:
2
Data Table:
No. of Input peak Frequency Output peak amplitude (V)
Observation amplitude (V)
1 30 10 22.57
2 30 20 25
3 30 30 29.05
4 30 40 29.33
5 30 50 29.47
Circuit Diagram:
Data Table:
No. of Input peak Frequency Output peak amplitude (V)
Observation amplitude (V)
1 30 4600 3.254e-05
2 30 4650 3.24e-05
3 30 4750 3.164e-05
4 30 4900 3.091e-05
5 30 4950 3.063e-05
Data Table:
3
No. of Input peak Frequency Output peak amplitude (V)
Observation amplitude (V)
1 30 10 28.77
2 30 50 19.28
3 30 100 8.998
4 30 300 1.522
5 30 404 1.071e-02
In this experiment, Low Pass, High Pass, Band Pass, and Band Stop filters were designed and
simulated using MATLAB Simulink, and their effects on input signals of different frequencies
were observed through scope outputs. The results clearly demonstrated that the Low Pass Filter
allowed low-frequency components to pass while attenuating high-frequency signals, the High
Pass Filter suppressed low-frequency components and passed high-frequency signals, the Band
Pass Filter allowed only a specific frequency range, and the Band Stop Filter effectively
rejected a particular band of frequencies. The simulation results closely matched the theoretical
behavior of each filter, confirming their frequency-selective characteristics. Overall, the
experiment provided a clear understanding of filter operation and offered practical experience
in analyzing signal processing systems using MATLAB Simulink.
4
PS-S Converter Converts Simulink signals into physical
Simscape signals (used for input sources).
S-PS Converter Converts physical Simscape signals into
Simulink signals (used for
scopes/displays).
Scope Displays the output waveform in time-
domain.
5
Experiment No: 05
Experiment Name: Experimental Study of Ohm’s Law, Characteristics of Diode, Half
Wave Rectifier & Full Wave Rectifier Using PSpice.
Objectives:
1. To simulate basic electrical and electronic circuits using PSpice software.
2. To verify fundamental laws and device characteristics through output graphs.
3. To analyze voltage and current relationships using simulation results.
Required apparatus:
PSpice software was used for this experiment.
Theory:
PSpice is a powerful circuit simulation software used to design, analyze, and test electrical and
electronic circuits in a virtual environment before practical implementation. It allows users to
draw circuit diagrams, apply input sources, and observe voltage and current waveforms
accurately, making it very useful for understanding circuit behavior. In this experiment, PSpice
was used to verify basic electrical principles such as Ohm’s Law, diode characteristics, half
wave and full wave rectification, and Kirchhoff’s Voltage and Current Laws. Ohm’s Law
describes the direct relationship between voltage, current, and resistance, while the diode
characteristics explain the unidirectional flow of current in a semiconductor device. Rectifier
circuits demonstrate the conversion of alternating current into pulsating direct current using
diodes. Kirchhoff’s laws are applied to analyze voltages and currents in closed loops and
junctions based on conservation of energy and charge. By observing the simulated output
graphs in PSpice, the theoretical concepts were clearly demonstrated and validated in an
effective and reliable manner.
Lab Task:
1
Output:
Discussion:
In this experiment, the circuit was designed in PSpice to verify Ohm’s Law by varying the input
voltage and observing the corresponding current through the resistor. The output graph showed
a straight-line relationship between voltage and current, which indicates that the current is
directly proportional to the applied voltage when resistance is constant. The slope of the V–I
graph remained uniform, confirming that the resistor obeys Ohm’s Law. The PSpice simulation
helped to clearly visualize this linear behavior without practical measurement errors.
Circuit Diagram:
2
Output:
Discussion:
The diode characteristic experiment was verified using PSpice by plotting the voltage versus
current graph of a diode. The output graph showed that in forward bias, the diode conducts
significantly after a certain threshold voltage, while in reverse bias, the current remains almost
zero. This behavior confirms the unidirectional conduction property of the diode. The simulation
results closely matched the theoretical diode characteristics, making it easier to understand diode
operation and its nonlinear behavior.
Circuit Diagram:
3
Output:
Discussion:
In this experiment, a half wave rectifier circuit was simulated in PSpice to observe its rectification
process. The output waveform showed that only one half of the input AC signal appears across
the load while the other half is blocked by the diode. This confirms the rectification action of the
diode. The output graph clearly demonstrated pulsating DC with a large ripple, which is a known
characteristic of half wave rectifiers. The simulation helped verify the theory effectively.
4
Output:
Discussion:
The full wave rectifier circuit was simulated in PSpice and the output waveform was observed.
The graph showed that both halves of the input AC signal were converted into a unidirectional
output, resulting in a smoother DC compared to the half wave rectifier. The output frequency was
found to be doubled, which agrees with theoretical expectations. The PSpice simulation
confirmed the improved efficiency and reduced ripple of the full wave rectifier.
5
Discussion:
In this experiment, circuits were simulated in PSpice to verify Kirchhoff’s Voltage Law (KVL)
and Kirchhoff’s Current Law (KCL). The voltage measurements around closed loops showed
that the algebraic sum of voltages was approximately zero, verifying KVL. Similarly, the current
measurements at a junction confirmed that the sum of incoming currents was equal to the sum of
outgoing currents, verifying KCL. The simulation results closely matched theoretical values,
proving the validity of both laws.
Conclusion:
In this experiment, Low Pass, High Pass, Band Pass, and Band Stop filters were designed and
simulated using MATLAB Simulink, and their effects on input signals of different frequencies
were observed through scope outputs. The results clearly demonstrated that the Low Pass Filter
allowed low-frequency components to pass while attenuating high-frequency signals, the High
Pass Filter suppressed low-frequency components and passed high-frequency signals, the Band
Pass Filter allowed only a specific frequency range, and the Band Stop Filter effectively
rejected a particular band of frequencies. The simulation results closely matched the theoretical
behavior of each filter, confirming their frequency-selective characteristics. Overall, the
experiment provided a clear understanding of filter operation and offered practical experience
in analyzing signal processing systems using MATLAB Simulink.
6
Experiment No: 06
Experiment Name: Experimental Study of Bipolar Junction Transistor (BJT) Circuit
Using PSpice.
Objectives:
1. To study the basic operation and characteristics of a BJT using PSpice.
2. To analyze different BJT configurations such as common emitter , common base and
common collector circuits.
3. To verify the amplification and biasing behavior of BJT circuits through simulation.
Required apparatus:
PSpice software was used for this experiment.
Theory:
PSpice is a powerful circuit simulation software used to design, analyze, and test electrical and
electronic circuits in a virtual environment before practical implementation. It allows users to
draw circuit diagrams, apply input sources, and observe voltage and current waveforms
accurately, making it very useful for understanding circuit behavior.
In this experiment, PSpice simulation software is used to design and analyze BJT circuits,
allowing accurate observation of voltages, currents, and characteristic curves without the need
for physical components. BJT circuits are mainly classified based on their configuration:
Common Emitter (CE), Common Base (CB), and Common Collector (CC). The common
emitter configuration is the most widely used because it provides both voltage and current gain,
making it suitable for amplification. The common base configuration offers low input
resistance and high voltage gain and is mainly used in high-frequency applications. The
common collector configuration, also known as the emitter follower, provides high input
resistance, low output resistance, and unity voltage gain, making it useful for impedance
matching.
1
Lab Task:
Output:
1. Input Characteristics:
80uA
40uA
0A
0V 0.2V 0.4V 0.6V 0.8V 1.0V 1.2V 1.4V 1.6V 1.8V 2.0V
Ib(Q1)
V_VBE
2. Output Characteristics:
40mA
20mA
0A
-20mA
0V 2V 4V 6V 8V 10V 12V 14V 16V 18V 20V
Ic(Q1)
V_VCE
2
Discussion:
In the Common Emitter configuration, the emitter terminal is common to both input and
output. The PSpice simulation shows that a small change in base current produces a large
change in collector current, resulting in significant voltage amplification. The output
waveform is observed to be inverted with respect to the input, confirming the phase reversal
property of the CE amplifier. The simulated voltage and current values closely match
theoretical expectations, demonstrating that the CE configuration provides high gain and is
suitable for amplification purposes.
Circuit Diagram:
Output:
1. Input Characteristics:
0A
-25mA
-50mA
0V 1V 2V 3V 4V 5V 6V 7V 8V 9V 10V
Ie(Q1)
V_VBE
3
2. Output Characteristics:
50mA
25mA
0A
0V 1V 2V 3V 4V 5V 6V 7V 8V 9V 10V
Ic(Q1)
V_VCB
Discussion:
In the Common Base configuration, the base terminal is common while the input is applied
at the emitter and the output is taken from the collector. From the PSpice results, it is
observed that the circuit has low input resistance and high voltage gain. The output signal
does not show phase inversion with respect to the input. The simulation verifies that although
the current gain is less than unity, the CB configuration is effective for high-frequency
applications due to its stable operation and good voltage amplification.
Circuit Diagram:
4
Output:
1. Input Characteristics:
50mA
25mA
0A
0V 1V 2V 3V 4V 5V 6V 7V 8V 9V 10V
Ib(Q1)
V_VBC
2. Output Characteristics:
0A
-2.0mA
-4.0mA
0V 1V 2V 3V 4V 5V 6V 7V 8V 9V 10V
Ic(Q1)
V_VCE
Discussion:
In the Common Collector configuration, the collector terminal is common and the output is
taken from the emitter, which is why it is also called an emitter follower. The PSpice
simulation shows that the output voltage closely follows the input voltage with no phase
inversion and a voltage gain approximately equal to one. The circuit exhibits high input
resistance and low output resistance, confirming its usefulness in impedance matching
5
applications. The simulated results clearly validate the theoretical behavior of the CC
configuration.
Conclusion:
The experimental study of BJT circuits using PSpice successfully demonstrates the working
principles and characteristics of different transistor configurations. The simulations of CE, CB,
and CC circuits verified their theoretical behaviors, including voltage and current
amplification, phase relationships, and input/output resistance properties. The Common
Emitter circuit showed high voltage gain with phase inversion, the Common Base circuit
provided high voltage gain with low input resistance, and the Common Collector circuit acted
as a voltage follower with high input and low output resistance. Overall, PSpice proved to be
an effective tool for analyzing and understanding BJT circuits, allowing accurate observation
of electrical parameters without the need for physical components.
6
Experiment No: 07
Experiment Name: Experimental Study of Basic Operations and Different Types of
Commands Using OriginPro.
Objectives:
1. To perform basic mathematical operations on experimental data using built-in
commands.
2. To learn how to import, arrange, and modify data within worksheets.
3. To create different types of graphs for visual representation of data.
4. To apply statistical and analytical tools for proper interpretation of experimental results.
Required apparatus:
OriginPro 2025 software was used for this experiment.
Theory:
OriginPro is a scientific data analysis and graphing software widely used in engineering and
research laboratories. It provides a user-friendly interface that allows users to perform
mathematical calculations, statistical analysis, and graphical representation of data efficiently.
In this experiment, the focus is on understanding the basic operations and commonly used
commands of the software.
In Origin, data is arranged in worksheet form with rows and columns. Each column can be
assigned as an independent (X) or dependent (Y) variable. Basic mathematical operations such
as addition, subtraction, multiplication, division, and functions like logarithmic or
trigonometric operations can also be performed. This allows quick processing of experimental
data directly within the worksheet.
The software also includes tools for data sorting, filtering, smoothing, and statistical analysis
such as mean, standard deviation, regression, and curve fitting. These features help in analyzing
and interpreting experimental results accurately. Additionally, Origin supports various types of
graphs including line plots, scatter plots, and bar charts, which help present data clearly and
professionally.
1
Experimental Study:
Task – 1:
This figure displays the departmental publications dataset in tabular style. To create various
plots in Origin, the table served as the input source. The values were arranged methodically in
a data table to facilitate handling and precise charting in later activities.
Discussion: Plotting the dataset was done with Origin's Column/Bars to Column command.
The data value for each year was shown as a vertical bar, making it easy to compare the data
over the period. A clear picture of the publication trend was given by this representation.
2
Task – 2:
Discussion: The Line + Symbol option was used in this task to plot the same dataset. The data
points were shown as symbols with lines connecting them to show the yearly trend's continuity.
The general growth pattern as well as specific publication counts were highlighted in this
illustration.
Task – 3:
Discussion: The dataset was displayed as a pie chart this time. After applying the
Column/Bars command, the Pie option was selected. The final number showed each year's
contribution as a proportion of the total. Compared to absolute data, this display more
successfully emphasized proportional disparities.
3
Task – 4:
Discussion: Plotting the same dataset once more was done using Pie Geometry's Explode
Wedge tool. To emphasize the publication share for a single year, a particular wedge was set
off from the circle. This graphical improvement brought that year's contribution to light right
away. This improved the chart's visual appeal and informational value.
Task – 5:
An extended dataset was included in this input table. Later tasks used it as the source for multi-
curve charting. The table format facilitated comparison visualization and allowed OriginPro to
handle many series.
4
Fig 7.7: Double Y-axis plot.
Discussion: The Multi-Curve → Double-Y option was used to plot the dataset. The same
graphic showed two sets of publication data with separate Y-axes. This made it possible to
compare various trends directly within a single chart.
Task – 6:
5
Discussion: The Multi-Curve → Stack Lines by Y Offsets command was used to plot the
dataset. To avoid overlap, each series was vertically shifted. The output figure retained a
comparison structure while clearly identifying the patterns of specific years. This method
prevented confusion from overlapping lines and enhanced readability.
Task – 7:
Discussion: The Multi-Curve → 4 Panel option was used to split the dataset into four aligned
panels. A portion of the dataset was shown in each panel, enabling segmented observation.
This approach made it easier to analyze long-term data trends by breaking them up into smaller,
easier-to-manage visual chunks.
6
Task – 8:
Discussion: The Multi-Curve → Stack option was used to plot the enlarged dataset. The
cumulative combination of several series demonstrated how individual contributions
accumulated to generate the overall trend. The additive impacts of several data series across
time were successfully identified with this approach.
7
Task – 9:
Discussion: The Column/Bars to Column command was used to plot the dataset, and
Independent mode was then turned on in the plot details. This made it possible to alter each
dataset's presentation independently. Each data series was visually distinct due to the
application of various colors and styles. The picture illustrated the versatility of OriginPro's
data presentation.
Task – 10:
8
Discussion: The Column/Bars command with the Stack Column option was used to plot the
data as a stacked column chart. To display cumulative growth while maintaining the visibility
of individual contributions, each dataset was stacked on top of the one before it. A thorough
picture of general publication trends over several years was given by this visualization.
Conclusion:
In this experiment, departmental publishing data was plotted using a variety of OriginPro
charting techniques. Several graphical formats, such as column charts, line + symbol plots, pie
charts with exploded wedges, double Y-axis curves, stacked line graphs, four panel plots,
stacked plots, and stacked column charts, were created from two input data tables.
Pie charts showed proportionate contributions, stacked/multi-panel plots showed cumulative
and comparative trends, and bar and line plots highlighted annual variations. Each
representation offered a different perspective. The visuals' efficacy and clarity were further
improved by using customization options like Explode Wedge and Independent mode. In the
end, the experiment accomplished its goals with success.