Simulation and Modelling of Electricity Usage Control and Monitoring System using ThingSpeak

Main Article Content

Nurhazwani Anang
Mohammad Safwan AB Hamid
Wan Mariam Wan Muda


Renewable energy technology is growing fast especially photovoltaic (PV) system to move the conventional electricity generation and distribution towards smart grid. However, similar to monthly electricity bill, the PV energy producers can only monitor their energy PV generation once a month. Any malfuntion in PV system components may reduce the performance of the system without notice. Thus, developing a real-time monitoring system of PV production is very crucial for early detection. In addition, electricity consumption is also important to be monitored more frequently to increase energy savings awareness among consumers. Hardware based Internet-of-Thing (IoT) monitoring and control system is widely used. However, the implementation of the actual smart grid system is high in cost. Thus, simulation and modelling of the system is important to see the capability of the actual system before being employed. Since the smart grid and its components are usually modeled using MATLAB/Simulink, the communication between MATLAB/Simulink, IoT platform such as ThingSpeak and mobile application is crucial to be explored to gain a better understanding of the features of the smart grid. To achieve the objectives, there are five main steps which are simulation of grid-connected photovoltaic (PV) system to generate data to be monitored and controlled using HOMER software, then, development of monitoring on ThingSpeak and mobile application using MIT App Inventor 2.  Next, the control system is developed on mobile application and the communication on how data are transferred between all the softwares are set up. The results show that all the seletected parameters can be monitored in real-time successfully. The developed mobile application can be used to control the MATLAB/Simulink in two modes. During automatic mode, ThingSpeak controls the MATLAB/Simulink by giving a zero signal (OFF) if load demand is less than the power generated by PV and a one signal (ON) if the load demand is greater than PV power. During manual mode, consumer can send ON or OFF signal to MATLAB/Simulink via the mobile application unconditionally. It is hoped that the proposed system will bring many benefits in modeling a complete smart grid system in MATLAB/Simulink.


Download data is not yet available.

Article Details

How to Cite
Anang N, Hamid MSA, Muda WMW. Simulation and Modelling of Electricity Usage Control and Monitoring System using ThingSpeak. Baghdad Sci.J [Internet]. 2021Jun.20 [cited 2021Aug.3];18(2(Suppl.):0907. Available from:


Agency IE. 2020.

Jamasb T, Nepal R, Timilsina GR. A Quarter Century Effort Yet to Come of Age: A Survey of Electricity Sector Reform in Developing Countries. The Energy Journal. 2017;38(3),195–234.

Asaad M, Ahmad F, Alam, MS, Sarfraz M. Smart grid and Indian experience: A review. 2019.

Dileep G. A survey on smart grid technologies and applications. Renewable Energy. 2020;146,2589–2625.

AbdelHady R. Modeling and simulation of a micro grid-connected solar PV system. Water Science. 2017;31(1), 1–10.

Jansen G, Dehouche Z, Bonser, R, Corrigan H. Validation of autonomous renewable energy hybrid wind/photovoltaic/RHFC prototype for the cell tower industry using MATLAB/Simulink. Materials Today: Proceedings. 2019;10,408–418.

Kabalci Y, Kabalci E. Modeling and analysis of a smart grid monitoring system for renewable energy sources. Solar Energy. 2017;153, 262–275.

Kolhe ML, Rasul MJMA. 3-Phase grid-connected building integrated photovoltaic system with reactive power control capability. Renewable Energy. 2020;154,1065–1075.

Ortiz L, Orizondo R, Águila A, González JW, López GJ, Isaac I. Hybrid AC/DC microgrid test system simulation: grid-connected mode. Heliyon. 20195;12.

Thingspeak @ www.Mathworks.Com. (n.d.).

Bagdadee AH, Hoque MZ, Zhang L. IoT Based Wireless Sensor Network for Power Quality Control in Smart Grid. Procedia Computer Science. 2020;167,1148–1160.

Deshmukh MNS, Bhuyar PDL, Jadhav P AT. Review on IoT Based Smart Solar Photovoltaic Plant Remote Monitoring and Control Unit. 2018;3(3), 6–10.

Rokonuzzaman M, Shakeri M, Hamid FA, Mishu MK, Pasupuleti J, Rahman KS, Tiong SK, Amin N. Iot-enabled high efficiency smart solar charge controller with maximum power point tracking—design, hardware implementation and performance testing. Electronics (Switzerland). 2020;9(8), 1–16.

Shun WG, Muda WMW, Hassan WHW, Annuar AZ. Wireless Sensor Network for Temperature and Humidity Monitoring Systems Based on NodeMCU ESP8266. In Communications in Computer and Information Science. 2020;1132.

Forcan M, Maksimović M. Cloud-Fog-based approach for Smart Grid monitoring. Simulation Modelling Practice and Theory. 2020;101.

SEDA. Feed-in tariff (FiT) in Malaysia. Draft Prepared Specifically for Distribution at a PESD Seminar: “The Experience of Independent Power Producers in Developing Countries”:Stanford University, June 2-3,2005. 2012

Majeed Butt O, Zulqarnain M, Majeed Butt T. Recent advancement in smart grid technology: Future prospects in the electrical power network. In Ain Shams Engineering Journal. Ain Shams University. 2020.

Kusch-Brandt. Urban Renewable Energy on the Upswing: A Spotlight on Renewable Energy in Cities in REN21’s “Renewables 2019 Global Status Report.” 2019;8(3).

Ramakrishna S, Singh SN. Monitoring system for photovoltaic plants : A review. 2017;67,1180–1207.

Truong P, Tsai H, Hien T. A wireless visualization monitoring , evaluation system for commercial photovoltaic modules solely in MATLAB / Simulink environment. Solar Energy. 2016;140,1–11.

Li T, Ren J, Tang X. Secure Wireless Monitoring and Control Systems for Smart Grid and Smart Home. 2012;66–73.

Sibiya CA, Kusakana K, Numbi BP. TRU Energy Monitoring for Potential Cost Saving in Electricity Bills for Cathodic Protection Units : South African Case. 2020;1–6.

Fortes F, Fialho V. Smart Energy Meter for Iot Applications:September 2019. 2020.

Alduailij MA, Petri I, Rana O, & Alduailij MA. Forecasting peak energy demand for smart buildings. The Journal of Supercomputing. 2020.

Hua D, Huang F, Wang L, Chen W. Simultaneous disaggregation of multiple appliances based on non-intrusive load monitoring. Electric Power Systems Research. 2021;106887.

Prabowo AS, Sudjoko RI. The electrical energy usage of monitoring system at real-time using IoT as the primary policy of energy efficiency. 2020.

Salisu A, Bugaje A, Loko AZ. IOT Based Household Electricity Energy Monitoring and Control. FUDMA Journal of Sciences. 2020;4(4),77–84.

Kusakana K. Energy monitoring for potential cost saving in electricity bills energy monitoring for potential cost saving in electricity bills in a microbrewery in South Africa. 2020.

Manzoor S, Iqbal T. IoT based Renewable Energy Management and monitoring system for the Frist Passive House in Newfoundland. 2020.

Tavarov SS, Sidorov AI, Kalegina YV. Model and Algorithm of Electricity Consumption Management for Household Consumers in the Republic of Tajikistan. Mathematical Modelling of Engineering Problems. 2020;7(4),520–526.

Selladurai R, Baranilingesan I. Implementation of IOT Based Smart Energy Management System in College Campus Implementation of IOT Based Smart Energy Management System in College Campus. 2020.

Ashok A, Hahn A, Govindarasu M. Cyber-physical security of wide-area monitoring, protection and control in a smart grid environment. Journal of Advanced Research, 2014;5(4),481–489.

Talaat M, Alsayyari AS, Alblawi A, Hatata AY. Hybrid-cloud-based data processing for power system monitoring in smart grids. In Sustainable Cities and Society. Elsevier Ltd. 2020;55.

Bhagyashree M, Tapakire A, Patil MM. IoT based Smart Agriculture using Thingspeak. International Journal of Engineering Research and Technology (IJERT). 2019;8(12),270–274.

Sorongan E, Hidayati Q, Priyono K. ThingSpeak sebagai Sistem Monitoring Tangki SPBU Berbasis Internet of Things. 2018;3(2), 219–224.

Pasha S. Thingspeak Based Sensing and Monitoring System for IoT with Matlab Analysis. 2016;6,19–23.

Kyawt K, Khaing K. Temperature and Humidity Monitoring and Control System with Thing Speak Abstract. 2019;2(5),6–11.

Deekshath R, Dharanya P, Kabadia D, Dinakaran D. IoT Based Environmental Monitoring System using Arduino UNO and Thingspeak. 2018;4(9),68–75.

Dabbakuti JRKK, Ch B. Ionospheric monitoring system based on the Internet of Things with ThingSpeak. Astrophys Space Sci. 2019;1–7.

Hussain JS. Smart Surveillance System using Thing Speak and Raspberry Pi. 2015;September.

Amirul M, Razali A, Kassim M, Sulaiman NA, Saaidin S. A ThingSpeak IoT on Real Time Room Condition Monitoring System. 2020;206–211.

Raju L, Gokulakrishnan S, Muthukumar, Pr R, Jagannathan S, Morais AA. IOT based Autonomous Demand Side Management of a Micro-Grid using Arduino and Multi Agent System. 2017;44–49.

Papadakis S, Kalogiannakis M, Orfanakis V, Zaranis N. The appropriateness of scratch and app inventor as educational environments for teaching introductory programming in primary and secondary education. International Journal of Web-Based Learning and Teaching Technologies. 2017;12(4), 58–77.

Kowalczyk R, Turczyński Ł, Żyła K. Comparison of App Inventor 2 and Java in Creating Personal Applications for Android on Example of a Notepad. Advances in Science and Technology Research Journal. 2016;10(31),247–254.

Pokress SC, Veiga JJD. MIT App Inventor: Enabling Personal Mobile Computing. October 2013;2–5.

HOMER Pro - Microgrid Software for Designing Optimized Hybrid Microgrids. (n.d.).