\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{adjustbox}

\title{Styrning och optimering av bilbana}
\subtitle{slutleverans}
\author{Yc4}
\date{2019}

\begin{document}

\frame{\titlepage}

\begin{frame}
\frametitle{Bakgrund}

\end{frame}

\begin{frame}
\frametitle{Upplägg}

\begin{itemize}
	\item<2-> Systemet
	\begin{itemize}
		\item<3-> Bilbanan
		\item<3-> Displayen
	\end{itemize}
	\item<2-> Resultat
	\item<2-> Sammanfattning
\end{itemize}

\end{frame}

\begin{frame}
\frametitle{Systemöversikt}

\end{frame}

\begin{frame}
\frametitle{Uppstart}

\end{frame}

\begin{frame}
\frametitle{Körning - start}

\begin{figure}
	\begin{adjustbox}{max totalsize={0.9\textwidth}{0.7\textheight},center}
		\begin{tikzpicture}
			\draw 
				(0,0) -- 
				(1,0) --
				(1,1) --
				(2,1) --
				(2,2) --
				(3,2) --
				(3,3) --
				(4,3) --
				(4,5) --
				(7,5) --
				(7,5.5) --
				(10,5.5);
			\draw [dotted] (10, 5.5) -- (14, 5.5);
			\draw [->] (0,0) -- (15, 0) node[right]{$t$};
			\draw [->] (0,0) -- (0, 8) node[above]{Spänning};
			\draw [dotted] (4, 0) -- (4, 0.5) node[right]{Målgivarutslag} -- (4,3);
			\draw [dotted] (10,0) -- %(10, 3) node[right]{Bootstrap slut} -- 
			(10, 5.5);
			\draw [decoration={brace, raise=2pt}, decorate] (1,1) -- (2,1);  % dt
			\node at (1.5, 1.5) {$dt_1$};
			\draw [decoration={brace, raise=2pt}, decorate] (1,0) -- (1,1);
			\node at (0.5, 0.5) {$dU_1$};
			\draw [decoration={brace, raise=2pt}, decorate] (4,3) -- (4,5);
			\node at (3.5, 4) {$dU_2$};
			\draw [decoration={brace, raise=2pt}, decorate] (4,5) -- (7,5);
			\node at (5.5, 5.5) {$dt_2$};
			\draw [decoration={brace, mirror, raise=2pt}, decorate] (7,5) -- (7,5.5);
			\node at (7.55,5.25) {$dU_3$};
		\end{tikzpicture}
	\end{adjustbox}
\end{figure}

\end{frame}

\begin{frame}
\frametitle{Körning}

\end{frame}

\end{document}
