Stéphane on Locomotion - Comments: Biped Stabilization by Linear Feedback of the Variable-Height Inverted Pendulum Modelhttps://scaron.info/publications/icra-2020.html/2020-05-31T16:42:00+02:00Posted by: Stéphane2020-05-31T16:42:00+02:002020-05-31T16:42:00+02:00Stéphanetag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-reply-dcm-characteristics<p>I see no definitive answer, but I'd venture to say:</p> <ol class="arabic simple"> <li>They need to be &quot;divergent&quot;. The trajectory of a DCM <span class="math">$$\xi$$</span> is unbounded unless the input <span class="math">$$u$$</span> satisfies a specific (dynamics-dependent) condition (the <a class="reference external" href="/teaching/capture-point.html#boundedness-condition">boundedness condition</a>). Alternatively, we can take inspiration from Coppel and lower-bound this unboundedness by exponentials, but we …</li></ol><p>I see no definitive answer, but I'd venture to say:</p> <ol class="arabic simple"> <li>They need to be &quot;divergent&quot;. The trajectory of a DCM <span class="math">$$\xi$$</span> is unbounded unless the input <span class="math">$$u$$</span> satisfies a specific (dynamics-dependent) condition (the <a class="reference external" href="/teaching/capture-point.html#boundedness-condition">boundedness condition</a>). Alternatively, we can take inspiration from Coppel and lower-bound this unboundedness by exponentials, but we may need to look farther than exponential in general (<em>e.g.</em> in the 4D DCM the <span class="math">$$\dot{\omega} = \omega^2$$</span> component diverges super-exponentially).</li> <li>They should decouple our second-order system into two consecutive first-order systems. This feels less like a property of the system and more like something we want. Here, when we choose to use Mike Hopkins's time-varying DCM, we are making sure CoM dynamics depend only on the DCM (<span class="math">$$\dot{c} = \omega (\xi - c)$$</span>). Secondly, we make sure the DCM depends only on the contact wrench input to get a decoupling similar to the <a class="reference external" href="https://scaron.info/figures/zmp-cp-com.png">LIP one</a> (replacing &quot;ZMP&quot; by &quot;contact wrench&quot; and &quot;capture point&quot; by &quot;4D DCM&quot;).</li> </ol> Posted by: Stéphane2020-05-31T16:42:00+02:002020-05-31T16:42:00+02:00Stéphanetag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-reply-time-horizon<p>With DCMs, we are looking at an infinite-time horizon, with the DCM converging to its target value only as time goes to infinity. But this is similar to the <a href="https://en.wikipedia.org/wiki/Linear%E2%80%93quadratic_regulator#Infinite-horizon,_continuous-time_LQR">infinite-horizon linear quadratic regulator</a>: even though we look at an infinite-time horizon, the optimal feedback control law that we get is …</p><p>With DCMs, we are looking at an infinite-time horizon, with the DCM converging to its target value only as time goes to infinity. But this is similar to the <a href="https://en.wikipedia.org/wiki/Linear%E2%80%93quadratic_regulator#Infinite-horizon,_continuous-time_LQR">infinite-horizon linear quadratic regulator</a>: even though we look at an infinite-time horizon, the optimal feedback control law that we get is only based on the instantaneous error.</p>Posted by: Stéphane2020-05-31T16:42:00+02:002020-05-31T16:42:00+02:00Stéphanetag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-reply-reference-trajectory<p>There are several solutions:</p> <ul class="simple"> <li>The seminal work by <a class="reference external" href="https://doi.org/10.1109/TRO.2015.2405592">Englsberger et al. (2015)</a> provides a closed-form solution, which is also handy for <em>e.g.</em> step timing adaption.</li> <li>In this work, I used a <a class="reference external" href="https://hal.inria.fr/inria-00390462/document">linear model predictive control</a> trajectory optimization during experiments with HRP-4 (see the <a class="reference external" href="https://github.com/stephane-caron/lipm_walking_controller/blob/master/include/lipm_walking/ModelPredictiveControl.h">C++ implementation</a>), that it to say …</li></ul><p>There are several solutions:</p> <ul class="simple"> <li>The seminal work by <a class="reference external" href="https://doi.org/10.1109/TRO.2015.2405592">Englsberger et al. (2015)</a> provides a closed-form solution, which is also handy for <em>e.g.</em> step timing adaption.</li> <li>In this work, I used a <a class="reference external" href="https://hal.inria.fr/inria-00390462/document">linear model predictive control</a> trajectory optimization during experiments with HRP-4 (see the <a class="reference external" href="https://github.com/stephane-caron/lipm_walking_controller/blob/master/include/lipm_walking/ModelPredictiveControl.h">C++ implementation</a>), that it to say, reference trajectories were simply based on the linear inverted pendulum model. Note that this is only for walking. While standing, the reference has a constant center of mass position <span class="math">$$c^d$$</span> and <span class="math">$$\dot{c}^d = 0$$</span>.</li> <li>We can also generate VHIP references using the <a class="reference external" href="https://github.com/jrl-umi3218/CaptureProblemSolver/">CaptureProblemSolver</a>, which is a custom sequential quadratic programming (SQP) implementation tailored to this model. The algorithm is described <a class="reference external" href="/publications/tro-2019.html">here</a>.</li> <li>We can also use a general optimal control framework to cast the full trajectory generation problem. Examples of such frameworks today include <a class="reference external" href="https://web.casadi.org/">CasADi</a>, <a class="reference external" href="https://github.com/loco-3d/crocoddyl">Crocoddyl</a> and <a class="reference external" href="https://github.com/jrl-umi3218/tvm">tvm</a>.</li> </ul> Posted by: Stéphane2020-05-31T16:42:00+02:002020-05-31T16:42:00+02:00Stéphanetag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-reply-advantage-of-vhip-formulation<p>The main advantage is that we get viability. That is, not only short term, but also long-term force feasibility.</p> <p>Looking back at the LIP, the main driver to go this way is that it extends constraints from short-term input feasibility to long-term state <a class="reference external" href="https://hal.inria.fr/inria-00390555/document">viability</a>. If we take a feedback controller …</p><p>The main advantage is that we get viability. That is, not only short term, but also long-term force feasibility.</p> <p>Looking back at the LIP, the main driver to go this way is that it extends constraints from short-term input feasibility to long-term state <a class="reference external" href="https://hal.inria.fr/inria-00390555/document">viability</a>. If we take a feedback controller using the force as control input <span class="math">$$F = k_p \Delta c + k_d \Delta \dot{c}$$</span>, we know from <a class="reference external" href="https://doi.org/10.1109/ROBOT.2009.5152284">Sugihara (2009)</a> that <span class="math">$$k_d = \frac{k_p}{\omega} - m \omega$$</span> (minus <span class="math">$$m \omega$$</span> because we use the force) is the choice that yields maximum capturability (<em>i.e.</em> the linear controller with the largest basin of attraction) under ZMP constraints. There we get our connection from short-term constraints to long-term: ZMP inequality constraints prompt us to express dynamics with the ZMP as input, whereupon a constant <span class="math">$$\omega$$</span> appears. This constant determines the feedback gains that maximize capturability.</p> <p>Intuitively, the reason why this controller catches all capturable states is that it spends no input trying to control the CCM; everything goes to the DCM. Although we don't know yet a proof of maximum capturability for 4D DCM feedback, the controller behaves with similar parsimony: it only spends input on the DCM, and adds height variations only when it has to.</p> <p>Going back to the first part of your question, the benefit of this control parameterization is that we optimize infinite-time horizon trajectories in a quadratic program (under variation dynamics, no guarantee that we maximize capturability for the full nonlinear system). &quot;Solving infinite-time horizon&quot; is a practical way to extend input feasibility constraints to state viability ;-) If we use the force as control input, our dynamics are simplified, but force constraints become CoM-dependent and we can't predict what will happen to them over an infinite horizon (the set of feasible forces may vanish).</p> Posted by: Stéphane2020-05-31T16:42:00+02:002020-05-31T16:42:00+02:00Stéphanetag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-reply-spring-damper-error<p>Actually <a class="reference external" href="https://doi.org/10.1109/HUMANOIDS.2012.6651601">Morisawa et al. (2012)</a> (reference 3 in the video) has PID desired error dynamics. When I cite it in the video, I'm only referring to the fact that pole placement means definiing your desired error dynamics.</p> <p>In this work we focus on the proportional (spring) term because it's the …</p><p>Actually <a class="reference external" href="https://doi.org/10.1109/HUMANOIDS.2012.6651601">Morisawa et al. (2012)</a> (reference 3 in the video) has PID desired error dynamics. When I cite it in the video, I'm only referring to the fact that pole placement means definiing your desired error dynamics.</p> <p>In this work we focus on the proportional (spring) term because it's the most significant in practice. The derivative (damping) term has usually a relatively low gain because state estimators tend to yield noisy DCM derivatives. On HRP-4 we set it to zero, and on HRP-2Kai we set it to a <a class="reference external" href="https://github.com/stephane-caron/lipm_walking_controller/blob/a21cd71bba0cdaa389c9350fcbc1b5f19731b86c/etc/LIPMWalking.conf.cmake#L134">small value</a> (not zero because the stiffness of its flexible joint between sole and ankle sole is lower than for HRP-4, and damping helps compensate the ensuing vibrations at high proportional gain). This might evolve if somebody manages to design a smoother <strong>DCM state estimator</strong> ;-)</p> Posted by: Stéphane2020-05-31T16:42:00+02:002020-05-31T16:42:00+02:00Stéphanetag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-reply-balancing-reference<p>Yes, in both the <a class="reference external" href="https://github.com/stephane-caron/pymanoid/blob/master/examples/vhip_stabilization.py">pymanoid example</a> and HRP-4 experiment the reference trajectory is <span class="math">$$c^d = \mathit{constant}$$</span> and <span class="math">$$\dot{c}^d = 0$$</span> (with the corresponding <span class="math">$$\lambda^d$$</span> and <span class="math">$$r^d$$</span> computed for static equilibrium). For the balance controller there is no concept of &quot;standing&quot; or &quot;walking&quot;, as you can see …</p><p>Yes, in both the <a class="reference external" href="https://github.com/stephane-caron/pymanoid/blob/master/examples/vhip_stabilization.py">pymanoid example</a> and HRP-4 experiment the reference trajectory is <span class="math">$$c^d = \mathit{constant}$$</span> and <span class="math">$$\dot{c}^d = 0$$</span> (with the corresponding <span class="math">$$\lambda^d$$</span> and <span class="math">$$r^d$$</span> computed for static equilibrium). For the balance controller there is no concept of &quot;standing&quot; or &quot;walking&quot;, as you can see in the following block diagram: Balance Control consists of Reduced Model Tracking and Force Control, while the switch between standing and walking happens in Trajectory Generation.</p> <p>See also the <a class="reference external" href="https://scaron.info/figures/balance-control-overview.png">block diagram for balance control</a>.</p> Posted by: Attendee #62020-05-31T16:06:00+02:002020-05-31T16:06:00+02:00Attendee #6tag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-question-advantage-of-vhip-formulation<p>It seems like the 4D DCM in this case is a consequence of your control parameterization in the sense that if you didn’t have a virtual stiffness lambda, you wouldn’t have the Riccati equation pop out for <span class="math">$$\omega$$</span>. Do you agree?</p> <p>Where I’m pointing with this is …</p><p>It seems like the 4D DCM in this case is a consequence of your control parameterization in the sense that if you didn’t have a virtual stiffness lambda, you wouldn’t have the Riccati equation pop out for <span class="math">$$\omega$$</span>. Do you agree?</p> <p>Where I’m pointing with this is that you could alternatively consider variation dynamics for the CoM directly, with some other parameterization for the forces. For instance if you just used the force as a control input, the CoM dynamics would be linear themselves. And so I’m curious what advantages we have by essentially lifting the CoM dynamics to this higher dimension with the addition of <span class="math">$$\omega$$</span>. Is it that constraints are easier to enforce?</p> <script type="text/javascript">if (!document.getElementById('mathjaxscript_pelican_#%@#@#')) { var align = "center", indent = "0em", linebreak = "false"; if (false) { align = (screen.width < 768) ? "left" : align; indent = (screen.width < 768) ? "0em" : indent; linebreak = (screen.width < 768) ? 'true' : linebreak; } var mathjaxscript = document.createElement('script'); mathjaxscript.id = 'mathjaxscript_pelican_#%@#@#'; mathjaxscript.type = 'text/javascript'; mathjaxscript.src = '/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'; var configscript = document.createElement('script'); configscript.type = 'text/x-mathjax-config'; configscript[(window.opera ? "innerHTML" : "text")] = "MathJax.Hub.Config({" + " config: ['MMLorHTML.js']," + " TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'none' } }," + " jax: ['input/TeX','input/MathML','output/HTML-CSS']," + " extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']," + " displayAlign: '"+ align +"'," + " displayIndent: '"+ indent +"'," + " showMathMenu: true," + " messageStyle: 'normal'," + " tex2jax: { " + " inlineMath: [ ['\\\$$','\\\$$'] ], " + " displayMath: [ ['$$','$$'] ]," + " processEscapes: true," + " preview: 'TeX'," + " }, " + " 'HTML-CSS': { " + " availableFonts: ['STIX', 'TeX']," + " preferredFont: 'STIX'," + " styles: { '.MathJax_Display, .MathJax .mo, .MathJax .mi, .MathJax .mn': {color: '#333 ! important'} }," + " linebreaks: { automatic: "+ linebreak +", width: '90% container' }," + " }, " + " 'TeX': { " + " Macros: { " + " defeq: \"{\\\\stackrel{\\\\mathrm{def}}{=}}\"," + " Ld: \"{\\\\dot{L}}\"," + " LdG: \"{\\\\dot{L}_G}\"," + " bfA: \"{\\\\boldsymbol{A}}\"," + " bfB: \"{\\\\boldsymbol{B}}\"," + " bfC: \"{\\\\boldsymbol{C}}\"," + " bfD: \"{\\\\boldsymbol{D}}\"," + " bfE: \"{\\\\boldsymbol{E}}\"," + " bfF: \"{\\\\boldsymbol{F}}\"," + " bfG: \"{\\\\boldsymbol{G}}\"," + " bfH: \"{\\\\boldsymbol{H}}\"," + " bfI: \"{\\\\boldsymbol{I}}\"," + " bfJ: \"{\\\\boldsymbol{J}}\"," + " bfK: \"{\\\\boldsymbol{K}}\"," + " bfL: \"{\\\\boldsymbol{L}}\"," + " bfM: \"{\\\\boldsymbol{M}}\"," + " bfN: \"{\\\\boldsymbol{N}}\"," + " bfO: \"{\\\\boldsymbol{O}}\"," + " bfP: \"{\\\\boldsymbol{P}}\"," + " bfQ: \"{\\\\boldsymbol{Q}}\"," + " bfR: \"{\\\\boldsymbol{R}}\"," + " bfS: \"{\\\\boldsymbol{S}}\"," + " bfT: \"{\\\\boldsymbol{T}}\"," + " bfU: \"{\\\\boldsymbol{U}}\"," + " bfV: \"{\\\\boldsymbol{V}}\"," + " bfW: \"{\\\\boldsymbol{W}}\"," + " bfX: \"{\\\\boldsymbol{X}}\"," + " bfY: \"{\\\\boldsymbol{Y}}\"," + " bfZ: \"{\\\\boldsymbol{Z}}\"," + " bfa: \"{\\\\boldsymbol{a}}\"," + " bfb: \"{\\\\boldsymbol{b}}\"," + " bfc: \"{\\\\boldsymbol{c}}\"," + " bfd: \"{\\\\boldsymbol{d}}\"," + " bfe: \"{\\\\boldsymbol{e}}\"," + " bff: \"{\\\\boldsymbol{f}}\"," + " bfg: \"{\\\\boldsymbol{g}}\"," + " bfh: \"{\\\\boldsymbol{h}}\"," + " bfi: \"{\\\\boldsymbol{i}}\"," + " bfj: \"{\\\\boldsymbol{j}}\"," + " bfk: \"{\\\\boldsymbol{k}}\"," + " bfl: \"{\\\\boldsymbol{l}}\"," + " bfm: \"{\\\\boldsymbol{m}}\"," + " bfn: \"{\\\\boldsymbol{n}}\"," + " bfo: \"{\\\\boldsymbol{o}}\"," + " bfp: \"{\\\\boldsymbol{p}}\"," + " bfq: \"{\\\\boldsymbol{q}}\"," + " bfr: \"{\\\\boldsymbol{r}}\"," + " bfs: \"{\\\\boldsymbol{s}}\"," + " bft: \"{\\\\boldsymbol{t}}\"," + " bfu: \"{\\\\boldsymbol{u}}\"," + " bfv: \"{\\\\boldsymbol{v}}\"," + " bfw: \"{\\\\boldsymbol{w}}\"," + " bfx: \"{\\\\boldsymbol{x}}\"," + " bfy: \"{\\\\boldsymbol{y}}\"," + " bfz: \"{\\\\boldsymbol{z}}\"," + " bfalpha: \"{\\\\boldsymbol{\\\\alpha}}\"," + " bfbeta: \"{\\\\boldsymbol{\\\\beta}}\"," + " bfchi: \"{\\\\boldsymbol{\\\\chi}}\"," + " bfgamma: \"{\\\\boldsymbol{\\\\gamma}}\"," + " bflambda: \"{\\\\boldsymbol{\\\\lambda}}\"," + " bfomega: \"{\\\\boldsymbol{\\\\omega}}\"," + " bfone: \"{\\\\boldsymbol{1}}\"," + " bfphi: \"{\\\\boldsymbol{\\\\phi}}\"," + " bfsigma: \"{\\\\boldsymbol{\\\\sigma}}\"," + " bftau: \"{\\\\boldsymbol{\\\\tau}}\"," + " bfxi: \"{\\\\boldsymbol{\\\\xi}}\"," + " bfzero: \"{\\\\boldsymbol{0}}\"," + " calA: \"{\\\\cal A}\"," + " calB: \"{\\\\cal B}\"," + " calC: \"{\\\\cal C}\"," + " calD: \"{\\\\cal D}\"," + " calE: \"{\\\\cal E}\"," + " calF: \"{\\\\cal F}\"," + " calG: \"{\\\\cal G}\"," + " calH: \"{\\\\cal H}\"," + " calI: \"{\\\\cal I}\"," + " calJ: \"{\\\\cal J}\"," + " calK: \"{\\\\cal K}\"," + " calL: \"{\\\\cal L}\"," + " calM: \"{\\\\cal M}\"," + " calN: \"{\\\\cal N}\"," + " calO: \"{\\\\cal O}\"," + " calP: \"{\\\\cal P}\"," + " calQ: \"{\\\\cal Q}\"," + " calR: \"{\\\\cal R}\"," + " calS: \"{\\\\cal S}\"," + " calT: \"{\\\\cal T}\"," + " calU: \"{\\\\cal U}\"," + " calV: \"{\\\\cal V}\"," + " calW: \"{\\\\cal W}\"," + " calX: \"{\\\\cal X}\"," + " calY: \"{\\\\cal Y}\"," + " calZ: \"{\\\\cal Z}\"," + " d: [\"{\\\\rm d}{#1}\", 1]," + " bfcd: \"{\\\\dot{\\\\bfc}}\"," + " bfpd: \"{\\\\dot{\\\\bfp}}\"," + " bfpdd: \"{\\\\ddot{\\\\bfp}}\"," + " dim: \"{\\\\rm dim}\"," + " p: \"{\\\\boldsymbol{p}}\"," + " q: \"{\\\\boldsymbol{q}}\"," + " qd: \"{\\\\dot{\\\\bfq}}\"," + " qdd: \"{\\\\ddot{\\\\bfq}}\"," + " xd: \"{\\\\dot{x}}\"," + " xdd: \"{\\\\ddot{x}}\"," + " yd: \"{\\\\dot{y}}\"," + " ydd: \"{\\\\ddot{y}}\"," + " zd: \"{\\\\dot{z}}\"," + " zdd: \"{\\\\ddot{z}}\"," + " defeq: \"{\\\\stackrel{\\\\mathrm{def}}{\\\\ =\\\\ }}\"," + " } " + " } " + "}); " + "if ('default' !== 'default') {" + "MathJax.Hub.Register.StartupHook('HTML-CSS Jax Ready',function () {" + "var VARIANT = MathJax.OutputJax['HTML-CSS'].FONTDATA.VARIANT;" + "VARIANT['normal'].fonts.unshift('MathJax_default');" + "VARIANT['bold'].fonts.unshift('MathJax_default-bold');" + "VARIANT['italic'].fonts.unshift('MathJax_default-italic');" + "VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" + "});" + "MathJax.Hub.Register.StartupHook('SVG Jax Ready',function () {" + "var VARIANT = MathJax.OutputJax.SVG.FONTDATA.VARIANT;" + "VARIANT['normal'].fonts.unshift('MathJax_default');" + "VARIANT['bold'].fonts.unshift('MathJax_default-bold');" + "VARIANT['italic'].fonts.unshift('MathJax_default-italic');" + "VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" + "});" + "}"; (document.body || document.getElementsByTagName('head')).appendChild(configscript); (document.body || document.getElementsByTagName('head')).appendChild(mathjaxscript); } </script>Posted by: Attendee #52020-05-31T16:05:00+02:002020-05-31T16:05:00+02:00Attendee #5tag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-question-dcm-characteristics<p>Let’s say we are in the wild searching for more “ducks” (i.e., higher-order generalizations of the DCM). What characteristics must these quantities have to be considered a DCM?</p>Posted by: Attendee #42020-05-31T16:04:00+02:002020-05-31T16:04:00+02:00Attendee #4tag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-question-spring-damper-error<p>In the video, why do you only formulate desired error dynamics a spring system, instead of spring and damper?</p>Posted by: Attendee #32020-05-31T16:03:00+02:002020-05-31T16:03:00+02:00Attendee #3tag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-question-balancing-reference<p>You mention a reference trajectory, but your experiment does not seem to follow a particular trajectory. In the context of balancing, what kind of reference trajectory should we care about?</p>Posted by: Attendee #22020-05-31T16:02:00+02:002020-05-31T16:02:00+02:00Attendee #2tag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-question-reference-trajectory<p>How can we generate reference trajectories?</p>Posted by: Attendee #12020-05-31T16:01:00+02:002020-05-31T16:01:00+02:00Attendee #1tag:scaron.info,2020-05-31:/publications/icra-2020.html//comment-question-time-horizon<p>When you use the QP, this considers only the instantaneous error, not along a time horizon, is this correct?</p>