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

python project

The document presents a course-based project on 'Power Systems Analysis using Python libraries' by T. Maheshwari and S. Pavan Kumar, focusing on implementing the Perturb and Observe (P&O) Maximum Power Point Tracking (MPPT) algorithm to enhance solar energy system performance. The project includes a detailed methodology, simulation results using MATLAB/Simulink, and discusses applications and future scope of MPPT in renewable energy systems. The findings indicate that MPPT significantly improves energy efficiency and system reliability, contributing to the development of optimized solar power solutions.

Uploaded by

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

python project

The document presents a course-based project on 'Power Systems Analysis using Python libraries' by T. Maheshwari and S. Pavan Kumar, focusing on implementing the Perturb and Observe (P&O) Maximum Power Point Tracking (MPPT) algorithm to enhance solar energy system performance. The project includes a detailed methodology, simulation results using MATLAB/Simulink, and discusses applications and future scope of MPPT in renewable energy systems. The findings indicate that MPPT significantly improves energy efficiency and system reliability, contributing to the development of optimized solar power solutions.

Uploaded by

pavan Siliveri
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

A course-based project

Power Systems Analysis using Python libraries

Submitted in partial fulfillment of the requirements for the


award of the degree of

MASTER OF TECHNOLOGY
IN POWER SYSTEMS
BY
T.MAHESHWARI (24071D8306)
S.PAVAN KUMAR (24071D8304)
Under the guidance of
Dr. Poonam
Upadhyay(professor)
Dr. Rashmi Kapoor (Assistant Professor)

Department of Electrical & Electronics Engineering

VNR VIGNANA JYOTHI INSTITUTE OF ENGINEERING & TECHNOLOGY


AN AUTONOMOUS INSTITUTE
Bachupally, Nizampet (S.O), Hyderabad

1
CERTIFICATE

This is to certify that T.MAHESHWARI– 24071D8306, S.PAVAN KUMAR-24071D8304


have successfully completed project wort at Power Systems Department of VNR VJIET,
Hyderabad and entitled, “ Power Systems Analysis using Python libraries“ in
fulfillment of the requirements for the award of Course based project during the academic year
2024-2025.
This work is carried out under our supervision and has not been submitted to any
other University/Institute for the award of any degree/diploma.

Signature of the Project Guide Signature of the Head of the


Department

Dr. Poonam Upadhyay Dr. V. Ramesh Babu


Professor, EEE Associate Professor, HOD/EEE

Dr. Rashmi Kapoor


Assistant Professor, EEE

2
DECLARATION
We hereby declare that the major project entitled “Power Systems Analysis using
Python libraries” submitted in partial fulfillment of the requirements for the award of
Course Based project in Power systems at VNR Vignana Jyothi Institute of Engineering
and Technology, An Autonomous Institute Hyderabad, is an authentic work and has not
been submitted the same to any other university or organization for the award of any
degree/diploma.

T.MAHESWARI S.PAVAN KUMAR


24071D8306 24071D8304

3
ACKNOWLEDGEMENT

We are immensely thankful to my project guide Dr. Poonam Upadhyay and


Dr. Rashmi Kapoor, Assistant Professor VNRVJIET, for the exhaustive
technical help and encouragement during this course of work.
We would like to express our gratitude to Project Review Committee
members for their valuable suggestions and cooperation.
We earnestly thank Dr. V.RAMESH BABU, Associate Professor and HOD,
Dept. of EEE, VNRVJIET, for the extreme cooperation and encouragement
to do the project work.
We sincerely thank Dr. C. NAIDU, Principal of our college for the facilities
provided in the college premises.
We express our gratitude to our Parents & Classmates for their suggestions
and moral support.
We sincerely thank all the members of Electrical and Electronics
Department, including the faculty and staff for their constant valuable
suggestion and helpful discussions throughout the year.

T.MAHESHWARI (24071D8306)
S.PAVAN KUMAR(24071D8304)

4
INDEX

CONTENTS PAGE NO

1. INTRODUCTION 6
2. BACKGROUND OF THE PROBLEM CHOOSEN 7
3. PROBLEM STATEMENT 7
4. OBJECTIVES 8
5. METHODOLOGY 9
6. SIMULATION RESULTS 10
7. CODE AND RESULTS 12
8. APPLICATIONS 14
9. FUTURE SCOPE 15
10.CONCLUSION 16
11.REFEREMCES 17

5
INTRODUCTION

Renewable energy sources are gaining widespread attention due to the increasing demand for
sustainable and eco-friendly power generation. Among these sources, solar energy is one of the most
promising due to its abundance and accessibility. However, the efficiency of photovoltaic (PV) systems
is significantly affected by varying environmental conditions such as solar irradiance and temperature.
To ensure maximum power extraction from a PV panel, Maximum Power Point Tracking (MPPT)
techniques are employed.
This project focuses on implementing and analyzing an MPPT algorithm to enhance the performance of
a solar energy system. The Perturb and Observe (P&O) algorithm, one of the most commonly used
MPPT techniques, is implemented in this study. The P&O algorithm works by periodically perturbing
the operating voltage of the PV system and observing the resulting change in power. If the power
increases, the perturbation continues in the same direction; otherwise, it reverses direction to maintain
operation at the maximum power point (MPP). This ensures that the PV system consistently operates at
its highest efficiency, reducing energy losses and improving overall system performance.
A key component of this project is the DC-DC power converter, which regulates the output voltage
and current to match the requirements of the load or energy storage system. The converter plays a
crucial role in ensuring that the power harvested from the solar panel is effectively utilized. The
MATLAB/Simulink environment is used to simulate the entire system, including the PV module, MPPT
algorithm, and converter, to analyze system performance under different operating conditions.
The objective of this project is to optimize energy extraction from the solar panel by implementing
MPPT, improving the efficiency of solar energy conversion. The study also evaluates the response time
of the MPPT algorithm, the stability of the system under dynamic weather conditions, and the overall
improvement in power output compared to a system without MPPT. The findings from this project will
contribute to the development of more efficient and reliable solar power systems for residential and
industrial applications.

6
BACKGROUND OF THE PROBLEM CHOOSEN
Solar energy is a widely available and sustainable source of power, but its efficiency is highly dependent
on environmental conditions such as sunlight intensity and temperature. Photovoltaic (PV) panels
exhibit nonlinear power-voltage characteristics, meaning they do not always operate at their peak
efficiency. Without an effective control mechanism, significant energy losses can occur, reducing the
overall performance of solar power systems. Maximum Power Point Tracking (MPPT) techniques are
essential to address this issue by continuously adjusting the operating point of the PV system to extract
the maximum available power. Among various MPPT methods, the Perturb and Observe (P&O)
algorithm is widely used due to its simplicity and ease of implementation. This project aims to
implement and analyze the P&O MPPT algorithm to enhance the efficiency of solar energy conversion,
ensuring improved power output and system reliability.

PROBLEM STATEMENT

Photovoltaic (PV) systems are increasingly being adopted as a sustainable energy source, but their
efficiency is significantly affected by fluctuating environmental conditions such as solar irradiance and
temperature. The nonlinear power-voltage characteristics of PV panels result in variable power output,
leading to suboptimal energy harvesting if not properly managed. Without an effective Maximum Power
Point Tracking (MPPT) algorithm, the system may fail to operate at its peak efficiency, resulting in
energy losses. This project aims to implement and analyze the Perturb and Observe (P&O) MPPT
algorithm to ensure maximum power extraction from the PV system. The study focuses on improving
power conversion efficiency, stabilizing system performance under dynamic conditions, and validating
the effectiveness of MPPT using MATLAB/Simulink simulations.

7
OBJECTIVES

The primary objectives of this project are:

 To implement the Perturb and Observe (P&O) MPPT algorithm – Ensure efficient
tracking of the maximum power point in a photovoltaic (PV) system.
 To develop a Simulink-based simulation model – Design and analyze the performance of an
MPPT-controlled PV system using MATLAB/Simulink.
 To optimize energy extraction from the PV panel – Maximize the power output by
continuously adjusting the operating voltage to match the maximum power point.
 To evaluate system performance under varying conditions – Analyze the impact of
changing solar irradiance and temperature on MPPT efficiency.
 To integrate a DC-DC converter for voltage regulation – Implement a power electronic
converter to control and stabilize the output voltage.
 To compare system performance with and without MPPT – Demonstrate improvements in
energy efficiency and power output when using the MPPT algorithm.
 To enhance the efficiency and reliability of solar energy systems – Contribute to the
development of sustainable and optimized solar power solutions for real-world applications.

8
METHODOLOGY

9
MATLAB FUNCTION CODE

clc; clear; close all;

V_oc = 40;
I_sc = 8;

V = linspace(0, V_oc, 100);


I = I_sc * (1 - V / V_oc);
P = V .* I;

Vref = 20;
deltaVref = 1;
Vref_max = 30;
Vref_min = 0;
Vold = 0;
Pold = 0;

Vref_log = zeros(1, length(V));


power_log = zeros(1, length(V));

for k = 1:length(V)
Pnow = V(k) * I(k);
dV = V(k) - Vold;
dP = Pnow - Pold;

if dP ~= 0
if dP < 0
if dV < 0
Vref = Vref + deltaVref;
else
Vref = Vref - deltaVref;
end
else
if dV < 0
Vref = Vref - deltaVref;
else
Vref = Vref + deltaVref;
end
end
end

Vref = max(min(Vref, Vref_max), Vref_min);

Vref_log(k) = Vref;
power_log(k) = Pnow;

Vold = V(k);
10
Pold = Pnow;
end

figure;
subplot(2,1,1);
plot(V, P, 'b', 'LineWidth', 1.5); hold on;
scatter(Vref_log, power_log, 30, 'r', 'filled');
xlabel('Voltage (V)');
ylabel('Power (W)');
title('Power vs Voltage with P&O MPPT');
legend('Power Curve', 'Tracked Points');
grid on;

subplot(2,1,2);
plot(V, I, 'r', 'LineWidth', 1.5); hold on;
scatter(Vref_log, I_sc * (1 - Vref_log / V_oc), 30, 'b', 'filled');
xlabel('Voltage (V)');
ylabel('Current (A)');
title('Voltage vs Current with P&O MPPT');
legend('I-V Curve', 'Tracked Points');
grid on;

MATLAB Code results

11
CODE AND RESULTS

import numpy as np
import matplotlib.pyplot as plt

class PO_MPPT:
def _init_(self, Vref_init=20, deltaVref=1, Vref_max=30, Vref_min=0):
self.Vold = 0
self.Pold = 0
self.Vref = Vref_init
self.deltaVref = deltaVref
self.Vref_max = Vref_max
self.Vref_min = Vref_min

def update(self, V, I):


P=V*I
dV = V - self.Vold
dP = P - self.Pold

if dP != 0:
if dP < 0:
if dV < 0:
self.Vref += self.deltaVref
else:
self.Vref -= self.deltaVref
else:
if dV < 0:
self.Vref -= self.deltaVref
else:
self.Vref += self.deltaVref

# Constrain Vref within limits


self.Vref = np.clip(self.Vref, self.Vref_min, self.Vref_max)

# Store old values


self.Vold = V
self.Pold = P

return self.Vref

# Simulate solar panel characteristics


V_oc = 40 # Open-circuit voltage
I_sc = 8 # Short-circuit current

# Generate simulated I-V data


V = np.linspace(0, V_oc, 100)
I = I_sc * (1 - V / V_oc) # Simplified I-V curve
12
# Apply P&O MPPT
mppt = PO_MPPT()
Vref_log = []
power_log = []

for v, i in zip(V, I):


Vref = mppt.update(v, i)
Vref_log.append(Vref)
power_log.append(v * i)

# Plot Results
plt.figure(figsize=(8, 5))
plt.plot(V, I * V, label='Power Curve')
plt.plot(Vref_log, power_log, 'ro', markersize=3, label='P&O Tracked Points')
plt.xlabel('Voltage (V)')
plt.ylabel('Power (W)')
plt.legend()
plt.title('P&O MPPT Algorithm Tracking')
plt.grid(True)
plt.show()

13
APPLICATIONS

 Smart Solar Energy Systems – Python-based MPPT algorithms are integrated into IoT-enabled solar
systems to enhance real-time power optimization and remote monitoring.

 Solar-Powered Internet of Things (IoT) Devices – Small-scale solar-powered IoT devices use
Python-based MPPT for efficient energy management, ensuring prolonged operation with limited solar
input.

 Battery Charging Systems – Python is used to implement MPPT in solar battery charging controllers,
optimizing charging efficiency for applications like electric vehicles (EVs) and off-grid storage systems.

 Grid-Connected Solar Inverters – Python-based simulations help in designing MPPT controllers for
grid-tied inverters, improving power injection into the grid while maintaining stability.

 Standalone Renewable Energy Systems – Remote locations with off-grid solar installations use
Python-powered MPPT to maximize power output for reliable electricity supply.

 Hybrid Renewable Energy Systems – Python is used in hybrid solar-wind energy management
systems to optimize power extraction and ensure efficient load sharing.

 Real-Time Energy Monitoring and Control – Python-based MPPT is integrated with data analytics
and AI models to predict power generation trends and enhance system performance.

14
FUTURE SCOPE

The implementation of the Perturb and Observe (P&O) MPPT algorithm has significant
potential for future advancements in renewable energy systems. Some key areas for future
development include:

1. Integration with Artificial Intelligence (AI) and Machine Learning – Advanced AI-based
MPPT algorithms can enhance tracking accuracy, reduce power losses, and adapt dynamically to
varying environmental conditions.

2. IoT-Based Smart Solar Systems – Real-time monitoring and remote control of MPPT systems
using IoT platforms can improve performance and enable predictive maintenance.

3. Hybrid Renewable Energy Systems – MPPT can be extended to optimize power extraction in
hybrid systems that combine solar, wind, and battery storage for improved energy management.

4. Implementation on Low-Power Edge Devices – Deploying Python-based MPPT algorithms on


microcontrollers like Raspberry Pi and ESP32 can make standalone solar systems more efficient
and cost-effective.

5. Electric Vehicle (EV) Integration – Solar-powered MPPT systems can be integrated with EV
charging stations to enhance sustainability and reduce dependency on grid electricity.

6. Grid-Connected Solar System Optimization – Enhancing MPPT strategies for grid-tied


inverters can improve power quality and reliability in smart grid applications.

15
CONCLUSION

This project successfully implements and analyzes the Perturb and Observe (P&O) MPPT algorithm
to maximize power extraction from a photovoltaic (PV) system. The simulation results demonstrate that
MPPT significantly improves energy efficiency by dynamically adjusting the operating point of the solar
panel under varying environmental conditions. The integration of a DC-DC converter ensures stable
voltage regulation, further enhancing system performance. Additionally, the potential for implementing
MPPT using Python opens opportunities for real-time monitoring, AI-driven optimization, and IoT-
based smart energy solutions. Overall, this study highlights the effectiveness of MPPT in improving
solar power utilization, making it a crucial technique for modern renewable energy systems.

16
References :

 Ned Mohan, Tore M. Undeland, and William P. Robbins – Power Electronics:


Converters, Applications, and Design, Wiley, 3rd Edition, 2002.
 H. Patel and V. Agarwal, “Maximum Power Point Tracking Scheme for PV Systems
Operating Under Partially Shaded Conditions,” IEEE Transactions on Industrial
Electronics, vol. 55, no. 4, pp. 1689-1698, April 2008.
 Esram, T., and Chapman, P.L., “Comparison of Photovoltaic Array Maximum Power
Point Tracking Techniques,” IEEE Transactions on Energy Conversion, vol. 22, no. 2, pp.
439-449, June 2007.
 Sera, D., Teodorescu, R., and Rodriguez, P., “PV Panel Model Based on Datasheet
Values,” IEEE International Symposium on Industrial Electronics, 2007, pp. 2392-2396.
 Salas, V., Olias, E., Barrado, A., and Lazaro, A., “Review of the Maximum Power Point
Tracking Algorithms for Stand-Alone Photovoltaic Systems,” Solar Energy Materials and
Solar Cells, vol. 90, no. 11, pp. 1555-1578, July 2006.

xii

You might also like