A Framework for Distributed
                 Control and Building
               Performance Simulation


     Azzedine Yahiaoui1 and Abd-El-Kader Sahraoui2
                   for Building & Systems TNO – TU/e,
             1Center

        Technische Universiteit Eindhoven, The Netherlands
            2Systems Engineering & Integration Group,

                LAAS-CNRS of Toulouse , France


CoMetS'12, June 25-27, Toulouse
Outlines

Problem Statement
Building Automation and Control Systems
Classical and Advanced Control Systems
Integration Possibilities
Development and Implementation of a
Distributed Dynamic Simulation Mechanism
Modelling: Example of Application
Simulation Results
Conclusions and Future Work
                                           2
Problem Statement (1)

Domain based Control Modeling Environment
(e.g., Matlab/Simulink)
   very advanced in control systems design
   but still limited in building performance simulation
Domain specific Building Performance
Simulation (e.g., ESP-r)
   relatively based on modeling of building zone, plant ...

Marrying two approaches by run-time coupling
   integrated building performance assessments
                                                               3
Problem Statement (2)

Extending this potential by distributing
one or more ESP-r(s) with
Matlab/Simulink over a network
   typical pattern of distributed simulation
    between control systems and building
    performance applications
   as qualified by similarity to BACS
    architecture

                                                4
Building Automation and Control Systems

                                                       ‘LonMark’
                  Central computer
 Control & 1                                                Protocols
Management



                      Netwerk
  Protocol    2
                    Substation
                    (computer)            Substation
                                                       ‘BACnet’

                                     +
 Building &
   Plants     3
                                     -




                   General architecture of BACS
                  Modern BACS Architecture                         5
AdvancedControl Applications
     Classical Control Applications
                                                                 Input
                                      MATLAB          ESP-r
                                                              disturbance
             •Optimal Control                                    di
Reference
          ri + •Predictive Control u
                  ei Control                                                yi
                                     i
command              •Fuzzy Logic         Send        Rec.     Room
                 -           law
                       •Neural Nets      Communication
                            •…             mechanism
                                           Rec.       Send

                        1                         2                   3


                            Building Control Application                         6
Integration Possibilities
                      These APIs must present the highest
                      possible abstraction meaningful to
                      run-time coupled software tools


      ESP-r           Matlab/Simulink
                                              • Shared file
                                              • Pipes
control      data     control    data
                                              • Shared Memory
    Struct function         MEX-file
                                              • Sockets
                                              (XML/SOAP)

  run-time coupling infrastructure            • CORBA
                                              • HLA
                                              •…              7
Classification Different Possibilities

 Trade-Off Analysis
   Requirements Flexibility   Reliability   Concurrency   Scalability   Transparency   Applicability
IPC
Pipe                +             +             +              +             +              −+
Standard File       +             −             +              +            −+              −+
Shared memory       ++            ++            +             ++            ++              +
Socket              ++            ++            ++            ++            ++              ++
CORBA               ++            ++            ++            ++            ++              −


   Performance comparison and ease use indicated
    Sockets were best suited for Development and

     Implementation of run-time coupling between two
     or more software tools on different platforms
                                                                                                   8
SE Structured Approach to run-
       time coupling Development (1)
Level of
Abstraction
                                    User’s                                                                                                Acceptance
                                 Requirements                                                                                                Test


                                          System                                                                                    System
                                        Requirements                                                                                 Test


                                             System Architecture                                                           Integration
                                                 and Design                                                                    Test
          System Level


                                       Technical                         Sub-System                   Technical                          Sub-System
                                      Requirements                          Test                     Requirements                           Test


                                            High Level                                                       High Level            Integration
                                             Design                   Integration                             Design                   Test
                                                                          Test
          Sub-System Level


                   Software                      Integration       Communication                     Integration      Software                      Integration
                 Requirements                        Test           Requirements                         Test       Requirements                        Test


                         High Level             Unit                    High Level              Unit                      High Level               Unit
                          Design                Test                     Design                 Test                       Design                  Test


                                  Integration                                       Implementation                                   Integration

          Component Level
                                Building Model                              Run-Time Coupling                                       Controller
                                                                               Mechanism
                                                                                                                                                                         9
                                                                                                                                                                  Time
SE Structured Approach to run-
time coupling Development (2)




                                 10
Run-Time Coupling Implementation

        advantage of modeling building model and its control
        systems separately and using different platforms




                                                                            or Windows
or Windows




                                                                            Unix-variant
Unix-variant




                  ESP-r                                   Matlab/Simulink



                                      network


                                         2                    3
                     1      Run-time coupling between ESP-r
               Distributed Control and Building Performance Simulation
                                    and Matlab/Simulink                              11
Conceptual Design & User Interfaces




    Matlab Side      ESP-r Side
                                  12
Extension of Run-Time Coupling
         to Represent BACS in Simulation
     Extension Possibilities for
        Multiplexing (using select() function)
        Broadcasting (using SO_BROADCAST API)
        Multitasking (using POSIX treads – library)

          ESP-r (1)           ESP-r (9)                    Matlab



Conventional representation               Equivalence in V-lifecycle model
             Run-time Coupling Infrastructure
    Conceptual view of a Distributed simulation between
       Matlab/Simulink and one or more ESP-r (s)                             13
Distributed Simulation Mechanism
         for BACS representation

1




2




3




                                       14
Run-Time Coupling Options

Data Exchange Formats:
   ASCII format
   Binary format
   Web-Services (SOAP/XML) format

Communication Modes:
   Synchronous
   Asynchronous
   Partially Synchronous
                                     15
Modelling: Example of Application

Control of Building Heating System




                                      16
Modelling: Example of Application

       Control of Building Heating System

             Matlab/Simulink   ESP-r


                                                         Sensors

                                              Building



                                  Actuators
References
             Control systems




                                                                   17
Simulation Results: Continuous and
     Digital Control Systems




 Simulation results obtained with continuous PI control system




                                                                 18
 Simulation results obtained with discrete PI control system
Conclusion & Future Work

A distributed simulation mechanism for BACS
technology by run-time coupling Matlab/Simulink and
one or more ESP-r(s) is implemented as a practical
solution for improving control applications in ABs
Using a SE methodology to define all required
functionalities in the development, implementation,
validation, and operation of run-time coupling
between ESP-r and Matlab/Simulink early in V-moel
Future work will envisage to analyze and simulate
complex and large-scale building control applications
involving the utilization of multiple ESP-r(s) by run-
time coupling to Matlab/Simulink
                                                      19
Any Questions & Comments


  Thank you for your
    kind attention




                           20

A framework for distributed control and building performance simulation

  • 1.
    A Framework forDistributed Control and Building Performance Simulation Azzedine Yahiaoui1 and Abd-El-Kader Sahraoui2 for Building & Systems TNO – TU/e, 1Center Technische Universiteit Eindhoven, The Netherlands 2Systems Engineering & Integration Group, LAAS-CNRS of Toulouse , France CoMetS'12, June 25-27, Toulouse
  • 2.
    Outlines Problem Statement Building Automationand Control Systems Classical and Advanced Control Systems Integration Possibilities Development and Implementation of a Distributed Dynamic Simulation Mechanism Modelling: Example of Application Simulation Results Conclusions and Future Work 2
  • 3.
    Problem Statement (1) Domainbased Control Modeling Environment (e.g., Matlab/Simulink)  very advanced in control systems design  but still limited in building performance simulation Domain specific Building Performance Simulation (e.g., ESP-r)  relatively based on modeling of building zone, plant ... Marrying two approaches by run-time coupling  integrated building performance assessments 3
  • 4.
    Problem Statement (2) Extendingthis potential by distributing one or more ESP-r(s) with Matlab/Simulink over a network  typical pattern of distributed simulation between control systems and building performance applications  as qualified by similarity to BACS architecture 4
  • 5.
    Building Automation andControl Systems ‘LonMark’ Central computer Control & 1 Protocols Management Netwerk Protocol 2 Substation (computer) Substation ‘BACnet’ + Building & Plants 3 - General architecture of BACS Modern BACS Architecture 5
  • 6.
    AdvancedControl Applications Classical Control Applications Input MATLAB ESP-r disturbance •Optimal Control di Reference ri + •Predictive Control u ei Control yi i command •Fuzzy Logic Send Rec. Room - law •Neural Nets Communication •… mechanism Rec. Send 1 2 3 Building Control Application 6
  • 7.
    Integration Possibilities These APIs must present the highest possible abstraction meaningful to run-time coupled software tools ESP-r Matlab/Simulink • Shared file • Pipes control data control data • Shared Memory Struct function MEX-file • Sockets (XML/SOAP) run-time coupling infrastructure • CORBA • HLA •… 7
  • 8.
    Classification Different Possibilities Trade-Off Analysis Requirements Flexibility Reliability Concurrency Scalability Transparency Applicability IPC Pipe + + + + + −+ Standard File + − + + −+ −+ Shared memory ++ ++ + ++ ++ + Socket ++ ++ ++ ++ ++ ++ CORBA ++ ++ ++ ++ ++ − Performance comparison and ease use indicated  Sockets were best suited for Development and Implementation of run-time coupling between two or more software tools on different platforms 8
  • 9.
    SE Structured Approachto run- time coupling Development (1) Level of Abstraction User’s Acceptance Requirements Test System System Requirements Test System Architecture Integration and Design Test System Level Technical Sub-System Technical Sub-System Requirements Test Requirements Test High Level High Level Integration Design Integration Design Test Test Sub-System Level Software Integration Communication Integration Software Integration Requirements Test Requirements Test Requirements Test High Level Unit High Level Unit High Level Unit Design Test Design Test Design Test Integration Implementation Integration Component Level Building Model Run-Time Coupling Controller Mechanism 9 Time
  • 10.
    SE Structured Approachto run- time coupling Development (2) 10
  • 11.
    Run-Time Coupling Implementation advantage of modeling building model and its control systems separately and using different platforms or Windows or Windows Unix-variant Unix-variant ESP-r Matlab/Simulink network 2 3 1 Run-time coupling between ESP-r Distributed Control and Building Performance Simulation and Matlab/Simulink 11
  • 12.
    Conceptual Design &User Interfaces Matlab Side ESP-r Side 12
  • 13.
    Extension of Run-TimeCoupling to Represent BACS in Simulation Extension Possibilities for  Multiplexing (using select() function)  Broadcasting (using SO_BROADCAST API)  Multitasking (using POSIX treads – library) ESP-r (1) ESP-r (9) Matlab Conventional representation Equivalence in V-lifecycle model Run-time Coupling Infrastructure Conceptual view of a Distributed simulation between Matlab/Simulink and one or more ESP-r (s) 13
  • 14.
    Distributed Simulation Mechanism for BACS representation 1 2 3 14
  • 15.
    Run-Time Coupling Options DataExchange Formats:  ASCII format  Binary format  Web-Services (SOAP/XML) format Communication Modes:  Synchronous  Asynchronous  Partially Synchronous 15
  • 16.
    Modelling: Example ofApplication Control of Building Heating System 16
  • 17.
    Modelling: Example ofApplication Control of Building Heating System Matlab/Simulink ESP-r Sensors Building Actuators References Control systems 17
  • 18.
    Simulation Results: Continuousand Digital Control Systems Simulation results obtained with continuous PI control system 18 Simulation results obtained with discrete PI control system
  • 19.
    Conclusion & FutureWork A distributed simulation mechanism for BACS technology by run-time coupling Matlab/Simulink and one or more ESP-r(s) is implemented as a practical solution for improving control applications in ABs Using a SE methodology to define all required functionalities in the development, implementation, validation, and operation of run-time coupling between ESP-r and Matlab/Simulink early in V-moel Future work will envisage to analyze and simulate complex and large-scale building control applications involving the utilization of multiple ESP-r(s) by run- time coupling to Matlab/Simulink 19
  • 20.
    Any Questions &Comments Thank you for your kind attention 20