  An observer is an estimator of the state of a dynamical system from noisy
sensor measurements. The need for observers is ubiquitous, with applications in
fields ranging from engineering to biology to economics. The most widely used
observer is the Kalman filter, which is known to be the optimal estimator of
the state when the noise is additive and Gaussian. Because its performance is
limited by the sensors to which it is paired, it is natural to seek an optimal
sensor for the Kalman filter. The problem is however not convex and, as a
consequence, many ad hoc methods have been used over the years to design
sensors. We show in this paper how to characterize and obtain the optimal
sensor for the Kalman filter. Precisely, we exhibit a positive definite
operator which optimal sensors have to commute with. We furthermore provide a
gradient flow to find optimal sensors, and prove the convergence of this
gradient flow to the unique minimum in a broad range of applications. This
optimal sensor yields the lowest possible estimation error for measurements
with a fixed signal to noise ratio. The results presented here also apply to
the dual problem of optimal actuator design.
