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.
조회 수: 1 (최근 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
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
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
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!