Skip to content

Test scenario: Stateless P controller

Andreas Nicolai edited this page Mar 10, 2019 · 16 revisions

Generating the FMU

  • run scripts/main.py to start the generator

Basic Properties

  • enter P_Control as model name
  • select target directory, for example /home/<username>/FMUs
  • optionally enter a description

Basic Properties

Variables

  • specify the following variables
Name Unit Causality Variability Initial value
T (sensor temperature) K input continuous 293.15 (exact)
P (heating power) W/m3 output continuous 0 (calculated)
T_limit (if T below, heating is turned on) K parameter fixed 276.15
k_P W/m3K parameter fixed 20000

Variable definitions

Generate FMU directory and test-build FMU

  • confirm last page of wizard to finish generation

FMU Generation Log

You will notice, that FMIGenerator did also create a file /home/<username>/FMUs/P_Control.input, which is a JSON file holding the input data supplied to the wizard. If you want to run the wizard again, maybe modifying/correcting parameters on the way, the wizard will ask you after entering model name and output path, if the old input data shall be read again.

Implement FMU functionality

Logic:

 P = k_p * T
Clone this wiki locally