Buildings.Obsolete.Controls.OBC.CDL.Discrete.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.Obsolete.Controls.OBC.CDL.Discrete.

Package Content

Name Description
Buildings.Obsolete.Controls.OBC.CDL.Discrete.Examples.DayType DayType Example model for the source that outputs the type of the day
Buildings.Obsolete.Controls.OBC.CDL.Discrete.Examples.MovingMean MovingMean Validation model for the MovingMean block

Buildings.Obsolete.Controls.OBC.CDL.Discrete.Examples.DayType Buildings.Obsolete.Controls.OBC.CDL.Discrete.Examples.DayType

Example model for the source that outputs the type of the day

Buildings.Obsolete.Controls.OBC.CDL.Discrete.Examples.DayType

Information

This example generates signals for three different work weeks. The instance dayTypMon outputs a signal with five working days, followed by two non-working days. The instance dayTypSat does the same, except that the first days is a non-working day. The instance dayTypTwoWeeks outputs six working days, followed by 8 non-working days. The instance dayTypMonThr is configured the same as dayTypMon, except that it outputs the type of the day for three days, starting with the current day, then the next day and the day after.

Modelica definition

model DayType "Example model for the source that outputs the type of the day" Buildings.Obsolete.Controls.OBC.CDL.Discrete.DayType dayTypMon "Model that outputs the type of the day, starting with Monday"; Buildings.Obsolete.Controls.OBC.CDL.Discrete.DayType dayTypSat( iStart=6) "Model that outputs the type of the day, starting with Saturday"; Buildings.Obsolete.Controls.OBC.CDL.Discrete.DayType dayTypTwoWeeks( days={Types.Day.WorkingDay,Types.Day.WorkingDay,Types.Day.WorkingDay,Types.Day.WorkingDay,Types.Day.WorkingDay,Types.Day.WorkingDay,Types.Day.NonWorkingDay,Types.Day.NonWorkingDay,Types.Day.NonWorkingDay,Types.Day.NonWorkingDay,Types.Day.NonWorkingDay,Types.Day.NonWorkingDay,Types.Day.NonWorkingDay,Types.Day.NonWorkingDay}, nout=14) "Model that outputs the type of the day, starting with 6 workdays, then 8 non-working days"; Buildings.Obsolete.Controls.OBC.CDL.Discrete.DayType dayTypMonThr( nout=3) "Model that outputs the type of the day for 3 days, starting with Monday"; end DayType;

Buildings.Obsolete.Controls.OBC.CDL.Discrete.Examples.MovingMean Buildings.Obsolete.Controls.OBC.CDL.Discrete.Examples.MovingMean

Validation model for the MovingMean block

Buildings.Obsolete.Controls.OBC.CDL.Discrete.Examples.MovingMean

Information

Validation test for the block Buildings.Obsolete.Controls.OBC.CDL.Discrete.MovingMean.

Modelica definition

model MovingMean "Validation model for the MovingMean block" Buildings.Controls.OBC.CDL.Reals.Sources.Sin sin( freqHz=1/8, phase=0.5235987755983, startTime=-0.5) "Example input signal"; Buildings.Obsolete.Controls.OBC.CDL.Discrete.MovingMean movMea(n=4, samplePeriod=1) "Discrete moving mean of the sampled input signal"; equation connect(sin.y, movMea.u); end MovingMean;