Skip to content

Commit

Permalink
change placement of kiv in hyblim
Browse files Browse the repository at this point in the history
  • Loading branch information
HaleyRoss committed May 28, 2024
1 parent 999e6e5 commit f4dbd88
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/models/inverter_models/inner_control_models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -569,11 +569,10 @@ function mdl_inner_ode!(
#Get limiter and apply output current limiting
limiter = PSY.get_limiter(dynamic_device)
Id_cnv_ref2, Iq_cnv_ref2, Del_Vv_d, Del_Vv_q = limit_output_current(limiter, Id_cnv_ref, Iq_cnv_ref)
@show Del_Vv_d
@show Del_Vv_q

# Limiter anti- windup
dξd_dt = ((Vd_filter_ref - V_dq_filter[d]) - Del_Vv_d)
dξq_dt = ((Vq_filter_ref - V_dq_filter[q]) - Del_Vv_q)
dξd_dt = (Vd_filter_ref - V_dq_filter[d]) - Del_Vv_d
dξq_dt = (Vq_filter_ref - V_dq_filter[q]) - Del_Vv_q

#PI Integrator (internal state)
output_ode[local_ix[1]] = dξd_dt
Expand Down Expand Up @@ -685,16 +684,16 @@ function mdl_inner_ode!(
Integral_q = ξ_q

#Compensate output Control Signal - Links to SRF Current Controller
Id_cnv_ref = Prop_d + Integral_d - cf * ω_oc * V_dq_filter[q] + kffi * I_dq_filter[d]
Iq_cnv_ref = Prop_q + Integral_q + cf * ω_oc * V_dq_filter[d] + kffi * I_dq_filter[q]
Id_cnv_ref = Prop_d + (kiv * Integral_d) - cf * ω_oc * V_dq_filter[q] + kffi * I_dq_filter[d]
Iq_cnv_ref = Prop_q + (kiv * Integral_q) + cf * ω_oc * V_dq_filter[d] + kffi * I_dq_filter[q]

#Get limiter and apply output current limiting
limiter = PSY.get_limiter(dynamic_device)
Id_cnv_ref2, Iq_cnv_ref2, Del_Vv_d, Del_Vv_q = limit_output_current(limiter, Id_cnv_ref, Iq_cnv_ref, ω_oc)

# Limiter anti- windup
dξd_dt = kiv * ((Vd_filter_ref - V_dq_filter[d]) - Del_Vv_d)
dξq_dt = kiv * ((Vq_filter_ref - V_dq_filter[q]) - Del_Vv_q)
dξd_dt = (Vd_filter_ref - V_dq_filter[d]) - Del_Vv_d
dξq_dt = (Vq_filter_ref - V_dq_filter[q]) - Del_Vv_q

#PI Integrator (internal state)
output_ode[local_ix[1]] = dξd_dt
Expand Down

0 comments on commit f4dbd88

Please sign in to comment.