Skip to content

Commit 91aaa47

Browse files
1 parent d0e7abe commit 91aaa47

15 files changed

+103
-53
lines changed

credits.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ <h1>Credits</h1>
181181
<li>Naveen Kuppuswamy</li>
182182
<li>Benoit Landry</li>
183183
<li>Dominic Liao-McPherson</li>
184+
<li>Wei-Chen Li</li>
184185
<li>Lucas Manuelli</li>
185186
<li>Matt Marjanovic</li>
186187
<li>Pat Marion</li>

doxygen_cxx/finite__horizon__linear__quadratic__regulator_8h.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
202202
Functions</h2></td></tr>
203203
<tr class="memitem:ga58307d2135757a498c434e96d7b99853"><td class="memItemLeft" align="right" valign="top">FiniteHorizonLinearQuadraticRegulatorResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__control.html#ga58307d2135757a498c434e96d7b99853">FiniteHorizonLinearQuadraticRegulator</a> (const System&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;system, const Context&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;context, <a class="el" href="classdouble.html">double</a> t0, <a class="el" href="classdouble.html">double</a> tf, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;Q, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;R, const FiniteHorizonLinearQuadraticRegulatorOptions &amp;options=FiniteHorizonLinearQuadraticRegulatorOptions())</td></tr>
204-
<tr class="memdesc:ga58307d2135757a498c434e96d7b99853"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solves the differential Riccati equation to compute the optimal controller and optimal cost-to-go for the finite-horizon linear quadratic regulator: <a href="group__control.html#ga58307d2135757a498c434e96d7b99853">More...</a><br /></td></tr>
204+
<tr class="memdesc:ga58307d2135757a498c434e96d7b99853"><td class="mdescLeft">&#160;</td><td class="mdescRight">If <code>system</code> is a continuous-time system, then solves the differential Riccati equation to compute the optimal controller and optimal cost-to-go for the continuous-time finite-horizon linear quadratic regulator: <a href="group__control.html#ga58307d2135757a498c434e96d7b99853">More...</a><br /></td></tr>
205205
<tr class="separator:ga58307d2135757a498c434e96d7b99853"><td class="memSeparator" colspan="2">&#160;</td></tr>
206206
<tr class="memitem:ga2ebe52e849a0597ad54f37ab6e35df8a"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; System&lt; <a class="el" href="classdouble.html">double</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__control__systems.html#ga2ebe52e849a0597ad54f37ab6e35df8a">MakeFiniteHorizonLinearQuadraticRegulator</a> (const System&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;system, const Context&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;context, <a class="el" href="classdouble.html">double</a> t0, <a class="el" href="classdouble.html">double</a> tf, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;Q, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;R, const FiniteHorizonLinearQuadraticRegulatorOptions &amp;options=FiniteHorizonLinearQuadraticRegulatorOptions())</td></tr>
207207
<tr class="memdesc:ga2ebe52e849a0597ad54f37ab6e35df8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Variant of FiniteHorizonLinearQuadraticRegulator that returns a <a class="el" href="classdrake_1_1systems_1_1_system.html" title="Base class for all System functionality that is dependent on the templatized scalar type T for input,...">System</a> implementing the regulator (controller) as a <a class="el" href="classdrake_1_1systems_1_1_system.html" title="Base class for all System functionality that is dependent on the templatized scalar type T for input,...">System</a>, with a single "plant_state" input for the estimated plant state, and a single "control" output for the regulator control output. <a href="group__control__systems.html#ga2ebe52e849a0597ad54f37ab6e35df8a">More...</a><br /></td></tr>

doxygen_cxx/group__control.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
<tr class="memdesc:ga32d5768cb664f6d07fc58b4af536c45a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implements Fitted <a class="el" href="classdrake_1_1_value.html" title="A container class for an arbitrary type T (with some restrictions).">Value</a> Iteration on a (triangulated) Barycentric Mesh, which designs a state-feedback policy to minimize the infinite-horizon cost ∑ γⁿ g(x[n],u[n]), where γ is the discount factor in <code>options</code>. <a href="group__control.html#ga32d5768cb664f6d07fc58b4af536c45a">More...</a><br /></td></tr>
175175
<tr class="separator:ga32d5768cb664f6d07fc58b4af536c45a"><td class="memSeparator" colspan="2">&#160;</td></tr>
176176
<tr class="memitem:ga58307d2135757a498c434e96d7b99853"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structdrake_1_1systems_1_1controllers_1_1_finite_horizon_linear_quadratic_regulator_result.html">FiniteHorizonLinearQuadraticRegulatorResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__control.html#ga58307d2135757a498c434e96d7b99853">FiniteHorizonLinearQuadraticRegulator</a> (const <a class="el" href="classdrake_1_1systems_1_1_system.html">System</a>&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;system, const <a class="el" href="classdrake_1_1systems_1_1_context.html">Context</a>&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;context, <a class="el" href="classdouble.html">double</a> t0, <a class="el" href="classdouble.html">double</a> tf, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;Q, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;R, const <a class="el" href="structdrake_1_1systems_1_1controllers_1_1_finite_horizon_linear_quadratic_regulator_options.html">FiniteHorizonLinearQuadraticRegulatorOptions</a> &amp;options=<a class="el" href="structdrake_1_1systems_1_1controllers_1_1_finite_horizon_linear_quadratic_regulator_options.html">FiniteHorizonLinearQuadraticRegulatorOptions</a>())</td></tr>
177-
<tr class="memdesc:ga58307d2135757a498c434e96d7b99853"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solves the differential Riccati equation to compute the optimal controller and optimal cost-to-go for the finite-horizon linear quadratic regulator: <a href="group__control.html#ga58307d2135757a498c434e96d7b99853">More...</a><br /></td></tr>
177+
<tr class="memdesc:ga58307d2135757a498c434e96d7b99853"><td class="mdescLeft">&#160;</td><td class="mdescRight">If <code>system</code> is a continuous-time system, then solves the differential Riccati equation to compute the optimal controller and optimal cost-to-go for the continuous-time finite-horizon linear quadratic regulator: <a href="group__control.html#ga58307d2135757a498c434e96d7b99853">More...</a><br /></td></tr>
178178
<tr class="separator:ga58307d2135757a498c434e96d7b99853"><td class="memSeparator" colspan="2">&#160;</td></tr>
179179
<tr class="memitem:ga6506532189adf1c7a42662b597135f70"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structdrake_1_1systems_1_1controllers_1_1_linear_quadratic_regulator_result.html">LinearQuadraticRegulatorResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__control.html#ga6506532189adf1c7a42662b597135f70">LinearQuadraticRegulator</a> (const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;A, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;B, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;Q, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;R, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;N=Eigen::Matrix&lt; <a class="el" href="classdouble.html">double</a>, 0, 0 &gt;::Zero(), const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;F=Eigen::Matrix&lt; <a class="el" href="classdouble.html">double</a>, 0, 0 &gt;::Zero())</td></tr>
180180
<tr class="memdesc:ga6506532189adf1c7a42662b597135f70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the optimal feedback controller, u=-Kx, and the optimal cost-to-go J = x'Sx for the problem: <a href="group__control.html#ga6506532189adf1c7a42662b597135f70">More...</a><br /></td></tr>
@@ -304,11 +304,16 @@ <h2 class="memtitle"><span class="permalink"><a href="#ga58307d2135757a498c434e9
304304
</table>
305305
</div><div class="memdoc">
306306

307-
<p>Solves the differential Riccati equation to compute the optimal controller and optimal cost-to-go for the finite-horizon linear quadratic regulator: </p>
307+
<p>If <code>system</code> is a continuous-time system, then solves the differential Riccati equation to compute the optimal controller and optimal cost-to-go for the continuous-time finite-horizon linear quadratic regulator: </p>
308308
<p class="formulaDsp">
309309
\[\min_u (x(t_f)-x_d(t_f))&#39;Q_f(x(t_f)-x_d(t_f)) + \int_{t_0}^{t_f} (x(t)-x_d(t))&#39;Q(x(t)-x_d(t)) dt + \int_{t_0}^{t_f} (u(t)-u_d(t))&#39;R(u(t)-u_d(t)) dt + \int_{t_0}^{t_f} 2(x(t)-x_d(t))&#39;N(u(t)-u_d(t)) dt \\ \text{s.t. } \dot{x} - \dot{x}_0(t) = A(t)(x(t) - x_0(t)) + B(t)(u(t) - u_0(t)) + c(t) \]
310310
</p>
311-
<p>where A(t), B(t), and c(t) are taken from the gradients of the continuous-time dynamics ẋ = f(t,x,u), as A(t) = dfdx(t, x0(t), u0(t)), B(t) = dfdu(t, x0(t), u0(t)), and c(t) = f(t, x0(t), u0(t)) - ẋ0(t). x0(t) and u0(t) can be specified in <code>options</code>, otherwise are taken to be constant trajectories with values given by <code>context</code>.</p>
311+
<p>where \( A(t) \), \( B(t) \), and \( c(t) \) are taken from the gradients of the continuous-time dynamics \( \dot{x} = f(t,x,u) \), where \( A(t) = \frac{\partial f}{\partial x}(t, x_0(t), u_0(t)) \), \( B(t) = \frac{\partial f}{\partial u}(t, x_0(t), u_0(t)) \), and \( c(t) = f(t, x_0(t), u_0(t)) - \dot{x}_0(t) \). \( x_0(t) \) and \( u_0(t) \) can be specified in <code>options</code>, otherwise are taken to be constant trajectories with values given by <code>context</code>.</p>
312+
<p>If <code>system</code> is a discrete-time system, then solves the Riccati difference equation to compute the optimal controller and optimal cost-to-go for the doscrete-time finite-horizon linear quadratic regulator:</p>
313+
<p class="formulaDsp">
314+
\[\min_u (x[N]-x_d[N])&#39;Q_f(x[N]-x_d[N]) + \sum_{n=0}^{N-1} (x[n]-x_d[n])&#39;Q(x[n]-x_d[n])+ \sum_{n=0}^{N-1} (u[n]-u_d[n])&#39;R(u[n]-u_d[n]) + \sum_{n=0}^{N-1} 2(x[n]-x_d[n])&#39;N(u[n]-u_d[n]) \\ \text{s.t. } x[n+1] - x_0[n+1] = A[n](x[n] - x_0[n]) + B[n](u[n] - u_0[n]) + c[n] \]
315+
</p>
316+
<p>where \( A[n] \), \( B[n] \), and \( c[n] \) are taken from the gradients of the discrete-time dynamics \( x[n+1] = f_d(n,x[n],u[n]) \), where \( A[n] =\frac{\partial f_d}{\partial x}(x_0[n], u_0[n]), B[n] = \frac{\partial f_d}{\partial u}(n,x_0[n], u_0[n]) \), and \( c[n] = f_d(n,x_0[n],u_0[n]) - x_0[n+1] \). \( x_0[n] \) and \( u_0[n] \) can be specified in <code>options</code>, otherwise are taken to be constant trajectories with values given by <code>context</code>.</p>
312317
<dl class="params"><dt>Parameters</dt><dd>
313318
<table class="params">
314319
<tr><td class="paramname">system</td><td>a <a class="el" href="classdrake_1_1systems_1_1_system.html">System&lt;double&gt;</a> representing the plant. </td></tr>
@@ -321,9 +326,9 @@ <h2 class="memtitle"><span class="permalink"><a href="#ga58307d2135757a498c434e9
321326
</table>
322327
</dd>
323328
</dl>
324-
<dl class="section pre"><dt>Precondition</dt><dd><code>system</code> must be a <a class="el" href="classdrake_1_1systems_1_1_system.html">System&lt;double&gt;</a> with (only) n continuous state variables and m inputs. It must be convertible to <a class="el" href="classdrake_1_1systems_1_1_system.html">System&lt;AutoDiffXd&gt;</a>.</dd></dl>
325-
<dl class="section note"><dt>Note</dt><dd>Support for difference-equation systems (</dd></dl>
326-
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classdrake_1_1systems_1_1_system.html#aeb5016cfee3ccd384e0a0ba62b4da5bc" title="Returns true iff the state dynamics of this system are governed exclusively by a difference equation ...">System&lt;T&gt;::IsDifferenceEquationSystem()</a>) by solving the differential Riccati equation and richer specification of the objective are anticipated (they are listed in the code as TODOs). </dd></dl>
329+
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="structdrake_1_1systems_1_1controllers_1_1_finite_horizon_linear_quadratic_regulator_result.html" title="A structure that contains the basic FiniteHorizonLinearQuadraticRegulator results.">FiniteHorizonLinearQuadraticRegulatorResult</a> representing a continuous-time or a discrete-time finite-horizon LQR.</dd></dl>
330+
<dl class="section pre"><dt>Precondition</dt><dd><code>system</code> must be a <a class="el" href="classdrake_1_1systems_1_1_system.html">System&lt;double&gt;</a> with n continuous state variables and m inputs, or a <a class="el" href="classdrake_1_1systems_1_1_system.html">System&lt;double&gt;</a> with n discrete state variables and m inputs. It must be convertible to <a class="el" href="classdrake_1_1systems_1_1_system.html">System&lt;AutoDiffXd&gt;</a>.</dd></dl>
331+
<dl class="section note"><dt>Note</dt><dd>Richer specification of the objective is anticipated (they are listed in the code as TODOs). </dd></dl>
327332

328333
</div>
329334
</div>

doxygen_cxx/group__control__systems.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,8 @@ <h2 class="memtitle"><span class="permalink"><a href="#ga2ebe52e849a0597ad54f37a
583583
</div><div class="memdoc">
584584

585585
<p>Variant of FiniteHorizonLinearQuadraticRegulator that returns a <a class="el" href="classdrake_1_1systems_1_1_system.html" title="Base class for all System functionality that is dependent on the templatized scalar type T for input,...">System</a> implementing the regulator (controller) as a <a class="el" href="classdrake_1_1systems_1_1_system.html" title="Base class for all System functionality that is dependent on the templatized scalar type T for input,...">System</a>, with a single "plant_state" input for the estimated plant state, and a single "control" output for the regulator control output. </p>
586-
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__control.html#ga58307d2135757a498c434e96d7b99853" title="Solves the differential Riccati equation to compute the optimal controller and optimal cost-to-go for...">FiniteHorizonLinearQuadraticRegulator</a> for details on the arguments. </dd></dl>
586+
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__control.html#ga58307d2135757a498c434e96d7b99853" title="If system is a continuous-time system, then solves the differential Riccati equation to compute the o...">FiniteHorizonLinearQuadraticRegulator</a> for details on the arguments.</dd></dl>
587+
<dl class="section note"><dt>Note</dt><dd>To control a continuous-time plant using a discrete-time finite-horizon LQR controller, first convert the plant using DiscreteTimeApproximation and pass it to the function. After obtaining the discrete-time controller, be sure to connect a <a class="el" href="classdrake_1_1systems_1_1_zero_order_hold.html" title="A zero order hold block with input u, which may be vector-valued (discrete or continuous) or abstract...">ZeroOrderHold</a> system to its output. For more details, refer to the DiscreteTimeTrajectory documentation. </dd></dl>
587588

588589
</div>
589590
</div>

doxygen_cxx/namespacedrake_1_1systems_1_1controllers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
<tr class="memdesc:ga27f5edfa9bfb2544718b08584a514905"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implements the Linear Programming approach to approximate dynamic programming. <a href="group__control__systems.html#ga27f5edfa9bfb2544718b08584a514905">More...</a><br /></td></tr>
211211
<tr class="separator:ga27f5edfa9bfb2544718b08584a514905"><td class="memSeparator" colspan="2">&#160;</td></tr>
212212
<tr class="memitem:ga58307d2135757a498c434e96d7b99853"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structdrake_1_1systems_1_1controllers_1_1_finite_horizon_linear_quadratic_regulator_result.html">FiniteHorizonLinearQuadraticRegulatorResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__control.html#ga58307d2135757a498c434e96d7b99853">FiniteHorizonLinearQuadraticRegulator</a> (const <a class="el" href="classdrake_1_1systems_1_1_system.html">System</a>&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;system, const <a class="el" href="classdrake_1_1systems_1_1_context.html">Context</a>&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;context, <a class="el" href="classdouble.html">double</a> t0, <a class="el" href="classdouble.html">double</a> tf, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;Q, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;R, const <a class="el" href="structdrake_1_1systems_1_1controllers_1_1_finite_horizon_linear_quadratic_regulator_options.html">FiniteHorizonLinearQuadraticRegulatorOptions</a> &amp;options=<a class="el" href="structdrake_1_1systems_1_1controllers_1_1_finite_horizon_linear_quadratic_regulator_options.html">FiniteHorizonLinearQuadraticRegulatorOptions</a>())</td></tr>
213-
<tr class="memdesc:ga58307d2135757a498c434e96d7b99853"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solves the differential Riccati equation to compute the optimal controller and optimal cost-to-go for the finite-horizon linear quadratic regulator: <a href="group__control.html#ga58307d2135757a498c434e96d7b99853">More...</a><br /></td></tr>
213+
<tr class="memdesc:ga58307d2135757a498c434e96d7b99853"><td class="mdescLeft">&#160;</td><td class="mdescRight">If <code>system</code> is a continuous-time system, then solves the differential Riccati equation to compute the optimal controller and optimal cost-to-go for the continuous-time finite-horizon linear quadratic regulator: <a href="group__control.html#ga58307d2135757a498c434e96d7b99853">More...</a><br /></td></tr>
214214
<tr class="separator:ga58307d2135757a498c434e96d7b99853"><td class="memSeparator" colspan="2">&#160;</td></tr>
215215
<tr class="memitem:ga2ebe52e849a0597ad54f37ab6e35df8a"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="classdrake_1_1systems_1_1_system.html">System</a>&lt; <a class="el" href="classdouble.html">double</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__control__systems.html#ga2ebe52e849a0597ad54f37ab6e35df8a">MakeFiniteHorizonLinearQuadraticRegulator</a> (const <a class="el" href="classdrake_1_1systems_1_1_system.html">System</a>&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;system, const <a class="el" href="classdrake_1_1systems_1_1_context.html">Context</a>&lt; <a class="el" href="classdouble.html">double</a> &gt; &amp;context, <a class="el" href="classdouble.html">double</a> t0, <a class="el" href="classdouble.html">double</a> tf, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;Q, const Eigen::Ref&lt; const Eigen::MatrixXd &gt; &amp;R, const <a class="el" href="structdrake_1_1systems_1_1controllers_1_1_finite_horizon_linear_quadratic_regulator_options.html">FiniteHorizonLinearQuadraticRegulatorOptions</a> &amp;options=<a class="el" href="structdrake_1_1systems_1_1controllers_1_1_finite_horizon_linear_quadratic_regulator_options.html">FiniteHorizonLinearQuadraticRegulatorOptions</a>())</td></tr>
216216
<tr class="memdesc:ga2ebe52e849a0597ad54f37ab6e35df8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Variant of FiniteHorizonLinearQuadraticRegulator that returns a <a class="el" href="classdrake_1_1systems_1_1_system.html" title="Base class for all System functionality that is dependent on the templatized scalar type T for input,...">System</a> implementing the regulator (controller) as a <a class="el" href="classdrake_1_1systems_1_1_system.html" title="Base class for all System functionality that is dependent on the templatized scalar type T for input,...">System</a>, with a single "plant_state" input for the estimated plant state, and a single "control" output for the regulator control output. <a href="group__control__systems.html#ga2ebe52e849a0597ad54f37ab6e35df8a">More...</a><br /></td></tr>

doxygen_cxx/namespacemembers_func_j.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ <h3><a id="index_j"></a>- j -</h3><ul>
165165
: <a class="el" href="namespacedrake_1_1math.html#a57457683becdddf605a55be881c065b4">drake::math</a>
166166
</li>
167167
<li>Jacobian()
168-
: <a class="el" href="namespacedrake_1_1symbolic.html#a71a3b8e65cfeb6d57deb7fe9d70f1d4d">drake::symbolic</a>
168+
: <a class="el" href="namespacedrake_1_1symbolic.html#a5e355d7c9eb6bff11199a94c16ed5c8a">drake::symbolic</a>
169169
</li>
170170
</ul>
171171
</div><!-- contents -->

0 commit comments

Comments
 (0)