/src/models/generated/EXAC1.jl

https://github.com/NREL/PowerSystems.jl · Julia · 220 lines · 207 code · 8 blank · 5 comment · 13 complexity · 148e29bd15eaff505eb34386f5029660 MD5 · raw file

  1. #=
  2. This file is auto-generated. Do not edit.
  3. =#
  4. """
  5. mutable struct EXAC1 <: AVR
  6. Tr::Float64
  7. Tb::Float64
  8. Tc::Float64
  9. Ka::Float64
  10. Ta::Float64
  11. Vr_lim::NamedTuple{(:min, :max), Tuple{Float64, Float64}}
  12. Te::Float64
  13. Kf::Float64
  14. Tf::Float64
  15. Kc::Float64
  16. Kd::Float64
  17. Ke::Float64
  18. E_sat::Tuple{Float64, Float64}
  19. Se::Tuple{Float64, Float64}
  20. V_ref::Float64
  21. saturation_coeffs::Tuple{Float64, Float64}
  22. ext::Dict{String, Any}
  23. states::Vector{Symbol}
  24. n_states::Int
  25. states_types::Vector{StateTypes}
  26. internal::InfrastructureSystemsInternal
  27. end
  28. Modified ESAC1A. This excitation systems consists of an alternator main exciter feeding its output via non-controlled rectifiers.
  29. The exciter does not employ self-excitation, and the voltage regulator power is taken from a source that is not affected by external transients.
  30. Parameters of IEEE Std 421.5 Type AC1A. EXAC1 in PSSE and PSLF
  31. # Arguments
  32. - `Tr::Float64`: Regulator input filter time constant in s, validation range: `(0, 0.5)`, action if invalid: `warn`
  33. - `Tb::Float64`: Regulator denominator (lag) time constant in s, validation range: `(0, 20)`, action if invalid: `warn`
  34. - `Tc::Float64`: Regulator numerator (lead) time constant in s, validation range: `(0, 20)`, action if invalid: `warn`
  35. - `Ka::Float64`: Regulator output gain, validation range: `(0, 1000)`
  36. - `Ta::Float64`: Regulator output time constant in s, validation range: `(0, 10)`, action if invalid: `warn`
  37. - `Vr_lim::NamedTuple{(:min, :max), Tuple{Float64, Float64}}`: Limits for regulator output `(Vr_min, Vr_max)`
  38. - `Te::Float64`: Exciter field time constant in s, validation range: `(eps(), 2)`, action if invalid: `error`
  39. - `Kf::Float64`: Rate feedback excitation system stabilizer gain, validation range: `(0, 0.3)`, action if invalid: `warn`
  40. - `Tf::Float64`: Rate feedback time constant, validation range: `(eps(), 1.5)`, action if invalid: `error`
  41. - `Kc::Float64`: Rectifier loading factor proportional to commutating reactance, validation range: `(0, 1)`
  42. - `Kd::Float64`: Demagnetizing factor, function of exciter alternator reactances, validation range: `(0, 1)`, action if invalid: `warn`
  43. - `Ke::Float64`: Exciter field proportional constant, validation range: `(0, 1)`, action if invalid: `warn`
  44. - `E_sat::Tuple{Float64, Float64}`: Exciter output voltage for saturation factor: (E1, E2)
  45. - `Se::Tuple{Float64, Float64}`: Exciter saturation factor at exciter output voltage: (Se(E1), Se(E2))
  46. - `V_ref::Float64`: Reference Voltage Set-point, validation range: `(0, nothing)`
  47. - `saturation_coeffs::Tuple{Float64, Float64}`: Coefficients (A,B) of the function: Se(V) = B(V - A)^2/V
  48. - `ext::Dict{String, Any}`
  49. - `states::Vector{Symbol}`: The states are:
  50. Vm: Sensed terminal voltage,
  51. Vr1: Lead-lag state,
  52. Vr2: Regulator output state,
  53. Ve: Integrator output state,
  54. Vr3: Feedback output state
  55. - `n_states::Int`: EXAC1 has 5 states
  56. - `states_types::Vector{StateTypes}`: EXAC1 has 5 states
  57. - `internal::InfrastructureSystemsInternal`: power system internal reference, do not modify
  58. """
  59. mutable struct EXAC1 <: AVR
  60. "Regulator input filter time constant in s"
  61. Tr::Float64
  62. "Regulator denominator (lag) time constant in s"
  63. Tb::Float64
  64. "Regulator numerator (lead) time constant in s"
  65. Tc::Float64
  66. "Regulator output gain"
  67. Ka::Float64
  68. "Regulator output time constant in s"
  69. Ta::Float64
  70. "Limits for regulator output `(Vr_min, Vr_max)`"
  71. Vr_lim::NamedTuple{(:min, :max), Tuple{Float64, Float64}}
  72. "Exciter field time constant in s"
  73. Te::Float64
  74. "Rate feedback excitation system stabilizer gain"
  75. Kf::Float64
  76. "Rate feedback time constant"
  77. Tf::Float64
  78. "Rectifier loading factor proportional to commutating reactance"
  79. Kc::Float64
  80. "Demagnetizing factor, function of exciter alternator reactances"
  81. Kd::Float64
  82. "Exciter field proportional constant"
  83. Ke::Float64
  84. "Exciter output voltage for saturation factor: (E1, E2)"
  85. E_sat::Tuple{Float64, Float64}
  86. "Exciter saturation factor at exciter output voltage: (Se(E1), Se(E2))"
  87. Se::Tuple{Float64, Float64}
  88. "Reference Voltage Set-point"
  89. V_ref::Float64
  90. "Coefficients (A,B) of the function: Se(V) = B(V - A)^2/V"
  91. saturation_coeffs::Tuple{Float64, Float64}
  92. ext::Dict{String, Any}
  93. "The states are:
  94. Vm: Sensed terminal voltage,
  95. Vr1: Lead-lag state,
  96. Vr2: Regulator output state,
  97. Ve: Integrator output state,
  98. Vr3: Feedback output state"
  99. states::Vector{Symbol}
  100. "EXAC1 has 5 states"
  101. n_states::Int
  102. "EXAC1 has 5 states"
  103. states_types::Vector{StateTypes}
  104. "power system internal reference, do not modify"
  105. internal::InfrastructureSystemsInternal
  106. end
  107. function EXAC1(Tr, Tb, Tc, Ka, Ta, Vr_lim, Te, Kf, Tf, Kc, Kd, Ke, E_sat, Se, V_ref=1.0, saturation_coeffs=PowerSystems.get_avr_saturation(E_sat, Se), ext=Dict{String, Any}(), )
  108. EXAC1(Tr, Tb, Tc, Ka, Ta, Vr_lim, Te, Kf, Tf, Kc, Kd, Ke, E_sat, Se, V_ref, saturation_coeffs, ext, [:Vm, :Vr1, :Vr2, :Ve, :Vr3], 5, [StateTypes.Hybrid, StateTypes.Hybrid, StateTypes.Hybrid, StateTypes.Differential, StateTypes.Differential], InfrastructureSystemsInternal(), )
  109. end
  110. function EXAC1(; Tr, Tb, Tc, Ka, Ta, Vr_lim, Te, Kf, Tf, Kc, Kd, Ke, E_sat, Se, V_ref=1.0, saturation_coeffs=PowerSystems.get_avr_saturation(E_sat, Se), ext=Dict{String, Any}(), states=[:Vm, :Vr1, :Vr2, :Ve, :Vr3], n_states=5, states_types=[StateTypes.Hybrid, StateTypes.Hybrid, StateTypes.Hybrid, StateTypes.Differential, StateTypes.Differential], internal=InfrastructureSystemsInternal(), )
  111. EXAC1(Tr, Tb, Tc, Ka, Ta, Vr_lim, Te, Kf, Tf, Kc, Kd, Ke, E_sat, Se, V_ref, saturation_coeffs, ext, states, n_states, states_types, internal, )
  112. end
  113. # Constructor for demo purposes; non-functional.
  114. function EXAC1(::Nothing)
  115. EXAC1(;
  116. Tr=0,
  117. Tb=0,
  118. Tc=0,
  119. Ka=0,
  120. Ta=0,
  121. Vr_lim=(min=0.0, max=0.0),
  122. Te=0,
  123. Kf=0,
  124. Tf=0,
  125. Kc=0,
  126. Kd=0,
  127. Ke=0,
  128. E_sat=(0.0, 0.0),
  129. Se=(0.0, 0.0),
  130. V_ref=0,
  131. saturation_coeffs=(0.0, 0.0),
  132. ext=Dict{String, Any}(),
  133. )
  134. end
  135. """Get [`EXAC1`](@ref) `Tr`."""
  136. get_Tr(value::EXAC1) = value.Tr
  137. """Get [`EXAC1`](@ref) `Tb`."""
  138. get_Tb(value::EXAC1) = value.Tb
  139. """Get [`EXAC1`](@ref) `Tc`."""
  140. get_Tc(value::EXAC1) = value.Tc
  141. """Get [`EXAC1`](@ref) `Ka`."""
  142. get_Ka(value::EXAC1) = value.Ka
  143. """Get [`EXAC1`](@ref) `Ta`."""
  144. get_Ta(value::EXAC1) = value.Ta
  145. """Get [`EXAC1`](@ref) `Vr_lim`."""
  146. get_Vr_lim(value::EXAC1) = value.Vr_lim
  147. """Get [`EXAC1`](@ref) `Te`."""
  148. get_Te(value::EXAC1) = value.Te
  149. """Get [`EXAC1`](@ref) `Kf`."""
  150. get_Kf(value::EXAC1) = value.Kf
  151. """Get [`EXAC1`](@ref) `Tf`."""
  152. get_Tf(value::EXAC1) = value.Tf
  153. """Get [`EXAC1`](@ref) `Kc`."""
  154. get_Kc(value::EXAC1) = value.Kc
  155. """Get [`EXAC1`](@ref) `Kd`."""
  156. get_Kd(value::EXAC1) = value.Kd
  157. """Get [`EXAC1`](@ref) `Ke`."""
  158. get_Ke(value::EXAC1) = value.Ke
  159. """Get [`EXAC1`](@ref) `E_sat`."""
  160. get_E_sat(value::EXAC1) = value.E_sat
  161. """Get [`EXAC1`](@ref) `Se`."""
  162. get_Se(value::EXAC1) = value.Se
  163. """Get [`EXAC1`](@ref) `V_ref`."""
  164. get_V_ref(value::EXAC1) = value.V_ref
  165. """Get [`EXAC1`](@ref) `saturation_coeffs`."""
  166. get_saturation_coeffs(value::EXAC1) = value.saturation_coeffs
  167. """Get [`EXAC1`](@ref) `ext`."""
  168. get_ext(value::EXAC1) = value.ext
  169. """Get [`EXAC1`](@ref) `states`."""
  170. get_states(value::EXAC1) = value.states
  171. """Get [`EXAC1`](@ref) `n_states`."""
  172. get_n_states(value::EXAC1) = value.n_states
  173. """Get [`EXAC1`](@ref) `states_types`."""
  174. get_states_types(value::EXAC1) = value.states_types
  175. """Get [`EXAC1`](@ref) `internal`."""
  176. get_internal(value::EXAC1) = value.internal
  177. """Set [`EXAC1`](@ref) `Tr`."""
  178. set_Tr!(value::EXAC1, val) = value.Tr = val
  179. """Set [`EXAC1`](@ref) `Tb`."""
  180. set_Tb!(value::EXAC1, val) = value.Tb = val
  181. """Set [`EXAC1`](@ref) `Tc`."""
  182. set_Tc!(value::EXAC1, val) = value.Tc = val
  183. """Set [`EXAC1`](@ref) `Ka`."""
  184. set_Ka!(value::EXAC1, val) = value.Ka = val
  185. """Set [`EXAC1`](@ref) `Ta`."""
  186. set_Ta!(value::EXAC1, val) = value.Ta = val
  187. """Set [`EXAC1`](@ref) `Vr_lim`."""
  188. set_Vr_lim!(value::EXAC1, val) = value.Vr_lim = val
  189. """Set [`EXAC1`](@ref) `Te`."""
  190. set_Te!(value::EXAC1, val) = value.Te = val
  191. """Set [`EXAC1`](@ref) `Kf`."""
  192. set_Kf!(value::EXAC1, val) = value.Kf = val
  193. """Set [`EXAC1`](@ref) `Tf`."""
  194. set_Tf!(value::EXAC1, val) = value.Tf = val
  195. """Set [`EXAC1`](@ref) `Kc`."""
  196. set_Kc!(value::EXAC1, val) = value.Kc = val
  197. """Set [`EXAC1`](@ref) `Kd`."""
  198. set_Kd!(value::EXAC1, val) = value.Kd = val
  199. """Set [`EXAC1`](@ref) `Ke`."""
  200. set_Ke!(value::EXAC1, val) = value.Ke = val
  201. """Set [`EXAC1`](@ref) `E_sat`."""
  202. set_E_sat!(value::EXAC1, val) = value.E_sat = val
  203. """Set [`EXAC1`](@ref) `Se`."""
  204. set_Se!(value::EXAC1, val) = value.Se = val
  205. """Set [`EXAC1`](@ref) `V_ref`."""
  206. set_V_ref!(value::EXAC1, val) = value.V_ref = val
  207. """Set [`EXAC1`](@ref) `saturation_coeffs`."""
  208. set_saturation_coeffs!(value::EXAC1, val) = value.saturation_coeffs = val
  209. """Set [`EXAC1`](@ref) `ext`."""
  210. set_ext!(value::EXAC1, val) = value.ext = val
  211. """Set [`EXAC1`](@ref) `states_types`."""
  212. set_states_types!(value::EXAC1, val) = value.states_types = val