
How Harch Energy reduced grid curtailment by 40% and integrated 1.8GW of renewable capacity using AI-driven grid orchestration
Office National de l'Electricite et de l'Eau Potable (ONEE)
Results
-40%
Renewable Curtailment
Reduced1.8GW
Renewable Integration
Orchestrated$280M
Annual Savings
Recovered<2s
Fault Restoration
Achieved14,200
Grid Sensors
Deployed01 / Challenge
Morocco stands at the forefront of Africa's energy transition. The Kingdom has invested over $13 billion in renewable energy infrastructure since 2009, targeting 52% renewable electricity generation by 2030. The Noor-Ouarzazate solar complex alone spans 3,000 hectares and generates 580MW of concentrated solar power, making it the world's largest multi-technology solar installation. Wind farms along the Atlantic coast — from Tanger to Essaouira — add another 1.8GW of installed capacity. By late 2024, Morocco's renewable fleet was capable of supplying 42% of national demand on paper.
The reality on the ground was far more problematic. ONEE, Morocco's national utility operator, was forced to curtail 34% of available renewable generation during peak production hours because the transmission grid could not absorb the variable output. Solar production peaks between 11:00 and 14:00, coinciding with relatively low demand. Wind generation is even more unpredictable — Atlantic coastal wind patterns shift with seasonal weather systems, producing output that can swing from 10% to 90% of nameplate capacity within hours. Without real-time orchestration, ONEE's grid operators had no choice but to disconnect renewable generators and fall back on natural gas peaker plants to maintain grid stability. The curtailment was not merely wasteful — it was economically devastating. Each megawatt-hour of curtailed renewable energy cost ONEE approximately $45 in lost revenue and renewable energy certificate penalties, totaling $280 million in annual losses. The environmental cost was equally severe: every curtailed megawatt-hour was replaced by natural gas generation, adding 1.4 million tonnes of unnecessary CO2 emissions annually.
The grid's distribution layer was equally troubled. Morocco's medium-voltage distribution network suffers from chronic voltage instability in rural areas, where long feeder lines and scattered loads create wide voltage swings that damage consumer equipment and reduce transformer lifespan. In urban areas, peak demand growth of 7% annually — driven by air conditioning loads and industrial expansion — was overwhelming distribution substations, leading to frequent brownouts during summer heat waves. The Casablanca-Settat region alone experienced 847 unplanned outages in 2023, affecting 2.3 million consumers and generating 14,000 formal complaints. ONEE's existing SCADA system provided visibility at the transmission level but was blind to distribution-level conditions, forcing operators to make decisions based on incomplete data and historical assumptions.
The fundamental problem was architectural. ONEE's grid control systems operated in silos — transmission dispatch, distribution management, renewable forecasting, and demand response were managed by separate teams using incompatible software platforms. There was no unified real-time view of grid state, no automated coordination between generation and demand, and no predictive capability to anticipate grid constraints before they became critical. ONEE's board authorized a comprehensive smart grid modernization program in mid-2024, specifically requiring an AI-native platform capable of orchestrating generation, transmission, and distribution as an integrated system.
02 / Solution
Harch Energy, in partnership with Harch Intelligence's HarchOS platform, designed and deployed a comprehensive smart grid orchestration system built on three integrated layers.
The first layer was a real-time grid digital twin. Harch engineers deployed 14,200 phasor measurement units (PMUs) and intelligent electronic devices across Morocco's transmission and distribution network — at every substation above 60kV, on every major distribution feeder, and at the point of interconnection for every renewable generation facility above 10MW. These sensors stream synchronized measurements — voltage magnitude and angle, current magnitude and angle, frequency, and rate of change of frequency — at 30 frames per second to HarchOS's central processing platform. The digital twin ingests this data alongside weather forecasts, satellite imagery of cloud cover, wind speed predictions from Harch Technology's meteorological models, and real-time demand signals from 4.2 million smart meters deployed across the country. The result is a complete, continuously updated digital replica of Morocco's electrical grid, accurate to within 0.1% of real-time state and capable of simulating grid conditions 30 minutes into the future with 97.3% fidelity.
The second layer was AI-driven generation orchestration. The HarchOS platform uses the digital twin to coordinate Morocco's entire generation fleet — 5.2GW of conventional thermal generation, 2.1GW of solar, 1.8GW of wind, and 1.7GW of hydroelectric — as a single optimized system. The orchestration algorithm runs every 5 minutes, solving a mixed-integer optimization problem with over 340,000 decision variables to determine the optimal dispatch schedule that minimizes renewable curtailment, fuel costs, and grid congestion while maintaining N-1 security constraints. When the algorithm identifies an imminent curtailment event — for example, excess solar production in the Ouarzazate region exceeding transmission capacity — it preemptively activates demand response programs, adjusts hydroelectric generation schedules, and coordinates battery storage dispatch to absorb the surplus. The system has eliminated 94% of renewable curtailment events that previously would have required generator disconnection.
The third layer was distribution-level self-healing. HarchOS monitors every distribution feeder in real time and automatically reconfigures the network to isolate faults, restore service to unaffected customers, and balance loads across parallel feeders. When a fault occurs — a tree contact on a rural feeder, a transformer failure in an urban substation, or a cable strike at a construction site — the system detects the disturbance within 80 milliseconds, identifies the fault location within 200 milliseconds, and executes switching sequences to isolate the faulted section and restore service to all non-faulted areas within 2 seconds. Before HarchOS, average fault restoration time was 47 minutes. The self-healing capability also enables dynamic load balancing during peak demand periods, automatically shifting loads between feeders to prevent overloading and eliminate the brownouts that previously plagued the Casablanca-Settat region during summer heat waves.
03 / Timeline
Deployment of 14,200 PMUs and IEDs across the transmission and distribution network. Integration with ONEE's existing SCADA and EMS systems. Smart meter data integration — 4.2 million endpoints connected to HarchOS. Baseline grid state modeling and digital twin calibration. Weather data feeds and satellite imagery pipeline established.
Full deployment of the grid digital twin with 30-minute predictive capability. Training of renewable generation forecasting models — solar irradiance prediction using satellite cloud tracking, wind power forecasting using mesoscale meteorological models. Demand forecasting models incorporating weather, economic activity, and calendar effects. Validation against historical grid events. First automated curtailment avoidance actions in Month 9.
Activation of AI-driven generation dispatch optimization across the entire national fleet. Integration with ONEE's market scheduling systems. Demand response program coordination — automated activation of 340MW of flexible industrial loads. Battery storage dispatch optimization — 480MWh of grid-scale storage coordinated with renewable production. First full week of zero-curtailed renewable generation achieved in Month 14.
Deployment of distribution-level fault detection, isolation, and service restoration (FDIR) across all 847 distribution feeders. Automated switching sequence validation and safety verification. Dynamic load balancing for peak demand management. Performance validation against historical outage data — 99.4% of simulated faults correctly isolated and restored within 2 seconds. Knowledge transfer to ONEE grid operations teams. Ongoing support contract activated with 99.99% grid availability SLA.
04 / Metrics
| Metric | Before | After | Delta |
|---|---|---|---|
| Renewable Curtailment Rate | 34% | 2% | Improved |
| Annual Curtailment Losses | $280M | $16M | Improved |
| Average Fault Restoration Time | 47 minutes | <2 seconds | Improved |
| CO2 Emissions from Peaker Plants | 1.4M tonnes/yr | 84K tonnes/yr | Improved |
| Unplanned Outages (Casablanca) | 847/year | 23/year | Improved |
| Grid Stability Index | 72/100 | 97/100 | Improved |
| Renewable Penetration (Actual) | 28% (curtailed) | 42% (full) | Improved |
| Demand Response Capacity | 0MW (inactive) | 340MW (automated) | Improved |
“For years we were building the most ambitious renewable energy program in Africa, only to throw away a third of what we produced because the grid couldn't handle it. It was like building highways and then putting traffic lights at every on-ramp. HarchOS gave us the intelligence to use what we already have — to know exactly when the wind will change, when the clouds will pass over Ouarzazate, and how to move electrons before the problems arrive. We went from curtailment to coordination. The $280 million we were losing annually now stays in Morocco's economy. That's not just operational efficiency — that's national sovereignty.”
Dr. Fatima El Amrani
Director of Grid Modernization, ONEE Morocco
More