Function of Programmable Controls
The components of the Programmable Control are used to represent own mathematical equations for boundary conditions and calculations.
Use cases are, for example, forcing or preferring own operation modes, integrating storages, avoiding peak loads, or also modeling special constraints, such as the consideration of mixing temperature specifications.
Among other things, Calculations components, such as for Division or Sum; Logical Operators, such as Or and And; as well as Relational Operators and if-Branches are available for modeling.
The following tutorials demonstrate how programmable controls work:
Placing Components
The mathematical relationships are stored in the energy system model via the graphical program interface. To do this, place the components of the Programmable Control on the scheme and connect the pins (see following example).
You can place the controls directly on the Simulator scheme (see following figure) or on a separate Control scheme.
Create a separate control scheme in the Home ribbon with the Add -> Control scheme button. The Control scheme is displayed in the Project explorer below the Simulation node above the simulator Scheme (see following figure).
Types of Variables
Two basic classes are distinguished in the control components:
In both classes there are also two types of variables:
The variables differ in pin and net representation (see following figure).
The names of the component templates in the component library contain the abbreviation -A for algebraic, e.g., Fixed_Value_Input-A, or –L for linear.
Algebraic
Well-defined (also non-linear) systems of equations can be formed and calculated with the help of the algebraic control components. You can use these systems of equations to perform your own calculations “before” or “after” the simulation.
For example, the input parameter Efficiency of a component can be calculated by specifying the ambient temperature in the component Fixed_Value_Input-A and the Characteristic_Curve-A with the control “before” the simulation (see following figure).
Another use case of algebraic controls is the modeling of own result variables “after” the simulation. For example, you can use the controls to calculate a self-defined key figure “after” the simulation from different output data of the components.
Linear
In contrast to the algebraic control components, the linear controls are used to formulate direct mathematical relationships—including inequalities—for the optimization calculation that is performed as the core of the simulation.
With the linear controls, you model systems of equations with degrees of freedom that are optimized in the simulation based on the selected objective function.
In the linear controls, you can model existing decision variables of the optimization problem, such as the capacity of a plant, as well as your own decision variables or objective function contributions.
In the following simple example, the decision variable Power-L CHP (thermal) in the linear control is set greater than or equal to the fixed value of 20 kW.
Because the decision variable Power-L CHP must be greater than or equal to 20 kW in each time step and all powers below 20 kW are excluded, this control restricts the solution space of the optimization problem. The capacity of the CHP is determined in the optimization calculation during the simulation based on the objective function (e.g., operating costs).
If this requirement is ignored, the message “The linear optimization problem does not have an optimum. … Please check whether the generation capacities are sufficient for the energy demand.” (ID 8355) appears in the Simulator window. This would be the case, for example, if with the programmable controls the decision variable Power-L CHP (thermal) in the linear control is set greater-than or equal to the fixed value of 20 kW, but the CHP cannot deliver this capacity at any time during the simulation because the heat produced cannot be absorbed by the system or there is no emergency cooler. In this case, the boundary condition modeled with the controls cannot be met and the solution space is empty.
Combination of Algebraic and Linear Controls
In modeling, algebraic controls are often combined with linear controls (see following figure).
The component templates for converting the different variable types are located in the Type Conversion subfolder.
In the example above, make sure that the algebraic values passed during the conversion from algebraic to linear (in the figure on the left) are available or are directly computable “before” the simulation.
The calculated results of the algebraic control components “behind” the linear controls (in the example on the right side) must not be coupled with input data of components.
The reason for these rules is the calculation sequence of the simulator, which calculates the controls starting from the left, as in the system shown above: first the algebraic system “before” the linear system, then the linear system of equations, and then the algebraic system “after” the linear controls.
Coupling With the Energy System Model
The coupling of energy system and control is realized via control components from the Input-Output folder. In order to ensure the unrestricted calculation of different parameters, the numbers in all controls are basically unitless. The units from the input and output components are removed after the associated values are converted to the default unit shown on the component’s symbol. For example, the control of the Power_Input-A component, whose default unit is kW, calculates with the unitless value 1000 for the connected parameter nominal capacity of the CHP of 1 MW.
Coupling of Linear Variables
A distinction is also made between linear and algebraic variables for the input and output components.
For the linear variables, there are four components for coupling with the energy system. These are not divided into input and output components.
The Power-L component can be used to access the power of a plant. Equivalently, the Mass_Flow-L component can be used to access the steam mass flows of the components from the steam supply folder.
The component On_Off-L can refer to controllable plants and provides a linear boolean variable that can switch the respective plant on or off with 0 or 1. The component Storage_Filling-L can be linked to storages of the energy system. Basically, the sign of the coupled linear variable is positive.
Coupling of Algebraic Variables
In contrast to the linear components, Input- and Output components for different parameters or units are available for algebraic variables. For example, the Power_Input-A component can be used to access values with the unit kW.
The input components (e.g., Power_Input-A) can be used to import parameters from the energy system into the system of control components. In contrast, the algebraic output components are used to transfer a calculated value from the controls into a component of the power system model.
In the Variables form of the control component, select the Component and Connection Input or Output to link the input or output component (see following figure).
When using the respective input and output components, attention must be paid to the calculability of the system (see above).








