\documentclass[border=4pt]{standalone}
\usepackage{ga}
\input{../ee1.tikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) to[american voltage source, l=$V_\mathrm{in}$, invert] (0,1.6) to[R, l=$R_1$] (2,1.6) -- (3,1.6) node[ocirc]{};
\draw (2,1.6) node[circ]{} to[empty diode, l_=$D_1$] (2,0) node[circ]{};
\draw (0,0) -- (3,0) node[ocirc]{};
\node[font=\small] at (2.45,1.25) {$+$}; \node[font=\small] at (2.45,0.35) {$-$}; \node at (3.1,0.8) {$V_\mathrm{out}$};
\begin{axis}[sketch, at={(3.4cm,-0.9cm)}, width=4.8cm, height=4cm, xmin=-1, xmax=1, ymin=-1, ymax=1, xlabel={$V_\mathrm{in}$}, ylabel={$V_\mathrm{out}$}, xtick={0.3}, xticklabels={$V_\mathrm{D,on}$}, xticklabel style={anchor=north west}]
  \addplot[line width=1.4pt] coordinates {(-0.95,-0.95) (0.3,0.3) (0.95,0.3)};
  \draw[dim] (axis cs:0.3,0) -- (axis cs:0.3,0.3);
\end{axis}
% V_out = min(V_in, V_D,on)
\begin{axis}[sketch, at={(0cm,-4.6cm)}, width=7.6cm, height=3.8cm, xmin=0, xmax=1.1, ymin=-1.2, ymax=1.2, xlabel={$t$}, ytick={0.3}, yticklabels={$V_\mathrm{D,on}$}]
  \addplot[black, line width=0.8pt, domain=0:1, samples=200] {sin(deg(2*pi*x))};
  \addplot[line width=1.4pt, domain=0:1, samples=300] {min(sin(deg(2*pi*x)),0.3)};
  \node[font=\small] at (axis cs:0.12,1.0) {$V_\mathrm{in}$};
\end{axis}
\end{circuitikz}
\end{document}
