We formulated the problem of extracting work from a
heat flow in a linear systems setting, and solved it using
LQG optimal control methods. This gave hard limits on
how much work that can be extracted, both over finite and
infinite time intervals. Up to the actuator efficiency factor, the
LQG heat engine achieves the Carnot heat engine efficiency,
using proper temperature definitions. Hence, the heat engine
respects the second law of thermodynamics. We applied the
results to an electric circuit, and identified two modes of
operation where a current source can extract energy from
warm resistors.