CDS 110b: Receding Horizon Control: Difference between revisions

From Murray Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{cds110b-wi08}}
{{cds110b-wi08 lecture|prev=Linear Quadratic Regulators|next=State Estimation}}
This set of lectures provides an introduction to receding horizon control and its use for two degree of freedom control design.
This set of lectures builds on the previous three weeks and explores the use of online optimization as a tool for control of nonlinear control.  We being with an high-level discussion of optimization-based control, refining some of the concepts initially introduced in Week 1.  We then describe the technique of receding horizon control (RHC), including a proof of stability for a particular form of receding horizon control that makes use of a control Lyapunov
function as a terminal cost.  A detailed implementation example, the Caltech ducted fan, is used to explore some of the computational tradeoffs in optimization-based control.
 
''Prerequisites'': Students should be familiar with the concepts of trajectory generation and optimal control as described in Weeks 1-3.  For the proof of stability for the receding horizon controller that we use, familiarity
with Lyapunov stability analysis at the level given in AM08, Chapter 4 (Dynamic Behavior) is required.


* {{cds110b-wi08 pdfs|L4-1_rhc.pdf|Lecture slides on RHC overview}} (Mon)
* {{cds110b-wi08 pdfs|L4-1_rhc.pdf|Lecture slides on RHC overview}} (Mon)
* {{cds110b-wi08 pdfs placeholder|L4-2_rhc.pdf|Lecture notes on RHC analysis}} (Wed)
* {{cds110b-wi08 pdfs|L4-2_rhc.pdf|Lecture notes on RHC analysis}} (Wed) - the notation in these notes is slightly different than the text.  In lecture, I will use the textbook notation.
* {{cds110b-wi08 pdfs placeholder|hw4.pdf|HW #4}} (due 6 Feb 08)
* HW #4 (due 6 Feb 08):  {{obc08|problems 3.1, 3.3 and 3.2}}.  Students working on the course project should do problems 3.1 and 3.3 only.


== References and Further Reading ==
== References and Further Reading ==
* R. M. Murray, ''Optimization-Based Control''. Preprint, 2008: {{cds110b-wi08 pdfs placeholder|optimal_28Jan08.pdf|Chapter 3 - Receding Horizon Control}}
* R. M. Murray, ''Optimization-Based Control''. Preprint, 2008: {{obc08 pdfs|rhc_30Jan08.pdf|Chapter 3 - Receding Horizon Control}}
* <p>[http://www.cds.caltech.edu/~murray/papers/2001n_mur+03-sec.html Online Control Customization via Optimization-Based Control], R. M. Murray et al.  In Software-Enabled Control: Information Technology for Dynamical Systems, T. Samad and G. Balas (eds.), IEEE Press, 2001.  This paper talks about the CLF-based nonlinear RHC approach and its application on the Caltech ducted fan using NTG.</p>
* <p>[http://www.cds.caltech.edu/~murray/papers/2001n_mur+03-sec.html Online Control Customization via Optimization-Based Control], R. M. Murray et al.  In Software-Enabled Control: Information Technology for Dynamical Systems, T. Samad and G. Balas (eds.), IEEE Press, 2001.  This paper talks about the CLF-based nonlinear RHC approach and its application on the Caltech ducted fan using NTG.</p>
* <p>[http://dx.doi.org/10.1016/S0005-1098(99)00214-9 Constrained model predictive control: Stability and optimality], D. Q. Mayne, J. B. Rawlings, C. V. Rao and P. O. M. Scokaert.  Automatica, 2000, Vol. 36, No. 6, pp. 789-814.  This is one of the most referenced comprehensive survey papers on MPC.  Gives a nice overview about its history and explains the most important issues and various approaches.</p>
* <p>[http://dx.doi.org/10.1016/S0005-1098(99)00214-9 Constrained model predictive control: Stability and optimality], D. Q. Mayne, J. B. Rawlings, C. V. Rao and P. O. M. Scokaert.  Automatica, 2000, Vol. 36, No. 6, pp. 789-814.  This is one of the most referenced comprehensive survey papers on MPC.  Gives a nice overview about its history and explains the most important issues and various approaches.</p>
Line 16: Line 20:
<blockquote>
<blockquote>
The basic idea in using flatness for optimal trajectory generation is to rewrite the cost function and constraints in terms of the flat outputs and then parameterize the flat outputs in terms of a set of basis functions:
The basic idea in using flatness for optimal trajectory generation is to rewrite the cost function and constraints in terms of the flat outputs and then parameterize the flat outputs in terms of a set of basis functions:
<center><math>
<center>$$
z(t) = \sum_i \alpha_i \psi_i(t)
z(t) = \sum_i \alpha_i \psi_i(t)
</math></center>
$$</center>
Here, <math>\psi_i</math>, <math>i = 1, \dots, N</math> are the basis functions (eg, <math>\psi_i(t) = t^i</math>) and <math>\alpha_i</math> are constant coefficients.
Here, $\psi_i$, $>i = 1, \dots, N$ are the basis functions (eg, $\psi_i(t) = t^i$) and $\alpha_i$ are constant coefficients.


Once you have parameterized the flat outputs by <math>\alpha</math>, you can convert all expressions involving <math>z</math> into functions involving <math>\alpha</math>.  This process is described in a more detail in the [http://www.cds.caltech.edu/~murray/papers/2001n_mur+03-sec.html lectures notes] (Section 4).
Once you have parameterized the flat outputs by $\alpha$, you can convert all expressions involving $z$ into functions involving $\alpha$.  This process is described in a more detail in the [http://www.cds.caltech.edu/~murray/papers/2001n_mur+03-sec.html lectures notes] (Section 4).
</blockquote>
</blockquote>


Line 27: Line 31:
<blockquote>
<blockquote>
I was a bit sloppy defining CLFs in lecture.  The formal definition is given in the [http://www.cds.caltech.edu/~murray/papers/2001n_mur+03-sec.html lectures notes] (Section 2.2, Defn 1).  Briefly, given a system
I was a bit sloppy defining CLFs in lecture.  The formal definition is given in the [http://www.cds.caltech.edu/~murray/papers/2001n_mur+03-sec.html lectures notes] (Section 2.2, Defn 1).  Briefly, given a system
<center><math>
<center>$$
\dot x = f(x,u),
\dot x = f(x,u),
</math></center>
$$</center>
we say that a (smooth) function <math>V(x)</math> is a ''control Lyapunov function'' (CLF) if
we say that a (smooth) function $V(x)$ is a ''control Lyapunov function'' (CLF) if
* <math>V(x) > 0</math> for all <math>x \neq 0</math>
* $V(x) > 0$ for all $x \neq 0$
* <math>V(x) = 0</math> if and only if <math>x = 0</math>
* $V(x) = 0$ if and only if $x = 0$
* The derivative of <math>V</math> along trajectories of the system satisfies
* The derivative of $V$ along trajectories of the system satisfies
<center><math>
<center>$$
\min_u \dot V(x) |_{\dot x = f(x,u)} = \min_u \frac{\partial V}{\partial x} f(x, u) < 0
\min_u \dot V(x) |_{\dot x = f(x,u)} = \min_u \frac{\partial V}{\partial x} f(x, u) < 0
</math></center>
$$</center>
:for all <math>x</math>
for all $x$.


The condition for stability given in lecture is that there exists a CLF for the system that in ''addition'' satisfies the relationship
The condition for stability given in lecture is that there exists a CLF for the system that in ''addition'' satisfies the relationship
<center><math>
<center>$$
\min_u (\dot V(x) + L(x, u)) < 0
\min_u (\dot V(x) + L(x, u)) < 0
</math></center>
$$</center>
along the trajectories of the system.  Thus we have to have the derivative of <math>V</math> be ''sufficiently'' negative definite in order to insure that the terminal cost <math>V(x)</math> provides stability.
along the trajectories of the system.  Thus we have to have the derivative of $V$ be ''sufficiently'' negative definite in order to insure that the terminal cost $V(x)$ provides stability.
</blockquote>
</blockquote>


'''Q: Why do receeding horizon trajectories need to go to zero (on slide 4)?'''
'''Q: Why do receeding horizon trajectories need to go to zero (on slide 4)?'''
<blockquote>
<blockquote>
It is common in control problems to assume that the desired trajectory goes to zero as its desired end state.  This is implicitly the case whenever you see an integral cost of the form <math>x^T Q x</math> or a terminal cost <math>x^T(T) P_1 x(T)</math>, both of which are minimized when <math>x</math> is zero.  There are two ways to think about this:
It is common in control problems to assume that the desired trajectory goes to zero as its desired end state.  This is implicitly the case whenever you see an integral cost of the form $x^T Q x$ or a terminal cost $x^T(T) P_1 x(T)$, both of which are minimized when $x$ is zero.  There are two ways to think about this:
* If we wish to move to a different (equilibrium) point <math>x_d</math>, we can always change the state to <math>x_{new} = x - x_d</math> and then the new state <math>x_{new}</math> has zero as the desired equilibrium point.
* If we wish to move to a different (equilibrium) point $x_d$, we can always change the state to $x_{new} = x - x_d$ and then the new state $x_{new}$ has zero as the desired equilibrium point.
* If we want to track a ''trajectory'' <math>x_d(t)</math> (not constant), then we can solve the problem for the ''error system'' given by substrating the desired state.
* If we want to track a ''trajectory'' $x_d(t)$ (not constant), then we can solve the problem for the ''error system'' given by substrating the desired state.
This is explained in more dtail in the  {{cds110b-pdfs|lqr.pdf|lecture notes on LQR control}} (Section 3).
This is explained in more dtail in the  {{cds110b-pdfs|lqr.pdf|lecture notes on LQR control}} (Section 3).
</blockquote>
</blockquote>

Latest revision as of 18:31, 15 October 2015

CDS 110b Schedule Project Course Text

This set of lectures builds on the previous three weeks and explores the use of online optimization as a tool for control of nonlinear control. We being with an high-level discussion of optimization-based control, refining some of the concepts initially introduced in Week 1. We then describe the technique of receding horizon control (RHC), including a proof of stability for a particular form of receding horizon control that makes use of a control Lyapunov function as a terminal cost. A detailed implementation example, the Caltech ducted fan, is used to explore some of the computational tradeoffs in optimization-based control.

Prerequisites: Students should be familiar with the concepts of trajectory generation and optimal control as described in Weeks 1-3. For the proof of stability for the receding horizon controller that we use, familiarity with Lyapunov stability analysis at the level given in AM08, Chapter 4 (Dynamic Behavior) is required.

References and Further Reading

Frequently Asked Questions

Q: How do you do trajectory optimization using differential flatness

The basic idea in using flatness for optimal trajectory generation is to rewrite the cost function and constraints in terms of the flat outputs and then parameterize the flat outputs in terms of a set of basis functions:

$$

z(t) = \sum_i \alpha_i \psi_i(t)

$$

Here, $\psi_i$, $>i = 1, \dots, N$ are the basis functions (eg, $\psi_i(t) = t^i$) and $\alpha_i$ are constant coefficients.

Once you have parameterized the flat outputs by $\alpha$, you can convert all expressions involving $z$ into functions involving $\alpha$. This process is described in a more detail in the lectures notes (Section 4).

Q: Is the condition given by Jadbabaei and Hauser and example of a CLF or the definition of a CLF?

I was a bit sloppy defining CLFs in lecture. The formal definition is given in the lectures notes (Section 2.2, Defn 1). Briefly, given a system

$$

\dot x = f(x,u),

$$

we say that a (smooth) function $V(x)$ is a control Lyapunov function (CLF) if

  • $V(x) > 0$ for all $x \neq 0$
  • $V(x) = 0$ if and only if $x = 0$
  • The derivative of $V$ along trajectories of the system satisfies
$$

\min_u \dot V(x) |_{\dot x = f(x,u)} = \min_u \frac{\partial V}{\partial x} f(x, u) < 0

$$

for all $x$.

The condition for stability given in lecture is that there exists a CLF for the system that in addition satisfies the relationship

$$

\min_u (\dot V(x) + L(x, u)) < 0

$$

along the trajectories of the system. Thus we have to have the derivative of $V$ be sufficiently negative definite in order to insure that the terminal cost $V(x)$ provides stability.

Q: Why do receeding horizon trajectories need to go to zero (on slide 4)?

It is common in control problems to assume that the desired trajectory goes to zero as its desired end state. This is implicitly the case whenever you see an integral cost of the form $x^T Q x$ or a terminal cost $x^T(T) P_1 x(T)$, both of which are minimized when $x$ is zero. There are two ways to think about this:

  • If we wish to move to a different (equilibrium) point $x_d$, we can always change the state to $x_{new} = x - x_d$ and then the new state $x_{new}$ has zero as the desired equilibrium point.
  • If we want to track a trajectory $x_d(t)$ (not constant), then we can solve the problem for the error system given by substrating the desired state.

This is explained in more dtail in the lecture notes on LQR control (Section 3).