NAME: Saurabh Singh
SAP: 500097797
Experiment 1
AIM - To study the load flow analysis using Gauss-Seidel method in MATLAB.
THEORY –
A load flow study, also known as a power flow study, is a numerical examination of
the electric power flow inside an electrical system. The evaluation of the electrical
system's steady-state characteristics is another aspect of a load flow analysis.
Among the power systems studies, the load flow research is one of the most
challenging. The system's capacity to provide loads sufficiently while staying within
the necessary voltage and current ranges is assessed in this study.
The voltage level (V) and voltage phase angle (δ) on each bus under steadystate
conditions can be determined by load flow studies. This is significant since there is a
specified limit that the bus voltage must stay within.
Procedure:-
Step 1 – Represent the system by bus data matrix.
Step 2 – Convert all quantities to per unit.
Step 3 – Obtain the Y_bus matrix.
Step 4 – Classify the buses (slack bus, or generator bus, or load buses)
Step 5 –Start answering the missing variables, by assumptions (unless it is specified otherwise).
Step 6 – Represent load flow equations in form of compatible to MATLAB.
Step 7 – Initialize variables
Step 8 – Display Voltages in the command window.
Step 9 – Plot graph named Voltage
CODE:-
% Load Flow Analysis for Four-Bus System using Gauss Method
% Bus data
bus_data = [
1, 1, 0, 0, 1.06; % Slack Bus (Bus ID, Type, P, Q, V)
2, 0, 0.5, 0.2, 1; % Load Bus 1
3, 0, 0.4, 0.3, 1; % Load Bus 2
4, 0, 0.3, 0.1, 1 % Load Bus 3
];
P = [0 .5 .4 .3];
Q = [0 .2 .3 .1];
% Line admittance data (Rectangular form)
y12 = ( 2 - 8.0i); % Admittance from Bus 1 to Bus 2
y13 = ( 1 - 4.0i); % Admittance from Bus 1 to Bus 3
y14 = (0 + 0.0i); % Admittance from Bus 1 to Bus 4
y21 = y12; % Admittance from Bus 2 to Bus 1
y23 = ( 0.666 - 2.664i); % Admittance from Bus 2 to Bus 3
y24 = ( 1 - 4.0i); % Admittance from Bus 2 to Bus 4
y31 = y13; % Admittance from Bus 3 to Bus 1
y32 = y23; % Admittance from Bus 3 to Bus 2
y34 = ( 2 - 8.0i); % Admittance from Bus 3 to Bus 4
y41 = y14; % Admittance from Bus 4 to Bus 1
y42 = y24; % Admittance from Bus 4 to Bus 2
y43 = y34; % Admittance from Bus 4 to Bus 3
Y_bus = [
y12 + y13 + y14, -y12, -y13, -y14;
- y21, + y21 + y23 + y24, - y23,- y24;
- y31, - y32, + y31 + y32 + y34,- y34;
- y41, - y42, - y43, + y41 + y42 + y43
];
% Initialize variables
num_buses = size(bus_data, 1);
VIini = ones(num_buses, 1);
V_ini(1) = 1.06;
delta = zeros(num_buses, 1);
max_iterations = 1;
tolerance = .001;
V_c = [0];
V = V_ini;
for iteration = 1:max_iterations
for k = 2:num_buses
A(k) = (-P(k)+Q(k)*i)/(Y_bus(k,k)*conj(V_ini(k)));
for j = 1:num_buses
if j ~= k
V_c(k,j) = ((1 / Y_bus(k, k))*Y_bus(k,j)*V(j));
else
V_c(k,j) = 0;
end
V(k) = A(k)-sum(V_c(k,:));
end
end
end
% Display results
disp('Results after load flow analysis:');
disp('Bus Voltage');
disp(V);
% %Plot the voltage magnitudes
% figure;
% bar(V);
% title('Voltage Magnitudes');
% xlabel('Bus Number');
% ylabel('Voltage Magnitude (pu)');
Command window output:
Bus number vs voltage magnitude bar plot :
Experiment 3
AIM- To create a transmission line and study 3 phase fault analysis using pimodel in MATLAB.
THEORY:-
When all three phases of a power system are earthed or short-circuited to one another,
it is known as a three-phase fault. To analyse defects, one simply has to know the
positive-sequence network, as this is typically a balanced condition.
The system can be unbalanced notwithstanding a three-phase malfunction.
Single core cables, isolated phase bus ducting, and metal-clad switchgear can all help
lower the frequency of three-phase faults. Short circuits are the faults found in three-
phase power systems.
The most serious failure in power systems is a three-phase short circuit fault.
Information needed for switchgear selection, relay settings, and system operating
stability must be obtained from a power system fault analysis.
PROCEDURE:-
1.Connect five three phase pi section line in series and connect the starting and end of the line with
connection ports.
2. Create a subsystem and duplicate it.
3.Connect the first subsystem with three phase source and three phase vi measurement.
4. Connect other subsystem with three phase source but as a load.
5.Define the parameters accordingly
6.Connect the fault block with phase A to A , B to B, C to C.
7.Run and obtain the graphs .
OUTPUT
• THREE PHASE FAULT WITH GROUND
CURRENT (Iabc)
VOTAGE (Vabc)
• SINGLE PHASE GROUND FAULT
CURREBT(Iabc)
VOTAGE(Vabc)
DOUBLE LINE TO GROUND FAULT
CURRENT(Iabc)
VOATGE(Vabc)
EXPERIMENT-4
AIM- To study and analyse the distance relay protection in AC Microgrid using Simulink in MATLAB
THEORY:-
By using the theory of impedance measurement, distance protection is a kind of protective
relay that finds and isolates power system failures.
• It takes the line's impedance reading and compares it to a predetermined value.
Transmission lines, where faults are more likely to occur because of the high voltage and
current levels, are frequently employed for distance protection. When a fault occurs, the
impedance of the line changes, and the relay detects this change and sends a signal to the
circuit breaker.
• Impedance measurement: Using the voltage and current data at the relaying site, distance
protection relays determine the power system's impedance.
• Impedance characteristic: A plot of the measured impedance against distance represents the
relay's impedance characteristic.
SYSTEM DIAGRAM:-
OUTPUT:-
SINGLE PHASE TO GROUND (SECTOR 1 AND SECTOR 2)
TWO PHASE TO GROUND (SECTOR 1)
THREE PHASE TO GROUND (SECTOR 1)
R-X DIAGRAM FOR DIFFERENT CONFIGURATION
EXPERIMENT-5
AIM- To study and analyse the overcurrent relay protection in AC Microgrid using Simulink in
MATLAB.
THEORY:-
• In an over current relay or o/c relay the actuating quantity is only current. There is only one current
operated element in the relay, no voltage coil etc. are required to construct this protective relay.
• An overcurrent relay is a protective relay that reacts when the current flowing through a device or
conductor exceeds a predetermined threshold.
• The purpose of overcurrent protection is to prevent damage to power distribution equipment, motors,
and generators from excessive current.
• Overcurrent protection can be used for primary protection, as well as as a backup in cases of earth
fault protection and phase overcurrent.
• There are two types of overcurrent relays: Instantaneous overcurrent (IOC) relay: Protects against
very high currents for a short time. Definite time overcurrent (DTOC) relay: Has a different operating
time than an IOC relay.
SYSTEM DIAGRAM:-
OUTPUT :-
CURRENT Vs TIME FOR PHASE FAULT PROTECTION
CURRENT Vs TIME FOR PHASE FAULT PROTECTION
EXPERIMENT 6
Aim: - To design and implement a perturb and observe (P&O) Maximum Power Point Tracking
(MPPT)
Aim: - To design and implement a perturb and observe (P&O) Maximum Power Point
Tracking (MPPT) Algorithm.
Theory: -
The P&O method is the simplest MPPT technique, periodically increasing or decreasing the
PV array voltage to move the operating point toward the maximum power point. However, this
technique can have problems such as steady-state oscillation and deviation from the maximum
power point (MPP).
Maximum power point tracking (MPPT) is an algorithm implemented in photovoltaic (PV)
inverters to continuously adjust the impedance seen by the solar array to keep the PV system
operating at, or close to, the peak power point of the PV panel under varying conditions, like
changing solar irradiance, temperature, and load.
MPPT algorithms are typically used in the controller designs for PV systems. The algorithms
account for factors such as variable irradiance (sunlight) and temperature to ensure that the PV
system generates maximum power at all times.
Procedure: -
1. Select a PV Array with 1300 series and 11 parallel strings.
2. We have used standard MATLAB function to implement the algorithms
3. This algorithm involves perturbation of operating voltage or the duty cycle based on
the comparison of the power generated to ensure maximum power point.
4. Designed a boost converter to get the values of L and C for the desired output voltage.
CODE: -
(MPPT ALGORITHM IMPLEMENTED IN MATLAB FUNCTION)
function Dref = mppt(V,I)
Dinit=0.42;
Dmax=0.9;
Dmin=0.1;
delDref=0.00008;
persistent Vold Pold Drefold if(isempty(Vold)) Vold=0; Pold=0; Drefold=Dinit;
end
P=V*I; delv=V-Vold;
delp=P-Pold;
if delp>0 if delv>0 Dref=Drefold - delDref;
else Dref=Drefold - delDref;
end
elseif delp0 Dref=Drefold + delDref;
else Dref=Drefold - delDref;
end
else Dref=Drefold;
end
if Dref>Dmax || Dref<Dmin
Dref=Drefold;
end
Drefold=Dref;
Pold=P;
Vold=V;
Simulation: -
Output: - Voltage, Current and power graph
Result: - The power can be seen to increase up to 3MW, Voltage is constant around 400 volts and
Current increases up to 10000 A.
Duty cycle: -
Result: - By implementing the algorithms in basic MATLAB Function, we have the output for
duty cycle which can be altered to achieve the maximum power point.
Result: - The output Voltage graph after applying the boost converter with significant value
of Inductor and capacitor.
EXPERIMENT-7
AIM: To study the Load Flow Analysis for four bus system using the
Gauss Method.
THEORY: The Gauss method, also known as Gaussian elimination, is a fundamental
technique for solving systems of linear equations. The Gauss method, a variant of the Gauss-
Seidel method, iteratively solves power flow equations by updating bus voltages concurrently.
The Gauss method iteratively solves the power flow equations until convergence is achieved.
CODE:
% Load Flow Analysis for Four-Bus System using Gauss Method
% Bus data
bus_data = [
1, 1, 0, 0, 1.06; % Slack Bus (Bus ID, Type, P, Q, V)
2, 0, 0.5, 0.2, 1; % Load Bus 1
3, 0, 0.4, 0.3, 1; % Load Bus 2
4, 0, 0.3, 0.1, 1 % Load Bus 3
];
P = [0 .5 .4 .3];
Q = [0 .2 .3 .1];
% Line admittance data (Rectangular form)
y12 = (2 - 8.0i); % Admittance from Bus 1 to Bus 2
y13 = (1 - 4.0i); % Admittance from Bus 1 to Bus 3
y14 = (0 + 0.0i); % Admittance from Bus 1 to Bus 4
y21 = y12; % Admittance from Bus 2 to Bus 1
y23 = (0.666 - 2.664i); % Admittance from Bus 2 to Bus 3
y24 = (1 - 4.0i); % Admittance from Bus 2 to Bus 4
y31 = y13; % Admittance from Bus 3 to Bus 1
y32 = y23; % Admittance from Bus 3 to Bus 2
y34 = (2 - 8.0i); % Admittance from Bus 3 to Bus 4
y41 = y14; % Admittance from Bus 4 to Bus 1
y42 = y24; % Admittance from Bus 4 to Bus 2
y43 = y34; % Admittance from Bus 4 to Bus 3
Y_bus = [
y12 + y13 + y14, -y12, -y13, -y14;
-y21, y21 + y23 + y24, -y23, -y24;
-y31, -y32, y31 + y32 + y34, -y34;
-y41, -y42, -y43, y41 + y42 + y43
];
% Initialize variables
num_buses = size(bus_data, 1);
V_ini = ones(num_buses, 1);
V_ini(1) = 1.06;
max_iterations = 100;
tolerance = 0.001;
V = V_ini;
for iteration = 1:max_iterations
V_prev = V; % Store previous iteration values
for k = 2:num_buses
sum1 = 0;
sum2 = 0;
for j = 1:num_buses
sum1 = sum1 + Y_bus(k,j)*V(j);
sum2 = sum2 + abs(Y_bus(k,j)) * abs(V(j)) *
cos(angle(Y_bus(k,j)) - angle(V(j)));
end
V(k) = (P(k) - 1i * Q(k)) / conj(sum1) / V(k) * conj(V(k)) /
abs(V(k))^2;
V(k) = (P(k) - 1i * Q(k)) / conj(sum1) / abs(V(k)) * V(k) /
abs(V(k));
end
% Check convergence
if max(abs(V - V_prev)) < tolerance
disp(['Converged at iteration ', num2str(iteration)]);
break;
end
end
% Display results
disp('Results after load flow analysis:');
disp('Bus Voltage:');
disp(V);
% Plot the voltage magnitudes
figure;
bar(abs(V));
title('Voltage Magnitudes');
xlabel('Bus Number');
ylabel('Voltage Magnitude (pu)');
RESULTS:
Different voltage values calculated after implementation of Gauss method.
GRAPH:
Fig1: Representation of voltage magnitude vs Bus Number
EXPERIMENT-9
AIM: To design a 3 MW Grid connected Solar PV system in MATLAB/Simulink.
THEORY: Grid-connected solar PV systems generate electricity
from sunlight, convert it into usable power, and feed it into the
electrical grid.
MATLAB ALGORITHM:
function Dref = mppt(V,I)
Dinit=0.42;
Dmax=0.9;
Dmin=0.1;
delDref=0.00008;
persistent Vold Pold Drefold
if(isempty(Vold))
Vold=0;
Pold=0;
Drefold=Dinit;
end
P=V*I;
delv=V-Vold;
delp=P-Pold;
if delp>0
if delv>0
Dref=Drefold - delDref;
else
Dref=Drefold - delDref;
end
elseif delp<0
if delv>0
Dref=Drefold + delDref;
else
Dref=Drefold - delDref;
end
else
Dref=Drefold;
end
if Dref>Dmax || Dref<Dmin
Dref=Drefold;
end
Drefold=Dref;
Pold=P;
Vold=V;
PROCEDURE:
1. Set up the PV array configuration with 11 panels connected in
series and 1300 parallel strings.
2. Develop a boost converter utilizing RLC series branch
components, incorporating C= 0.0397 and L= 1.5636e-04.
3. Establish a connection between the boost converter and the
PV array to facilitate power conversion.
4. Implement Proportional-Integral-Derivative (PID) controllers
for voltage and current regulation within the system.
5. To convert control signals between DQ and ABC coordinates
bidirectionally to facilitate control coordination.
SIMULATION:
RESULTS: