CURENT / andes

Python toolbox / library for power system transient dynamics simulation with symbolic modeling and numerical analysis 🔥
https://ltb.curent.org
Other
224 stars 111 forks source link

Fix PSSE parser of WTDTA1 #279

Closed jinningwang closed 2 years ago

jinningwang commented 2 years ago
jinningwang commented 2 years ago

Hantao,

I compared the PowerWorld WTDTA1 and our implementation of WTDTA1, and I think that the equation of WTDTA1 in the PSSE parser should be modified.

image

Do I miss anything else?

Regards, Jinning

codecov[bot] commented 2 years ago

Codecov Report

Merging #279 (ac9de6a) into develop (d4ecf4c) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #279   +/-   ##
========================================
  Coverage    78.82%   78.82%           
========================================
  Files          152      152           
  Lines        12917    12918    +1     
========================================
+ Hits         10182    10183    +1     
  Misses        2735     2735           
Impacted Files Coverage Δ
andes/models/renewable/wtds.py 100.00% <ø> (ø)
andes/models/synchronous/genbase.py 89.33% <ø> (ø)
andes/models/renewable/wtdta1.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d4ecf4c...ac9de6a. Read the comment docs.

cuihantao commented 2 years ago

Thanks for the PR!

Can you modify the PSSE parser to allow the use of a variable, sys_f, in any equation? This seems to be a much needed feature.

cuihantao commented 2 years ago

I made a mistake in the original equation by forgetting about the square. Can you analyze the control diagram and figure out if Freq1 need to be converted to per unit? Recall that in WTDTA1 in ANDES, all other quantities such as H, D, omega are in per unit in system base. The unit of Freq1 should be consistent for the swing equations.

jinningwang commented 2 years ago

Thanks for the PR!

Can you modify the PSSE parser to allow the use of a variable, sys_f, in any equation? This seems to be a much needed feature.

Sure thing, let me try some solutions.

jinningwang commented 2 years ago

I made a mistake in the original equation by forgetting about the square. Can you analyze the control diagram and figure out if Freq1 need to be converted to per unit? Recall that in WTDTA1 in ANDES, all other quantities such as H, D, omega are in per unit in system base. The unit of Freq1 should be consistent for the swing equations.

I'll check this.

jinningwang commented 2 years ago

Hantao, although PSSE doc said it is nominal frequency, I think per unit is more reasonable. In the test dyr file, the variable is given in per unit. image

Regards, Jinning

cuihantao commented 2 years ago

Hantao, although PSSE doc said it is nominal frequency, I think per unit is more reasonable. In the test dyr file, the variable is given in per unit.

Something might be wrong here. Either the doc or PSS/E's not following the doc.

Anyway, what I asked you to do is to perform a rigorous analysis of the swing equation to reason if Freq1 needs to be in per unit or Hz. The manual is a reference, but an analysis is needed.

jinningwang commented 2 years ago

Hantao, although PSSE doc said it is nominal frequency, I think per unit is more reasonable. In the test dyr file, the variable is given in per unit.

Something might be wrong here. Either the doc or PSS/E's not following the doc.

Anyway, what I asked you to do is to perform a rigorous analysis of the swing equation to reason if Freq1 needs to be in per unit or Hz. The manual is a reference, but an analysis is needed.

Sure, let me do this after fixing the initialization error of WTDTA1.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

jinningwang commented 2 years ago

Wait, I noticed a bug, give me a moment.

Hantao,

I think this PR is ready to merge, all the issues related to WTDTA1 are solved:

The enhancement of adding sys_f in the PSSE parser can be done in another PR.

Regards, Jinning