OuterControl
The outer control is composed by the ReactivePowerControl and the ActivePowerControl types.
PowerSystems.OuterControl
— Typemutable struct OuterControl{
A <: ActivePowerControl,
R <: ReactivePowerControl
} <: DynamicInverterComponent
active_power_control::A
reactive_power_control::R
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of a Outer-Loop controller using a active power controller and a reactive power droop controller.
Arguments
A <: ActivePowerControl
: Active power controller (typically droop or virtual inertia).R <: ReactivePowerControl
: Reactive power controller (typically droop).ext::Dict{String, Any}
states::Vector{Symbol}
: Vector of states (will depend on the components).n_states::Int
: Number of states (will depend on the components).
PowerSystems.get_ext
— Methodget_ext(value::OuterControl) -> Dict{String, Any}
Get ext
from OuterControl
.
PowerSystems.get_n_states
— Methodget_n_states(value::OuterControl) -> Int64
Get n_states
from OuterControl
.
PowerSystems.get_states
— Methodget_states(value::OuterControl) -> Vector{Symbol}
Get states
from OuterControl
.
PowerSystems.set_ext!
— Methodset_ext!(value::OuterControl, val) -> Any
Set OuterControl
ext
.
Active Power Controllers
Virtual Inertia
PowerSystems.VirtualInertia
— Typemutable struct VirtualInertia <: ActivePowerControl
Ta::Float64
kd::Float64
kω::Float64
P_ref::Float64
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of a Virtual Inertia with SRF using VSM for active power controller
Arguments
Ta::Float64
: VSM inertia constant, validation range:(0, nothing)
kd::Float64
: VSM damping constant, validation range:(0, nothing)
kω::Float64
: frequency droop gain, validation range:(0, nothing)
P_ref::Float64
: (default:1.0
) Reference Power Set-point (pu), validation range:(0, nothing)
ext::Dict{String, Any}
: (default:Dict{String, Any}()
) An extra dictionary for users to add metadata that are not used in simulation, such as latitude and longitude.states::Vector{Symbol}
: (Do not modify.) The states of the VirtualInertia model are:
θ_oc: Phase angle displacement of the virtual synchronous generator model
ω_oc: Speed of the rotating reference frame of the virtual synchronous generator model
n_states::Int
: (Do not modify.) VirtualInertia has two states
PowerSystems.get_P_ref
— Methodget_P_ref(value::VirtualInertia) -> Float64
Get VirtualInertia
P_ref
.
PowerSystems.get_Ta
— Methodget_Ta(value::VirtualInertia) -> Float64
Get VirtualInertia
Ta
.
PowerSystems.get_ext
— Methodget_ext(value::VirtualInertia) -> Dict{String, Any}
Get VirtualInertia
ext
.
PowerSystems.get_kd
— Methodget_kd(value::VirtualInertia) -> Float64
Get VirtualInertia
kd
.
PowerSystems.get_kω
— Methodget_kω(value::VirtualInertia) -> Float64
Get VirtualInertia
kω
.
PowerSystems.get_n_states
— Methodget_n_states(value::VirtualInertia) -> Int64
Get VirtualInertia
n_states
.
PowerSystems.get_states
— Methodget_states(value::VirtualInertia) -> Vector{Symbol}
Get VirtualInertia
states
.
PowerSystems.set_P_ref!
— Methodset_P_ref!(value::VirtualInertia, val) -> Any
Set VirtualInertia
P_ref
.
PowerSystems.set_Ta!
— Methodset_Ta!(value::VirtualInertia, val) -> Any
Set VirtualInertia
Ta
.
PowerSystems.set_ext!
— Methodset_ext!(value::VirtualInertia, val) -> Any
Set VirtualInertia
ext
.
PowerSystems.set_kd!
— Methodset_kd!(value::VirtualInertia, val) -> Any
Set VirtualInertia
kd
.
PowerSystems.set_kω!
— Methodset_kω!(value::VirtualInertia, val) -> Any
Set VirtualInertia
kω
.
Active Power Droop
PowerSystems.ActivePowerDroop
— Typemutable struct ActivePowerDroop <: ActivePowerControl
Rp::Float64
ωz::Float64
P_ref::Float64
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of an Active Power droop controller
Arguments
Rp::Float64
: Droop Gain, validation range:(0, nothing)
ωz::Float64
: filter frequency cutoff, validation range:(0, nothing)
P_ref::Float64
: (default:1.0
) Reference Power Set-point (pu), validation range:(0, nothing)
ext::Dict{String, Any}
: (default:Dict{String, Any}()
) An extra dictionary for users to add metadata that are not used in simulation, such as latitude and longitude.states::Vector{Symbol}
: (Do not modify.) The states of the ActivePowerDroop model are:
θ_oc: Phase angle displacement of the inverter model,
p_oc: Measured active power of the inverter model
n_states::Int
: (Do not modify.) ActivePowerDroop has two states
PowerSystems.get_P_ref
— Methodget_P_ref(value::ActivePowerDroop) -> Float64
Get ActivePowerDroop
P_ref
.
PowerSystems.get_Rp
— Methodget_Rp(value::ActivePowerDroop) -> Float64
Get ActivePowerDroop
Rp
.
PowerSystems.get_ext
— Methodget_ext(value::ActivePowerDroop) -> Dict{String, Any}
Get ActivePowerDroop
ext
.
PowerSystems.get_n_states
— Methodget_n_states(value::ActivePowerDroop) -> Int64
Get ActivePowerDroop
n_states
.
PowerSystems.get_states
— Methodget_states(value::ActivePowerDroop) -> Vector{Symbol}
Get ActivePowerDroop
states
.
PowerSystems.get_ωz
— Methodget_ωz(value::ActivePowerDroop) -> Float64
Get ActivePowerDroop
ωz
.
PowerSystems.set_P_ref!
— Methodset_P_ref!(value::ActivePowerDroop, val) -> Any
Set ActivePowerDroop
P_ref
.
PowerSystems.set_Rp!
— Methodset_Rp!(value::ActivePowerDroop, val) -> Any
Set ActivePowerDroop
Rp
.
PowerSystems.set_ext!
— Methodset_ext!(value::ActivePowerDroop, val) -> Any
Set ActivePowerDroop
ext
.
PowerSystems.set_ωz!
— Methodset_ωz!(value::ActivePowerDroop, val) -> Any
Set ActivePowerDroop
ωz
.
Active Power PI
PowerSystems.ActivePowerPI
— Typemutable struct ActivePowerPI <: ActivePowerControl
Kp_p::Float64
Ki_p::Float64
ωz::Float64
P_ref::Float64
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of a Proportional-Integral Active Power controller for a specified power reference
Arguments
Kp_p::Float64
: Proportional Gain, validation range:(0, nothing)
Ki_p::Float64
: Integral Gain, validation range:(0, nothing)
ωz::Float64
: filter frequency cutoff, validation range:(0, nothing)
P_ref::Float64
: (default:1.0
) Reference Power Set-point (pu), validation range:(0, nothing)
ext::Dict{String, Any}
: (default:Dict{String, Any}()
) An extra dictionary for users to add metadata that are not used in simulation, such as latitude and longitude.states::Vector{Symbol}
: (Do not modify.) The states of the ActivePowerPI model are:
σp_oc: Integrator state of the PI Controller,
p_oc: Measured active power of the inverter model
n_states::Int
: (Do not modify.) ActivePowerPI has two states
PowerSystems.get_Ki_p
— Methodget_Ki_p(value::ActivePowerPI) -> Float64
Get ActivePowerPI
Ki_p
.
PowerSystems.get_Kp_p
— Methodget_Kp_p(value::ActivePowerPI) -> Float64
Get ActivePowerPI
Kp_p
.
PowerSystems.get_P_ref
— Methodget_P_ref(value::ActivePowerPI) -> Float64
Get ActivePowerPI
P_ref
.
PowerSystems.get_ext
— Methodget_ext(value::ActivePowerPI) -> Dict{String, Any}
Get ActivePowerPI
ext
.
PowerSystems.get_n_states
— Methodget_n_states(value::ActivePowerPI) -> Int64
Get ActivePowerPI
n_states
.
PowerSystems.get_states
— Methodget_states(value::ActivePowerPI) -> Vector{Symbol}
Get ActivePowerPI
states
.
PowerSystems.get_ωz
— Methodget_ωz(value::ActivePowerPI) -> Float64
Get ActivePowerPI
ωz
.
PowerSystems.set_Ki_p!
— Methodset_Ki_p!(value::ActivePowerPI, val) -> Any
Set ActivePowerPI
Ki_p
.
PowerSystems.set_Kp_p!
— Methodset_Kp_p!(value::ActivePowerPI, val) -> Any
Set ActivePowerPI
Kp_p
.
PowerSystems.set_P_ref!
— Methodset_P_ref!(value::ActivePowerPI, val) -> Any
Set ActivePowerPI
P_ref
.
PowerSystems.set_ext!
— Methodset_ext!(value::ActivePowerPI, val) -> Any
Set ActivePowerPI
ext
.
PowerSystems.set_ωz!
— Methodset_ωz!(value::ActivePowerPI, val) -> Any
Set ActivePowerPI
ωz
.
Active Virtual Oscillator
PowerSystems.ActiveVirtualOscillator
— Typemutable struct ActiveVirtualOscillator <: ActivePowerControl
k1::Float64
ψ::Float64
P_ref::Float64
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of an Active Virtual Oscillator controller. Model is based on "Model Reduction for Inverters with Current Limiting and Dispatchable Virtual Oscillator Control."
Arguments
k1::Float64
: VOC Synchronization Gain, validation range:(0, nothing)
ψ::Float64
: Rotation angle of the controller, validation range:(0, nothing)
P_ref::Float64
: (default:1.0
) Reference Power Set-point (pu), validation range:(0, nothing)
ext::Dict{String, Any}
: (default:Dict{String, Any}()
) An extra dictionary for users to add metadata that are not used in simulation, such as latitude and longitude.states::Vector{Symbol}
: (Do not modify.) The states of the ActiveVirtualOscillator model are:
θ_oc: Phase angle displacement of the inverter model
n_states::Int
: (Do not modify.) ActiveVirtualOscillator has one state
PowerSystems.get_P_ref
— Methodget_P_ref(value::ActiveVirtualOscillator) -> Float64
Get ActiveVirtualOscillator
P_ref
.
PowerSystems.get_ext
— Methodget_ext(value::ActiveVirtualOscillator) -> Dict{String, Any}
Get ActiveVirtualOscillator
ext
.
PowerSystems.get_k1
— Methodget_k1(value::ActiveVirtualOscillator) -> Float64
Get ActiveVirtualOscillator
k1
.
PowerSystems.get_n_states
— Methodget_n_states(value::ActiveVirtualOscillator) -> Int64
Get ActiveVirtualOscillator
n_states
.
PowerSystems.get_states
— Methodget_states(value::ActiveVirtualOscillator) -> Vector{Symbol}
Get ActiveVirtualOscillator
states
.
PowerSystems.get_ψ
— Methodget_ψ(value::ActiveVirtualOscillator) -> Float64
Get ActiveVirtualOscillator
ψ
.
PowerSystems.set_P_ref!
— Methodset_P_ref!(value::ActiveVirtualOscillator, val) -> Any
Set ActiveVirtualOscillator
P_ref
.
PowerSystems.set_ext!
— Methodset_ext!(value::ActiveVirtualOscillator, val) -> Any
Set ActiveVirtualOscillator
ext
.
PowerSystems.set_k1!
— Methodset_k1!(value::ActiveVirtualOscillator, val) -> Any
Set ActiveVirtualOscillator
k1
.
PowerSystems.set_ψ!
— Methodset_ψ!(value::ActiveVirtualOscillator, val) -> Any
Set ActiveVirtualOscillator
ψ
.
Active Renewable Controller Type AB
PowerSystems.ActiveRenewableControllerAB
— Typemutable struct ActiveRenewableControllerAB <: ActivePowerControl
bus_control::Int
from_branch_control::Int
to_branch_control::Int
branch_id_control::String
Freq_Flag::Int
K_pg::Float64
K_ig::Float64
T_p::Float64
fdbd_pnts::Tuple{Float64, Float64}
fe_lim::MinMax
P_lim::MinMax
T_g::Float64
D_dn::Float64
D_up::Float64
dP_lim::MinMax
P_lim_inner::MinMax
T_pord::Float64
P_ref::Float64
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of Active Power Controller including REPCA1 and REECB1
Arguments
bus_control::Int
: ACBus identificationnumber
for voltage control.0
identifies the local bus connected to this component, validation range:(0, nothing)
from_branch_control::Int
: Monitored branch FROM bus number for line drop compensation (if 0 generator power will be used), validation range:(0, nothing)
to_branch_control::Int
: Monitored branch TO bus number for line drop compensation (if 0 generator power will be used), validation range:(0, nothing)
branch_id_control::String
: Branch circuit id for line drop compensation (as a string). If 0 generator power will be usedFreq_Flag::Int
: Frequency Flag for REPCA1: 0: disable, 1:enable, validation range:(0, 1)
K_pg::Float64
: Active power PI control proportional gain, validation range:(0, nothing)
K_ig::Float64
: Active power PI control integral gain, validation range:(0, nothing)
T_p::Float64
: Real power measurement filter time constant (s), validation range:(0, nothing)
fdbd_pnts::Tuple{Float64, Float64}
: Frequency error dead band thresholds(fdbd1, fdbd2)
fe_lim::MinMax
: Upper/Lower limit on frequency error(fe_min, fe_max)
P_lim::MinMax
: Upper/Lower limit on power reference(P_min, P_max)
T_g::Float64
: Power Controller lag time constant, validation range:(0, nothing)
D_dn::Float64
: Droop for over-frequency conditions, validation range:(nothing, 0)
D_up::Float64
: Droop for under-frequency conditions, validation range:(0, nothing)
dP_lim::MinMax
: Upper/Lower limit on power reference ramp rates(dP_min, dP_max)
P_lim_inner::MinMax
: Upper/Lower limit on power reference for REECB(P_min_inner, P_max_inner)
T_pord::Float64
: Power filter time constant REECB time constant, validation range:(0, nothing)
P_ref::Float64
: (default:1.0
) Reference Power Set-point (pu), validation range:(0, nothing)
ext::Dict{String, Any}
: (default:Dict{String, Any}()
) An extra dictionary for users to add metadata that are not used in simulation, such as latitude and longitude.states::Vector{Symbol}
: (Do not modify.) The states of the ActiveRenewableControllerAB model depends on the Flagn_states::Int
: (Do not modify.) The states of the ActiveRenewableControllerAB model depends on the Flag
PowerSystems.get_D_dn
— Methodget_D_dn(value::ActiveRenewableControllerAB) -> Float64
Get ActiveRenewableControllerAB
D_dn
.
PowerSystems.get_D_up
— Methodget_D_up(value::ActiveRenewableControllerAB) -> Float64
Get ActiveRenewableControllerAB
D_up
.
PowerSystems.get_Freq_Flag
— Methodget_Freq_Flag(value::ActiveRenewableControllerAB) -> Int64
Get ActiveRenewableControllerAB
Freq_Flag
.
PowerSystems.get_K_ig
— Methodget_K_ig(value::ActiveRenewableControllerAB) -> Float64
Get ActiveRenewableControllerAB
K_ig
.
PowerSystems.get_K_pg
— Methodget_K_pg(value::ActiveRenewableControllerAB) -> Float64
Get ActiveRenewableControllerAB
K_pg
.
PowerSystems.get_P_lim
— Methodget_P_lim(
value::ActiveRenewableControllerAB
) -> @NamedTuple{min::Float64, max::Float64}
Get ActiveRenewableControllerAB
P_lim
.
PowerSystems.get_P_lim_inner
— Methodget_P_lim_inner(
value::ActiveRenewableControllerAB
) -> @NamedTuple{min::Float64, max::Float64}
Get ActiveRenewableControllerAB
P_lim_inner
.
PowerSystems.get_P_ref
— Methodget_P_ref(value::ActiveRenewableControllerAB) -> Float64
Get ActiveRenewableControllerAB
P_ref
.
PowerSystems.get_T_g
— Methodget_T_g(value::ActiveRenewableControllerAB) -> Float64
Get ActiveRenewableControllerAB
T_g
.
PowerSystems.get_T_p
— Methodget_T_p(value::ActiveRenewableControllerAB) -> Float64
Get ActiveRenewableControllerAB
T_p
.
PowerSystems.get_T_pord
— Methodget_T_pord(value::ActiveRenewableControllerAB) -> Float64
Get ActiveRenewableControllerAB
T_pord
.
PowerSystems.get_branch_id_control
— Methodget_branch_id_control(
value::ActiveRenewableControllerAB
) -> String
Get ActiveRenewableControllerAB
branch_id_control
.
PowerSystems.get_bus_control
— Methodget_bus_control(value::ActiveRenewableControllerAB) -> Int64
Get ActiveRenewableControllerAB
bus_control
.
PowerSystems.get_dP_lim
— Methodget_dP_lim(
value::ActiveRenewableControllerAB
) -> @NamedTuple{min::Float64, max::Float64}
Get ActiveRenewableControllerAB
dP_lim
.
PowerSystems.get_ext
— Methodget_ext(
value::ActiveRenewableControllerAB
) -> Dict{String, Any}
Get ActiveRenewableControllerAB
ext
.
PowerSystems.get_fdbd_pnts
— Methodget_fdbd_pnts(
value::ActiveRenewableControllerAB
) -> Tuple{Float64, Float64}
Get ActiveRenewableControllerAB
fdbd_pnts
.
PowerSystems.get_fe_lim
— Methodget_fe_lim(
value::ActiveRenewableControllerAB
) -> @NamedTuple{min::Float64, max::Float64}
Get ActiveRenewableControllerAB
fe_lim
.
PowerSystems.get_from_branch_control
— Methodget_from_branch_control(
value::ActiveRenewableControllerAB
) -> Int64
Get ActiveRenewableControllerAB
from_branch_control
.
PowerSystems.get_n_states
— Methodget_n_states(value::ActiveRenewableControllerAB) -> Int64
Get ActiveRenewableControllerAB
n_states
.
PowerSystems.get_states
— Methodget_states(
value::ActiveRenewableControllerAB
) -> Vector{Symbol}
Get ActiveRenewableControllerAB
states
.
PowerSystems.get_to_branch_control
— Methodget_to_branch_control(
value::ActiveRenewableControllerAB
) -> Int64
Get ActiveRenewableControllerAB
to_branch_control
.
PowerSystems.set_D_dn!
— Methodset_D_dn!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
D_dn
.
PowerSystems.set_D_up!
— Methodset_D_up!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
D_up
.
PowerSystems.set_Freq_Flag!
— Methodset_Freq_Flag!(
value::ActiveRenewableControllerAB,
val
) -> Any
Set ActiveRenewableControllerAB
Freq_Flag
.
PowerSystems.set_K_ig!
— Methodset_K_ig!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
K_ig
.
PowerSystems.set_K_pg!
— Methodset_K_pg!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
K_pg
.
PowerSystems.set_P_lim!
— Methodset_P_lim!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
P_lim
.
PowerSystems.set_P_lim_inner!
— Methodset_P_lim_inner!(
value::ActiveRenewableControllerAB,
val
) -> Any
Set ActiveRenewableControllerAB
P_lim_inner
.
PowerSystems.set_P_ref!
— Methodset_P_ref!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
P_ref
.
PowerSystems.set_T_g!
— Methodset_T_g!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
T_g
.
PowerSystems.set_T_p!
— Methodset_T_p!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
T_p
.
PowerSystems.set_T_pord!
— Methodset_T_pord!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
T_pord
.
PowerSystems.set_branch_id_control!
— Methodset_branch_id_control!(
value::ActiveRenewableControllerAB,
val
) -> Any
Set ActiveRenewableControllerAB
branch_id_control
.
PowerSystems.set_bus_control!
— Methodset_bus_control!(
value::ActiveRenewableControllerAB,
val
) -> Any
Set ActiveRenewableControllerAB
bus_control
.
PowerSystems.set_dP_lim!
— Methodset_dP_lim!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
dP_lim
.
PowerSystems.set_ext!
— Methodset_ext!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
ext
.
PowerSystems.set_fdbd_pnts!
— Methodset_fdbd_pnts!(
value::ActiveRenewableControllerAB,
val
) -> Any
Set ActiveRenewableControllerAB
fdbd_pnts
.
PowerSystems.set_fe_lim!
— Methodset_fe_lim!(value::ActiveRenewableControllerAB, val) -> Any
Set ActiveRenewableControllerAB
fe_lim
.
PowerSystems.set_from_branch_control!
— Methodset_from_branch_control!(
value::ActiveRenewableControllerAB,
val
) -> Any
Set ActiveRenewableControllerAB
from_branch_control
.
PowerSystems.set_to_branch_control!
— Methodset_to_branch_control!(
value::ActiveRenewableControllerAB,
val
) -> Any
Set ActiveRenewableControllerAB
to_branch_control
.
Reactive Power Controllers
Reactive Power Droop
PowerSystems.ReactivePowerDroop
— Typemutable struct ReactivePowerDroop <: ReactivePowerControl
kq::Float64
ωf::Float64
V_ref::Float64
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of a Reactive Power droop controller
Arguments
kq::Float64
: frequency droop gain, validation range:(0, nothing)
ωf::Float64
: filter frequency cutoff, validation range:(0, nothing)
V_ref::Float64
: (default:1.0
) Reference Voltage Set-point (pu), validation range:(0, nothing)
ext::Dict{String, Any}
: (default:Dict{String, Any}()
) An extra dictionary for users to add metadata that are not used in simulation, such as latitude and longitude.states::Vector{Symbol}
: (Do not modify.) The states of the ReactivePowerDroop model are:
q_oc: Filtered reactive output power
n_states::Int
: (Do not modify.) ReactivePowerDroop has 1 state
PowerSystems.get_V_ref
— Methodget_V_ref(value::ReactivePowerDroop) -> Float64
Get ReactivePowerDroop
V_ref
.
PowerSystems.get_ext
— Methodget_ext(value::ReactivePowerDroop) -> Dict{String, Any}
Get ReactivePowerDroop
ext
.
PowerSystems.get_kq
— Methodget_kq(value::ReactivePowerDroop) -> Float64
Get ReactivePowerDroop
kq
.
PowerSystems.get_n_states
— Methodget_n_states(value::ReactivePowerDroop) -> Int64
Get ReactivePowerDroop
n_states
.
PowerSystems.get_states
— Methodget_states(value::ReactivePowerDroop) -> Vector{Symbol}
Get ReactivePowerDroop
states
.
PowerSystems.get_ωf
— Methodget_ωf(value::ReactivePowerDroop) -> Float64
Get ReactivePowerDroop
ωf
.
PowerSystems.set_V_ref!
— Methodset_V_ref!(value::ReactivePowerDroop, val) -> Any
Set ReactivePowerDroop
V_ref
.
PowerSystems.set_ext!
— Methodset_ext!(value::ReactivePowerDroop, val) -> Any
Set ReactivePowerDroop
ext
.
PowerSystems.set_kq!
— Methodset_kq!(value::ReactivePowerDroop, val) -> Any
Set ReactivePowerDroop
kq
.
PowerSystems.set_ωf!
— Methodset_ωf!(value::ReactivePowerDroop, val) -> Any
Set ReactivePowerDroop
ωf
.
Reactive Power PI
PowerSystems.ReactivePowerPI
— Typemutable struct ReactivePowerPI <: ReactivePowerControl
Kp_q::Float64
Ki_q::Float64
ωf::Float64
V_ref::Float64
Q_ref::Float64
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of a Proportional-Integral Reactive Power controller for a specified power reference
Arguments
Kp_q::Float64
: Proportional Gain, validation range:(0, nothing)
Ki_q::Float64
: Integral Gain, validation range:(0, nothing)
ωf::Float64
: filter frequency cutoff, validation range:(0, nothing)
V_ref::Float64
: (default:1.0
) Voltage Set-point (pu), validation range:(0, nothing)
Q_ref::Float64
: (default:1.0
) Reactive Power Set-point (pu), validation range:(0, nothing)
ext::Dict{String, Any}
: (default:Dict{String, Any}()
) An extra dictionary for users to add metadata that are not used in simulation, such as latitude and longitude.states::Vector{Symbol}
: (Do not modify.) The states of the ReactivePowerPI model are:
σq_oc: Integrator state of the PI Controller,
q_oc: Measured reactive power of the inverter model
n_states::Int
: (Do not modify.) ReactivePowerPI has two states
PowerSystems.get_Ki_q
— Methodget_Ki_q(value::ReactivePowerPI) -> Float64
Get ReactivePowerPI
Ki_q
.
PowerSystems.get_Kp_q
— Methodget_Kp_q(value::ReactivePowerPI) -> Float64
Get ReactivePowerPI
Kp_q
.
PowerSystems.get_Q_ref
— Methodget_Q_ref(value::ReactivePowerPI) -> Float64
Get ReactivePowerPI
Q_ref
.
PowerSystems.get_V_ref
— Methodget_V_ref(value::ReactivePowerPI) -> Float64
Get ReactivePowerPI
V_ref
.
PowerSystems.get_ext
— Methodget_ext(value::ReactivePowerPI) -> Dict{String, Any}
Get ReactivePowerPI
ext
.
PowerSystems.get_n_states
— Methodget_n_states(value::ReactivePowerPI) -> Int64
Get ReactivePowerPI
n_states
.
PowerSystems.get_states
— Methodget_states(value::ReactivePowerPI) -> Vector{Symbol}
Get ReactivePowerPI
states
.
PowerSystems.get_ωf
— Methodget_ωf(value::ReactivePowerPI) -> Float64
Get ReactivePowerPI
ωf
.
PowerSystems.set_Ki_q!
— Methodset_Ki_q!(value::ReactivePowerPI, val) -> Any
Set ReactivePowerPI
Ki_q
.
PowerSystems.set_Kp_q!
— Methodset_Kp_q!(value::ReactivePowerPI, val) -> Any
Set ReactivePowerPI
Kp_q
.
PowerSystems.set_Q_ref!
— Methodset_Q_ref!(value::ReactivePowerPI, val) -> Any
Set ReactivePowerPI
Q_ref
.
PowerSystems.set_V_ref!
— Methodset_V_ref!(value::ReactivePowerPI, val) -> Any
Set ReactivePowerPI
V_ref
.
PowerSystems.set_ext!
— Methodset_ext!(value::ReactivePowerPI, val) -> Any
Set ReactivePowerPI
ext
.
PowerSystems.set_ωf!
— Methodset_ωf!(value::ReactivePowerPI, val) -> Any
Set ReactivePowerPI
ωf
.
Reactive Virtual Oscillator
PowerSystems.ReactiveVirtualOscillator
— Typemutable struct ReactiveVirtualOscillator <: ReactivePowerControl
k2::Float64
V_ref::Float64
Q_ref::Float64
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of a Reactive Virtual Oscillator controller. Model is based on "Model Reduction for Inverters with Current Limiting and Dispatchable Virtual Oscillator Control."
Arguments
k2::Float64
: VOC voltage-amplitude control gain, validation range:(0, nothing)
V_ref::Float64
: (default:1.0
) Reference Voltage Set-point (pu), validation range:(0, nothing)
Q_ref::Float64
: (default:1.0
) Reference Reactive Power Set-point (pu), validation range:(0, nothing)
ext::Dict{String, Any}
: (default:Dict{String, Any}()
) An extra dictionary for users to add metadata that are not used in simulation, such as latitude and longitude.states::Vector{Symbol}
: (Do not modify.) The states of the ReactiveVirtualOscilator model are:
E_oc: voltage reference state for inner control in the d-axis
n_states::Int
: (Do not modify.) ReactiveVirtualOscillator has 1 state
PowerSystems.get_Q_ref
— Methodget_Q_ref(value::ReactiveVirtualOscillator) -> Float64
Get ReactiveVirtualOscillator
Q_ref
.
PowerSystems.get_V_ref
— Methodget_V_ref(value::ReactiveVirtualOscillator) -> Float64
Get ReactiveVirtualOscillator
V_ref
.
PowerSystems.get_ext
— Methodget_ext(
value::ReactiveVirtualOscillator
) -> Dict{String, Any}
Get ReactiveVirtualOscillator
ext
.
PowerSystems.get_k2
— Methodget_k2(value::ReactiveVirtualOscillator) -> Float64
Get ReactiveVirtualOscillator
k2
.
PowerSystems.get_n_states
— Methodget_n_states(value::ReactiveVirtualOscillator) -> Int64
Get ReactiveVirtualOscillator
n_states
.
PowerSystems.get_states
— Methodget_states(
value::ReactiveVirtualOscillator
) -> Vector{Symbol}
Get ReactiveVirtualOscillator
states
.
PowerSystems.set_Q_ref!
— Methodset_Q_ref!(value::ReactiveVirtualOscillator, val) -> Any
Set ReactiveVirtualOscillator
Q_ref
.
PowerSystems.set_V_ref!
— Methodset_V_ref!(value::ReactiveVirtualOscillator, val) -> Any
Set ReactiveVirtualOscillator
V_ref
.
PowerSystems.set_ext!
— Methodset_ext!(value::ReactiveVirtualOscillator, val) -> Any
Set ReactiveVirtualOscillator
ext
.
PowerSystems.set_k2!
— Methodset_k2!(value::ReactiveVirtualOscillator, val) -> Any
Set ReactiveVirtualOscillator
k2
.
Reactive Renewable Controller Type AB
PowerSystems.ReactiveRenewableControllerAB
— Typemutable struct ReactiveRenewableControllerAB <: ReactivePowerControl
bus_control::Int
from_branch_control::Int
to_branch_control::Int
branch_id_control::String
VC_Flag::Int
Ref_Flag::Int
PF_Flag::Int
V_Flag::Int
T_fltr::Float64
K_p::Float64
K_i::Float64
T_ft::Float64
T_fv::Float64
V_frz::Float64
R_c::Float64
X_c::Float64
K_c::Float64
e_lim::MinMax
dbd_pnts::Tuple{Float64, Float64}
Q_lim::MinMax
T_p::Float64
Q_lim_inner::MinMax
V_lim::MinMax
K_qp::Float64
K_qi::Float64
Q_ref::Float64
V_ref::Float64
ext::Dict{String, Any}
states::Vector{Symbol}
n_states::Int
end
Parameters of Reactive Power Controller including REPCA1 and REECB1
Arguments
bus_control::Int
: ACBus identificationnumber
for voltage control.0
identifies the local bus connected to this component, validation range:(0, nothing)
from_branch_control::Int
: Monitored branch FROM bus identification number for line drop compensation (if 0 generator power will be used), validation range:(0, nothing)
to_branch_control::Int
: Monitored branch TO bus identification number for line drop compensation (if 0 generator power will be used), validation range:(0, nothing)
branch_id_control::String
: Branch circuit id for line drop compensation (as a string). If 0 generator power will be usedVC_Flag::Int
: Voltage Compensator Flag for REPCA1, validation range:(0, 1)
Ref_Flag::Int
: Flag for Reactive Power Control for REPCA1. 0: Q-control, 1: V-control, validation range:(0, 1)
PF_Flag::Int
: Flag for Power Factor Control for Outer Control of REECB1. 0: Q-control, 1: Power Factor Control, validation range:(0, 1)
V_Flag::Int
: Flag for Voltage Control for Outer Control of REECB1. 0: Voltage Control, 1: Q-Control, validation range:(0, 1)
T_fltr::Float64
: Voltage or Q-power of REPCA Filter Time Constant, validation range:(0, nothing)
K_p::Float64
: Reactive power PI control proportional gain, validation range:(0, nothing)
K_i::Float64
: Reactive power PI control integral gain, validation range:(0, nothing)
T_ft::Float64
: Reactive power lead time constant (s), validation range:(0, nothing)
T_fv::Float64
: Reactive power lag time constant (s), validation range:(0, nothing)
V_frz::Float64
: Voltage below which state ξq_oc (integrator state) is freeze, validation range:(0, nothing)
R_c::Float64
: Line drop compensation resistance (used when VC_Flag = 1), validation range:(0, nothing)
X_c::Float64
: Line drop compensation reactance (used when VC_Flag = 1), validation range:(0, nothing)
K_c::Float64
: Reactive current compensation gain (pu) (used when VC_Flag = 0), validation range:(0, nothing)
e_lim::MinMax
: Upper/Lower limit on Voltage or Q-power deadband output(e_min, e_max)
dbd_pnts::Tuple{Float64, Float64}
: Voltage or Q-power error dead band thresholds(dbd1, dbd2)
Q_lim::MinMax
: Upper/Lower limit on reactive power V/Q control in REPCA(Q_min, Q_max)
T_p::Float64
: Active power lag time constant in REECB (s). Used only when PF_Flag = 1, validation range:(0, nothing)
Q_lim_inner::MinMax
: Upper/Lower limit on reactive power input in REECB(Q_min_inner, Q_max_inner)
. Only used when V_Flag = 1V_lim::MinMax
: Upper/Lower limit on reactive power PI controller in REECB(V_min, V_max)
. Only used when V_Flag = 1K_qp::Float64
: Reactive power regulator proportional gain (used when V_Flag = 1), validation range:(0, nothing)
K_qi::Float64
: Reactive power regulator integral gain (used when V_Flag = 1), validation range:(0, nothing)
Q_ref::Float64
: (default:1.0
) Reference Reactive Power Set-point (pu), validation range:(0, nothing)
V_ref::Float64
: (default:1.0
) Reference Voltage Set-point (pu), validation range:(0, nothing)
ext::Dict{String, Any}
: (default:Dict{String, Any}()
) An extra dictionary for users to add metadata that are not used in simulation, such as latitude and longitude.states::Vector{Symbol}
: (Do not modify.) The states of the ReactiveRenewableControllerAB model depends on the Flagn_states::Int
: (Do not modify.) The states of the ReactiveRenewableControllerAB model depends on the Flag
PowerSystems.get_K_c
— Methodget_K_c(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
K_c
.
PowerSystems.get_K_i
— Methodget_K_i(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
K_i
.
PowerSystems.get_K_p
— Methodget_K_p(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
K_p
.
PowerSystems.get_K_qi
— Methodget_K_qi(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
K_qi
.
PowerSystems.get_K_qp
— Methodget_K_qp(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
K_qp
.
PowerSystems.get_PF_Flag
— Methodget_PF_Flag(value::ReactiveRenewableControllerAB) -> Int64
Get ReactiveRenewableControllerAB
PF_Flag
.
PowerSystems.get_Q_lim
— Methodget_Q_lim(
value::ReactiveRenewableControllerAB
) -> @NamedTuple{min::Float64, max::Float64}
Get ReactiveRenewableControllerAB
Q_lim
.
PowerSystems.get_Q_lim_inner
— Methodget_Q_lim_inner(
value::ReactiveRenewableControllerAB
) -> @NamedTuple{min::Float64, max::Float64}
Get ReactiveRenewableControllerAB
Q_lim_inner
.
PowerSystems.get_Q_ref
— Methodget_Q_ref(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
Q_ref
.
PowerSystems.get_R_c
— Methodget_R_c(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
R_c
.
PowerSystems.get_Ref_Flag
— Methodget_Ref_Flag(value::ReactiveRenewableControllerAB) -> Int64
Get ReactiveRenewableControllerAB
Ref_Flag
.
PowerSystems.get_T_fltr
— Methodget_T_fltr(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
T_fltr
.
PowerSystems.get_T_ft
— Methodget_T_ft(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
T_ft
.
PowerSystems.get_T_fv
— Methodget_T_fv(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
T_fv
.
PowerSystems.get_T_p
— Methodget_T_p(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
T_p
.
PowerSystems.get_VC_Flag
— Methodget_VC_Flag(value::ReactiveRenewableControllerAB) -> Int64
Get ReactiveRenewableControllerAB
VC_Flag
.
PowerSystems.get_V_Flag
— Methodget_V_Flag(value::ReactiveRenewableControllerAB) -> Int64
Get ReactiveRenewableControllerAB
V_Flag
.
PowerSystems.get_V_frz
— Methodget_V_frz(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
V_frz
.
PowerSystems.get_V_lim
— Methodget_V_lim(
value::ReactiveRenewableControllerAB
) -> @NamedTuple{min::Float64, max::Float64}
Get ReactiveRenewableControllerAB
V_lim
.
PowerSystems.get_V_ref
— Methodget_V_ref(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
V_ref
.
PowerSystems.get_X_c
— Methodget_X_c(value::ReactiveRenewableControllerAB) -> Float64
Get ReactiveRenewableControllerAB
X_c
.
PowerSystems.get_branch_id_control
— Methodget_branch_id_control(
value::ReactiveRenewableControllerAB
) -> String
Get ReactiveRenewableControllerAB
branch_id_control
.
PowerSystems.get_bus_control
— Methodget_bus_control(
value::ReactiveRenewableControllerAB
) -> Int64
Get ReactiveRenewableControllerAB
bus_control
.
PowerSystems.get_dbd_pnts
— Methodget_dbd_pnts(
value::ReactiveRenewableControllerAB
) -> Tuple{Float64, Float64}
Get ReactiveRenewableControllerAB
dbd_pnts
.
PowerSystems.get_e_lim
— Methodget_e_lim(
value::ReactiveRenewableControllerAB
) -> @NamedTuple{min::Float64, max::Float64}
Get ReactiveRenewableControllerAB
e_lim
.
PowerSystems.get_ext
— Methodget_ext(
value::ReactiveRenewableControllerAB
) -> Dict{String, Any}
Get ReactiveRenewableControllerAB
ext
.
PowerSystems.get_from_branch_control
— Methodget_from_branch_control(
value::ReactiveRenewableControllerAB
) -> Int64
Get ReactiveRenewableControllerAB
from_branch_control
.
PowerSystems.get_n_states
— Methodget_n_states(value::ReactiveRenewableControllerAB) -> Int64
Get ReactiveRenewableControllerAB
n_states
.
PowerSystems.get_states
— Methodget_states(
value::ReactiveRenewableControllerAB
) -> Vector{Symbol}
Get ReactiveRenewableControllerAB
states
.
PowerSystems.get_to_branch_control
— Methodget_to_branch_control(
value::ReactiveRenewableControllerAB
) -> Int64
Get ReactiveRenewableControllerAB
to_branch_control
.
PowerSystems.set_K_c!
— Methodset_K_c!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
K_c
.
PowerSystems.set_K_i!
— Methodset_K_i!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
K_i
.
PowerSystems.set_K_p!
— Methodset_K_p!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
K_p
.
PowerSystems.set_K_qi!
— Methodset_K_qi!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
K_qi
.
PowerSystems.set_K_qp!
— Methodset_K_qp!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
K_qp
.
PowerSystems.set_PF_Flag!
— Methodset_PF_Flag!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
PF_Flag
.
PowerSystems.set_Q_lim!
— Methodset_Q_lim!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
Q_lim
.
PowerSystems.set_Q_lim_inner!
— Methodset_Q_lim_inner!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
Q_lim_inner
.
PowerSystems.set_Q_ref!
— Methodset_Q_ref!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
Q_ref
.
PowerSystems.set_R_c!
— Methodset_R_c!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
R_c
.
PowerSystems.set_Ref_Flag!
— Methodset_Ref_Flag!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
Ref_Flag
.
PowerSystems.set_T_fltr!
— Methodset_T_fltr!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
T_fltr
.
PowerSystems.set_T_ft!
— Methodset_T_ft!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
T_ft
.
PowerSystems.set_T_fv!
— Methodset_T_fv!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
T_fv
.
PowerSystems.set_T_p!
— Methodset_T_p!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
T_p
.
PowerSystems.set_VC_Flag!
— Methodset_VC_Flag!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
VC_Flag
.
PowerSystems.set_V_Flag!
— Methodset_V_Flag!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
V_Flag
.
PowerSystems.set_V_frz!
— Methodset_V_frz!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
V_frz
.
PowerSystems.set_V_lim!
— Methodset_V_lim!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
V_lim
.
PowerSystems.set_V_ref!
— Methodset_V_ref!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
V_ref
.
PowerSystems.set_X_c!
— Methodset_X_c!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
X_c
.
PowerSystems.set_branch_id_control!
— Methodset_branch_id_control!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
branch_id_control
.
PowerSystems.set_bus_control!
— Methodset_bus_control!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
bus_control
.
PowerSystems.set_dbd_pnts!
— Methodset_dbd_pnts!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
dbd_pnts
.
PowerSystems.set_e_lim!
— Methodset_e_lim!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
e_lim
.
PowerSystems.set_ext!
— Methodset_ext!(value::ReactiveRenewableControllerAB, val) -> Any
Set ReactiveRenewableControllerAB
ext
.
PowerSystems.set_from_branch_control!
— Methodset_from_branch_control!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
from_branch_control
.
PowerSystems.set_to_branch_control!
— Methodset_to_branch_control!(
value::ReactiveRenewableControllerAB,
val
) -> Any
Set ReactiveRenewableControllerAB
to_branch_control
.