Most of the state-of-the-art building simulation programs implement models in imperative programming languages. This complicates modeling and excludes the use of certain efficient methods for simulation and optimization. In contrast, equation-based modeling languages declare relations among variables, thereby allowing the use of computer algebra to enable much simpler schematic modeling and to generate efficient code for simulation and optimization.

We contrast the two approaches in this paper. We explain how such manipulations support new use cases. In the first of two examples, we couple models of the electrical grid, multiple buildings, HVAC systems and controllers to test a controller that adjusts building room temperatures and PV inverter reactive power to maintain power quality. In the second example, we contrast the computing time for solving an optimal control problem for a room-level model predictive controller with and without symbolic manipulations. Exploiting the equation-based language led to 2200 times faster solution.

10aEquation-based modeling10amodelica10aMulti-physics simulation10aOptimal control10asmart grid1 aWetter, Michael1 aBonvini, Marco1 aNouidui, Thierry, Stephane uhttps://energyanalysis.lbl.gov/publications/equation-based-languages-new-paradigm02278nas a2200241 4500008004100000022001300041245011200054210006900166260001200235300001400247490000800261520146200269653002201731653002501753653003401778653003101812100001901843700002201862700002401884700002001908700002201928856008601950 2014 eng d a0306261900aRobust on-line fault detection diagnosis for HVAC components based on nonlinear state estimation techniques0 aRobust online fault detection diagnosis for HVAC components base c07/2014 a156 - 1660 v1243 aThis work presents a robust and computationally efficient algorithm for both whole-building and component-level energy fault detection and diagnosis (FDD). The algorithm is able to provide reliable estimation of multiple and simultaneous fault conditions, even in the presence of noisy and sometimes erroneous sensor data, and to provide uncertainty estimation. The algorithm can be used to provide such outputs as the probability of a fault, the likely cause(s), and the expected consequences of the fault(s) on energy use. The approach is based on an advanced Bayesian nonlinear state estimation technique called *Unscented Kalman Filtering*, but with our addition of a back-smoothing method that provides fast and robust FDD for common building use cases. The approach is presented and demonstrated for detecting energy and hydraulic faults in a chiller plant. The model of the chiller plant is a subsystem of an actual chiller plant, calibrated to real data. The algorithm can detect common faults, such as (1) energy faults (e.g., the chiller is not working properly, or far from its nominal condition), (2) functional faults caused by issues in the compressor and (3) occlusions in the valves that may reduce the water flow rate through the condenser and evaporator water loop. It is also shown that estimates of uncertainty are consistent with the error in the synthetic data, and can be updated as new data stream in from sensors.