Issues with sampling input data and finding the difference

조회 수: 1 (최근 30일)
chizom wornu
chizom wornu 2022년 2월 4일
댓글: chizom wornu 2022년 2월 4일
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
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
chizom wornu
chizom wornu 2022년 2월 4일
Already did that aspect. My problem is i want to eliminate the clock (t). I just want to detect when my signal starts falling. And wait for this condition to occur
if CSOSI > K % K is the threshold value for your model
break;
else
continue;
end

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by