I integrated fault current which is sine wave with its time period as an interval. But, i am getting value as an answer instead of getting 0.

3 ビュー (過去 30 日間)
F=0.05
ix = (Phasecurrent.Time >= F) & (Phasecurrent.Time <=F+0.020047);
Int = cumtrapz(Phasecurrent.Data(ix))
vpa(Int(end))
ans =
137031976.93982961773872375488281
  4 件のコメント
A Lumbini
A Lumbini 2024 年 1 月 8 日
Can't we implement proper integral in matlab
Paul
Paul 2024 年 1 月 8 日
Why not just implement it in Simulink? Use a Clock, two Compare to Constant blocks, and an AND to output signal that is 1 (or true) over the desired interval and 0 otherwise. Multiply that signal with signal to be integrated and send that product into an Integrator. Make sure to use a variable step solver with zero crossing detection turned on, at least for the Compare to Constant and AND blocks, if not for the whole model.

サインインしてコメントする。

採用された回答

madhan ravi
madhan ravi 2024 年 1 月 7 日
編集済み: madhan ravi 2024 年 1 月 7 日
Not sure what you are doing with your code. When using cursor measurements the 2 cursor points should measure same value as 0. DeltaY should be 0. But in the screenshot you shared it’s not 0. As you can see at .05 the lower half sine wave is not exactly a sine wave , the shape of the u curve is not the same as the others.
As from your previous question, it was mentioned that continuous method is being used. Hence the correct syntax is:
Int = cumtrapz(PhaseCurrent.Time(ix),Phasecurrent.Data(ix))
  4 件のコメント
madhan ravi
madhan ravi 2024 年 1 月 8 日
"Sorry maybe i didn't select proper zero crossings to find time period"
Yes.
"i am integrating from 0.05 to (0.05+20ms) the value i am getting is not even close to zero is it just because i am using numerical integration due to which it will not be pure sinewave"
Like I said
"But in the screenshot you shared it’s not 0. As you can see at .05 the lower half sine wave is not exactly a sine wave , the shape of the u curve is not the same as the others."
Try choosing the next interval. Beware in the y scale axis, it is 10^8
.
Sorry you need to figure it out by yourself. I don't have time to analyze in detail.
A Lumbini
A Lumbini 2024 年 1 月 8 日
編集済み: A Lumbini 2024 年 1 月 8 日
k thank you sir

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSources についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by