PLUS+1 Software > Code sharing

How to implement an integral or sum-up

<< < (2/2)


--- Quote from: Marbek_Elektronik on April 09, 2014, 06:10:15 PM ---It is important for the integral, that your loop time is constant.

--- End quote ---
Unless, I think, you are multiplying by always-smaller time increments of elapsed time since the last sample, such as the number of milliseconds, and summing the totals over a sufficiently large number of samples.

I think to build an integral, it is better to use constant sample times.
Of course, if sample time was to long, because of longer loop time, it is a good way to multiply with the sampling time.


[0] Message Index

[*] Previous page

Go to full version