├── Slides ├── Laplace │ ├── fig1.tex │ ├── main.pdf │ ├── sine.png │ ├── step.png │ ├── Autonomous.png │ ├── settings.tex │ └── main.tex ├── Introduction │ ├── fig1.tex │ ├── main.pdf │ ├── Picture1.jpg │ ├── Picture2.jpg │ ├── settings.tex │ └── main.tex ├── Stability │ ├── fig1.tex │ ├── main.pdf │ ├── Stability.PNG │ ├── settings.tex │ └── main.tex ├── Control │ ├── main.pdf │ ├── fig1.tex │ └── settings.tex ├── Discrete │ ├── ZOH.PNG │ ├── main.pdf │ ├── fig1.tex │ ├── settings.tex │ └── main.tex ├── HJB_LQR │ ├── main.pdf │ ├── settings.tex │ └── main.tex ├── NullRow │ ├── main.pdf │ ├── settings.tex │ └── main.tex ├── Observer │ ├── main.pdf │ ├── qrcode.png │ ├── settings.tex │ └── main.tex ├── Constrained │ ├── main.pdf │ ├── pic1.jpg │ ├── pic2.jpg │ └── settings.tex ├── ColumnLeftNull │ ├── main.pdf │ ├── settings.tex │ └── main.tex ├── Linearization │ ├── main.pdf │ ├── settings.tex │ └── main.tex ├── LyapunovTheory │ ├── main.pdf │ ├── settings.tex │ └── main.tex └── ControllabilityObservability │ ├── main.pdf │ ├── settings.tex │ └── main.tex ├── ColabNotebooks ├── README.md ├── Lab2_Control2021.pdf ├── lecture8_LyapunovEq.ipynb └── practice_08_la_applications.ipynb ├── .gitattributes ├── README.md └── .github └── workflows └── main.yml /Slides/Laplace/fig1.tex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Slides/Introduction/fig1.tex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Slides/Stability/fig1.tex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ColabNotebooks/README.md: -------------------------------------------------------------------------------- 1 | Commit colab notebooks here -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This a legacy repository, refer to the latest course repository for up-to-date slides. 2 | -------------------------------------------------------------------------------- /Slides/Control/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Control/main.pdf -------------------------------------------------------------------------------- /Slides/Discrete/ZOH.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Discrete/ZOH.PNG -------------------------------------------------------------------------------- /Slides/Discrete/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Discrete/main.pdf -------------------------------------------------------------------------------- /Slides/HJB_LQR/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/HJB_LQR/main.pdf -------------------------------------------------------------------------------- /Slides/Laplace/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Laplace/main.pdf -------------------------------------------------------------------------------- /Slides/Laplace/sine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Laplace/sine.png -------------------------------------------------------------------------------- /Slides/Laplace/step.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Laplace/step.png -------------------------------------------------------------------------------- /Slides/NullRow/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/NullRow/main.pdf -------------------------------------------------------------------------------- /Slides/Observer/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Observer/main.pdf -------------------------------------------------------------------------------- /Slides/Stability/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Stability/main.pdf -------------------------------------------------------------------------------- /Slides/Constrained/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Constrained/main.pdf -------------------------------------------------------------------------------- /Slides/Constrained/pic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Constrained/pic1.jpg -------------------------------------------------------------------------------- /Slides/Constrained/pic2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Constrained/pic2.jpg -------------------------------------------------------------------------------- /Slides/Observer/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Observer/qrcode.png -------------------------------------------------------------------------------- /Slides/ColumnLeftNull/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/ColumnLeftNull/main.pdf -------------------------------------------------------------------------------- /Slides/Introduction/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Introduction/main.pdf -------------------------------------------------------------------------------- /Slides/Laplace/Autonomous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Laplace/Autonomous.png -------------------------------------------------------------------------------- /Slides/Linearization/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Linearization/main.pdf -------------------------------------------------------------------------------- /Slides/LyapunovTheory/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/LyapunovTheory/main.pdf -------------------------------------------------------------------------------- /Slides/Stability/Stability.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Stability/Stability.PNG -------------------------------------------------------------------------------- /Slides/Introduction/Picture1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Introduction/Picture1.jpg -------------------------------------------------------------------------------- /Slides/Introduction/Picture2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/Introduction/Picture2.jpg -------------------------------------------------------------------------------- /ColabNotebooks/Lab2_Control2021.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/ColabNotebooks/Lab2_Control2021.pdf -------------------------------------------------------------------------------- /Slides/ControllabilityObservability/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SergeiSa/Control-Theory-Slides-Spring-2021/HEAD/Slides/ControllabilityObservability/main.pdf -------------------------------------------------------------------------------- /Slides/Control/fig1.tex: -------------------------------------------------------------------------------- 1 | \begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1] 2 | %uncomment if require: \path (0,300); %set diagram left start at 0, and has height of 300 3 | 4 | %Curve Lines [id:da30536133686207734] 5 | \draw (64,75.5) .. controls (89,164.5) and (149,214.5) .. (189,75.5) ; 6 | %Shape: Ellipse [id:dp4415951216622267] 7 | \draw (64,75.5) .. controls (64,66.66) and (91.98,59.5) .. (126.5,59.5) .. controls (161.02,59.5) and (189,66.66) .. (189,75.5) .. controls (189,84.34) and (161.02,91.5) .. (126.5,91.5) .. controls (91.98,91.5) and (64,84.34) .. (64,75.5) -- cycle ; 8 | %Straight Lines [id:da051968201891894994] 9 | \draw (129,162.5) -- (149,162.5) -- (179,162.5) ; 10 | \draw [shift={(181,162.5)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; 11 | %Straight Lines [id:da7438703353064577] 12 | \draw (129,162.5) -- (95.82,177.67) ; 13 | \draw [shift={(94,178.5)}, rotate = 335.43] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; 14 | %Curve Lines [id:da6434383410127575] 15 | \draw (388.02,247.45) .. controls (358.77,159.75) and (296.44,112.69) .. (263.16,253.45) ; 16 | %Shape: Ellipse [id:dp7059106277690401] 17 | \draw (388.02,247.45) .. controls (388.44,256.28) and (360.83,264.78) .. (326.35,266.43) .. controls (291.88,268.09) and (263.58,262.27) .. (263.16,253.45) .. controls (262.74,244.62) and (290.34,236.12) .. (324.82,234.47) .. controls (359.3,232.81) and (387.59,238.62) .. (388.02,247.45) -- cycle ; 18 | %Straight Lines [id:da45308326182855585] 19 | \draw (315,163.5) -- (284.85,175.75) ; 20 | \draw [shift={(283,176.5)}, rotate = 337.89] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; 21 | %Straight Lines [id:da2463038465244929] 22 | \draw (315,163.5) -- (335,163.5) -- (365,163.5) ; 23 | \draw [shift={(367,163.5)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; 24 | 25 | % Text Node 26 | \draw (100,106) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle V(\mathbf{x}) >0$}; 27 | % Text Node 28 | \draw (292,199) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \dot{V}(\mathbf{x}) < 0$}; 29 | % Text Node 30 | \draw (176,165.4) node [anchor=north west][inner sep=0.75pt] {$x_{1}$}; 31 | % Text Node 32 | \draw (101,179.4) node [anchor=north west][inner sep=0.75pt] {$x_{2}$}; 33 | % Text Node 34 | \draw (361,137.4) node [anchor=north west][inner sep=0.75pt] {$x_{1}$}; 35 | % Text Node 36 | \draw (270,148.4) node [anchor=north west][inner sep=0.75pt] {$x_{2}$}; 37 | 38 | 39 | \end{tikzpicture} 40 | 41 | 42 | -------------------------------------------------------------------------------- /Slides/Discrete/fig1.tex: -------------------------------------------------------------------------------- 1 | \begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1] 2 | %uncomment if require: \path (0,300); %set diagram left start at 0, and has height of 300 3 | 4 | %Curve Lines [id:da30536133686207734] 5 | \draw (64,75.5) .. controls (89,164.5) and (149,214.5) .. (189,75.5) ; 6 | %Shape: Ellipse [id:dp4415951216622267] 7 | \draw (64,75.5) .. controls (64,66.66) and (91.98,59.5) .. (126.5,59.5) .. controls (161.02,59.5) and (189,66.66) .. (189,75.5) .. controls (189,84.34) and (161.02,91.5) .. (126.5,91.5) .. controls (91.98,91.5) and (64,84.34) .. (64,75.5) -- cycle ; 8 | %Straight Lines [id:da051968201891894994] 9 | \draw (129,162.5) -- (149,162.5) -- (179,162.5) ; 10 | \draw [shift={(181,162.5)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; 11 | %Straight Lines [id:da7438703353064577] 12 | \draw (129,162.5) -- (95.82,177.67) ; 13 | \draw [shift={(94,178.5)}, rotate = 335.43] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; 14 | %Curve Lines [id:da6434383410127575] 15 | \draw (388.02,247.45) .. controls (358.77,159.75) and (296.44,112.69) .. (263.16,253.45) ; 16 | %Shape: Ellipse [id:dp7059106277690401] 17 | \draw (388.02,247.45) .. controls (388.44,256.28) and (360.83,264.78) .. (326.35,266.43) .. controls (291.88,268.09) and (263.58,262.27) .. (263.16,253.45) .. controls (262.74,244.62) and (290.34,236.12) .. (324.82,234.47) .. controls (359.3,232.81) and (387.59,238.62) .. (388.02,247.45) -- cycle ; 18 | %Straight Lines [id:da45308326182855585] 19 | \draw (315,163.5) -- (284.85,175.75) ; 20 | \draw [shift={(283,176.5)}, rotate = 337.89] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; 21 | %Straight Lines [id:da2463038465244929] 22 | \draw (315,163.5) -- (335,163.5) -- (365,163.5) ; 23 | \draw [shift={(367,163.5)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; 24 | 25 | % Text Node 26 | \draw (100,106) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle V(\mathbf{x}) >0$}; 27 | % Text Node 28 | \draw (292,199) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \dot{V}(\mathbf{x}) < 0$}; 29 | % Text Node 30 | \draw (176,165.4) node [anchor=north west][inner sep=0.75pt] {$x_{1}$}; 31 | % Text Node 32 | \draw (101,179.4) node [anchor=north west][inner sep=0.75pt] {$x_{2}$}; 33 | % Text Node 34 | \draw (361,137.4) node [anchor=north west][inner sep=0.75pt] {$x_{1}$}; 35 | % Text Node 36 | \draw (270,148.4) node [anchor=north west][inner sep=0.75pt] {$x_{2}$}; 37 | 38 | 39 | \end{tikzpicture} 40 | 41 | 42 | -------------------------------------------------------------------------------- /Slides/ColumnLeftNull/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | \newcommand{\bo}[1] {\mathbf{#1}} 78 | \newcommand{\R} {\mathbb{R}} 79 | 80 | 81 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 82 | % code settings 83 | 84 | \usepackage{listings} 85 | \usepackage{color} 86 | % \definecolor{mygreen}{rgb}{0,0.6,0} 87 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 88 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 89 | \lstset{ 90 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 91 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 92 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 93 | breaklines=true, % sets automatic line breaking 94 | captionpos=b, % sets the caption-position to bottom 95 | commentstyle=\color{mygreen}, % comment style 96 | deletekeywords={...}, % if you want to delete keywords from the given language 97 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 98 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 99 | firstnumber=0000, % start line enumeration with line 0000 100 | frame=single, % adds a frame around the code 101 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 102 | keywordstyle=\color{blue}, % keyword style 103 | language=Octave, % the language of the code 104 | morekeywords={*,...}, % if you want to add more keywords to the set 105 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 106 | numbersep=5pt, % how far the line-numbers are from the code 107 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 108 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 109 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 110 | showstringspaces=false, % underline spaces within strings only 111 | showtabs=false, % show tabs within strings adding particular underscores 112 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 113 | stringstyle=\color{mymauve}, % string literal style 114 | tabsize=2, % sets default tabsize to 2 spaces 115 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 116 | } 117 | 118 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 119 | % tikz settings 120 | 121 | \usepackage{tikz} 122 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/LyapunovTheory/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | \newcommand{\bo}[1] {\mathbf{#1}} 78 | \newcommand{\R} {\mathbb{R}} 79 | 80 | 81 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 82 | % code settings 83 | 84 | \usepackage{listings} 85 | \usepackage{color} 86 | % \definecolor{mygreen}{rgb}{0,0.6,0} 87 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 88 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 89 | \lstset{ 90 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 91 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 92 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 93 | breaklines=true, % sets automatic line breaking 94 | captionpos=b, % sets the caption-position to bottom 95 | commentstyle=\color{mygreen}, % comment style 96 | deletekeywords={...}, % if you want to delete keywords from the given language 97 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 98 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 99 | firstnumber=0000, % start line enumeration with line 0000 100 | frame=single, % adds a frame around the code 101 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 102 | keywordstyle=\color{blue}, % keyword style 103 | language=Octave, % the language of the code 104 | morekeywords={*,...}, % if you want to add more keywords to the set 105 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 106 | numbersep=5pt, % how far the line-numbers are from the code 107 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 108 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 109 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 110 | showstringspaces=false, % underline spaces within strings only 111 | showtabs=false, % show tabs within strings adding particular underscores 112 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 113 | stringstyle=\color{mymauve}, % string literal style 114 | tabsize=2, % sets default tabsize to 2 spaces 115 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 116 | } 117 | 118 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 119 | % tikz settings 120 | 121 | \usepackage{tikz} 122 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/Control/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | 78 | \DeclareMathOperator*{\argmin}{arg\,min} 79 | \newcommand{\bo}[1] {\mathbf{#1}} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/Discrete/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | 78 | \DeclareMathOperator*{\argmin}{arg\,min} 79 | \newcommand{\bo}[1] {\mathbf{#1}} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/Laplace/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | 78 | \DeclareMathOperator*{\argmin}{arg\,min} 79 | \newcommand{\bo}[1] {\mathbf{#1}} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/NullRow/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | 78 | \DeclareMathOperator*{\argmin}{arg\,min} 79 | \newcommand{\bo}[1] {\mathbf{#1}} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/Introduction/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | 78 | \DeclareMathOperator*{\argmin}{arg\,min} 79 | \newcommand{\bo}[1] {\mathbf{#1}} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/Stability/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | 78 | \DeclareMathOperator*{\argmin}{arg\,min} 79 | \newcommand{\bo}[1] {\mathbf{#1}} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/HJB_LQR/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | \newcommand{\bo}[1] {\mathbf{#1}} 78 | \newcommand{\R} {\mathbb{R}} 79 | \DeclareMathOperator*{\argmin}{arg\,min} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/Observer/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=true, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | \newcommand{\bo}[1] {\mathbf{#1}} 78 | \newcommand{\R} {\mathbb{R}} 79 | \DeclareMathOperator*{\argmin}{arg\,min} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} -------------------------------------------------------------------------------- /Slides/Constrained/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=false, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | \newcommand{\bo}[1] {\mathbf{#1}} 78 | \newcommand{\R} {\mathbb{R}} 79 | \DeclareMathOperator*{\argmin}{arg\,min} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} 124 | 125 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 126 | 127 | \usepackage{qrcode} 128 | -------------------------------------------------------------------------------- /Slides/Linearization/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=false, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | \newcommand{\bo}[1] {\mathbf{#1}} 78 | \newcommand{\R} {\mathbb{R}} 79 | \DeclareMathOperator*{\argmin}{arg\,min} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} 124 | 125 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 126 | 127 | \usepackage{qrcode} 128 | -------------------------------------------------------------------------------- /Slides/ControllabilityObservability/settings.tex: -------------------------------------------------------------------------------- 1 | \pdfmapfile{+sansmathaccent.map} 2 | 3 | 4 | \mode 5 | { 6 | \usetheme{Warsaw} % or try Darmstadt, Madrid, Warsaw, Rochester, CambridgeUS, ... 7 | \usecolortheme{seahorse} % or try seahorse, beaver, crane, wolverine, ... 8 | \usefonttheme{serif} % or try serif, structurebold, ... 9 | \setbeamertemplate{navigation symbols}{} 10 | \setbeamertemplate{caption}[numbered] 11 | } 12 | 13 | 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | % itemize settings 16 | 17 | \definecolor{mypink}{RGB}{255, 30, 80} 18 | \definecolor{mydarkblue}{RGB}{60, 160, 255} 19 | \definecolor{myblue}{RGB}{240, 240, 255} 20 | \definecolor{mygreen}{RGB}{0, 200, 0} 21 | \definecolor{mygreen2}{RGB}{245, 255, 230} 22 | \definecolor{mygray}{gray}{0.8} 23 | 24 | \setbeamertemplate{itemize items}[default] 25 | 26 | \setbeamertemplate{itemize item}{\color{mygreen}$\blacksquare$} 27 | \setbeamertemplate{itemize subitem}{\color{mydarkblue}$\blacktriangleright$} 28 | \setbeamertemplate{itemize subsubitem}{\color{mygray}$\blacksquare$} 29 | 30 | 31 | 32 | \setbeamercolor{palette quaternary}{fg=white,bg=mydarkblue} 33 | \setbeamercolor{titlelike}{parent=palette quaternary} 34 | 35 | \setbeamercolor{palette quaternary2}{fg=black,bg=myblue} 36 | \setbeamercolor{frametitle}{parent=palette quaternary2} 37 | 38 | 39 | 40 | \setbeamerfont{frametitle}{size=\Large,series=\scshape} 41 | \setbeamerfont{framesubtitle}{size=\normalsize,series=\upshape} 42 | 43 | 44 | 45 | 46 | 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % block settings 49 | 50 | \setbeamercolor{block title}{bg=red!30,fg=black} 51 | 52 | \setbeamercolor*{block title example}{bg=mygreen!40!white,fg=black} 53 | 54 | \setbeamercolor*{block body example}{fg= black, 55 | bg= mygreen2} 56 | 57 | 58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 59 | % URL settings 60 | \hypersetup{ 61 | colorlinks=false, 62 | linkcolor=blue, 63 | filecolor=blue, 64 | urlcolor=blue, 65 | } 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%% 68 | 69 | \renewcommand{\familydefault}{\rmdefault} 70 | 71 | \usepackage{amsmath} 72 | \usepackage{mathtools} 73 | 74 | 75 | \usepackage{subcaption} 76 | 77 | \newcommand{\bo}[1] {\mathbf{#1}} 78 | \newcommand{\R} {\mathbb{R}} 79 | \DeclareMathOperator*{\argmin}{arg\,min} 80 | 81 | 82 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 83 | % code settings 84 | 85 | \usepackage{listings} 86 | \usepackage{color} 87 | % \definecolor{mygreen}{rgb}{0,0.6,0} 88 | % \definecolor{mygray}{rgb}{0.5,0.5,0.5} 89 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 90 | \lstset{ 91 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument 92 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 93 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 94 | breaklines=true, % sets automatic line breaking 95 | captionpos=b, % sets the caption-position to bottom 96 | commentstyle=\color{mygreen}, % comment style 97 | deletekeywords={...}, % if you want to delete keywords from the given language 98 | escapeinside={\%*}{*)}, % if you want to add LaTeX within your code 99 | extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 100 | firstnumber=0000, % start line enumeration with line 0000 101 | frame=single, % adds a frame around the code 102 | keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) 103 | keywordstyle=\color{blue}, % keyword style 104 | language=Octave, % the language of the code 105 | morekeywords={*,...}, % if you want to add more keywords to the set 106 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) 107 | numbersep=5pt, % how far the line-numbers are from the code 108 | numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers 109 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) 110 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' 111 | showstringspaces=false, % underline spaces within strings only 112 | showtabs=false, % show tabs within strings adding particular underscores 113 | stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered 114 | stringstyle=\color{mymauve}, % string literal style 115 | tabsize=2, % sets default tabsize to 2 spaces 116 | title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title 117 | } 118 | 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 120 | % tikz settings 121 | 122 | \usepackage{tikz} 123 | \tikzset{every picture/.style={line width=0.75pt}} 124 | 125 | %%%%%%%%%%%%%%%%%%%%%%%%%%%% 126 | 127 | \usepackage{qrcode} 128 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build LaTeX document 2 | 3 | on: 4 | push: 5 | pull_request: 6 | types: 7 | - closed 8 | branches: 9 | - master 10 | 11 | 12 | 13 | jobs: 14 | build_latex: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Set up Git repository 18 | uses: actions/checkout@v2 19 | 20 | - name: Compile LaTeX document Introduction 21 | uses: xu-cheng/latex-action@master 22 | with: 23 | root_file: main.tex 24 | working_directory: Slides/Introduction/ 25 | 26 | - name: Compile LaTeX document Stability 27 | uses: xu-cheng/latex-action@master 28 | with: 29 | root_file: main.tex 30 | working_directory: Slides/Stability/ 31 | 32 | - name: Compile LaTeX document Laplace 33 | uses: xu-cheng/latex-action@master 34 | with: 35 | root_file: main.tex 36 | working_directory: Slides/Laplace/ 37 | 38 | - name: Compile LaTeX document Control 39 | uses: xu-cheng/latex-action@master 40 | with: 41 | root_file: main.tex 42 | working_directory: Slides/Control/ 43 | 44 | - name: Compile LaTeX document Discrete 45 | uses: xu-cheng/latex-action@master 46 | with: 47 | root_file: main.tex 48 | working_directory: Slides/Discrete/ 49 | 50 | - name: Compile LaTeX document NullRow 51 | uses: xu-cheng/latex-action@master 52 | with: 53 | root_file: main.tex 54 | working_directory: Slides/NullRow/ 55 | 56 | - name: Compile LaTeX document ColumnLeftNull 57 | uses: xu-cheng/latex-action@master 58 | with: 59 | root_file: main.tex 60 | working_directory: Slides/ColumnLeftNull/ 61 | 62 | - name: Compile LaTeX document LyapunovTheory 63 | uses: xu-cheng/latex-action@master 64 | with: 65 | root_file: main.tex 66 | working_directory: Slides/LyapunovTheory/ 67 | 68 | - name: Compile LaTeX document HJB_LQR 69 | uses: xu-cheng/latex-action@master 70 | with: 71 | root_file: main.tex 72 | working_directory: Slides/HJB_LQR/ 73 | 74 | - name: Compile LaTeX document Observer 75 | uses: xu-cheng/latex-action@master 76 | with: 77 | root_file: main.tex 78 | working_directory: Slides/Observer/ 79 | 80 | - name: Compile LaTeX document ControllabilityObservability 81 | uses: xu-cheng/latex-action@master 82 | with: 83 | root_file: main.tex 84 | working_directory: Slides/ControllabilityObservability/ 85 | 86 | - name: Compile LaTeX document Linearization 87 | uses: xu-cheng/latex-action@master 88 | with: 89 | root_file: main.tex 90 | working_directory: Slides/Linearization/ 91 | 92 | - name: Compile LaTeX document Constrained 93 | uses: xu-cheng/latex-action@master 94 | with: 95 | root_file: main.tex 96 | working_directory: Slides/Constrained/ 97 | 98 | 99 | 100 | 101 | 102 | 103 | - name: Save Introduction artifact 104 | uses: actions/upload-artifact@v1 105 | with: 106 | name: Introduction.pdf 107 | path: Slides/Introduction/main.pdf 108 | 109 | 110 | - name: Save Stability artifact 111 | uses: actions/upload-artifact@v1 112 | with: 113 | name: Stability.pdf 114 | path: Slides/Stability/main.pdf 115 | 116 | 117 | - name: Save Laplace artifact 118 | uses: actions/upload-artifact@v1 119 | with: 120 | name: Laplace.pdf 121 | path: Slides/Laplace/main.pdf 122 | 123 | - name: Save Control artifact 124 | uses: actions/upload-artifact@v1 125 | with: 126 | name: Control.pdf 127 | path: Slides/Control/main.pdf 128 | 129 | - name: Save Discrete artifact 130 | uses: actions/upload-artifact@v1 131 | with: 132 | name: Discrete.pdf 133 | path: Slides/Discrete/main.pdf 134 | 135 | - name: Save NullRow artifact 136 | uses: actions/upload-artifact@v1 137 | with: 138 | name: NullRow.pdf 139 | path: Slides/NullRow/main.pdf 140 | 141 | - name: Save ColumnLeftNull artifact 142 | uses: actions/upload-artifact@v1 143 | with: 144 | name: ColumnLeftNull.pdf 145 | path: Slides/ColumnLeftNull/main.pdf 146 | 147 | - name: Save LyapunovTheory artifact 148 | uses: actions/upload-artifact@v1 149 | with: 150 | name: LyapunovTheory.pdf 151 | path: Slides/LyapunovTheory/main.pdf 152 | 153 | - name: Save HJB_LQR artifact 154 | uses: actions/upload-artifact@v1 155 | with: 156 | name: HJB_LQR.pdf 157 | path: Slides/HJB_LQR/main.pdf 158 | 159 | - name: Save Observer artifact 160 | uses: actions/upload-artifact@v1 161 | with: 162 | name: Observer.pdf 163 | path: Slides/Observer/main.pdf 164 | 165 | - name: Save ControllabilityObservability artifact 166 | uses: actions/upload-artifact@v1 167 | with: 168 | name: ControllabilityObservability.pdf 169 | path: Slides/ControllabilityObservability/main.pdf 170 | 171 | - name: Save Linearization artifact 172 | uses: actions/upload-artifact@v1 173 | with: 174 | name: Linearization.pdf 175 | path: Slides/Linearization/main.pdf 176 | 177 | - name: Save Constrained artifact 178 | uses: actions/upload-artifact@v1 179 | with: 180 | name: Constrained.pdf 181 | path: Slides/Constrained/main.pdf 182 | 183 | 184 | 185 | 186 | - name: Update compiled PDFs in git repository 187 | if: github.event.pull_request.merged == true || github.event_name == 'push' 188 | run: | 189 | git config --global user.name 'CI PDF compiler' 190 | git config --global user.email '<>' 191 | git add Slides/Introduction/main.pdf 192 | git add Slides/Stability/main.pdf 193 | git add Slides/Laplace/main.pdf 194 | git add Slides/Control/main.pdf 195 | git add Slides/Discrete/main.pdf 196 | git add Slides/NullRow/main.pdf 197 | git add Slides/ColumnLeftNull/main.pdf 198 | git add Slides/LyapunovTheory/main.pdf 199 | git add Slides/HJB_LQR/main.pdf 200 | git add Slides/Observer/main.pdf 201 | git add Slides/ControllabilityObservability/main.pdf 202 | git add Slides/Linearization/main.pdf 203 | git add Slides/Constrained/main.pdf 204 | 205 | 206 | 207 | 208 | git commit -m "Update compiled PDFs" 209 | git push 210 | -------------------------------------------------------------------------------- /Slides/Laplace/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Laplace Transform and Transfer Functions} 7 | \subtitle{Control Theory, Lecture 3} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | 20 | \begin{itemize} 21 | \item ODE solutions 22 | \item Laplace Transform 23 | \item Laplace Transform of a derivative 24 | \item Derivative operator 25 | \item Transfer Function 26 | \begin{itemize} 27 | \item Example 28 | \item Interesting things done easy 29 | \end{itemize} 30 | \item State-Space to Transfer Function conversion 31 | \item Read more 32 | \end{itemize} 33 | 34 | \end{frame} 35 | 36 | 37 | 38 | 39 | 40 | \begin{frame}{ODE solutions} 41 | % \framesubtitle{O} 42 | \begin{flushleft} 43 | 44 | \begin{equation} 45 | \begin{bmatrix} 46 | \dot x_1 \\ \dot x_2 \\ \dot x_3 47 | \end{bmatrix} 48 | \begin{bmatrix} 49 | 0 & 1 & 0 \\ 0 & 0 & 1 \\ -5 & -10 & -10 50 | \end{bmatrix} 51 | \begin{bmatrix} 52 | x_1 \\ x_2 \\ x_3 53 | \end{bmatrix} 54 | + 55 | \begin{bmatrix} 56 | 0\\ 0 \\ 10 57 | \end{bmatrix} 58 | u 59 | \end{equation} 60 | 61 | \begin{figure} 62 | \minipage{0.32\textwidth} 63 | \includegraphics[width=\linewidth]{Autonomous.png} 64 | \caption{Autonomous ODE ($u = 0$)} 65 | \endminipage\hfill 66 | \minipage{0.32\textwidth} 67 | \includegraphics[width=\linewidth]{sine.png} 68 | \caption{reaction to sine wave ($u = sin(t)$)} 69 | \endminipage\hfill 70 | \minipage{0.32\textwidth}% 71 | \includegraphics[width=\linewidth]{step.png} 72 | \caption{Reaction to step function ($u = 1$)} 73 | \endminipage 74 | \end{figure} 75 | 76 | \end{flushleft} 77 | \end{frame} 78 | 79 | 80 | \begin{frame}{Laplace Transform} 81 | % \framesubtitle{O} 82 | \begin{flushleft} 83 | 84 | By definition, Laplace transform of a function $f(t)$ is given as: 85 | 86 | \begin{equation} 87 | F(s) = \int_0^\infty f(t) e^{-st}dt 88 | \end{equation} 89 | 90 | where $F(s)$ is called an \emph{image} of the function. 91 | 92 | \bigskip 93 | 94 | The study of Laplace transform is a separate mathematical field with applications in solving ODEs, which we won't cover. However, we will consider transform of one case of interest - transform of a derivative. 95 | 96 | \end{flushleft} 97 | \end{frame} 98 | 99 | 100 | 101 | \begin{frame}{Laplace Transform of a derivative} 102 | % \framesubtitle{O} 103 | \begin{flushleft} 104 | 105 | Consider a derivative $\frac{dx}{dt}$ and its transform: 106 | 107 | \begin{equation} 108 | \mathcal{L}\left(\frac{dx}{dt}\right) = \int_0^\infty \frac{dx}{dt} e^{-st}dt 109 | \end{equation} 110 | 111 | we will make use of the integration by parts formula: 112 | 113 | \begin{definition} 114 | \begin{equation} 115 | \int v \frac{du}{dt} dt = vu - 116 | \int \frac{dv}{dt} u dt 117 | \end{equation} 118 | \end{definition} 119 | 120 | In our case, $\frac{du}{dt} = \frac{dx}{dt}$, $u = x$, $v = e^{-st}$, $\frac{dv}{dt} = -se^{-st}$: 121 | 122 | \begin{equation} 123 | \mathcal{L}\left(\frac{dx}{dt}\right) = \left[x e^{-st} \right]_0^\infty - 124 | \int_0^\infty -se^{-st} x dt 125 | \end{equation} 126 | 127 | \begin{equation} 128 | \mathcal{L}\left(\frac{dx}{dt}\right) = x(0) + s\mathcal{L}(x) 129 | \end{equation} 130 | 131 | \end{flushleft} 132 | \end{frame} 133 | 134 | 135 | 136 | 137 | \begin{frame}{Derivative operator} 138 | % \framesubtitle{O} 139 | \begin{flushleft} 140 | 141 | Thus, assuming that $x(0) = 0$, we can obtain a \emph{derivative operator}: 142 | 143 | \begin{equation} 144 | \label{eq:NoIC_laplace} 145 | \mathcal{L}\left(\frac{dx}{dt}\right) = s \mathcal{L}\left(x\right) 146 | \end{equation} 147 | 148 | \bigskip 149 | 150 | Please notice that \eqref{eq:NoIC_laplace} is only true when $x(0) = 0$; it generally does not look very elegant either. Introducing a big-time abuse of notation, we can denote $x(s) = \mathcal{L}\left(x\right)$ and then drop the brackets, leaving us with: 151 | 152 | \begin{equation} 153 | \frac{dx}{dt} \longrightarrow s x 154 | \end{equation} 155 | 156 | This form of a derivative operator has a very strange notation in terms of the Laplace transform theory, but is very simple to use in practice. 157 | 158 | \end{flushleft} 159 | \end{frame} 160 | 161 | 162 | 163 | \begin{frame}{Transfer Function} 164 | % \framesubtitle{O} 165 | \begin{flushleft} 166 | 167 | Consider the following ODE, where $u$ is an input (function of time that influences the solution of the ODE): 168 | 169 | \begin{equation} 170 | \ddot x + a \dot x + b x = u 171 | \end{equation} 172 | 173 | We can rewrite it using the derivative operator: 174 | 175 | \begin{equation} 176 | s^2 x + a s x + b x = u 177 | \end{equation} 178 | 179 | and then collect $x$ on the left-hand-side: 180 | 181 | \begin{equation} 182 | x = \frac{1}{s^2 + a s + b} u 183 | \end{equation} 184 | 185 | At this point the mathematical meaning of this expression as an ODE is very vague, but it has a different direct use; this form is called a \emph{transfer function}. 186 | 187 | \end{flushleft} 188 | \end{frame} 189 | 190 | 191 | \begin{frame}{Transfer Function} 192 | \framesubtitle{Example} 193 | \begin{flushleft} 194 | 195 | \begin{example} 196 | Given ODE: $2\dddot x + 5\dot x - 40 x = 10 u$ 197 | 198 | The transfer function for it looks: 199 | $x = \frac{10}{2 s^3 + 0 s^2 + 5 s - 40} u$ 200 | \end{example} 201 | 202 | 203 | \begin{example} 204 | Given ODE: $2\dot x+ 4 x = u$ 205 | 206 | The transfer function for it looks: $x = \frac{1}{2 s + 4} u$ 207 | \end{example} 208 | 209 | 210 | \begin{example} 211 | Given ODE: $3\dddot x + 4x = u$ 212 | 213 | The transfer function for it looks: $x = \frac{1}{3 s^3 + 4} u$ 214 | \end{example} 215 | 216 | \end{flushleft} 217 | \end{frame} 218 | 219 | 220 | 221 | 222 | \begin{frame}{Transfer Function} 223 | \framesubtitle{Interesting things done easy} 224 | \begin{flushleft} 225 | 226 | Consider the following (strange) ODE: 227 | 228 | \begin{equation} 229 | 2\ddot x + 3\dot x + 2 x = 10 \dot u - u 230 | \end{equation} 231 | 232 | Using the differential equation: 233 | 234 | \begin{equation} 235 | 2 s^2 x + 3s x + 2x = 10s u - u 236 | \end{equation} 237 | 238 | ...which is the same as: 239 | 240 | \begin{equation} 241 | (2s^2 + 3s + 2)x = (10s - 1)u 242 | \end{equation} 243 | 244 | The transfer function for it looks: 245 | 246 | \begin{equation} 247 | x = \frac{10s - 1}{2 s^3 + 0 s^2 + 5 s - 40} u 248 | \end{equation} 249 | 250 | \end{flushleft} 251 | \end{frame} 252 | 253 | 254 | 255 | 256 | \begin{frame}{State-Space to Transfer Function conversion} 257 | % \framesubtitle{O} 258 | \begin{flushleft} 259 | 260 | Transfer functions are being used to study the relation between the input and the output of the dynamical system. 261 | 262 | \bigskip 263 | 264 | Consider standard form state-space dynamical system: 265 | 266 | \begin{equation} 267 | \begin{cases} 268 | \dot{\bo{x}} = \bo{A}\bo{x} + \bo{B}\bo{u} \\ 269 | \bo{y} = \bo{C}\bo{x} + \bo{D}\bo{u} 270 | \end{cases} 271 | \end{equation} 272 | 273 | We can rewrite it using the derivative operator: 274 | 275 | \begin{equation} 276 | \begin{cases} 277 | s\bo{I}\bo{x} -\bo{A}\bo{x} = \bo{B}\bo{u} \\ 278 | \bo{y} = \bo{C}\bo{x} + \bo{D}\bo{u} 279 | \end{cases} 280 | \end{equation} 281 | 282 | and then collect $\bo{x}$ on the left-hand-side: $\bo{x} = (s\bo{I} -\bo{A})^{-1} \bo{B}\bo{u}$ 283 | 284 | and finally, express $\bo{y}$ out: 285 | 286 | \begin{equation} 287 | \bo{y} = \left( \bo{C}(s\bo{I} -\bo{A})^{-1} \bo{B} + \bo{D} \right) \bo{u} 288 | \end{equation} 289 | 290 | \end{flushleft} 291 | \end{frame} 292 | 293 | 294 | 295 | 296 | \begin{frame}{Read more} 297 | 298 | \begin{itemize} 299 | \item \href{https://www.cds.caltech.edu/~murray/courses/cds101/fa04/caltech/am04_ch6-3nov04.pdf}{Chapter 6 Transfer Functions} 300 | 301 | 302 | \end{itemize} 303 | 304 | \end{frame} 305 | 306 | 307 | 308 | \begin{frame}{Thank you!} 309 | \centerline{Lecture slides are available via Moodle.} 310 | \bigskip 311 | \centerline{You can help improve these slides at:} 312 | \centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 313 | \bigskip 314 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 315 | \end{frame} 316 | 317 | \end{document} 318 | -------------------------------------------------------------------------------- /Slides/Linearization/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Manipulator equations, Linearization} 7 | \subtitle{Control Theory, Lecture 12} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | \begin{itemize} 20 | \item Newton eq., Lagrange eq. 21 | \item Manipulator eq. 22 | \item \item 23 | \begin{itemize} 24 | \item Idea 25 | \item Linearization 26 | \end{itemize} 27 | \item Linearization of manipulator eq. 28 | \begin{itemize} 29 | \item Change of variables 30 | \item State matrix 31 | \item Control matrix 32 | \end{itemize} 33 | \end{itemize} 34 | \end{frame} 35 | 36 | 37 | \begin{frame}{Newton eq., Lagrange eq.} 38 | % \framesubtitle{Definitions} 39 | \begin{flushleft} 40 | 41 | In classical mechanics, \emph{Newton equations} are accepted as an axiom and are given (for a system of points): 42 | 43 | \begin{equation} 44 | \label{eq:Newton} 45 | m_i\ddot{\bo{r}}_i = \bo{f}_i, \ \ i = 1, \ ... \ m 46 | \end{equation} 47 | 48 | where $m_i$ are masses of the particles, $\bo{r}_i$ are their positions, and $\bo{f}_i$ are forces acting on them. 49 | 50 | \bigskip 51 | 52 | From it, there is a way to derive \emph{Lagrange equations}: 53 | 54 | \begin{equation} 55 | \label{eq:Lagrange} 56 | \frac{d}{dt} \bigg( 57 | \frac{\partial T }{\partial \dot{\bo{q}}} 58 | \bigg) - 59 | \frac{\partial T }{\partial \bo{q}} = \tau 60 | \end{equation} 61 | 62 | where kinetic energy $T$ is defined as: $T = 0.5 \dot{\bo{r}} ^\top \bo{M} \dot{\bo{r}}$, $\bo{q}$ are generalized coordinates, and $\tau$ are generalized forces. 63 | 64 | \end{flushleft} 65 | \end{frame} 66 | 67 | 68 | 69 | 70 | \begin{frame}{Manipulator eq.} 71 | % \framesubtitle{Definitions} 72 | \begin{flushleft} 73 | 74 | Lagrange equations are useful when modelling a system of rigid bodies connected via \emph{joints}. Examples include robot arms, walking robots and others. However, there is an even more useful form of these equations, called \emph{manipulator equations}: 75 | 76 | \begin{equation} 77 | \bo{H} \ddot{\bo{q}} + \bo{C} \dot{\bo{q}} + \bo{g} = \tau_n 78 | \end{equation} 79 | 80 | where $\bo{H} = \bo{H}(\bo{q})$ is a generalized inertia matrix, $\bo{C} = \bo{C}(\bo{q}, \dot{\bo{q}})$ is inertial force matrix, $\bo{g} = \bo{g}(\bo{q})$ is generalized gravity and other conservative forces, and $\tau_n$ are generalized non-conservative forces, such as control inputs (motor torques, etc.) 81 | 82 | \end{flushleft} 83 | \end{frame} 84 | 85 | 86 | 87 | 88 | \begin{frame}{Linear control for nonlinear systems} 89 | \framesubtitle{Idea} 90 | \begin{flushleft} 91 | 92 | Consider the following problem: given $\bo{H} \ddot{\bo{q}} + \bo{C} \dot{\bo{q}} + \bo{g} = \tau_n$, design control law that would stabilize the system at the origin. 93 | 94 | \bigskip 95 | 96 | \begin{block}{Linearization} 97 | One of the ways to think about this problem is to imagine that if there existed a linear system, that behaves exactly like the original system in the vicinity of the origin, we could stabilize the linear one and then use the found control law to stabilize the non-linear version. 98 | \end{block} 99 | 100 | 101 | \end{flushleft} 102 | \end{frame} 103 | 104 | 105 | 106 | 107 | \begin{frame}{Linear control for nonlinear systems} 108 | \framesubtitle{Linearization} 109 | \begin{flushleft} 110 | 111 | In general, for a system of the form $\dot{\bo{x}} = \bo{f}(\bo{x}, \bo{u})$, there is a simple way to linearize it around any given point. The process if based on Taylor expansion: 112 | 113 | \begin{equation} 114 | \bo{f}(\bo{x}, \bo{u}) \sim \bo{f}(\bo{x}_0, \bo{u}_0) + 115 | \frac{\partial \bo{f}}{\partial \bo{x}} (\bo{x} - \bo{x}_0) + 116 | \frac{\partial \bo{f}}{\partial \bo{u}} (\bo{u} - \bo{u}_0) 117 | \end{equation} 118 | 119 | Denoting $\frac{\partial \bo{f}}{\partial \bo{x}} = \bo{A}$ and $\frac{\partial \bo{f}}{\partial \bo{u}} = \bo{B}$, we get: 120 | 121 | \begin{equation} 122 | \bo{f}(\bo{x}, \bo{u}) \sim \bo{f}(\bo{x}_0, \bo{u}_0) + 123 | \bo{A} (\bo{x} - \bo{x}_0) + 124 | \bo{B} (\bo{u} - \bo{u}_0) 125 | \end{equation} 126 | 127 | Finally, denoting $ \bo{f}(\bo{x}_0, \bo{u}_0) - \bo{A}\bo{x}_0 - \bo{B} \bo{u}_0 = \bo{c}$ we achieve local linearization of the nonlinear dynamics: 128 | 129 | \begin{equation} 130 | \dot{\bo{x}} \sim \bo{A} \bo{x} + 131 | \bo{B} \bo{u} + \bo{c} 132 | \end{equation} 133 | 134 | 135 | \end{flushleft} 136 | \end{frame} 137 | 138 | 139 | 140 | \begin{frame}{Linear control for nonlinear systems} 141 | \framesubtitle{Linearization of manipulator eq,} 142 | \begin{flushleft} 143 | 144 | We, on the other hand, have eq. in the form $\bo{H} \ddot{\bo{q}} + \bo{C} \dot{\bo{q}} + \bo{g} = \tau_n$. Let us assume $\tau_n = \bo{T}\bo{u}$, where $\bo{T} = \bo{T}(\bo{q})$. We can also define $\bo{x}$: 145 | 146 | \begin{equation} 147 | \bo{x} = \begin{bmatrix} 148 | \bo{q} \\ \dot{\bo{q}} \end{bmatrix} 149 | \end{equation} 150 | 151 | Then our attempt to write system of first order diff. eq. gives us: 152 | 153 | \begin{equation} 154 | \frac{d}{dt} 155 | \left( 156 | \begin{bmatrix} 157 | \bo{q} \\ \dot{\bo{q}} 158 | \end{bmatrix} 159 | \right) 160 | = 161 | \begin{bmatrix} 162 | \dot{\bo{q}} \\ 163 | \bo{H}^{-1} (\bo{T}\bo{u} - \bo{C} \dot{\bo{q}} - \bo{g}) 164 | \end{bmatrix} 165 | \end{equation} 166 | 167 | \end{flushleft} 168 | \end{frame} 169 | 170 | 171 | 172 | 173 | \begin{frame}{Linear control for nonlinear systems} 174 | \framesubtitle{State matrix} 175 | \begin{flushleft} 176 | 177 | In this case, state matrix $\bo{A}$ becomes: 178 | 179 | \begin{equation} 180 | \bo{A} = 181 | \begin{bmatrix} 182 | 0 & \bo{I} \\ 183 | \frac{\partial (\bo{H}^{-1} (\bo{T}\bo{u} - \bo{C} \dot{\bo{q}} - \bo{g}) )}{\partial \bo{q}} 184 | & 185 | \frac{\partial (\bo{H}^{-1} (\bo{T}\bo{u} - \bo{C} \dot{\bo{q}} - \bo{g}) )}{\partial \dot{\bo{q}}} 186 | \end{bmatrix} 187 | \end{equation} 188 | 189 | Let us expand: 190 | 191 | \begin{equation} 192 | \frac{\partial }{\partial \bo{q}} (\bo{H}^{-1} (\bo{T}\bo{u} - \bo{C} \dot{\bo{q}} - \bo{g}) ) 193 | = 194 | \frac{\partial \bo{H}^{-1}}{\partial \bo{q}} (\bo{T}\bo{u} - \bo{C} \dot{\bo{q}} - \bo{g}) 195 | + 196 | \bo{H}^{-1} 197 | \frac{\partial }{\partial \bo{q}} 198 | (\bo{T}\bo{u} - \bo{C} \dot{\bo{q}} - \bo{g}) ) 199 | \end{equation} 200 | 201 | \begin{equation} 202 | \frac{\partial \bo{H}^{-1}}{\partial \bo{q}} = 203 | - \bo{H}^{-1} \frac{\partial \bo{H}}{\partial \bo{q}} 204 | \bo{H}^{-1} 205 | \end{equation} 206 | 207 | \end{flushleft} 208 | \end{frame} 209 | 210 | 211 | 212 | 213 | \begin{frame}{Linear control for nonlinear systems} 214 | \framesubtitle{State matrix, Control matrix} 215 | \begin{flushleft} 216 | 217 | ...and: 218 | 219 | \begin{equation} 220 | \frac{\partial (\bo{H}^{-1} (\bo{T}\bo{u} - \bo{C} \dot{\bo{q}} - \bo{g}) )}{\partial \dot{\bo{q}}} 221 | = 222 | -\bo{H}^{-1}\bo{C} - \bo{H}^{-1} 223 | \frac{\partial \bo{C}}{\partial \dot{\bo{q}}} \dot{\bo{q}} 224 | \end{equation} 225 | 226 | Control matrix $\bo{B}$ becomes: 227 | 228 | \begin{equation} 229 | \bo{B} = 230 | \begin{bmatrix} 231 | 0 & 0 \\ 232 | \frac{\partial (\bo{H}^{-1} (\bo{T}\bo{u} - \bo{C} \dot{\bo{q}} - \bo{g}) )}{\partial \bo{u}} 233 | & 234 | 0 235 | \end{bmatrix} 236 | = 237 | \begin{bmatrix} 238 | 0 & 0 \\ 239 | \bo{H}^{-1} \bo{T} 240 | & 241 | 0 242 | \end{bmatrix} 243 | \end{equation} 244 | 245 | ...and this does not look very clean and nice to use. Indeed, it is not easy or nice in practice. 246 | 247 | \end{flushleft} 248 | \end{frame} 249 | 250 | 251 | 252 | \begin{frame}{Thank you!} 253 | \centerline{Lecture slides are available via Moodle.} 254 | \bigskip 255 | \centerline{You can help improve these slides at:} 256 | \centerline{ 257 | \textcolor{blue}{\centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}}}} 258 | 259 | \bigskip 260 | 261 | \textcolor{black}{\qrcode[height=1.5in]{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 262 | 263 | \bigskip 264 | 265 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 266 | \end{frame} 267 | 268 | \end{document} 269 | -------------------------------------------------------------------------------- /Slides/Discrete/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Discrete Dynamics} 7 | \subtitle{Control Theory, Lecture 5 (continuation)} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | 20 | \begin{itemize} 21 | \item Discrete Dynamics 22 | \item Stability of the Discrete Dynamics 23 | \item Discretization 24 | \begin{itemize} 25 | \item Finite difference 26 | \item Finite difference in an autonomous LTI 27 | \end{itemize} 28 | \item Zero order hold 29 | \item ZOH and other types of discretization 30 | \begin{itemize} 31 | \item Zero order hold vs First order hold 32 | \item Exact discretization 33 | \end{itemize} 34 | \item Read more 35 | \end{itemize} 36 | 37 | \end{frame} 38 | 39 | 40 | 41 | 42 | 43 | \begin{frame}{Discrete Dynamics} 44 | % \framesubtitle{Part 1} 45 | \begin{flushleft} 46 | 47 | The following dynamical system is called \emph{discrete}: 48 | 49 | \begin{equation} 50 | \bo{x}_{i+1} = \bo{A}\bo{x}_i + \bo{B}\bo{u}_i 51 | \end{equation} 52 | 53 | Note that those: 54 | 55 | \begin{itemize} 56 | \item have no derivatives in the equation; 57 | \item are easily simulated. 58 | \end{itemize} 59 | 60 | \bigskip 61 | 62 | The affine control for this system can be given as: 63 | 64 | \begin{equation} 65 | \bo{u}_i = -\bo{K}\bo{x}_i + \bo{u}_i^* 66 | \end{equation} 67 | 68 | \end{flushleft} 69 | \end{frame} 70 | 71 | 72 | 73 | \begin{frame}{Stability of the Discrete Dynamics} 74 | \framesubtitle{Part 1} 75 | \begin{flushleft} 76 | 77 | Let us consider stability of the discrete dynamical system $\bo{x}_{i+1} = \bo{A}\bo{x}_i$. 78 | 79 | \bigskip 80 | 81 | We will attack the problem in the same way as before, first assuming that $\bo{A} = \bo{V}^{-1} \bo{D} \bo{V}$, where $\bo{D}$ is a diagonal matrix with eigenvalues of $\bo{A}$ on its diagonal: 82 | 83 | \begin{equation} 84 | \bo{x}_{i+1} = \bo{V}^{-1} \bo{D} \bo{V}\bo{x}_i 85 | \end{equation} 86 | 87 | Multiplying both sides of the equation by $\bo{V}$ and defining $\bo{z}_i = \bo{V}\bo{x}_i$, we get: 88 | 89 | \begin{equation} 90 | \bo{V}\bo{x}_{i+1} = \bo{V}\bo{V}^{-1} \bo{D} \bo{V}\bo{x}_i 91 | \end{equation} 92 | \begin{equation} 93 | \bo{z}_{i+1} = \bo{D} \bo{z}_i 94 | \end{equation} 95 | 96 | 97 | \end{flushleft} 98 | \end{frame} 99 | 100 | 101 | \begin{frame}{Stability of the Discrete Dynamics} 102 | \framesubtitle{Part 2} 103 | \begin{flushleft} 104 | 105 | Now, considering $\bo{z}_{i+1} = \bo{D} \bo{z}_i$ we can see that the norm of the state $\bo{z}_i$ would not increase iff the norm of the elements of $\bo{D}$ (which as eigenvalues of $\bo{A}$) are smaller than 1. 106 | 107 | \bigskip 108 | 109 | \begin{block}{Stability criterion} 110 | In general, discrete systems $\bo{x}_{i+1} = \bo{A}\bo{x}_i$ are stable as long as the eigenvalues of $\bo{A}$ are smaller than 1 by absolute value: $|\lambda_i(\bo{A})| \leq 1, \; \forall i$. This is true for complex eigenvalues as well. 111 | \end{block} 112 | 113 | 114 | \end{flushleft} 115 | \end{frame} 116 | 117 | 118 | 119 | \begin{frame}{Discretization} 120 | \framesubtitle{Finite difference} 121 | \begin{flushleft} 122 | 123 | Consider linear time-invariant autonomous system: 124 | 125 | \begin{equation} 126 | \dot {\bo{x}} = \bo{A} \bo{x} 127 | \end{equation} 128 | 129 | 130 | The time derivative $\dot {\bo{x}}$ can be replaces with a finite difference: 131 | 132 | \begin{equation} 133 | \dot {\bo{x}} \approx \frac{1}{\Delta t}(\bo{x}(t + \Delta t) - \bo{x}(t)) 134 | \end{equation} 135 | 136 | Note that we could have also used other definitions of a finite difference: 137 | 138 | \begin{equation} 139 | \dot {\bo{x}} \approx \frac{1}{\Delta t}(\bo{x}(t + 0.5\Delta t) - \bo{x}(t - 0.5\Delta t)) 140 | \end{equation} 141 | 142 | or 143 | 144 | \begin{equation} 145 | \dot {\bo{x}} \approx \frac{1}{\Delta t}(\bo{x}(t) - \bo{x}(t - \Delta t)) 146 | \end{equation} 147 | 148 | \end{flushleft} 149 | \end{frame} 150 | 151 | 152 | 153 | 154 | \begin{frame}{Discretization} 155 | \framesubtitle{Finite difference notation} 156 | \begin{flushleft} 157 | We can introduce notation: 158 | 159 | \begin{equation} 160 | \begin{cases} 161 | \bo{x}_0 = \bo{x}(0) \\ 162 | \bo{x}_1 = \bo{x}(\Delta t) \\ 163 | \bo{x}_2 = \bo{x}(2\Delta t) \\ 164 | ... \\ 165 | \bo{x}_n = \bo{x}(n\Delta t) 166 | \end{cases} 167 | \end{equation} 168 | 169 | We say that $\bo{x}_i$ is the value of $\bo{x}$ at the time step $i$. Then the finite difference can be written, for example, as follows: 170 | 171 | \begin{equation} 172 | \dot {\bo{x}} \approx \frac{1}{\Delta t}(\bo{x}_{i+1} - \bo{x}_i) 173 | \end{equation} 174 | 175 | \end{flushleft} 176 | \end{frame} 177 | 178 | 179 | 180 | \begin{frame}{Discretization} 181 | \framesubtitle{Finite difference in an autonomous LTI} 182 | \begin{flushleft} 183 | 184 | We can rewrite our original autonomous LTI as follows: 185 | 186 | \begin{equation} 187 | \frac{1}{\Delta t}(\bo{x}_{i + 1} - \bo{x}_i) = \bo{A} \bo{x}_i 188 | \end{equation} 189 | Isolating $\bo{x}_{i + 1}$ on the left hand side, we get: 190 | \begin{equation} 191 | \bo{x}_{i + 1} = (\bo{A} \Delta t + \bo{I}) \bo{x}_i 192 | \end{equation} 193 | 194 | \noindent\rule{11cm}{0.4pt} 195 | 196 | Or alternatively: 197 | 198 | \begin{equation} 199 | \frac{1}{\Delta t}(\bo{x}_{i + 1} - \bo{x}_i) = \bo{A} \bo{x}_{i + 1} 200 | \end{equation} 201 | Isolating $\bo{x}_{i + 1}$ on the left hand side, we get: 202 | \begin{equation} 203 | \bo{x}_{i + 1} = (\bo{I} - \bo{A} \Delta t)^{-1} \bo{x}_i 204 | \end{equation} 205 | 206 | \end{flushleft} 207 | \end{frame} 208 | 209 | 210 | 211 | 212 | \begin{frame}{Discretization} 213 | \framesubtitle{Zero order hold} 214 | \begin{flushleft} 215 | 216 | Defining \emph{discrete state space matrix} $\bar{\bo{A}}$ and \emph{discrete control matrix} $\bar{\bo{B}}$ as follows: 217 | 218 | \begin{equation} 219 | \bar{\bo{A}} = \bo{A} \Delta t + \bo{I} 220 | \end{equation} 221 | \begin{equation} 222 | \bar{\bo{B}} = \bo{B} \Delta t 223 | \end{equation} 224 | % 225 | We get discrete dynamics: 226 | 227 | \begin{equation} 228 | \bo{x}_{i+1} = \bar{\bo{A}} \bo{x}_i + \bar{\bo{B}} \mathbf u_i 229 | \end{equation} 230 | 231 | This way of defining discrete dynamics is called \emph{zero order hold (ZOH)}. 232 | 233 | \end{flushleft} 234 | \end{frame} 235 | 236 | 237 | \begin{frame}{ZOH and other types of discretization} 238 | \framesubtitle{Zero order hold vs First order hold} 239 | \begin{flushleft} 240 | 241 | Graphically, we can understand what zero order hold is, by comparing it to the first order hold: 242 | 243 | \begin{figure} [h!] 244 | \begin{center} 245 | \includegraphics[width=3.5in]{ZOH.PNG} 246 | \end{center} 247 | \caption{Different types of discretization} \label{F:ZOH} 248 | \end{figure} 249 | 250 | \end{flushleft} 251 | \end{frame} 252 | 253 | 254 | \begin{frame}{ZOH and other types of discretization} 255 | \framesubtitle{Exact discretization} 256 | \begin{flushleft} 257 | 258 | Let the discrete state $\bo{x}_i$ correspond to continuous state $\bo{x}$ at the moment of time $t_i$. Then, we can say that the discretization is \emph{exact} the following holds for any solution $\bo{x}(t)$ 259 | 260 | \begin{equation} 261 | \bo{x}_0 = \bo{x}(t_0) \rightarrow 262 | \bo{x}_i = \bo{x}(t_i), \ \forall i 263 | \end{equation} 264 | 265 | We can compute the exact discretization as follows: 266 | 267 | \begin{equation} 268 | \bar{\bo{A}} = e^{\bo{A} \Delta t} 269 | \end{equation} 270 | \begin{equation} 271 | \bar{\bo{B}} = \bo{B} \int_{t_0}^{t_0 + \Delta t} e^{\bo{A} s} ds 272 | \end{equation} 273 | 274 | 275 | \end{flushleft} 276 | \end{frame} 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | \begin{frame}{Read more} 290 | 291 | \begin{itemize} 292 | \item \href{http://cse.lab.imtlucca.it/~bemporad/teaching/ac/pdf/04a-TD_sys.pdf}{Automatic Control 1 Discrete-time linear systems}, Prof. Alberto Bemporad, University of Trento 293 | 294 | 295 | \end{itemize} 296 | 297 | \end{frame} 298 | 299 | 300 | 301 | \begin{frame}{Thank you!} 302 | \centerline{Lecture slides are available via Moodle.} 303 | \bigskip 304 | \centerline{You can help improve these slides at:} 305 | \centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 306 | \bigskip 307 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 308 | \end{frame} 309 | 310 | \end{document} 311 | -------------------------------------------------------------------------------- /Slides/LyapunovTheory/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Lyapunov Theory, Lyapunov equations} 7 | \subtitle{Control Theory, Lecture 8} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | 20 | \begin{itemize} 21 | \item Lyapunov method: stability criteria 22 | \item Lyapunov method: examples 23 | \item Linear case 24 | \item Discrete case 25 | \item Lyapunov equations 26 | \item Read more 27 | \end{itemize} 28 | 29 | \end{frame} 30 | 31 | 32 | 33 | 34 | 35 | \begin{frame}{Lyapunov method: stability criteria} 36 | % \framesubtitle{Parameter estimation} 37 | \begin{flushleft} 38 | 39 | \begin{block}{Asymptotic stability criteria} 40 | Autonomous dynamic system $\dot{\bo{x}} = \bo{f}(\bo{x})$ is assymptotically stable, if there exists a scalar function $V = V(\bo{x}) > 0$, whose time derivative is negative $\dot V(\bo{x}) < 0$, except $V(\bo{0}) = 0$, $\dot V(\bo{0}) = 0$. 41 | \end{block} 42 | 43 | \begin{block}{Marginal stability criteria} 44 | $\dot{\bo{x}} = \bo{f}(\bo{x})$ is stable in the sense of Lyapunov, $\exists V = V(\bo{x}) > 0$, $\dot V(\bo{x}) \leq 0$. 45 | \end{block} 46 | 47 | \begin{definition} 48 | Function $V = V(\bo{x}) > 0$ in this case is called \emph{Lyapunov function}. 49 | \end{definition} 50 | 51 | \bigskip 52 | 53 | This is not the only type of stability as you remember, you are invited to study criteria for other stability types on your own. 54 | 55 | \end{flushleft} 56 | \end{frame} 57 | 58 | 59 | \begin{frame}{Lyapunov method: examples} 60 | \framesubtitle{Example 1} 61 | \begin{flushleft} 62 | 63 | Take dynamical system $\dot{x} = -x$. 64 | 65 | \bigskip 66 | 67 | We propose a \emph{Lyapunov function candidate} $V(x) = x^2 \geq 0$. Let's find its derivative: 68 | 69 | \begin{equation} 70 | \dot V(x) = \frac{\partial V}{\partial x} (-x) = 2x (-x) = -x^2 \leq 0 71 | \end{equation} 72 | 73 | This satisfies the Lyapunov criteria, so the system is stable. It is in fact asymptotically stable, because $\dot V(x) \neq 0$ if $x \neq 0$. 74 | 75 | \end{flushleft} 76 | \end{frame} 77 | 78 | 79 | 80 | \begin{frame}{Lyapunov method: examples} 81 | \framesubtitle{Example 2} 82 | \begin{flushleft} 83 | 84 | Consider oscillator $\ddot{q} = f(q, \dot{q}) = -\dot{q}$. 85 | 86 | \bigskip 87 | 88 | We propose a \emph{Lyapunov function candidate} $V(q, \dot{q}) = T(q, \dot{q}) = \frac{1}{2} \dot{q}^2 \geq 0$, where $T(q, \dot{q})$ is kinetic energy of the system. Let's find its derivative: 89 | 90 | \begin{equation} 91 | \dot V(q, \dot{q}) = 92 | \frac{\partial V}{\partial q} \dot{q} + 93 | \frac{\partial V}{\partial \dot{q}} f(q, \dot{q}) = 94 | \dot{q} (-\dot{q}) = -\dot{q}^2 \leq 0 95 | \end{equation} 96 | 97 | 98 | This satisfies the Lyapunov criteria, so the system is stable. But it is not proven to be asymptotically stable, because $\dot V(q, \dot{q}) = 0$ for any $q$ as long as $\dot{q} = 0$. 99 | 100 | \end{flushleft} 101 | \end{frame} 102 | 103 | 104 | 105 | 106 | \begin{frame}{Lyapunov method: examples} 107 | \framesubtitle{Example 3} 108 | \begin{flushleft} 109 | 110 | Consider pendulum $\ddot{q} = f(q, \dot{q}) = -\dot{q} - sin(q)$. 111 | 112 | \bigskip 113 | 114 | We propose a \emph{Lyapunov function candidate} $V(q, \dot{q}) = E(q, \dot{q}) = \frac{1}{2} \dot{q}^2 + 1 - cos(q)\geq 0$, where $E(q, \dot{q})$ is total energy of the system. Let's find its derivative: 115 | 116 | \begin{equation} 117 | \dot V(q, \dot{q}) = 118 | \frac{\partial V}{\partial q} \dot{q} + 119 | \frac{\partial V}{\partial \dot{q}} f(q, \dot{q}) = 120 | \dot{q} sin(q) + \dot{q}(-\dot{q} - sin(q)) = 121 | -\dot{q}^2 \leq 0 122 | \end{equation} 123 | 124 | 125 | This satisfies the Lyapunov criteria, so the system is stable. It is not proven to be asymptotically stable, because $\dot V(q, \dot{q}) = 0$ for any $q$, as long as $\dot{q} = 0$. 126 | 127 | \end{flushleft} 128 | \end{frame} 129 | 130 | 131 | \begin{frame}{Linear case} 132 | \framesubtitle{Part 1} 133 | \begin{flushleft} 134 | 135 | As you saw, Lyapunov method allows you to deal with nonlinear systems, as well as linear ones. But for linear ones there are additional properties we can use. 136 | 137 | \begin{block}{Observation 1} 138 | For a linear system $\dot{\bo{x}} = \bo{A}\bo{x}$ we can always pick Lyapunov function candidate in the form $V = \bo{x}^\top\bo{S}\bo{x} \geq 0$, where $\bo{S}$ is a positive semidefinite matrix. 139 | \end{block} 140 | 141 | \bigskip 142 | 143 | Next slides will shows where this leads us. 144 | 145 | \end{flushleft} 146 | \end{frame} 147 | 148 | 149 | \begin{frame}{Linear case} 150 | \framesubtitle{Part 2} 151 | \begin{flushleft} 152 | 153 | Given $\dot{\bo{x}} = \bo{A}\bo{x}$ and $V = \bo{x}^\top\bo{S}\bo{x} \geq 0$, let's find its derivative: 154 | 155 | \begin{equation} 156 | \dot V(\bo{x}) = \dot{\bo{x}}^\top\bo{S}\bo{x} + 157 | \bo{x}^\top\bo{S}\dot{\bo{x}} 158 | \end{equation} 159 | 160 | \begin{equation} 161 | \dot V(\bo{x}) = (\bo{A}\bo{x})^\top\bo{S}\bo{x} + 162 | \bo{x}^\top\bo{S}\bo{A}\bo{x} = 163 | \bo{x}^\top(\bo{A}^\top\bo{S} + \bo{S}\bo{A})\bo{x} 164 | \end{equation} 165 | 166 | Notice that $\dot V(x)$ should be negative for all $\bo{x}$ for the system to be stable, meaning that $\bo{A}^\top\bo{S} + \bo{S}\bo{A}$ should be negative semidefinite. A more strict form of this requirement is \emph{Lyapunov equation}: 167 | 168 | \begin{equation} 169 | \bo{A}^\top\bo{S} + \bo{S}\bo{A} = -\bo{Q} 170 | \end{equation} 171 | 172 | where $\bo{Q}$ is a positive-definite matrix. 173 | 174 | \end{flushleft} 175 | \end{frame} 176 | 177 | 178 | 179 | \begin{frame}{Discrete case} 180 | \framesubtitle{Part 1} 181 | \begin{flushleft} 182 | 183 | \begin{block}{Marginal stability criteria, discrete case} 184 | Given $\bo{x}_{i+1} = \bo{f}(\bo{x}_i)$, if $V(\bo{x}_i) > 0$, and $V(\bo{x}_{i+1}) - V(\bo{x}_i) \leq 0$, the system is stable. 185 | \end{block} 186 | 187 | \bigskip 188 | 189 | Same as before, for linear systems we will be choosing \emph{positive semidefinite quadratic forms} as Lyapunov function candidates. 190 | 191 | \end{flushleft} 192 | \end{frame} 193 | 194 | 195 | 196 | \begin{frame}{Discrete case} 197 | \framesubtitle{Part 2} 198 | \begin{flushleft} 199 | 200 | Consider dynamics $\bo{x}_{i+1} = \bo{A}\bo{x}_i$ and $V = \bo{x}_i^\top\bo{S}\bo{x}_i \geq 0$, let's find $V(\bo{x}_{i+1}) - V(\bo{x}_i)$: 201 | 202 | \begin{equation} 203 | V(\bo{x}_{i+1}) - V(\bo{x}_i) = (\bo{A}\bo{x}_i)^\top\bo{S}\bo{A}\bo{x}_i - 204 | \bo{x}_i^\top\bo{S}\bo{x}_i 205 | \end{equation} 206 | \begin{equation} 207 | V(\bo{x}_{i+1}) - V(\bo{x}_i) = \bo{x}_i^\top(\bo{A}^\top\bo{S}\bo{A} - \bo{S})\bo{x}_i 208 | \end{equation} 209 | 210 | Notice that $V(\bo{x}_{i+1}) - V(\bo{x}_i)$ should be negative for all $\bo{x}_i$ for the system to be stable, meaning that $\bo{A}^\top\bo{S}\bo{A} - \bo{S}$ should be negative semidefinite. A more strict form of this requirement is \emph{Discrete Lyapunov equation}: 211 | 212 | \begin{equation} 213 | \bo{A}^\top\bo{S}\bo{A} - \bo{S} = -\bo{Q} 214 | \end{equation} 215 | 216 | where $\bo{Q}$ is a positive-definite matrix. 217 | 218 | \end{flushleft} 219 | \end{frame} 220 | 221 | 222 | 223 | 224 | 225 | 226 | \begin{frame}{Lyapunov equations} 227 | % \framesubtitle{Local coordinates} 228 | \begin{flushleft} 229 | 230 | In practice, you can easily use Lyapunov equations for stability verification. Python and MATLAB have built-in functionality to solve it: 231 | 232 | \begin{itemize} 233 | \item scipy: \texttt{linalg.solve\_continuous\_lyapunov(A, Q)} 234 | \item MATLAB: \texttt{lyap(A,Q)} 235 | \end{itemize} 236 | 237 | \end{flushleft} 238 | \end{frame} 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | \begin{frame}{Read more} 247 | % \framesubtitle{Local coordinates} 248 | \begin{flushleft} 249 | 250 | \begin{itemize} 251 | \item \href{https://folk.uib.no/nmagb/m2142002l3.pdf}{3.9 Liapunov’s direct method} 252 | \item \href{https://arxiv.org/abs/1809.05289}{Universita degli studi di Padova Dipartimento di Ingegneria dell'Informazione, Nicoletta Bof, Ruggero Carli, Luca Schenato, Technical Report, Lyapunov Theory for Discrete Time Systems} 253 | \end{itemize} 254 | 255 | \end{flushleft} 256 | \end{frame} 257 | 258 | 259 | 260 | 261 | \begin{frame}{Thank you!} 262 | \centerline{Lecture slides are available via Moodle.} 263 | \bigskip 264 | \centerline{You can help improve these slides at:} 265 | \centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 266 | \bigskip 267 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 268 | \end{frame} 269 | 270 | \end{document} 271 | -------------------------------------------------------------------------------- /Slides/ControllabilityObservability/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Controllability, Observability} 7 | \subtitle{Control Theory, Lecture 11} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | \begin{itemize} 20 | \item Controllability of Discrete LTI 21 | \begin{itemize} 22 | \item Controllability matrix 23 | \item Controllability criterion 24 | \end{itemize} 25 | \item Observability of Discrete LTI 26 | \begin{itemize} 27 | \item Dual system 28 | \item Observability criterion 29 | \end{itemize} 30 | \item ”Unlimited control” 31 | \item Limited control 32 | \end{itemize} 33 | \end{frame} 34 | 35 | 36 | \begin{frame}{Controllability of Discrete LTI} 37 | % \framesubtitle{Definitions} 38 | \begin{flushleft} 39 | 40 | Consider discrete LTI: 41 | \begin{equation} 42 | \bo{x}_{i+1} = \bo{A} \bo{x}_i + \bo{B} \bo{u}_i 43 | \end{equation} 44 | 45 | Assume the initial state is $\bo{x}_1$. Then we can deduce that: 46 | 47 | \begin{align*} 48 | \bo{x}_2 &= \bo{A} \bo{x}_1 + \bo{B} \bo{u}_1 \\ 49 | \bo{x}_3 &= \bo{A} \bo{x}_2 + \bo{B} \bo{u}_2 = \bo{A} (\bo{A} \bo{x}_1 + \bo{B} \bo{u}_1) + \bo{B} \bo{u}_2 \\ 50 | \bo{x}_4 &= \bo{A} \bo{x}_3 + \bo{B} \bo{u}_3 = \bo{A} (\bo{A} (\bo{A} \bo{x}_1 + \bo{B} \bo{u}_1) + \bo{B} \bo{u}_2) + \bo{B} \bo{u}_3 \\ 51 | ... \\ 52 | \bo{x}_{n+1} &= \bo{A}^n \bo{x}_1 + ... + 53 | \bo{A}^{n - k} \bo{B} \bo{u}_{k} + ... + 54 | \bo{B} \bo{u}_n 55 | \end{align*} 56 | 57 | \end{flushleft} 58 | \end{frame} 59 | 60 | 61 | 62 | \begin{frame}{Controllability of Discrete LTI} 63 | \framesubtitle{Controllability matrix} 64 | \begin{flushleft} 65 | 66 | Equation $\bo{x}_{n+1} = \bo{A}^n \bo{x}_1 + ... 67 | + \bo{A}^{n - k} \bo{B} \bo{u}_{k} + ... 68 | \bo{B} \bo{u}_n$ can be re-written as: 69 | 70 | \begin{equation} 71 | \bo{x}_{n+1} - \bo{A}^n \bo{x}_1 = 72 | \begin{bmatrix} 73 | \bo{B} & 74 | \bo{A} \bo{B} & 75 | \bo{A}^2 \bo{B} & ... & 76 | \bo{A}^{n - 1} \bo{B} 77 | \end{bmatrix} 78 | \begin{bmatrix} 79 | \bo{u}_{k} \\ 80 | \bo{u}_{k-1} \\ 81 | \bo{u}_{k-2} \\ ... \\ 82 | \bo{u}_{1} 83 | \end{bmatrix} 84 | \end{equation} 85 | 86 | Notice that in order for the system to go from $\bo{x}_1$ to $\bo{x}_{n+1}$, it needs be in the column space of $\begin{bmatrix} 87 | \bo{B} & 88 | \bo{A} \bo{B} & ... & 89 | \bo{A}^{n - 1} \bo{B} 90 | \end{bmatrix}$. 91 | 92 | \end{flushleft} 93 | \end{frame} 94 | 95 | 96 | \begin{frame}{Controllability of Discrete LTI} 97 | \framesubtitle{Controllability criterion} 98 | \begin{flushleft} 99 | 100 | \begin{block}{Controllability} 101 | For a system $\bo{x}_{i+1} = \bo{A} \bo{x}_i + \bo{B} \bo{u}_i$, where $\bo{x} \in \R^n$, if the matrix $\mathcal{B} = \begin{bmatrix} 102 | \bo{B} & 103 | \bo{A} \bo{B} & ... & 104 | \bo{A}^{n - 1} \bo{B} 105 | \end{bmatrix}$ is full row rank (i.e. $\text{rank}(\mathcal{B}) = n$), any state can be reached, which means that \emph{the system is controllable}. 106 | \end{block} 107 | 108 | \end{flushleft} 109 | \end{frame} 110 | 111 | 112 | 113 | 114 | \begin{frame}{Observability of Discrete LTI} 115 | % \framesubtitle{Definitions} 116 | \begin{flushleft} 117 | 118 | Consider discrete LTI: 119 | \begin{equation} 120 | \begin{cases} 121 | \bo{x}_{i+1} = \bo{A} \bo{x}_i + \bo{B} \bo{u}_i \\ 122 | \bo{y}_i = \bo{C} \bo{x}_i 123 | \end{cases} 124 | \end{equation} 125 | 126 | And an observer: 127 | 128 | \begin{equation} 129 | \hat{\bo{x}}_{i+1} = \bo{A} \hat{\bo{x}}_i + \bo{B} \bo{u}_i + 130 | \bo{L} (\bo{y}_i - \bo{C} \hat{\bo{x}}_i) 131 | \end{equation} 132 | 133 | Remember that we can define observation error $\bo{e}_i = \hat{\bo{x}}_i - \bo{x}_i$ and white its dynamics: 134 | 135 | \begin{equation} 136 | \bo{e}_{i+1} = \bo{A} \bo{e}_i - 137 | \bo{L} \bo{C} \bo{e}_i 138 | \end{equation} 139 | 140 | Dual system (which is stable if and only if the original is stable), has form: 141 | 142 | \begin{equation} 143 | \varepsilon_{i+1} = \bo{A}^\top \varepsilon_i - 144 | \bo{C}^\top \bo{L}^\top \varepsilon_i 145 | \end{equation} 146 | 147 | 148 | \end{flushleft} 149 | \end{frame} 150 | 151 | 152 | 153 | 154 | \begin{frame}{Observability of Discrete LTI} 155 | \framesubtitle{Dual system} 156 | \begin{flushleft} 157 | 158 | Dynamical system $\varepsilon_{i+1} = \bo{A}^\top \varepsilon_i - \bo{C}^\top \bo{L}^\top \varepsilon_i$, we can be represented as: 159 | 160 | \begin{equation} 161 | \begin{cases} 162 | \varepsilon_{i+1} = \bo{A}^\top \varepsilon_i + \bo{C}^\top \bo{v}_i \\ 163 | \bo{v}_i = - \bo{L}^\top \varepsilon_i 164 | \end{cases} 165 | \end{equation} 166 | 167 | Controllability matrix of this system is: 168 | 169 | \begin{equation} 170 | \mathcal{C}^\top = \begin{bmatrix} 171 | \bo{C}^\top & 172 | (\bo{A}^\top) \bo{C}^\top & ... & 173 | (\bo{A}^\top)^{n - 1} \bo{C}^\top 174 | \end{bmatrix} 175 | \end{equation} 176 | 177 | It is easier to represent this matrix in its transposed form: 178 | 179 | \begin{equation} 180 | \mathcal{C} = \begin{bmatrix} 181 | \bo{C} \\ 182 | \bo{C}\bo{A} \\ ... \\ 183 | \bo{C}\bo{A}^{n - 1} 184 | \end{bmatrix} 185 | \end{equation} 186 | 187 | \end{flushleft} 188 | \end{frame} 189 | 190 | 191 | \begin{frame}{Observability of Discrete LTI} 192 | \framesubtitle{Observability criterion} 193 | \begin{flushleft} 194 | 195 | \begin{block}{Observability} 196 | For a system $\bo{x}_{i+1} = \bo{A} \bo{x}_i + \bo{B} \bo{u}_i$ and $\bo{y}_i = \bo{C} \bo{x}_i$, where $\bo{x} \in \R^n$, if the matrix $\mathcal{C} = \begin{bmatrix} 197 | \bo{C} \\ 198 | \bo{C}\bo{A} \\ ... \\ 199 | \bo{C}\bo{A}^{n - 1} 200 | \end{bmatrix}$ is full column rank (i.e. $\text{rank}(\mathcal{C}) = n$), observation error can go to zero from any initial position, which means that \emph{the system is observable}. 201 | \end{block} 202 | 203 | \end{flushleft} 204 | \end{frame} 205 | 206 | 207 | 208 | 209 | 210 | \begin{frame}{Control} 211 | \framesubtitle{"Unlimited control", part 1} 212 | \begin{flushleft} 213 | 214 | Let's look at this equation one more time: 215 | 216 | \begin{equation} 217 | \bo{x}_{n+1} - \bo{A}^n \bo{x}_1 = 218 | \begin{bmatrix} 219 | \bo{B} & 220 | \bo{A} \bo{B} & 221 | \bo{A}^2 \bo{B} & ... & 222 | \bo{A}^{n - 1} \bo{B} 223 | \end{bmatrix} 224 | \begin{bmatrix} 225 | \bo{u}_{k} \\ 226 | \bo{u}_{k-1} \\ 227 | \bo{u}_{k-2} \\ ... \\ 228 | \bo{u}_{1} 229 | \end{bmatrix} 230 | \end{equation} 231 | 232 | If the system is controllable, it means \emph{every state can be reached from any other space in only $n$ steps}. This seem to disagree with our real-world experience. 233 | 234 | \end{flushleft} 235 | \end{frame} 236 | 237 | 238 | 239 | 240 | \begin{frame}{Control} 241 | \framesubtitle{"Unlimited control", part 2} 242 | \begin{flushleft} 243 | 244 | Let's look at an even simpler equation $\bo{x}_{i+1} = \bo{A} \bo{x}_i + \bo{B} \bo{u}_i$. Let's rewrite the equation as follows: 245 | 246 | \begin{equation} 247 | \bo{x}_f - \bo{A} \bo{x}_1 = \bo{B} \bo{u}_1 248 | \end{equation} 249 | 250 | As long as $\bo{x}_f - \bo{A} \bo{x}_1$ lies in the column space of $\bo{B}$, it \emph{can be achieved in a single step}, using control: 251 | 252 | \begin{equation} 253 | \bo{u}_1 = \bo{B}^+ (\bo{x}_f - \bo{A} \bo{x}_1) 254 | \end{equation} 255 | 256 | This as well, seem to disagree with our real-world experience. 257 | 258 | \end{flushleft} 259 | \end{frame} 260 | 261 | 262 | 263 | \begin{frame}{Limited control} 264 | % \framesubtitle{Limited control} 265 | \begin{flushleft} 266 | 267 | In the actual engineering reality we often have to deal with equations, that look closer to: 268 | 269 | \begin{equation} 270 | \begin{cases} 271 | \bo{x}_{i+1} = \bo{A} \bo{x}_i + \bo{B} \bo{u}_i \\ 272 | || \bo{D} \bo{u}_i ||_r \leq 1 273 | \end{cases} 274 | \end{equation} 275 | 276 | ... which is a \emph{second-order cone program}. Or: 277 | 278 | \begin{equation} 279 | \begin{cases} 280 | \bo{x}_{i+1} = \bo{A} \bo{x}_i + \bo{B} \bo{u}_i \\ 281 | \bo{D} \bo{u}_i \leq \bo{d} 282 | \end{cases} 283 | \end{equation} 284 | 285 | ... which is a \emph{quadratic program}. Notice, those equations \emph{can't be solved analytically}. 286 | 287 | \end{flushleft} 288 | \end{frame} 289 | 290 | 291 | 292 | 293 | 294 | \begin{frame}{Thank you!} 295 | \centerline{Lecture slides are available via Moodle.} 296 | \bigskip 297 | \centerline{You can help improve these slides at:} 298 | \centerline{ 299 | \textcolor{blue}{\centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}}}} 300 | 301 | \bigskip 302 | 303 | \textcolor{black}{\qrcode[height=1.5in]{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 304 | 305 | \bigskip 306 | 307 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 308 | \end{frame} 309 | 310 | \end{document} 311 | -------------------------------------------------------------------------------- /Slides/Stability/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Stability} 7 | \subtitle{Control Theory, Lecture 2} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | 20 | \begin{itemize} 21 | \item Critical point (node) 22 | \item Stability 23 | \item Asymptotic stability 24 | \item Stability vs Asymptotic stability 25 | \item LTI and autonomous LTI 26 | \item Stability of autonomous LTI 27 | \begin{itemize} 28 | \item Example: real eigenvalues 29 | \item Example: complex eigenvalues 30 | \item General case 31 | \item Illustration 32 | \end{itemize} 33 | \item Read more 34 | \end{itemize} 35 | 36 | \end{frame} 37 | 38 | 39 | 40 | \begin{frame}{Critical point (node)} 41 | % \framesubtitle{O} 42 | \begin{flushleft} 43 | 44 | Consider the following ODE: 45 | 46 | \begin{equation} 47 | \dot{\bo{x}} = \bo{f} (\bo{x}, t) 48 | \end{equation} 49 | 50 | Let $\bo{x}_0$ be such a state that: 51 | 52 | \begin{equation} 53 | \bo{f} (\bo{x}_0, t) = 0 54 | \end{equation} 55 | 56 | Then such state $\bo{x}_0$ is called a \emph{node} or a \emph{critical point}. 57 | 58 | \end{flushleft} 59 | \end{frame} 60 | 61 | 62 | 63 | \begin{frame}{Stability} 64 | % \framesubtitle{O} 65 | \begin{flushleft} 66 | 67 | Node $\bo{x}_0$ is called \emph{stable} iff for any constant $\delta$ there exists constant $\varepsilon$ such that: 68 | 69 | \begin{equation} 70 | ||\bo{x}(0) - \bo{x}_0|| < \delta \ \longrightarrow \ ||\bo{x}(t) - \bo{x}_0|| < \varepsilon 71 | \end{equation} 72 | 73 | \bigskip 74 | 75 | Think of it as "for any initial point that lies at most $\delta$ away from $\bo{x}_0$, the rest of the trajectory $\bo{x}(t)$ will be at most $\varepsilon$ away from $\bo{x}_0$". 76 | 77 | \bigskip 78 | 79 | Or, more picturesque, think of it as "the solutions with different initial conditions do not diverge from the node" 80 | 81 | \end{flushleft} 82 | \end{frame} 83 | 84 | 85 | \begin{frame}{Asymptotic stability} 86 | % \framesubtitle{O} 87 | \begin{flushleft} 88 | 89 | Node $\bo{x}_0$ is called \emph{asymptotically stable} iff for any constant $\delta$ it is true that: 90 | 91 | \begin{equation} 92 | ||\bo{x}(0) - \bo{x}_0|| < \delta \ \longrightarrow \ 93 | \lim_{t\to\infty} \bo{x}(t) = \bo{x}_0 94 | \end{equation} 95 | 96 | \bigskip 97 | 98 | Think of it as "for any initial point that lies at most $\delta$ away from $\bo{x}_0$, the trajectory $\bo{x}(t)$ will asymptotically approach the point $\bo{x}_0$". 99 | 100 | \bigskip 101 | 102 | Or, more picturesque, think of it as "the solutions with different initial conditions converge to the node" 103 | 104 | \end{flushleft} 105 | \end{frame} 106 | 107 | 108 | 109 | 110 | \begin{frame}{Stability vs Asymptotic stability} 111 | % \framesubtitle{O} 112 | \begin{flushleft} 113 | 114 | \begin{example} 115 | Consider dynamical system $\dot{x} = 0$, and solution $x = 7$. This solution is stable, but not asymptotically stable (other solutions do not diverge from $x = 7$, but do not converge to it either). 116 | \end{example} 117 | 118 | \begin{example} 119 | Consider dynamical system $\dot{x} = -x$, and solution $x = 0$. This solution is stable and asymptotically stable (other solutions converge to $x = 0$). 120 | \end{example} 121 | 122 | \begin{example} 123 | Consider dynamical system $\dot{x} = x$, and solution $x = 0$. This solution is unstable (other solutions diverge from $x = 0$). 124 | \end{example} 125 | 126 | \end{flushleft} 127 | \end{frame} 128 | 129 | 130 | 131 | \begin{frame}{LTI and autonomous LTI} 132 | % \framesubtitle{O} 133 | \begin{flushleft} 134 | 135 | Consider the following linear ODE: 136 | 137 | \begin{equation} 138 | \dot{\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u} 139 | \end{equation} 140 | 141 | This is called a \emph{linear time-invariant system}, or \emph{LTI}. 142 | 143 | \bigskip 144 | 145 | Consider the following linear ODE: 146 | 147 | \begin{equation} 148 | \dot{\bo{x}} = \bo{A} \bo{x} 149 | \end{equation} 150 | 151 | This is also an LTI, but it is also called an \emph{autonomous system}, since its evolution depends only on the state of the system. 152 | 153 | \end{flushleft} 154 | \end{frame} 155 | 156 | 157 | 158 | 159 | \begin{frame}{Stability of autonomous LTI} 160 | \framesubtitle{Example: real eigenvalues} 161 | \begin{flushleft} 162 | 163 | Consider autonomous LTI: 164 | 165 | \begin{equation} 166 | \dot{\bo{x}} = \bo{A} \bo{x} 167 | \end{equation} 168 | 169 | where $\bo{A}$ can be decomposed via eigen-decomposition as $\bo{A} = \bo{V} \bo{D} \bo{V}^{-1}$, where $\bo{D}$ is a diagonal matrix. 170 | 171 | \bigskip 172 | 173 | \begin{equation} 174 | \dot{\bo{x}} = \bo{V} \bo{D} \bo{V}^{-1} \bo{x} 175 | \end{equation} 176 | 177 | Multiply it by $\bo{V}^{-1} 178 | \ \longrightarrow \ 179 | \bo{V}^{-1} \dot{\bo{x}} = \bo{V}^{-1} \bo{V} \bo{D} \bo{V}^{-1} \bo{x}$. 180 | 181 | Define $\bo{z} = \bo{V}^{-1} \bo{x} 182 | \ \longrightarrow \ 183 | \dot{\bo{z}} = \bo{D} \bo{z}$. 184 | 185 | \bigskip 186 | 187 | Since elements of $\bo{D}$ are real, we can clearly see, that iff they are \emph{all negative} the system will be asymptotically stable. If they are non-positive, the system is stable. And those elements are eigenvalues of $\bo{A}$. 188 | 189 | \end{flushleft} 190 | \end{frame} 191 | 192 | 193 | 194 | \begin{frame}{Stability of autonomous LTI} 195 | \framesubtitle{Example: complex eigenvalues, part 1} 196 | \begin{flushleft} 197 | 198 | Assume that $\bo{A}$ can be decomposed via eigen-decomposition as $\bo{A} = \bo{U} \bo{C} \bo{U}^{-1}$, where $\bo{C}$ is a complex-valued diagonal matrix and $\bo{U}$ is a complex-valued invertible matrix. 199 | 200 | \bigskip 201 | 202 | We can perform the same steps (multiply by $\bo{U}^{-1}$, then define $\bo{z} = \bo{U}^{-1} \bo{x}$) to arrive at: 203 | 204 | \begin{equation} 205 | \dot{\bo{z}} = \bo{C} \bo{z} 206 | \end{equation} 207 | 208 | which falls into a set of independent equations, with complex coefficients $c_i$: 209 | 210 | \begin{equation} 211 | \dot{z}_i = c_i z_i 212 | \end{equation} 213 | 214 | The solution is: 215 | 216 | \begin{equation} 217 | z_i = k_0 e^{c_i t} 218 | \end{equation} 219 | 220 | \end{flushleft} 221 | \end{frame} 222 | 223 | 224 | 225 | \begin{frame}{Stability of autonomous LTI} 226 | \framesubtitle{Example: complex eigenvalues, part 2} 227 | \begin{flushleft} 228 | 229 | The solution $z_i = k_0 e^{c_i t}$, where $c_i = \alpha_i + i \beta_i$, can be decomposed using Euler's identity: 230 | 231 | \[ 232 | z_i = k_0 e^{c_i t} = 233 | k_0 e^{(\alpha_i + i \beta_i) t} = 234 | k_0 e^{\alpha_i t} 235 | e^{i \beta_i t} = 236 | k_0 e^{\alpha_i t} 237 | (\cos(\beta_i t) + i \sin(\beta_i t)) 238 | \] 239 | 240 | As you can see, brackets $(\cos(\beta_i t) + i \sin(\beta_i t))$ has a constant norm, $|| (\cos(\beta_i t) + i \sin(\beta_i t)) || = 1$. Therefore, norm of $z_i$ depends entirely on the norm of $e^{\alpha_i t}$, which is: 241 | 242 | \begin{enumerate} 243 | \item constant if $\alpha_i = 0$, hence the system is stable. 244 | \item decreasing if $\alpha_i < 0$, hence the system is asymptotically stable. 245 | \item increasing if $\alpha_i > 0$, hence the system is unstable. 246 | \end{enumerate} 247 | 248 | 249 | 250 | \end{flushleft} 251 | \end{frame} 252 | 253 | 254 | 255 | 256 | \begin{frame}{Stability of autonomous LTI} 257 | \framesubtitle{General case} 258 | \begin{flushleft} 259 | 260 | Consider an autonomous LTI: 261 | 262 | \begin{equation} 263 | \label{eq:LTI} 264 | \dot{\bo{x}} = \bo{A} \bo{x} 265 | \end{equation} 266 | 267 | \begin{definition} 268 | Eq. \eqref{eq:LTI} is stable iff real parts of eigenvalues of $\bo{A}$ are non-positive. 269 | \end{definition} 270 | 271 | \begin{definition} 272 | Eq. \eqref{eq:LTI} is asymptotically stable iff real parts of eigenvalues of $\bo{A}$ are negative. 273 | \end{definition} 274 | 275 | \end{flushleft} 276 | \end{frame} 277 | 278 | 279 | 280 | 281 | \begin{frame}{Stability of autonomous LTI} 282 | \framesubtitle{Illustration} 283 | \begin{flushleft} 284 | 285 | Here is an illustration of \emph{phase portraits} of two-dimensional LTIs with different types of stability: 286 | 287 | \begin{figure} 288 | \centering 289 | \includegraphics[width=1.0\linewidth]{Stability.PNG} 290 | \caption{phase portraits for different types of stability} 291 | \label{fig:Stability} 292 | \end{figure} 293 | 294 | \bigskip 295 | 296 | \scriptsize{Credit: \href{http://staff.uz.zgora.pl/wpaszke/materialy/spc/Lec13.pdf}{staff.uz.zgora.pl/wpaszke/materialy/spc/Lec13.pdf}} 297 | 298 | \end{flushleft} 299 | \end{frame} 300 | 301 | 302 | 303 | 304 | 305 | 306 | \begin{frame}{Read more} 307 | 308 | \begin{itemize} 309 | \item Control Systems Design, by Julio H. Braslavsky \href{http://staff.uz.zgora.pl/wpaszke/materialy/spc/Lec13.pdf}{staff.uz.zgora.pl/wpaszke/materialy/spc/Lec13.pdf} 310 | 311 | 312 | \end{itemize} 313 | 314 | \end{frame} 315 | 316 | 317 | 318 | \begin{frame}{Thank you!} 319 | \centerline{Lecture slides are available via Moodle.} 320 | \bigskip 321 | \centerline{You can help improve these slides at:} 322 | \centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 323 | \bigskip 324 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 325 | \end{frame} 326 | 327 | \end{document} 328 | -------------------------------------------------------------------------------- /Slides/HJB_LQR/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Hamilton-Jacobi-Bellman eq., Riccati eq., Linear Quadratic Regulator} 7 | \subtitle{Control Theory, Lecture 9} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | \begin{itemize} 20 | \item Hamilton-Jacobi-Bellman equation 21 | \begin{itemize} 22 | \item Definitions 23 | \item Cost, optimal cost 24 | \item Differentiating optimal cost 25 | \end{itemize} 26 | \item Algebraic Riccati equation 27 | \begin{itemize} 28 | \item HJB for LTI 29 | \item Linear Quadratic Regulator 30 | \item Numerical methods 31 | \end{itemize} 32 | \end{itemize} 33 | \end{frame} 34 | 35 | \begin{frame}{Hamilton-Jacobi-Bellman equation} 36 | \framesubtitle{Definitions} 37 | \begin{flushleft} 38 | 39 | Let us define dynamics: 40 | 41 | \begin{equation} 42 | \dot {\bo{x}} = \bo{f} (\bo{x}, \bo{u}) 43 | \end{equation} 44 | % 45 | with initial conditions $\bo{x}(0)$. 46 | 47 | \bigskip 48 | 49 | Additionally we define \emph{control policy} as: 50 | 51 | \begin{equation} 52 | \bo{u} = \pi (\bo{x}, t) 53 | \end{equation} 54 | 55 | To connect with the previous ways we talked about control, we can say that choosing different control gains and different feed-forward control amounts to choosing a different control policy. 56 | 57 | \end{flushleft} 58 | \end{frame} 59 | 60 | 61 | 62 | 63 | \begin{frame}{Hamilton-Jacobi-Bellman equation} 64 | \framesubtitle{Cost, optimal cost} 65 | \begin{flushleft} 66 | 67 | Let $J$ be an additive cost function: 68 | 69 | \begin{equation} 70 | J (\bo{x}_0, \pi (\bo{x}, t)) = \int_0^\infty g(\bo{x}, \bo{u}) dt 71 | \end{equation} 72 | % 73 | where $g(\bo{x}, \bo{u})$ is instantaneous cost and $\bo{x}_0 = \bo{x}(0)$ is the initial conditions. Notice that $J$ depends on $\bo{x}_0$ rather than $\bo{x}(t)$, since initial conditions and control policy completely define the trajectory of the system $\bo{x}(t)$. 74 | 75 | 76 | \bigskip 77 | 78 | Let $J^*$ be the optimal (lowest possible) cost. In other words: 79 | 80 | \begin{equation} 81 | J^*(\bo{x}_0) = \underset{\pi}{\inf{}} J(\bo{x}_0, \pi (\bo{x}, t)) 82 | \end{equation} 83 | 84 | Optimal cost is attained when optimal policy is attained: $\pi = \pi^*(\bo{x}, t)$ 85 | 86 | \end{flushleft} 87 | \end{frame} 88 | 89 | 90 | 91 | 92 | 93 | \begin{frame}{Hamilton-Jacobi-Bellman equation} 94 | \framesubtitle{Differentiating optimal cost} 95 | \begin{flushleft} 96 | 97 | 98 | Since $J^*(\bo{x}_0)$ does not depend on $t$, its full derivative is zero: 99 | 100 | \begin{equation} 101 | \frac{d J^*(\bo{x}_0)}{dt} = 0 102 | \end{equation} 103 | 104 | At the same time, we can expand the full derivative as follows: 105 | 106 | \begin{equation} 107 | \frac{d J^*}{dt } = 108 | \frac{\partial J^*}{\partial \bo{x}} \dot {\bo{x}} + 109 | \frac{\partial J^*}{\partial t} = 0 110 | \end{equation} 111 | 112 | \bigskip 113 | 114 | Observe that $\frac{\partial J^*}{\partial t} = g(\bo{x}, \bo{u})$, and $\dot {\bo{x}} = \bo{f} (\bo{x}, \bo{u})$. Therefore: 115 | 116 | \begin{equation} 117 | \frac{\partial J^*}{\partial \bo{x}} \bo{f} (\bo{x}, \bo{u}) + 118 | g(\bo{x}, \bo{u}) = 0 119 | \end{equation} 120 | 121 | \end{flushleft} 122 | \end{frame} 123 | 124 | 125 | 126 | 127 | \begin{frame}{Hamilton-Jacobi-Bellman equation} 128 | % \framesubtitle{HJB} 129 | \begin{flushleft} 130 | 131 | With this, we can formulate \emph{Hamilton-Jacobi-Bellman equation} (HJB): 132 | 133 | \begin{equation} 134 | \label{eq:HJB_0} 135 | \underset{\bo{u}}{\min} \ 136 | \left[ 137 | g(\bo{x}, \bo{u}) + 138 | \frac{\partial J^*}{\partial \bo{x}} \bo{f} (\bo{x}, \bo{u}) 139 | \right] = 0 140 | \end{equation} 141 | 142 | This can be loosely interpreted as follows: the value in square brackets is $\dot J(\bo{x}_0, \pi)$, which is equal to 0 when $\pi = \pi^*(\bo{x}, t)$, and is positive otherwise (in the small vicinity of $\pi^*$), as $J(\bo{x}_0, \pi^*)$ is smaller than any $J(\bo{x}_0, \pi), \ \pi^* \neq \pi$. 143 | 144 | \bigskip 145 | 146 | 147 | We can find control that delivers minimum to the function \eqref{eq:HJB_0}: 148 | 149 | \begin{equation} 150 | u^* = \underset{\bo{u}}{\argmin} \ 151 | \left[ 152 | g(\bo{x}, \bo{u}) + 153 | \frac{\partial J^*}{\partial \bo{x}} \bo{f} (\bo{x}, \bo{u}) \right] 154 | \end{equation} 155 | 156 | \end{flushleft} 157 | \end{frame} 158 | 159 | 160 | 161 | 162 | 163 | \begin{frame}{Algebraic Riccati} 164 | \framesubtitle{HJB for LTI} 165 | \begin{flushleft} 166 | 167 | For LTI, dynamics is: 168 | \begin{equation} 169 | \dot {\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u} 170 | \end{equation} 171 | 172 | We can choose quadratic cost: 173 | \begin{equation} 174 | g(\mathbf x, \mathbf u) = 175 | \mathbf x^\top \bo{Q} \bo{x} + 176 | \mathbf u^\top \bo{R} \bo{u} 177 | \end{equation} 178 | 179 | Then HJB becomes: 180 | \begin{equation} 181 | \underset{\bo{u}}{\min} \ [ 182 | \bo{x}^\top \bo{Q} \bo{x} + 183 | \bo{u}^\top \bo{R} \bo{u} + 184 | \frac{\partial J^*}{\partial \bo{x}} 185 | (\bo{A} \bo{x} + \bo{B} \bo{u})] = 0 186 | \end{equation} 187 | % 188 | where $\bo{Q} = \bo{Q}^\top \geq 0 $ and $\bo{R} = \bo{R}^\top > 0$. 189 | 190 | \end{flushleft} 191 | \end{frame} 192 | 193 | 194 | \begin{frame}{Algebraic Riccati} 195 | \framesubtitle{HJB for LTI, part 2} 196 | \begin{flushleft} 197 | 198 | There is a theorem that says that for LTI with quadratic cost, $J^*$ has the form: 199 | 200 | \begin{equation} 201 | J^* = \mathbf x^\top \bo{S} \bo{x} 202 | \end{equation} 203 | % 204 | where $\bo{S} = \bo{S}^\top \geq 0$. 205 | 206 | \bigskip 207 | 208 | Then HJB becomes: 209 | 210 | \[ 211 | \underset{\bo{u}}{\min} \ 212 | \left [ 213 | \mathbf x^\top \bo{Q} \bo{x} + 214 | \mathbf u^\top \bo{R} \bo{u} 215 | + 216 | \bo{x}^\top \bo{S} 217 | (\bo{A} \bo{x} + \bo{B} \bo{u}) 218 | + 219 | (\bo{A} \bo{x} + \bo{B} \bo{u})^\top 220 | \bo{S} \bo{x} 221 | \right ] = 0 222 | \] 223 | 224 | Simplifying, we get: 225 | 226 | \[ 227 | \underset{\bo{u}}{\min} \ 228 | \left [ 229 | \bo{u}^\top \bo{R} \bo{u} 230 | + 231 | \bo{x}^\top ( 232 | \bo{Q} + \bo{S} \bo{A} + \bo{A}^\top \bo{S} 233 | )\bo{x} 234 | + 235 | \bo{x}^\top \bo{S} \bo{B} \bo{u} 236 | + \bo{u}^\top \bo{B}^\top \bo{S} \bo{x} 237 | \right ] = 0 238 | \] 239 | 240 | \end{flushleft} 241 | \end{frame} 242 | 243 | 244 | \begin{frame}{Algebraic Riccati} 245 | \framesubtitle{Linear Quadratic Regulator} 246 | \begin{flushleft} 247 | 248 | 249 | Finding partial derivative of the HJB with respect to $\bo{u}$ and setting it to zero (as it is an extreme point) we get: 250 | \begin{equation} 251 | 2 \mathbf u^\top \bo{R} + 252 | 2 \bo{x}^\top \bo{S} \bo{B} = 0 253 | \end{equation} 254 | 255 | This expression can be transposed and $\mathbf u$ separated: 256 | 257 | \begin{equation} 258 | \mathbf u = 259 | -\bo{R}^{-1} \bo{B}^\top \bo{S} \bo{x} 260 | \end{equation} 261 | 262 | This is the desired control law. We can see that it is \emph{proportional}. We can re-write it as: 263 | 264 | \begin{equation} 265 | \mathbf u = -\mathbf K \bo{x} 266 | \end{equation} 267 | 268 | where $\mathbf K = \bo{R}^{-1} \bo{B}^\top \bo{S}$ is the controller gain. This control law is called Linear Quadratic Regulator (LQR). 269 | 270 | \end{flushleft} 271 | \end{frame} 272 | 273 | 274 | 275 | 276 | 277 | \begin{frame}{Algebraic Riccati} 278 | % \framesubtitle{Algebraic Riccati} 279 | \begin{flushleft} 280 | 281 | Substituting found control law into the HJB, we find: 282 | \begin{equation} 283 | \begin{split} 284 | \underset{\bo{u}}{\min} \ 285 | [ 286 | \bo{x}^\top ( 287 | \bo{Q} + \bo{S} \bo{A} + \bo{A}^\top \bo{S} 288 | )\bo{x} 289 | + 290 | \bo{x}^\top \bo{S} \bo{B} \bo{R}^{-1} \bo{R} \mathbf R^{-1} \bo{B}^\top \bo{S} \bo{x} 291 | - \\ 292 | - 293 | \bo{x}^\top \bo{S} \bo{B} \bo{R}^{-1} \bo{B}^\top \bo{S} \bo{x} 294 | - 295 | \bo{x}^\top\bo{S} \bo{B} \bo{R}^{-1} \bo{B}^\top \bo{S} \bo{x} 296 | ] = 0 297 | \end{split} 298 | \end{equation} 299 | 300 | Simplifying, we get: 301 | 302 | \begin{equation} 303 | \bo{x}^\top (\bo{Q} + \bo{S} \bo{A} + \bo{A}^\top \bo{S} 304 | - \bo{S} \bo{B} \bo{R}^{-1} \bo{B}^\top \bo{S}) \bo{x} = 0 305 | \end{equation} 306 | % 307 | which would hold for all $\bo{x}$ iff: 308 | % 309 | 310 | \begin{equation} 311 | \bo{Q} - \bo{S} \bo{B} \bo{R}^{-1} \bo{B}^\top \bo{S} 312 | + \bo{S} \bo{A} + \bo{A}^\top \bo{S} = 0 313 | \end{equation} 314 | 315 | This is the \emph{Algebraic Riccati equation}. 316 | 317 | \end{flushleft} 318 | \end{frame} 319 | 320 | \begin{frame}{Algebraic Riccati} 321 | \framesubtitle{Numerical methods} 322 | \begin{flushleft} 323 | 324 | There are a number of ways to solve LQR: 325 | 326 | \bigskip 327 | 328 | \begin{itemize} 329 | \item In MATLAB there is a function \texttt{[K,S,P] = lqr(A,B,Q,R), where P=eig(A-B*K)} 330 | \item In Python, there is \texttt{S = scipy.linalg.solve\_continuous\_are(A,B,Q,R)} 331 | \item In Drake (by MIT and Toyota Research) there is a function \texttt{(K,S) = LinearQuadraticRegulator(A,B,Q,R)} 332 | \end{itemize} 333 | 334 | \end{flushleft} 335 | \end{frame} 336 | 337 | 338 | 339 | 340 | \begin{frame}{Thank you!} 341 | \centerline{Lecture slides are available via Moodle.} 342 | \bigskip 343 | \centerline{You can help improve these slides at:} 344 | \centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 345 | \bigskip 346 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 347 | \end{frame} 348 | 349 | \end{document} 350 | -------------------------------------------------------------------------------- /Slides/ColumnLeftNull/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Column space, Left Null space, control applications} 7 | \subtitle{Control Theory, Lecture 7} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | 20 | \begin{itemize} 21 | \item Column space 22 | \item Column space basis 23 | \item Column space and null space 24 | \item Projector onto column space 25 | \item Left null space 26 | \item Finding fixed points 27 | \item Checking fixed points 28 | \item Correcting fixed points 29 | \item Finding fixed points for affine systems 30 | % \item Read more 31 | \end{itemize} 32 | 33 | \end{frame} 34 | 35 | 36 | 37 | 38 | 39 | \begin{frame}{Column space} 40 | % \framesubtitle{Parameter estimation} 41 | \begin{flushleft} 42 | 43 | Consider the following task: find all vectors $\bo{y}$ such that $\bo{y} = \bo{A} \bo{x}$. 44 | 45 | \bigskip 46 | 47 | It can be re-formulated as follows: find all elements of the \emph{column space} of $\bo{A}$. 48 | 49 | \begin{block}{Definition 1} 50 | \emph{Column space} of $\bo{A}$ is the set of all outputs of the matrix $\bo{A}$, for all possible inputs 51 | \end{block} 52 | 53 | \bigskip 54 | 55 | We will denote column space as $\mathcal{C}(\bo{A})$. In the literature, it is often called an \emph{image} of $\bo{A}$. 56 | 57 | \end{flushleft} 58 | \end{frame} 59 | 60 | 61 | 62 | \begin{frame}{Column space basis} 63 | % \framesubtitle{Example} 64 | \begin{flushleft} 65 | 66 | The problem of finding orthonormal basis in the column space of a matrix is often called \emph{orthonormalization} of that matrix. Hence in MATLAB and Python/Scipy the function that does it is called \texttt{orth}: 67 | 68 | \bigskip 69 | 70 | \begin{itemize} 71 | \item \texttt{C = orth(A)}. 72 | \item \texttt{C = scipy.linalg.orth(A)}. 73 | \end{itemize} 74 | 75 | \bigskip 76 | 77 | That is how one finds all the outputs of the matrix $\bo{A}$: as $\{ \bo{C}\bo{z}: \ \forall \bo{z} \}$. 78 | 79 | Notice that $\{ \bo{A}\bo{x}: \ \forall \bo{x} \}$ might contain repeated entries if $\bo{A}$ has a non-trivial null space. 80 | 81 | \end{flushleft} 82 | \end{frame} 83 | 84 | 85 | 86 | \begin{frame}{Column space and null space} 87 | % \framesubtitle{Local coordinates} 88 | \begin{flushleft} 89 | 90 | Let $\bo{A}$ be a square matrix, a map from $\mathbb{X} = \R^n$ to $\mathbb{Y} = \R^n$. Notice that if it has a non-trivial null space, it follows that multiple unique inputs are being mapped by it to the same output: 91 | 92 | \begin{equation} 93 | \begin{aligned} 94 | \bo{y} = \bo{A} \bo{x}_r = \bo{A} (\bo{x}_r + \bo{x}_n), \\ 95 | \bo{x}_r \in \mathcal{R}(\bo{A}) \\ 96 | \forall \bo{x}_n \in \mathcal{N}(\bo{A}) \\ 97 | \end{aligned} 98 | \end{equation} 99 | 100 | In fact, if null space of $\bo{A}$ has $k$ dimensions, it implies that an $n$-dimentional subspace of $\mathbb{X}$ is mapped to a single element of $\mathbb{Y}$. 101 | 102 | \bigskip 103 | 104 | It follows that in this case the dimensionality of the column space could not exceed $n-k$. 105 | 106 | \end{flushleft} 107 | \end{frame} 108 | 109 | 110 | 111 | \begin{frame}{Projector onto column space} 112 | % \framesubtitle{Local coordinates} 113 | \begin{flushleft} 114 | 115 | Given vector $\bo{y}$ and matrix $\bo{A}$, let us find projector of $\bo{y}$ onto the column space of $\bo{A}$. 116 | 117 | \bigskip 118 | 119 | This is done in the same manner as we did with the null space: 120 | 121 | \begin{equation} 122 | \bo{y}_c = \bo{A}\bo{A}^+ \bo{y} \in \mathcal{C}(\bo{A}) 123 | \end{equation} 124 | 125 | This feels nice, as it only requires the matrix itself, no need for the orthonormal basis as before. However, you need to remember that the pseudoinverse is base on SVD decomposition, same as operations of finding a basis in the null space or column space. 126 | 127 | \end{flushleft} 128 | \end{frame} 129 | 130 | 131 | 132 | \begin{frame}{Projector onto row space} 133 | % \framesubtitle{Local coordinates} 134 | \begin{flushleft} 135 | 136 | In the same we can define a projector onto row space. Given vector $\bo{x}$ and matrix $\bo{A}$, let us find projector of $\bo{x}$ onto the row space of $\bo{A}$: 137 | 138 | \begin{equation} 139 | \bo{x}_r = \bo{A}^+\bo{A} \bo{x} \in \mathcal{R}(\bo{A}) 140 | \end{equation} 141 | 142 | You can think of this in the following terms: first we find what output $\bo{x}$ makes, then we find the smallest norm vector that produces this same output, and this vector has to 1) have the same row space projector (because output is the same), 2) has to lie in the row space, hence it is the row space projector of $\bo{x}$. 143 | 144 | \end{flushleft} 145 | \end{frame} 146 | 147 | 148 | 149 | 150 | \begin{frame}{Left null space} 151 | % \framesubtitle{Local coordinates} 152 | \begin{flushleft} 153 | 154 | The subspace, orthogonal to the column space is called \emph{left null space}. 155 | 156 | \bigskip 157 | 158 | \begin{definition} 159 | Space of all vectors that can't be produced as outputs of matrix $\bo{A}$ is called \emph{left null space}. Zero vector is included, as in linear spaces. 160 | \end{definition} 161 | 162 | \bigskip 163 | 164 | If we want to project vector $\bo{y}$ onto the left null space of $\bo{A}$, we do it as: 165 | 166 | \begin{equation} 167 | \bo{y}_l = (\bo{I} - \bo{A}\bo{A}^+) \bo{y} \in \mathcal{C}^\perp(\bo{A}) 168 | \end{equation} 169 | 170 | \end{flushleft} 171 | \end{frame} 172 | 173 | 174 | 175 | 176 | \begin{frame}{Finding fixed points} 177 | % \framesubtitle{Parameter estimation} 178 | \begin{flushleft} 179 | 180 | Given LTI system $\dot{\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u}$, where $\bo{x} \in \R^n$, $\bo{u} \in \R^m$, 1) find if there are states that can be made into fixed points, 2) find all states that can be made into fixed points with a constant control law. 181 | 182 | \bigskip 183 | 184 | Solution: 185 | 186 | \begin{enumerate} 187 | \item Yes, state $\bo{x} = \bo{0}$ becomes a fixed point under control law $\bo{u} = \bo{0}$ or $\bo{u} = -\bo{K}\bo{x}$. 188 | \item Let us find null space of the matrix $\begin{bmatrix} \bo{A} & \bo{B} \end{bmatrix}$ as $\bo{N} = \text{null} (\begin{bmatrix} \bo{A} & \bo{B} \end{bmatrix})$. We can find all $\bo{x}$, $\bo{u}$ pairs that produce fixed points as follows: $\begin{bmatrix} \bo{x} \\ \bo{u} \end{bmatrix} = \bo{N} \bo{z}$, $\forall \bo{z}$. Let $\bo{N}_x$ be the first $n$ rows of $\bo{N}$. Then all states that can be made into fixed points are given as $\bo{x}^* = \bo{N}_x \bo{z}_x$, $\forall \bo{z}_x$ 189 | \end{enumerate} 190 | 191 | \end{flushleft} 192 | \end{frame} 193 | 194 | 195 | \begin{frame}{Checking fixed points} 196 | % \framesubtitle{Parameter estimation} 197 | \begin{flushleft} 198 | 199 | Given LTI system $\dot{\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u}$, where $\bo{x} \in \R^n$, $\bo{u} \in \R^m$, 1) check if $\bo{x}^*$ can be made into a fixed point, 2) find control constant $\bo{u}^*$ that does it, given control law $\bo{u} = -\bo{K}\bo{x} + \bo{u}^*$. 200 | 201 | \bigskip 202 | 203 | Solution: 204 | 205 | \begin{enumerate} 206 | \item We can check that $(\bo{A}-\bo{B}\bo{K}) \bo{x}^* + \bo{B} \bo{u}^* = \bo{0}$ has a solution, in other words that $-(\bo{A}-\bo{B}\bo{K}) \bo{x}^* \in \text{col}(\bo{B})$. Resulting condition is given via projection into the left null space of $\bo{B}$: $(\bo{I} - \bo{B}\bo{B}^+)(\bo{A}-\bo{B}\bo{K})\bo{x}^* = \bo{0}$ 207 | \item This means finding such $\bo{u}^*$ that $(\bo{A}-\bo{B}\bo{K}) \bo{x}^* + \bo{B}\bo{u}^*= \bo{0}$. This is done via pseudo-inverse, which provides exact solution, as long as it exists: $\bo{u}^*= -\bo{B}^+(\bo{A}-\bo{B}\bo{K}) \bo{x}^*$. 208 | \end{enumerate} 209 | 210 | \end{flushleft} 211 | \end{frame} 212 | 213 | 214 | 215 | 216 | \begin{frame}{Correcting fixed points} 217 | % \framesubtitle{Parameter estimation} 218 | \begin{flushleft} 219 | 220 | Given LTI system $\dot{\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u}$, where $\bo{x} \in \R^n$, $\bo{u} \in \R^m$, and a state $\bo{x}^d$ which can not be made into a fixed point under constant control law, find the closest to it state $\bo{x}^f$ which can be made into a fixed point. 221 | 222 | \bigskip 223 | 224 | As we know from the first example, for this LTI system all fixed points under constant control are given as $\bo{x}^* = \bo{N}_x \bo{z}_x$. To find the closest point to a given vector in a subspace, you project the vector into that subspace. In this case, we project $\bo{x}^d$ to the column space (span) of $\bo{N}_x$: 225 | 226 | \begin{equation} 227 | \bo{x}^f = \bo{N}_x\bo{N}_x^+ \bo{x}^d 228 | \end{equation} 229 | 230 | \end{flushleft} 231 | \end{frame} 232 | 233 | 234 | 235 | \begin{frame}{Finding fixed points for affine systems} 236 | % \framesubtitle{Parameter estimation} 237 | \begin{flushleft} 238 | 239 | Given LTI system $\dot{\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u} + \bo{c}$, where $\bo{x} \in \R^n$, and control law $\bo{u} = -\bo{K}\bo{x} + \bo{u}^*$, find all states that can be made fixed points by choosing appropriate $\bo{u}^*$. 240 | 241 | \bigskip 242 | 243 | We are required to find all solutions to the equation $(\bo{A} - \bo{B}\bo{K})\bo{x}^* + \bo{B}\bo{u}^* + \bo{c} = \bo{0}$. Let us define state-control pairs $\bo{v} = \begin{bmatrix} \bo{x} \\ \bo{u} \end{bmatrix}$. 244 | 245 | \bigskip 246 | 247 | We can easily find particular solution to this linear system: $\bo{v}^p = -\begin{bmatrix} (\bo{A} - \bo{B}\bo{K}) & \bo{B} \end{bmatrix}^+\bo{c}$. 248 | 249 | \bigskip 250 | 251 | Finding null space basis $\bo{N}$ for the matrix of this linear system: $\bo{N} = \text{null}(\begin{bmatrix} (\bo{A} - \bo{B}\bo{K}) & \bo{B} \end{bmatrix})$ we get the general solution as follows: $\bo{v}^* = \bo{v}^p + \bo{N}\bo{z}$. First $n$ equations in the expression defining $\bo{v}^*$ give us $\bo{x}^*$, the rest - $\bo{u}^*$. 252 | 253 | \end{flushleft} 254 | \end{frame} 255 | 256 | 257 | 258 | 259 | \begin{frame}{Thank you!} 260 | \centerline{Lecture slides are available via Moodle.} 261 | \bigskip 262 | \centerline{You can help improve these slides at:} 263 | \centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 264 | \bigskip 265 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 266 | \end{frame} 267 | 268 | \end{document} 269 | -------------------------------------------------------------------------------- /Slides/Introduction/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Introduction, linear system representations} 7 | \subtitle{Control Theory, Lecture 1} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | 20 | \begin{itemize} 21 | \item Motivation 22 | \item Ordinary differential equations 23 | \begin{itemize} 24 | \item 1st order 25 | \item n-th order 26 | \end{itemize} 27 | \item Linear differential equations 28 | \begin{itemize} 29 | \item 1st order 30 | \item n-th order 31 | \item ...are what we will study 32 | \end{itemize} 33 | \item Changing n-th order ODE to a State-Space form 34 | \item Read more 35 | \end{itemize} 36 | 37 | \end{frame} 38 | 39 | 40 | 41 | \begin{frame}{What is control?} 42 | % \framesubtitle{O} 43 | \begin{flushleft} 44 | 45 | The first obvious question is, what is control theory? The easiest strategy to answer this question is to bring examples of systems that you can \emph{learn how to control}: 46 | 47 | \begin{figure} 48 | \minipage{0.45\textwidth} 49 | \includegraphics[width=\linewidth]{Picture1.jpg} 50 | \caption{Drone} 51 | \endminipage\hfill 52 | \minipage{0.45\textwidth} 53 | \includegraphics[width=\linewidth]{Picture2.jpg} 54 | \caption{Robot arms} 55 | \endminipage 56 | 57 | \end{figure} 58 | 59 | But beware, this is not the whole answer! 60 | 61 | \end{flushleft} 62 | \end{frame} 63 | 64 | 65 | 66 | \begin{frame}{Why Control?} 67 | % \framesubtitle{Part 1} 68 | \begin{flushleft} 69 | 70 | The second most natural question to ask is - why do we need to study Control Theory? \emph{Why do Computer scientists need Control Theory?} 71 | 72 | \bigskip 73 | 74 | \begin{exampleblock}{The easy answer is:} 75 | it is very useful in case you will work in robotics, industrial automation, self-driving vehicles, drones, aerospace, etc. 76 | \end{exampleblock} 77 | 78 | \bigskip 79 | 80 | \begin{alertblock}{But!} 81 | this answer does not tell the main part of the story - what about people who are NOT going to work in the listed areas? 82 | \end{alertblock} 83 | 84 | \end{flushleft} 85 | \end{frame} 86 | 87 | 88 | \begin{frame}{Control as an applied problem} 89 | \begin{flushleft} 90 | 91 | We propose to view Control Theory as not only yet-another-subject. Instead we can try to see Control Theory course as \textbf{an application of your combined skills as a CS student} 92 | 93 | \end{flushleft} 94 | \end{frame} 95 | 96 | 97 | \begin{frame}{Control as an applied problem} 98 | \framesubtitle{Skills you will learn and practice} 99 | \begin{flushleft} 100 | 101 | In this course we provide you with learning and practical tasks that require: 102 | 103 | \begin{itemize} 104 | \item Linear Algebra, Differential Equations, Computational methods 105 | \item Dynamical systems, Stability (concept build on top of Theory of Ordinary Differential Equations). 106 | % \item Linear dynamical systems (a deep look into one of the most useful and reach in scientific results areas of dynamical systems theory) 107 | 108 | \item Simulation of dynamical systems (closely related to computational methods in Differential Equations), as a programming problem. 109 | \item Development of experiments in Google Colab, using Python, mathematical libraries, solving concrete, real world-related math-oriented problems. 110 | 111 | \item Representation (parametrization) of equations as a tool in both mathematical analysis and simulation, software development and problem solving. 112 | 113 | \item ...and many other things. 114 | \end{itemize} 115 | 116 | \end{flushleft} 117 | \end{frame} 118 | 119 | 120 | \begin{frame}{...so, why Control?} 121 | % \framesubtitle{Part 1} 122 | \begin{flushleft} 123 | 124 | Control Theory, as given here, is focused on: 125 | 126 | \begin{enumerate} 127 | \item Giving you challenge to simultaneously learn a new concepts, new general and subject-specific math, and new programming tools. 128 | \item Providing you with clear outcomes in terms of \emph{understanding} and ability to \emph{solve well-defined and meaningful real-world problems}. 129 | \item Being very useful for those who will proceed to work in robotics, automation, self-driving vehicles, drones, etc. 130 | \end{enumerate} 131 | 132 | See it as a test case for your abilities as a CS specialist. 133 | 134 | \end{flushleft} 135 | \end{frame} 136 | 137 | 138 | 139 | \begin{frame}{Enough for the motivation} 140 | % \framesubtitle{Part 1} 141 | \begin{flushleft} 142 | 143 | 144 | \begin{exampleblock}{Now that we know (kinda) why we do it:} 145 | 146 | \hfill \break 147 | Let's start with the content of the course! 148 | \newline 149 | 150 | \end{exampleblock} 151 | 152 | \end{flushleft} 153 | \end{frame} 154 | 155 | 156 | 157 | 158 | \begin{frame}{Ordinary differential equations} 159 | \framesubtitle{1st order} 160 | \begin{flushleft} 161 | 162 | Let us remember the normal form of first-order \emph{ordinary differential equations (ODEs):} 163 | 164 | \begin{equation} 165 | \dot{\bo{x}} = \bo{f} (\bo{x}, t) 166 | \end{equation} 167 | 168 | where $\bo{x} = \bo{x}(t)$ is the solution of the equation and $t$ is a free variable. 169 | 170 | \bigskip 171 | 172 | \begin{definition} 173 | We can call this equation (same as any other ODE) a \emph{dynamical system}, and $\bo{x}$ is called the \emph{state} of the dynamical system. 174 | \end{definition} 175 | 176 | \begin{example} 177 | \begin{equation} 178 | \dot{x} = -3 x^3 - 7 179 | \end{equation} 180 | \end{example} 181 | 182 | \end{flushleft} 183 | \end{frame} 184 | 185 | 186 | 187 | 188 | 189 | 190 | \begin{frame}{Ordinary differential equations} 191 | \framesubtitle{n-th order} 192 | \begin{flushleft} 193 | 194 | The normal form of an \emph{n-th order} ordinary differential equation is: 195 | 196 | \begin{equation} 197 | \bo{x}^{(n)} = \bo{f} (\bo{x}^{(n-1)}, \bo{x}^{(n-2)}, ..., \ddot{\bo{x}}, \dot{\bo{x}}, \bo{x}, t) 198 | \end{equation} 199 | 200 | where $\bo{x} = \bo{x}(t)$ is the solution of the equation. Same as before, it is a \emph{dynamical system}, but this time the set $\{ \bo{x}, \ \dot{\bo{x}} \ ..., \ \bo{x}^{(n-1)} \}$ is called the \emph{state} of the dynamical system. 201 | 202 | \begin{example} 203 | \begin{equation} 204 | \ddot{x} = cos(2\dot{\bo{x}}) - 10 x + 7 205 | \end{equation} 206 | \end{example} 207 | 208 | 209 | \begin{example} 210 | \begin{equation} 211 | \begin{cases} 212 | \dddot{x}_1 = \dot{x}_1 + x_1 + x_2^2 - 4 \\ 213 | \dddot{x}_2 = 10 x_1^3 + \ddot{x}_2 214 | \end{cases} 215 | \end{equation} 216 | \end{example} 217 | 218 | \end{flushleft} 219 | \end{frame} 220 | 221 | 222 | 223 | 224 | \begin{frame}{Linear differential equations} 225 | \framesubtitle{1st order} 226 | \begin{flushleft} 227 | 228 | Linear ODEs of the first order have normal form: 229 | 230 | \begin{equation} 231 | \dot{\bo{x}} = \bo{A} \bo{x} + \bo{b} 232 | \end{equation} 233 | 234 | \begin{example} 235 | \begin{equation} 236 | \begin{cases} 237 | \dot{x}_1 = -20 x_1 + 7 x_2 + 17 \\ 238 | \dot{x}_2 = 10.5 x_1 - 3 x_2 - 5 239 | \end{cases} 240 | \end{equation} 241 | \end{example} 242 | 243 | \begin{example} 244 | \begin{equation} 245 | \begin{bmatrix} 246 | \dot{x}_1 \\ 247 | \dot{x}_2 \\ 248 | \dot{x}_3 249 | \end{bmatrix} 250 | = 251 | \begin{bmatrix} 252 | -8 & 5 & 2 \\ 253 | 0.5 & -10 & -2 \\ 254 | 1 & -1 & -20 255 | \end{bmatrix} 256 | \begin{bmatrix} 257 | x_1 \\ 258 | x_2 \\ 259 | x_3 260 | \end{bmatrix} 261 | + 262 | \begin{bmatrix} 263 | 4 \\ 264 | 10 \\ 265 | -5 266 | \end{bmatrix} 267 | \end{equation} 268 | \end{example} 269 | 270 | \end{flushleft} 271 | \end{frame} 272 | 273 | 274 | 275 | 276 | \begin{frame}{Linear differential equations} 277 | \framesubtitle{n-th order} 278 | \begin{flushleft} 279 | 280 | A single linear ODE of the n-th order are often written in the form: 281 | 282 | \begin{equation} 283 | a_n x^{(n)} + a_{(n-1)} x^{(n-1)} + 284 | ... + 285 | a_2 \ddot{x} + a_1 \dot{x} + 286 | a_0 x = b 287 | \end{equation} 288 | 289 | \begin{example} 290 | \begin{equation} 291 | 12 \dddot{x} - 292 | 3 \ddot{x} + 5.5 \dot{x} + 293 | 2 x = 10.5 294 | \end{equation} 295 | \end{example} 296 | 297 | \begin{example} 298 | \begin{equation} 299 | 5 \ddot{x} - 2 \dot{x} + 300 | 10 x = 2 301 | \end{equation} 302 | \end{example} 303 | 304 | \end{flushleft} 305 | \end{frame} 306 | 307 | 308 | \begin{frame}{Linear differential equations} 309 | \framesubtitle{...are what we will study} 310 | \begin{flushleft} 311 | 312 | In this course we will focus entirely on linear dynamical systems. In particular, we will take a good use of the following two forms: 313 | 314 | \begin{equation} 315 | a_n x^{(n)} + a_{(n-1)} x^{(n-1)} + 316 | ... + 317 | a_2 \ddot{x} + a_1 \dot{x} + 318 | a_0 x = b 319 | \end{equation} 320 | 321 | \begin{equation} 322 | \dot{\bo{x}} = \bo{A} \bo{x} + \bo{b} 323 | \end{equation} 324 | 325 | the last one is called \emph{state-space representation}. 326 | 327 | \begin{exampleblock}{Good news:} 328 | 329 | \hfill \break 330 | Both of those can be used to express any linear system, hence we can change one into the other. 331 | \newline 332 | 333 | \end{exampleblock} 334 | 335 | \end{flushleft} 336 | \end{frame} 337 | 338 | 339 | 340 | 341 | \begin{frame}{Changing n-th order ODE to a State-Space form} 342 | % \framesubtitle{...are what we will study} 343 | \begin{flushleft} 344 | 345 | Consider eq. $\dddot{x} + a_2 \ddot{x} + a_1 \dot{x} + a_0 x = b$. 346 | 347 | \bigskip 348 | 349 | Make a substitution: $z_1 = x$, $z_2 = \dot{x}$, $z_3 = \ddot{x}$. Therefore: 350 | 351 | \begin{equation} 352 | \begin{cases} 353 | \dot{z}_1 = \dot{x} = z_2 \\ 354 | \dot{z}_2 = \ddot{x} = z_3 \\ 355 | \dot{z}_3 = -a_2 \ddot{x} - a_1 \dot{x} - a_0 x + b = 356 | -a_2 z_3 - a_1 z_2 - a_0 z_1 + b 357 | \end{cases} 358 | \end{equation} 359 | 360 | Which can be directly put in the state-space form: 361 | 362 | \begin{equation} 363 | \begin{bmatrix} 364 | \dot{z}_1 \\ \dot{z}_2 \\ \dot{z}_3 365 | \end{bmatrix} 366 | = 367 | \begin{bmatrix} 368 | 0 & 1 & 0 \\ 369 | 0 & 0 & 1 \\ 370 | -a_0 & -a_1 & -a_2 371 | \end{bmatrix} 372 | \begin{bmatrix} 373 | z_1 \\ z_2 \\ z_3 374 | \end{bmatrix} 375 | + 376 | \begin{bmatrix} 377 | 0 \\ 0 \\ b 378 | \end{bmatrix} 379 | \end{equation} 380 | 381 | 382 | \end{flushleft} 383 | \end{frame} 384 | 385 | 386 | 387 | 388 | \begin{frame}{Read more} 389 | 390 | \begin{itemize} 391 | \item State Space Representations of Linear Physical Systems \href{https://lpsa.swarthmore.edu/Representations/SysRepSS.html}{lpsa.swarthmore.edu/Representations/SysRepSS.html} 392 | 393 | \item Transformation: Differential Equation to State Space \href{https://lpsa.swarthmore.edu/Representations/SysRepTransformations/DE2SS.html}{lpsa.swarthmore.edu/.../DE2SS.html} 394 | \end{itemize} 395 | 396 | \end{frame} 397 | 398 | 399 | 400 | \begin{frame}{Thank you!} 401 | \centerline{Lecture slides are available via Moodle.} 402 | \bigskip 403 | \centerline{You can help improve these slides at:} 404 | \centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 405 | \bigskip 406 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 407 | \end{frame} 408 | 409 | \end{document} 410 | -------------------------------------------------------------------------------- /ColabNotebooks/lecture8_LyapunovEq.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "LyapunovEq.ipynb", 7 | "provenance": [], 8 | "include_colab_link": true 9 | }, 10 | "kernelspec": { 11 | "name": "python3", 12 | "display_name": "Python 3" 13 | } 14 | }, 15 | "cells": [ 16 | { 17 | "cell_type": "markdown", 18 | "metadata": { 19 | "id": "view-in-github", 20 | "colab_type": "text" 21 | }, 22 | "source": [ 23 | "\"Open" 24 | ] 25 | }, 26 | { 27 | "cell_type": "markdown", 28 | "metadata": { 29 | "id": "3ncmZERaeTOW" 30 | }, 31 | "source": [ 32 | "# Lyapunov equations\n", 33 | "\n", 34 | "Lyapunov equations for continious systems has form:\n", 35 | "\n", 36 | "$AP + PA^{\\top} =-Q$\n", 37 | "\n", 38 | "and for discrete systems it is \n", 39 | "\n", 40 | "$A P A^{\\top} - P = -Q$\n", 41 | "\n", 42 | "As long as there exists such positive definite $P$ that Lyapunov equations holds for a positive definite $Q$, the system is stable.\n", 43 | "\n", 44 | "Let's see it in code:" 45 | ] 46 | }, 47 | { 48 | "cell_type": "code", 49 | "metadata": { 50 | "colab": { 51 | "base_uri": "https://localhost:8080/" 52 | }, 53 | "id": "fIlKWi1heNiV", 54 | "outputId": "47c52c5d-ac5b-4e5f-eeee-c9547cb90fd0" 55 | }, 56 | "source": [ 57 | "import numpy as np\n", 58 | "from scipy.linalg import solve_continuous_lyapunov\n", 59 | "from scipy.linalg import solve_discrete_lyapunov\n", 60 | "from scipy.linalg import eig\n", 61 | "\n", 62 | "\n", 63 | "Q = np.array([[-1, 0], [0, -1]])\n", 64 | "\n", 65 | "A = np.array([[-10, 5], [-5, -10]])\n", 66 | "e, v = eig(A)\n", 67 | "print(\"eig(A):\\n\", e)\n", 68 | "\n", 69 | "P = solve_continuous_lyapunov(A, Q)\n", 70 | "print(\"P\", P)\n", 71 | "e, v = eig((A.transpose().dot(P) + P.dot(A)))\n", 72 | "print(\"eig(A'P + P*A):\\n\", e)\n", 73 | "print(\" \")\n", 74 | "print(\" \")\n", 75 | "\n", 76 | "\n", 77 | "A = np.array([[0.9, 0.5], [-0.2, -0.8]])\n", 78 | "e, v = eig(A)\n", 79 | "print(\"eig(A)\", e)\n", 80 | "\n", 81 | "P = solve_discrete_lyapunov(A, Q)\n", 82 | "print(\"P\", P)\n", 83 | "print(\"(A'PA - P + Q ):\")\n", 84 | "print(((A.dot(P)).dot(A.transpose()) - P + Q))\n" 85 | ], 86 | "execution_count": null, 87 | "outputs": [ 88 | { 89 | "output_type": "stream", 90 | "text": [ 91 | "eig(A) [-10.+5.j -10.-5.j]\n", 92 | "P [[ 5.00000000e-02 7.34706413e-20]\n", 93 | " [-1.24900090e-18 5.00000000e-02]]\n", 94 | "eig(A'P + P*A) [-1.+0.j -1.+0.j]\n", 95 | " \n", 96 | " \n", 97 | "eig(A) [ 0.83898669+0.j -0.73898669+0.j]\n", 98 | "P [[-4.03347296 0.9268445 ]\n", 99 | " [ 0.9268445 -2.40207966]]\n", 100 | "(A'PA - P + Q ):\n", 101 | "[[0.00000000e+00 3.33066907e-16]\n", 102 | " [1.11022302e-16 4.44089210e-16]]\n" 103 | ], 104 | "name": "stdout" 105 | } 106 | ] 107 | }, 108 | { 109 | "cell_type": "markdown", 110 | "metadata": { 111 | "id": "FdmioTfehF-z" 112 | }, 113 | "source": [ 114 | "Test the following systems' stability:" 115 | ] 116 | }, 117 | { 118 | "cell_type": "markdown", 119 | "metadata": { 120 | "id": "W0mjs9LugtlN" 121 | }, 122 | "source": [ 123 | "\n", 124 | "$$x_{i+1} = \n", 125 | "\\begin{pmatrix} 1.5 & 0.2 \\\\ -0.15 & 0.23\n", 126 | "\\end{pmatrix}\n", 127 | "x_i\n", 128 | "$$\n", 129 | "\n", 130 | "\n", 131 | "$$x_{i+1} = \n", 132 | "\\begin{pmatrix} -1 & -1 \\\\ -2 & 0.1\n", 133 | "\\end{pmatrix}\n", 134 | "x_i\n", 135 | "$$\n", 136 | "\n", 137 | "\n", 138 | "$$x_{i+1} = \n", 139 | "\\begin{pmatrix} -3 & -1 \\\\ -1.5 & -10.3\n", 140 | "\\end{pmatrix}\n", 141 | "x_i\n", 142 | "$$\n", 143 | "\n", 144 | "\n", 145 | "$$x_{i+1} = \n", 146 | "\\begin{pmatrix} -0.2 & -1 \\\\ 1.7 & 1.1\n", 147 | "\\end{pmatrix}\n", 148 | "x_i\n", 149 | "$$" 150 | ] 151 | }, 152 | { 153 | "cell_type": "markdown", 154 | "metadata": { 155 | "id": "XIJZDiUmhvWv" 156 | }, 157 | "source": [ 158 | "Test stability of continious systems with the same state matrices:\n", 159 | "\n", 160 | "\n", 161 | "$$\\dot x = \n", 162 | "\\begin{pmatrix} 1.5 & 0.2 \\\\ -0.15 & 0.23\n", 163 | "\\end{pmatrix}\n", 164 | "x\n", 165 | "$$\n", 166 | "\n", 167 | "\n", 168 | "$$\\dot x = \n", 169 | "\\begin{pmatrix} -1 & -1 \\\\ -2 & 0.1\n", 170 | "\\end{pmatrix}\n", 171 | "x\n", 172 | "$$\n", 173 | "\n", 174 | "\n", 175 | "$$\\dot x = \n", 176 | "\\begin{pmatrix} -3 & -1 \\\\ -1.5 & -10.3\n", 177 | "\\end{pmatrix}\n", 178 | "x\n", 179 | "$$\n", 180 | "\n", 181 | "\n", 182 | "$$\\dot x = \n", 183 | "\\begin{pmatrix} -0.2 & -1 \\\\ 1.7 & 1.1\n", 184 | "\\end{pmatrix}\n", 185 | "x\n", 186 | "$$" 187 | ] 188 | }, 189 | { 190 | "cell_type": "markdown", 191 | "metadata": { 192 | "id": "ARtI-McEi9n5" 193 | }, 194 | "source": [ 195 | "Consider the following matrices:\n", 196 | "\n", 197 | "$$\\dot x = \n", 198 | "\\begin{pmatrix} -10.05 & -0.021 & -0.02 \\\\ \n", 199 | "0 & 0 & 0 \\\\ \n", 200 | "-0.022 & 0.0032 & -10.055\n", 201 | "\\end{pmatrix}\n", 202 | "x\n", 203 | "$$\n", 204 | "\n", 205 | "$$\\dot x = \n", 206 | "\\begin{pmatrix} -2.009 & 0 & 0.0012 \\\\ \n", 207 | "0.05 & 0 & -0.041 \\\\ \n", 208 | "-0.042 & 0 & -4.055\n", 209 | "\\end{pmatrix}\n", 210 | "x\n", 211 | "$$\n", 212 | "\n", 213 | "Can you reason about assymptotic stability of the system without computations?" 214 | ] 215 | }, 216 | { 217 | "cell_type": "markdown", 218 | "metadata": { 219 | "id": "fBgQ4jhckZq_" 220 | }, 221 | "source": [ 222 | "**Answer:**\n", 223 | "\n", 224 | "First system is Lyapunov stable, but not assymptotically stable. You can see that its eigenvalues are not going to have negative eigenvalues, but also you see that the matrix has a non-trivial null space.\n", 225 | "\n", 226 | "You can also directly notice that the second component of $x$ is not going to change, rulling out assymptotic stability.\n", 227 | "\n", 228 | "Second sistem has a non-trivial null space too, meaning some of its eigenvalues are going to be 0. " 229 | ] 230 | }, 231 | { 232 | "cell_type": "markdown", 233 | "metadata": { 234 | "id": "9ajNVPtmna3c" 235 | }, 236 | "source": [ 237 | "Consider the following system again:\n", 238 | "\n", 239 | "$$\\dot x = \n", 240 | "\\begin{pmatrix} -10.05 & -0.021 & -0.02 \\\\ \n", 241 | "0 & 0 & 0 \\\\ \n", 242 | "-0.022 & 0.0032 & -10.055\n", 243 | "\\end{pmatrix}\n", 244 | "x\n", 245 | "$$\n", 246 | "\n", 247 | "You know that $x_2$ is a constant. Let's denote the value of $x_2$ as $c$. Can you rewrite the system in terms of remaining variables $x_1$ and $x_3$ and prove its stability using the Lyapuniv eq?" 248 | ] 249 | }, 250 | { 251 | "cell_type": "markdown", 252 | "metadata": { 253 | "id": "kBR3IQ6sn0to" 254 | }, 255 | "source": [ 256 | "## Solution\n", 257 | "\n", 258 | "### Way 1\n", 259 | "\n", 260 | "Denote:\n", 261 | "\n", 262 | "$$y = \n", 263 | "\\begin{pmatrix} \n", 264 | "x_1 \\\\ \n", 265 | "x_3\n", 266 | "\\end{pmatrix}\n", 267 | "$$\n", 268 | "\n", 269 | "And rewrite:\n", 270 | "\n", 271 | "$$\\dot y = \n", 272 | "\\begin{pmatrix} -10.05 & -0.02 \\\\ \n", 273 | "-0.022 & -10.055\n", 274 | "\\end{pmatrix}\n", 275 | "y\n", 276 | "+\n", 277 | "\\begin{pmatrix} -0.021 \\\\ \n", 278 | "0.0032\n", 279 | "\\end{pmatrix}\n", 280 | "c\n", 281 | "$$\n", 282 | "\n", 283 | "The rest you know how to do.\n", 284 | "\n", 285 | "### Way 2\n", 286 | "\n", 287 | "Orthonormal basis in the column space of the state matrix in this case is:\n", 288 | "\n", 289 | "$$\n", 290 | "C =\n", 291 | "\\begin{pmatrix} \n", 292 | "1 & 0 \\\\ \n", 293 | "0 & 0 \\\\ \n", 294 | "0 & 1\n", 295 | "\\end{pmatrix}\n", 296 | "$$\n", 297 | "\n", 298 | "Motion of the system takes place in that column space. Let's denote $y = C^{\\top}x$, and as long as $x$ is in this column space, it is true that $x = Cy$. But if $x$ is not in the column space, it is $x = Cy + x^*$\n", 299 | "\n", 300 | "Notice that $x^*$ is in the left null space of the state matrix, as long as $y = C^{\\top}x$, because: \n", 301 | "\n", 302 | "$$Cy = CC^{\\top}x$$\n", 303 | "$$x-x^* = CC^{\\top}x$$\n", 304 | "$$x^* = (I-CC^{\\top})x$$\n", 305 | "\n", 306 | "where the last expression is a projection of $x$ onto the left null space of the state matrix. Orthonormal basis in the left null space of the state matrix is:\n", 307 | "\n", 308 | "$$\n", 309 | "L =\n", 310 | "\\begin{pmatrix} \n", 311 | "0 \\\\ \n", 312 | "1 \\\\ \n", 313 | "0\n", 314 | "\\end{pmatrix}\n", 315 | "$$\n", 316 | "\n", 317 | "And we know that $x_2 = c$, so $x^* = Lc$.\n", 318 | "\n", 319 | "Variable $y$ is the new coordinates in the column space basis.\n", 320 | "\n", 321 | "Let's project teh dynamics into the column space. First we multiply it by $C^{\\top}$:\n", 322 | "\n", 323 | "$$C^{\\top} \\dot x = \n", 324 | "C^{\\top}\n", 325 | "\\begin{pmatrix} -10.05 & -0.021 & -0.02 \\\\ \n", 326 | "0 & 0 & 0 \\\\ \n", 327 | "-0.022 & 0.0032 & -10.055\n", 328 | "\\end{pmatrix}\n", 329 | "x\n", 330 | "$$\n", 331 | "\n", 332 | "$$\\dot y = \n", 333 | "\\begin{pmatrix} -10.05 & -0.021 & -0.02 \\\\ \n", 334 | "-0.022 & 0.0032 & -10.055\n", 335 | "\\end{pmatrix}\n", 336 | "x\n", 337 | "$$\n", 338 | "\n", 339 | "Then, since $x = Cy + Lc$ on teh system trajectory, we get:\n", 340 | "\n", 341 | "$$\\dot y = \n", 342 | "\\begin{pmatrix} -10.05 & -0.021 & -0.02 \\\\ \n", 343 | "-0.022 & 0.0032 & -10.055\n", 344 | "\\end{pmatrix}\n", 345 | "(Cy + Lc)\n", 346 | "$$\n", 347 | "\n", 348 | "$$\\dot y = \n", 349 | "\\begin{pmatrix} -10.05 & -0.02 \\\\ \n", 350 | "-0.022 & -10.055\n", 351 | "\\end{pmatrix}\n", 352 | "y\n", 353 | "+\n", 354 | "\\begin{pmatrix} \n", 355 | "-0.021 \\\\ \n", 356 | "0.0032\n", 357 | "\\end{pmatrix}\n", 358 | "c\n", 359 | "$$\n", 360 | "\n", 361 | "From here you apply Lyapunov eq. directly." 362 | ] 363 | } 364 | ] 365 | } -------------------------------------------------------------------------------- /Slides/NullRow/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Null space, Row space, Projectors} 7 | \subtitle{Control Theory, Lecture 6} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | \begin{frame}{Content} 19 | 20 | \begin{itemize} 21 | \item Motivating questions 22 | \item Four Fundamental Subspaces 23 | \item Null space 24 | \begin{itemize} 25 | \item Definition 26 | \item Calculation 27 | \end{itemize} 28 | \item Null space projection 29 | \item Closest element from a linear subspace 30 | \item Orthogonality, definition 31 | \item Projection 32 | \item Vectors in Null space, Row space 33 | \item Row and Null spaces in linear equations 34 | % \item Read more 35 | \end{itemize} 36 | 37 | \end{frame} 38 | 39 | 40 | 41 | 42 | \begin{frame}{Motivating questions} 43 | % \framesubtitle{Parameter estimation} 44 | \begin{flushleft} 45 | 46 | You have a linear operator $\mathbf A$. Try to answer the following questions: 47 | 48 | \begin{itemize} 49 | \item What are all vectors this operator can produce as outputs? How to find them? 50 | \item Are there two inputs that make it produce the same output? 51 | \item Are there inputs that produce zero as an output? 52 | \item Are there outputs that cannot be produced? 53 | \item What is the smallest vector $\bo{x}$ that produces given output $\bo{y}$? 54 | \end{itemize} 55 | 56 | These questions are directly related to the idea of fundamental subspaces of a linear operator. 57 | 58 | \end{flushleft} 59 | \end{frame} 60 | 61 | 62 | \begin{frame}{Four Fundamental Subspaces} 63 | % \framesubtitle{Parameter estimation} 64 | \begin{flushleft} 65 | 66 | One of the key ideas in the linear algebra is that every linear operator has four fundamental subspaces: 67 | 68 | \begin{itemize} 69 | \item Null space 70 | \item Row space 71 | \item Column space 72 | \item Left null space 73 | \end{itemize} 74 | 75 | \bigskip 76 | 77 | Our goal is to understand them. The usefulness of this understating is enormous. 78 | 79 | \end{flushleft} 80 | \end{frame} 81 | 82 | \begin{frame}{Null space} 83 | \framesubtitle{Definition} 84 | \begin{flushleft} 85 | 86 | Consider the following task: find all solutions to the system of equations $\mathbf{A} \mathbf{x} = \mathbf{0}$. 87 | 88 | \bigskip 89 | 90 | It can be re-formulated as follows: find all elements of the \emph{null space} of $\mathbf{A}$. 91 | 92 | \begin{block}{Definition 1} 93 | \emph{Null space} of $\mathbf{A}$ is the set of all vectors $\mathbf{x}$ that $\mathbf{A}$ maps to $\mathbf{0}$ 94 | \end{block} 95 | 96 | \bigskip 97 | 98 | We will denote null space as $\mathcal{N}(\mathbf{A})$. In the literature, it is often denoted as $\text{ker}(\mathbf{A})$ or $\text{null}(\mathbf{A})$. 99 | 100 | \end{flushleft} 101 | \end{frame} 102 | 103 | 104 | \begin{frame}{Null space} 105 | \framesubtitle{Calculation} 106 | \begin{flushleft} 107 | 108 | Now we can find all solutions to the system of equations $\mathbf{A} \mathbf{x} = \mathbf{0}$ by using functions that generate an orthonormal \emph{basis} in the null space of $\mathbf{A}$. In MATLAB it is function \texttt{null}, in Python/Scipy - \texttt{null\_space}: 109 | 110 | \bigskip 111 | 112 | \begin{itemize} 113 | \item \texttt{N = null(A)}. 114 | \item \texttt{N = scipy.linalg.null\_space(A)}. 115 | \end{itemize} 116 | 117 | \bigskip 118 | 119 | That is it! Space of solutions of $\mathbf{A} \mathbf{x} = \mathbf{0}$ is the span of the columns of $\mathbf{N}$, and all solutions $\mathbf{x}^*$ can be represented as $\mathbf{x}^* = \mathbf{N}\mathbf{z}$; for any $\mathbf{z}$ we get a unique solution, and for any solution - a unique $\mathbf{z}$. 120 | 121 | \end{flushleft} 122 | \end{frame} 123 | 124 | 125 | 126 | \begin{frame}{Null space projection} 127 | \framesubtitle{Local coordinates} 128 | \begin{flushleft} 129 | 130 | Let $\bo{N}$ be the orthonormal basis in the null space of matrix $\bo{A}$. Then, if a vector $\bo{x}$ lies in the null space of $\bo{A}$, it can be represented as: 131 | 132 | \begin{equation} 133 | \bo{x} = \bo{N}\bo{z} 134 | \end{equation} 135 | % 136 | where $\bo{z}$ are coordinates of $\bo{x}$ in the basis $\bo{N}$. 137 | 138 | \bigskip 139 | 140 | However, there are vector which not only are not lying in the null space of $\bo{A}$, but the closest vector to them in the null space is zero vector. 141 | 142 | \end{flushleft} 143 | \end{frame} 144 | 145 | 146 | \begin{frame}{Closest element from a linear subspace} 147 | % \framesubtitle{Orthogonality, examples} 148 | \begin{flushleft} 149 | 150 | Let $\bo{A} = \begin{bmatrix} 0 & 1 \\ 0 & 0\end{bmatrix}$. Its null space has orthonormal basis $\bo{N} = \begin{bmatrix} 1 \\ 0\end{bmatrix}$. 151 | 152 | \begin{itemize} 153 | \item $\begin{bmatrix} -2 \\ 0 \end{bmatrix} = 154 | -2 \bo{N}$, 155 | $\begin{bmatrix} 10 \\ 0 \end{bmatrix} = 156 | 10 \bo{N}$, - both are in the null space. 157 | \item for $\bo{x} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$ the closest vector in the null space is $\begin{bmatrix} 1 \\ 0 \end{bmatrix}$. 158 | \item for $\bo{y} = \begin{bmatrix} 0 \\ 2 \end{bmatrix}$ the closest vector in the null space is $\begin{bmatrix} 0 \\ 0 \end{bmatrix}$. 159 | \end{itemize} 160 | 161 | 162 | \end{flushleft} 163 | \end{frame} 164 | 165 | 166 | 167 | \begin{frame}{Orthogonality, definition} 168 | % \framesubtitle{Orthogonality, definition} 169 | \begin{flushleft} 170 | 171 | \begin{definition} 172 | If for a vector $\bo{x}$, the closest vector to it from a linear subspace $\mathcal{L}$ is zero vector, $\bo{x}$ is called \emph{orthogonal} to the subspace $\mathcal{L}$. We denote it as $\bo{x} \in \mathcal{L}^\perp$. 173 | \end{definition} 174 | 175 | 176 | \begin{definition} 177 | The space of all vectors $\bo{x}$, for which closest vector to them from a linear subspace $\mathcal{L}$ is zero vector, is called \emph{subspace, orthogonal to} $\mathcal{L}$ and is denoted as $\mathcal{L}^\perp$. 178 | \end{definition} 179 | 180 | \end{flushleft} 181 | \end{frame} 182 | 183 | 184 | 185 | 186 | 187 | \begin{frame}{Projection} 188 | \framesubtitle{Part 1} 189 | \begin{flushleft} 190 | 191 | Let $\bo{L}$ be an orthonormal basis in a linear subspace $\mathcal{L}$. Take vector $\bo{a} = \bo{x} + \bo{y}$, where $\bo{x}$ lies in the subspace $\mathcal{L}$, and $\bo{y}$ is orthogonal to $\mathcal{L}$. 192 | 193 | \bigskip 194 | 195 | \begin{definition} 196 | We call such vector $\bo{x}$ a \emph{projection} of $\bo{a}$ onto subspace $\mathcal{L}$, and such vector $\bo{y}$ a projection of $\bo{a}$ onto subspace $\mathcal{L}^\perp$ 197 | \end{definition} 198 | 199 | \bigskip 200 | 201 | Projection of $\bo{a}$ onto $\mathcal{L}$ can be found as: 202 | 203 | \begin{equation} 204 | \bo{x} = \bo{L} \bo{L}^+ \bo{a} 205 | \end{equation} 206 | 207 | Since $\bo{L}$ is orthonormal, this is the same as $\bo{x} = \bo{L} \bo{L}^\top \bo{a}$ 208 | 209 | \end{flushleft} 210 | \end{frame} 211 | 212 | 213 | 214 | \begin{frame}{Projection} 215 | \framesubtitle{Part 2} 216 | \begin{flushleft} 217 | 218 | Since $\bo{a} = \bo{x} + \bo{y}$, and $\bo{x} = \bo{L} \bo{L}^+ \bo{a}$, we can write: 219 | 220 | \begin{equation} 221 | \bo{a} = \bo{L} \bo{L}^+ \bo{a} + \bo{y} 222 | \end{equation} 223 | % 224 | from which it follows that the projection of $\bo{a}$ onto $\mathcal{L}^\perp$ can be found as: 225 | 226 | \begin{equation} 227 | \bo{y} = (\bo{I} - \bo{L} \bo{L}^+) \bo{a} 228 | \end{equation} 229 | % 230 | where $\bo{I}$ is an identity matrix. Since $\bo{L}$ is orthonormal, this is the same as $\bo{y} = (\bo{I} - \bo{L} \bo{L}^\top) \bo{a}$ 231 | 232 | \end{flushleft} 233 | \end{frame} 234 | 235 | 236 | 237 | 238 | \begin{frame}{Row space} 239 | \framesubtitle{Definition} 240 | \begin{flushleft} 241 | 242 | \begin{definition} 243 | Let $\mathcal{N}$ be null space of $\bo{A}$. Then orthogonal subspace $\mathcal{N}^\perp$ is called \emph{row space} of $\bo{A}$. 244 | \end{definition} 245 | 246 | \begin{definition} 247 | \emph{Row space} of $\bo{A}$ is the space of all inputs to $\bo{A}$ that produce non-zero outputs (plus zero vector, which is included in all linear subspaces). 248 | \end{definition} 249 | 250 | \bigskip 251 | 252 | We will denote row space as $\mathcal{R}$. 253 | 254 | \end{flushleft} 255 | \end{frame} 256 | 257 | 258 | 259 | 260 | \begin{frame}{Vectors in Null space, Row space} 261 | % \framesubtitle{Definition} 262 | \begin{flushleft} 263 | 264 | Given vector $\bo{x}$, matrix $\bo{A}$ and its nulls space basis $\bo{N}$, and we check if $\bo{x}$ is in the null space of $\bo{A}$. 265 | 266 | \bigskip 267 | 268 | We do it by noticing that if it is in the null space of $\bo{A}$, it will have zero projection onto the row space of $\bo{A}$. So, the condition is as follows: 269 | 270 | \begin{equation} 271 | (\bo{I} - \bo{N} \bo{N}^+) \bo{x} = 0 272 | \end{equation} 273 | 274 | By the same logic, condition for being in the row space is as follows: 275 | 276 | \begin{equation} 277 | \bo{N} \bo{N}^+ \bo{x} = 0 278 | \end{equation} 279 | 280 | 281 | \end{flushleft} 282 | \end{frame} 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | \begin{frame}{Row and Null spaces in linear equations} 291 | \framesubtitle{Part 1} 292 | \begin{flushleft} 293 | 294 | Consider another task: find all solutions to the system of equations $\bo{A} \bo{x} = \bo{y}$. 295 | 296 | \bigskip 297 | 298 | Assume we have two solutions to the system: $\bo{x}_1$ and $\bo{x}_2$. We know that $\bo{A} \bo{x}_1 = \bo{A} \bo{x}_2= \bo{y}$, hence $\bo{A} (\bo{x}_1 - \bo{x}_2) = \bo{0}$. In other words, the difference between any two solutions lies in the null space of $\bo{A}$. 299 | 300 | \bigskip 301 | 302 | On the other hand, let $\bo{x}^*$ be a solution, and $\bo{x}^N \in \mathcal{N}(\bo{A})$ be a vector in the null space of $\bo{A}$. Then $\bo{x}^* + \bo{x}^N$ is also a solution, since $\bo{A} (\bo{x}^* + \bo{x}^N) = \bo{A} \bo{x}^* + \bo{A} \bo{x}^N = \bo{A} \bo{x}^* = \bo{y}$. 303 | 304 | \bigskip 305 | 306 | Therefore, the solution space is given by a single partial solution $\bo{x}^p \notin \mathcal{N}(\bo{A})$ and the whole null space of $\bo{A}$. 307 | 308 | \end{flushleft} 309 | \end{frame} 310 | 311 | 312 | \begin{frame}{Row and Null spaces in linear equations} 313 | \framesubtitle{Part 2} 314 | \begin{flushleft} 315 | 316 | There are infinitely many ways to chose $\bo{x}^p$, since if $\bo{x}^p \notin \mathcal{N}(\bo{A})$, then $(\bo{x}^p + \bo{x}^N) \notin \mathcal{N}(\bo{A})$, if $\bo{x}^N \in \mathcal{N}(\bo{A})$. However: 317 | 318 | \begin{block}{Statement 1} 319 | The smallest-norm $\bo{x}^p$ will lie in the row space of $\bo{A}$. 320 | \end{block} 321 | 322 | \bigskip 323 | 324 | We can prove it by observing that there can be only one $\bo{x}^p \in \mathcal{R}(\bo{A})$ and adding to it any vector $\bo{x}^N \in \mathcal{N}(\bo{A})$ can only increase its magnitude, as $\bo{x}^p$ and $\bo{x}^N$ are orthogonal. 325 | 326 | \end{flushleft} 327 | \end{frame} 328 | 329 | 330 | 331 | \begin{frame}{Row and Null spaces in linear equations} 332 | \framesubtitle{Part 3} 333 | \begin{flushleft} 334 | 335 | If we have $\bo{x}^*$, which is a solution to $\bo{A} \bo{x} = \bo{y}$, we can find the particular solution $\bo{x}^p \in \mathcal{R}(\bo{A})$ as a projection: 336 | 337 | \begin{equation} 338 | \bo{x}^p = (\bo{I} - \bo{N} \bo{N}^+) \bo{x}^* 339 | \end{equation} 340 | % 341 | where $\bo{N}$ is the null space basis for $\bo{A}$. Alternatively, we can simply find it as: 342 | 343 | \begin{equation} 344 | \bo{x}^p = \bo{A}^+ \bo{y} 345 | \end{equation} 346 | 347 | \bigskip 348 | 349 | All solutions to $\bo{A} \bo{x} = \bo{y}$ are then given as: 350 | 351 | \begin{equation} 352 | \bo{x}^* = \bo{A}^+ \bo{y} + \bo{N}\bo{z}, \ \forall \bo{z} 353 | \end{equation} 354 | 355 | \end{flushleft} 356 | \end{frame} 357 | 358 | 359 | 360 | 361 | \begin{frame}{Thank you!} 362 | \centerline{Lecture slides are available via Moodle.} 363 | \bigskip 364 | \centerline{You can help improve these slides at:} 365 | \centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 366 | \bigskip 367 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 368 | \end{frame} 369 | 370 | \end{document} 371 | -------------------------------------------------------------------------------- /ColabNotebooks/practice_08_la_applications.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "[CT21] lab08_la_applications.ipynb", 7 | "provenance": [], 8 | "collapsed_sections": [], 9 | "include_colab_link": true 10 | }, 11 | "kernelspec": { 12 | "name": "python3", 13 | "display_name": "Python 3" 14 | } 15 | }, 16 | "cells": [ 17 | { 18 | "cell_type": "markdown", 19 | "metadata": { 20 | "id": "view-in-github", 21 | "colab_type": "text" 22 | }, 23 | "source": [ 24 | "\"Open" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "metadata": { 30 | "id": "zPmrTNlSBW-R" 31 | }, 32 | "source": [ 33 | "# **Practice 8: Fundamental Subspaces with application to LTI Systems**\n", 34 | "## **Goals for today**\n", 35 | "\n", 36 | "---\n", 37 | "\n", 38 | "During today practice we will:\n", 39 | "* Exploit a structure of linear mapping between inputs and outputs.\n" 40 | ] 41 | }, 42 | { 43 | "cell_type": "markdown", 44 | "metadata": { 45 | "id": "kgF8BN0GTBfP" 46 | }, 47 | "source": [ 48 | "## **Four Fundamental Subspaces. Recall**\n", 49 | "---\n", 50 | ">As we have studied on the lectures there are four fundamental subspaces accompanying any linear operator (matrix) $\\mathbf{A}^{m \\times n}$, namely:\n", 51 | ">* **Column** space (range, image): $\\mathcal{C}(\\mathbf{A}) \\in \\mathbb{R}^m$ \n", 52 | ">* **Null** space (kernel): $\\mathcal{N}(\\mathbf{A}) \\in \\mathbb{R}^n$\n", 53 | ">* **Row** space: $\\mathcal{R}(\\mathbf{A}) = \\mathcal{C}(\\mathbf{A}^T) \\in \\mathbb{R}^n$\n", 54 | ">* **Left null** space: $\\mathcal{N}(\\mathbf{A}^T) \\in \\mathbb{R}^m$\n", 55 | "---\n", 56 | "\n", 57 | "\n", 58 | "\n" 59 | ] 60 | }, 61 | { 62 | "cell_type": "markdown", 63 | "metadata": { 64 | "id": "-hiCl_SzZlZi" 65 | }, 66 | "source": [ 67 | "\n", 68 | "### **SVD $\\rightarrow$Four Fundamental Subspaces**\n", 69 | "Outstanding is that SVD directly provides all **four fundamental subspaces** at once. \n", 70 | "\n", 71 | "---\n", 72 | "\n", 73 | "\\begin{equation}\n", 74 | "\\mathbf{A} = \\mathbf{U}\\mathbf{S}\\mathbf{V}^T = \\begin{bmatrix}\\underset{m \\times r}{\\mathbf{U}_r} & \\underset{m \\times m - r}{\\mathbf{U}_n}\n", 75 | "\\end{bmatrix}\n", 76 | "\\begin{bmatrix}\n", 77 | "\\underset{r \\times r}{\\mathbf{S}_r} & \\underset{r \\times n - r}{\\mathbf{0}} \\\\ \n", 78 | "\\underset{m - r \\times r}{\\mathbf{0}} & \n", 79 | "\\underset{m - r \\times n - r}{\\mathbf{0}}\n", 80 | "\\end{bmatrix}\n", 81 | "\\begin{bmatrix}\\underset{n \\times r}{\\mathbf{V}_r} & \\underset{n \\times n -r}{\\mathbf{V}_n}\n", 82 | "\\end{bmatrix}^T\n", 83 | "= \\mathbf{U}_r \\mathbf{S}_r \\mathbf{V}^T_r\n", 84 | "\\end{equation}\n", 85 | "\n", 86 | "---\n", 87 | "\n", 88 | "* **Column space** $\\mathcal{C}(\\mathbf{A})$is spanned by first $r$ vectors in $\\mathbf{U}_r$\n", 89 | "* **Left null space** $\\mathcal{N}(\\mathbf{A}^T)$ is spanned by $m-r$ vectors in $\\mathbf{U}_n$\n", 90 | "* **Row space** $\\mathcal{R}(\\mathbf{A}^T)$is spanned by first $r$ right singular vectors in $\\mathbf{V}_r$\n", 91 | "* **Null space** $\\mathcal{N}(\\mathbf{A})$ is spanned by $n-r$ vectors in $\\mathbf{V}_n$\n", 92 | "\n", 93 | "\n", 94 | "\n", 95 | "\n", 96 | "---" 97 | ] 98 | }, 99 | { 100 | "cell_type": "code", 101 | "metadata": { 102 | "colab": { 103 | "base_uri": "https://localhost:8080/" 104 | }, 105 | "id": "PTlAj8zrNvtB", 106 | "outputId": "c3ee790c-c7a5-4405-cfe9-2073cc3b6a1f" 107 | }, 108 | "source": [ 109 | "# from numpy import array\n", 110 | "import numpy as np\n", 111 | "from numpy.linalg import svd\n", 112 | "\n", 113 | "A = [[0, 0], \n", 114 | " [0, -1]]\n", 115 | "A = np.array(A)\n", 116 | "\n", 117 | "U, S, VT = svd(A, full_matrices=True)\n", 118 | "\n", 119 | "# Let's print out the SVD matrices:\n", 120 | "print(f\"Left Singular Vectors:\\n {U}\\n\")\n", 121 | "print(f\"Singular Values:\\n {S}\\n\")\n", 122 | "print(f\"Right Singular Vectors:\\n {VT.T}\\n\")\n" 123 | ], 124 | "execution_count": null, 125 | "outputs": [ 126 | { 127 | "output_type": "stream", 128 | "text": [ 129 | "Left Singular Vectors:\n", 130 | " [[0. 1.]\n", 131 | " [1. 0.]]\n", 132 | "\n", 133 | "Singular Values:\n", 134 | " [1. 0.]\n", 135 | "\n", 136 | "Right Singular Vectors:\n", 137 | " [[-0. 1.]\n", 138 | " [-1. 0.]]\n", 139 | "\n", 140 | "[1. 0.]\n", 141 | "[0. 0.]\n" 142 | ], 143 | "name": "stdout" 144 | } 145 | ] 146 | }, 147 | { 148 | "cell_type": "code", 149 | "metadata": { 150 | "id": "4Pq23jm9pcdf" 151 | }, 152 | "source": [ 153 | "# Fundamental subspaces are given by slicing resulting matrices" 154 | ], 155 | "execution_count": null, 156 | "outputs": [] 157 | }, 158 | { 159 | "cell_type": "markdown", 160 | "metadata": { 161 | "id": "RprUob8IDS-Q" 162 | }, 163 | "source": [ 164 | "## **Applications to the LTI Systems**" 165 | ] 166 | }, 167 | { 168 | "cell_type": "markdown", 169 | "metadata": { 170 | "id": "jBksZ-2LmF-_" 171 | }, 172 | "source": [ 173 | "### **Equilibrium Points of Uncontrolled System**\n", 174 | "\n", 175 | "Given LTI system $\\dot{\\mathbf{x}} = \\mathbf{A}\\mathbf{x}$, where $\\mathbf{x} \\in \\mathbb{R}^n$, $\\mathbf{u} \\in \\mathbb{R}^m$, find all equalibrium states, namely:\n", 176 | "\\begin{equation}\n", 177 | "\\dot{\\mathbf{x}} = \\mathbf{A}\\mathbf{x} = 0\n", 178 | "\\end{equation}\n", 179 | "\n", 180 | "The all posible equalibrium points thus given by $\\mathbf{x}_e = \\mathbf{N}\\mathbf{z}$, $\\forall \\mathbf{z}$\n" 181 | ] 182 | }, 183 | { 184 | "cell_type": "code", 185 | "metadata": { 186 | "colab": { 187 | "base_uri": "https://localhost:8080/" 188 | }, 189 | "id": "K_q0BPN1nehA", 190 | "outputId": "1587b1f4-983f-4f96-8436-1f50efd7ea0f" 191 | }, 192 | "source": [ 193 | "from numpy import hstack\n", 194 | "A = [[0, 1],\n", 195 | " [-2,-3]]\n", 196 | "B = [[0], [1]]\n", 197 | "\n", 198 | "M = hstack((A,B))\n", 199 | "\n", 200 | "print(f'Stacked matrix:\\n {M}')\n", 201 | "\n", 202 | "U,S,VT = svd(M, full_matrices=True)\n", 203 | "print(f'Left singular vectors:\\n {U}')\n", 204 | "print(f'Singular values:\\n {S}')\n", 205 | "print(f'Right singular vectors:\\n {VT.T}')" 206 | ], 207 | "execution_count": null, 208 | "outputs": [ 209 | { 210 | "output_type": "stream", 211 | "text": [ 212 | "Stacked matrix:\n", 213 | " [[ 0 1 0]\n", 214 | " [-2 -3 1]]\n", 215 | "Left singular vectors:\n", 216 | " [[-0.21452344 0.97671884]\n", 217 | " [ 0.97671884 0.21452344]]\n", 218 | "Singular values:\n", 219 | " [3.82869567 0.58402865]\n", 220 | "Right singular vectors:\n", 221 | " [[-0.5102097 -0.73463328 0.4472136 ]\n", 222 | " [-0.82134498 0.57043179 0. ]\n", 223 | " [ 0.25510485 0.36731664 0.89442719]]\n" 224 | ], 225 | "name": "stdout" 226 | } 227 | ] 228 | }, 229 | { 230 | "cell_type": "markdown", 231 | "metadata": { 232 | "id": "Uk0dtOIBByUT" 233 | }, 234 | "source": [ 235 | "### **Equilibrium Points and Feedforward**\n", 236 | "\n", 237 | "Given LTI system $\\dot{\\mathbf{x}} = \\mathbf{A} \\mathbf{x} + \\mathbf{B} \\mathbf{u}$, where $\\mathbf{x} \\in \\mathbb{R}^n$, $\\mathbf{u} \\in \\mathbb{R}^m$, find all states that can be made into fixed points with a constant control law.\n", 238 | "\n", 239 | "\n", 240 | "Let us find null space of the matrix $\\begin{bmatrix} \\mathbf{A} & \\mathbf{B} \\end{bmatrix}$ as $\\mathbf{N} = \\text{null} (\\begin{bmatrix} \\mathbf{A} & \\mathbf{B} \\end{bmatrix})$. \n", 241 | "\n", 242 | "We can find all $\\mathbf{x}$, $\\mathbf{u}$ pairs that produce equilibrium points as follows: $\\begin{bmatrix} \\mathbf{x} \\\\ \\mathbf{u} \\end{bmatrix} = \\mathbf{N} \\mathbf{z}$, $\\forall \\mathbf{z}$\n", 243 | "\n" 244 | ] 245 | }, 246 | { 247 | "cell_type": "code", 248 | "metadata": { 249 | "colab": { 250 | "base_uri": "https://localhost:8080/" 251 | }, 252 | "id": "3bC4nO4oByAI", 253 | "outputId": "5d278b0d-dfeb-4cd6-9067-fd53e393a661" 254 | }, 255 | "source": [ 256 | "from numpy import hstack\n", 257 | "A = [[0, 1],\n", 258 | " [-2,-3]]\n", 259 | "B = [[0], [1]]\n", 260 | "\n", 261 | "M = hstack((A,B))\n", 262 | "\n", 263 | "print(f'Stacked matrix:\\n {M}')\n", 264 | "\n", 265 | "U,S,VT = svd(M, full_matrices=True)\n", 266 | "print(f'Left singular vectors:\\n {U}')\n", 267 | "print(f'Singular values:\\n {S}')\n", 268 | "print(f'Right singular vectors:\\n {VT.T}')" 269 | ], 270 | "execution_count": null, 271 | "outputs": [ 272 | { 273 | "output_type": "stream", 274 | "text": [ 275 | "Stacked matrix:\n", 276 | " [[ 0 1 0]\n", 277 | " [-2 -3 1]]\n", 278 | "Left singular vectors:\n", 279 | " [[-0.21452344 0.97671884]\n", 280 | " [ 0.97671884 0.21452344]]\n", 281 | "Singular values:\n", 282 | " [3.82869567 0.58402865]\n", 283 | "Right singular vectors:\n", 284 | " [[-0.5102097 -0.73463328 0.4472136 ]\n", 285 | " [-0.82134498 0.57043179 0. ]\n", 286 | " [ 0.25510485 0.36731664 0.89442719]]\n" 287 | ], 288 | "name": "stdout" 289 | } 290 | ] 291 | }, 292 | { 293 | "cell_type": "markdown", 294 | "metadata": { 295 | "id": "FfRXE6WnC35G" 296 | }, 297 | "source": [ 298 | "\n", 299 | "\n", 300 | "\n", 301 | "Given LTI system $\\dot{\\mathbf{x}} = \\mathbf{A} \\mathbf{x} + \\mathbf{B} \\mathbf{u}$, where $\\mathbf{x} \\in \\mathbb{R}^n$, $\\mathbf{u} \\in \\mathbb{R}^m$, \n", 302 | "\n", 303 | "1. check if $\\mathbf{x}_d$ can be transformed into a equilibrium point\n", 304 | "2. find control constant $\\mathbf{u}_d$ that does it, given control law $\\mathbf{u} = \\mathbf{K}\\mathbf{x} + \\mathbf{u}_d$.\n", 305 | "\n", 306 | "\n", 307 | " We can check that $(\\mathbf{A}-\\mathbf{B}\\mathbf{K}) \\mathbf{x}_d + \\mathbf{B} \\mathbf{u}_d = \\mathbf{0}$ has a solution, in other words that $-(\\mathbf{A}-\\mathbf{B}\\mathbf{K}) \\mathbf{x}^* \\in \\mathcal{C}(\\mathbf{B})$. Resulting condition is given via projection into the left null space of $\\mathbf{B}$: \n", 308 | " $(\\mathbf{I} - \\mathbf{B}\\mathbf{B}^+)(\\mathbf{A}-\\mathbf{B}\\mathbf{K})\\mathbf{x}_d = \\mathbf{0}$\n", 309 | "\n", 310 | "This means finding such $\\mathbf{u}_d$ that $(\\mathbf{A}-\\mathbf{B}\\mathbf{K}) \\mathbf{x}_d + \\mathbf{B}\\mathbf{u}_d= \\mathbf{0}$. This is done via pseudo-inverse, which provides exact solution, as long as it exists: $\\mathbf{u}_d= -\\mathbf{B}^+(\\mathbf{A}-\\mathbf{B}\\mathbf{K}) \\mathbf{x}_d$.\n" 311 | ] 312 | }, 313 | { 314 | "cell_type": "code", 315 | "metadata": { 316 | "id": "CUzadWFLEs2I" 317 | }, 318 | "source": [ 319 | "# ADD YOUR CODE HERE" 320 | ], 321 | "execution_count": null, 322 | "outputs": [] 323 | } 324 | ] 325 | } -------------------------------------------------------------------------------- /Slides/Observer/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \input{settings.tex} 4 | 5 | 6 | \title{Observers} 7 | \subtitle{Control Theory, Lecture 10} 8 | \author{by Sergei Savin} 9 | \centering 10 | \date{Spring 2021} 11 | 12 | 13 | 14 | \begin{document} 15 | \maketitle 16 | 17 | 18 | 19 | \begin{frame}{Content} 20 | \begin{itemize} 21 | \item Measurement 22 | \begin{itemize} 23 | \item How do we know the state? 24 | \item Why information is imperfect? 25 | \item Definition 26 | \end{itemize} 27 | \item Observation 28 | \begin{itemize} 29 | \item Using the knowledge about dynamics 30 | \item Observer 31 | \item Observer gains 32 | \end{itemize} 33 | \item Observer Design 34 | \item Observation and Control 35 | \begin{itemize} 36 | \item LTI 37 | \item Stability analysis 38 | \item Change of variables 39 | \item Upper triangular form 40 | \item Separation principle 41 | \end{itemize} 42 | \end{itemize} 43 | \end{frame} 44 | 45 | 46 | 47 | 48 | \begin{frame}{Measurement} 49 | \framesubtitle{How do we know the state?} 50 | \begin{flushleft} 51 | 52 | Before we considered systems and control laws of the following type: 53 | 54 | \begin{equation} 55 | \begin{cases} 56 | \dot {\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u}\\ 57 | \bo{u} = \bo{K} \bo{x} 58 | \end{cases} 59 | \end{equation} 60 | 61 | But when we implement that control law, how do we know the current value of $\bo{x}$? Previously we always took it from simulation. 62 | 63 | \bigskip 64 | 65 | In practice, we take it from \emph{measurement}. 66 | 67 | \end{flushleft} 68 | \end{frame} 69 | 70 | \begin{frame}{Measurement} 71 | \framesubtitle{Why information is imperfect?} 72 | \begin{flushleft} 73 | 74 | There are a number of reasons why we can not directly measure the state of the system. Here are some: 75 | 76 | \begin{itemize} 77 | \item Digital measurements are done in discrete time intervals; 78 | \item Unpredicted events (faults, collisions, etc.); 79 | \item Un-modelled kinematics or dynamics (links bending, gear box backlash, friction, etc.) making the very definition of the state disconnected from reality; 80 | \item Lack of sensors; 81 | \item Imprecise, nonlinear and biased sensors; 82 | \item Physics, quantum-scale effects and alike; 83 | \end{itemize} 84 | 85 | \end{flushleft} 86 | \end{frame} 87 | 88 | \begin{frame}{Measurement} 89 | \framesubtitle{Definition} 90 | \begin{flushleft} 91 | 92 | Let us introduce new notation. Assume we have an LTI system of the following form: 93 | 94 | \begin{equation} 95 | \begin{cases} 96 | \dot {\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u} \\ 97 | \bo{y} = \bo{C} \bo{x} \\ 98 | \bo{u} = \bo{g}(\hat{\bo{x}}, t)\\ 99 | \hat{\bo{x}} = \bo{o}(\cdot) 100 | \end{cases} 101 | \end{equation} 102 | 103 | Then: 104 | 105 | \begin{itemize} 106 | \item $\bo{x}$ is the state (actual or true state) 107 | \item $\bo{y}$ is the output (actual or true output) 108 | % \item $\Tilde{\bo{y}}$ is the measured output 109 | \item $\hat{\bo{x}}$ is the estimated (observed) state 110 | \item $\hat{\bo{y}}$ is the estimated (observed) output 111 | \end{itemize} 112 | 113 | Notice that we never know true state $\bo{x}$, and therefore for the control purposes we have to use the estimated state $\hat{\bo{x}}$. 114 | 115 | \end{flushleft} 116 | \end{frame} 117 | 118 | 119 | 120 | \begin{frame}{Observation} 121 | \framesubtitle{Using the knowledge about dynamics} 122 | \begin{flushleft} 123 | 124 | Let us consider autonomous dynamical system 125 | \begin{equation} 126 | \label{eq:LTI} 127 | \begin{cases} 128 | \dot {\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u} \\ 129 | \bo{y} = \bo{C} \bo{x} 130 | \end{cases} 131 | \end{equation} 132 | % 133 | with measurements $\bo{y}$. We want to get as good an estimate of the state $\hat{\bo{x}}$ as we can. 134 | 135 | \bigskip 136 | 137 | First note: dynamics should also hold for our observed state: 138 | \begin{equation} 139 | \hat{\dot {\bo{x}}} = \bo{A} \hat{\bo{x}} + \bo{B} \bo{u} 140 | \end{equation} 141 | % 142 | Therefore if we know the initial conditions of our system exactly, and we know our model exactly, we can find exact state of the system without using measurement $\bo{y}$. We can call it an open loop observation. Unfortunately, we know neither the model nor the initial conditions precisely. 143 | 144 | 145 | \end{flushleft} 146 | \end{frame} 147 | 148 | 149 | 150 | 151 | 152 | \begin{frame}{Observation} 153 | \framesubtitle{Observer} 154 | \begin{flushleft} 155 | 156 | We propose \emph{observer} that takes into account measurements in a linear way: 157 | 158 | \begin{equation} 159 | \label{eq:Observer} 160 | \hat{\dot {\bo{x}}} = \bo{A} \hat{\bo{x}} + \bo{B} \mathbf u + \bo{L}(\mathbf y - \bo{C} \hat{\bo{x}}) 161 | \end{equation} 162 | % 163 | with measurements $\bo{y}$. With this observer, we want to get as good estimate of the state $\hat{\bo{x}}$ as we can. 164 | 165 | \bigskip 166 | 167 | Let's define state estimation error as $\varepsilon = \hat{\bo{x}} - \bo{x}$. We can subtract \eqref{eq:LTI} from \eqref{eq:Observer}, to get \emph{observer error dynamics}: 168 | 169 | \begin{equation} 170 | \hat{\dot {\bo{x}}} - \dot {\bo{x}}= 171 | \bo{A} \hat{\bo{x}} - \bo{A} \bo{x} + 172 | \bo{L}(\mathbf y - \bo{C} \hat{\bo{x}}) 173 | \end{equation} 174 | 175 | \begin{equation} 176 | \dot {\varepsilon}= 177 | (\bo{A} - \bo{L} \bo{C}) \varepsilon 178 | \end{equation} 179 | 180 | \end{flushleft} 181 | \end{frame} 182 | 183 | 184 | 185 | 186 | 187 | \begin{frame}{Observation} 188 | \framesubtitle{Observer gains} 189 | \begin{flushleft} 190 | 191 | The observer $\dot {\varepsilon}= 192 | (\bo{A} - \bo{L} \bo{C}) \varepsilon$ is \emph{stable} (i.e., the state estimation error tends to zero), as long as the following matrix has eigenvalues with negative real parts: 193 | 194 | \[ 195 | \bo{A} - 196 | \bo{L} \bo{C} < 0 197 | \] 198 | 199 | We need to find $\bo{L}$. Let us observe the key difference between observer design and controller design: 200 | 201 | \bigskip 202 | 203 | \begin{itemize} 204 | \item Controller design: find such $\bo{K}$ that $\bo{A} - \bo{B} \bo{K} < 0$. 205 | \item Observer design: find such $\bo{L}$ that: $\bo{A} - \bo{L} \bo{C} < 0$ 206 | \end{itemize} 207 | 208 | \bigskip 209 | 210 | We have instruments for finding $\bo{K}$, what about $\bo{L}$? 211 | 212 | \end{flushleft} 213 | \end{frame} 214 | 215 | 216 | \begin{frame}{Observer Design} 217 | \framesubtitle{General case: design via Riccati eq.} 218 | \begin{flushleft} 219 | 220 | In general, we can observe that if $\bo{A} - \bo{L} \bo{C}$ is negative-definite, then $(\bo{A} - 221 | \bo{L} \bo{C})^{\top}$ is negative-definite too (by definition of the negative-definiteness). 222 | 223 | \bigskip 224 | 225 | Therefore, we can solve the following \emph{dual problem}: 226 | 227 | \begin{itemize} 228 | \item find such $\bo{L}$ that $\bo{A}^{\top} - 229 | \bo{C}^{\top} \bo{L}^{\top} < 0$. 230 | \end{itemize} 231 | 232 | \bigskip 233 | 234 | The dual problem is \emph{equivalent} to the control design problem. We can solve it by producing and solving algebraic Riccati equation, as in the LQR formulation. In pseudo-code it can be represented the following way: 235 | 236 | \bigskip 237 | 238 | $\bo{L}^{\top}$ \texttt{= lqr}($\bo{A}^{\top}$, $\bo{C}^{\top}$, $\mathbf Q$, $\mathbf R$). 239 | 240 | where $\mathbf Q$ and $\mathbf R$ are weight matrices, determining the "sensitivity" or "aggressiveness" of the observer. 241 | 242 | 243 | \end{flushleft} 244 | \end{frame} 245 | 246 | 247 | 248 | 249 | \begin{frame}{Observation and Control} 250 | \framesubtitle{LTI} 251 | \begin{flushleft} 252 | 253 | Thus we get dynamics+observer combination: 254 | 255 | \begin{equation} 256 | \begin{cases} 257 | \dot {\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u} \\ 258 | \hat{\dot {\bo{x}}} = \bo{A} \hat{\bo{x}} + \bo{B} \mathbf u + \bo{L}(\mathbf y - \bo{C} \hat{\bo{x}})\\ 259 | \bo{y} = \bo{C} \bo{x} \\ 260 | \bo{u} = -\bo{K} (\hat{\bo{x}} - \bo{x}^*(t)) + \bo{u}^*(t) 261 | \end{cases} 262 | \end{equation} 263 | 264 | \bigskip 265 | 266 | where $\bo{A} - \bo{B} \bo{K} < 0$ and $\bo{A}^{\top} - 267 | \bo{C}^{\top} \bo{L}^{\top} < 0$. 268 | 269 | 270 | \end{flushleft} 271 | \end{frame} 272 | 273 | 274 | 275 | 276 | \begin{frame}{Observation and Control} 277 | \framesubtitle{Stability analysis} 278 | \begin{flushleft} 279 | 280 | When we want to stabilize the origin, the dynamics+observer combination can be represented as a single LTI: 281 | 282 | \begin{equation} 283 | \begin{cases} 284 | \dot {\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u} \\ 285 | \hat{\dot {\bo{x}}} = \bo{A} \hat{\bo{x}} + \bo{B} \mathbf u + \bo{L}(\mathbf y - \bo{C} \hat{\bo{x}})\\ 286 | \bo{y} = \bo{C} \bo{x} \\ 287 | \bo{u} = -\bo{K} \hat{\bo{x}} 288 | \end{cases} 289 | \end{equation} 290 | 291 | In matrix form it becomes: 292 | 293 | \begin{equation} 294 | \begin{bmatrix} 295 | \dot {\bo{x}} \\ 296 | \hat{\dot {\bo{x}}} 297 | \end{bmatrix} 298 | = 299 | \begin{bmatrix} 300 | \bo{A} & -\bo{B}\bo{K} \\ 301 | \bo{L}\bo{C} & (\bo{A} - \bo{B}\bo{K}-\bo{L}\bo{C}) 302 | \end{bmatrix} 303 | \begin{bmatrix} 304 | \bo{x} \\ 305 | \hat{\bo{x}} 306 | \end{bmatrix} 307 | \end{equation} 308 | 309 | \bigskip 310 | 311 | We can't directly reason about eigenvalues of this matrix. Next slide will show a way to do it with a change of variables. 312 | 313 | \end{flushleft} 314 | \end{frame} 315 | 316 | 317 | 318 | 319 | \begin{frame}{Observation and Control} 320 | \framesubtitle{Change of variables} 321 | \begin{flushleft} 322 | 323 | Let us use the following substitution: $\bo{e} = \bo{x} - \hat{\bo{x}}$, which implies $\hat{\bo{x}} = \bo{x} - \bo{e}$: 324 | 325 | Our system had form: 326 | 327 | \begin{equation} 328 | \begin{cases} 329 | \dot {\bo{x}} = \bo{A} \bo{x} - \bo{B}\bo{K} \hat{\bo{x}} \\ 330 | \hat{\dot {\bo{x}}} = \bo{A} \hat{\bo{x}} - \bo{B}\bo{K} \hat{\bo{x}} + \bo{L}(\bo{C} \bo{x} - \bo{C} \hat{\bo{x}}) 331 | \end{cases} 332 | \end{equation} 333 | 334 | Since $\dot{\bo{e}} = \dot{\bo{x}} - \hat{\dot{\bo{x}}}$, we get: 335 | % 336 | \[ 337 | \dot{\bo{e}} = 338 | \bo{A} \bo{x} - \bo{B}\bo{K} \hat{\bo{x}} - 339 | (\bo{A} \hat{\bo{x}} - \bo{B}\bo{K} \hat{\bo{x}} + \bo{L}(\bo{C} \bo{x} - \bo{C} \hat{\bo{x}})) 340 | \] 341 | % 342 | \[ 343 | \dot{\bo{e}} = 344 | \bo{A} (\bo{x} - \hat{\bo{x}}) - \bo{L}\bo{C}(\bo{x} - \hat{\bo{x}}) 345 | \] 346 | % 347 | \[ 348 | \dot{\bo{e}} = 349 | (\bo{A} - \bo{L}\bo{C})\bo{e} 350 | \] 351 | 352 | Equation for $\dot {\bo{x}}$ takes form: 353 | 354 | \[ 355 | \dot {\bo{x}} = (\bo{A}-\bo{B}\bo{K}) \bo{x} + \bo{B}\bo{K}\bo{e} 356 | \] 357 | 358 | 359 | \end{flushleft} 360 | \end{frame} 361 | 362 | 363 | 364 | 365 | \begin{frame}{Observation and Control} 366 | \framesubtitle{Upper triangular form} 367 | \begin{flushleft} 368 | 369 | Collecting $\dot {\bo{x}}$ and $\dot{\bo{e}}$ we get: 370 | 371 | \begin{equation} 372 | \begin{cases} 373 | \dot {\bo{x}} = (\bo{A}-\bo{B}\bo{K}) \bo{x} + \bo{B}\bo{K}\bo{e} \\ 374 | \dot{\bo{e}} = 375 | (\bo{A} - \bo{L}\bo{C})\bo{e} 376 | \end{cases} 377 | \end{equation} 378 | 379 | In matrix form it becomes: 380 | 381 | \begin{equation} 382 | \begin{bmatrix} 383 | \dot {\bo{x}} \\ 384 | \dot{\bo{e}} 385 | \end{bmatrix} 386 | = 387 | \begin{bmatrix} 388 | (\bo{A}-\bo{B}\bo{K}) & \bo{B}\bo{K} \\ 389 | 0 & (\bo{A} - \bo{L}\bo{C}) 390 | \end{bmatrix} 391 | \begin{bmatrix} 392 | \bo{x} \\ 393 | \bo{e} 394 | \end{bmatrix} 395 | \end{equation} 396 | 397 | Eigenvalues of a upper block-triangular matrices equal to the union of the eigenvalues of the blocks on the main diagonal. Hence here, the eigenvalues of the system are equal to the union of eigenvalues of $(\bo{A}-\bo{B}\bo{K})$ and $(\bo{A} - \bo{L}\bo{C})$. 398 | 399 | \end{flushleft} 400 | \end{frame} 401 | 402 | 403 | 404 | \begin{frame}{Observation and Control} 405 | \framesubtitle{Separation principle} 406 | \begin{flushleft} 407 | 408 | Since the eigenvalues of the system are equal to the union of eigenvalues of $(\bo{A}-\bo{B}\bo{K})$ and $(\bo{A} - \bo{L}\bo{C})$, we can make the following observation: 409 | 410 | \bigskip 411 | 412 | \begin{alertblock}{Separation principle} 413 | As long as the observer and the controller are stable independently, the overall system is stable too. This is called \emph{separation principle}. 414 | \end{alertblock} 415 | 416 | \end{flushleft} 417 | \end{frame} 418 | 419 | 420 | 421 | 422 | % \begin{frame}{Observation and Control} 423 | % \framesubtitle{Affine case} 424 | % \begin{flushleft} 425 | 426 | 427 | % Affine case is almost the same: 428 | 429 | % \begin{equation} 430 | % \begin{cases} 431 | % \dot {\bo{x}} = \bo{A} \bo{x} + \bo{B} \bo{u} + \bo{c}\\ 432 | % \hat{\dot {\bo{x}}} = \bo{A} \hat{\bo{x}} + \bo{B} \mathbf u + \bo{L}(\mathbf y - \bo{C} \hat{\bo{x}}) + \bo{c} \\ 433 | % \bo{y} = \bo{C} \bo{x} \\ 434 | % \bo{u} = -\bo{K} (\hat{\bo{x}} - \bo{x}^*(t)) + \bo{u}^*(t) 435 | % \end{cases} 436 | % \end{equation} 437 | 438 | % \bigskip 439 | 440 | % where $\bo{A} - \bo{B} \bo{K} < 0$ and $\bo{A}^{\top} - 441 | % \bo{c}^{\top} \bo{L}^{\top} < 0$. 442 | 443 | 444 | % \end{flushleft} 445 | % \end{frame} 446 | 447 | 448 | 449 | 450 | 451 | \begin{frame}{Thank you!} 452 | \centerline{Lecture slides are available via Moodle.} 453 | \bigskip 454 | \centerline{You can help improve these slides at:} 455 | \centerline{\href{https://github.com/SergeiSa/Control-Theory-Slides-Spring-2021}{github.com/SergeiSa/Control-Theory-Slides-Spring-2021}} 456 | 457 | \includegraphics[width=1.6in]{qrcode.png} 458 | \bigskip 459 | 460 | \centerline{Check Moodle for additional links, videos, textbook suggestions.} 461 | 462 | \end{frame} 463 | 464 | \end{document} 465 | --------------------------------------------------------------------------------