Energy Trading in Microgrid

Sheikh Muhammad Ibraheem
3 min readNov 10, 2023


It’s been a long time since I’ve written any post to my own blog. But I was busy doing some other work that took most of my time, and in my free time, I was busy reading some Collen Hoover novels. However, I was busy updating the entire front end of my website and was working on my first research paper, which will soon be published at an upcoming IEEE (Institute of Electrical and Electronics Engineers) conference.

In this post, I’m specifically going to discuss the research that I’ve completed during my engineering. The research is related to finding the solution to the modern energy crisis and providing the end electricity consumer with a reliable source of energy. Before going in depth into the research, let’s first take a quick overview of what Ibraheem is going to explain. Now the entire research revolves around.

  1. Finding a Cheap Electricity Source
  2. Maximum Utilization of Renewable Energy Sources
  3. Energy Trading among Producers, Consumers, and Prosumers
  4. To Avoid Sudden Power Outages

Now these are the important factors around which Ibraheem conducted extensive research called Peer-to-Peer Energy Trading in Microgrid. So far, I’ve given an overview of what the research looks like. During the research, a system is designed on MATLAB Simulink, Arduino IDE with a bunch of electronics and electrical components. The goal is to design a microgrid using IEEE 9 bus bar system. For those who do not know what the IEEE 9 bus bar system is, for them it is a power system in which there are 3 power sources and 3 electrical loads connected to one another through a network of 9 electrical buses. Once the microgrid is designed, the next goal is to do energy trading among them at a price and energy availability condition that is both cheaper and more reliable for the consumer.

Microgrid Model is designed in MATLAB in which the original power sources of IEEE 9 bus bar system were replaced with a solar power source, a wind turbine power source, and a generator. The functional system is designed for 220Vs of power output and high voltages were neglected in the model design. The model was designed for maximum 1killo-watt power.

Energy Trading system is the key concept in the entire research design. The peers are actually the prosumers of energy in the microgrid model; the one power source and one electrical load are prosumers of one another. The whole idea of the energy trading is that the prosumers will generate and utilize their own electricity and will trade it with other prosumers when their electricity is not enough to run their electrical load for a certain period of time. Moreover if one prosumer is selling energy at higher price then the other hence the energy trading algorithm will automatically shifts towards the prosumer of cheap electricity which will also provide electricity for a certain period of time.

This energy trading mechanism among three peers will ensure the 24-hour availability of cheap electricity that is generated and regulated from renewable energy sources. This allows every prosumer connected in microgrid network to get cheap and reliable electricity.

Further research is available in the research paper and the 100-page research thesis and I want you to read in depth about how the entire system work.