OuterControl

The outer control is composed by the ReactivePowerControl and the ActivePowerControl types.

PowerSystems.OuterControlType
mutable 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).
source

Active Power Controllers

Virtual Inertia

PowerSystems.VirtualInertiaType
mutable 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
source

Active Power Droop

PowerSystems.ActivePowerDroopType
mutable 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
source

Active Power PI

PowerSystems.ActivePowerPIType
mutable 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
source

Active Virtual Oscillator

PowerSystems.ActiveVirtualOscillatorType
mutable 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
source

Active Renewable Controller Type AB

PowerSystems.ActiveRenewableControllerABType
mutable 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 identification number 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 used
  • Freq_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 Flag
  • n_states::Int: (Do not modify.) The states of the ActiveRenewableControllerAB model depends on the Flag
source

Reactive Power Controllers

Reactive Power Droop

PowerSystems.ReactivePowerDroopType
mutable 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
source

Reactive Power PI

PowerSystems.ReactivePowerPIType
mutable 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
source

Reactive Virtual Oscillator

PowerSystems.ReactiveVirtualOscillatorType
mutable 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
source

Reactive Renewable Controller Type AB

PowerSystems.ReactiveRenewableControllerABType
mutable 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 identification number 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 used
  • VC_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 = 1
  • V_lim::MinMax: Upper/Lower limit on reactive power PI controller in REECB (V_min, V_max). Only used when V_Flag = 1
  • K_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 Flag
  • n_states::Int: (Do not modify.) The states of the ReactiveRenewableControllerAB model depends on the Flag
source