CONTINUOUS_MODEL PIContr ABSTRACT "PI-controller w multiple output signals. Made by: Jari Hyttinen Date: December 30, 1997 020506 PS Added parameters for signal limits 010213 AB Changed parameter defaults TI=300, TT=30 s 990105 MV Initial value for integ variable is changed from 1 to 0 to improve startup. 980811 MV Renaming according to ICE standard to make replacement available " EQUATIONS E := IF Mode < 0.5 THEN (SetPoint - Measure) ELSE (Measure - SetPoint) END_IF ; OutSignalTemp := k * (E + Integ) ; Integ' = E/ti + (OutSignal - OutSignalTemp)/tt ; OutSignal = IF OutSignalTemp > hilimit THEN hilimit ELSE_IF OutSignalTemp < lolimit THEN lolimit ELSE OutSignalTemp END_IF ; LINKS /* type name variables */ FOR i=1, n GENERIC OutSignalLink[i] OutSignal END_FOR; GENERIC SetPointLink SetPoint; GENERIC MeasureLink Measure; VARIABLES /* type name role def min max description */ Generic SetPoint IN 18 -BIG BIG "Reference signal" Generic Measure IN 18 -BIG BIG "Input signal" Generic Integ OUT 0 -BIG BIG "Integrator term" Generic OutSignal OUT 0.5 0 1 "Control signal" Generic E LOC 0 -BIG BIG "Control difference" Generic OutSignalTemp LOC 0.5 -BIG BIG "Control signal (temp)" MODEL_PARAMETERS INT n SMP 1 1 BIGINT "Number of OutSignal links" PARAMETERS /* type name role def min max description */ Generic k S_P 0.3 SMALL BIG "Gain parameter" Generic ti S_P 300 SMALL BIG "Integration time in seconds" Generic tt S_P 30 SMALL BIG "Tracking time in seconds" Generic mode S_P 0 0 1 "Control mode: 0 heating type control, 1 cooling type control" Generic hilimit S_P 1 SMALL BIG "High limit for OutSignal" Generic lolimit S_P 0 -BIG 0 "Low limit for OutSignal" END_MODEL