GAS NATURAL FENOSA Produces Forecasts for the Electrical Market Using MATLAB

MATLAB used to develop models that enable optimized generation of asset portfolios and reduction of response times from months to weeks


MathWorks today announced that GAS NATURAL FENOSA used MATLAB products to develop models that enable the company to project capacity and demand and optimize generation of asset portfolios. In particular, the company develops optimization and forecasting models that incorporate historical usage patterns, weather forecasts, production costs and regulatory constraints, and other operational factors. As a result, GAS NATURAL FENOSA has doubled staff productivity and can adapt more quickly to regulatory changes, reducing its response time from months to one or two weeks.

GAS NATURAL FENOSA engineers used MATLAB to develop a set of core models that analyze available data, forecast results, and optimize generation plans. Each MATLAB model accesses a central database for historical power consumption and price data, weather forecasts, and parameters for each power plant. Optimization Toolbox  was applied to minimize production cost among several plants given a set of constraints, including carbon caps and maximum capacity. The engineers used Statistics Toolbox to develop and assess price simulation scenarios.

Using MATLAB Compiler, the team created standalone programs from each model that run automatically day and night, enabling the developers to more easily manage updates to the models and access to the models for a variety of end users providing improved management of updates and control of access to models. The team also used Simulink to model the behavior of generators in the GAS NATURAL FENOSA infrastructure.

“Our market changes very quickly, so we need to know how to promptly respond to changes in regulatory standards or in the structure of the electricity industry, as well as to other factors, such as increased production of renewable energy,” said Isaac Pérez, head of the Iberian Electricity Markets Technical Office. “We tried using a commercial software package without development and customization capabilities, but it did not address the numerous problems we needed to solve. In our circumstances, closed systems don’t work well. We needed an open platform that would enable us to develop our own algorithms and computations.”

“A company like GAS NATURAL FENOSA, with a generating capacity in Spain of over 15,000 megawatts and a portfolio of assets including a variety of generating technologies, needs to accurately predict the different variables affecting each of the markets where it operates,” said Juan Nasarre, managing director of MathWorks for Spain and Portugal. “MathWorks tools enable GAS NATURAL FENOSA to detect better business opportunities, reduce generating costs, and therefore improve its sales margin.”

About MathWorks

MathWorks is the leading developer of mathematical computing software. MATLAB, the language of technical computing, is a programming environment for algorithm development, data analysis, visualization, and numeric computation. Simulink is a graphical environment for simulation and Model-Based Design for multidomain dynamic and embedded systems. Engineers and scientists worldwide rely on these product families to accelerate the pace of discovery, innovation, and development in automotive, aerospace, electronics, financial services, biotech-pharmaceutical, and other industries. MathWorks products are also fundamental teaching and research tools in the world's universities and learning institutions. Founded in 1984, MathWorks employs more than 2400 people in 15 countries, with headquarters in Natick, Massachusetts, USA. For additional information, visit

MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.


GAS NATURAL FENOSA is the largest integrated energy company in Spain. GAS NATURAL FENOSA is one of the leading multinational companies in the gas and electricity industry. It operates in 23 countries and has over 20 million customers. With the acquisition of the Unión Fenosa electricity company, the third largest company in the Spanish market, GAS NATURAL FENOSA has achieved its aim of integrating the gas and electricity businesses into a single company with wide-ranging experience in the energy industry, capable of competing efficiently in markets that are subject to increasing integration, globalization, and rising competition. It is the biggest integrated gas and electricity company in Spain and Latin America, the leader in natural gas sales on the Iberian Peninsula, the third biggest LNG operator in the world with a fleet of 13 LNG tankers, and the main supplier of LNG in the Mediterranean and Atlantic basins. The company has a competitive generating mix, made up of a variety of technologies that total 15.6 GW of installed capacity.