-
Notifications
You must be signed in to change notification settings - Fork 180
Expand file tree
/
Copy pathController.mo
More file actions
1772 lines (1759 loc) · 90.6 KB
/
Controller.mo
File metadata and controls
1772 lines (1759 loc) · 90.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
within Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV;
block Controller
"Single Zone AHU controller that composes subsequences for controlling fan speed, economizer, and supply air temperature"
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard eneStd
"Energy standard, ASHRAE 90.1 or Title 24";
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard venStd
"Ventilation standard, ASHRAE 62.1 or Title 24";
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer ecoHigLimCon=Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.FixedDryBulb
"Economizer high limit control device"
annotation (__cdl(ValueInReference=false));
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.ASHRAEClimateZone ashCliZon=Buildings.Controls.OBC.ASHRAE.G36.Types.ASHRAEClimateZone.Not_Specified
"ASHRAE climate zone"
annotation (__cdl(ValueInReference=false),
Dialog(enable=eneStd==Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1));
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.Title24ClimateZone tit24CliZon=Buildings.Controls.OBC.ASHRAE.G36.Types.Title24ClimateZone.Not_Specified
"California Title 24 climate zone"
annotation (__cdl(ValueInReference=false),
Dialog(enable=eneStd==Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.California_Title_24));
parameter Boolean have_frePro=true
"True: enable freeze protection"
annotation (__cdl(ValueInReference=false));
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat freSta=Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.No_freeze_stat
"Type of freeze stat"
annotation (__cdl(ValueInReference=false), Dialog(enable=have_frePro));
parameter Boolean have_winSen=false
"Check if the zone has window status sensor"
annotation (__cdl(ValueInReference=false));
parameter Boolean have_occSen=false
"Check if the zone has occupancy sensor"
annotation (__cdl(ValueInReference=false));
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil cooCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased
"Cooling coil type"
annotation (__cdl(ValueInReference=false));
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil heaCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
"Heating coil type"
annotation (__cdl(ValueInReference=false));
parameter Boolean have_CO2Sen=true
"True: the zone has CO2 sensor"
annotation (__cdl(ValueInReference=false));
parameter Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl buiPreCon=
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.BarometricRelief
"Type of building pressure control system"
annotation (__cdl(ValueInReference=false));
parameter Boolean have_ahuRelFan=true
"True: relief fan is part of AHU; False: the relief fans group that may associate multiple AHUs"
annotation (__cdl(ValueInReference=false),
Dialog(enable=buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan));
parameter Real VAreBreZon_flow(unit="m3/s")=0
"Design area component of the breathing zone outdoor airflow"
annotation (__cdl(ValueInReference=false),
Dialog(group="Design conditions",
enable=venStd == Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.ASHRAE62_1));
parameter Real VPopBreZon_flow(unit="m3/s")=0
"Design population component of the breathing zone outdoor airflow"
annotation (__cdl(ValueInReference=false),
Dialog(group="Design conditions",
enable=venStd == Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.ASHRAE62_1));
// ----------- parameters for setpoint adjustment -----------
parameter Boolean have_locAdj=true
"True: the zone has local setpoint adjustment knob"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Setpoints adjustment", group="Adjustable settings"));
parameter Boolean sepAdj=true
"True: cooling and heating setpoint can be adjusted separately"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Setpoints adjustment", group="Adjustable settings", enable=have_locAdj));
parameter Boolean ignDemLim=true
"Flag, set to true to exempt individual zone from demand limit setpoint adjustment"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Setpoints adjustment", group="Adjustable settings"));
parameter Real TActCoo_max(
unit="K",
displayUnit="degC")=300.15
"Maximum cooling setpoint during on"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Limits"));
parameter Real TActCoo_min(
unit="K",
displayUnit="degC")=295.15
"Minimum cooling setpoint during on"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Limits"));
parameter Real TActHea_max(
unit="K",
displayUnit="degC")=295.15
"Maximum heating setpoint during on"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Limits"));
parameter Real TActHea_min(
unit="K",
displayUnit="degC")=291.15
"Minimum heating setpoint during on"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Limits"));
parameter Real TWinOpeCooSet(
unit="K",
displayUnit="degC")=322.15
"Cooling setpoint when window is open"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Limits"));
parameter Real TWinOpeHeaSet(
unit="K",
displayUnit="degC")=277.15
"Heating setpoint when window is open"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Limits"));
parameter Real incTSetDem_1(unit="K")=0.5
"Cooling setpoint increase value (degC) when cooling demand limit level 1 is imposed"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Demand control adjustment", enable=not ignDemLim));
parameter Real incTSetDem_2(unit="K")=1
"Cooling setpoint increase value (degC) when cooling demand limit level 2 is imposed"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Demand control adjustment", enable=not ignDemLim));
parameter Real incTSetDem_3(unit="K")=2
"Cooling setpoint increase value (degC) when cooling demand limit level 3 is imposed"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Demand control adjustment", enable=not ignDemLim));
parameter Real decTSetDem_1(unit="K")=0.5
"Heating setpoint decrease value (degC) when heating demand limit level 1 is imposed"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Demand control adjustment", enable=not ignDemLim));
parameter Real decTSetDem_2(unit="K")=1
"Heating setpoint decrease value (degC) when heating demand limit level 2 is imposed"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Demand control adjustment", enable=not ignDemLim));
parameter Real decTSetDem_3(unit="K")=2
"Heating setpoint decrease value (degC) when heating demand limit level 3 is imposed"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Demand control adjustment", enable=not ignDemLim));
parameter Real preWarCooTim(unit="s")=10800
"Maximum cool-down or warm-up time"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Operation mode"));
parameter Real TZonFreProOn(
unit="K",
displayUnit="degC")=277.15
"Threshold temperature to activate the freeze protection mode"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Operation mode"));
parameter Real TZonFreProOff(
unit="K",
displayUnit="degC")=280.15
"Threshold temperature to end the freeze protection mode"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Operation mode"));
parameter Real bouLim=1
"Threshold of temperature difference for indicating the end of setback or setup mode"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Setpoints adjustment", group="Hysteresis"));
parameter Real uLow=-0.1
"Low limit of the hysteresis for checking temperature difference"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Setpoints adjustment", group="Hysteresis"));
parameter Real uHigh=0.1
"High limit of the hysteresis for checking temperature difference"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Setpoints adjustment", group="Hysteresis"));
// ----------- parameters for cooling and heating loop -----------
parameter Buildings.Controls.OBC.CDL.Types.SimpleController cooLooCon=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Cooling loop controller type"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Loops control", group="Cooling loop"));
parameter Real kCoo(unit="1/K")=0.1
"Gain for cooling control loop signal"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Loops control", group="Cooling loop"));
parameter Real TiCoo(unit="s")=900
"Time constant of integrator block for cooling control loop signal"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Loops control", group="Cooling loop",
enable=cooLooCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PI
or cooLooCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
parameter Real TdCoo(unit="s")=0.1
"Time constant of derivative block for cooling control loop signal"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Loops control", group="Cooling loop",
enable=cooLooCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PD
or cooLooCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
parameter Buildings.Controls.OBC.CDL.Types.SimpleController heaLooCon=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
"Heating loop controller type"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Loops control", group="Heating loop"));
parameter Real kHea(unit="1/K")=0.1
"Gain for heating control loop signal"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Loops control", group="Heating loop"));
parameter Real TiHea(unit="s")=900
"Time constant of integrator block for heating control loop signal"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Loops control", group="Heating loop",
enable=heaLooCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PI
or heaLooCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
parameter Real TdHea(unit="s")=0.1
"Time constant of derivative block for heating control loop signal"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Loops control", group="Heating loop",
enable=heaLooCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PD
or heaLooCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
// ----------- parameters for supply setpoints settings -----------
parameter Real TSup_max(
unit="K",
displayUnit="degC")=303.15
"Maximum supply air temperature for heating"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Supply setpoints", group="Temperature"));
parameter Real TSup_min(
unit="K",
displayUnit="degC")=291.15
"Minimum supply air temperature for cooling"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Supply setpoints", group="Temperature"));
parameter Real TSupDew_max(
unit="K",
displayUnit="degC")=290.15
"Maximum supply air dew-point temperature. It's typically only needed in humid type “A” climates. A typical value is 17°C.
For mild and dry climates, a high set point (e.g. 24°C) should be entered for maximum efficiency"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Supply setpoints", group="Temperature"));
parameter Real TSupDea_min(
unit="K",
displayUnit="degC")=294.15
"Minimum supply temperature when it is in deadband state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Temperature"));
parameter Real TSupDea_max(
unit="K",
displayUnit="degC")=297.15
"Maximum supply temperature when it is in deadband state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Temperature"));
parameter Real temPoiOne=0.5
"Point 1 on x-axis of control map for temperature control, when it is in heating state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Temperature"));
parameter Real temPoiTwo=0.25
"Point 2 on x-axis of control map for temperature control, when it is in cooling state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Temperature"));
parameter Real temPoiThr=0.5
"Point 3 on x-axis of control map for temperature control, when it is in cooling state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Temperature"));
parameter Real temPoiFou=0.75
"Point 4 on x-axis of control map for temperature control, when it is in cooling state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Temperature"));
parameter Real maxHeaSpe(unit="1")=1
"Maximum fan speed for heating"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Supply setpoints", group="Fan speed"));
parameter Real maxCooSpe(unit="1")=1
"Maximum fan speed for cooling"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Supply setpoints", group="Fan speed"));
parameter Real minSpe(unit="1")=0.1
"Minimum fan speed"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Supply setpoints", group="Fan speed"));
parameter Real spePoiOne=0.5
"Point 1 on x-axis of control map for speed control, when it is in heating state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Fan speed"));
parameter Real spePoiTwo=0.25
"Point 2 on x-axis of control map for speed control, when it is in cooling state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Fan speed"));
parameter Real spePoiThr=0.5
"Point 3 on x-axis of control map for speed control, when it is in cooling state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Fan speed"));
parameter Real spePoiFou=0.75
"Point 4 on x-axis of control map for speed control, when it is in cooling state"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Supply setpoints", group="Fan speed"));
parameter Real looHys=0.05
"Loop output hysteresis below which the output will be seen as zero"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Supply setpoints", group="Hysteresis"));
// ----------- parameters for minimum outdoor airflow setpoints -----------
parameter Boolean permit_occStandby=true
"True: occupied-standby mode is permitted"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Outdoor airflow", group="ASHRAE62.1",
enable=venStd == Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.ASHRAE62_1
and have_occSen));
parameter Real zonDisEff_cool=1.0
"Zone cooling air distribution effectiveness"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Outdoor airflow", group="ASHRAE62.1",
enable=venStd == Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.ASHRAE62_1));
parameter Real zonDisEff_heat=0.8
"Zone heating air distribution effectiveness"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Outdoor airflow", group="ASHRAE62.1",
enable=venStd == Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.ASHRAE62_1));
parameter Real VOccMin_flow=0
"Zone minimum outdoor airflow for occupants"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Outdoor airflow", group="Title 24",
enable=venStd == Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.California_Title_24));
parameter Real VAreMin_flow=0
"Zone minimum outdoor airflow for building area"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Outdoor airflow", group="Title 24",
enable=venStd == Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.California_Title_24));
parameter Real VZonMin_flow=0
"Design zone minimum airflow setpoint"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Outdoor airflow", group="Title 24",
enable=venStd == Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.California_Title_24));
// ----------- parameters for economizer control -----------
parameter Real uMin(unit="1")=0.1
"Lower limit of controller output at which the dampers are at their limits"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Economizer"));
parameter Real uMax(unit="1")=0.9
"Upper limit of controller output at which the dampers are at their limits"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Economizer"));
parameter Buildings.Controls.OBC.CDL.Types.SimpleController ecoModCon=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
"Type of controller"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Economizer", group="Modulation"));
parameter Real kMod=1 "Gain of modulation controller"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Economizer", group="Modulation"));
parameter Real TiMod(unit="s")=300
"Time constant of modulation controller integrator block"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Economizer", group="Modulation",
enable=ecoModCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PI
or ecoModCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
parameter Real TdMod(unit="s")=0.1
"Time constant of derivative block for modulation controller"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Economizer", group="Modulation",
enable=ecoModCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PD
or ecoModCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
parameter Real supFanSpe_min(unit="1")=0.1
"Minimum supply fan operation speed"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Economizer", group="Commissioning"));
parameter Real supFanSpe_max(unit="1")=0.9
"Maximum supply fan operation speed"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real VOutMin_flow(unit="m3/s")=1.0
"Calculated minimum outdoor airflow rate"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real VOutDes_flow(unit="m3/s")=2.0
"Calculated design outdoor airflow rate"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real outDamMinFloMinSpe(unit="1")=0.4
"Outdoor air damper position to supply minimum outdoor airflow at minimum fan speed"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real outDamMinFloMaxSpe(unit="1")=0.3
"Outdoor air damper position to supply minimum outdoor airflow at maximum fan speed"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real outDamDesFloMinSpe(unit="1")=0.9
"Outdoor air damper position to supply design outdoor airflow at minimum fan speed"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real outDamDesFloMaxSpe(unit="1")=0.8
"Outdoor air damper position to supply design outdoor airflow at maximum fan speed"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real outDamPhy_max(unit="1")=1.0
"Physically fixed maximum position of the outdoor air damper"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real outDamPhy_min(unit="1")=0.0
"Physically fixed minimum position of the outdoor air damper"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real retDamPhy_max(unit="1")=1.0
"Physically fixed maximum position of the return air damper"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real retDamPhy_min(unit="1")=0.0
"Physically fixed minimum position of the return air damper"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Commissioning"));
parameter Real delTOutHys(
unit="K",
displayUnit="K")=1
"Delta between the temperature hysteresis high and low limit"
annotation (__cdl(ValueInReference=false), Dialog(tab="Economizer", group="Hysteresis"));
// ----------- parameters for cooling coil control -----------
parameter Buildings.Controls.OBC.CDL.Types.SimpleController cooCoiCon=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
"Type of controller"
annotation (__cdl(ValueInReference=false), Dialog(tab="Cooling coil"));
parameter Real kCooCoi(unit="1/K")=0.1
"Gain for cooling coil control loop signal"
annotation (__cdl(ValueInReference=false), Dialog(tab="Cooling coil"));
parameter Real TiCooCoi(unit="s")=900
"Time constant of integrator block for cooling coil control loop signal"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Cooling coil",
enable=cooCoiCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PI
or cooCoiCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
parameter Real TdCooCoi(unit="s")=0.1
"Time constant of derivative block for cooling coil control loop signal"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Cooling coil",
enable=cooCoiCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PD
or cooCoiCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID));
// ----------- parameters for freeze protection -----------
parameter Integer minHotWatReq=2
"Minimum heating hot-water plant request to active the heating plant"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Freeze protection", enable=have_frePro));
parameter Buildings.Controls.OBC.CDL.Types.SimpleController freHeaCoiCon=
Buildings.Controls.OBC.CDL.Types.SimpleController.PI
"Heating coil controller"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Freeze protection", group="Heating coil control",
enable=heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased and have_frePro));
parameter Real kFreHea=1 "Gain of coil controller"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Freeze protection", group="Heating coil control",
enable=heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased and have_frePro));
parameter Real TiFreHea(unit="s")=0.5
"Time constant of integrator block"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Freeze protection", group="Heating coil control",
enable=heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased and have_frePro and
(freHeaCoiCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PI
or freHeaCoiCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)));
parameter Real TdFreHea(unit="s")=0.1
"Time constant of derivative block"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Freeze protection", group="Heating coil control",
enable=heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased and have_frePro and
(freHeaCoiCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PD
or freHeaCoiCon == Buildings.Controls.OBC.CDL.Types.SimpleController.PID)));
parameter Real yMaxFreHea=1
"Upper limit of output"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Freeze protection", group="Heating coil control",
enable=heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased and have_frePro));
parameter Real yMinFreHea=0
"Lower limit of output"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Freeze protection", group="Heating coil control",
enable=heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased and have_frePro));
// ----------- parameters for building pressure control -----------
parameter Real relDam_min(unit="1")=0.1
"Relief-damper position that maintains a building pressure of 12 Pa while the economizer damper is positioned to provide minimum outdoor air while the supply fan is at minimum speed"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Pressure control", group="Relief damper",
enable=buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefDamper));
parameter Real relDam_max(unit="1")=1
"Relief-damper position that maintains a building pressure of 12 Pa while the economizer damper is fully open and the fan speed is at cooling maximum"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Pressure control", group="Relief damper",
enable=buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefDamper));
parameter Real speDif=-0.1
"Speed difference between supply and return fan to maintain building pressure at desired pressure"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Pressure control", group="Return fan",
enable=(buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)));
parameter Real dpBuiSet(
unit="Pa",
displayUnit="Pa")=12
"Building static pressure difference relative to ambient (positive to pressurize the building)"
annotation (__cdl(ValueInReference=true),
Dialog(tab="Pressure control",
enable=buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
and have_ahuRelFan));
parameter Real relFanSpe_min(
final min=0,
final max=1)= 0.1
"Relief fan minimum speed"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Pressure control", group="Relief fan",
enable=buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
and have_ahuRelFan));
parameter Real kRelFan(unit="1")=1
"Gain of relief fan controller, normalized using dpBuiSet"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Pressure control", group="Relief fan",
enable=buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
and have_ahuRelFan));
// ----------- Advanced -----------
parameter Real posHys=0.01 "Hysteresis for damper position check"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Advanced", group="Hysteresis"));
parameter Real THys(unit="K")=0.25
"Hysteresis for checking temperature difference"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Advanced", group="Hysteresis"));
parameter Real delEntHys(unit="J/kg")=1000
"Delta between the enthalpy hysteresis high and low limits"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Advanced", group="Hysteresis",
enable = (ecoHigLimCon == Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.DifferentialEnthalpyWithFixedDryBulb
or ecoHigLimCon == Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.FixedEnthalpyWithFixedDryBulb)));
parameter Real floHys(unit="m3/s")=0.01*VOutMin_flow
"Near zero flow rate, below which the flow rate or difference will be seen as zero"
annotation (__cdl(ValueInReference=false),
Dialog(tab="Advanced", group="Hysteresis"));
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOut(
final unit="K",
displayUnit="degC",
final quantity = "ThermodynamicTemperature")
"Outside air temperature"
annotation (Placement(transformation(extent={{-300,470},{-260,510}}),
iconTransformation(extent={{-240,370},{-200,410}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput cooDowTim(
final unit="s",
final quantity="Time")
"Cool-down time retrieved from optimal cool-down block"
annotation (Placement(transformation(extent={{-300,440},{-260,480}}),
iconTransformation(extent={{-240,340},{-200,380}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput warUpTim(
final unit="s",
final quantity="Time")
"Warm-up time retrieved from optimal warm-up block"
annotation (Placement(transformation(extent={{-300,410},{-260,450}}),
iconTransformation(extent={{-240,320},{-200,360}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Occ
"Current occupancy period, true if it is in occupant period"
annotation (Placement(transformation(extent={{-300,380},{-260,420}}),
iconTransformation(extent={{-240,290},{-200,330}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput tNexOcc(
final unit="s",
final quantity="Time")
"Time to next occupied period"
annotation (Placement(transformation(extent={{-300,356},{-260,396}}),
iconTransformation(extent={{-240,270},{-200,310}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput TZon(
final unit="K",
displayUnit="degC",
final quantity = "ThermodynamicTemperature")
"Measured zone temperatures"
annotation (Placement(transformation(extent={{-300,320},{-260,360}}),
iconTransformation(extent={{-240,240},{-200,280}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccHeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
"Zone occupied heating setpoint temperatures"
annotation (Placement(transformation(extent={{-300,300},{-260,340}}),
iconTransformation(extent={{-240,220},{-200,260}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOccCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
"Zone occupied cooling setpoint temperatures"
annotation (Placement(transformation(extent={{-300,280},{-260,320}}),
iconTransformation(extent={{-240,200},{-200,240}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoHeaSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
"Zone unoccupied heating setpoint temperatures"
annotation (Placement(transformation(extent={{-300,260},{-260,300}}),
iconTransformation(extent={{-240,180},{-200,220}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput TUnoCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
"Zone unoccupied cooling setpoint temperatures"
annotation (Placement(transformation(extent={{-300,240},{-260,280}}),
iconTransformation(extent={{-240,160},{-200,200}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput setAdj
if have_locAdj and not sepAdj
"Setpoint adjustment value"
annotation (Placement(transformation(extent={{-300,210},{-260,250}}),
iconTransformation(extent={{-240,140},{-200,180}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput cooSetAdj
if have_locAdj and sepAdj
"Cooling setpoint adjustment value"
annotation (Placement(transformation(extent={{-300,180},{-260,220}}),
iconTransformation(extent={{-240,120},{-200,160}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput heaSetAdj
if have_locAdj and sepAdj
"Heating setpoint adjustment value"
annotation (Placement(transformation(extent={{-300,150},{-260,190}}),
iconTransformation(extent={{-240,100},{-200,140}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1OccSen if have_occSen
"Occupancy sensor (occupied=true, unoccupied=false)"
annotation (Placement(transformation(extent={{-300,120},{-260,160}}),
iconTransformation(extent={{-240,70},{-200,110}})));
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uCooDemLimLev
"Cooling demand limit level"
annotation (Placement(transformation(extent={{-300,90},{-260,130}}),
iconTransformation(extent={{-240,40},{-200,80}})));
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput uHeaDemLimLev
"Heating demand limit level"
annotation (Placement(transformation(extent={{-300,60},{-260,100}}),
iconTransformation(extent={{-240,20},{-200,60}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput ppmCO2Set if have_CO2Sen
"CO2 concentration setpoint"
annotation (Placement(transformation(extent={{-300,30},{-260,70}}),
iconTransformation(extent={{-240,-10},{-200,30}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput ppmCO2 if have_CO2Sen
"Detected CO2 concentration"
annotation (Placement(transformation(extent={{-300,0},{-260,40}}),
iconTransformation(extent={{-240,-30},{-200,10}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirSup(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
"Measured supply air temperature"
annotation (Placement(transformation(extent={{-300,-30},{-260,10}}),
iconTransformation(extent={{-240,-60},{-200,-20}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Win if have_winSen
"Window status, normally closed (true), when windows open, it becomes false"
annotation (Placement(transformation(extent={{-300,-60},{-260,-20}}),
iconTransformation(extent={{-240,-90},{-200,-50}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput hOut(
final unit="J/kg",
final quantity="SpecificEnergy")
if (ecoHigLimCon == Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.DifferentialEnthalpyWithFixedDryBulb
or ecoHigLimCon == Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.FixedEnthalpyWithFixedDryBulb)
"Outdoor air enthalpy"
annotation (Placement(transformation(extent={{-300,-100},{-260,-60}}),
iconTransformation(extent={{-240,-120},{-200,-80}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput hAirRet(
final unit="J/kg",
final quantity="SpecificEnergy")
if (eneStd == Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1
and ecoHigLimCon == Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.DifferentialEnthalpyWithFixedDryBulb)
"Return air enthalpy"
annotation (Placement(transformation(extent={{-300,-130},{-260,-90}}),
iconTransformation(extent={{-240,-140},{-200,-100}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirRet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
if ecoHigLimCon == Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.DifferentialDryBulb
"Used only for fixed plus differential dry bulb temperature high limit cutoff"
annotation (Placement(transformation(extent={{-300,-160},{-260,-120}}),
iconTransformation(extent={{-240,-160},{-200,-120}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1FreSta if freSta ==
Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_BAS
"Freeze protection stat signal. The stat is normally close (the input is normally true), when enabling freeze protection, the input becomes false"
annotation (Placement(transformation(extent={{-300,-190},{-260,-150}}),
iconTransformation(extent={{-240,-190},{-200,-150}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SofSwiRes
if (freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.No_freeze_stat
or freSta == Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.Hardwired_to_equipment)
"Freeze protection reset signal from software switch"
annotation (Placement(transformation(extent={{-300,-220},{-260,-180}}),
iconTransformation(extent={{-240,-210},{-200,-170}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpBui(
final unit="Pa",
displayUnit="Pa",
final quantity="PressureDifference") if have_ahuRelFan and buiPreCon ==
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
"Measured building static pressure difference, relative to ambient (positive if pressurized)"
annotation (Placement(transformation(extent={{-300,-248},{-260,-208}}),
iconTransformation(extent={{-240,-240},{-200,-200}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1RelFan if buiPreCon ==
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan and not
have_ahuRelFan
"Relief fan commanded on"
annotation (Placement(transformation(extent={{-300,-270},{-260,-230}}),
iconTransformation(extent={{-240,-260},{-200,-220}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput uRelFan(
final min=0,
final max=1,
final unit="1") if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
and not have_ahuRelFan
"Relief fan commanded speed"
annotation (Placement(transformation(extent={{-300,-300},{-260,-260}}),
iconTransformation(extent={{-240,-280},{-200,-240}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput TAirMix(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
"Measured mixed air temperature, used for freeze protection"
annotation (Placement(transformation(extent={{-300,-330},{-260,-290}}),
iconTransformation(extent={{-240,-310},{-200,-270}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput uOutDam(
final min=0,
final max=1,
final unit="1") if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefDamper
"Outdoor damper position"
annotation (Placement(transformation(extent={{-300,-360},{-260,-320}}),
iconTransformation(extent={{-240,-330},{-200,-290}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput uSupFan_actual(
final min=0,
final max=1,
final unit="1")
"Actual supply fan speed"
annotation (Placement(transformation(extent={{-300,-390},{-260,-350}}),
iconTransformation(extent={{-240,-360},{-200,-320}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput uCooCoi_actual(
final min=0,
final max=1,
final unit="1")
"Cooling coil valve actual position"
annotation (Placement(transformation(extent={{-300,-430},{-260,-390}}),
iconTransformation(extent={{-240,-390},{-200,-350}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput uHeaCoi_actual(
final min=0,
final max=1,
final unit="1")
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
"Heating coil valve actual position"
annotation (Placement(transformation(extent={{-300,-470},{-260,-430}}),
iconTransformation(extent={{-240,-410},{-200,-370}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TSupHeaEcoSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
"Temperature setpoint for heating coil and for economizer"
annotation (Placement(transformation(extent={{260,340},{300,380}}),
iconTransformation(extent={{200,290},{240,330}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TSupCooSet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
"Cooling supply air temperature setpoint"
annotation (Placement(transformation(extent={{260,310},{300,350}}),
iconTransformation(extent={{200,240},{240,280}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonHeaSet(
final unit="K",
displayUnit="degC",
final quantity = "ThermodynamicTemperature")
"Zone heating setpoint temperature"
annotation (Placement(transformation(extent={{260,280},{300,320}}),
iconTransformation(extent={{200,200},{240,240}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TZonCooSet(
final unit="K",
displayUnit="degC",
final quantity = "ThermodynamicTemperature")
"Zone cooling setpoint temperature"
annotation (Placement(transformation(extent={{260,250},{300,290}}),
iconTransformation(extent={{200,170},{240,210}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1EneCHWPum
if have_frePro
"Commanded on to energize chilled water pump"
annotation (Placement(transformation(extent={{260,160},{300,200}}),
iconTransformation(extent={{200,130},{240,170}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRetDam(
final min=0,
final max=1,
final unit="1")
"Return air damper commanded position"
annotation (Placement(transformation(extent={{260,120},{300,160}}),
iconTransformation(extent={{200,100},{240,140}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yOutDam(
final min=0,
final max=1,
final unit="1")
"Outdoor air damper commanded position"
annotation (Placement(transformation(extent={{260,90},{300,130}}),
iconTransformation(extent={{200,70},{240,110}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1SupFan
"Supply fan commanded on"
annotation (Placement(transformation(extent={{260,50},{300,90}}),
iconTransformation(extent={{200,40},{240,80}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput ySupFan(
final min=0,
final max=1,
final unit="1")
"Supply fan commanded speed"
annotation (Placement(transformation(extent={{260,20},{300,60}}),
iconTransformation(extent={{200,20},{240,60}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RetFan if (buiPreCon
== Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
"Return fan commanded on"
annotation (Placement(transformation(extent={{260,-20},{300,20}}),
iconTransformation(extent={{200,-10},{240,30}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRetFan(
final min=0,
final max=1,
final unit="1") if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
"Return fan commanded speed"
annotation (Placement(transformation(extent={{260,-50},{300,-10}}),
iconTransformation(extent={{200,-30},{240,10}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1RelFan if buiPreCon ==
Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
"Relief fan commanded on"
annotation (Placement(transformation(extent={{260,-90},{300,-50}}),
iconTransformation(extent={{200,-60},{240,-20}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRelFan(
final min=0,
final max=1,
final unit="1") if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan
"Relief fan commanded speed"
annotation (Placement(transformation(extent={{260,-120},{300,-80}}),
iconTransformation(extent={{200,-80},{240,-40}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yCooCoi(
final min=0,
final max=1,
final unit="1") "Cooling coil valve commanded position"
annotation (Placement(transformation(extent={{260,-170},{300,-130}}),
iconTransformation(extent={{200,-130},{240,-90}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHeaCoi(
final min=0,
final max=1,
final unit="1")
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
"Heating coil valve commanded position"
annotation (Placement(transformation(extent={{260,-200},{300,-160}}),
iconTransformation(extent={{200,-160},{240,-120}})));
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yAla if have_frePro
"Alarm level"
annotation (Placement(transformation(extent={{260,-230},{300,-190}}),
iconTransformation(extent={{200,-190},{240,-150}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yRelDam(
final min=0,
final max=1,
final unit="1") if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefDamper
or (have_ahuRelFan and buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefFan)
"Relief damper commanded position"
annotation (Placement(transformation(extent={{260,-290},{300,-250}}),
iconTransformation(extent={{200,-230},{240,-190}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ExhDam if (buiPreCon
== Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
"Exhaust damper command on"
annotation (Placement(transformation(extent={{260,-320},{300,-280}}),
iconTransformation(extent={{200,-260},{240,-220}})));
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiWatResReq
"Chilled water reset request"
annotation (Placement(transformation(extent={{260,-380},{300,-340}}),
iconTransformation(extent={{200,-312},{240,-272}})));
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yChiPlaReq
"Chiller plant request"
annotation (Placement(transformation(extent={{260,-410},{300,-370}}),
iconTransformation(extent={{200,-340},{240,-300}})));
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatResReq
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
"Hot water reset request"
annotation (Placement(transformation(extent={{260,-460},{300,-420}}),
iconTransformation(extent={{200,-370},{240,-330}})));
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yHotWatPlaReq
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased
"Hot water plant request"
annotation (Placement(transformation(extent={{260,-500},{300,-460}}),
iconTransformation(extent={{200,-400},{240,-360}})));
Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.Supply setPoiVAV(
final TSup_max=TSup_max,
final TSup_min=TSup_min,
final TSupDew_max=TSupDew_max,
final TSupDea_min=TSupDea_min,
final TSupDea_max=TSupDea_max,
final maxHeaSpe=maxHeaSpe,
final maxCooSpe=maxCooSpe,
final minSpe=minSpe,
final temPoiOne=temPoiOne,
final temPoiTwo=temPoiTwo,
final temPoiThr=temPoiThr,
final temPoiFou=temPoiFou,
final spePoiOne=spePoiOne,
final spePoiTwo=spePoiTwo,
final spePoiThr=spePoiThr,
final spePoiFou=spePoiFou)
"Supply air set point and fan signal for single zone VAV system"
annotation (Placement(transformation(extent={{-20,390},{0,410}})));
Buildings.Controls.OBC.CDL.Reals.PIDWithReset cooPI(
final controllerType=cooLooCon,
final k=kCoo,
final Ti=TiCoo,
final Td=TdCoo,
final reverseActing=false)
"Zone cooling control signal"
annotation (Placement(transformation(extent={{-90,350},{-70,370}})));
Buildings.Controls.OBC.CDL.Reals.PIDWithReset heaPI(
final controllerType=heaLooCon,
final k=kHea,
final Ti=TiHea,
final Td=TdHea)
"Zone heating control signal"
annotation (Placement(transformation(extent={{-130,420},{-110,440}})));
Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.Economizers.Controller conEco(
final eneStd=eneStd,
final ecoHigLimCon=ecoHigLimCon,
final ashCliZon=ashCliZon,
final tit24CliZon=tit24CliZon,
final have_heaCoi=heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased or heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.Electric,
final uMin=uMin,
final uMax=uMax,
final controllerTypeMod=ecoModCon,
final kMod=kMod,
final TiMod=TiMod,
final TdMod=TdMod,
final delTOutHys=delTOutHys,
final delEntHys=delEntHys,
final floHys=floHys,
final supFanSpe_min=supFanSpe_min,
final supFanSpe_max=supFanSpe_max,
final VOutMin_flow=VOutMin_flow,
final VOutDes_flow=VOutDes_flow,
final outDamMinFloMinSpe=outDamMinFloMinSpe,
final outDamMinFloMaxSpe=outDamMinFloMaxSpe,
final outDamDesFloMinSpe=outDamDesFloMinSpe,
final outDamDesFloMaxSpe=outDamDesFloMaxSpe,
final outDamPhy_max=outDamPhy_max,
final outDamPhy_min=outDamPhy_min,
final retDamPhy_max=retDamPhy_max,
final retDamPhy_min=retDamPhy_min) "Economizer control sequence"
annotation (Placement(transformation(extent={{60,140},{80,180}})));
Buildings.Controls.OBC.ASHRAE.G36.VentilationZones.ASHRAE62_1.Setpoints
outAirSetPoi(
final have_winSen=have_winSen,
final have_occSen=have_occSen,
final have_CO2Sen=have_CO2Sen,
final have_SZVAV=true,
final permit_occStandby=permit_occStandby,
final VAreBreZon_flow=VAreBreZon_flow,
final VPopBreZon_flow=VPopBreZon_flow,
final VMin_flow=0,
final zonDisEff_cool=zonDisEff_cool,
final zonDisEff_heat=zonDisEff_heat,
final dTHys=THys) if venStd == Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.ASHRAE62_1
"Output the minimum outdoor airflow rate setpoint, when using ASHRAE 62.1"
annotation (Placement(transformation(extent={{-20,240},{0,260}})));
Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.ZoneStates zonSta "Zone state"
annotation (Placement(transformation(extent={{-20,320},{0,340}})));
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.unoccupied)
"Unoccupied mode"
annotation (Placement(transformation(extent={{-220,-70},{-200,-50}})));
Buildings.Controls.OBC.CDL.Integers.Equal intEqu
"Check if current operation mode is unoccupied mode"
annotation (Placement(transformation(extent={{-150,-70},{-130,-50}})));
Buildings.Controls.OBC.CDL.Logical.Not switch "If in unoccupied mode, switch off"
annotation (Placement(transformation(extent={{-120,-70},{-100,-50}})));
Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.ModeAndSetPoints modSetPoi(
final have_winSen=have_winSen,
final have_occSen=have_occSen,
final have_locAdj=have_locAdj,
final sepAdj=sepAdj,
final ignDemLim=ignDemLim,
final TActCoo_max=TActCoo_max,
final TActCoo_min=TActCoo_min,
final TActHea_max=TActHea_max,
final TActHea_min=TActHea_min,
final TWinOpeCooSet=TWinOpeCooSet,
final TWinOpeHeaSet=TWinOpeHeaSet,
final incTSetDem_1=incTSetDem_1,
final incTSetDem_2=incTSetDem_2,
final incTSetDem_3=incTSetDem_3,
final decTSetDem_1=decTSetDem_1,
final decTSetDem_2=decTSetDem_2,
final decTSetDem_3=decTSetDem_3,
final bouLim=bouLim,
final uLow=uLow,
final uHigh=uHigh,
final preWarCooTim=preWarCooTim,
final TZonFreProOn=TZonFreProOn,
final TZonFreProOff=TZonFreProOff)
"Output zone setpoint with operation mode selection"
annotation (Placement(transformation(extent={{-200,360},{-180,400}})));
Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.CoolingCoil cooCoiVal(
final controllerTypeCooCoi=cooCoiCon,
final kCooCoi=kCooCoi,
final TiCooCoi=TiCooCoi,
final TdCooCoi=TdCooCoi) "Controller for cooling coil valve"
annotation (Placement(transformation(extent={{60,40},{80,60}})));
Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.FreezeProtection frePro(
final buiPreCon=buiPreCon,
final freSta=freSta,
final heaCoi=heaCoi,
final minHotWatReq=minHotWatReq,
final heaCoiCon=freHeaCoiCon,
final k=kFreHea,
final Ti=TiFreHea,
final Td=TdFreHea,
final yMax=yMaxFreHea,
final yMin=yMinFreHea,
final THys=THys) "Freeze protection"
annotation (Placement(transformation(extent={{140,-150},{160,-110}})));
Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.PlantRequests plaReq(
final heaCoi=heaCoi,
final THys=THys,
final posHys=posHys) "Plant request"
annotation (Placement(transformation(extent={{60,-420},{80,-400}})));
Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.ReliefDamper relDam(
final relDam_min=relDam_min,
final relDam_max=relDam_max,
final posHys=posHys) if buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReliefDamper
"Relief damper control"
annotation (Placement(transformation(extent={{60,-280},{80,-260}})));
Buildings.Controls.OBC.ASHRAE.G36.AHUs.SingleZone.VAV.SetPoints.ReturnFan retFan(
final speDif=speDif) if (buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanMeasuredAir
or buiPreCon == Buildings.Controls.OBC.ASHRAE.G36.Types.PressureControl.ReturnFanDp)
"Return fan control"
annotation (Placement(transformation(extent={{60,-372},{80,-352}})));
Buildings.Controls.OBC.CDL.Integers.Switch intSwi
if heaCoi==Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased