Opened 7 years ago
Closed 7 years ago
#4638 closed defect (invalid)
Power systems library; voltage source does not respect parameter frequency
Reported by: | Owned by: | Martin Sjölund | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Third-Party Libraries | Version: | v1.13.0-dev-nightly |
Keywords: | PowerSystems AC3ph | Cc: |
Description
I tried to use 2 voltage sources of same amplitude but set at different frequencies (50 and 51 Hz) to beat power across a connecting impedance. AC3ph.Sources.Voltage However the voltages were identical across time (therefore no current). Digging into the code the Voltage source did not use the calculated theta from the frequency (fType = parameter).
The line in Sources.mo for model Voltage is
phi = term.theta[1] + alpha + system.alpha0;
term.v = PS.map({V*cos(phi), V*sin(phi), sqrt(3)*neutral.v});
However term.theta[1] is always set to system.thetaRel (set in partial SourceBase). Whilst theta for the Voltage instance is calculated correctly (in partial VoltageBase), it is never used.
My model worked when I changed the line to:
phi = (theta - system.thetaRef) + alpha + system.alpha0;
that is calculating the actual angle of the source instance relative to the reference frame.
Fixing it here does not seem right though - term.theta should be changed?? However, line elements connect theta through (term_p.theta = term_n.theta) so you would end up with an over-defined system or one that cannot be solved.
As it stands, term.theta seems a bit useless as it can only be = {system.thetaRel, system.thetaRef}. It would seem to me more informative if each active element's term.theta referred to its actual relative angle to the reference frame and passive elements did not pass it through - although this might be too much of a re-write. In any regard, the Voltage source has a fixable bug so it respects the frequency parameter.
I am happy to discuss off-line with the package maintainer.
Change History (2)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Milestone: | Future |
---|---|
Resolution: | → invalid |
Status: | new → closed |
I agree, and the ticket owner seems to have agreed as well. Since it doesn't seem to be a bug in OM from the description I will close the ticket. If it turns out there is a bug in OM, feel free to reopen the ticket with additional information.
As this is a bug in an external library, it might lead to a quicker resolution if you take this up with the maintainer here.