Package: aixcalibuha
AixCaliBuHAAix(from French Aix-la-Chapelle)Calibration forBuilding andHVAC SystemsThis framework attempts to make the process of calibrating models used in Building
and HVAC Systems easier.Key featuresPerforming aSensitivity Analysisto discover tuner parameters for the calibrationCalibrationof a given model based on the tuner parameters, the calibration classes and specified goals to evaluate the objective function of the underlying optimizationInstallationTo install, simply runpip install aixcalibuhaIf you encounter an error with the installation ofscikit-learn, first installscikit-learnseparately and then installebcpy:pip install scikit-learn
pip install aixcalibuhaIf this still does not work, we refer to the troubleshooting section ofscikit-learn:https://scikit-learn.org/stable/install.html#troubleshooting. Also checkissue 23for updates.In order to help development, install it as an egg:git clone --recurse-submodules https://github.com/RWTH-EBC/AixCaliBuHA
pip install -e AixCaliBuHAFramework structureThe core idea and motivation ofAixCaliBuHAis described in thepaper.
The following image illustrates the overall toolchain automated byAixCaliBuHA.At the core ofAixCaliBuHAlays the definition of data types, that link the python data types to the underlying optimization problem and are used for all subsequent steps.
This image below illustrates this. For more information, check thepaperand the subsequent section on how to get started.How to get started?We differ this section into two parts. How to get started with the theory of calibration and how to get started with using this repo.How can I calibrate my model?While we aim at automating most parts of a calibration process, you still have to specify the inputs and the methods you want to use.
We therefore recommend to:Analyze the physical system and theoretical model you want to calibrateIdentify inputs and outputs of the system and modelGet to know your tuner parameters and how they affect your modelPlan your experiments and perform themLearn about the methods provided for calibration (statistical measures (RMSE, etc.), optimization, ...)Always be criticalabout the results of the process. If the model approach or the experiment is faulty, the calibration will perform accordingly.How to start with AixCaliBuHa?We have three services in place to help you with the setup ofAixCaliBuHa. For the basics on using this repo, we recommend the Jupyter Notebook.
If you want to setup your calibration models (in Modelica) and quickly start your first calibration, we provide a guided setup.Jupyter NotebookWe recommend running our jupyter-notebook to be guided through ahelpful tutorial.For this, run the following code:# If jupyter is not already installed:
pip install jupyter
# Go into your ebcpy-folder (cd \path_to_\AixCaliBuHA) or change the to the absolute path of the tutorial.ipynb and run:
jupyter notebook AixCaliBuHA\examples\tutorial.ipynbExamplesClone this repo and look at the examples\README.md file.
Here you will find several examples to execute.VisualizationWe provide different plots to make the process of calibration clearer to you. We will go into detail on the different plots, what they tell you and how you can enable/disable them. We refer the plot names with the file names they get.objective_plot:What do we see?The solver in use was "scipy_differential_evolution" using the "best1bin" method. After around 200 iterations, the solver begins to converge. The last 150 itertions don't yield a far better solution, it is ok to stop the calibration here. You can do this using aKeyboardInterrupt/STRG + C.How can we enable/disable the plot?Using theshow_plot=Truekeyword argument (default isTrue)tuner_parameter_plot:What do we see?The variation of values of the tuner parameters together with their specified boundaries (red lines). The tuner parameters vary significantly in the first 200 iterations. At convergence the values obviously also converge.How can we enable/disable the plot?Using theshow_plot=Truekeyword argument (default isTrue)tsd_plot: Created for two different classes - "stationary" and "Heat up"What do we see?The measured and simulated trajectories of our selected goals. The grey part is not used for the evaluation of the objective function. As these values areNaN, matplotlib may interpolate linearly between the points, so don't worry if the trajectory is not logical in the grey area. Note that the inital values for the class "stationary" are not matching the initial values of the measured data. Even if the parameters are set properly, the objective would yield a bad result. In this case you have to adapt the inital values of your model directly in the Modelica code (see section "Best practices").How can we enable/disable the plot?Using thecreate_tsd_plot=Truekeyword argument for showing it each iteration, thesave_tsd_plot=Truefor saving each of these plots. (Default isTrueandFalse, respectivly.)tuner_parameter_intersection_plot:What do we see?This plot is generated if you calibrate multiple classesANDdifferent classes pyrtially have the same tuner parameters (an intersection oftuner_paras). In this case multiple "best" values arise for one tuner parameter. The plot shows the distribution of the tuner-parameters if an intersection is present. You will also be notified in the log file. In the case this plot appears, you have to decide which value to choose. If they differ greatly, you may want to either perform a sensitivity analysis to check which parameter has the biggest impact OR re-evaluate your modelling decisions.How can we enable/disable the plot?Using theshow_plot=Truekeyword argument (default isTrue)DocumentationVisit hour officialDocumentation.Problems?Pleaseraise an issue here.