\documentclass{standalone}

\usepackage{tikz,pgfplots}
\usepackage{siunitx}
\usepackage[siunitx,european]{circuitikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\usepackage{amsbsy}
\usetikzlibrary{fadings}
\usetikzlibrary{patterns}
\usetikzlibrary{automata,positioning}
\usepackage{mwe,subcaption,tikz}
\tikzset{boximg/.style={remember picture,red,thick,draw,inner sep=0pt,outer sep=0pt}}
\pgfplotsset{compat=1.11}
\begin{document}
\definecolor{mygreen}{rgb}{0,0.78,0}
\begin{tikzpicture}

\draw[<->, thick] (0,2.5) node[above]{$i_m\left(t\right)$} |- (5,0) node[right]{$t$};
\draw[blue, thick] (0,0) -- (1.5,2) -- (4,0) -- (5,1.33);
\draw[<->] (2.5,0) -- (2.5,2) node[above]{$\Delta I_m$};
\draw[dashed] (1.25,2) -- (2.75,2)
(5,1) -- (0,1) node[left]{$I_{m,avg}$};
\draw (1.5,0.1) -- (1.5,-0.1) node[below]{$\frac{D}{f_{sw}}$}
(4,0.1) -- (4,-0.1) node[below]{$\frac{1}{f_{sw}}$};

\end{tikzpicture}
\end{document}