  The connections between optimal control and Bayesian inference have long been
recognised, with the field of stochastic (optimal) control combining these
frameworks for the solution of partially observable control problems. In
particular, for the linear case with quadratic functions and Gaussian noise,
stochastic control has shown remarkable results in different fields, including
robotics, reinforcement learning and neuroscience, especially thanks to the
established duality of estimation and control processes. Following this idea we
recently introduced a formulation of PID control, one of the most popular
methods from classical control, based on active inference, a theory with roots
in variational Bayesian methods, and applications in the biological and neural
sciences. In this work, we highlight the advantages of our previous formulation
and introduce new and more general ways to tackle some existing problems in
current controller design procedures. In particular, we consider 1) a
gradient-based tuning rule for the parameters (or gains) of a PID controller,
2) an implementation of multiple degrees of freedom for independent responses
to different types of signals (e.g., two-degree-of-freedom PID), and 3) a novel
time-domain formalisation of the performance-robustness trade-off in terms of
tunable constraints (i.e., priors in a Bayesian model) of a single cost
functional, variational free energy.
