\documentclass[12pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\renewcommand{\baselinestretch}{1.2}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{0in}
\setlength{\textheight}{8.5in}
%\input setbmp
%\input{psfig.sty}
\usepackage{epsfig}
\newtheorem{defn}{Definition}
\newtheorem{thm}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{example}{Example}
\newtheorem{corollary}{Corollary}
\newtheorem{proposition}{Proposition}
\newtheorem{algorithm}{Algorithm}
\newtheorem{exercise}{Exercise}
%\usepackage[centertags]{amsmath}
%\usepackage{amsfonts}
\newcommand{\markex}{\nopagebreak\begin{center}\rule{5in}{.01in}\end{center}}
\newcommand{\markdefn}{\nopagebreak\hfill$\Diamond$}
\newcommand{\mb}{\mbox}
\newcommand{\bm}{\boldmath}
\def\b#1{\mb{\bm$#1$}}
\newfont{\Bb}{msbm10 scaled\magstep1}
\newfont{\Fr}{eufm10 scaled\magstep1}
\newfont{\Sc}{eusm10 scaled\magstep1}

%-------------
%\usepackage{latexsym}
%\renewcommand{\baselinestretch}{1.55}
%\setlength{\topmargin}{-0.25in}
%\setlength{\textheight}{8.5in}
%\setlength{\oddsidemargin}{0in}
%\setlength{\textwidth}{6.5in}
%\newtheorem{example}{Example}
%\newtheorem{thm}{Theorem}
%\newcommand{\markex}{\nopagebreak\begin{center}\rule{5in}{.02in}\end{center}}
%\newcommand{\mb}{\mbox}
%\newcommand{\bm}{\boldmath}
%\def\b#1{\mb{\bm$#1$}}
%\newfont{\Bb}{msbm10 scaled\magstep1}
%\pagestyle{empty}
\begin{document}
\noindent{\Large ECE 602}\hfill{\Large Fall 2011}
\\
\begin{center}
%{\LARGE \bf Model-based Predictive Control (MPC)\footnote{handout prepared by S.~H.~\.{Z}ak}}
{\Large \bf A Glimpse at Linear Time-Varying (LTV) Systems}\\
\vspace*{.12in}
%by\\

{\large Stanislaw H. \.{Z}ak}\\


\end{center}

\bigskip
\begin{flushright}
\parbox{5.5in}{''As we shall see, the concept of time has no meaning before the beginning of the universe. This was first pointed out by St. Augustine. When asked: What did God do before he created the universe? Augustine didn't reply: He was preparing Hell for people who asked such questions. Instead, he said that time was a property of the universe that God created, and that time did not exist before the beginning of the universe.'' Stephen W. Hawking~\cite[page~8]{hawking88}}
\end{flushright}

\bigskip

\section{Motivating Example}
Of considerable importance in many applications are linear systems in which the elements of $\b A$ and $\b B$ are continuous functions of time. We present a linear time-varying model of a battery as a motivation for our discussion on linear time-varying systems. Our derivation follows that of  Chiasson and Vairamohan~\cite{chiasson03,chiasson05}.


The simplest battery model is shown in Figure~\ref{fig:SOC_mod1}, which is called a practical voltage source.
\begin{figure}[h]
\centering \epsfig{file=SOC_mod1.eps,height=5.75cm}
\caption{Practical voltage source as a simple battery model.}
\label{fig:SOC_mod1}
\end{figure}
This model consists of an ideal voltage source that produces voltage $V_{oc}$. We refer to $V_{oc}$ as the open-circuit voltage. Thus the open-circuit voltage is obtained by measuring the voltage across the open-circuit, that is, when $I_b=0$. The internal resistance of the practical voltage source is denoted  $R_{int}$. The battery terminal voltage is labeled as $V_b$. This model, however, does not take into account the fact that the internal resistance is different under discharge and charge conditions. To account for this, the circuit of Figure~\ref{fig:SOC_mod1} is modified by introducing two different internal resistances; $R_c$---the charging resistance and $R_d$---the discharging resistance. These resistances are connected to the diodes to model charging and discharging modes of the battery operation. The modified circuit is shown in Figure~\ref{fig:SOC_mod2}.
\begin{figure}
\centering \epsfig{file=SOC_mod2.eps,height=5.75cm}
\caption{Battery model accounting for the different charging, $R_c$, and discharging, $R_d$, resistances.}
\label{fig:SOC_mod2}
\end{figure}
This model, on the other hand, does not take into account the diffusion of the electrolytic through the battery. To model this effect, a polarization capacitor is added to model electro-chemical reaction taking place in the battery. The resulting model is depicted in Figure~\ref{fig:SOC_mod3}.
\begin{figure}
\centering \epsfig{file=SOC_mod3.eps,height=5.75cm}
\caption{Battery model accounting for the different charging, $R_c$, and discharging, $R_d$, resistances and polarization capacitance, $C$.}
\label{fig:SOC_mod3}
\end{figure}


In electric vehicles, the state of charge (SOC) of the battery corresponds to a fuel gauge in a conventional, internal combustion, cars. To define the state of charge, consider a completely charged battery. Let $I_b(t)$ be the discharging current. Then, the charge delivered by the battery is
\[
Q(t)=\int_{t_0}^t I_b(\tau)d \tau .
\]
Let $Q_0=\int_{t_0}^{\infty} I_b(\tau)d \tau $ be the total charge that battery can hold. Then the state of charge (SOC) of the battery is
\begin{eqnarray}
\mb{SOC}(t) &=& \frac{Q_0-Q(t)}{Q_0}\times 100\nonumber\\
&=& \frac{Q_0 - \int_{t_0}^t I_b(\tau)d \tau}{Q_0}\times 100 .
\label{eq:soc_defn_q}
\end{eqnarray}
Direct application of~\eqref{eq:soc_defn_q} to estimate the battery SOC is not accurate. An alternative approach is to use an estimate of the open circuit voltage, $V_{oc}$ of the battery. Then, the SOC can be evaluated from the relation,
\begin{equation}
\mb{SOC}(t) = \frac{V_{oc}(t) - a_0}{a_1},
\label{eq:scoviavoc}
\end{equation}
where $a_0$ is the battery terminal voltage when $\mb{SOC}(t)=0\%$ and $a_1$ is obtained using $a_0$ and $V_{oc}$ at $\mb{SOC}(t)=100\%$. Thus estimating the SOC is equivalent to estimating the battery open-circuit voltage $V_{oc}(t)$. Now, in order to measure $V_{oc}$, the battery must be disconnected from its load, which is not possible during the electric vehicle operation that uses the battery whose SOC we wish to estimate. The approach proposed by Chiasson and Vairamohan~\cite{chiasson03,chiasson05} is to construct the open-circuit voltage estimator. This estimator construction is based on the battery model that we develop next.


We analyze the condition when the battery is in the discharging mode, that is, when $I_b\ge 0$. The charging mode is analyzed in a similar way. The battery model in the discharging mode is depicted in Figure~\ref{fig:SOC_mod4}.
\begin{figure}
\centering \epsfig{file=SOC_mod4.eps,height=5.75cm}
\caption{A battery model in the discharging mode of operation.}
\label{fig:SOC_mod4}
\end{figure}
To proceed, we apply Kirchhoff's current law (KCL) at the node between the resistances $R_d$ and $R_b$ to obtain
\[
I_c+I_b-I_d=0,
\]
that is,
\[
I_c=I_d-I_b.
\]
Applying Ohm's law gives
\begin{equation}
I_d=\frac{V_{oc}-V_p}{R_d}\quad\mb{and}\quad I_b=\frac{V_p-V_b}{R_b}.
\label{eq:two_eqns}
\end{equation}
We also have
\[
I_c=C\dot{V_p}.
\]
Combining the above equations yields
\begin{eqnarray}
C\dot{V_p} &=& I_d-I_b\nonumber\\
&=& \frac{V_{oc}-V_p}{R_d}-I_b\nonumber\\
&=& -\frac{V_p}{R_d}+\frac{V_{oc}}{R_d} -I_b.
\label{eq:combo_v_dot}
\end{eqnarray}
Dividing both sides by $C$, we obtain
\begin{equation}
\dot{V_p}=-\frac{V_p}{R_d C}+\frac{V_{oc}}{R_d C} -\frac{1}{C}I_b.
\label{eq:v_dot_afterC}
\end{equation}
The output equation is obtained from the second of the equations in~\eqref{eq:two_eqns},
\begin{equation}
V_b=V_p-R_bI_b
\label{eq:out_vb_as_f_of_ib}
\end{equation}
We define the state variables,
\[
x_1=V_p,\quad x_2=\frac{1}{R_d C},\quad x_3 = \frac{V_{oc}}{R_d C},\quad x_4=\frac{1}{C},\quad\mb{and}\quad x_5=R_b.
\]
Applying the state variable definitions to~\eqref{eq:v_dot_afterC} and~\eqref{eq:out_vb_as_f_of_ib}, and taking into account that $x_2$, $x_3$, $x_4$, and $x_5$ are constant, we obtain a nonlinear time-varying state-space model,
\begin{equation}
\left.
\begin{array}{lll}
\dot{x}_1 &=& -x_1x_2 + x_3 - I_b(t) x_4\\
\dot{x}_2 &=& 0\\
\dot{x}_3 &=& 0\\
\dot{x}_4 &=& 0\\
\dot{x}_5 &=& 0\\
y&=& V_b=x_1 - I_b(t) x_5
\end{array}\right\}
\label{eq:non_tv_mod_of_batt}
\end{equation}
The initial state vector is unknown to us. The state variable $x_3$ depends on $V_{oc}$. Recall that the state variables, $x_2$, $x_3$, $x_4$ and $x_5$ are constant. Our objective is to compute the open-circuit voltage $V_{oc}$, which is a constant. We note that
\[
x_3=\frac{V_{oc}}{R_d C}=V_{oc}x_2.
\]
Therefore
\[
V_{oc}=\frac{x_3}{x_2}=\frac{x_{30}}{x_{20}}
\]
because $V_{oc}$ is constant. Hence, we can determine $V_{oc}$ if we can estimate the initial values of the state variables $x_{20}$ and $x_{30}$. We proceed by redefining the state variables as
\[
z_1=x_1,\quad z_2=x_3,\quad z_3=x_4,\quad z_4=x_5.
\]
With the above in mind, and using the fact that $x_2=\mb{constant}=x_{20}$, we re-write~\eqref{eq:non_tv_mod_of_batt} as
\begin{eqnarray}
\left[\begin{array}{c}
\dot{z}_1\\
\dot{z}_2\\
\dot{z}_3\\
\dot{z}_4
\end{array}\right] &=& \left[\begin{array}{cccc}
-x_{20} & 1 & -I_b(t) & 0\\
0 & 0 & 0 & 0\\
0 & 0 & 0 & 0\\
0 & 0 & 0 & 0
\end{array}\right]\left[\begin{array}{c}
{z}_1\\
{z}_2\\
{z}_3\\
{z}_4
\end{array}\right]\label{eqstate_eqnabatt}\\
y&=& \left[\begin{array}{cccc}
1 & 0 & 0 & -I_b(t)
\end{array}\right]\left[\begin{array}{c}
{z}_1\\
{z}_2\\
{z}_3\\
{z}_4
\end{array}\right].
\label{eq:out_batt_mod}
\end{eqnarray}
The above is a linear LTV systemn because the current $I_b(t)$ is time-varying. In summary, we have a homogenous, or free, or unforced, LTV system model
\begin{eqnarray*}
\dot{\b z} &=& \b A(t,x_{20})\b z, \quad \b z(t_0)\\
y &=& \b c(t)\b z.
\end{eqnarray*}
Our objective is to estimate $\b z(t_0)$ from knowledge of the output $y(t)$ and the current $I_b(t)$ on some time interval $[t_0, \; t_f]$.
%To compute $\b z(t_0)$, we need the state-transition matrix of this LTV system.

We now outline a solution to the problem of estimating $\b z(t_0)$. The first step is to compute the state-transition matrix, $\b{\Phi}(t,t_0)$, which relates the state at time $t$ to the initial state,
\[
\b z(t) = \b{\Phi}(t,t_0)\b z(t_0).
\]
We then use the output equation to obtain
\begin{eqnarray*}
y(t) &=& \b c \b z(t)\\
&=& \b c \b{\Phi}(t,t_0)\b z(t_0).
\end{eqnarray*}
Premultiply both sides of the above by $\b{\Phi}(t,t_0)^{\top}\b c^{\top}$ and then integrate both sides to get
\[
\int_{t_0}^{t_f} \b{\Phi}(t,t_0)^{\top}\b c^{\top} y(t) dt = \int_{t_0}^{t_f} \b{\Phi}(t,t_0)^{\top}\b c^{\top}\b c \b{\Phi}(t,t_0) dt \;\b z(t_0).
\]
Let
\[
\b W_o(t_0,t_f) = \int_{t_0}^{t_f} \b{\Phi}(t,t_0)^{\top}\b c^{\top}\b c \b{\Phi}(t,t_0) dt ,
\]
which, as in the LTI case, we refer to as the observability gramian. If $\b W_o(t_0,t_f)$ is invertible then
\[
\b z(t_0)=\b W_o(t_0,t_f)^{-1}\int_{t_0}^{t_f} \b{\Phi}(t,t_0)^{\top}\b c^{\top} y(t) dt .
\]
Having obtained $\b z(t_0)$ we can compute $V_{oc}$ and then the SOC. We refer to Chiasson and Vairamohan~\cite{chiasson03,chiasson05} for a complete solution to this problem; see also Pang et al.~\cite{pang01}, and McIntyre et al.~\cite{mcintyre06} for alternative solutions.

To be able to solve this problem, we need to acquaint ourselves with the state transition matrix for LTV systems. We start with the LTV uncontrolled system.



\section{Solving the Uncontrolled LTV  System}

In general, it is not possible to give explicit expressions for solutions of linear time-varying systems. We obtain some general properties that for some cases will be used to obtain explicit solutions. We first consider the uncontrolled system
\begin{equation}
\dot{\b x}(t) = \b A(t) \b x(t), \quad \b x(t_0) = \b x_0.
\label{eq:LTV_uncontrolled}
\end{equation}
\begin{thm}\label{thm:ltv_sol_unique}
If $\b A(t)$ is continuous for $t\ge t_0$ then the uncontrolled system modeled by~\eqref{eq:LTV_uncontrolled} has a unique solution for $t\ge t_0$ given by
\[
\b x(t) = \b X(t)\b x_0,
\]
where $\b X(t)$ is the unique $n\times n$ matrix satisfying
\[
\frac{d \b X}{d t} = \b A(t) \b X, \quad \b X(t_0)=\b I_n .
\]
\end{thm}
{\bf Proof}\quad See Rugh~\cite[Chp.~3]{rugh93} or Antsaklis and Michel~\cite[Section~1.8]{antsaklis07}. See also Exercise~\ref{ex:using contraction}.\\
\hspace*{5.5in} $\Box$

Note that it follows from the above theorem that for every initial state $\b x^{(i)}(t_0)$, $i=1,2,\ldots, n$, there exists a unique solution $\b x^{(i)}(t)$, $i=1,2,\ldots, n$. We arrange these $n$ solutions as
\[
\b X(t)=\left[\begin{array}{cccc}
\b x^{(1)}(t) & \b x^{(2)}(t) & \cdots & \b x^{(n)}(t)
\end{array}\right].
\]
Because every $\b x^{(i)}(t)$ satisfies~\eqref{eq:LTV_uncontrolled}, we have
\[
\dot{\b X}(t) = \b A(t) \b X(t) .
\]
If $\b X(t_0)$ is nonsingular, then $\b X(t)$ is called a {\em fundamental matrix} of $\dot{\b x}=\b A(t)\b x$. Because the initial states are linearly independent, the fundamental matrix is nonsingular---see Exercise~\ref{ex:non_sing_fundm}. The fundamental matrix is not unique because we can choose initial states arbitrarily.

We now analyze a scalar LTV case,
\begin{equation}
\dot{x}=a(t)x,\quad x(0)=x_0 .
\label{eq:scalarltvdiffeq}
\end{equation}
Recall that when $a(t)=a=$constant, then the solution has the form
\[
x(t)=e^{at}x(0)=e^{\int_0^t a d\tau}x(0).
\]
The above formula works for the scalar LTV case, that is,
\begin{equation}
x(t)= e^{\int_0^t a(\tau)  d\tau}x(0).
\label{eq:sol_formula_scalltv}
\end{equation}
It is easy to verify that the above is the solution of~\eqref{eq:scalarltvdiffeq} because
\begin{eqnarray*}
\frac{d}{dt} e^{\int_0^t a(\tau) d \tau} &=& e^{\int_0^t a(\tau) d \tau } a(t)\\
&=& a(t) e^{\int_0^t a(\tau) d \tau } .
\end{eqnarray*}
That is, $a(t)$ and $\int_0^t a(\tau) d \tau$ commute.
\begin{example}\rm We use the solution formula~\eqref{eq:sol_formula_scalltv} to solve the equation,
\[
\dot{x} = (\sin t) x,\quad x(0)=x_0.
\]
We have
\begin{eqnarray*}
x(t) &=& e^{\int_0^t a(\tau)  d\tau}x_0\\
&=& x_0  e^{\int_0^t \sin (\tau)  d\tau}\\
&=& x_0\left. e^{-\cos t} \right\arrowvert^t_0\\
&=&  e^{-\cos t +1 } x_0\\
&=&  e \times e ^{-\cos t} x_0 .
\end{eqnarray*}
\end{example}\markex


The solution formula~\eqref{eq:sol_formula_scalltv} does not generalize to the multi-dimensional case because, in general,
\[
\frac{d}{dt} e^{\int_0^t \b A(\tau) d \tau} \ne \b A(t) e^{\int_0^t \b A(\tau) d \tau}.
\]
If, however, $\b A(t)$ and $\int_0^t \b A(\tau) d \tau$ commute, then the solution to~\eqref{eq:LTV_uncontrolled} can be written as
\[
\b x(t) = e^{\int_0^t \b A(\tau) d \tau} \b x(0) .
\]
We note that $\b A(t)$ and $\int_0^t \b A(\tau) d \tau$ commute if
\[
\b A(t)\b A(s) = \b A(s) \b A(t) .
\]

We now analyze a general case when $t_0$ is not necessarily equal to $0$. If $\b A(t)=\b A$ in~\eqref{eq:LTV_uncontrolled}, then the solution is
\[
\b x(t) = e^{\b A (t - t_0)}\b x(t_0).
\]
We re-write the above as
\[
\b x(t) = e^{\b A t} e^{- \b A t_0}\b x(t_0).
\]
Let $\b X(t)=e^{\b A t}$, then
\[
\b X(t_0)^{-1} = e^{- \b A t_0}
\]
and we represent the solution as
\begin{eqnarray}
\b x(t)&=& \b X(t)\b X(t_0)^{-1} \b x(t_0)\nonumber\\
&=& \b{\Phi} (t, t_0) \b x(t_0),
\label{eq:stae_tran_matr_general}
\end{eqnarray}
where $\b{\Phi} (t, t_0)$ is the state transition matrix.
\begin{defn}
Let $\b X(t)$ be a fundamental matrix of~\eqref{eq:LTV_uncontrolled}. Then
\[
\b{\Phi} (t, t_0)=\b X(t)\b X(t_0)^{-1}
\]
is the state transition matrix of~\eqref{eq:LTV_uncontrolled}. The state transition matrix is the unique solution of
\[
\frac{\partial}{\partial t}\b{\Phi} (t, t_0) = \b A(t) \b{\Phi} (t, t_0),\quad \b{\Phi} (t_0, t_0)=\b I_n .
\]
\end{defn}

As in the LTI case, the state transition matrix in the LTV case has the following properties (see Exercise~\ref{ex:state_trns_propos}):
\begin{eqnarray}
\b{\Phi} (\tau, \tau) &=& \b I_n \label{eq:state_trans_prop1}\\
\b{\Phi} (t, \tau)^{-1} &=& \b{\Phi} (\tau, t) \label{eq:state_trans_prop2}\\
\b{\Phi} (t, t_0)&=& \b{\Phi} (t, t_1)\b{\Phi} (t_1, t_0) \label{eq:state_trans_prop3}\\
\frac{\partial}{\partial \tau}\b{\Phi} (t, \tau) &=& - \b{\Phi} (t, \tau) \b A(\tau), \mb{  for all   } t, \tau \label{eq:state_trans_prop4}
\end{eqnarray}
The third of the above properties is referred to as the {\em semigroup property}.


\begin{example}\rm The state transition matrix of
\[
\dot{x}=(\sin t) x, \quad x(t_0)=x_0,
\]
has the form
\begin{eqnarray*}
\Phi(t, t_0) &=& X(t)X(t_0)^{-1}\\
&=& \frac{e^{-\cos t + 1}}{e^{-\cos t_0 + 1}}.
\end{eqnarray*}
\end{example}
\markex
\begin{example}\rm We construct the state transition matrix for the LTV system,
\[
\dot{\b x} = \left[\begin{array}{cc}
0 & -t\\
0 & 0
\end{array}\right]\b x,\quad \b x(0)=\b x(0).
\]
The above system consists of two first-order linear differential equations,
\[
\dot{x}_1 = -t x_2,\quad\mb{and}\quad \dot{x}_2=0.
\]
We can easily obtain the solution to the second of the above equations,
\begin{equation}
x_2(t) = x_2(0).
\label{eq:sol_to_sec_eq}
\end{equation}
We next obtain the solution to $\dot{x}_1 = -t x_2$ by integrating its both sides,
\begin{eqnarray}
x_1(t) &=& x_1(0) - \int_0^t \tau x_2(0) d \tau\nonumber\\
&=& x_1(0) - \frac{t^2 x_2(0)}{2}.
\label{eq:sol_to_first_eq}
\end{eqnarray}
We can  now construct a fundamental matrix. Let
\[
\b x^{(1)}(0)=\left[\begin{array}{c}
1\\
1
\end{array}\right]\quad\mb{and}\quad \b x^{(2)}(0)=\left[\begin{array}{c}
0\\
1
\end{array}\right].
\]
Then using~\eqref{eq:sol_to_first_eq} and~\eqref{eq:sol_to_sec_eq}, we obtain the fundamental matrix corresponding to the above initial conditions is
\begin{eqnarray*}
\b X(t) &=& \left[\begin{array}{cc}
\b x^{(1)}(t) & \b x^{(2)}(t)
\end{array}\right]\\
&=& \left[\begin{array}{cc}
1-\frac{t^2}{2} & -\frac{t^2}{2}\\
1 & 1
\end{array}\right].
\end{eqnarray*}

If we select the initial conditions
\[
\b x^{(1)}(0)=\left[\begin{array}{c}
1\\
0
\end{array}\right]\quad\mb{and}\quad \b x^{(2)}(0)=\left[\begin{array}{c}
0\\
1
\end{array}\right]
\]
then we obtain a different fundamental matrix,
\[
\b X(t)= \left[\begin{array}{cc}
1 & -\frac{t^2}{2}\\
0 & 1
\end{array}\right].
\]
The state transition matrix, however, is unique and has the form
\begin{eqnarray*}
\b{\Phi}(t, t_0) &=& \b X(t) \b X (t_0)^{-1}\\
&=& \left[\begin{array}{cc}
1-\frac{t^2}{2} & -\frac{t^2}{2}\\
1 & 1
\end{array}\right]\left[\begin{array}{cc}
1-\frac{t_0^2}{2} & -\frac{t_0^2}{2}\\
1 & 1
\end{array}\right]^{-1}\\
&=& \left[\begin{array}{cc}
1-\frac{t^2}{2} & -\frac{t^2}{2}\\
1 & 1
\end{array}\right]\left[\begin{array}{cc}
1 & \frac{t_0^2}{2}\\
-1 & 1-\frac{t_0^2}{2}
\end{array}\right]\\
&=& \left[\begin{array}{cc}
1 & \frac{1}{2}(t_0^2-t^2)\\
0 & 1
\end{array}\right].
\end{eqnarray*}
\end{example}
\markex

\begin{example}\rm We construct the state-transition matrix for the LTV system model found in Luenberger~\cite[p.~115]{luenberger79},
\[
\dot{\b x}=\left[\begin{array}{cc}
0 & 0\\
t & \frac{1}{t}
\end{array}\right]\b x, \quad t \ge 1 .
\]
Then, for the given $\b x(2)=\left[\begin{array}{cc}
2 & -1
\end{array}\right]^{\top}$, we compute $\b x(1)$.

First, we solve for $x_1$ to obtain,
\[
x_1(t)=x_1(1), \quad t\ge 1
\]
Substituting the above into the equation for $\dot{x}_2$ gives
\[
\dot{x}_2 = t x_1(t) + \frac{x_2(t)}{t}.
\]
Next, we make the substitution
\[
z(t)=\frac{x_2(t)}{t}.
\]
Computing the derivative of $z(t)$ yields
\begin{eqnarray*}
\dot{z} &=& \frac{\dot{x}_2 t -x_2}{t^2}\\
&=& \frac{\dot{x}_2}{t}-\frac{x_2}{t^2}.
\end{eqnarray*}
Multiplying both sides of the above by $t$, we obtain
\begin{eqnarray}
t\dot{z} &=& \dot{x}_2 - \frac{x_2}{t^2}\nonumber\\
&=& \dot{x}_2 -z.
\label{eq:expr_for_tzdot}
\end{eqnarray}
We substitute $\dot{x}_2 = t x_1(1) + z$ into~\ref{eq:expr_for_tzdot}  to obtain
\[
t\dot{z}+z=t x_1(1) + z,
\]
that is,
\[
\dot{z}=x_1(1).
\]
Integrating the above from $1$ to $t$ gives
\[
z(t)=z(1)+x_1(1)(t-1).
\]
Therefore,
\begin{eqnarray*}
z &=& \frac{x_2}{t}\\
&=&z(1)+x_1(1)(t-1),
\end{eqnarray*}
and multiplying both sides by $t$, we obtain
\[
x_2(t)=t x_2(1) + t x_1(1) (t-1).
\]
We are now ready to generate a fundamental matrix. Let
\[
\b x^{(1)}(1)=\left[\begin{array}{c}
1\\
0
\end{array}\right]\quad\mb{and}\quad \b x^{(2)}(1)=\left[\begin{array}{c}
0\\
1
\end{array}\right],
\]
then we have
\[
\b x^{(1)}(t)=\left[\begin{array}{c}
1\\
t^2-t
\end{array}\right]\quad\mb{and}\quad \b x^{(2)}(t)=\left[\begin{array}{c}
0\\
t
\end{array}\right].
\]
The fundamental matrix corresponding to the above initial conditions is
\[
\b X(t) = \left[\begin{array}{cc}
\b x^{(1)}(t) & \b x^{(2)}(t)
\end{array}\right]
= \left[\begin{array}{cc}
1 & 0\\
t^2-t & t
\end{array}\right].
\]
The state transition matrix is
\begin{eqnarray*}
\b{\Phi}(t,\tau) &=& \b X(t)\b X(\tau)^{-1}\\
&=& \left[\begin{array}{cc}
1 & 0\\
t^2-t & t
\end{array}\right]\left[\begin{array}{cc}
1 & 0\\
\tau^2-\tau & \tau
\end{array}\right]^{-1}\\
&=& \left[\begin{array}{cc}
1 & 0\\
t^2-t & t
\end{array}\right]\left[\begin{array}{cc}
1 & 0\\
-\tau + 1& \frac{1}{\tau}
\end{array}\right]\\
&=& \left[\begin{array}{cc}
1 & 0\\
t(t-\tau) & \frac{t}{\tau}
\end{array}\right].
\end{eqnarray*}
Note that
\[
\b x(t)=\b{\Phi}(t,\tau)\b x(\tau).
\]
Thus, for example, if we are given $\b x(2)=\left[\begin{array}{cc}
2 & -1
\end{array}\right]^{\top}$ and we wish to find $\b x(1)$, we have,
\begin{eqnarray*}
\b x(1) &=& \b{\Phi}(1,2)\b x(2)\\
&=& \left[\begin{array}{cc}
1 & 0\\
-1 & \frac{1}{2}
\end{array}\right]\left[\begin{array}{c}
2\\
-1
\end{array}\right]\\
&=& \left[\begin{array}{c}
2\\
-\frac{5}{2}
\end{array}\right].
\end{eqnarray*}
\end{example}
\markex





\section{Solving the LTV Controlled System}

We now discuss the problem of obtaining the solution to the LTV controlled system
\begin{equation}
\dot{\b x}=\b A(t)\b x + \b B(t)\b u,\quad \b x(t_0)=\b x_0 .
\label{eq:ltv_control_syst}
\end{equation}
We claim that, by analogy with the LTI controlled system, the solution to~\eqref{eq:ltv_control_syst} is
\begin{equation}
\b x(t) = \b{\Phi}(t,t_0)\b x_0 + \int_{t_0}^t \b{\Phi}(t,\tau)\b B(\tau) \b u(\tau) d \tau .
\label{eq:sol_lvi_co_sys}
\end{equation}
We can prove our claim by verification utilizing Leibniz's rule (see Exercise~\ref{exer:leibnitzs_rule}),
\begin{equation}
\frac{\partial}{\partial t} \int_{t_0}^t f(t, \tau) d \tau = \int_{t_0}^t \left(\frac{\partial}{\partial t} f(t,\tau)  \right) d \tau + \left. f(t, \tau)  \right\arrowvert_{\tau = t}
\label{eq:leibnitzs_rule}
\end{equation}
\begin{example}[R. A. DeCarlo]\rm The LTV state model,
\[
\dot{\b x}(t) = \b A(t)\b x(t) + \left[\begin{array}{c}
\pi e^{-\alpha(t)^2}\\
0
\end{array}\right] u(t),
\]
has associated state transition matrix
\[
\b{\Phi}(t,\tau)=e^{\alpha(\tau)^2 - \alpha(t)^2}\left[\begin{array}{cc}
1 & 0\\
\cos (\pi t) - \cos (\pi \tau) & 1
\end{array}\right],
\]
where $\alpha(\cdot)$ is a continuous function.
\begin{enumerate}
\item Compute $\b A(t)$ using the given state transition matrix.
\item Find the zero-state response when the input $u(t)$ is the unit step.
\end{enumerate}

We first compute $\b A(t)$ using the given state transition matrix. We use the state transition matrix properties to accomplish this. Recall that the state transition matrix satisfies the equation
\[
\frac{\partial}{\partial t}\b{\Phi} (t, \tau) = \b A(t) \b{\Phi} (t, \tau),\quad \b{\Phi} (\tau, \tau)=\b I_n .
\]
Note that, we can also write.
\[
\left.\b{\Phi}(t,\tau)\right\arrowvert_{\tau = t}=\b I_n
\]
Taking this into account, we obtain
\[
\b A(t) = \left. \frac{\partial}{\partial t}\b{\Phi} (t, \tau)\right\arrowvert_{\tau = t}.
\]
To proceed, we first evaluate
\begin{eqnarray*}
\left.\frac{\partial}{\partial t} e^{\alpha(\tau)^2 - \alpha(t)^2}\right\arrowvert_{\tau = t} &=& \left. e^{\alpha(\tau)^2 - \alpha(t)^2}(-2\alpha(t)\dot{\alpha}(t))\right\arrowvert_{\tau = t}\\
&=& -2\alpha(t)\dot{\alpha}(t).
\end{eqnarray*}
We next evaluate the derivative
\begin{eqnarray*}
\left.\frac{\partial}{\partial t} \left(e^{\alpha(\tau)^2 - \alpha(t)^2}\left(\cos (\pi t) - \cos (\pi \tau)\right)\right)\right\arrowvert_{\tau = t} &=& -2\alpha(t)\dot{\alpha}(t)(\cos (\pi t) - \cos (\pi t)) - \pi \sin (\pi t)\\
&=& - \pi \sin (\pi t).
\end{eqnarray*}
Hence
\begin{eqnarray*}
\b A(t) &=& \left. \frac{\partial}{\partial t}\b{\Phi} (t, \tau)\right\arrowvert_{\tau = t}\\
&=& \left[\begin{array}{cc}
-2\alpha(t)\dot{\alpha}(t) & 0\\
-\pi \sin (\pi t) & -2\alpha(t)\dot{\alpha}(t)
\end{array}\right].
\end{eqnarray*}

We now compute the zero-state response. The formula for the zero-state response is obtained from~\eqref{eq:sol_lvi_co_sys} by setting $\b x_0 = \b 0$,
\[
\b x(t) = \int_{t_0}^t \b{\Phi}(t,\tau)\b B(\tau) \b u(\tau) d \tau .
\]
We first compute the integrand
\begin{eqnarray*}
\b{\Phi}(t,\tau)\b B(\tau) &=& e^{\alpha(\tau)^2 - \alpha(t)^2}\left[\begin{array}{cc}
1 & 0\\
\cos (\pi t) - \cos (\pi \tau) & 1
\end{array}\right]\left[\begin{array}{c}
\pi e^{-\alpha(\tau)^2}\\
0
\end{array}\right]\\
&=& \pi e^{-\alpha(t)^2}\left[\begin{array}{c}
1\\
\cos (\pi t) - \cos (\pi \tau)
\end{array}\right].
\end{eqnarray*}
Therefore, the zero-state response when $u(t) = 1(t)$ is
\begin{eqnarray*}
\b x(t) &=& \int_{t_0}^t \b{\Phi}(t,\tau)\b B(\tau) \b u(\tau) d \tau\\
&=& \pi e^{-\alpha(t)^2}\int_0^t\left[\begin{array}{c}
1\\
\cos (\pi t) - \cos (\pi \tau)
\end{array}\right] d \tau\\
&=& \pi e^{-\alpha(t)^2}\left[\begin{array}{c}
t\\
t\cos (\pi t) - \frac{\sin (\pi \tau)}{\pi}
\end{array}\right].
\end{eqnarray*}
\end{example}\markex

\section{Notes} For additional information on the fundamentals of the LTV systems, we recommend Kamen~\cite{kamen96}. An in-depth treatment of the LTV systems can be found in Rugh~\cite{rugh96}, and in Antsaklis and Michel~\cite{antsaklis07}. For results on observers for LTV systems, see O'Reilly~\cite{oreilly83}. A novel approach to the analysis and control of LTV systems is proposed by Bourl{\`{e}}s and Marinescu~\cite{bourles11}.

\section{Exercises}


\begin{exercise}\label{ex:non_sing_fundm}\rm Prove that a fundamental matrix is nonsingular for any t.
\end{exercise}


\begin{exercise}\label{ex:using contraction}\rm Use the Contraction Map Theorem~\ref{thm:contramap} to prove that~\eqref{eq:LTV_uncontrolled} has a unique solution going through $\b x_0$ at $t=t_0$, where $t_0$  is an element of a finite time interval $[a, \;b]$. (Start with the Lipschitz condition.)
\end{exercise}

\begin{exercise}\rm\begin{itemize}\item[{\bf (a)}] Find the state-transition matrix $\b{\Phi}(t, \tau)$ associated with a homogenous LTI system with
    \[
    \b A=\b T\left[\begin{array}{cc}
    -2 & 0\\
    0 & 0
    \end{array}\right]\b T^{-1},
    \]
where
\[
\b T=\left[\begin{array}{cc}
1 & 0\\
-3 & 1
\end{array}\right].
\]
\item[{\bf (b)}] Find the state-transition matrix $\b{\Phi}(t, \tau)$ associated with a homogenous LTV system with
    \[
    \b A(t)=\b T\left[\begin{array}{cc}
    -2  & 0\\
    0 & \cos t
    \end{array}\right]\b T^{-1},
    \]
where
\[
\b T=\left[\begin{array}{cc}
1 & 0\\
-3 & 1
\end{array}\right].
\]
\end{itemize}

\end{exercise}
\begin{exercise}\rm Compute the state transition matrix $\b{\Phi}(t,\tau)$ for the linear time-varying (LTV) system model,
\[
\dot{\b x}(t)=\left[\begin{array}{cc}
0 & 0\\
1 & \frac{1}{t}
\end{array}\right]\b x(t)
\]
defined for $t\ge 1$.
Then, for the given $\b x(2)=\left[\begin{array}{cc}
    0 & 4
    \end{array}\right]^{\top}$, compute $\b x(1)$.
%We have two linear time-varying differential equations,
%\begin{eqnarray*}
%\dot{x}_1 &=& 0\\
%\dot{x}_2 &=& x_1 +\frac{x_2}{t}.
%\end{eqnarray*}
%The solution to the first of the above equations is
%\[
%x_1(t)=x_1(1).
%\]
%To solve the second equation, we make a substitution,
%\[
%z=\frac{x_2}{t}.
%\]
%Differentiating both sides of the above gives
%\[
%\dot{z}=\frac{\dot{x}_2}{t}-\frac{x_2}{t^2}.
%\]
%Rearranging the terms, then multiplying both sides by $t$ and finally taking into account the substitution, we obtain
%\[
%\dot{x}_2=t\dot{z}+z.
%\]
%Hence,
%\[
%\dot{x}_2=t\dot{z}+z=x_1(1)+z
%\]
%and therefore,
%\[
%\dot{z}=\frac{x_1(1)}{t}.
%\]
%Integrating the above gives
%\[
%z(t)=z(1)+x_1(1)\ln t.
%\]
%Hence
%\[
%x_2(t)=tx_2(1) + x_1(1) t \ln t.
%\]
%Let
%\[
%\b x^{(1)}(1)=\left[\begin{array}{c}
%1\\
%0
%\end{array}\right]\quad\mb{and}\quad \b x^{(2)}(1)=\left[\begin{array}{c}
%0\\
%1
%\end{array}\right].
%\]
%Then we obtain a fundamental matrix
%\[
%\b X(t)=\left[\begin{array}{cc}
%1 & 0\\
%t\ln t & t
%\end{array}\right].
%\]
%The state transition matrix is
%\begin{eqnarray*}
%\b{\Phi}(t,\tau)&=&\b X(t)\b X(\tau)^{-1}\\
%&=& \left[\begin{array}{cc}
%1 & 0\\
%t\ln t & t
%\end{array}\right]\left[\begin{array}{cc}
%1 & 0\\
%-\ln \tau & \frac{1}{\tau}
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%1 & 0\\
%t\ln t-t \ln \tau & \frac{t}{\tau}
%\end{array}\right].
%\end{eqnarray*}
%
%
%For the given $\b x(2)=\left[\begin{array}{cc}
%    0 & 4
%    \end{array}\right]^{\top}$, we compute $\b x(1)$.
%
%We have
%\begin{eqnarray*}
%\b x(1) &=& \b{\Phi}(1,2)\b x(2)\\
%&=& \left[\begin{array}{cc}
%1 & 0\\
%-\ln 2 & \frac{1}{2}
%\end{array}\right]\left[\begin{array}{c}
%0\\
%4
%\end{array}\right]\\
%&=& \left[\begin{array}{c}
%0\\
%2
%\end{array}\right].
%\end{eqnarray*}
\end{exercise}

\begin{exercise}\label{ex:state_trns_propos}\rm Use the definition of the state transition matrix to prove its properties~\eqref{eq:state_trans_prop1}, \eqref{eq:state_trans_prop2}, \eqref{eq:state_trans_prop3}, and \eqref{eq:state_trans_prop4}.
\end{exercise}

\begin{exercise}\rm \begin{itemize}\item[{\bf (a)}] The value of the state-transition matrix for a homogeneous linear system is
    \[
    \b{\Phi}(1, 3)=\left[\begin{array}{cc}
    1 & 1\\
    1 & 2
    \end{array}\right].
    \]
Find $\b x(3)$ when
\[
\b x(1)=\left[\begin{array}{c}
1\\
3
\end{array}\right].
\]
\item[{\bf (b)}] The values of the state-transition matrix for a homogeneous linear system is
    \[
    \b{\Phi}(1, 3)=\left[\begin{array}{cc}
    1 & 1\\
    1 & 2
    \end{array}\right]\quad\mb{and}\quad \b{\Phi}(2, 3)=\left[\begin{array}{cc}
    2 & 3\\
    4 & 5
    \end{array}\right].
    \]
If
\[
\b x(1)=\left[\begin{array}{c}
2\\
-3
\end{array}\right],
\]
find $\b x(2)$.

\end{itemize}
\end{exercise}

\begin{exercise}\label{exer:leibnitzs_rule}\rm Derive Leibniz's rule given by~\eqref{eq:leibnitzs_rule}.
\end{exercise}

\begin{exercise}\rm \begin{itemize}
\item[{\bf (a)}] The state-transition matrix of a homogenous LTV system is
    \[
    \b{\Phi}(t,\tau)=\left[\begin{array}{cc}
    e^{\cos t - \cos \tau} & 0\\
    0 & e^{-\sin t +\sin \tau}
    \end{array}\right].
    \]
    Find the associated $\b A(t)$-matrix.

\item[{\bf (b)}] A fundamental matrix associated with a homogenous continuous-time LTV state model has the form,
    \[
    \b X(t)=\left[\begin{array}{cc}
    2 & -1\\
    -1 & 1
    \end{array}\right]\left[\begin{array}{cc}
    1 & 0\\
    t^2-t & t
    \end{array}\right].
    \]
    Compute the state-transition matrix $\b{\Phi}(t, \tau)$.
\end{itemize}
\end{exercise}

\begin{exercise}[J. Hu]\label{fw4_ltv_F2010}\rm For the linear time-invariant (LTV) system model,
\[
\dot{\b x}(t) = \left[\begin{array}{cc}
-e^{-t} & \frac{1}{t+1}\\
0 & -e^{-t}
\end{array}\right]\b x(t),
\]
\begin{itemize}
\item Find the state transition matrix $\b{\Phi}(t,\tau)$,
    \item Is the system asymptotically stable?
    \item Let $\b x(0)=\left[\begin{array}{cc}
    1 & 0
    \end{array}\right]^{\top}$. Will the system trajectory $\b x(t)$ stay bounded as $t\to \infty$?
\end{itemize}
\end{exercise}

\begin{exercise}[R. Balakrishnan]\label{fw5_ltv_F2010}\rm
%    \begin{figure}[h]
%\centering
%\includegraphics[scale=0.75]{Fwk4p1.eps}
%\caption{Block diagram of a DC motor system for Exercise~\ref{fw4p1dc}.}
%\label{fig:Fwk4p1}
%\end{figure}
For the linear time-varying (LTV) system model,
\[
\dot{\b x}(t)=\left[\begin{array}{cc}
0 & -2t\\
0 & -t
\end{array}\right]\b x(t) + \left[\begin{array}{c}
0\\
t
\end{array}\right]u(t),
\]
\begin{itemize}
\item Find the state transition matrix $\b{\Phi}(t,\tau)$;
    \item Let $\b x(1)=\left[\begin{array}{cc}
    1 & 1
    \end{array}\right]^{\top}$ and $u(t)=0$ for $t\ge 0$. Find $\b x(0)$;
\item Let $\b x(0)=\b 0$ and $u(t)=1$ for $t\ge 0$. Find $\b x(t)$ for $t\ge 0$.
\end{itemize}

\end{exercise}
\bibliography{Root2}
\bibliographystyle{plain}
\end{document}
