Integration in Simulink- output not as desired

1 visualización (últimos 30 días)
want2know
want2know el 30 de Oct. de 2013
Comentada: want2know el 31 de Oct. de 2013
Dear Sir/Madam,
I know this is fairly simply, am trying to achieve something as below to be implemented in Simulink:
i want the following:
out(i) = out(i-1) + abs(signal(i-1) - signal(i))*(time(i)-time(i-1));
This is what I have tried, I have no idea what went wrong.
I used the integrator block in the Matlab. But, the output I got is:
out(i) = signal(i)*(time(i)-time(i-1));
I understand that my signal and time will be in discrete rather than analog.
Appreciate any suggestion, thanks
  1 comentario
want2know
want2know el 31 de Oct. de 2013
Dear Sir I have tried using the Unit Delay Blocks but still it didn't give the expected result. Where the inputs to Unit Delay Blocks are [0 1 2 3] for time and [5 5.1 5.2 5.2] for signal time signal(desired output in bracket) 0.0 20 (20) 1.0 5 (20.1) 2.0 5.1000 (20.2) 3.0 5.2000 (20.2) Please see the image for better view: http://imgur.com/OpipALP

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by