Buildings.Controls.OBC.Utilities.Validation

Collection of validation models

Information

This package contains validation models for blocks in Buildings.Controls.OBC.Utilities.

Package Content

Name Description
Buildings.Controls.OBC.Utilities.Validation.OptimalStartCoolingNegativeStartTime OptimalStartCoolingNegativeStartTime Validation model for the block OptimalStart for cooling system with a negative start time
Buildings.Controls.OBC.Utilities.Validation.OptimalStartCoolingPositiveStartTime OptimalStartCoolingPositiveStartTime Validation model for the block OptimalStart for cooling system with a positive start time
Buildings.Controls.OBC.Utilities.Validation.OptimalStartHeating OptimalStartHeating Validation model for the block OptimalStart for heating system
Buildings.Controls.OBC.Utilities.Validation.OptimalStartHeatingCooling OptimalStartHeatingCooling Validation model for the block OptimalStart for both heating and cooling system
Buildings.Controls.OBC.Utilities.Validation.OptimalStartNoHeatingNoCooling OptimalStartNoHeatingNoCooling Validation model for the block OptimalStart for the case with no preheating nor precooling
Buildings.Controls.OBC.Utilities.Validation.PIDWithInputGains PIDWithInputGains Test model for PIDWithInputGains

Buildings.Controls.OBC.Utilities.Validation.OptimalStartCoolingNegativeStartTime Buildings.Controls.OBC.Utilities.Validation.OptimalStartCoolingNegativeStartTime

Validation model for the block OptimalStart for cooling system with a negative start time

Buildings.Controls.OBC.Utilities.Validation.OptimalStartCoolingNegativeStartTime

Information

This model is to validate the block Buildings.Controls.OBC.Utilities.OptimalStart for space cooling system with a negative simulation start time.

The room is modeled as a simple differential equation with a time constant of around 5.6 hours. The cooling power is relatively large compared to the heat gain from the outdoor temperature. The outdoor temperature is repetitive each day; the optimal start time converges to a small amount of time tOpt after a few days.

Modelica definition

model OptimalStartCoolingNegativeStartTime "Validation model for the block OptimalStart for cooling system with a negative start time" Buildings.Controls.OBC.Utilities.OptimalStart optStaCoo( computeHeating=false, computeCooling=true) "Optimal start for cooling system"; Modelica.Blocks.Continuous.Integrator TRoo( k=0.0000005, y_start=24+273.15) "Room air temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetCooOcc( k=24+273.15) "Zone cooling setpoint during occupancy"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin TOut( amplitude=5, freqHz=1/86400, offset=28+273.15, startTime( displayUnit="s")=-691200) "Outdoor dry bulb temperature to test cooling system"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter UA(k=100) "Overall heat loss coefficient"; Buildings.Controls.OBC.CDL.Reals.Subtract dT "Temperature difference between zone and outdoor"; Buildings.Controls.OBC.CDL.Reals.Add dTdt "Temperature derivative"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter QCoo(k=-2000) "Heat extraction in the zone"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea( realTrue=-6) "Convert Boolean to Real signal"; Buildings.Controls.OBC.CDL.Reals.Add add "Reset setpoint from unoccupied to occupied during optimal start period"; Buildings.Controls.OBC.CDL.Reals.PID conPID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, Ti=1, reverseActing=false) "PI control signal for the cooling power"; Buildings.Controls.SetPoints.OccupancySchedule occSch( occupancy=3600*{7,19}, period=24*3600) "Daily schedule"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetCoo( realTrue=273.15+24, realFalse=273.15+30, y(final unit="K", displayUnit="degC")) "Room temperature set point for cooling"; equation connect(dT.y,UA.u); connect(dTdt.y,TRoo.u); connect(QCoo.y,dTdt.u2); connect(TRoo.y,optStaCoo.TZon); connect(TSetCooOcc.y,optStaCoo.TSetZonCoo); connect(UA.y,dTdt.u1); connect(optStaCoo.optOn,booToRea.u); connect(add.y,conPID.u_s); connect(TRoo.y,conPID.u_m); connect(occSch.tNexOcc,optStaCoo.tNexOcc); connect(conPID.y,QCoo.u); connect(occSch.occupied,TSetCoo.u); connect(TSetCoo.y,add.u2); connect(booToRea.y,add.u1); connect(TRoo.y, dT.u2); connect(TOut.y, dT.u1); end OptimalStartCoolingNegativeStartTime;

Buildings.Controls.OBC.Utilities.Validation.OptimalStartCoolingPositiveStartTime Buildings.Controls.OBC.Utilities.Validation.OptimalStartCoolingPositiveStartTime

Validation model for the block OptimalStart for cooling system with a positive start time

Buildings.Controls.OBC.Utilities.Validation.OptimalStartCoolingPositiveStartTime

Information

This model is to validate the block Buildings.Controls.OBC.Utilities.OptimalStart for space cooling system with a positive simulation start time.

The room is modeled as a simple differential equation with a time constant of around 5.6 hours. The cooling power is relatively large compared to the heat gain from the outdoor temperature. The outdoor temperature is repetitive each day; the optimal start time converges to a small amount of time tOpt after a few days.

Modelica definition

model OptimalStartCoolingPositiveStartTime "Validation model for the block OptimalStart for cooling system with a positive start time" Buildings.Controls.OBC.Utilities.OptimalStart optStaCoo( computeHeating=false, computeCooling=true) "Optimal start for cooling system"; Modelica.Blocks.Continuous.Integrator TRoo( k=0.0000005, y_start=24+273.15) "Room air temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetCooOcc( k=24+273.15) "Zone cooling setpoint during occupancy"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin TOut( amplitude=5, freqHz=1/86400, offset=28+273.15, startTime( displayUnit="s")=0) "Outdoor dry bulb temperature to test cooling system"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter UA(k=100) "Overall heat loss coefficient"; Buildings.Controls.OBC.CDL.Reals.Subtract dT "Temperature difference between zone and outdoor"; Buildings.Controls.OBC.CDL.Reals.Add dTdt "Temperature derivative"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter QCoo(k=-2000) "Heat extraction in the zone"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea( realTrue=-6) "Convert Boolean to Real signal"; Buildings.Controls.OBC.CDL.Reals.Add add "Reset setpoint from unoccupied to occupied during optimal start period"; Buildings.Controls.OBC.CDL.Reals.PID conPID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, Ti=1, reverseActing=false) "PI control signal for the cooling power"; Buildings.Controls.SetPoints.OccupancySchedule occSch( occupancy=3600*{7,19}, period=24*3600) "Daily schedule"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetCoo( realTrue=273.15+24, realFalse=273.15+30, y(final unit="K", displayUnit="degC")) "Room temperature set point for cooling"; equation connect(dT.y,UA.u); connect(dTdt.y,TRoo.u); connect(QCoo.y,dTdt.u2); connect(TRoo.y,optStaCoo.TZon); connect(TSetCooOcc.y,optStaCoo.TSetZonCoo); connect(UA.y,dTdt.u1); connect(optStaCoo.optOn,booToRea.u); connect(add.y,conPID.u_s); connect(TRoo.y,conPID.u_m); connect(occSch.tNexOcc,optStaCoo.tNexOcc); connect(conPID.y,QCoo.u); connect(occSch.occupied,TSetCoo.u); connect(TSetCoo.y,add.u2); connect(booToRea.y,add.u1); connect(TRoo.y, dT.u2); connect(TOut.y, dT.u1); end OptimalStartCoolingPositiveStartTime;

Buildings.Controls.OBC.Utilities.Validation.OptimalStartHeating Buildings.Controls.OBC.Utilities.Validation.OptimalStartHeating

Validation model for the block OptimalStart for heating system

Buildings.Controls.OBC.Utilities.Validation.OptimalStartHeating

Information

This model is to validate the block Buildings.Controls.OBC.Utilities.OptimalStart for space heating system.

The room is modeled as a simple differential equation with a time constant of around 5.6 hours. The outdoor temperature is also repetitive each day; the optimal start time converges to a small amount of time tOpt after a few days.

Modelica definition

model OptimalStartHeating "Validation model for the block OptimalStart for heating system" Buildings.Controls.OBC.Utilities.OptimalStart optStaHea( computeHeating=true, computeCooling=false) "Optimal start for heating system"; Modelica.Blocks.Continuous.Integrator TRoo( k=0.000005, y_start=21+273.15) "Room air temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetHeaOcc( k=21+273.15) "Zone heating setpoint during occupancy"; Buildings.Controls.SetPoints.OccupancySchedule occSch( occupancy=3600*{7,19}, period=24*3600) "Daily schedule"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter UA(k=10) "Overall heat loss coefficient"; Buildings.Controls.OBC.CDL.Reals.Subtract dT "Temperature difference between zone and outdoor"; Buildings.Controls.OBC.CDL.Reals.Add dTdt "Temperature derivative"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter QHea(k=500) "Heat injection in the zone"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea( realTrue=6) "Convert Boolean to Real signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin TOut( amplitude=10, freqHz=1/86400, phase=3.1415926535898, offset=10+273.15, startTime( displayUnit="d")=-172800) "Outdoor dry bulb temperature to test heating system"; Buildings.Controls.OBC.CDL.Reals.PID conPID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, Ti=1.5) "PI control for space heating"; Buildings.Controls.OBC.CDL.Reals.Add add "Reset temperature from unoccupied to occupied for optimal start period"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetHea( realTrue=273.15+21, realFalse=273.15+15, y(final unit="K", displayUnit="degC")) "Room temperature set point for heating"; equation connect(dT.y,UA.u); connect(dTdt.y,TRoo.u); connect(QHea.y,dTdt.u2); connect(TRoo.y,optStaHea.TZon); connect(occSch.tNexOcc,optStaHea.tNexOcc); connect(TSetHeaOcc.y,optStaHea.TSetZonHea); connect(UA.y,dTdt.u1); connect(add.y,conPID.u_s); connect(conPID.y,QHea.u); connect(TRoo.y,conPID.u_m); connect(optStaHea.optOn,booToRea.u); connect(TSetHea.u,occSch.occupied); connect(TSetHea.y,add.u2); connect(booToRea.y,add.u1); connect(TOut.y, dT.u1); connect(TRoo.y, dT.u2); end OptimalStartHeating;

Buildings.Controls.OBC.Utilities.Validation.OptimalStartHeatingCooling Buildings.Controls.OBC.Utilities.Validation.OptimalStartHeatingCooling

Validation model for the block OptimalStart for both heating and cooling system

Buildings.Controls.OBC.Utilities.Validation.OptimalStartHeatingCooling

Information

This models validates both space heating and cooling for the block Buildings.Controls.OBC.Utilities.OptimalStart.

The first ten days is to test the heating case with a lower outdoor temperature. The next ten days has a higher outdoor temprature, which is to test the cooling case. The zone model has a time constant of 27.8 hours. The optimal start block converges separately to an optimal start time for heating and cooling. Note that during the three transition days, the zone temperature is in the deadband, so there is no need to optimally start the heating or cooling system in advance.

Modelica definition

model OptimalStartHeatingCooling "Validation model for the block OptimalStart for both heating and cooling system" Buildings.Controls.OBC.Utilities.OptimalStart optSta( computeHeating=true, computeCooling=true) "Optimal start for both heating and cooling system"; Modelica.Blocks.Continuous.Integrator TRoo( k=0.0000004, y_start=19+273.15) "Room air temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetCooOcc( k=24+273.15) "Zone cooling setpoint during occupancy"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin TOutBase( amplitude=5, freqHz=1/86400, offset=15+273.15, startTime( displayUnit="h")=0) "Outdoor dry bulb temperature, base component"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter UA(k=25) "Overall heat loss coefficient"; Buildings.Controls.OBC.CDL.Reals.Subtract dT "Temperature difference between zone and outdoor"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter QCoo(k=-4000) "Heat extraction in the zone"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1( realTrue=-6) "Convert Boolean to Real signal"; Buildings.Controls.OBC.CDL.Reals.Add add1 "Reset temperature from unoccupied to occupied for optimal start period"; Buildings.Controls.OBC.CDL.Reals.PID conPID1( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, Ti=3, reverseActing=false) "PI control for space cooling"; Buildings.Controls.SetPoints.OccupancySchedule occSch( occupancy=3600*{7,19}, period=24*3600) "Daily schedule"; Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum( nin=3) "Sum heat gains"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetHeaOcc( k=21+273.15) "Zone heating setpoint during occupancy"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2( realTrue=6) "Convert Boolean to Real signal"; Buildings.Controls.OBC.CDL.Reals.Add add2 "Reset temperature from unoccupied to occupied for optimal start period"; Buildings.Controls.OBC.CDL.Reals.PID conPID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, Ti=3) "PI control for space heating"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter QHea(k=2000) "Heat injection in the zone"; Buildings.Controls.OBC.CDL.Reals.Add TOut "Outdoor dry bulb temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse pul( shift( displayUnit="d")=604800, amplitude=15, period( displayUnit="d")=1209600) "Range of outdoor dry bulb temperature"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetHea( realTrue=273.15+21, realFalse=273.15+15, y(final unit="K", displayUnit="degC")) "Room temperature set point for heating"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetCoo( realTrue=273.15+24, realFalse=273.15+30, y(final unit="K", displayUnit="degC")) "Room temperature set point for cooling"; equation connect(dT.y,UA.u); connect(TRoo.y,optSta.TZon); connect(TSetCooOcc.y,optSta.TSetZonCoo); connect(optSta.optOn,booToRea1.u); connect(add1.y,conPID1.u_s); connect(TRoo.y,conPID1.u_m); connect(occSch.tNexOcc,optSta.tNexOcc); connect(UA.y,mulSum.u[1]); connect(TRoo.u,mulSum.y); connect(TSetHeaOcc.y,optSta.TSetZonHea); connect(optSta.optOn,booToRea2.u); connect(add2.y,conPID.u_s); connect(conPID1.y,QCoo.u); connect(conPID.y,QHea.u); connect(QCoo.y,mulSum.u[2]); connect(QHea.y,mulSum.u[3]); connect(TOutBase.y,TOut.u1); connect(pul.y,TOut.u2); connect(TSetCoo.y,add1.u2); connect(occSch.occupied,TSetCoo.u); connect(TSetHea.u,occSch.occupied); connect(booToRea1.y,add1.u1); connect(booToRea2.y,add2.u1); connect(TSetHea.y,add2.u2); connect(TRoo.y, conPID.u_m); connect(TOut.y, dT.u1); connect(TRoo.y, dT.u2); end OptimalStartHeatingCooling;

Buildings.Controls.OBC.Utilities.Validation.OptimalStartNoHeatingNoCooling Buildings.Controls.OBC.Utilities.Validation.OptimalStartNoHeatingNoCooling

Validation model for the block OptimalStart for the case with no preheating nor precooling

Buildings.Controls.OBC.Utilities.Validation.OptimalStartNoHeatingNoCooling

Information

This models validates the block Buildings.Controls.OBC.Utilities.OptimalStart for the case when the optimal start is not turned on for preheating or precooling before the scheduled occupancy.

The results shows that the optimal start time tOpt remains zero and the optimal start on signal optOn remains false during the simulation.

Modelica definition

model OptimalStartNoHeatingNoCooling "Validation model for the block OptimalStart for the case with no preheating nor precooling" Buildings.Controls.OBC.Utilities.OptimalStart optSta( computeHeating=false, computeCooling=false) "Optimal start for both heating and cooling system"; Modelica.Blocks.Continuous.Integrator TRoo( k=0.0000004, y_start=19+273.15) "Room air temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin TOutBase( amplitude=5, freqHz=1/86400, offset=15+273.15, startTime( displayUnit="h")=0) "Outdoor dry bulb temperature, base component"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter UA(k=25) "Overall heat loss coefficient"; Buildings.Controls.OBC.CDL.Reals.Subtract dT "Temperature difference between zone and outdoor"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter QCoo(k=-4000) "Heat extraction in the zone"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1( realTrue=-6) "Convert Boolean to Real signal"; Buildings.Controls.OBC.CDL.Reals.Add add1 "Reset temperature from unoccupied to occupied for optimal start period"; Buildings.Controls.OBC.CDL.Reals.PID conPID1( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, Ti=3, reverseActing=false) "PI control for space cooling"; Buildings.Controls.SetPoints.OccupancySchedule occSch( occupancy=3600*{7,19}, period=24*3600) "Daily schedule"; Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum( nin=3) "Sum heat gains"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea2( realTrue=6) "Convert Boolean to Real signal"; Buildings.Controls.OBC.CDL.Reals.Add add2 "Reset temperature from unoccupied to occupied for optimal start period"; Buildings.Controls.OBC.CDL.Reals.PID conPID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, Ti=3) "PI control for space heating"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter QHea(k=2000) "Heat injection in the zone"; Buildings.Controls.OBC.CDL.Reals.Add TOut "Outdoor dry bulb temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse pul( shift( displayUnit="d")=604800, amplitude=15, period( displayUnit="d")=1209600) "Range of outdoor dry bulb temperature"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetHea( realTrue=273.15+21, realFalse=273.15+15, y(final unit="K", displayUnit="degC")) "Room temperature set point for heating"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal TSetCoo( realTrue=273.15+24, realFalse=273.15+30, y(final unit="K", displayUnit="degC")) "Room temperature set point for cooling"; equation connect(dT.y,UA.u); connect(TRoo.y,optSta.TZon); connect(optSta.optOn,booToRea1.u); connect(add1.y,conPID1.u_s); connect(TRoo.y,conPID1.u_m); connect(occSch.tNexOcc,optSta.tNexOcc); connect(UA.y,mulSum.u[1]); connect(TRoo.u,mulSum.y); connect(optSta.optOn,booToRea2.u); connect(add2.y,conPID.u_s); connect(conPID1.y,QCoo.u); connect(conPID.y,QHea.u); connect(QCoo.y,mulSum.u[2]); connect(QHea.y,mulSum.u[3]); connect(TOutBase.y,TOut.u1); connect(pul.y,TOut.u2); connect(TSetCoo.y,add1.u2); connect(occSch.occupied,TSetCoo.u); connect(TSetHea.u,occSch.occupied); connect(TSetHea.y,add2.u2); connect(booToRea2.y,add2.u1); connect(booToRea1.y,add1.u1); connect(TRoo.y, conPID.u_m); connect(TOut.y, dT.u1); connect(TRoo.y, dT.u2); end OptimalStartNoHeatingNoCooling;

Buildings.Controls.OBC.Utilities.Validation.PIDWithInputGains Buildings.Controls.OBC.Utilities.Validation.PIDWithInputGains

Test model for PIDWithInputGains

Buildings.Controls.OBC.Utilities.Validation.PIDWithInputGains

Information

Validation test for the block Buildings.Controls.OBC.Utilities.PIDWithInputGains.

For t ∈ [0, 0.6] both PID controllers have the same gains. During this time, they generate the same output. Afterwards, the gains, and hence also their outputs, differ. Buildings.Controls.OBC.CDL.Reals.PIDWithReset.

Modelica definition

model PIDWithInputGains "Test model for PIDWithInputGains" Buildings.Controls.OBC.CDL.Reals.Sources.Pulse pulse( period=0.25) "Setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant const( k=0.5) "Measured value"; Buildings.Controls.OBC.Utilities.PIDWithInputGains PIDWitInpGai( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PID) "PID controller with input gains"; Buildings.Controls.OBC.CDL.Reals.PIDWithReset PID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PID, k=1, Ti=0.5, Td=0.1) "PID controller with constant gains"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse resSig(period=1) "Reset signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse k( amplitude=0.2, width=0.4, period=1, shift=0.6, offset=1) "Control gain signal"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse Ti( amplitude=0.2, width=0.4, period=1, shift=0.6, offset=0.5) "Time constant signal for the integral term"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse Td( amplitude=0.1, width=0.4, period=1, shift=0.6, offset=0.1) "Time constant signal for the derivative term"; Buildings.Controls.OBC.CDL.Reals.Abs abs1 "Absolute value of controller output"; Buildings.Controls.OBC.CDL.Reals.Subtract sub "Difference in controller output"; Buildings.Controls.OBC.CDL.Reals.LessThreshold lesThr(t=1E-5, h=1E-4) "Output true if outputs are bigger than threshold"; Buildings.Controls.OBC.CDL.Utilities.Assert assMes( message="Control outputs differ more than expected") "Make sure outputs are within expected tolerance"; Buildings.Controls.OBC.CDL.Reals.Sources.CivilTime modTim "Civil time"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr(t=0.59) "Output true if model time is below 0.6"; Buildings.Controls.OBC.CDL.Logical.Or or2 "Output true either if time is bigger than 0.59, or if tolerance is maintained"; equation connect(resSig.y, PID.trigger); connect(PIDWitInpGai.trigger, PID.trigger); connect(pulse.y, PID.u_s); connect(PIDWitInpGai.u_s, PID.u_s); connect(const.y, PID.u_m); connect(PIDWitInpGai.u_m, PID.u_m); connect(k.y, PIDWitInpGai.k); connect(PIDWitInpGai.Ti, Ti.y); connect(PIDWitInpGai.Td, Td.y); connect(PID.y, sub.u1); connect(PIDWitInpGai.y, sub.u2); connect(sub.y, abs1.u); connect(abs1.y, lesThr.u); connect(modTim.y, greThr.u); connect(greThr.y, or2.u1); connect(lesThr.y, or2.u2); connect(or2.y, assMes.u); end PIDWithInputGains;