Issues with sampling input data and finding the difference
2 ビュー (過去 30 日間)
古いコメントを表示
Hello, I am trying to implement this section of the article, however i seem not to be geeting reasonable answer. Attaced is the doument and my code

function [y,X,SI] = fcn(Vo,Io,dVo,dIo,t) % The variable dvo/dIo is same as Vo/Io just passed through a zero order hold
Vpre = 0;
Ipre = 0;
Vpost = dVo;
Ipost = dIo;
if t > 2 && t <= 2.05 % Time of Islanding
Vpre = Vo;
Ipre = Io;
end
SI = abs((Vpost/Ipost)-(Vpre/Ipre));
CSOSI = cumsum(SI);
X = CSOSI;
y =[Vpost Ipost Vpre Ipre];
2 件のコメント
VBBV
2022 年 2 月 4 日
you need to add one more condition for CSOSI after calculating it.
if CSOSI > K % K is the threshold value for your model
break;
else
continue;
end
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!