双馈风机机电暂态模型内部变量的初始化

2019-04-14 17:32发布

前一篇介绍了风速和桨距角的初始化,然而风机内部还有许多状态变量需要初始化,这里进行介绍。 首先介绍一些内部公式: S_{elec}=V_{term}I_{sorc}^*=P_{elec}+jQ_{elec}     星号表共轭conj,则I_{sorc}=left ({frac{P_{elec}+jQ_{elec}}{V}} 
ight )^* S_{gen}=S_{elec}-frac{left | V_{term} 
ight |^2}{-1jX_{sec}} Q_{elec}=-I_qV_t=frac{E_q}{left | X_{sec} 
ight |}left | V_{term} 
ight | P_{elec}=I_pleft | V_{term} 
ight | T_{con}dot{E_q}=E_{qcmd}-E_{q},T_{con}dot{I_p}=I_{pcmd}-I_{p}   %s0gc,s1gc %% input Qgen Pelec V 注意:Qgen不是注入节点的无功,应该是暂态电抗后的无功 V4=abs(Vwinit(co_node)); %Voltage at WTG bus Vterm4=V4; Qgen4=Qgen4abs(co_node)/Sbasem4; %Initial reactive power %pu mach Pelec4=Pelec4abs(co_node)/Sbasem4; %Initial active power %disp('Complex power after shunt reactance Xsec') Sgen4=Pelec4+1i*Qgen4; %disp('Reactive power into shunt reactance Xsec') Sx4=(abs(Vwinit(co_node)))^2/(-1i*Xsec); %disp('Complex power in front of shunt reactance Xsec') Selec4=Sgen4+Sx4; s0gc=Xsec*imag(Selec4)/Vterm4; %Eq s1gc=real(Selec4)/Vterm4; %Ip dot{V}_{ref}=K_{Qi}left ( {Q_{cmd}-Q_{gen}} 
ight ) dot{s}_{1cc}=K_{Vi}left ( {V_{ref}-V_{term}} 
ight )E_{qcmd}=s_{1cc}+K_{piadd}left ( {V_{ref}-V_{term}} 
ight ) s1cc=s0gc; %Eqcmd s0cc=Vterm4; %Vref T_{pwr}dot{s}_{6cc}=P_{elec}-s_{6cc} T_{c}dot{Q}_{ord}=Q_{limit}-Q_{ord} 图中状态变量的初始化见下面的代码 Pord=s1gc*Vterm4; %=Pelec4 in the case that Vterm4=V(4)=real number. Qord=Qgen4; s6cc=Pelec4; s7cc=0; %Q droop s5cc=Qord; s2cc=0; s4cc=s5cc-s2cc; %s3cc=Vreg4; 风电惯量控制: %Wind inertia control s13wt=0; s12wt=0; %Power response rate limiter s10wt=0; Pinp的初始化 pinp=Pord; s4wt=pinp; s2wt=s4wt/w(co_node); %Tcmd0 s11wt=Pmech4; %Pitch compensation and pitch controller if (pinp-pstl) < 0 s3wt=-Kpc*(pinp-pstl); %Initial values of pitch compensator s1wt=0; %Inital value of pitch controller else s3wt=theta(co_node); s1wt=0; end wref=w(co_node); s5wt=wref;