Energy Storage System and Load Shedding – Matlab Programming

5/5 - (2 votes)

Electrical energy and Battery Storage

To help utilities move forward to achieve goals, several benefits are offered by the Energy Storage System. The primary benefit of ESS is the reliability of the system. As the interested customers are willing to pay to avoid any interruption in power, the costs are optimized concerning reliability. A methodology for the Improvement of system reliability is discussed in this article.

Distribution Systems and Energy Storage Devices

The success of a substation is highly dependent on the ability to achieve and maintain voltage stability. This can be accomplished when energy storage devices are installed in such a way that it should be able to store energy during low load conditions, and then release it when high loads are present. Also, these storage devices can equally undergo a process called load shedding where they would shed or reduce unused power back into the grid during peak hours.

Energy Storage Systems (ESS)

These kinds of systems contain three main parts: batteries or capacitors along with their related circuitry for conversion and control. There are two main types of ESS depending on whether any power is transferred from one part to another. The first type is called as “conventional ESS” which has no interconnection between the components, so there are no possible transfer of energy.

The second type is “conjugate ESS” which allows power to be shared and transferred between all subcomponents. The choice of an energy storage system should be guided by considerations such as cost, reliability, efficiency, and maintainability.

Load Shedding

This refers to a process where utility companies are able to remove loads in order to control the load imposed on their distribution system. This is an effective tool for relieving power constraints that normally arise during peak hours, thus protecting the reliability of the electrical grid.

There are three different types of load shedding

Energy Storage Technologies

The main energy storage technologies that are currently being used for ESS and load shedding include pumped hydroelectric power, compressed air energy storage (CAES), batteries, and flywheels.

For more detailed information about these types of energy storage systems, it is recommended to consult with expert researchers in this field. Fortunately, there are many online resources and publications that provide detailed information about the latest developments and trends in energy storage technology.

Overall, it is clear that energy storage systems play a crucial role in optimizing the performance of distribution systems and helping to achieve voltage stability. As new technologies continue to emerge, we can expect to see even more innovative solutions for managing load shedding and ensuring reliable electricity supply.

batter energy storage system matlab code

Lithium Ion Batteries

One of the most popular types of energy storage technologies being used today is lithium ion batteries. These batteries are highly reliable and cost-effective, making them a popular choice for applications such as electric vehicles and smart grid systems. However, there are some challenges associated with lithium ion batteries that need to be addressed in order to achieve long-term reliability and performance. For example, the safety and performance of these batteries can be affected by issues such as physical damage from collisions, overcharging, and internal short circuits. As this field continues to evolve and develop new solutions, we can expect to see even more promising technologies for energy storage systems in the near future.

Lead Acid Batteries

Another type of energy storage technology that is commonly used for load shedding and other applications is lead acid batteries. Like lithium ion batteries, these batteries are relatively reliable and cost-effective, making them a popular choice for many different types of applications. However, there are some challenges associated with using lead acid batteries due to issues such as corrosion, aging, and safety concerns related to battery disposal. Despite these challenges, lead acid batteries remain an attractive option for many utility companies and energy storage systems due to their proven track record and proven performance in real-world settings.

Energy Storage System MATLAB Code Download

Battery Storage System Cost Estimation

Cost Estimation for Batteries Technology

Flywheel Energy Storage

Finally, another type of energy storage technology that is commonly used for load shedding and other applications is flywheel energy storage. This consists of a high-speed rotating disc that stores kinetic energy in the form of angular momentum. Flywheels are typically located inside sealed containers and have mechanisms for brake cooling to prevent overheating and damage. One advantage of flywheels is their ability to respond quickly to fluctuations in power demand, making them an ideal choice for managing variability on electrical. However, there are also some challenges associated with using flywheels as an energy storage system, such as problems related to maintenance and wear-and-tear over time.

Coal Fired Power Plants

Another type of load shedding technology that is commonly used in many utilities and industrial applications is coal-fired power plants. These are thermal power plants that use coal as their primary fuel source to generate electricity, typically by burning the coal in a boiler. The main benefit of using coal-fired power plants for load shedding is that they can quickly ramp up or down to match any fluctuations in power demand. However, there are also some challenges associated with using this technology, such as the environmental impact of coal combustion and concerns about safety and efficiency over time. Despite these issues, coal-fired power plants remain a popular choice for many utilities due to their proven performance and reliable output.

Overall, there are many different energy storage technologies and load shedding solutions that are currently being used in a wide range of applications. Whether you are looking for lithium ion batteries, lead acid batteries, flywheels, or other options, there is sure to be a solution that meets your specific needs and requirements. As new technologies continue to emerge and evolve, we can expect to see even more innovative solutions for managing load shedding and ensuring reliable electricity supply in the years ahead.

storage system and energy requirement

Storage System and Energy Requirements

When planning an energy storage system, one of the key considerations is the energy requirements of the application. In general, the more energy that is required for a given load shedding or other application, the larger and more complex your storage system will need to be. Therefore, you will typically need to analyze factors such as the power rating of the load being powered, the voltage and current requirements of this load, and any additional loads that may be connected to the same storage system. Additionally, you will also need to consider things like efficiency losses over time and possible backup sources in case your primary electricity supply becomes unavailable. By understanding these key factors, you can design a storage system that meets both your current needs and future growth potential as your business or organization continues to expand.

There are many different factors that will impact the energy requirements of your storage system, such as the type of technology you are using, how often it is being used, and how long the energy needs to be stored for. When planning an energy storage system, it is important to do a thorough analysis of all these variables so that you can select a solution that meets your current and future needs. Additionally, it is also essential to work closely with experienced professionals who have expertise in this area and can provide guidance on choosing the right system for your specific application. With careful planning and expert support, you can ensure reliable electricity supply for your business or organization now and into the future.

Distributed Generation and Renewable Energies

Another key factor to consider when planning an energy storage system is the role of distributed generation and renewable energies. In recent years, there has been a shift towards using these technologies and incorporating them into the overall energy mix. Distributed generation refers to the use of small-scale power plants that are connected directly to local electricity grids, while renewable energies include sources such as wind turbines, solar panels, and hydroelectric dams.

One of the main benefits of distributed generation and renewable energies is that they are typically more environmentally friendly than traditional fuels such as coal or natural gas. Additionally, these technologies can also help improve efficiency by reducing transmission losses along power lines from centralized power plants. However, there can be challenges associated with integrating these new technologies into existing power systems, including issues related to reliability and grid stability.

Overall, distributed generation and renewable energies are becoming an increasingly important component of the energy landscape, and it is crucial to take these factors into account when planning your energy storage system. With careful planning and collaboration with industry experts, you can ensure that your system is well-suited to meet the unique needs and requirements of your organization or business.

Round Trip Efficiency

The round trip efficiency, or RTE, of an energy storage system refers to the amount of energy that is lost over time as a result of various inefficiencies. This term is typically used when comparing different types of technologies and systems, such as batteries, compressed air storage, pumped hydroelectric power plants, and fuel cells.

There are many factors that can impact the RTE of an energy storage system, including the materials used in its construction, the temperature at which it operates, and any electrical losses that may arise during charging or discharging. To maximize the efficiency of your system and minimize these losses over time, it is important to work with experienced professionals who have expertise in this area.

Cost-effective Improvement by Energy Storage Technology:

ESSs are devices or systems that store energy and supply electricity on demand. The most critical components of an ESS are energy storage devices, a battery management system (BMS), power converters, and a controller.

 ESS is one of the most optimistic technologies, which can bear smart grid incorporation due to its capacity. They can enable successful islanding and facilitate the integration of high penetration levels of Renewable Energy Sources (RES).
Simulation is done through the Matlab program.

Several Benefits Provided by ESS:

  1. Efficient expansion alternative
  2. Side Management
  3. Methods of Mitigating quality issues

When there is a network outage, Distributed Energy Resources (DERs) provide the system with the desired power. Therefore, system reliability is enhanced by preventing energy loss supplied to unaffected customers during aggravation. The island formation improves the reliability of the system when any disturbance occurs.

format shortG
%% CDFN Evaluation
CDFN_CI= (1604*2)/60 + (396.3*30)/60 + 282*1 + 298.9*4 + 206.1*8;
CDFN_R= (16.8*2)/60 + (3.5*1)/2 + 2.2*1 + 1.2*4 + 0.9*8;
% Taking 30% Small C & I, 70% Residential.
CDFN=0.3*CDFN_CI + 0.7*CDFN_R;

%% Interuption Cost

% Base Case Interuption Cost
Ny=30; PSH=1; PD=3715; 
BC_Cost= (CDFN_BC * PSH * PD )/Ny;
BC_Cost= BC_Cost/1000000;

% Battery Technology Case Interuption Cost
Ny=30; PSH=1; PD=3715; 
BT_Cost= (CDFN_BT * PSH * PD )/Ny;
BT_Cost= BT_Cost/1000000;

sprintf('Base Case Interuption Cost ($ million)=%d, Battery Technology Interuption Cost ($ million)=%d',BC_Cost,BT_Cost)

%% Battery Technology Comparison
% LA
Cp=10.07; Cm=15; Sds=100; Ce=17.55; Eds=100; ECOST=CDFN;
LA_Cost= ((Cp + Cm) * Sds) + (Ce * Eds) + ECOST;
Cp=57.55; Cm=28; Sds=100; Ce=14.39; Eds=100;
CAS_Cost= ((Cp + Cm) * Sds) + (Ce * Eds) + ECOST;
% Na/S
Cp=57.55; Cm=20; Sds=100; Ce=28.78; Eds=100;
NaS_Cost= ((Cp + Cm) * Sds) + (Ce * Eds) + ECOST;
% VR
Cp=20; Sds=100; Ce=42.59; Eds=100;
% Capital Power cost for VR battery is included in capital energy cost.
% See, Table 3 for further details
VR_Cost= (Cp * Sds) + (Ce * Eds) + ECOST;

Distributed Storage and Renewable Energy

As utilities and their customers increasingly strive to meet sustainability goals, the electric grid is evolving. In the past, both generation and consumption of electric energy were centralized on the grid. While traditional generators are still the most significant energy source, various technologies that enable energy generation and storage at or near consumption are changing how we use electric power.

These technologies – collectively called Distributed Energy Resources (DERs) – include solar photovoltaic panels, BESS or battery energy storage systems, demand response, energy efficiency, and electric vehicles. Demand response helps utilities manage peak demand by shifting electricity usage in high-demanding periods. Successful operation improves system readability too.

Due to its probabilistic nature, the generated power from Distributed Generation (DG), which includes wind turbines, is not dependable for PV arrays. Distributed storage (DS) can be used as a backup source.

Energy Storage System MATLAB Code Download


A model for allocating DS units in a distribution system is proposed to improve system reliability and reduce system costs. In this case study, two DS storage systems are evaluated against a base case with no data storage system. Each storage technology is assessed using a variety of metrics, including cost, total capacity, and average response time. 

The results show that integrating DS units with distribution systems reduces the utility’s annual costs because of their ability to enable islanding and reduce the number of interruptions, thus providing a more cost-effective means of improving system reliability. It is necessary to conduct a sensitivity analysis to determine the influence of interruption costs on the results of the proposed solution. 

ESS stores energy and provides us the energy when there is a demand. It includes battery management, converters, and controllers. As the power outage increases, new DER technologies are in high demand. 

matlab code explainer
format shortG
% The operation and maintenance cost of ESS= 0.6 cents/kWh.

ESS_Cost=0.6/100  %bCost in $/KWh

% Highest market-clearing price with and without ESS integration.

Hour=[1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24];

% IEEE-RTS summer load profile
% Which provides the hourly load magnitude as a percentage of the daily peak demand.
% Summer
Load_Magnitude=[0.64 0.6 0.58 0.56 0.56 0.58 0.64 0.76 0.87 0.95 0.99 1 0.99 1 1 0.97 0.96 0.96 0.93 0.92 0.92 0.93 0.87 0.72];

%% No ESS
% The operation and maintenance cost of ESS= 0.6 cents/kWh.
Cost=ESS_Cost * 1000  %1000KWh= MWh
Load_Result_Cost=First * Load_Magnitude * Cost; % When no DS/ESS

% Load_Result_Cost'

%% When ESS/DS Included


% From 1-7, Battery Technology charging included. 
for i=1:18
   Load_Re_Cost(i)=Load * Load_Magnitude(1)* Cost; 

% From 7-10, Supply available from Main Grid & Generator.
for i=7:10
    Load_Re_Cost(i)=Load  * Load_Magnitude(i) * Cost; 

% From 10-18 AM, Battery Technology discharge.
for i=10:18
    Load_Re_Cost(i)=Load * Load_Magnitude(10)* Cost; 



plot(Load_Result_Cost,':', 'linewidth',1.3)
hold on
plot(Load_Re_Cost,'.-', 'linewidth',1.1)

Looking for further assistance, hire Matlab expert here other relevant articles are
PSO Matlab Code
Microgrid Matlab Code
Matlab code for Dstatcom
Load flow analysis in Matlab simulink
Do my Matlab homework


A. S. A. Awad, T. H. M. EL-Fouly and M. M. A. Salama, “Optimal ESS Allocation and Load Shedding for Improving Distribution System Reliability,” in IEEE Transactions on Smart Grid, vol. 5, no. 5, pp. 2339-2349, Sept. 2014, doi: 10.1109/TSG.2014.2316197. 

79 thoughts on “Energy Storage System and Load Shedding – Matlab Programming”

  1. Here is Mr Benjamin contact Email details, / Or Whatsapp +1 989-394-3740 that helped me with loan of 90,000.00 Euros to startup my business and I'm very grateful,It was really hard on me here trying to make a way as a single mother things hasn't be easy with me but with the help of Le_Meridian put smile on my face as i watch my business growing stronger and expanding as well.I know you may surprise why me putting things like this here but i really have to express my gratitude so anyone seeking for financial help or going through hardship with there business or want to startup business project can see to this and have hope of getting out of the hardship..Thank You.

  2. sir,I have studied the code which you sent me about DG allocation in IEEE14 bus. It is really an excellent job!
    I wonder if you can share the code aboue Energy Storage System and Load Shedding .
    My email

Leave a Comment

Your email address will not be published. Required fields are marked *