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

Issues with AVR/PSS Initialization #386

Open
m-bossart opened this issue Jul 22, 2024 · 0 comments
Open

Issues with AVR/PSS Initialization #386

m-bossart opened this issue Jul 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@m-bossart
Copy link
Collaborator

m-bossart commented Jul 22, 2024

I noticed an issue when using an AVRTypeII and PSSFixed model together. If the V_pss parameter is set as non-zero, the model fails to initialize. The issue is related to the AVR model using the reference with the addition of Vs:


But Vs is not considered in the initialization (because the AVR initialization happens before the PSS). I'm not sure yet how this should be handled generically but I do think that the example below should not fail.

MWE:

using PowerSystems
using PowerSimulationsDynamics
using PowerSystemCaseBuilder
using OrdinaryDiffEq
using PowerSystemCaseBuilder

function transform_power_load_to_constant_impedance(x::PowerLoad)
    l = StandardLoad(
        name = get_name(x),
        available = get_available(x),
        bus = get_bus(x),
        base_power = get_base_power(x),
        constant_active_power = 0.0,
        constant_reactive_power = 0.0,
        impedance_active_power = get_active_power(x),
        impedance_reactive_power = get_reactive_power(x),
        current_active_power = 0.0,
        current_reactive_power = 0.0,
        max_constant_active_power = 0.0,
        max_constant_reactive_power = 0.0,
        max_impedance_active_power = get_max_active_power(x),
        max_impedance_reactive_power = get_max_reactive_power(x),
        max_current_active_power = 0.0,
        max_current_reactive_power = 0.0,
        services = get_services(x),
        dynamic_injector = get_dynamic_injector(x),
    )
    return l 
 end 

sys = build_system(PSIDTestSystems, "psid_test_ieee_9bus")
for l in get_components(PowerLoad, sys)
    l_new =  transform_power_load_to_constant_impedance(l)
    remove_component!(sys, l)
    add_component!(sys, l_new)
end
dyn_gen = get_component(DynamicGenerator, sys, "generator-3-1")
sim = Simulation!(MassMatrixModel, sys, pwd(), (0.0, 5.0))
execute!(sim, Rodas5())

pss_3 = get_pss(get_component(DynamicGenerator, sys, "generator-3-1"))
set_V_pss!(pss_3, 0.00001)                                      #Set V_pss non-zero
sim = Simulation!(MassMatrixModel, sys, pwd(), (0.0, 5.0))      #Simulation fails to build (initialize)
@m-bossart m-bossart added the bug Something isn't working label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants