Take the 2-minute tour ×
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.

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|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

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

share|improve this answer
add comment

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|improve this answer
add comment

Your Answer

 
discard

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.