Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to implement a PID controller and I'm unsure of how to find the integration part. Normally the integral is calculated as $\sum_{n=1}^{t} e_{n}$, where $e_n$ is the sample error at time n. However, this assumes that the time intervals are all the same. In my case the timer intervals are different So how I find the integral ?

share|cite|improve this question
up vote 2 down vote accepted

just multiply by the time interval think of it like areas of rectangles

share|cite|improve this answer

However, this assumes that the time intervals are all the same. Why did u decide so?

The contribution from the integral term is proportional to both the magnitude of the error and the duration of the error. And there is no any requirement for equality of time intervals.

So, u can sum all error for different time intervals.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.