mathematics//calculus//integral

An integral is the accumulation of a quantity over an interval, the limit of a sum of many small pieces, and it is how a model turns a rate into the state that rate produces: position from velocity, volume from flow, charge from current, angle from a gyroscope's angular rate. A pump that delivers 5 L/s for ten minutes has put 3 cubic metres into the tank; if the flow varies, the volume is the area under the flow curve, cut into thin strips and added up. Position is


An integral is the accumulation of a quantity over an interval, the limit of a sum of many small pieces, and it is how a model turns a rate into the state that rate produces: position from velocity, volume from flow, charge from current, angle from a gyroscope's angular rate. A pump that delivers 5 L/s for ten minutes has put 3 cubic metres into the tank; if the flow varies, the volume is the area under the flow curve, cut into thin strips and added up. Position is

p(t)=p(0)+∫0tv(s) ds,p(t)=p(0)+\int_0^t v(s)\,ds,p(t)=p(0)+∫0t​v(s)ds,

the starting position plus everything the velocity added since. It is the inverse of the derivative: differentiate the accumulated quantity and the rate comes back.

A computer integrates the way the definition says, by summing small pieces. With samples every Δt\Delta tΔt, pk=pk−1+vk Δtp_k=p_{k-1}+v_k,\Delta tpk​=pk−1​+vk​Δt is the simplest version, and it is exactly one step of the Euler method. How small the pieces must be, and which smarter sum to use, is numerical integration.

An integral remembers everything it has been fed, errors included.

Integration averages random noise down relative to the signal, which is why it smooths where a derivative amplifies, but a constant error grows without limit: a small offset becomes a drift.

That memory is what ruins pure inertial navigation. A gyroscope bias integrated once gives an angle error that grows linearly; an accelerometer bias integrated twice gives 12bt2\tfrac12bt^221​bt2, so a bias of 10 mg (about 0.1 metres per second squared) puts the position off by roughly 5 m after 10 s and 180 m after a minute (dead reckoning, sensor bias). White noise integrated becomes a random walk, whose error grows as the square root of time.

In a controller the same memory is useful. The integral action of a PID accumulates the error until the actuator removes it, which is how a steady offset disappears; it is also why the term keeps growing while the actuator is pinned at its limit (integral windup). In a model, the integrator is the block that stores a state.

Solving an ODE is integrating it, and only the simplest ones have a closed form. A simulator, a state estimator predicting between measurements and an autopilot propagating its attitude all integrate step by step, so what they compute is the integral plus the error of the method.