Contact Us  |  Search  
The National Academies of Sciences, Engineering and Medicine
Partnerships for Enhanced Engagement in Research
Development, Security, and Cooperation
Policy and Global Affairs
Home About Us For Applicants For Grant Recipients Funded Projects Email Updates
Cycle 5 (2015 Deadline)

Seamless solar PV integration in Moroccan buildings

PI: Mounir Ghogho (, International University of Rabat
U.S. Partner: Paul Flikkema, Northern Arizona University
Project Dates: December 2016 - November 2019

Project Overview:

A high density of installed photovoltaic (PV) systems poses grid integration challenges. Excessive ramps and peaks of the injected PV power into low-voltage grids are some of the most important challenges that may destabilize the grid and even cause blackouts. The penetration of PV in buildings in Morocco is still very low. The potential for roof-mounted PV power generation in Morocco has been estimated to each 10TWh, representing 40% of the country's total electricity consumption. Despite this high potential, there are two main obstacles to the uptake of PV in buildings, the first being the capital investment cost, as no financial incentives are offered yet by the government, and the second being the conservative attitude of the national electricity utility company toward PV injection in the low-voltage grid.

To optimally design a battery-supported PV system, realistic household load profiles in Morocco must be used. The general objectives of this project are (1) to build a statistically significant dataset of household electricity consumption profiles in Morocco and make it available as open data to the scientific community; (2) to analyze the data using machine learning to assess and classify power quality at the household level; and (3) to develop scientific tools to investigate issues of sizing and operation of residential battery-supported PV systems in Moroccan settings from both the energetic and economic perspectives. Forecast-based control mechanisms will be devised for different scenarios. The results of the project should be of interest to the Moroccan Ministry of Energy and the national electric utility company. The International University of Rabat encourages through its technology transfer unit joint ventures with industry to turn research results into commercial products. The research team will explore this avenue at the end of the project. Overall, through their planned open data platform and outreach activities, the project team aims to contribute to the promotion of clean energy adoption in buildings and the modernization of the Moroccan electric grid.

Summary of Recent Events

During the quarter ending December 2017, the team carried out work that consists of two parts, one on on the modeling of PV systems and the optimization of the acquisition and preprocessing system. And second, on the design and implementation of the acquisition system

The current version of the system under study consist of a micro solar plant for residential purposes which is connected to the electrical grid. The system is composed of four main components: the PV module; the battery; the user's appliances which conform with the load of the system and the grid. The system can be divided into two subsystems: the battery charger and the load feeding system. The core component in the battery charger is the DC-DC converter which controls the current and voltage at the battery. One of the requirements for this DC-DC converter is to ensure that the flow of current goes from the PV Module to battery. To ensure this the voltage at the output of the DC-DC converter must be higher than the open circuit voltage of the battery.

Regarding the load feeding system, the microsolar plant acts as a controlled current source which is connected in parallel to the load and the grid. The current that the microsolar plant generates can be designed in order to reduce the active and reactive power produced by the grid. A reduction in active power benefits the user by reducing is electric bill while a reduction in the reactive power benefits the electricity company by reducing the cost and thus increase the profit for the company (this is due to the fact that residential users only pay for the active power and not for the reactive power). Note that this can attract the attention of possible investors and convince the electricity company to partially subsidize the microsolar plant making it more affordable for the users. Under this scenario the microsolar plant could reduce the electrical bill for residential users while simultaneously increase the profit for electricity companies and reduce the amount of fuel needed.

For the modelling of the system the Pi and his team have produced a more abstract and simple model. Now, the DC/DC converter is modelled as a two port circuit network similar whose mathematical model is similar to that of an AC transformer. In addition the inverter is now modelled as two port switch with three possible configurations which are changed by the user with time. By doing this, the load feeding system is mathematically modelled as a dynamic switched system and due to the abstract models for the DC/DC converter and the inverter our results will be general and will not depend on any particular inverter or DC/DC converter architecture.

Part 2- Design and implementation of the acquisition system: 
Voltage and current signals using NI 9242 and NI 9203 IO modules under FPGA mode: The signals were first generated from a low frequency generator and then measured directly on a resistive load. Then the signals were acquired by the modules mentioned above to be plotted in the RT application. Experiments showed a random phase shift between the voltage and current signals captured. This problem needs to be solved since synchronization between current and voltage signals is crucial to perform power quality monitoring. The team knows that this problem is due to the fact that NI 9242 has a Delta Sigma ADC which takes a period of time to start outputting signals, as opposed to the NI 9203 (SAR ADC) that has no delay. From the Datasheet of the first module, its input delay is equal to: ((40+5/512))/F_s +1.5μs. With F_s is the sampling frequency the module, and 1.5μs is a fixed delay. Unfortunately, that equation fails to compensate the phase difference we are having. Another problem confronted was FIFO memory getting full. This was due to incoherent sampling rates of the two modules. The project team is still in contact with NI Technical Support -USA to find solution for the phase shift.

Codes for extracting features from signals acquired: The time signals (voltage and current) acquired using the FPGA can be accurately represented by extracting specific representative features. Working with features instead of whole signals, will help in minimizing the number of samples and also save time since they’ll be computed inside the cRIO. We chose 4 features: RMS-voltage, RMS-current, Active and reactive powers. Thus, constructing datasets that contain time stamps relevant to the 4 parameters of every household monitored. We chose an extracting frequency of 4Hz (4 Samples of each feature a second) to ensure an accurate representation of the actual time signals. These datasets are TDMS files configured as presented in last report. Having to read data from FPGA, process it and then log it to TDMS files has prompted some problems concerning timing and loss of samples. To overcome this, a producer consumer design pattern was adopted. Data are read and processed in the first loop (Producer), while only logging and file configuration are done in the second loop (Consumer).

Also in this quarter, the PI made a presentation at CNRST - Centre National de la Recherche Scientifique et Technique (Government Institution), where he described his PEER project as well as other ongoing projects. The audience included the Director of CNRST and representatives of 5 universities

In the next 3-6 months, two interns will join the project in February 2018. NI equipment will be purchased to duplicate the optimized prototype.The data acquisition system will be deployed in different households to estimate the electricity consumption profiles and lastly,a workshop on smart grid and solar PV energy will be organised.

Back to PEER Cycle 5 Grant Recipients