Minimizing this function by setting its gradient to zero (this is necessary and sufficient by differentiability, convexity, and coerciveness [that is, , whenever ]) gives the solution[3]
or, after rearranging
which allows the following correspondence between the original PID and the LS problem to be
So, now we've given the condition we wanted and we're done!
Anyways, you may ask, why is this useful? I guess it kind of extends the framework to add constraints from your control surface, or secondary objectives. To be completely honest, though? I have no idea.
[1] | I mostly know people who do hardware work, etc. on UAVs, so I don't really have a representative sample of control people. |
[2] | PolitiFact: Mostly true. I mean the usual cases (e.g. first-order methods, second-order methods, or conjugate gradient/quasi-newton methods). It's horribly behaved in conic program (SOCP) solvers. |
[3] | There's an immediate generalization here: any control of the form can be immediately written as the minimizer to an energy function . We can actually go further and note there's yet another generalization to any control of the form , where each is symmetric and (strictly) positive definite. This is true as each has an inverse and a 'square root' matrix (e.g. let, be some positive-definite matrix. We know for and diagonal , thus ), such that the energy function is written in terms of these. Though it's somewhat enlightening (I guess), I leave the derivation as an exercise for the reader. |