## Featured Tip From Engineering:

The **spaghetti (Sankey) diagram** depicts the energy flows and technologies that can be modeled in the **screening, conceptual, and basic technical design** levels of the XENDEE optimization engine (XENOPT).

*The diagram depicts Energy flows (arrows), technology options (boxes), as well as demands in XENDEE (far right).*

Typically, we define a range of distinct loads that need to be served on a given site for a typical year. Time-steps can vary from 1 hour to minutes. For example, it is beneficial to define cooling loads separately from the “electricity-only” loads (e.g. computing or lighting) since cooling loads can be served by multiple energy carriers, which is not true for “electricity-only” as the name says. Cooling could be served by electricity and a traditional electric chiller, waste heat from a Combined Heat and Power (CHP) unit in combination with an absorption chiller, or solar cooling. XENOPT will find the optimal set of energy flows for you, delivered by the optimal combination of assets considering the project objectives.

To achieve these optimal solutions we provide constraints and objectives to XENDEE. Examples of constraints are the utility rates that we specify for the optimization window, minimum renewable generation constraint or land-usage constraints for PV. The objective function specifies our goals: Do we want to minimize costs or CO2, increase resiliency or maybe a combination of all three? We just give the XENDEE optimization the boundaries in which it can operate and an objective. With that information, the XENDEE optimization engine (XENOPT) will find a) the optimal operational schedule and b) the optimal investment capacity for each considered technology as specified by the Sankey diagram.

The different colored arrows in the Sankey diagram represent energy flows from each technology, or energy provider flowing to the demand, providing an overall energy balance. These energy flows can change in every time step, e.g. changes in load, irradiance, and time of use pricing structure. Determining the optimal flow of energy for each timestep simultaneously will provide the solution with the lowest overall cost, and thus the best possible operation. Importantly, operation instructions optimized for one day might not work the next, and the system should respond dynamically to capture the most value. Therefore assuming certain operational rules, such as charging the battery at preset time periods, will by definition produce sub-optimal results since a rule which might be valid for a sunny day will likely be invalid for an overcast one, especially when other Distributed Energy Resources (DER) technologies are involved. Thus, a smart dispatch algorithm can drastically improve project feasibility by responding to these dynamic requirements.

A good example is observed with Combined Heat and Power (CHP) Generators which produce electricity and heat at the same time. Due to electricity rates and weather driven demand changes across the year, in one month it might be economically attractive to generate as much electricity as possible, sell the electricity to the utility and even dump some of the heat. However, at different times it might be better to not sell electricity and use all energy onsite. Thus, the interplay between the heating and electricity dispatch changes dynamically responding to the energy landscape and must be optimized in the design process to obtain the best project payback.

**Example #1**: Optimal Operational Schedule for a Winter Day in which the Battery is charged by the CHP System (Blue Bars) and Battery (Green Bars) is used at the same Time when the PV System (Yellow Bars) is Operational. All Energy is used Onsite. Observe the Optimal Charging Times for the Battery from 3 AM to 6 AM.

**Example #2**: Optimal Operational Schedule for a Summer Day in which the CHP System (Blue Bars) now also Sells Electricity to the Utility due to favorable Sales Prices (Hashed Blue Bars above the Black Line). Observe the Changed Optimal Charging Times for the Battery from 3 AM to 9 AM.

How does the XENDEE optimization do that? It ‘tests’ all the possible combinations (sometimes millions of them) in a smart way by utilizing Mixed Integer Linearized Optimization techniques. For example, if we assume a cost minimization objective, it will consider investment costs, fuel costs, maintenance costs, as well as sales and subsidies for each technology (we will explain these cost parts in another newsletter in more detail). The key is that it builds the combination of all possible operational points of the considered technologies and determines the operation which produces the absolute lowest costs considering the constraints specified. Thus, a technology that performs poorly on an operational level due to limited solar radiation or low efficiencies will show high fuel costs and might lead to an unfavorable investment decision for that technology.

Traditional approaches do not determine the optimal dispatch or operational level and the user has to specify them and this creates sub-optimal solutions.

If you are more interested in learning more about XENDEE's Optimized dispatch, please watch the following videos: