Skip to content

Commit

Permalink
Bug fix on AC power DC voltage droop
Browse files Browse the repository at this point in the history
- Adding reference AC power set point to converter model
- pu conversion update
  • Loading branch information
hakanergun committed Apr 12, 2024
1 parent 0eb2be4 commit a88fce2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "PowerModelsACDC"
uuid = "ff45984e-d068-5f4c-9e32-c4133509d236"
autors = ["Hakan Ergun", "Frederik Geth", "Jay Dave"]
repo = "https://github.com/Electa-Git/PowerModelsACDC.jl"
version = "0.7.3"
version = "0.7.4"

[deps]
InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
Expand Down
2 changes: 1 addition & 1 deletion src/core/constraint_template.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function constraint_dc_droop_control(pm::_PM.AbstractPowerModel, i::Int; nw::Int
if type == 3
constraint_dc_droop_control(pm, nw, i, conv["busdc_i"], conv["Vdcset"], conv["Pdcset"], conv["droop"]; dc_power = true)
elseif type == 4
constraint_dc_droop_control(pm, nw, i, conv["busdc_i"], conv["Vdcset"], conv["P_g"], conv["droop"]; dc_power = false)
constraint_dc_droop_control(pm, nw, i, conv["busdc_i"], conv["Vdcset"], conv["Pacset"], conv["droop"]; dc_power = false)
else
Memento.warn(_PM._LOGGER, "Invalid setting for DC converter control type, droop constraint will be ignored")
end
Expand Down
3 changes: 3 additions & 0 deletions src/core/data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ function set_conv_pu_power(conv, MVAbase)
_PM._apply_func!(conv, "P_g", rescale_power)
_PM._apply_func!(conv, "Q_g", rescale_power)
_PM._apply_func!(conv, "Pdcset", rescale_power)
if haskey(conv, "Pacset")
_PM._apply_func!(conv, "Pacset", rescale_power)
end
_PM._apply_func!(conv, "LossA", rescale_power)
_PM._apply_func!(conv, "Pacmax", rescale_power)
_PM._apply_func!(conv, "Pacmin", rescale_power)
Expand Down
8 changes: 4 additions & 4 deletions test/data/case5_acdc_droop_acside.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
];

%% converters
%column_names% busdc_i busac_i type_dc type_ac P_g Q_g islcc Vtar rtf xtf transformer tm bf filter rc xc reactor basekVac Vmmax Vmmin Imax status LossA LossB LossCrec LossCinv droop Pdcset Vdcset dVdcset Pacmax Pacmin Qacmax Qacmin
%column_names% busdc_i busac_i type_dc type_ac P_g Q_g islcc Vtar rtf xtf transformer tm bf filter rc xc reactor basekVac Vmmax Vmmin Imax status LossA LossB LossCrec LossCinv droop Pdcset Vdcset dVdcset Pacset Pacmax Pacmin Qacmax Qacmin
mpc.convdc = [
1 2 4 1 -60 -40 0 1 0.01 0.01 1 1 0.01 1 0.01 0.01 1 345 1.1 0.9 1.1 1 1.103 0.887 2.885 2.885 0.0050 -58.6274 1.0079 0 100 -100 50 -50;
2 3 4 2 0 0 0 1 0.01 0.01 1 1 0.01 1 0.01 0.01 1 345 1.1 0.9 1.1 1 1.103 0.887 2.885 2.885 0.0070 21.9013 1.0000 0 100 -100 50 -50;
3 5 4 2 35 5 0 1 0.01 0.01 1 1 0.01 1 0.01 0.01 1 345 1.1 0.9 1.1 1 1.103 0.887 2.885 2.885 0.0050 36.1856 0.9978 0 100 -100 50 -50;
1 2 4 1 -60 -40 0 1 0.01 0.01 1 1 0.01 1 0.01 0.01 1 345 1.1 0.9 1.1 1 1.103 0.887 2.885 2.885 0.0050 -58.6274 1.0079 0 -60 100 -100 50 -50;
2 3 4 2 0 0 0 1 0.01 0.01 1 1 0.01 1 0.01 0.01 1 345 1.1 0.9 1.1 1 1.103 0.887 2.885 2.885 0.0070 21.9013 1.0000 0 0 100 -100 50 -50;
3 5 4 2 35 5 0 1 0.01 0.01 1 1 0.01 1 0.01 0.01 1 345 1.1 0.9 1.1 1 1.103 0.887 2.885 2.885 0.0050 36.1856 0.9978 0 35 100 -100 50 -50;
];

%% branches
Expand Down

2 comments on commit a88fce2

@hakanergun
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

Non breaking changes

Changes

  • Bug fix on the AC power / DC voltage power droop for ACP and ACR power flow
  • Adds Pacset parameter to converter model to define AC side reference set point similar to Pdcset
  • Adds per unit conversion for the Pacset parameter

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/104764

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.4 -m "<description of version>" a88fce28f24c4ef025f028871a56f62cfb45125f
git push origin v0.7.4

Please sign in to comment.