How to calculate IAE between zero-crossing

11 visualizaciones (últimos 30 días)
PAOLO OLIVIERI
PAOLO OLIVIERI el 5 de Ag. de 2022
Comentada: Sam Chak el 8 de Ag. de 2022
I am studying a load disturbance detection procedure presented by Hagglund.
Through simulink I have calculated the control error (it is an array) and I need to calculate the IAE between two consecutive istances of zero crossings as presented in the formula below
In simulink I used a simulation time of 30s and a sampling period of 0.001s.
the question is: how can I calculate the IAE between each zero-crossing and, after each zero-crossing, reset the IAE to 0? Next I need to plot the obtained IAE array.

Respuestas (1)

Sam Chak
Sam Chak el 6 de Ag. de 2022
Editada: Sam Chak el 6 de Ag. de 2022
Are you looking for a MATLAB or Simulink solution?
sys = ss([0 1; -1 -1], [0; 1], [1 0], 0);
[y, t] = step(sys, 16);
e = 1 - y;
subplot(2,1,1)
plot(t, e), grid on, xlabel('t'), ylabel('e(t)'), ylim([-0.5 1.01])
ae = abs(e);
subplot(2,1,2)
plot(t, ae), grid on, xlabel('t'), ylabel('|e(t)|'), ylim([-0.5 1.01])
J_IAE = trapz(t, ae)
J_IAE = 1.7122
To reset the IAE to 0 after each zero-crossing detection, you probably need some conditional logics. By the way, what does the reset-IAE imply after each zero-crossing detection?
  2 comentarios
PAOLO OLIVIERI
PAOLO OLIVIERI el 8 de Ag. de 2022
To calculate IAE I used simulink through this scheme:
the result obtained is the same as that using
J_IAE = trapz(t, ae)
Then I obtained this graph
The graph in the article, on the other hand, is this:
so I don't understand if my solution could be correct
Sam Chak
Sam Chak el 8 de Ag. de 2022
Your IAE is increasing over time. This suggests that the error is accumulating and the output did not track the reference signal.

Iniciar sesión para comentar.

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by