Buildings.Controls.Continuous.Examples

Collection of models that illustrate model use and test models

Information


This package contains examples for the use of models
that can be found in 
Buildings.Controls.Continuous.

Extends from Buildings.BaseClasses.BaseIconExamples (Icon for Examples packages).

Package Content

NameDescription
NumberOfRequests Example model
OffTimer Example model
PIDHysteresis Example model
PIDHysteresisTimer Example model
SignalRanker Example model


Buildings.Controls.Continuous.Examples.NumberOfRequests

Example model

Buildings.Controls.Continuous.Examples.NumberOfRequests

Modelica definition

model NumberOfRequests "Example model"

  Buildings.Controls.Continuous.NumberOfRequests numReq(
    nin=2,
    threShold=0,
    kind=0);
  Modelica.Blocks.Sources.Sine sine(freqHz=2);
  Modelica.Blocks.Sources.Pulse pulse(period=0.25);
equation 
  connect(sine.y, numReq.u[1]);
  connect(pulse.y, numReq.u[2]);
end NumberOfRequests;

Buildings.Controls.Continuous.Examples.OffTimer

Example model

Buildings.Controls.Continuous.Examples.OffTimer

Modelica definition

model OffTimer "Example model"
  import Buildings;

  Modelica.Blocks.Sources.BooleanPulse booleanPulse(period=0.2);
  Buildings.Controls.Continuous.OffTimer offTim1;
  Buildings.Controls.Continuous.OffTimer offTim2;
  Modelica.Blocks.Logical.Not not1;
equation 
  connect(booleanPulse.y, offTim1.u);
  connect(booleanPulse.y, not1.u);
  connect(offTim2.u, not1.y);
end OffTimer;

Buildings.Controls.Continuous.Examples.PIDHysteresis

Example model

Buildings.Controls.Continuous.Examples.PIDHysteresis

Modelica definition

model PIDHysteresis "Example model"
  import Buildings;

  Buildings.Controls.Continuous.PIDHysteresis con(
    pre_y_start=false,
    controllerType=Modelica.Blocks.Types.SimpleController.PI,
    yMin=0.3,
    Ti=600,
    Td=60);
  Modelica.Blocks.Sources.Constant TSet(k=273.15 + 40) "Set point";
  Modelica.Thermal.HeatTransfer.Components.HeatCapacitor cap(C=1000000, T(start=
         313.15, fixed=true));
  Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TBC;
  Modelica.Thermal.HeatTransfer.Components.ThermalConductor theCon(G=20);
  Modelica.Blocks.Math.Gain gain(k=2000);
  Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temSen;
  Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow Q_flow;
  Modelica.Blocks.Sources.Sine sine(
    freqHz=1/86400,
    offset=273.15,
    amplitude=20,
    phase=-1.5707963267949);
equation 

  connect(TSet.y, con.u_s);
  connect(TBC.port, theCon.port_a);
  connect(theCon.port_b, cap.port);
  connect(con.y, gain.u);
  connect(cap.port, temSen.port);
  connect(temSen.T, con.u_m);
  connect(gain.y, Q_flow.Q_flow);
  connect(Q_flow.port, cap.port);
  connect(sine.y, TBC.T);
end PIDHysteresis;

Buildings.Controls.Continuous.Examples.PIDHysteresisTimer

Example model

Buildings.Controls.Continuous.Examples.PIDHysteresisTimer

Modelica definition

model PIDHysteresisTimer "Example model"
  import Buildings;

  Buildings.Controls.Continuous.PIDHysteresisTimer con(
    yMin=0.3,
    minOffTime=10000,
    controllerType=Modelica.Blocks.Types.SimpleController.PI,
    Ti=60,
    Td=10);
  Modelica.Blocks.Sources.Constant TSet(k=273.15 + 40) "Set point";
  Modelica.Thermal.HeatTransfer.Components.HeatCapacitor cap(C=100000, T(start=
          293.15, fixed=true));
  Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TBC;
  Modelica.Thermal.HeatTransfer.Components.ThermalConductor theCon(G=10);
  Modelica.Blocks.Math.Gain gain(k=800);
  Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temSen;
  Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow Q_flow;
  Modelica.Blocks.Sources.Sine sine(
    freqHz=1/86400,
    offset=273.15,
    amplitude=20,
    phase=-1.5707963267949);
equation 

  connect(TSet.y, con.u_s);
  connect(TBC.port, theCon.port_a);
  connect(theCon.port_b, cap.port);
  connect(con.y, gain.u);
  connect(cap.port, temSen.port);
  connect(temSen.T, con.u_m);
  connect(gain.y, Q_flow.Q_flow);
  connect(Q_flow.port, cap.port);
  connect(sine.y, TBC.T);
end PIDHysteresisTimer;

Buildings.Controls.Continuous.Examples.SignalRanker

Example model

Buildings.Controls.Continuous.Examples.SignalRanker

Modelica definition

model SignalRanker "Example model"

  Modelica.Blocks.Sources.Sine sine(freqHz=2);
  Modelica.Blocks.Sources.Pulse pulse(period=0.25);
  Buildings.Controls.Continuous.SignalRanker sigRan(
                                                  nin=3);
  Modelica.Blocks.Sources.ExpSine expSine(freqHz=10);
equation 
  connect(sine.y, sigRan.u[1]);
  connect(pulse.y, sigRan.u[2]);
  connect(expSine.y, sigRan.u[3]);
end SignalRanker;

HTML-documentation generated by Dymola Sat Feb 6 17:23:17 2010.