Opened 10 years ago
Closed 6 years ago
#3274 closed defect (fixed)
Inheritance problems on power systems library
Reported by: | anonymous | Owned by: | Per Östlund |
---|---|---|---|
Priority: | blocker | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | trunk |
Keywords: | Cc: | Adeel Asghar |
Description
I analyze for a lot of time the power system library.
We can see in the Recursive BuildModel Test of the power system library that some test fails to run.
Most of the fails appear when transformers are involved in the model.
The examples under the spot file using transformers have most of them a change in the configuration of the transformers.
All the transformers in the power system library 3ph have Y-Y topology configuration by default. In the real world the Delta-Y configuration is the most used.
To reuse the transformer model a redeclaration statement needs to be used at the model of the system under construction.
According with choices explicit in the model, to change the topology of the transformer term the follow statement is needed.
PowerSystems.AC3ph.Transformers.TrafoStray trafo(par = data, redeclare PowerSystems.AC3ph.Ports.Topology.Delta top_p)
If I am not wrong, this redeclare statement supposes to work, but when I analyzed the initialized model, the topology change in the port is missing and it remains an Y topology.
When I tried to run the simulation, an error message in pop-up window appears saying that there more variables than equations.
Analyzing the topology definition port of the transformer, YDportTrafo_p_n, The definition is done by default Y topology for both ports when the possibility to redeclare each port into Delta topology. This definition includes same variables declarations about Voltages and Currents to connect the port with its terminals considering the relations between the coils.
According with my tests, the discrepancy between the number of the number of variables and the number of equations is the result of the redeclaration statement, the variables definition are lost. In the other hand, the topology of the port remains Y.
When I tried to redefine the variables again, the compiler ignore the statement with a warning message.
I check the same model without changing the topology of the transformer and it works find.
I suppose that there is a bug in the omc compiler when it try to translate the model and the redeclare statement fails.
Fixing this problem will increase the success when running Recursive BuildModel Test of the power system library.
Attachments (2)
Change History (16)
by , 10 years ago
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 10 years ago
Component: | Unknown → Frontend |
---|---|
Owner: | changed from | to
Status: | assigned → accepted |
comment:3 by , 9 years ago
Priority: | high → blocker |
---|
comment:4 by , 9 years ago
Milestone: | Future → 1.9.5 |
---|
comment:6 by , 9 years ago
I'm planning to change replaceable instances to replaceable model and record types in the PowerSystems library since a while. This shall unify the modeling patterns with other Modelica libraries. Wanted to wait until OMEdit will support it, but can't wait forever :-(
The following commit starts with transformers:
https://github.com/modelica/PowerSystems/commit/41db88d307635a428cc23fc8f93dabb404c44e13
This does not solve this ticket yet, but it changes the error messages. Find attached the updated example test11.mo
.
*** test10.mo 2016-03-25 20:16:09.488001000 +0100 --- test11.mo 2016-03-25 20:16:13.734123007 +0100 *************** *** 1,9 **** ! model test10 inner PowerSystems.System system(sim = "st") annotation(Placement(visible = true, transformation(origin = {-80, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation(Placement(visible = true, transformation(origin = {-80, 0}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); PowerSystems.AC3ph.Sources.PQsource PQsource1(V_nom = 24000, S_nom = 50000000) annotation(Placement(visible = true, transformation(origin = {-46, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); ! PowerSystems.AC3ph.Transformers.TrafoStray trafo(par = data, redeclare PowerSystems.AC3ph.Ports.Topology.Delta top_p) annotation(Placement(visible = true, transformation(origin = {0, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); ! parameter PowerSystems.AC3ph.Transformers.Parameters.TrafoStray data(V_nom = {24000, 161000}, S_nom = 50000000, r = {0.022, 1}, x = {1.17, 52.65}) annotation(Placement(visible = true, transformation(origin = {0, 62}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); PowerSystems.AC3ph.Nodes.GroundOne grd11 annotation(Placement(visible = true, transformation(origin = {92, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); PowerSystems.AC3ph.Sources.InfBus infBus(V_nom = 161000) annotation(Placement(visible = true, transformation(origin = {54, 0}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); equation --- 1,11 ---- ! model test11 inner PowerSystems.System system(sim = "st") annotation(Placement(visible = true, transformation(origin = {-80, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); PowerSystems.AC3ph.Nodes.GroundOne grd1 annotation(Placement(visible = true, transformation(origin = {-80, 0}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); PowerSystems.AC3ph.Sources.PQsource PQsource1(V_nom = 24000, S_nom = 50000000) annotation(Placement(visible = true, transformation(origin = {-46, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); ! PowerSystems.AC3ph.Transformers.TrafoStray trafo( ! redeclare model Topology_p = PowerSystems.AC3ph.Ports.Topology.Delta, ! redeclare record Data = PowerSystems.AC3ph.Transformers.Parameters.TrafoStray(V_nom = {24000, 161000}, S_nom = 50000000, r = {0.022, 1}, x = {1.17, 52.65})) ! annotation(Placement(visible = true, transformation(origin = {0, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); PowerSystems.AC3ph.Nodes.GroundOne grd11 annotation(Placement(visible = true, transformation(origin = {92, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); PowerSystems.AC3ph.Sources.InfBus infBus(V_nom = 161000) annotation(Placement(visible = true, transformation(origin = {54, 0}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); equation
Use test11
with PowerSystems 0.5 dev (and test10
with the released PowerSystems 0.4.0).
Hopefully we can achieve both: better coverage and a better library!
by , 9 years ago
comment:7 by , 9 years ago
Cc: | added |
---|
comment:9 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:10 by , 7 years ago
Component: | Frontend → NF - New FrontEnd |
---|---|
Milestone: | 1.12.0 → 2.0.0 |
Owner: | changed from | to
Status: | accepted → assigned |
All front end issues will be handled by the new front end.
@perost, lots of interesting test cases here for the new front-end, besides the MSL
comment:11 by , 7 years ago
Component: | NF - New FrontEnd → New Instantiation |
---|
Move all tickets from NF - New Frontend to New Instantiation so we don't have two different categories for the same thing.
comment:12 by , 7 years ago
I put here a link to the report on the results of using the new front end on the Power system library. This does not include the attached test, but it starts giving an idea on the degree of coverage.
We should review this issue when the coverage is close to 100%
comment:13 by , 6 years ago
The PowerSystems library has changed a bit since the time this ticket was opened, ans so has OMC. I searched for examples with the keyword 'transform' in the model name, among the results obtained by the new front-end on 3-phase models. I found:
- PowerSystems.Examples.AC3ph.Elementary.Transformer, which works fine
- PowerSystems.Examples.AC3ph.Transformation.TapChanger, works fine
- PowerSystems.Examples.AC3ph.Transformation.TreeWinding, works fine
- PowerSystems.Examples.AC3ph.Transformation.PhaseShifts, broken because the system is under- and over-determined at the same time.
I'm not sure if the root cause is inheritance, I'll leave this ticket open for later analysis. The issue will be fixed in 2.0.0
comment:14 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Regarding PowerSystems.Examples.AC3ph.Transformation.PhaseShifts, see #5302.
Looking at the latest report it seems that the problems raised in this ticket have been solved. Remaining issue mostly concern mixed-determined initialization (#5302) and structural parameters that cannot be evaluated (#5243).
The error was already reported and partly solved in #3195. This is really a blocker for the PowerSystems library. Thank you for the additional analysis.