Integration in Simulink- output not as desired

1 visualizzazione (ultimi 30 giorni)
want2know
want2know il 30 Ott 2013
Commentato: want2know il 31 Ott 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 Commento
want2know
want2know il 31 Ott 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

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by