Sine wave integration doubt?

17 visualizaciones (últimos 30 días)
GD
GD el 6 de Jun. de 2016
Respondida: Simeon Kruger el 23 de Feb. de 2021
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?

Respuestas (2)

Simeon Kruger
Simeon Kruger el 23 de Feb. de 2021
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 el 6 de Jun. de 2016
Editada: John D'Errico el 6 de Jun. de 2016
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.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by