Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to solve pti model #888

Open
jay-dave opened this issue Sep 18, 2023 · 2 comments
Open

Not able to solve pti model #888

jay-dave opened this issue Sep 18, 2023 · 2 comments

Comments

@jay-dave
Copy link
Contributor

jay-dave commented Sep 18, 2023

I am able to solve power flow on attached model using PSSE but not using PowerModels (shows invalid model). Below is the code to run the attached example model. The model is reduced to only 3 bus system for easy reference. Can someone help me to figure out the issue?

using PowerModels
import InfrastructureModels
import Ipopt
import JuMP
import JSON

if !isdefined(JuMP, :num_nonlinear_constraints)
num_nonlinear_constraints = JuMP.num_nl_constraints
else
num_nonlinear_constraints = JuMP.num_nonlinear_constraints
end
nlp_solver = JuMP.optimizer_with_attributes(Ipopt.Optimizer, "tol"=>1e-6, "print_level"=>2)

Pglib_file = "yourpath/example.raw"
#setting generator scheduled voltage as bus voltage
source_data = parse_file(Pglib_file)
for (g,gen) in source_data["gen"]
genbus = gen["gen_bus"]
source_data["bus"]["$genbus"]["vm"] = gen["vg"]
end
Pglib_solution = PowerModels.run_pf(source_data, ACPPowerModel, nlp_solver, setting = Dict("output" => Dict("branch_flows" => true, "duals" => true)))

PTIcase-main.zip

@jay-dave
Copy link
Contributor Author

jay-dave commented Sep 21, 2023

I think this is somewhat related to issue #737. when I changed the CZ and CW to 1, the branch reactance takes nonzero value and it works. However, it was not working for CZ = 3 and CW = 2.

On a closer look, it seems that pti assumes transformer base kV = Bus base kV when NOM1, NOM2 (or NOM3 for three winding transformers) =0. However, transformer base kV is taken as zero in data processing in PM. Hence, the branch reactance becomes zero during pu conversion and causes model to be invalid.

@hei06j
Copy link
Contributor

hei06j commented Jun 16, 2024

This issue is mostly addressed in pull request #917, but the case in this issue is still problematic due to transformer sbase values. With the PR in place, I could solve this example with Sbase>70, but Sbase=60 still does not solve. Note that one of the unit tests as part of this PR is the example in this issue with Sbase=100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants