Presentation is loading. Please wait.

Presentation is loading. Please wait.

Automated object oriented simulation framework

Similar presentations


Presentation on theme: "Automated object oriented simulation framework"— Presentation transcript:

1 Automated object oriented simulation framework
Hello everyone and thanks for coming. I have a pleasure to present today summary of my first quarter here at CERN. I will describe automated object oriented simulation framework. Michal Maciejewski TE-MPE-PE

2 Acknowledgements Many thanks to Emmanuele for his support, guidance and patience during design and validation of Simulink models.

3 Outline Introduction Architecture OOP Results Summary

4 Standard Approach - motivation
Parameters are stored in Excel file Blocks are placed and connected manually on schematic Data can be accessed only manually Tutaj wideo jak się robi symulację Czy zgodzimy się, że wygodnie jest używać Excela do przechowywania parametrów? Ideally we can build a model and run it. Ideally, but world is not ideal and we might have some bugs. We waste time and energy on debugging all the time.

5 Standard Approach - Drawbacks
Efficient only for relatively small models Prone to copy&paste errors Difficult to use models by others Plenty of time spent on debugging and testing

6 Automated model design Framework for everyone…
Reusable libraries Automated model design Framework for everyone… Main Assumptions Pogrubienie, gdy omawiam cos. Model defined only inside Excel File Create framework reusable for others with clearly defined set of steps to follow in order to create different simulations. Scalability: different set of components, variable number of blocks User should focus on parameters and analysis of results You can run the simulation without any knowledge of Simulink, Simscappe, OOP …even without any Simulink skills Validated once, used many times Framework must be scalable

7 Framework Architecture
Black box Model.netlist Simulink Model Pojawia się najpierw ten Excel, potem można kliknąć i pojawi się przykładowy plik Potem przesuwa się w lewo i z tego powstaje netlista i tworzone są obiekty Thermal Mass Helium Cooling Heat Exchange Quench Resistor CLIQ Objects

8 Model Design Sequence Run simulation Create model Read Excel File
Create netlist Initialise objects Create model Place blocks Connect blocks Set parameters Run simulation Plot results Save results It is pretty straight-forward

9 Object Oriented Programming
Creates new data type to entirely describe component Provides a scheme to add new components Simplifies libraries documentation process Makes it easier to reuse software Coherent and logical representation

10 Our library Electrical Thermal Tutaj struktura drzewiasta z kolejnymi

11 R(T)=R(T0)*(1+œ*(T-T0))
Topic: Variable resistor - example Temperature coefficient R(T)=R(T0)*(1+œ*(T-T0)) 2. Voltage across resistor V =I*R(T) 3. Ohmic losses Q=I*I* R(T) Feel free to take notes during this short lecture 

12 R(T)=R(T0)*(1+œ*(T-T0))
Topic: Variable resistor - example function setup through( Q, [], OHM.Q ); across(T, n.T, p.T) end equations let R = R0*( 1 + alfa*(T-T0) ); in v == i*R; Q == i*i*R; component resistorThermal < foundation.electrical.branch % Resistor with thermal coefficient nodes OHM = foundation.thermal.thermal; % OHM:left end parameters R0 = { 10, 'Ohm' }; % Reference Resistance T0 = { 273, 'K' }; % Reference Temperature alfa = {3.9e-3, '1/K'}; % Temperature coefficient variables Q = { 0, 'J/s' }; T = { 0, 'K' }; R(T)=R(T0)*(1+œ*(T-T0)) V =I*R(T) Feel free to take notes during this short lecture  Q=I*I* R(T)

13 Topic: Mutual Inductor- example
Ohm law for mutual inductor 𝑣 1 𝑣 2 ⋮ 𝑣 𝑛 = 𝐿 1 𝑀 21 ⋯ 𝑀 𝑛1 𝑀 12 𝐿 2 ⋱ ⋮ ⋮ 𝑀 1𝑛 ⋱ ⋯ ⋱ ⋯ ⋮ 𝐿 𝑛 𝑖 𝑖 2 ⋮ 𝑖 𝑛 Mutual inductor created automatically Additionally the stability is verified

14 MQXC 2x18 simulation - demo
This is what you can see on 27” screen Pokazac jakie sa czesci schematu na ekranie zaznaczyc co gdzie: Thermal

15 MQXC 2x36 simulation - demo

16 Comparison - Current Opisać co na osiach jest

17 Comparison - Temperature
Opisać co na osiach jest

18 Next steps Design of Graphical User Interface (GUI)
Implementation of new components (Quench heaters, improved IFCL) Modeling of new magnets (MQXF)

19 Summary Only one Excel file needed to define model
User can focus only on parameters calculation and analysis of results Framework does not require any experience in Simulink/Simscape This concept can be easily extended This framework has clearly defined rules to add new features Based on current results we can say that this idea is very promissing. Still we don’t know what our limitations are.

20 Summary - comparison Feature PSpice Matlab/Simulink
User friendly (support, model design) No Yes Multi-domain components Ability to post-process results Poor Good Automated model design Hard Simple Reusable components GUI Automatic update of components on schematic One of our motivations was to switch from Pspice to Simulink

21 Summary – time savings Automated framework Standard Approach
One of our motivations was to switch from Pspice to Simulink

22 Thank you for attention!


Download ppt "Automated object oriented simulation framework"

Similar presentations


Ads by Google