|
|
马上加入,结交更多好友,共享更多资料,让你轻松玩转电力研学社区!
您需要 登录 才可以下载或查看,没有账号?立即加入
×
本人主要研究交直流混合仿真中的变换器控制对电网稳定性影响,目前主要针对功角暂态稳定影响。刚刚开始研究PST工具箱中的各个函数文件,对s_simu.m的各个功能模块都已经比较熟悉,可惜主题程序虽然有直流整流器、逆变器、TCSC和SVC等HVDC的自定义控制模块驱动程序,但是不知道具体如何将自己的控制算法写进去?
$ P. u0 f4 s6 y诸如以下一段代码:$ M& q% |) b- x' a; o7 l' p5 l
if ndcr_ud~=0- I: R8 T3 m8 v$ I% i. B
% calculate the new value of bus angles rectifier user defined control+ v; R( i" h- n+ p% K& q
tot_states=0;
4 s) [9 U2 x, j) q for jj = 1:ndcr_ud
# i; ^3 e& I' v" D9 @; L b_num1 = dcr_dc{jj,3};b_num2 = dcr_dc{jj,4};conv_num = dcr_dc{jj,2};) ~8 v+ S2 F: I1 m& g- @4 F: I7 S/ G
angdcr(jj,k)=(theta(bus_int(b_num1),k)-theta(bus_int(b_num2),k));3 O2 Y1 a) q4 u& h$ x0 c& j
dcrd_sig(jj,k)=angdcr(jj,k);
1 }2 n# y4 ~6 c+ g$ I st_state = tot_states+1; dcr_states = dcr_dc{jj,7}; tot_states = tot_states+dcr_states; # ^1 Q% g0 g2 V6 B2 b. N
ydcrmx=dcr_dc{jj,5};ydcrmn = dcr_dc{jj,6};
+ p' Z7 K1 p7 _! W: f0 x& [ dcr_dsig(jj,k) = ...
5 {( Q8 \6 q- Y dcr_sud(jj,k,flag,dcr_dc{jj,1},dcrd_sig(jj,k),ydcrmx,ydcrmn,xdcr_dc(st_state:tot_states,10*(k-1)+1));
8 Y2 f6 I6 {+ [, j/ E+ u% O end# i C5 J% ^# P1 N# B; Z% e, ]
end
- v* b4 b. Z! H0 f: S if ndci_ud~=0 R# \0 y8 p8 l5 P( P" p
% calculate the new value of bus angles inverter user defined control
3 `: J- N$ |- ^5 r8 s6 I( y for jj = 1:ndci_ud
' b( d" }" ?% m; e' N tot_states=0;- a+ q4 D9 m& E k1 r% I, K" Q6 c
b_num1 = dci_dc{jj,3};b_num2 = dci_dc{jj,4};conv_num = dci_dc{jj,2};
/ x! f) O& o6 a9 M: X8 I; y" f# I angdci(jj,k)=theta(bus_int(b_num1),k)-theta(bus_int(b_num2),k);
# h1 T6 B9 \) ^( A" U" @ dcid_sig(jj,k)=(angdci(jj,k)-angdci(jj,k-1))/(t(k)-t(k-1));
8 M3 {* f. q4 T& v4 b st_state = tot_states+1; dci_states = dci_dc{jj,7}; tot_states = tot_states+dci_states;
+ o Z6 o/ T5 G' L ydcimx=dci_dc{jj,5};ydcimn = dci_dc{jj,6};( B2 W y' E! o' |8 R( y/ Y
dci_dsig(jj,k) = ...
/ y2 i; [. G \0 s dci_sud(jj,k,flag,dci_dc{jj,1},dcid_sig(jj,k),ydcimx,ydcimn,xdci_dc(st_state:tot_states,10*(k-1)+1));2 m+ g" h. }6 n! o* Z0 z; y' p
end' u& @; r" B2 C; c: W
end
" a8 K, i- E8 Z7 E3 g4 r- Y: I% w4 b# p" [( w/ m/ E
" A( r+ @* }/ p其中,“dci_dc{jj,5}”,“dcr_dc{jj,7}”都是直流逆变器和整流器的控制结构体,但不知道具体如何在哪里修改!还请熟悉这一块的朋友能够给予指导,并能稍微详细说明下如何在PST中自定义模型。
$ t- ]/ c+ a! Q7 M& n+ @
3 ~$ m7 c- e* \2 ?谢谢啦!祝大家交流愉快! |
|