Battery knowledge · Data, communication and electronics

PID controller

A feedback controller whose output is a weighted sum of the present error, its accumulated integral and its rate of change. It is the workhorse of battery systems — holding coolant temperature with a pump or compressor, regulating charger current and voltage — and often runs as PI only, without the derivative term. [1]

Abbreviation
PID
Also called
proportional–integral–derivative controller, PI controller
Relationship
u = K_p·e + K_i·∫e dt + K_d·de/dt

Example

Separate three controller contributions

For an illustrative error e = 2, accumulated error 3 s and error slope −0.5/s, gains Kp = 1, Ki = 0.5/s and Kd = 0.2 s give u = 2 + 1.5 − 0.1 = 3.4. Output limits and anti-windup are separate design choices.

Explore the graph

Apply PID terms to a prescribed smooth error to see what each contribution does.

PID contributions to a prescribed error
PID contributions to a prescribed errorTime (s) versus Normalized output contribution. P term; I term; D term. Interpretation follows the graphs.-0.600.0512.50.7251.3537.5250Time (s)Normalized outputcontribution
P termI term (dashed)D term
Sum of contributions
Sum of contributionsTime (s) versus Normalized controller output. P + I + D. Interpretation follows the graphs.-0.600.0512.50.7251.3537.5250Time (s)Normalized controlleroutput
P + I + D

At t = 0⁺, output is 0.9. At long time, the stored integral approaches 1.

e(t) = exp(−t/10); u = Kp e + Ki ∫e dt + Kd de/dt

Illustrative model. Zero initial integral; no actuator limits, anti-windup, derivative filtering, sampled implementation or setpoint discontinuity. The smooth error is an input, not a simulated closed-loop result.

Use in Lemonergy

Separate quantities from encoding and transport.

This is a reference concept. No executable Lemonergy block has been verified for this term.

References & further reading

Technical references

  1. Feedback Systems: An Introduction for Scientists and Engineers, second edition

    Karl J. Åström, Richard M. Murray · Princeton University Press; author-maintained FBSwiki · 2021

    Technical reference · State-space modeling, feedback and PID control. These mathematical foundations do not establish a particular software implementation.

Further reading on this topic

These sources provide broader context; they are not presented as citations for every statement in this entry.

  1. 3rd generation of the CAN data link layer

    CAN in Automation, CAN Newsletter · 2020

    Topic background · Classical CAN, CAN FD and CAN XL data-link concepts; publication describes the 2020 state.

  2. Getting Started with the BQ76925

    Texas Instruments · 2019

    Topic background · A concrete BMS analog front-end example: cell voltage, current, temperature measurement and MCU integration.