HOMER Tip: Creating a Custom Controller in HOMER Grid with MATLAB Link

HOMER Grid now allows users to create and simulate different dispatch algorithms using MATLAB. The new feature was released as part of HOMER Grid v. 1.7 and is packaged with the software at no additional cost.

With the new feature, users can override the default controller algorithm in HOMER Grid and test the impact of different dispatch algorithms for solar PV, wind, batteries or grid power – which should serve electric loads and when.

The default controller built into HOMER Grid analyzes demand charges and prioritizes systems that shave expensive peak energy costs. It balances self-generation with grid power for each system that is modeled and determines the solution with the best financial outcome. The software calculates multiple factors such as future utility rates, battery performance and electricity production from renewable resources.

Using the new MATLAB link feature, HOMER Grid users can override the default priorities in HOMER Grid. This could be used – for example – to simulate a system where the battery always charges during the afternoon and always discharges during the night, or to accommodate contractual obligations and local regulatory requirements. 

To Use MATLAB in HOMER Grid:

In order to program your own controller, you will need a MATLAB license. You will use MATLAB script and enter your code manually (to help you, we provide functions to use in the HOMER Grid manual – see below). In HOMER Grid choose the “Controller” tab, and then MATLAB Link in the dropdown menu. When you create your controller in HOMER Grid, the setup page should look like this:

Please visit the HOMER Grid User Manual for detailed instructions on how to create your own dispatch strategy using MATLAB. HOMER Grid’s user manual provides extensive documentation, describing 250 energy related simulation parameters you can use. 

Visit the HOMER Grid User Manual to see MATLAB simulation parameters

When you are ready to run your simulation, HOMER Grid will take account of your controller in the simulation results. Exercise caution because a custom controller gives you the power to create a dispatch strategy that will override HOMER Grid’s default controller and along with that, its economically optimized results.


UL Solutions HOMER Grid is a market-leading solar-plus-storage software tool for designing grid-tied distributed energy systems. With an integrated utility tariff database and a new module for electric vehicle charging stations, it optimizes peak shaving to help commercial and industrial utility customers lower their demand charges. HOMER Grid can model projects with wind and combined heat and power as well as islanded systems, helping users improve their resiliency. Explore your opportunities with HOMER Grid during a complimentary trial. Learn more and download your complimentary trial.


Post a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.