0% found this document useful (0 votes)
44 views

Latest - Simulation Lab-II

This document provides guidelines and information for the Simulation Lab II course at Finolex Academy of Management and Technology. It includes: 1. An overview of the academy, its vision, mission, and details about the Electrical Engineering department. 2. General lab guidelines, instructions, and rules for maintaining proper decorum and care of equipment in the lab. 3. An index and objectives for the Simulation Lab II course, which involves coding and simulating discrete-time signals and systems using Octave and LTspice software. 4. Details of eight experiments to be completed in the course, covering topics like plotting basic discrete-time waveforms, operations on signals, system properties, convolution, and circuit simulations

Uploaded by

Harshal Gosavi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Latest - Simulation Lab-II

This document provides guidelines and information for the Simulation Lab II course at Finolex Academy of Management and Technology. It includes: 1. An overview of the academy, its vision, mission, and details about the Electrical Engineering department. 2. General lab guidelines, instructions, and rules for maintaining proper decorum and care of equipment in the lab. 3. An index and objectives for the Simulation Lab II course, which involves coding and simulating discrete-time signals and systems using Octave and LTspice software. 4. Details of eight experiments to be completed in the course, covering topics like plotting basic discrete-time waveforms, operations on signals, system properties, convolution, and circuit simulations

Uploaded by

Harshal Gosavi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 45

Hope Foundation’s

FINOLEX ACADEMY OF MANAGEMENT AND TECHNOLOGY


Ratnagiri – Maharashtra

(Affiliated to University of Mumbai, Approved by AICTE and recognized by DTE, Govt. of Maharashtra)

LABORATORY MANUAL FOR

SIMULATION LAB II

DEPARTMENT OF ELECTRICAL ENGINEERING

(ACADEMIC YEAR: 2019-2020)

Page 1 of 45
Hope Foundation’s
FINOLEX ACADEMY OF MANAGEMENT AND TECHNOLOGY
RATNAGIRI

About Institute

FAMT was established in 1996 in the picturesque coast of Ratnagiri and is well connected to the rest of the
nation by rail and road. The institutes is spread across 25 acres of land in the MIDC, Mirjole block,
Ratnagiri. It offers six undergraduate courses in engineering and two post graduate courses in Mechanical
Engineering and computer application respectively. The campus boasts of more than two lack square feet of
built up area comprising of administrative block, separate blocks for various departments equipped with
state-of–art laboratories, computer centers, ICT lecture halls, ICT seminar halls, workshop, drawing halls,
auditorium, library and canteen. The green campus also sports fields for outdoor activities such as volley
ball, cricket, etc.
The institute has good network of alumni spread in reputed organizations across the globe. The team of
highly qualified and knowledgeable academicians studied in reputed institutes of India strives hard towards
enhancing overall learning experience of the students.

Vision

The academy aspires to nurture students as leaders who are in tune with global trends, equipped with
engineering knowledge and practical skills, to excel in creativity and innovation in order to play their part in
technological advancement of the nation.

Mission
 To become foremost seat of advanced technical learning as a center of excellence in the region.
 To offer state of the art facilities and quality education at affordable cost
 To inculcate in students the culture of ‘Play Hard and Play Fair’.
 To advance sustainable development in the region through opportunities for entrepreneurship and
industry-institute interaction.
 To create a generation of young professionals who appreciate in all its aspects the necessity of
balance between technological advances and traditional values.

Page 2 of 45
Department of Electrical Engineering

About Department
Welcome to the Department of Electrical Engineering. The journey began in 1997 and more than two
decades, we are continuously upgrading our resources to make the students competent for industrial as well
as academic environment.

The Department has well equipped and fully furnished laboratories as per University curriculum and
computer centers, which keeps the students updated with the recent trends and advances in Electrical
Engineering.

The Department has qualified, experienced and dedicated faculty members who work with excellent team
spirit in diversified domains of Electrical Engineering like Power System, Control System, Electrical
Machines, Power Electronics and Digital Design.

The Department strives to provide a conducive environment for the students to assimilate the analytical and
experimental knowledge. To keep the student abreast of industrial updates, the department organizes regular
industrial training and field visits. Hands on experience is given to the students through various workshops
like PLC, Energy Audit, Proteus, PCB design etc. To complement the curriculum, various seminars, guest
lectures and course enrichment programs are organized.

Vision
The department shall become foremost seat by imparting advanced and progressive education in electrical
engineering along with excellent professional skills and character to meet industrial and social challenges.

Mission
M1: To ascertain qualitative teaching learning process through art of teaching pedagogy and meticulous
continual assessment
M2: To provide supportive environment that facilitates industrial exposure to produce quality engineers who
will excel globally
M3: To promote the versatile development of students through training of soft skills
M4: To imbibe moral, ethical and social values among students

Program Specific Objectives (PSOs)

PSO 1: Students will be able to design, simulate and analyze electrical systems using software tools.

PSO 2: Students will be able to understand, implement concepts of electrical systems through experiments
and apply it to solve industry specific problems

Page 3 of 45
General Lab Guidelines, Instructions and Rules

Guidelines
1. Proper decorum should be maintained in the lab.
2. Experiment set up/ equipment in the lab are to be dealt with utmost care by the users.
3. Students are required to carry their completed experiment file while entering the lab.
4. Students are supposed to occupy the seats/machines allotted to them and should maintain silence in the
lab.
5. Lab can be used at any other time than practical schedule during working hours with prior permission
of the concerned lab in-charge.
6. The lab can be utilized beyond working hours with due permission of The Principal with pre-
endorsement by respective lab in charge and HoD.
7. In addition, the students are required to follow guidelines given by lab staff/lab in charge/faculty in
charge/ department from time to time.

Instructions
1. Each experiment should be performed based on underlying theory/ concept/ algorithm.
2. The faculty member should explain the underlying theory/ concept/ algorithm.
3. The student should be encouraged to provide different outputs by providing varying inputs to each
experiment and these outputs should be recorded in the individual student report/journal.
4. Students should get the record of the laboratory work evaluated and duly signed by the concerned
teachers on continuous basis and submit it at the end of semester as per schedule given by concerned
teacher.
5. The faculty member should evaluate the experiment on continuous basis with due signature and date on
every experiment and index appropriately.

Dos
1. Keep your footwares and bags outside lab neatly and ensure that your footware and bags are not
a inconvenience to others entering the lab.
2. Use the computer properly to keep it in good working order. Kindly enter your details in lab
register before using computer.

3. Turn ON air conditioners (AC) only when student count is above 10.

Page 4 of 45
4. Turn OFF computers, aircondotioners, tubes whilw leaving the lab. Also ensure to keep all the
chairs in place neat and tidy.
Don’ts
1. Don’t turn off computer without properly sutting down.
2. Don’t use Air conditioner when college electrical supply is on diesel generator.
3. Don’t use cell phones in lab.
4. Don’t take lab manuals outside the lab.
5. Don’t use pen drive or any other external storage device with college computers.
6. Don’t change any program and computer setting.
7. Don’t take any computer accessories outside the lab.
8. Do not open the system unit casing or monitor casing particularly when the power is turned on.
9. Do not eat or drink in the laboratory.

The manual provides the user with the following details regarding the experiments to be completed:
1. Aim
2. Theory
3. Experiment Implementation
4. Experimental Result/Analysis
5. Conclusion

Details of Lab utilization

Name of the laboratory course(s) for Laboratory Course code(as per Semester
syllabus) (I/II/III/IV/V/VI/VII/VIII)
which the lab is used (as per syllabus)
1. Simulation Lab II EEL604 VI

Name and signature of the Lab In- Mr. Mangesh Modak


Charge

Designation / Department Assistant Professor / Electrical

Name and Signature of HoD PROF. S H Mahabdi


(HoD, Electrical)

Page 5 of 45
SIMULATION LAB II

Page 6 of 45
Index

EEL604 - Simulation Lab-II


Expt. No. List of experiments Page Nos.

1 Octave Code for Plotting Basic DT waveforms 09-15

2 Octave Code for Basic Operations on DT waveforms 16-21

3 Octave Code for Properties of Systems 22-27


4 Octave Code for Convolution of Signals 28-30
5 LTspice Model for Single-phase Full Wave Diode Rectifier 31-34
6 LTspice Model for Zero-Crossing Detector 35-37
7 LTspice Model for Solar PV Module 38-41
8 LTspice Model for Switching Regulator 42-45

Page 7 of 45
LABORATORY COURSE OBJECTIVES AND OUTCOMES

Name of Lab Course Simulation Lab II Lab Course Code: EEL604

Lab Course Objectives (LOBs):

1 To impart knowledge of Coding and simulation of electrical power systems


2 To impart knowledge of Coding of Signals & systems
3 To impart knowledge of Coding and simulation of electrical machines
4 To impart knowledge of Coding and simulation of Power electronics

Lab Course Outcomes (LOs):

1. Students will be able to code or simulate signal systems for its analysis
2. Students will be able to code or simulate power system for its analysis
3. Students will be able to code or simulate power electronics converter for its analysis
4. Students will be able to code or simulate electrical machines for its analysis
5. Students will get overall knowledge of coding and simulation of electrical systems
6. Students will obtain skills of creating codes in programming Languages

Experiment No. 1 Code for plotting basic waveforms


Date: __________________

Aim:

To Generate a Code to Plot Basic Waveforms.

Software requirements:

Page 8 of 45
Matlab Or Similar Software

Theory:

Signals are classified into the following categories:

 Continuous Time and Discrete Time Signals

 Deterministic and Non-deterministic Signals

 Even and Odd Signals

 Periodic and Aperiodic Signals

Continuous Time and Discrete Time Signals


A signal is said to be continuous when it is defined for all instants of time.

A signal is said to be discrete when it is defined at only discrete instants of time/

Deterministic and Non-deterministic Signals


A signal is said to be deterministic if there is no uncertainty with respect to its value at any instant of time.
Or, signals which can be defined exactly by a mathematical formula are known as deterministic signals.

Page 9 of 45
A signal is said to be non-deterministic if there is uncertainty with respect to its value at some instant of
time. Non-deterministic signals are random in nature hence they are called random signals. Random signals
cannot be described by a mathematical equation. They are modelled in probabilistic terms.

Even and Odd Signals


A signal is said to be even when it satisfies the condition x(t) = x(-t)

Example 1: t2, t4… cost etc.

Let x(t) = t2

x(-t) = (-t)2 = t2 = x(t)

∴,∴, t2 is even function


Example 2: As shown in the following diagram, rectangle function x(t) = x(-t) so it is also even function.

Page 10 of 45
A signal is said to be odd when it satisfies the condition x(t) = -x(-t)

Periodic and Aperiodic Signals


A signal is said to be periodic if it satisfies the condition x(t) = x(t + T) or x(n) = x(n + N).

Where

T = fundamental time period,

1/T = f = fundamental frequency.

The above signal will repeat for every time interval T0 hence it is periodic with period T0.

LIBRARY FUNCTIONS:
clc: CLC Clear command window. CLC clears the command window and homes the cursor.

clear all: CLEAR Clear variables and functions from memory. CLEAR removes all variables from the

Page 11 of 45
workspace.

close all: CLOSE Close figure.CLOSE, by itself, closes the current figure window.
CLOSE ALL closes all the open figure windows.

exp: EXP Exponential. EXP(X) is the exponential of the elements of X, e to the X.

input: INPUT Prompt for user input. R = INPUT('How many apples') gives the user the prompt in the text
string and then waits for input from the keyboard. The input can be any MATLAB expression, which is
evaluated,using the variables in the current workspace, and the result returned in R. If the user presses the
return key without entering anything, INPUT returns an empty matrix.

linspace: LINSPACE Linearly spaced vector. LINSPACE(X1, X2) generates a row vector of 100 linearly
equally spaced points between X1 and X2. rand: The rand function generates arrays of random numbers
whose elements are uniformly distributed in the interval (0,1).

ones: ONES(N) is an N-by-N matrix of ones. ONES(M,N) or ONES([M,N]) is an M-by-N matrix of ones.

zeros: ZEROS(N) is an N-by-N matrix of Zeros. ZEROS(M,N) or ZEROS([M,N]) is an M- by-N matrix of


zeros

plot: PLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix, then the vector is plotted versus the
rows or columns of the matrix, whichever line up.

subplot: SUBPLOT Create axes in tiled positions. H = SUBPLOT(m,n,p), or SUBPLOT(mnp), breaks the
Figure window into an m-by-n matrix of small axes, selects the p-th axes for the current plot, and returns the
axis handle. The axes are counted along the top row of the Figure window, then the second row

stem: STEM Discrete sequence or "stem" plot. STEM(Y) plots the data sequence Y as stems from the x axis
terminated with circles for the data value. STEM(X,Y) plots the data sequence Y at the values specified in X.

title: TITLE Graph title. TITLE('text') adds text at the top of the current axis.
xlabel: XLABEL X-axis label. XLABEL('text') adds text beside the X-axis on the current axis.

Page 12 of 45
ylabel: YLABEL Y-axis label. YLABEL('text') adds text beside the Y-axis on the current axis.

ALGORITHM:
1. Start the program
2. Get the inputs for signal generation
3. Use the appropriate library function
4. Display the waveform Source code :

Program :
% Plot basic function signals in MATLAB
%Program for Unit Impulse Function.
t=-2:1:2;
y=[zeros(1,2),ones(1,1),zeros(1,2)];
subplot(3,2,1);
stem(t,y);
ylabel('d(n)');
xlabel('Unit impulse');
%Program for Unit Step Function.
n=input('Enter value of n for unit step function : ');
t=0:1:n-1;
y1=ones(1,n);
subplot(3,2,2);
stem(t,y1);
ylabel('u(n)');
xlabel('Unit step');
%Program for Unit Ramp Function.
n=input('Enter value of n for unit ramp function : ');
t=0:1:n-1;
subplot(3,2,3);
stem(t,t);
ylabel('r(n)');
xlabel('Unit ramp');
%Program for Exponent Function.
n=input('Enter a value of n : ');
t=0:1:n-1;
a=input('Enter a value for length of Exponent : ');
y2=exp(a*t);
subplot(3,2,4);
stem(t,y2);
ylabel('e(n)');
xlabel('Exponent');
%Program for Sine Function.
n=input('Enter value of n for cycles of sine wave : ');
t=-n:1:n;
subplot(3,2,5);
y3=sin(t);
stem(t,y3);
ylabel('s(n)');
xlabel('Sinewave');
%Program for Cosine Function.
n=input('Enter value of n for cycles of cosine wave : ');
t=-n:1:n;
subplot(3,2,6);
y4=cos(t);

Page 13 of 45
stem(t,y4);
ylabel('cs(n)');
xlabel('Cosine wave');

OUTPUT:

Page 14 of 45
After performing this experiment/lab, students are expected to answer following questions:
Q.1 WHAT IS A SIGNAL ?
Q.2 GIVE CLASSIFICATION OF SIGNALS ?
Q.3 WHICH ARE SINGULARITY FUNCTIONS ?

Conclusion: Thus, In this experiment, Codes are generated to plot-


1. Unit Impulse Waveform 2. Unit Step Waveform 3. Unit Ramp Waveform 4. Exponential Waveform
5. Sine Waveform 6. Cosine Waveform 7. Gaussian Waveform 8. Sinc Waveform

Page 15 of 45
Experiment No. 2 Basic Operations on DT Waveforms
Date: __________________

Aim:

To Generate a Code to perform basic operations on DT waveforms

Software requirements:

Octave Or Similar Software

Theory:
There are two variable parameters in general:

1. Amplitude
2. Time

Amplitude Scaling of Signals


Amplitude scaling is a very basic operation performed on signals to vary its strength. It can be
mathematically represented as Y(t) = α X(t).
Here, α is the scaling factor, where:-
     α<1 → signal is attenuated.      
     α>1 → signal is amplified.

Addition of Signals
This particular operation involves the addition of amplitude of two or more signals at each
instance of time or any other independent variables which are common between the signals.
Addition of signals is illustrated in the diagram below, where X 1(t) and X2(t) are two time
dependent signals, performing the additional operation on them we get,

Y(t)=X1(t) + X2(t)

Time Scaling of Signals


Time scaling of signals of signals involves the modification of a periodicity of the signal, keeping
its amplitude constant. Its mathematically expressed as,

Y(t) = β X(t)

Where, X(t) is the original signal, and β is the scaling factor.


If β > 1 implies, the signal is compressed and β < 1 implies, the signal is expanded.

Page 16 of 45
Reflection of Signals
Reflection of signal is a very interesting operation applicable on both continuous and discrete
signals. Here in this case the vertical axis acts as the mirror, and the transformed image obtained
is exactly the mirror image of the parent signal.
It can be defined as Y(t) = X(- t) Where, X(t) is the original signal.
But if the reflected signal X(- t) = X(t); then its called an even signal.
Where as when X(- t) = − X(t); then its known as an odd signal.

Time Shifting of Signals


Time shifting of signals is probably the most important one, and most widely used amongst all
basic signal operations. Its generally used to fast-forward or delay a signal, as is necessary in
most practical circumstances. Time shifting is mathematically expressed as,

Y(t)=X(t-t0)

Where, X(t) is the original signal, and t0 represents the shift in time.
For a signal X(t) if the position shift t0> 0. Then the signal is said to be right shifted or delayed.

ALGORITHM:
1. Start the program
2. Get the inputs for signal manipulation
3. Use the appropriate library function
4. Display the waveform Source code

Program:
%Basic operations on DT signals
%Operations on the amplitude of signals
x=input('Enter input signal');
a=input('Enter amplification factor');
b=input('Enter attenuation factor');
c=input('Enter amplitude reversal factor');
d=input('Enter the constant to be added');
y1=a*x;
y2=b*x;
y3=c*x;
y4=d+x;
n=length(x);
subplot(3,2,1);
stem(0:n-1,x);
xlabel('time');
ylabel('amplitude');
title('Input Signal');
subplot(3,2,2);
stem(0:n-1,y1);
xlabel('time');
ylabel('amplitude');
title('amplified signal');
subplot(3,2,3);

Page 17 of 45
stem(0:n-1,y2);
xlabel('time');
ylabel('amplitude');
title('attenuated signal');
subplot(3,2,4);
stem(0:n-1,y3);
xlabel('time');
ylabel('amplitude');
title('amplitude reversed signal');
subplot(3,2,5);
stem(0:n-1,y4);
xlabel('time');
ylabel('amplitude');
title('constant added signal');

%Operations on time of signals

Page 18 of 45
x=input('Enter the input signal');
n0=input('Enter the positive shift');
n1=input('Enter the negative shift');
l=length(x);
subplot(2,2,1);
stem(0:l-1,x);
xlabel('time');
ylabel('amplitude');
title('Input Signal');
i=n0:l+n0-1;
subplot(2,2,2);
stem(i,x);
xlabel('time');
ylabel('amplitude');
title('Positive shifted signal');
j=-n1:l-n1-1;
subplot(2,2,3);
stem(j,x);
xlabel('time');
ylabel('amplitude');
title('Negative shifted signal');
subplot(2,2,4);
stem(-1*0:l-1,x);
xlabel('time');
ylabel('amplitude');
title('Time Reversed signal');

Page 19 of 45
%To perform arithmetic operations on 2 signals
x1=input('Enter the first signal');
x2=input('Enter the second signal');
l1=length(x1);
l2=length(x2);
subplot(2,2,1);
stem(0:l1-1,x1);
xlabel('time');
ylabel('amplitude');
title('Input Signal 1');
subplot(2,2,2);
stem(0:l2-1,x2);
xlabel('time');
ylabel('amplitude');
title('Input Signal 2');
if l1>l2
l3=l1-l2;
x2=[x2,zeros(1,l3)];
y1=x1+x2;
subplot(2,2,3);
stem(0:l1-1,y1);
xlabel('time');
ylabel('amplitude');
title('addition of 2 signals');
y2=x1.*x2;
subplot(2,2,4);
stem(0:l1-1,y2);
xlabel('time');
ylabel('amplitude');
title('multiplication of 2 signals');
end

Page 20 of 45
After performing this experiment/lab, students are expected to answer following questions:
Q.1 WHICH ARE DIFFERENT AMPLITUDE MANIPULATIONS?
Q.2 WHICH ARE DIFFERENT TIME MANIPULATIONS ?
Q.3 WHAT IS REVERSAL OF A SIGNAL ?

Conclusion: Thus, In this experiment , Codes are generated to perform following opeartions on DT signals-
1. Amplification 2. Attenuation 3. Amplitude reversal
4. Time shifting 5. Time reversal 6. Arithmetic Operations

Experiment No. 3 Properties of Systems.

Page 21 of 45
Date: __________________

Aim:

To determine whether the provided system is linear and time-invariant

Software requirements:

Octave Or Similar Software

Theory:

Liner and Non-liner Systems


A system is said to be linear when it satisfies superposition and homogenate principles. Consider two
systems with inputs as x1(t), x2(t), and outputs as y1(t), y2(t) respectively. Then, according to the
superposition and homogenate principles,

T [a1 x1(t) + a2 x2(t)] = a1 T[x1(t)] + a2 T[x2(t)]

∴,∴, T [a1 x1(t) + a2 x2(t)] = a1 y1(t) + a2 y2(t)


From the above expression, is clear that response of overall system is equal to response of individual
system.
Example:

(t) = x2(t)

Solution:

y1 (t) = T[x1(t)] = x12(t)

y2 (t) = T[x2(t)] = x22(t)

T [a1 x1(t) + a2 x2(t)] = [ a1 x1(t) + a2 x2(t)]2

Which is not equal to a1 y1(t) + a2 y2(t). Hence the system is said to be non linear.

Time Variant and Time Invariant Systems


A system is said to be time variant if its input and output characteristics vary with time. Otherwise, the
system is considered as time invariant.
The condition for time invariant system is:

y (n , t) = y(n-t)

The condition for time variant system is:


y (n , t) ≠≠ y(n-t)
Where y (n , t) = T[x(n-t)] = input change

Page 22 of 45
y (n-t) = output change

Example:

y(n) = x(-n)

y(n, t) = T[x(n-t)] = x(-n-t)

y(n-t) = x(-(n-t)) = x(-n + t)

∴∴ y(n, t) ≠ y(n-t). Hence, the system is time variant.

Causal and Non-Causal Systems


A system is said to be causal if its output depends upon present and past inputs, and does not depend upon
future input.
For non causal system, the output depends upon future inputs also.
Example 1: y(n) = 2 x(t) + 3 x(t-3)
For present value t=1, the system output is y(1) = 2x(1) + 3x(-2).
Here, the system output only depends upon present and past inputs. Hence, the system is causal.
Example 2: y(n) = 2 x(t) + 3 x(t-3) + 6x(t + 3)
For present value t=1, the system output is y(1) = 2x(1) + 3x(-2) + 6x(4) Here, the system output depends
upon future input. Hence the system is non-causal system.

ALGORITHM:
1. Start the program
2. Get the inputs for scaling constants
3. Use the appropriate equations for checking properties of a given system
4. Display the result
5. Display the output waveforms

Program

%Properties of DT Systems
% Linearity
%y(n)=[x(n)]^2+B
x1=input('Enter first Signal');
n=length(x1);
x2=input('Enter second Signal');
a=input('Enter scaling constant a ');
b=input('Enter scaling constant b ');
B=input('Enter scaling constant B ');

Page 23 of 45
y1=power(x1,2)+B;
y2=power(x2,2)+B;
rhs=a*y1+b*y2;
x3=a*x1+b*x2;
lhs=power(x3,2)+B;
subplot(2,2,1);
stem(0:n-1,x1);
xlabel('Time');
ylabel('Amplitude');
title('First input signal');
subplot(2,2,2);
stem(0:n-1,x2);
xlabel('Time');
ylabel('Amplitude');
title('Second input signal');
subplot(2,2,3);
stem(0:n-1,lhs);
xlabel('Time');
ylabel('Amplitude');
title('LHS');
subplot(2,2,4);
stem(0:n-1,rhs);
xlabel('Time');
ylabel('Amplitude');
title('RHS');
if(lhs==rhs)
display('System is Linear');
else
display('System is non-linear')
end;

OUTPUT:

Page 24 of 45
%Properties of DT Systems
% Time Invariance
%y(n)=n*[x(n)]
x1=input('Enter input Signal');
n1=length(x1);
for n=1:n1
y1=n*x1(n);
end;
n0=input('Enter shift');
x2=[zeros(1,n0),x1];
for n2=1:n1+n0
y2=n2*x2(n2);
end;
y3=[zeros(1,n0),y1];
if(y2==y3)
display('System is time invariant');
else
display('System is time variant');
end;
subplot(2,2,1);
stem(x1);
xlabel('Time');
ylabel('Amplitude');
title('First input signal');
subplot(2,2,2);
stem(x2);
xlabel('Time');
ylabel('Amplitude');
title('Signal after shift');
subplot(2,2,3);
stem(y2);
xlabel('Time');
ylabel('Amplitude');

Page 25 of 45
title('LHS');
subplot(2,2,4);
stem(y3);
xlabel('Time');
ylabel('Amplitude');
title('RHS');

OUTPUT:

Page 26 of 45
After performing this experiment/lab, students are expected to answer following questions:
Q.1 WHAT ARE TIME-INVARIENT SYSTEMS?
Q.2 WHAT IS A CAUSAL SYSTEM?
Q.3 WHICH PRINCIPAL IS FOLLOWED BY LINEAR SYSTEMS?

Conclusion: Thus, In this experiment, it is verified that the given system is linear and time-invariant or not.

Page 27 of 45
Experiment No. 4 Convolution of DT signals
Date: __________________

Aim:

To generate code for Convolution of two signals

Software requirements:

Matlab Or Similar Software

Theory:

Convolution
Convolution is a mathematical operation used to express the relation between input and output of an LTI
system. It relates input, output and impulse response of an LTI system as
y(t)=x(t)∗h(t)
Where y (t) = output of LTI
x (t) = input of LTI
h (t) = impulse response of LTI
There are two types of convolutions:
 Continuous convolution
 Discrete convolution

Continuous Convolution

OUTPUT
INPUT Y(t)=x(t)*h(t)
X(t) LTI System h(t)

y(t)=x(t)∗h(t)y(t)=x(t)∗h(t)
=∫∞−∞x(τ)h(t−τ)dτ=∫−∞∞x(τ)h(t−τ)dτ
(or)
=∫∞−∞x(t−τ)h(τ)dτ=∫−∞∞x(t−τ)h(τ)dτ
Discrete Convolution

Page 28 of 45
OUTPUT
INPUT Y(n)=x(n)*h(n)
X(n) LTI System h(n)

y(n)=x(n)∗h(n)y(n)=x(n)∗h(n)
=Σ∞k=−∞x(k)h(n−k)=Σk=−∞∞x(k)h(n−k)
(or)
=Σ∞k=−∞x(n−k)h(k)=Σk=−∞∞x(n−k)h(k)
By using convolution we can find zero state response of the system.

ALGORITHM:
1. Start the program
2. Use the appropriate library function
3. Define range of X axis for output waveforms
4. Display the output waveforms

Program:

clc
clear
x1=[0.5 2];
x2=[1 1 1];
y=conv(x1,x2);
n1=0:length(x1)-1;
n2=0:length(x2)-1;
n3=0:length(y)-1;
subplot(3,1,1)
stem(n1,x1)
grid
subplot(3,1,2)
stem(n2,x2)
grid
subplot(3,1,3)
stem(n3,y)
grid

Output :

Page 29 of 45
After performing this experiment/lab, students are expected to answer following questions:
Q.1 WHAT IS A DISCRETE CONVOLUTION ?
Q.2 WHICH COMMANDS ARE USED IN THE CODE IN ORDER TO PLOT CONVOLUTED WAVEFORM ?

Conclusion:

Thus, in this experiment, a linear convolution is done on two signals using MATLAB

Experiment No. 5 Full Wave Diode Rectifier using LTspice

Page 30 of 45
Date: __________________

Aim:

To form a Full Wave Diode Rectifier using LTspice

Software requirements:

LTspice Or Similar Software

Theory:

Rectifier
Rectifier circuit is the most used circuit because almost every electronic appliance operates on DC (Direct
Current) but the availability of the DC Sources are limited such as electrical outlets in our homes provide AC
(Alternating current). The rectifier is the perfect candidate for this job in industries & Home to convert AC
into DC. Even our cell phone chargers use rectifiers to convert the AC from our home outlets
to DC. Different types of Rectifiers are used for specific applications.

Usually, the types of Rectifiers are classified based on their output such as:

 Single Phase Rectifiers

 Three Phase Rectifiers

 Controlled Rectifiers

 Uncontrolled Rectifiers

 Half Wave Rectifiers

 Full Wave Rectifiers

 Bridge Rectifiers

 Center-Tapped Rectifiers

Full Wave Diode Rectifier

In a Full Wave Rectifier circuit two diodes are now used, one for each half of the cycle. A multiple winding
transformer is used whose secondary winding is split equally into two halves with a common centre tapped
connection, (C). This configuration results in each diode conducting in turn when its anode terminal is
positive with respect to the transformer centre point C producing an output during both half-cycles, twice that
for the half wave rectifier so it is 100% efficient as shown below.

Page 31 of 45
Output waveforms are obtained as follow:

ALGORITHM:
1. Start the Model in LTspice
2. Use the appropriate components and connect them
3. Run the model
4. Display the output waveforms

Page 32 of 45
MODEl:

Output :

Page 33 of 45
After performing this experiment/lab, students are expected to answer following questions:
Q.1 COMPARE HALF-WAVE & FULL-WAVE RECTIFIER.
Q.2 WHY K LP LS1 LS2 1 IS USED IN THE MODEL?

Conclusion:

Thus, in this experiment, a full-wave diode rectifier is formed and analyzed using LTspice

Page 34 of 45
Experiment No. 6 Zero-crossing Detector Circuit using LT1116
Date: __________________

Aim:

To form a Zero-crossing detector circuit using LT1116

Software requirements:

LTspice Or Similar Software

Theory:

Zero Crossing Detector


Zero crossing detector is a voltage comparator that changes the o/p between +Vsat & –Vsat when the i/p
crosses zero reference voltage. In simple words, the comparator is a basic Comparator used to compare two
voltages simultaneously and changes the o/p according to the comparison. The o/p of the comparator can
drive various outputs such as an LED indicator, a relay, and a control gate.
Applications

ZCD as Phase-meter

A ZCD can be used to measure the phase angle between two voltages. A sequence of pulses in the +ve and
-ve cycles are acquired to measure the voltage between the time interval of the pulse of sine wave voltage and
second sine wave. This interval of time is related to the phase difference between the two i/p sine wave
voltages. The use of phase meter ranges from 0° to 360°.

ZCD as Time Marker Generator

For an i/p sine wave, the o/p of the zero-crossing detector being a square wave, further it will pass through an
RC series circuit. If the RC time constant is very small compared to the period ‘T’ of the i/p sine wave, then
the voltage across R of the RC circuit n/w called Vr will be a series of +ve and –ve pulses. If the voltage ‘Vr’
is applied to a clipper circuit using a diode D, the load voltage VLwill have only +ve pulses and will clip
away the –ve pulses. Therefore, a zero-crossing detector (ZCD) whose i/p is a sine wave has been changed
into a sequence of positive pulses at ‘T’ interval by adding a network RC and a clipping circuit.

LT1116
The LT1116 is an ultra fast (12ns) comparator designed for sensing signals near the negative supply. The
input common mode range extends from 2.5V below the positive supply down to the negative supply rail.
Like the LT1016, this comparator is specifically designed to interface directly to TTL logic with
complementary outputs. The comparator may operate from either a single 5V supply or dual ±5V supplies.

Page 35 of 45
Tight offset voltage specifications and high gain allow the LT1116 to be used in precision applications. The
LT1116 is designed for improved speed and stability for a wide range of operating conditions. The output
stage provides active drive in both directions for maximum speed into TTL logic or passive loads, yet it has
minimal cross-conduction current. Unlike other fast comparators, the LT1116 remains stable even for slow
transitions through the active region, which eliminates the need to specify a minimum input slew rate. The
LT1116 has an internal, TTL compatible latch for retaining data at the outputs. The latch holds data as long
as the latch pin is held high. Device parameters such as gain, offset, and negative power supply current are
not significantly affected by variations in negative supply voltage.
Ratings
Supply Voltage (V+) to GND : 7V
Negative Supply Voltage (V–) : –7V to GND
Output Current (Continuous) : ± 20mA
Operating Temperature Range : 0°C to 70°C
Pin Diagram

ALGORITHM:
1. Start the Model in LTspice
2. Use the appropriate components and connect them
3. Run the model
4. Display the output waveforms

Page 36 of 45
MODEl:

Output :

After performing this experiment/lab, students are expected to answer following questions:
Q.1 WHERE ZERO-CROSSING DETECTION IS USED ?
Q.2 HOW ZCD CAN BE FORMED USING OPAMP ?

Conclusion:

Thus, in this experiment, a ZCD is formed and analyzed using LTspice

Page 37 of 45
Experiment No. 7 A model of a Solar PV Module using LTspice
Date: __________________

Aim:

To form a modul of a Solar PV cell and analyze its I-v & P-V characteristics.

Software requirements:

LTspice Or Similar Software

Theory:
A Solar Cell
Solar cell is the basic unit of solar energy generation system where electrical energy is extracted directly from
light energy without any intermediate process. The working of a solar cell solely depends upon its
photovoltaic effect hence a solar cell also known as photovoltaic cell.
I-V and P-V characteristics of a Solar Cell

The above graph shows the current-voltage ( I-V ) characteristics of a typical silicon PV cell operating under
normal conditions. The power delivered by a solar cell is the product of current and voltage ( I x V ). If the
multiplication is done, point for point, for all voltages from short-circuit to open-circuit conditions, the power
curve above is obtained for a given radiation level.

Page 38 of 45
With the solar cell open-circuited, that is not connected to any load, the current will be at its minimum (zero)
and the voltage across the cell is at its maximum, known as the solar cells open circuit voltage, or Voc. At
the other extreme, when the solar cell is short circuited, that is the positive and negative leads connected
together, the voltage across the cell is at its minimum (zero) but the current flowing out of the cell reaches its
maximum, known as the solar cells short circuit current, or Isc.

Then the span of the solar cell I-V characteristics curve ranges from the short circuit current ( Isc ) at zero
output volts, to zero current at the full open circuit voltage ( Voc ).
Equivalent Circuit of a Solar Cell

ALGORITHM:
1. Start the Model in LTspice
2. Use the appropriate components and connect them
3. Run the model
4. Display the output waveforms

Page 39 of 45
MODEl:

Page 40 of 45
Output :

After performing this experiment/lab, students are expected to answer following questions:
Q.1 WHAT IS MPP ?
Q.2 WHICH COMMAND IS USED TO PLOT MULTIPLE PLOTS ON A SINGLE GRAPH ?

Conclusion:

Thus, in this experiment, A model of a solar PV module is formed and analyzed using LTspice

Page 41 of 45
Experiment No.8 A model of a Switching Regulator using LTspice
Date: __________________

Aim:

To form a model of a 500 KHz , Step-down Switching Regulator using LT1374

Software requirements:

LTspice Or Similar Software

Theory:
A Switching Regulator
A switching voltage regulator accepts a dc input voltage and converts it to a switched voltage that can extend
into the MHz region. Then, it converts the switched voltage to a dc output using a rectifier and low pass filter.
Because the switched voltage is on only part of the time, the switching operation results in higher efficiency
than is possible with a linear regulator that is always on.

LT1374
The LT 1374 is a 500 kHz monolithic buck mode switching regulator. A 4.5A switch is included on the die
along with all the necessary oscillator, control and logic circuitry. High switching frequency allows a
considerable reduction in the size of external components. The topology is current mode for fast transient
response and good loop stability. It offers following features :
 Constant 500kHz Switching Frequency
 High Power 16-Pin TSSOP Package Available
 Uses All Surface Mount Components
 Inductor Size Reduced to 1.8µH
 Saturating Switch Design: 0.07Ω
 Effective Supply Current: 2.5mA
 Shutdown Current: 20µA
 Cycle-by-Cycle Current Limiting
 Easily Synchronizable

Applications
 Portable Computers
 Battery-Powered Systems

Page 42 of 45
 Battery Chargers
 Distributed Power
Pin Configuration

ALGORITHM:
1. Start the Model in LTspice
2. Use the appropriate components and connect them
3. Run the model
4. Display the output waveforms

MODEl:

Page 43 of 45
Output :

After performing this experiment/lab, students are expected to answer following questions:

Page 44 of 45
Q.1 EXPLAIN PIN FUNCTIONS OF LT1374 IN BRIEF.

Conclusion:

Thus, in this experiment, A model of a 500 KHz , step-down switching regulator is formed and analyzed using LTspice

Page 45 of 45

You might also like