modelica tutorial with powersystems: a tutorial for modelica simulation
TRANSCRIPT
![Page 1: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/1.jpg)
West Lab
Modelica Tutorial
1
![Page 2: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/2.jpg)
West Lab
OpenModelica• OS
- Linux- Windows- Mac
ØPartly supportedØInstall
• Homebrew• Macport
- Virtual Machine (ubuntu)Ø https://openmodelica.org/download/virtual-
machineØ Installation
1. Install virtualbox2. Download box file, and vmdk file in same
directory3. Double click the box file
Ø Bug: cannot login• Change GUI manager
2
![Page 3: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/3.jpg)
West Lab3
1. Modelica introduction2. Thermal simulation using Modelica3. Exercise1: RL Circuit4. Exercise2: Transmission Loss5. Exercise3: Power World
![Page 4: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/4.jpg)
West Lab
What is Modelica?
4
TUTORIAL – COURSE
Introduction to Object-Oriented Modeling and Simulation with Modelica
Using OpenModelica
Peter Fritzson
Copyright (c) Open Source Modelica Consortium Version 2012
https://www.modelica.org/libraries
A language for modeling of complex physical system.
Primary designed for simulation.
![Page 5: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/5.jpg)
West Lab
What is Modelica?
5
TUTORIAL – COURSE
Introduction to Object-Oriented Modeling and Simulation with Modelica
Using OpenModelica
Peter Fritzson
Copyright (c) Open Source Modelica Consortium Version 2012
https://www.modelica.org/libraries
A language for modeling of complex physical system.
Combine multi-domain modeling
![Page 6: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/6.jpg)
West Lab
What is Modelica?
6
Declarative languageEquations and mathematical functions allow acausal modeling, high level specification, increased correctness
Multi-domain modelingCombine electrical, mechanical, thermodynamic, hydraulic, biological, control, event, real-time, etc…
Everything is a classStrongly typed object-oriented language with a general class concept, Java & MATLAB-like syntax
Visual component programmingHierarchical system architecture capabilities
Efficient, non-proprietaryEfficiency comparable to C; advanced equation compilation,e.g. 300 000 equations, ~ 150 000 lines on standard PC
![Page 7: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/7.jpg)
West Lab
Free/Commercial tools• Simulator
- CommercialØDymolaØCyModelicaØWoflramØSimulationX
- FreeØOpenModelicaØJModelica.orgØModelicac
• Editor- Modelica mode for emacs- UltraEdit- Modelica Plugin (for Eclipse)- Modelica Sublime Text Package- OMEditor
7
• Developer site- https://modelica.org/tools
![Page 8: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/8.jpg)
West Lab
Modelica Free/Commercial Libraries
8
• Modelica Library- Modelica- Power system- Vehicle- Mathematics- Chemical- Building
https://www.modelica.org/libraries
![Page 9: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/9.jpg)
West Lab
Modelica Tutorial
9
• Exercise 1- RL Circuit model
• Exercise 2- Transmission Loss model
• Exercise 3- Power World
![Page 10: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/10.jpg)
West Lab
Exercise 1: RL Circuit
10
• Goal- Making a basic RL circuit model using Modelica language- Executing a simulation and plotting the result- Understanding the relationship between electrical-thermal energy
• Library- Modelica library
![Page 11: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/11.jpg)
West Lab
Exercise 1: RLC Circuit Modeling
11
OpentheOMEdit
![Page 12: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/12.jpg)
West Lab12
1. MakeanewPackage“RLCircuit”2. MakeanewModel“Resistor”3. Addaextendsmodel4. Addaparameter“R”5. Addaequation
![Page 13: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/13.jpg)
West Lab13
extendsModelica.Electrical.Analog.Interfaces.OnePort;parameterModelica.SIunits.Resistance R(start=1);equationv=R*i;
![Page 14: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/14.jpg)
West Lab14
![Page 15: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/15.jpg)
West Lab15
“partial”meansthismodelisincomplete
![Page 16: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/16.jpg)
West Lab16
SI=>Modelica.SIunitsimportSI=Modelica.SIunits;
![Page 17: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/17.jpg)
West Lab17
modelResistorequationv=p.v - nv;0=p.i - n.i;i =p.i;v=R*i;endResistor
![Page 18: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/18.jpg)
West Lab18
Youcancheckyourcodehere
![Page 19: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/19.jpg)
West Lab19
1. Makeanewmodel“RLCircuit”inRLCircuit package2. Add Inductor,Ground, andsinVoltage from
Modelica.Electrical.Analog,andResistor3. Connecteachother
![Page 20: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/20.jpg)
West Lab20
1. Changethestoptime2. simulatethemodel
![Page 21: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/21.jpg)
West Lab
Exercise 1: Simulation result
21
Choosetheresistor1.v
![Page 22: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/22.jpg)
West Lab22
1. RightclicktheRLCircuit2. Clickthe“Duplicate”3. ChooseRLCircuit packageasthe“Path”4. Choosethenewmodel
![Page 23: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/23.jpg)
West Lab23
1. Rightclicktheresistance2. Deletetheblock3. Replacetheresistanceto
Modelica.Electrical.Analog.Basic.Resistor
![Page 24: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/24.jpg)
West Lab24
1. AddFixedTemperature fromModelica.Thermal.HeatTransfer.Sources.FixedTemperature
2. Connecttothereplacedresistor
![Page 25: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/25.jpg)
West Lab25
![Page 26: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/26.jpg)
West Lab26
Simulation results1. ClicktheLossPower andvinRLCircuit22. Comparetheresult
![Page 27: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/27.jpg)
West Lab27
Newplotwindow
![Page 28: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/28.jpg)
West Lab
Exercise 2: Transmission Loss
28
• Goal- Making a simple model representing transmission loss
using PowerSystems library- Using the icon setting- Understanding the outer/inner variables
• Library- PowerSystems
![Page 29: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/29.jpg)
West Lab29
1. OpenFile->SystemLibraries->PowerSystems2. Makeanewmodel
![Page 30: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/30.jpg)
West Lab30
extendsPowerSystems.Basic.Icons.Block;
Icon setting
![Page 31: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/31.jpg)
West Lab31
Clicktheiconview
Icon setting
![Page 32: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/32.jpg)
West Lab32
Icon setting
![Page 33: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/33.jpg)
West Lab33
1. ExtendPartialTwoTerminal2. Add threevariables
YoucansearchthePartialTwoTerminal here
Parameter of the line model
![Page 34: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/34.jpg)
West Lab34
![Page 35: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/35.jpg)
West Lab35
Replaceablepackageinheritsallfunctions/variables/settingsfromPowerSystems libraryEverymodelinPowerSystems inheritsthisPhaseSystem• DCorAC• Phasenumber• Frequency
![Page 36: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/36.jpg)
West Lab36
1. AddequationPhaseSystem.m:NumberofreferenceangleDC:m=0AC:m>0
Equation of the line model
![Page 37: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/37.jpg)
West Lab37
ifPhaseSystem.m >0thenomegaRef =der(PhaseSystem.thetaRef(terminal_p.theta));elseomegaRef =0;endif;v=R*i +omegaRef *L*j(i);zeros(PhaseSystem.n)=terminal_p.i +terminal_n.i;ifPhaseSystem.m >0thenterminal_p.theta =terminal_n.theta;endif
Equation of the line model
![Page 38: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/38.jpg)
West Lab38
Simulation of the line model
![Page 39: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/39.jpg)
West Lab39
1. Set1.FixedVoltageSource, 2.FixedCurrennt,and3.SystemfromPowersystem.Generic
2. OpentheparameterwindowoftheFixedCurrent bydoubleclickandchangetheparameter
Simulation of the line model
![Page 40: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/40.jpg)
West Lab40
1. Set1.FixedVoltageSource, 2.FixedCurrennt,and3.SystemfromPowersystem.Generic
2. OpentheparameterwindowoftheFixedCurrent bydoubleclickandchangetheparameter
Simulation of the line model
![Page 41: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/41.jpg)
West Lab41
1. Confirmyourcodeiscorrect
Simulation of the line model
![Page 42: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/42.jpg)
West Lab42
System:aninterfaceofPhaseSystem setting”inner”worksasaglobalvariable• Omega,theta,andfrequency• DC/AC/AC(3phase)• Initialvalue
Simulation of the line model
![Page 43: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/43.jpg)
West Lab43
System:aninterfaceofPhaseSystem setting”inner”worksasaglobalvariable• Omega,theta,andfrequency• DC/AC/AC(3phase)• Initialvalue
innerPowerSystems.Systemsystem(…
Simulation of the line model
![Page 44: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/44.jpg)
West Lab44
*ModelicaAdvancedTutorial:DevelopingModelingLibrary,MartinOtter,HildingElmqvist
![Page 45: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/45.jpg)
West Lab45
Byclickingtheinformation button,youcanseethedetailedinformation ofthe“System”.
Simulation of the line model
![Page 46: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/46.jpg)
West Lab46
Theresultisconstantvalue
Simulation of the line model
![Page 47: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/47.jpg)
West Lab
Exercise 3: Power World
47
• Goal- Simulating the simplified power grid including
ØVoltageØCurrentØFrequency
- Considering transmission loss, and voltage conversion- Using dynamic wind and electricity consumption data
• Library- PowerSystems
* The Power World uses Generic components with the quasi-static ThreePhase_dq because fast electrical transients and asymmetries are neglected. For more precise simulation of power grid, you can use the SPOT from PowerSystems supporting AC 3 phase.
![Page 48: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/48.jpg)
West Lab
Exercise 3: Power World
48
• Goal- Simulating the simplified power grid including
ØVoltageØCurrentØFrequency
- Considering transmission loss, and voltage conversion- Using dynamic wind and electricity consumption data
• Library- PowerSystems
* The Power World uses Generic components with the quasi-static ThreePhase_dq because fast electrical transients and asymmetries are neglected. For more precise simulation of power grid, you can use the SPOT from PowerSystems supporting AC 3 phase.
![Page 49: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/49.jpg)
West Lab49
Exercise 3: Power World
1. AddSystemfromPowerSystems2. AddPowerPlant,HydroPlant,WindFarm,andCity
fromPowerSystems.Examples.Components
![Page 50: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/50.jpg)
West Lab50
Youcancheckthecontentby1. Rightclicktheblock2. Choose“OpenClass"
Exercise 3: Power World
![Page 51: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/51.jpg)
West Lab51
Exercise 3: Power World
![Page 52: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/52.jpg)
West Lab52
1. Clickthe“TextView”2. ChangetheWindFarm setting
Exercise 3: Power World
![Page 53: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/53.jpg)
West Lab53
windFarm1(redeclare packagePhaseSystem =PowerSystems.PhaseSystems.DirectCurrent)
Exercise 3: Power World
![Page 54: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/54.jpg)
West Lab54
1. AddVoltageConverter,Inverterandline
2. DoubleclickandchangetheparameterofVoltageConverter to380/50
3. DoubleclickandchangethePotentialReference ofInvertertofalse
Exercise 3: Power World
![Page 55: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/55.jpg)
West Lab55
1. AddVoltageConverter,Inverterandline
2. DoubleclickandchangetheparameterofVoltageConverter to380/10
Exercise 3: Power World
![Page 56: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/56.jpg)
West Lab56
1. AddLoadDispatcher fromPowerSystems.Example.PowerWorld.Components
2. AddRealExpression fromModelica.Blocks.Sources
Exercise 3: Power World
![Page 57: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/57.jpg)
West Lab57
1. DoubleclicktheRealExpression2. Settheoutput“y”as“system.omega/2/pi”
Exercise 3: Power World
![Page 58: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/58.jpg)
West Lab58
“pi”isdefined inModelica.Constants1. Click“TextView”2. Add”importModelica.Constants.pi;”
Exercise 3: Power World
![Page 59: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/59.jpg)
West Lab59
1. Justclick“OK”whenyouconnecttheLoadDispatcher andPlants
Exercise 3: Power World
![Page 60: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/60.jpg)
West Lab60
Exercise 3: Power World
1. Doubleclickthe”system”2. Changeini to“tr”(double quotation isrequired)3. Changeftype_par tofalse
![Page 61: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/61.jpg)
West Lab61
Exercise 3: Power World
1. Changethestoptime to8640060(sec)*60*24=86400
![Page 62: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/62.jpg)
West Lab62
Simulation result: Electricity demand and supply
![Page 63: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/63.jpg)
West Lab63
Simulation result: Wind
![Page 64: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/64.jpg)
West Lab64
Simulation result: Frequency
![Page 65: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/65.jpg)
West Lab65
Simulation result: Frequency
Inthesystem,simulation isterminatedwhenthefrequencyexceedthelimitation.
![Page 66: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/66.jpg)
West Lab66
Two Windfarm model
![Page 67: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/67.jpg)
West Lab67
Two Windfarm model
![Page 68: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/68.jpg)
West Lab
SPOT: more precise power-system simulation
68
* The Power World uses Generic components with the quasi-static ThreePhase_dq because fast electrical transients and asymmetries are neglected. For more precise simulation of power grid, you can use the SPOT from PowerSystems supporting AC 3 phase.
![Page 69: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/69.jpg)
West Lab69
Thankyouforyourattention
![Page 70: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/70.jpg)
West Lab70
Converter(DC/AC)
EnergyConsumer
FrequencyData
PowerPlant
![Page 71: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/71.jpg)
West Lab71
HydroDispatch:HydroDispatch[1] = hydroBaseHydroDispatch[2] = hydroDailyHydroDispatch[3] = controlHydro
plantDispatch:plantDispatch[1] = plantScheduleplantDispatch[2] = secondaryControlplantDispatch[3] = primaryControl
𝜃 = 𝜔 $ 2𝜋
LoadDispatcher
![Page 72: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/72.jpg)
West Lab72
PowerPlant
plantDispatch:plantDispatch[1] = plantSchedule = fuel.u1plantDispatch[2] = secondaryControl = add.u1plantDispatch[3] = primaryControl
![Page 73: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/73.jpg)
West Lab73
HydroPlant
HydroDispatch:HydroDispatch[1] = hydroBase = riverControl.uHydroDispatch[2] = hydroDaily = add.u2HydroDispatch[3] = controlHydro
![Page 74: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/74.jpg)
West Lab74
WindFarm
Wind Data
![Page 75: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/75.jpg)
West Lab75
City
![Page 76: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/76.jpg)
West Lab
Open Modelica Library
76
• Simulation Result
city
windFarmhydroPlant
powerPlant
![Page 77: Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation](https://reader030.vdocuments.us/reader030/viewer/2022012404/58aea62e1a28abd43a8b6175/html5/thumbnails/77.jpg)
West Lab
IPSL
77