Sine wave integration doubt?

조회 수: 13 (최근 30일)
GD
GD 2016년 6월 6일
답변: Simeon Kruger 2021년 2월 23일
I am integrating a sine wave having amplitude one, but the output that I get from intergrator is -cos (expected), but with some offset and also the amplitude is attenuated. Why is it so?

답변 (2개)

Simeon Kruger
Simeon Kruger 2021년 2월 23일
I realize that this is an old question, but I would like to elaborate on the answer John D'Errico gave, in case somebody else comes across a similar problem:
If you are working with power systems and a sinusoidal voltage source with a given frequency, then you should also bear in mind that the integrated signal will show considerable attenuation. This will be evident in the Simulink Integrator block, the trapz command and the cumtrapz command.
Let us suppose that you have a voltage source with a frequency of 50 Hz and that the amplitude of your waveform is 1 - then the voltage waveform is given by . One might then be tempted to assume that since , the integrated waveform should also have an amplitude of 1.
But and this will result in a considerable attenuation of the integrated signal, which is not caused by the numerical approximations of trapz and cumtrapz.

John D'Errico
John D'Errico 2016년 6월 6일
편집: John D'Errico 2016년 6월 6일
How are you doing the integration? What EXACTLY did you do?
For example, if you used cumtrapz to integrate a sine wave, it will under-estimate the integral. As well, remember that there is that constant of integration in there, something that cumtrapz knows nothing of.
So the integral of sin(t) is -cos(t)+c, where c is a constant of integration.
t = linspace(0,2*pi,11);
x = sin(t);
xint = cumtrapz(t,x);
plot(t,xint)
grid on
So, we see an offset cosine wave, with an amplitude a bit low, because trapezoidal rule will always produce a biased estimate for a sine wave (biased towards zero). So the amplitude looks wrong.
Or, does your function have some noise in it? Again, you cannot expect an exact result.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by