91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 6.67MB
    文件類型: .7z
    金幣: 1
    下載: 1 次
    發(fā)布日期: 2023-09-23
  • 語言: Matlab
  • 標(biāo)簽: matlab??island??

資源簡介

孤島算法,自己拿去仿真,懂的人自然懂,里面有比較多的描述,包括論文

資源截圖

代碼片段和文件信息

function?[sysx0strts]?=?afd(txuflag)
switch?flag
??case?0
????[sysx0strts]=mdlInitializeSizes;
??case?1
????sys=[];
??case?2
????sys=[];
??case?3
????sys=mdlOutputs(txu);
??case?4
????sys=[];
??case?9
????sys=[];
???otherwise
????error([‘Unhandled?flag?=?‘num2str(flag)]);
end

%=============================================================================
%?mdlInitializeSizes
function?[sysx0strts]=mdlInitializeSizes??%初始化
global??f_vo?theta_i?theta_vo?isIslanding?cf?%并網(wǎng)電流電壓及其相位和孤島標(biāo)志
f_vo=50;????????%50Hz
theta_i=0;??????%I
theta_vo=0;?????%V
isIslanding=0;??%Island
cf=0;
sizes?=?simsizes;
sizes.NumContStates??=?0;
sizes.NumDiscStates??=?0;
sizes.NumOutputs?????=?3;
sizes.NumInputs??????=?3;
sizes.DirFeedthrough?=?1;
sizes.NumSampleTimes?=?1;???%?at?least?one?sample?time?is?needed
sys?=?simsizes(sizes);
x0??=?[];
str?=?[];
ts??=?[1e-4?0];

%=============================================================================
%?mdlOutputs
function?sys=mdlOutputs(txu)
global??f_vo?theta_i?theta_vo?isIslanding?cf
theta_vo=u(2);?%數(shù)字鎖相環(huán)輸出的電壓頻率

if?abs(theta_vo)<0.04??%?電壓相位為0時(shí)更新頻率
????????f_vo=u(1);
????????cf=u(2)+0.2*(f_vo-50);
????????if?(f_vo>50.5?||?f_vo<49.5) %判斷頻率是否越界
????????????sys=[0?0?cf];
????????????isIslanding=1;%頻率越界則輸出為0,置孤島標(biāo)志?
????????end
end

if(isIslanding==0) ?%判斷是否孤島效應(yīng)
???if?cf>=0
????????if?(theta_vo>=0)&&(theta_vo<=0.5*pi*cf)
????????????theta_i=0;
????????elseif?(abs(pi-theta_vo))<=0.5*pi*cf
????????????theta_i=pi;??
????????elseif?(theta_vo>=pi*(2-0.5*cf))&&(theta_vo<=2*pi)
?????????theta_i=2*pi;
????????elseif(theta_vo>0.5*pi*cf)&&(theta_vo<(pi-0.5*pi*cf))
????????theta_i=(theta_vo-0.5*pi*cf)/(1-cf);
????????elseif(theta_vo>=pi+0.5*pi*cf)&&(theta_vo<=pi*(2-0.5*cf))
???????????theta_i=(theta_vo-1.5*pi*cf)/(1-cf);
????????end
?????elseif?cf<0
??????if?(theta_vo>0)&&(theta_vo?????????theta_i=(theta_vo-0.5*pi*cf)/(1-cf);
??????elseif(theta_vo>pi)&&(theta_vo<2*pi)
????????theta_i=(theta_vo-1.5*pi*cf)/(1-cf);
???????end
???end
???sys(1)=sin(theta_i);?
else
???sys(1)=0;
end
???sys(2)=f_vo;
???sys(3)=cf;??
??
??????????????

????????
??????
???????????????????
????????
???

????????
????????????
????????????
????
????????????
????????????
????????????
????????????
????????????
????????????
??????

評論

共有 條評論