Noel Csomay-ShanklinA collection of things I would like to remember
https://noelc-s.github.io/website/
Sun, 01 Oct 2023 03:01:28 +0000Sun, 01 Oct 2023 03:01:28 +0000Jekyll v3.9.3FlowersI find it difficult (I wanted to use the word impossible, but that seemed a little dramatic), no, impossible not to stop and gawk at the artistic mastery that flowers so naturally command. With the booming tone of a captain trying to be heard over the bombardments at the front lines, their colored petals shout “notice me!” – how could you not stop? (I quite enjoy the imagery of fields of flowers waging war against one another, vying for the victory that is the attention of random passersby – but I will restrain myself from creating such a scene, for now). So there I was, walking with the purpose (most people in Boston walk with a purpose, so here I am, trying to assimilate) of enjoying the beautiful weather, when the bellow of an impossibly purple Morning Glory (yes, impossibly) made me stop in my tracks. The reservoir of color in this flower was at such worrying capacity that it seemed another drop would cause all of the hue to collect and drip off the petals leaving behind only its white skeleton swaying in the breeze. This delicate swaying is another point of fascination, the petals in a coordinated dance with the wind, trying eagerly to take flight but being restrained by the careful grasp of the stem (dandelion seeds, it seems, have more determination).
Satiated, I turned to continue my purposeful walking when I was deafened by the roar of an indigo Asiatic dayflower. How could such a small flower embody such a large presence? And as my field of view expanded, I saw the awe-ful scene before me: a battlefield of color, flowers dueling one another in an attempt to catch my gaze (or perhaps this is too egocentric, for I was really the one fighting for the attention of the flowers). So I once again stopped, admiring the color of the flowers, wondering how in the world people in Boston get anywhere with such colorful combat going on in the streets.
Mon, 04 Sep 2023 00:00:00 +0000
https://noelc-s.github.io/website/highlights/2023/09/04/Flowers/
https://noelc-s.github.io/website/highlights/2023/09/04/Flowers/HighlightsHighlightsCoffee in the RainI’ve been enjoying the not-as-infrequently-as-promised rain in Boston this summer, probably because of its novelty as a permanent California resident. One of my (newly) favorite activities while it’s raining is to walk around, pretending for a moment to adopt the mindset of a tree, who, I imagine, revels in the thought of getting soaking wet. This being said, as much as I enjoy this arboreal fantasy, I most certainly do not enjoy when my socks get soaking wet. (I enjoy many other canonically unpleasant activities precisely because they are universally unpleasant and therefore allude to the idea of a shared human experience. But this is where I draw the line.) To combat my phobia of having wet socks, I have decided to exclusively wear flip flops when it rains, accepting my fate as someone with wet feet (but importantly, not wet socks).
This is not meant to (only) be an exposition on the current, former, or future moisture content of my socks, but is rather meant to set the scene for the moment when I happened upon my local coffee roaster, happily splashing through the puddles down the street in my flip flops. At this instant I realized that my life, which was already quite enjoyable re:my new-found enjoyment of rain, would be significantly more enjoyable with the companionship of a warm cup of coffee. And in exchange for 6 minutes at work (my new value-assessment scheme), I received far more than 6 minutes of enjoyment for the remainder of my walk, and even more than that in the reflections of the aforementioned enjoyment.
Fri, 25 Aug 2023 00:00:00 +0000
https://noelc-s.github.io/website/highlights/2023/08/25/Coffee/
https://noelc-s.github.io/website/highlights/2023/08/25/Coffee/HighlightsHighlightsWhy is TSO(n) the set of skew symmetric matrices?Table of Contents
Construction of \(SO(n)\)
If we just care about \(SO(n)\), why go through the effort to define \(GL(n)?\)
This exposition is distilled from a series of office visits to Victor Dorobantu, after which Lie Groups and Lie Aglebras made sense to me for the first time.
Construction of \(SO(n)\)
Consider the set of invertible \(n\times n\) matrices as
\[
GL(n) = \{A\in\mathbb{R}^{n\times n} | \text{det}(A) \ne 0\}
\]
known as the general linear group (hence \(GL(n)\)). Now consider matrices \(A\in GL(n)\) such that \(A^\top A = \mathbf{I}_n\), and more specifically a function \(f:GL(n)\to\mathbb{R}^{n\times n}\) defined as:
\[
f(A) = A^\top A.
\]
Since \(f\) is a smooth function, we know via the inverse function theorem that the pre-image of any regular value of \(f\) defines a submanifold of the space. As such, consider the identity level set of our function \(f\), which defines the orthogonal group:
\[
O(n) = \{A\in\mathbb{R}^{n\times n} | A\in GL(n), A^\top A = \mathbf{I}_n\}.
\]
Noting also that the determinant operation is smooth in the space of matrices, we can make a similar argument to define the special orthogonal group:
\[
SO(n) = \{A\in\mathbb{R}^{n\times n} | A\in GL(n), A^\top A = \mathbf{I}_n, \text{det}(A) = 1\}.
\]
If we just care about \(SO(n)\), why go through the effort to define \(GL(n)?\)
With the goal of doing calculus on manifolds, we must be especially careful to understand what space the tangent vectors exist in. Specifically, we will consider perturbations of tangent vectors, but in doing so we have to ensure that the constructions that we make have a mathematical consistency, i.e. perturbations of our vectors do not exit the domain of definition of the objects we create.
We can now think of what it means to take the differential of \(f\) at \(A\) in the direction of a tangent “vector” \(V\) as:
\[
[Df(A)](V) = \lim_{\varepsilon\to 0}\frac{(A+\varepsilon V)^\top(A+\varepsilon V) - A^\top A}{\varepsilon}
\]
As such, we know that tangent “vectors” \(V\) to \(SO(n)\) (these objects can naturally be though of as matrices) must satisfy the following equation:
\[
A^\top V + V^\top A = \mathbf{0}_{n\times n}
\]
as these are the directions in the null space of the differential of \(f\).
If we want to associate a Lie Algebra to the Lie Group \(SO(n)\), then we need to consider the tangent space at identity. In other words,
\[
[Df(\mathbf{I}_n)](V) = 0 \iff V+V^\top = 0_{n\times n},
\]
or more canonically, the set of skew symmetric matrices.
Taking the canonical Lie bracket as the binary operation (which satisfies bilinearity, anticommutativity, etc…), we observe that the set of skew symmetric matrices is closed under the Lie bracket operator (as skew symmetric matrices commute). Noting also that that the set of skew symmetric matrices is a vector space, we have all the ingredients to define a Lie Algebra.
Tue, 20 Dec 2022 00:00:00 +0000
https://noelc-s.github.io/website/reading/2022/12/20/TSO3/
https://noelc-s.github.io/website/reading/2022/12/20/TSO3/ReadingreadingA Primer on Multi-Rate ControlLink to full-length paper
The following discussion is meant to be a more illustrative exposition of the methodology employed in the paper: Multi-Rate Planning and Control of Uncertain Nonlinear Systems:
Model Predictive Control and Control Lyapunov Functions, while answering some potential questions that may arise.
Table of Contents
Motivation
Linear MPC
Robust Linear MPC
Motivation
Before getting into the weeds, we will motivate the use of robust linear MPC, which will start with a discussion of linear MPC.
Linear MPC
First consider the deterministic linear conrol system with discrete time dynamics \[x_{k+1} = Ax_k + Bu_k\] with \(x\in \mathbb{R}^n\), \(u\in\mathbb{R}^m\), \(A\in\mathbb{R}^{n\times n}\), and \(B\in\mathbb{R}^{n\times m}\). The standard MPC program can be written as:
\begin{align}
u^* = \,\,\underset{u \in \mathbb{R}^m}{\text{argmin}} & \quad \sum_{k=0}^{N-1} x_k^\top Q x_k + u_k^\top R u_k + x_N^\top V x_N \notag\\ \notag
\mathrm{s.t.} \quad & \quad x_{k+1} = Ax_k + Bu_k \\ \notag
&\quad x_0 =x(0) \\ \notag
&\quad x_k \in \mathcal{X}\\ \notag
&\quad u_k \in \mathcal{U}\\ \notag
&\quad x_N \in \mathcal{X}_F, \nonumber
\end{align}
for \(Q\in\mathbb{R}^{n\times n}\), \(R\in\mathbb{R}^{m\times m}\) state and input weights, \(V\in\mathbb{R}^{n\times n}\) terminal cost, \(\mathcal{X}\subset \mathbb{R}^n\), \(\mathcal{U}\subset\mathbb{R}^m\), state and input constraints, and respectively, and \(\mathcal{X}_F\subset\mathbb{R}^n\) the terminal constraint set. For the sake of simplicity, we will start by assuming that the terminal constraint set is given by a point, i.e. \(x_e = \mathcal{X}_F\), which is a control invariant with control input \(u=0\).
Solving this optimization problem at time $t=0$ results in the optimal solutions:
\begin{align}
x^* &= \{x^*_{0|0},\ldots,x_e\}\notag \\
u^* &= \{u^*_{0|0},\ldots,u^*_{N-1|0}\}, \notag
\end{align}
where \(x_{k|t}\) represents the \(k^{th}\) state decision variable as planned at time index $t$, as depicted by:
Consider the application of the open loop control action \(u^*_0\) at time step \(t=0\), resulting in the following system update:
Of paramount importance with MPC is the notion of recursive feasibility, i.e. ensuring that if the program is feasible at instantiation, that it continues to be feasible at all times in the future. In the above diagram, it is clear to see that the following state and action pairs:
\begin{align}
x^* &= \{x^*_{1|0},\ldots,x_e, x_e\}\notag \\
u^* &= \{u^*_{1|0},\ldots,u^*_{N-1|0}, 0\}, \notag
\end{align}
are feasible at time step \(t=1\) (again, assuming that \(x_e\), the terminal constraint set is a control invariant with control input \(u=0\). In general this idea can be extended to terminal constraints of arbitrary [polytopic, or more generally, convex] terminal constraints \(\mathcal{X}_F\)). To see this, consider the set \(\mathcal{X}_F\), a control invariant under the policy \(\pi:\mathbb{R}^n\to\mathbb{R}^m\). In the recursive feasability step, we can replace the state action pairs with:
\begin{align}
x^* &= \{x^*_{1|0},\ldots,x_{N|0}, Ax_{N|0} + B\pi(x_{N|0})\}\notag \\
u^* &= \{u^*_{1|0},\ldots,u^*_{N-1|0}, \pi(x_{N|0})\}, \notag
\end{align}
Robust Linear MPC
This is all fine and dandy, but now consider the uncertain system dynamics of \[x_{k+1} = Ax_k + Bu_k + w\] for \(w\in\mathcal{W}\subset\mathbb{R}^n\). In this setting, two things are lost:
It may be that the system state exits the state constraint set
We no longer have a guarantee of recursive feasibility
In order to remedy these issues, we have a few options. The first option is to plan policies over the disturbance set (more details can be found in this paper). It is not clear how to do this for general systems, but for linear systems with polytopic disturbance sets \(\mathcal{W}\), this can be achieved via an optimization program that is NP-hard to solve. Another option, which will naturally extend to nonlinear systems, is to use a feedback controller in tandem with MPC.
We start by defining a feedback policy \(K\in\mathbb{R}^{m\times n}\) which renders the closed loop system \(A_{\textrm{cl}} = A+BK\) stable. We can then generate a robust invariant \(\mathcal{E}\), i.e. a set such that for all elements \(x^-\in\mathcal{E}\), there exists an input \(u\) such that the point \(x^+ = Ax^-+Bu + w \in \mathcal{E}\) for all \(w\in\mathcal{W}\). The process of producing such a robust invariant for linear systems is depicted below, with more details in this paper.
The notation \(\oplus\) is the Minkowski sum of two sets, i.e. given two sets \(A\) and \(B\), \(A\oplus B = \{a+b|a\in A, b\in B\}\), and \(\ominus\) is the Minkowski difference of two sets, i.e. if \(C=A\oplus B\) then \(A=C\ominus B\).
Although this set is not guaranteed to be polytopic, a polytopic outer approximation can readily be generated. Now, consider the following robust MPC program:
\begin{align}
(x,u)^* = \,\,\underset{x,u}{\text{argmin}} & \quad \sum_{k=0}^{N-1} x_k^\top Q x_k + u_k^\top R u_k + x_N^\top V x_N \notag\\ \notag
\mathrm{s.t.} \quad & \quad x_{k+1} = Ax_k + Bu_k \\ \notag
&\quad x_0 =x(0) \\ \notag
&\quad x_k \in \mathcal{X}\ominus \mathcal{E}\\ \notag
&\quad u_k \in \mathcal{U}\ominus K\mathcal{E}\\ \notag
&\quad x_N \in \mathcal{X}_F, \nonumber
\end{align}
where it must be verified that \(\mathcal{X}\ominus \mathcal{E}\) and \(U\ominus K\mathcal{E}\) are not empty, and that \(\mathcal{X}_F\subset\mathcal{X}\ominus\mathcal{E}\). From the solutions \((x,u)^*\), the control input to the system can be constructed as: \[\pi(x) = K(x-x^*_{0|0})+u^*_{0|0}.\]
This formulation grants us a number of benefits. First, it resolves the two aforementioned challenges, i.e. the states (and inputs) will remain in the constraint sets, and recursive feasibility can be guaranteed. To see this, consider the optimal sequence of states at time step \(t=0\):
Then, once the policy is applied, we can simply use the same sequence of states and inputs that were used in the previous section (depending on if the terminal set is an unforced equilibrium point, or more generally a control invariant), which are feasible at the next time step:
Additionally, this formulation does all of this while avoiding having to solve an NP-hard problem.
This paradigm of separating the feedback to a “low-level” controller, allowing the MPC program to plan over the disturbance free system is the same idea as employed in my most recent paper), which extends this concept to nonlinear systems:
Sat, 18 Jun 2022 00:00:00 +0000
https://noelc-s.github.io/website/research/2022/06/18/MultiRateControl/
https://noelc-s.github.io/website/research/2022/06/18/MultiRateControl/ResearchresearchDo Discretization and Linearization Commute?
When taking a nonlinear, continuous time model and going to a linear, discrete time one (for example, when doing MPC), there are often questions about whether to linearize and then discretize, or discretize and then linearize, and up to what order. In other words, it is a question of whether or not the following diagram commutes:
Start by considering a nonlinear continuous time model as:
\[
\dot x = f(x,u),
\]
which we would like to convert to a linear discrete time model at some period \(dt\).
Let’s start with the standard approach of linearizing first:
\[
\dot x = f(\bar x, \bar u) + \frac{df}{dx}\Big\vert_{\bar x, \bar u}(x-\bar x) + \frac{df}{du}\Big\vert_{\bar x, \bar u}(u - \bar u).
\]
Now discretizing, we have:
\[
x_{k+1} = x_k + \Bigg(f(\bar x, \bar u) + \frac{df}{dx}\Big\vert_{\bar x, \bar u}(x_k-\bar x) + \frac{df}{du}\Big\vert_{\bar x, \bar u}(u_k - \bar u)\Bigg)dt,
\]
On the other hand, if we first take a one step Euler discretization first:
\[
x_{k+1} = x_k + f(x_k,u_k)dt,
\]
and now it’s first order linearization:
\[
\begin{align}
x_{k+1} &= \bar x + f(\bar x,\bar u)dt + \Bigg((x_k-\bar x) + \frac{df}{dx}\Big\vert_{\bar x, \bar u}(x_k -\bar x) + \frac{df}{du}\Big\vert_{\bar x, \bar u}(u_k - \bar u)\Bigg)dt \notag \\
&= x_k + \Bigg(f(\bar x, \bar u) + \frac{df}{dx}\Big\vert_{\bar x, \bar u}(x_k-\bar x) + \frac{df}{du}\Big\vert_{\bar x, \bar u}(u_k - \bar u)\Bigg)dt, \notag
\end{align}
\]
which agrees with what we had before.
In practice though, if you linearize and then discretize then you will likely use the exact discretezation (the discrete update map for LTI systems can be written down explicitly), and therefore may introduce less approximation error than first discretizing and then linearizing.
Thu, 16 Jun 2022 00:00:00 +0000
https://noelc-s.github.io/website/reading/2022/06/16/DiscLinCommutativity/
https://noelc-s.github.io/website/reading/2022/06/16/DiscLinCommutativity/ReadingreadingBipedal Locomotion with Nonlinear Model Predictive ControlTalk
Link to Recording
Paper
Link to Paper
Poster
Sat, 11 Jun 2022 00:00:00 +0000
https://noelc-s.github.io/website/research/2022/06/11/DynamicWalking/
https://noelc-s.github.io/website/research/2022/06/11/DynamicWalking/ResearchresearchLyapunov's MethodTable of Contents
The Goal of Control
Stability:
Asymptotic Stability:
Exponential Stability:
Lyapunov’s Method
Lyapunov’s Theorem
Some Further Intuition
The Goal of Control
Given a physical system, it seems natural to wish for it to exhibit desired behavior. For example, if I have a robot, I want it to do \({something}\). The goal of control theory is to certifiably drive dynamical systems \(\dot x = f(x)\) to desired states \(x^*\). Without (much) loss of generality, we can describe achieving the desired behavior as minimizing \(\|x(t)-x^*\|\) for some desired state \(x^*\). Therefore, of paramount importance is the notion of stability, which captures the ability of the system to decrease, or at the very least bound, the error between the actual system state and the desired state. These notions are formalized as follows:
Stability:
A system is stable if, for all \(\varepsilon>0\), there exists a \(\delta>0\) such that:
\[\|x(0)-x^*\| < \delta \implies \|x(t)-x^* \| < \varepsilon,~~~~ \forall t\ge 0.\]
Asymptotic Stability:
A system is asymptotically stable if it is stable, and additionally:
\[\lim_{t\to\infty}\|x(t)-x^*\| = 0 \]
Exponential Stability:
A system is exponentially stable if there exists \(M,\lambda,\delta>0\) such that:
\[
\|x(0)-x^*\| \le \delta \implies \|x(t) - x^*\| \le Me^{-\lambda t}\|x(0)-x^*\|.
\]
Thus far, discussing the stability of the system relies on being able to describe \(x(t)\), which is largely impossible to compute for nonlinear systems (even for a system as simple as the pendulum). Luckily, Lyapunov’s method of stability allows us to reason about the stability of systems without needing to explicitly solve for their solution.
Lyapunov’s Method
Instead of thinking about what the system will do as time progresses, we can instead think about how a property of the system evolves over time. For example, if I know that the energy of a mechanical system is (strictly) decreasing over time, I don’t have to know exactly what it will do to conclude that it will eventually come to a rest (i.e. will be asymptotically stable). Lyapunov’s method does exactly this, and Lyapunov functions can in some ways be though of as a generalization of energy functions.
Lyapunov’s Theorem
Let \(V:\mathbb{R}^n\to\mathbb{R}\) be a continuously differentiable function satisfying \(V(0) = 0\). If \(V\) additionally satisfies:
\(V(x) \succ 0\) (positive definite),
\(\dot V(x) \le 0\),
then (the equilibrium) \(x^*\) is stable.
Proof
Given an \(\varepsilon>0\), consider the Lyapunov sublevel set \(\Omega=\{x\in\mathbb{R}^n : V(x) \le c\}\) for some \(c\) such that \(\Omega \subset B_\varepsilon(0)\).
Such a construction is possible via the combined continuity and positive definiteness of \(V.\) Next, observe the following:
\[
V(x(t)) = V(x(0)) + \int_0^t \underbrace{\dot{V}(x(t))}_{\le 0} dt \le V(x(0)) \le c.
\]
Therefore, for initial conditions starting in \(\Omega\), they will remain in \(\Omega\) for all time, i.e. the set \(\Omega\) is forward invariant. With this, define \(\delta > 0\) such that \(B_\delta(0) \subset \Omega\), leading to:
\[
x(0) \in B_\delta(0) \implies x(0) \in \Omega \implies x(t) \in \Omega \implies x(t) \in B_\varepsilon(0),~~~~\forall t\ge 0,
\]
or equivalently:
\[
\|x(0)\| < \delta \implies \|x(t)\|< \varepsilon,
\]
i.e. the system is stable. \(\tag*{$\Box$}\)
Finally, the assumptions of the theorem can be strengthened to show other forms of stability. Namely, asymptotic stability can be certified if \(\dot V \prec 0\) (is negative definite), and exponential stability if \(\dot V \le -\gamma V\) for some \(\gamma > 0\).
Some Further Intuition
Although the proof is quite simple, it is useful to think deeper about the operations going on under the hood in order to gain some better intuition. First, observe that the time derivative of \(V\) is given by:
\[
\dot V(x) = \frac{dV}{dx} \dot x = \frac{dV}{dx}f(x),
\]
due to the chain rule. This can alternatively be though of as an inner product between vector fields: the vector field generated by taking the gradient of the scalar function \(V\), which points in the direction of steepest ascent, and the vector field \(f\) associated with the dynamics of the system. A dot product measures the extent to which to vectors “align”, so measuring \(\dot V\) is really assessing the extent to which the dynamics will increase the value of the Lyapunov function \(V\). If this derivative is zero, then the vectors \(\frac{dV}{dx}\) and \(f\) are orthogonal. Therefore, the flow of the system will maintain the value of the Lyapunov function – the system will stay on level sets. On the other hand, if the inner product is negative, then some component of the dynamics are pointing in a direction that will decrease the Lyapunov function, and if this happens at all points in time then the system must asymptotically approach the origin. These ideas are captured via the following image:
Thu, 05 May 2022 00:00:00 +0000
https://noelc-s.github.io/website/reading/2022/05/05/Lyapunov/
https://noelc-s.github.io/website/reading/2022/05/05/Lyapunov/ReadingreadingMulti-Rate Planning and Control of Uncertain Nonlinear SystemsLink to full-length paper
The following discussion is meant to be a more illustrative exposition of the methodology employed in the paper: Multi-Rate Planning and Control of Uncertain Nonlinear Systems:
Model Predictive Control and Control Lyapunov Functions, while answering some potential questions that may arise.
Table of Contents
Why pair Lyapunov with MPC?
How does Lyapunov fit into the picture?
Producing Robust Invariants for Input to State Stable Nonlinear Systems
How do I plan trajectories for a continuous time system when MPC runs in discrete time?
What model should be used in discrete time?
How to produce a dynamically admissible trajectory
Why do we get SOCP constraints?
Why pair Lyapunov with MPC?
The short answer is that Lyapunov’s method, for a certain class of systems, is able to provide robust invariants, and therefore provides a natural extension of tube MPC to for nonlinear control systems. The long answer requires starting with the motivation for robust linear MPC.
How does Lyapunov fit into the picture?
In general, producing robust invariants for nonlinear systems is challenging. For a certain class of systems though (namely, input to state stable systems), there are constructive techniques for generating robust invariants via Lyapunov level sets.
Producing Robust Invariants for Input to State Stable Nonlinear Systems
We now leave the world of linear systems, and enter the realm of nonlinear systems, i.e. systems governed by the disturbed dynamics:
\[
\dot x = f(x) + g(x)u + w
\]
for drift vector \(f:\mathbb{R}^n \to \mathbb{R}^n\) and actuation matrix \(g:\mathbb{R}^n\to\mathbb{R}^{n\times m}\). As detailed in the paper, if the above system is full state feedback linearizeable then there are constructive techniques for generating Input to State Stabilizing Control Lyapunov Functions (ISS-CLFs), or in other words, a (quadratic) function \(V:\mathbb{R}^n\to\mathbb{R}\) which certifies the stability of the above system, even under disturbances \(w\in \mathcal{W}\). The key with these ISS-CLFs is that there exists a level set of the function which can be rendered forward invariant, even under disturbances. Stated another way, there exists a constant \(c>0\) which depends on the maximum magnitude of the disturbance experienced, whereby the sublevel set:
\[
\Omega = \{x\in\mathbb{R}^n | V(x) \le c\}
\]
is forward invariant. As the function \(V\) is quadratic, these level sets are generalized ellipsoids. Aha! Just as in the previous section, the application of feedback to the control system has granted us robust invariant sets that we can fold into the MPC program, allowing us to avoid planning policies over the disturbance set.
How do I plan trajectories for a continuous time system when MPC runs in discrete time?
The answer lies in choosing an appropriate basis to plan points over in discrete time – it just so happens that Bézier polynomials enjoy a number of desirable properties:
Bézier polynomials are bounded by the convex hull of their control points
The derivatives of Bézier polynomials are again given by Bézier polynomials, whose control points are affine functions of the control points of the original polynomial
These properties will allow for guarantees to be made in continuous time while only planning in discrete time, and efficient representation in an optimization program, respectively.
What model should be used in discrete time?
Using the full-order nonlinear model in the MPC program would be nice, but we instead hold the perspective that efficient representation (i.e. linear system models, which lead to fast solve times) is more important. Usually, this would lead to model approximation error, which would be difficult to address generally – this is where the beauty of full state feedback linearizeable systems comes in. Specifically, full-state feedback linearizeable systems can exactly track (carefully constructed) trajectories which are derived from the linearizations of the system dynamics.
How to produce a dynamically admissible trajectory
We term trajectories that are exactly trackable by the nonlinear system as dynamically admissible trajectories. The major remaining question is how to produce these trajectories.
To be continued… If you got this far and can’t wait for me to finish the discussion then send me an email!
Why do we get SOCP constraints?
Tue, 29 Mar 2022 00:00:00 +0000
https://noelc-s.github.io/website/research/2022/03/29/MPC_CLF/
https://noelc-s.github.io/website/research/2022/03/29/MPC_CLF/ResearchresearchThe Role of AbstractionA quote from “Elements of Abstract Algebra,” written by Allan Clark
“Abstraction is simply the process of separating form from content. We abstract whenever we pass from a particular instance to the general case. Even the simplest mathematics, ordinary arithmetic, is an abstraction from physical reality. In modern mathematics we abstract from previous mathematical experience and reach a new and higher plane of abstraction. Indeed, each mathematical generation abstracts from the work of the preceding one, continually distilling and concentrating the essence of old thought into new and more perfect forms. The rewards are great. Not only does abstraction greatly enhance our understanding, it also dramatically increases the applications of mathematics to practical life.” xvii
Fri, 24 Dec 2021 00:00:00 +0000
https://noelc-s.github.io/website/personalreading/2021/12/24/Abstraction/
https://noelc-s.github.io/website/personalreading/2021/12/24/Abstraction/ReadingPersonalReadingBrouwer's fixed-point theoremTable of Contents
Theorem
Preface to the Proof
Simplicial Homology
What is a simplex?
Delta Complexes
What is a Chain Complex?
What is Homology?
Cellular Homology
Singular Homology
Reduced homology
Back to the Proof
Resources
Theorem
Every continuous function $f:D^n\to D^n$ has a fixed point, i.e. a point $x\in D^n$ such that $f(x) = x$.
Preface to the Proof
There are many ways to prove the above statement, but an especially elegant method utilizes the functorality of homology. In order to see this, we need to build up some preliminaries. For the following discussion, we will use $S^2$ as the motivating example, but the presented ideas can be extended to a wide variety of topological spaces.
Simplicial Homology
What is a simplex?
A topological n-simplex $\Delta^n_{\textrm{(top)}}$ is defined as
\[\Delta^n_{\textrm{(top)}} = \{t=(t_0,\ldots,t_n)\in\mathbb{R}^{n+1}:t_i \ge 0,\sum t_i = 1\}.\] For example, the topological two simplex is:
Delta Complexes
$\Delta$-complexes ($\Delta$-cxs), like simplicial and a CW-complexes, are a collection of maps $\sigma:\Delta^n\to X$ which take simplices and glue them together in specific ways to form topological spaces. Specifically, this process is done inductively, where at each step you add a new simplex by gluing its boundary to the existing complex via a map $g$. For $\Delta$-complexes, simply stated, the map $g$ must glue together faces in the canonical way (linearly, and preserving ordering of the vertices).
We can create a $\Delta$-cx structure on $S^2$ in the following way:
The relationship between simplices of different dimensions on the same topological space can be described via chain complexes.
What is a Chain Complex?
A chain complex (of Abelian groups) is a sequence of Abelian groups and group homomorphims:
\[
C_\bullet = \left( \ldots \xrightarrow{\partial_{n+1}} C_n \xrightarrow{\partial_n} C_{n-1} \xrightarrow{\partial_{n-1}} C_{n-2} \ldots \right)
\]
such that $\partial_n\circ\partial_{n+1} = 0$. We can derive chain complexes from $\Delta$-cxs in the following way:
Let $C_n$ for $n\in\mathbb{N}$ be the free Abelian group generated by $n$-simplices in $X$, $\sigma_n$. In other words we simply treat $\sigma$ as a symbol, and generate a free group by applying the usual rules of addition and subtraction.
For every element $i\in\{0,\ldots,n\}$, we can define the $i$-th face $\delta_i^n\subset\Delta^n$ to be
\[
\delta_i^n = \{t\in\Delta^n:t_i = 0\}
\]
The boundary of $\sigma_n$ is defined as the formal sum of the $(n-1)$ simplices that are the restriction of $\sigma$ to the faces of $\Delta^n$, with alternating sign. In other words:
\[
\partial \sigma_n = \sum_{i=0}^n(-1)^i\delta_i^n
\]
Each simplex is oriented, and we state that a simplex is equal to the negative of the simplex with the opposite orientation. In the example of the sphere, we have the following boundary maps:
\[
\begin{align}
\partial_1 \sigma_a &= w-v \notag \\
\partial_1 \sigma_b &= v-u \notag \\
\partial_1 \sigma_c &= w-u \notag \\
\partial_2 \sigma_U &= a-c+b \notag \\
\partial_2 \sigma_L &= a-c+b \notag \\
\end{align}
\]
Furthermore, we can verify that $\partial \circ \partial = 0$, for example
\[
\partial(\partial \sigma_L) = \partial(a-c+b) = (w-v)-(w-u)+(v-u) = 0
\]
The boundary map can also be viewed as a map $\partial:C_n(X)\to C_{n-1}(X)$, and from these maps we can create a chain complex. So, for our running example, we have
\[
\begin{align}
C_\bullet^\Delta(S^2) &= \left( C_3(X) \xrightarrow{\partial_3} C_2(X) \xrightarrow{\partial_2} C_1(X) \xrightarrow{\partial_1} C_0(X) \xrightarrow{\partial_0} 0\right) \notag \\
&= \left( 0 \xrightarrow{\partial_3} \mathbb{Z}\{\mathcal{U},\mathcal{L}\} \xrightarrow{\partial_2} \mathbb{Z}\{\textrm{a,b,c}\} \xrightarrow{\partial_1} \mathbb{Z}\{u,v,w\} \xrightarrow{\partial_0} 0\right) \notag
\end{align}
\]
What is Homology?
In order to define homology, we must first understand cycles and boundaries. An $n$-chain $C_n(X)$ is said to be an $n-cycle$, denoted as $Z_n$, if its boundary is zero:
\[
\sigma \in Z_n \implies \partial \sigma = 0.
\]
An $n$-cycle is an $n-boundary$, denoted as $B_n$, if it is the boundary of an $(n+1)$ chain of X:
\[
\sigma \in B_n \implies \sigma \in Z_n,~\text{and}~\exists \sigma’\in C_{n+1}~\text{s.t.}~\partial_{n+1} \sigma’ = \sigma.
\]
So, given the boundary maps $\partial_n$, what are the groups $Z_n$ and $B_n$? Well, $B_n$ is simply the image of $\partial_{n+1}$, which takes $n+1$ simplices and extracts their boundaries. On the other hand, $Z_n$ is the kernel of $\partial_{n}$, because the kernel of the map tells us which elements have zero boundary. As every element of $B_n$ must be an element of $Z_n$, we can form a quotient space – this quotient space is the homology! Specifically,
\[
H^\Delta_n(X) := H_n(C^\Delta_\bullet(X)) = \frac{Z_n}{B_n}
\]
Informally, the $n^{th}$ homology measures $n$-dimensional holes of our space $X$, which are exactly the cycles ($n$ dimensional “loops”) that are not the boundary of anything in one dimension higher.
Let’s continue with our running example and perform some calculations on $S^2$:
\[
\begin{align}
ker(\partial_2) &= \{x\cdot \mathcal{U} + y\cdot \mathcal{L} : x,y\in\mathbb{Z}, \partial_2 (x\cdot \mathcal{U} + y\cdot \mathcal{L}) = 0\} \notag \\
&= \{x\cdot \mathcal{U} + y\cdot \mathcal{L} : x,y\in\mathbb{Z}, x \cdot \partial_2 \mathcal{U} + y\cdot \partial_2\mathcal{L} = 0\} \notag \\
&= \{x\cdot \mathcal{U} + y\cdot \mathcal{L} : x,y\in\mathbb{Z}, x \cdot (a-c+b) + y\cdot (a-c+b) = 0\} \notag \\
&= \{x\cdot \mathcal{U} + y\cdot \mathcal{L} : x,y\in\mathbb{Z}, (x + y) \cdot (a-c+b) = 0 = 0\} \notag \\
&= \{x\cdot \mathcal{U} + y\cdot \mathcal{L} : x,y\in\mathbb{Z}, x = -y \} \notag \\
&= \mathbb{Z}\{\mathcal{U} - \mathcal{L}\} \notag
\end{align}
\]
\[
\begin{align}
ker(\partial_1) &= \{x\cdot a + y\cdot b +z\cdot c : x,y,z\in\mathbb{Z}, \partial_1 (x\cdot a + y\cdot b + z\cdot c) = 0\} \notag \\
&= \{x\cdot a + y\cdot b +z\cdot c : x,y,z\in\mathbb{Z}, x \cdot (w-v) + y \cdot (v-u) + z\cdot (w-u) = 0 \} \notag \\
&= \{x\cdot a + y\cdot b +z\cdot c : x,y,z\in\mathbb{Z}, (x+z) = (x+y) = (y-z) = 0\} \notag \\
&= \mathbb{Z}\{c-a+b\} \notag \\
\end{align}
\]
\[
\begin{align}
ker(\partial_0) &= \mathbb{Z}\{u,v,w\} \notag
\end{align}
\]
\[
\begin{align}
im(\partial_3) &= 0 \notag
\end{align}
\]
\[
\begin{align}
im(\partial_2) &= \mathbb{Z}\{c-b+a\} \notag
\end{align}
\]
\[
\begin{align}
im(\partial_1) &= \mathbb{Z}\{w-v, u-v, w-u\} \notag
\end{align}
\]
Performing the quotient calculations yields the following homology groups for $S^2$:
\[
\begin{align}
H^\Delta_2(S^2) &= \frac{Z_2}{B_2} = \frac{ker(\partial_2)}{im(\partial_3)} = \frac{\mathbb{Z}\{\mathcal{U} - \mathcal{L}\}}{0} = \mathbb{Z} \notag \\
H^\Delta_1(S^2) &= \frac{Z_1}{B_1} = \frac{ker(\partial_1)}{im(\partial_2)} = \frac{\mathbb{Z}\{c-a+b\}}{\mathbb{Z}\{c-a+b\}} = 0 \notag \\
H^\Delta_0(S^2) &= \frac{Z_0}{B_0} = \frac{ker(\partial_0)}{im(\partial_1)} = \frac{\mathbb{Z}\{u,v,w\}}{\mathbb{Z}\{w-v, u-v, w-u\}} = \mathbb{Z} \notag \\
\end{align}
\]
The above triangulations can be created for $S^n$ for $n\in\mathbb{N}$, but this would be quite an annoying calculation to perform. This annoyance calls for a slight digression into cellular homology.
Cellular Homology
Although simplices and simplicial homology are very algorithmic to compute, they can be exceedingly cumbersome as dimensionality grows. As such, there exits an alternative – cellular homology – which is less rigid and often more useful, and relies on CW-complexes instead of $\Delta$-complexes. These homologies are not only isomorphic, but also lead to the same chain complexes; therefore, the computations related to homology must agree.
The above computation can also be performed (more directly) for the $n$-sphere with CW complexes by noting that the $S^n$ has cell structure in only the zeroth and $n^{th}$ levels. With this observation we can immediately conclude that:
\[
H_k(S^n) =
\begin{cases}
\mathbb{Z},&k=0,n \\
0,& \text{o.w.}
\end{cases}
\]
Singular Homology
In fact, there is an even more general version of homology (often too general to be used in direct computation), called singular homology. Importantly, singular homology is a functor
\[
H_n: \textbf{Top}\to\textbf{Ab}
\] from the category $\textbf{Top}$, with objects topological spaces and morphisms continuous maps, and the category $\textbf{Ab}$ with objects Abelian groups and morphisms group homomorphisms. This can be seen by observing that singular $n$-chains are also functors $C_n:\textbf{Top}\to \textbf{Ab}$ (continuous functions between topological spaces induces group homomorphisms on $n$-chains), and the boundary map commutes with continuous maps. The functorality of singular homology, as well as its isomrphisms with other homology types is key for a number of applications of homology.
Reduced homology
Reduced homology, $\tilde H_i$, is simply a bookkeeping tool to remove the extra copy of $\mathbb{Z}$ in the lowest dimension. In other words
\[
\begin{align}
H_k &\cong \tilde H_k,~~~k\ge 1 \notag \\
H_0 &\cong \tilde H_0 \oplus \mathbb{Z}. \notag
\end{align}
\]
Back to the Proof
Let’s repeat the claim: Every continuous function $f:D^n\to D^n$ has a fixed point, i.e. a point $x\in D^n$ such that $f(x) = x$. We begin by assuming for the sake of contradiction that such a continuous function $f$ exists with no fixed points. This would guarantee that the points $x,f(x) \in D^n$ are distinct. As such, it would be possible to construct a retraction $r:D^n \to S^{n-1}$ from the disk to its boundary $\partial D^n = S^{n-1}$ via a ray from $f(x)$ passing through the $x$ to $S^{n-1}$, as depicted below:
Defining the inclusion map as $i:S^{n-1}\to D^n$, the retraction $r$ would be a continuous function such that $r\circ i=id_{S^{n-1}}$. This can be depicted diagrammatically as:
Note that this commutative diagram exists in the category $\textbf{Top}$; as such we can apply the homology functor! Applying the (reduced) singular homology functor, we have:
As singular homology is isomorphic to both cellular and simplicial homology, we can substitute the values calculated above, and therefore can replace the above diagram with the following:
where $\tilde H_{n-1}(id_{S^{n-1}}) = id_{\tilde H_{n-1}(S^{n-1})} = id_{\mathbb{Z}}$ due to the functorality of homology (functors preserve identity maps). The result becomes clear: for all values of $n>0$, the identity map on the integers cannot factor through zero. Namely, no function exists mapping zero to the entirety of the integers, as functions map inputs to individual outputs, and there is only one input to map from. (The case when $n=0$ is trivial, as $D^0=pt$, which must be a fixed point). As such, we can conclude that no such function $f$ can exist for any dimension $n$. How beautiful!
Resources
Hatcher
Singular Homology Wiki
Chain Complex Wiki
nLab Reduced Homology
Formal Sum of Simplices StackExchange
Duality
An Introduction to Homology
Algebraic Topology Notes
Delta complex vs CW complex vs Simplicial complex StackExchange
Complexes and Associated Homologies StackExchange
Brouwer’s Fixed Point Theorem (n=2)
Thu, 23 Dec 2021 00:00:00 +0000
https://noelc-s.github.io/website/reading/2021/12/23/BrouwersFixedPointThm/
https://noelc-s.github.io/website/reading/2021/12/23/BrouwersFixedPointThm/Readingreading