SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Interfacing EMTP-RV with other
software using C++



Jean-Gabriel Roumy
April 30th, 2009
Overview


    > EMTP-RV DLL interface
    > Interface implementation using C++
    > Usage
       •   Simulink
       •   3rd party software
       •   Distributed Simulation
    > Future work


2                      Groupe – Technologie
EMTP DLL Interface


    > What is the DLL Interface ?
       •   DLL is an external, separate piece of code
           linked to EMTP-RV at run-time
       •   EMTP-RV offers an API allowing the
           implementation of user models
       •   API includes all functions necessary to
           interact with computational engine
       •   API functions and structures are written in
           FORTRAN 95

3                       Groupe – Technologie
DLL Interface in C++


    > Why C++ ?
       •   Interface with 3rd-party software
    > C++ interface maps EMTP memory
      space
    > C++ skeleton that handles all calls
      to/from EMTP
    > User implements interface functions



4                      Groupe – Technologie
Interface Usage


    > Linking with control code
    > Controllable and observable signals are
      inputs/outputs to 3rd-party control
      libraries
    > No participation from user model in
      system matrices




5                  Groupe – Technologie
Using Simulink design in EMTP


    > Protection relay algorithm developped
      at IREQ using Simulink
    > Impossible to duplicate design in EMTP
    > Production code and model code stem
      from single simulink design




6                  Groupe – Technologie
Using Simulink design in EMTP


    > Use existing Simulink designs
    > Availability of Simulink extensive list of
      toolboxes
    > Complex Simulink models
       •   Multiple sample times
       •   C-language S-functions
    > Simulink code is portable, compact, fast
      and efficient

7                      Groupe – Technologie
Using Simulink design in EMTP


    > C++ code generated with Embedded
      Real-Time toolbox
    > User defines inputs, outputs, tunable
      parameters
    > Compiled design has 3 top-level
      functions
       •   Initialise
       •   Step
       •   Terminate
8                       Groupe – Technologie
Simulink DLL Interface Architecture


                                               U se r M o d el
                                                       C + + DL L
        E M T P -R V                          In sta nc e 1

                                               L o ca l Da ta
                                               Str u ct u res   S im u link
                                                                Co de
                                              In s ta nce 2

                                              L o c al D a ta
                                              S tru ctu re s




9                      Groupe – Technologie
Generating Simulink DLL Interface


     > Integrate Simulink code to interface
       code and compile together
     > Use observable and controllable signals
       as input/output pins in EMTP
     > Generate symbol in EMTP




10                   Groupe – Technologie
Limitations


     > If Simulink design is modified, must
       regenerate and compile
     > Each design requires customizing
       interface code
     > Matlab variable initialisation cannot be
       compiled
     > Fixed time step



11                   Groupe – Technologie
Linking with 3rd party software


     > Coupling with other C++ models
     > 3rd party can provide black-box models
       generated with their own software
     > Example : HVDC controller model
       generated by manufacturer, provided to
       HQ as black-box model




12                  Groupe – Technologie
Distributed Simulation


     > High Level Architecture is IEEE
       standard
     > Federation controlled by RTI
     > Distributed simulation can be
       performed with any HLA compatible
       software
     > EMTP DLL interface acts as bridge
       between EMTP and RTI


13                   Groupe – Technologie
Distributed Simulation


     > NS2 (telecom simulator) modified to
       support HLA
     > Co-simulation run with NS2 and EMTP
     > Drawback : high overhead, not
       necessary to share at each timestep
     > Early steps of development




14                  Groupe – Technologie
Future Work


     > Get the process of generating a model
       more user-friendly and generic
     > Co-simulation with Simulink
     > Development of HLA co-simulation




15                  Groupe – Technologie
The end


     > Questions ?




16                   Groupe – Technologie

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (7)

Lesson 6.2 logic error
Lesson  6.2 logic errorLesson  6.2 logic error
Lesson 6.2 logic error
 
Lesson 9.2 guessing the game program
Lesson 9.2 guessing the game programLesson 9.2 guessing the game program
Lesson 9.2 guessing the game program
 
ziad_cv
ziad_cvziad_cv
ziad_cv
 
Csit77404
Csit77404Csit77404
Csit77404
 
An Update on the European Processor Initiative
An Update on the European Processor InitiativeAn Update on the European Processor Initiative
An Update on the European Processor Initiative
 
Lean Model-Driven Development through Model-Interpretation: the CPAL design ...
Lean Model-Driven Development through  Model-Interpretation: the CPAL design ...Lean Model-Driven Development through  Model-Interpretation: the CPAL design ...
Lean Model-Driven Development through Model-Interpretation: the CPAL design ...
 
Lesson 7.2 using counters and accumulators
Lesson 7.2 using counters and accumulatorsLesson 7.2 using counters and accumulators
Lesson 7.2 using counters and accumulators
 

Ähnlich wie Hydro Quebec Roumy Interfacing Emtp Rv Withothersoftware Using C++

Qiang Yu Resume
Qiang Yu Resume Qiang Yu Resume
Qiang Yu Resume
Qiang Yu
 
Dipak_Desai_Resume
Dipak_Desai_ResumeDipak_Desai_Resume
Dipak_Desai_Resume
notoha
 
An introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_cAn introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_c
Suresh Murugesan
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous Computing
Ruymán Reyes
 

Ähnlich wie Hydro Quebec Roumy Interfacing Emtp Rv Withothersoftware Using C++ (20)

Qiang Yu Resume
Qiang Yu Resume Qiang Yu Resume
Qiang Yu Resume
 
Ankit sarin
Ankit sarinAnkit sarin
Ankit sarin
 
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking TechnologyDesign of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
 
Dipak_Desai_Resume
Dipak_Desai_ResumeDipak_Desai_Resume
Dipak_Desai_Resume
 
Larson and toubro
Larson and toubroLarson and toubro
Larson and toubro
 
SequenceL Auto-Parallelizing Toolset Intro slideshare
SequenceL Auto-Parallelizing Toolset Intro slideshareSequenceL Auto-Parallelizing Toolset Intro slideshare
SequenceL Auto-Parallelizing Toolset Intro slideshare
 
SequenceL intro slideshare
SequenceL intro slideshareSequenceL intro slideshare
SequenceL intro slideshare
 
AmiBroker AFL to DLL Conversion
AmiBroker  AFL to DLL ConversionAmiBroker  AFL to DLL Conversion
AmiBroker AFL to DLL Conversion
 
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
 
Introduction to 2D/3D Graphics
Introduction to 2D/3D GraphicsIntroduction to 2D/3D Graphics
Introduction to 2D/3D Graphics
 
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
 
Resume M_Shams_qureshi
Resume M_Shams_qureshi Resume M_Shams_qureshi
Resume M_Shams_qureshi
 
Himanth_Resume
Himanth_ResumeHimanth_Resume
Himanth_Resume
 
On component interface
On component interfaceOn component interface
On component interface
 
An introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_cAn introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_c
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous Computing
 
An Introduction to OMNeT++ 5.4
An Introduction to OMNeT++ 5.4An Introduction to OMNeT++ 5.4
An Introduction to OMNeT++ 5.4
 
Resume_Pratik
Resume_PratikResume_Pratik
Resume_Pratik
 
AMIT SRIVASTAVA
AMIT SRIVASTAVAAMIT SRIVASTAVA
AMIT SRIVASTAVA
 
L12 c-language-programming-of-atmega328 p
L12 c-language-programming-of-atmega328 pL12 c-language-programming-of-atmega328 p
L12 c-language-programming-of-atmega328 p
 

Mehr von corinne rocherieux

Rte Parisot Overview Of Emtp Studiesandmodel Devpt At Rte
Rte Parisot Overview Of Emtp Studiesandmodel Devpt At RteRte Parisot Overview Of Emtp Studiesandmodel Devpt At Rte
Rte Parisot Overview Of Emtp Studiesandmodel Devpt At Rte
corinne rocherieux
 
Rte Lebranchu Compensation And Transient Studies Onalong Ehv Overheadline
Rte Lebranchu Compensation And Transient Studies Onalong Ehv OverheadlineRte Lebranchu Compensation And Transient Studies Onalong Ehv Overheadline
Rte Lebranchu Compensation And Transient Studies Onalong Ehv Overheadline
corinne rocherieux
 
Rte Dufour Protection Systemforactives Substation
Rte Dufour Protection Systemforactives SubstationRte Dufour Protection Systemforactives Substation
Rte Dufour Protection Systemforactives Substation
corinne rocherieux
 
Sadovic Lighting Performance Computation
Sadovic Lighting Performance ComputationSadovic Lighting Performance Computation
Sadovic Lighting Performance Computation
corinne rocherieux
 
Univ Of Zagreb Uglesic Prevention Of Flashover
Univ Of Zagreb Uglesic Prevention Of FlashoverUniv Of Zagreb Uglesic Prevention Of Flashover
Univ Of Zagreb Uglesic Prevention Of Flashover
corinne rocherieux
 
Edf R&D Xemard Coupling Between Transmission Underground Cables And Pipelines
Edf R&D Xemard Coupling Between Transmission Underground Cables And PipelinesEdf R&D Xemard Coupling Between Transmission Underground Cables And Pipelines
Edf R&D Xemard Coupling Between Transmission Underground Cables And Pipelines
corinne rocherieux
 
Opal Rt Giroux Scrpting In Emtp Works
Opal Rt Giroux Scrpting In Emtp WorksOpal Rt Giroux Scrpting In Emtp Works
Opal Rt Giroux Scrpting In Emtp Works
corinne rocherieux
 
Emtp User Group092008 Supelec Stab Transitoire Web
Emtp User Group092008 Supelec Stab Transitoire WebEmtp User Group092008 Supelec Stab Transitoire Web
Emtp User Group092008 Supelec Stab Transitoire Web
corinne rocherieux
 
Emtp User Group092008 Sicae Raccordement Resau Web
Emtp User Group092008 Sicae Raccordement Resau WebEmtp User Group092008 Sicae Raccordement Resau Web
Emtp User Group092008 Sicae Raccordement Resau Web
corinne rocherieux
 
Emtp User Group092008 Sadovic Etudes Web
Emtp User Group092008 Sadovic Etudes WebEmtp User Group092008 Sadovic Etudes Web
Emtp User Group092008 Sadovic Etudes Web
corinne rocherieux
 
Emtp User Group092008 Rte Etudes Ttr Web
Emtp User Group092008 Rte Etudes Ttr WebEmtp User Group092008 Rte Etudes Ttr Web
Emtp User Group092008 Rte Etudes Ttr Web
corinne rocherieux
 
Emtp User Group092008 Polytechnique Montreal Nouveaux Dvpts Web
Emtp User Group092008 Polytechnique Montreal Nouveaux Dvpts WebEmtp User Group092008 Polytechnique Montreal Nouveaux Dvpts Web
Emtp User Group092008 Polytechnique Montreal Nouveaux Dvpts Web
corinne rocherieux
 
Emtp User Group092008 Idea P Vprotection Web
Emtp User Group092008 Idea P Vprotection WebEmtp User Group092008 Idea P Vprotection Web
Emtp User Group092008 Idea P Vprotection Web
corinne rocherieux
 
Emtp User Group092008 Idea P Vgeneration Web
Emtp User Group092008 Idea P Vgeneration WebEmtp User Group092008 Idea P Vgeneration Web
Emtp User Group092008 Idea P Vgeneration Web
corinne rocherieux
 
Emtp User Group092008 Edf Ttr Discordance Phase Web
Emtp User Group092008 Edf Ttr Discordance Phase WebEmtp User Group092008 Edf Ttr Discordance Phase Web
Emtp User Group092008 Edf Ttr Discordance Phase Web
corinne rocherieux
 
Emtp User Group092008 Edf Sectionneurs Web
Emtp User Group092008 Edf Sectionneurs WebEmtp User Group092008 Edf Sectionneurs Web
Emtp User Group092008 Edf Sectionneurs Web
corinne rocherieux
 
Emtp User Group092008 Edf Programme Web
Emtp User Group092008 Edf Programme WebEmtp User Group092008 Edf Programme Web
Emtp User Group092008 Edf Programme Web
corinne rocherieux
 

Mehr von corinne rocherieux (20)

Rte Parisot Overview Of Emtp Studiesandmodel Devpt At Rte
Rte Parisot Overview Of Emtp Studiesandmodel Devpt At RteRte Parisot Overview Of Emtp Studiesandmodel Devpt At Rte
Rte Parisot Overview Of Emtp Studiesandmodel Devpt At Rte
 
Rte Guerrier Lips Toolbox
Rte Guerrier Lips ToolboxRte Guerrier Lips Toolbox
Rte Guerrier Lips Toolbox
 
Rte Lebranchu Compensation And Transient Studies Onalong Ehv Overheadline
Rte Lebranchu Compensation And Transient Studies Onalong Ehv OverheadlineRte Lebranchu Compensation And Transient Studies Onalong Ehv Overheadline
Rte Lebranchu Compensation And Transient Studies Onalong Ehv Overheadline
 
Rte Dufour Protection Systemforactives Substation
Rte Dufour Protection Systemforactives SubstationRte Dufour Protection Systemforactives Substation
Rte Dufour Protection Systemforactives Substation
 
Sadovic Lighting Performance Computation
Sadovic Lighting Performance ComputationSadovic Lighting Performance Computation
Sadovic Lighting Performance Computation
 
Univ Of Zagreb Uglesic Prevention Of Flashover
Univ Of Zagreb Uglesic Prevention Of FlashoverUniv Of Zagreb Uglesic Prevention Of Flashover
Univ Of Zagreb Uglesic Prevention Of Flashover
 
Emtp Mahseredjian R&D
Emtp Mahseredjian R&DEmtp Mahseredjian R&D
Emtp Mahseredjian R&D
 
Edf R&D Xemard Coupling Between Transmission Underground Cables And Pipelines
Edf R&D Xemard Coupling Between Transmission Underground Cables And PipelinesEdf R&D Xemard Coupling Between Transmission Underground Cables And Pipelines
Edf R&D Xemard Coupling Between Transmission Underground Cables And Pipelines
 
Opal Rt Giroux Scrpting In Emtp Works
Opal Rt Giroux Scrpting In Emtp WorksOpal Rt Giroux Scrpting In Emtp Works
Opal Rt Giroux Scrpting In Emtp Works
 
Edf R&D Dennetiere Hvdc Emtp
Edf R&D Dennetiere Hvdc EmtpEdf R&D Dennetiere Hvdc Emtp
Edf R&D Dennetiere Hvdc Emtp
 
Emtp User Group092008 Supelec Stab Transitoire Web
Emtp User Group092008 Supelec Stab Transitoire WebEmtp User Group092008 Supelec Stab Transitoire Web
Emtp User Group092008 Supelec Stab Transitoire Web
 
Emtp User Group092008 Sicae Raccordement Resau Web
Emtp User Group092008 Sicae Raccordement Resau WebEmtp User Group092008 Sicae Raccordement Resau Web
Emtp User Group092008 Sicae Raccordement Resau Web
 
Emtp User Group092008 Sadovic Etudes Web
Emtp User Group092008 Sadovic Etudes WebEmtp User Group092008 Sadovic Etudes Web
Emtp User Group092008 Sadovic Etudes Web
 
Emtp User Group092008 Rte Etudes Ttr Web
Emtp User Group092008 Rte Etudes Ttr WebEmtp User Group092008 Rte Etudes Ttr Web
Emtp User Group092008 Rte Etudes Ttr Web
 
Emtp User Group092008 Polytechnique Montreal Nouveaux Dvpts Web
Emtp User Group092008 Polytechnique Montreal Nouveaux Dvpts WebEmtp User Group092008 Polytechnique Montreal Nouveaux Dvpts Web
Emtp User Group092008 Polytechnique Montreal Nouveaux Dvpts Web
 
Emtp User Group092008 Idea P Vprotection Web
Emtp User Group092008 Idea P Vprotection WebEmtp User Group092008 Idea P Vprotection Web
Emtp User Group092008 Idea P Vprotection Web
 
Emtp User Group092008 Idea P Vgeneration Web
Emtp User Group092008 Idea P Vgeneration WebEmtp User Group092008 Idea P Vgeneration Web
Emtp User Group092008 Idea P Vgeneration Web
 
Emtp User Group092008 Edf Ttr Discordance Phase Web
Emtp User Group092008 Edf Ttr Discordance Phase WebEmtp User Group092008 Edf Ttr Discordance Phase Web
Emtp User Group092008 Edf Ttr Discordance Phase Web
 
Emtp User Group092008 Edf Sectionneurs Web
Emtp User Group092008 Edf Sectionneurs WebEmtp User Group092008 Edf Sectionneurs Web
Emtp User Group092008 Edf Sectionneurs Web
 
Emtp User Group092008 Edf Programme Web
Emtp User Group092008 Edf Programme WebEmtp User Group092008 Edf Programme Web
Emtp User Group092008 Edf Programme Web
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Hydro Quebec Roumy Interfacing Emtp Rv Withothersoftware Using C++

  • 1. Interfacing EMTP-RV with other software using C++ Jean-Gabriel Roumy April 30th, 2009
  • 2. Overview > EMTP-RV DLL interface > Interface implementation using C++ > Usage • Simulink • 3rd party software • Distributed Simulation > Future work 2 Groupe – Technologie
  • 3. EMTP DLL Interface > What is the DLL Interface ? • DLL is an external, separate piece of code linked to EMTP-RV at run-time • EMTP-RV offers an API allowing the implementation of user models • API includes all functions necessary to interact with computational engine • API functions and structures are written in FORTRAN 95 3 Groupe – Technologie
  • 4. DLL Interface in C++ > Why C++ ? • Interface with 3rd-party software > C++ interface maps EMTP memory space > C++ skeleton that handles all calls to/from EMTP > User implements interface functions 4 Groupe – Technologie
  • 5. Interface Usage > Linking with control code > Controllable and observable signals are inputs/outputs to 3rd-party control libraries > No participation from user model in system matrices 5 Groupe – Technologie
  • 6. Using Simulink design in EMTP > Protection relay algorithm developped at IREQ using Simulink > Impossible to duplicate design in EMTP > Production code and model code stem from single simulink design 6 Groupe – Technologie
  • 7. Using Simulink design in EMTP > Use existing Simulink designs > Availability of Simulink extensive list of toolboxes > Complex Simulink models • Multiple sample times • C-language S-functions > Simulink code is portable, compact, fast and efficient 7 Groupe – Technologie
  • 8. Using Simulink design in EMTP > C++ code generated with Embedded Real-Time toolbox > User defines inputs, outputs, tunable parameters > Compiled design has 3 top-level functions • Initialise • Step • Terminate 8 Groupe – Technologie
  • 9. Simulink DLL Interface Architecture U se r M o d el C + + DL L E M T P -R V In sta nc e 1 L o ca l Da ta Str u ct u res S im u link Co de In s ta nce 2 L o c al D a ta S tru ctu re s 9 Groupe – Technologie
  • 10. Generating Simulink DLL Interface > Integrate Simulink code to interface code and compile together > Use observable and controllable signals as input/output pins in EMTP > Generate symbol in EMTP 10 Groupe – Technologie
  • 11. Limitations > If Simulink design is modified, must regenerate and compile > Each design requires customizing interface code > Matlab variable initialisation cannot be compiled > Fixed time step 11 Groupe – Technologie
  • 12. Linking with 3rd party software > Coupling with other C++ models > 3rd party can provide black-box models generated with their own software > Example : HVDC controller model generated by manufacturer, provided to HQ as black-box model 12 Groupe – Technologie
  • 13. Distributed Simulation > High Level Architecture is IEEE standard > Federation controlled by RTI > Distributed simulation can be performed with any HLA compatible software > EMTP DLL interface acts as bridge between EMTP and RTI 13 Groupe – Technologie
  • 14. Distributed Simulation > NS2 (telecom simulator) modified to support HLA > Co-simulation run with NS2 and EMTP > Drawback : high overhead, not necessary to share at each timestep > Early steps of development 14 Groupe – Technologie
  • 15. Future Work > Get the process of generating a model more user-friendly and generic > Co-simulation with Simulink > Development of HLA co-simulation 15 Groupe – Technologie
  • 16. The end > Questions ? 16 Groupe – Technologie