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 个评论
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!