Marc Deisenroth, Andrew McHutchon, Joe Hall, and Carl Edward Rasmussen.</p><p>Last modified: 2013-05-16</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">High-Level Steps</a></li><li><a href="#2">Code</a></li></ul></div><h2>High-Level Steps<a name="1"></a></h2><div><ol><li>Precomputations</li><li>Define static penalty as distance from target setpoint</li><li>Trigonometric augmentation</li><li>Calculate loss</li></ol></div><pre class="codeinput"><span class="keyword">function</span> [L, dLdm,