<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\section{PN junction}
\subsection{What are we even doing}
We stick together n and p doped regions, such that the doping effectively  becomes a step function.
This causes majority carriers (electrons in n region, holes in p region) to diffuse the minority carrier side,
resulting in a new equilibrium (\autoref{label:fig:pn_carrier_profile_equilibrium}).
\begin{figure}[h]
    \centering
    \begin{subfigure}[b]{.45\textwidth}
        \includegraphics[width=\textwidth]{imgs/pn_carrier_profile_equilibrium.png}
        \caption{Resulting carrier profile in thermal equilibrium}
        \label{label:fig:pn_carrier_profile_equilibrium}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{.45\textwidth}
        \includegraphics[width=\textwidth]{imgs/pn_fermi_level_band_bending.png}
        \caption{Resulting carrier profile in thermal equilibrium}
        \label{label:fig:pn_fermi_level_band_bending}
    \end{subfigure}
\end{figure}

As can be seen in \autoref{label:fig:pn_fermi_level_band_bending},
the energy levels for conduction and valence bands bend, whereas the fermi level remains constant.



\subsection{Depletion approximation}
We assume p and n regions quasi-neutral,
and the intermediate space charge region to be completely depleted of carriers.
We further assume all transitions are expressed as step-functions.
This allows the following simplified equations:
\begin{align}
    \rho(x) &amp; = \begin{dcases}
        0     &amp; x&lt;-x_p   \\
        -qN_a &amp; -x_p&lt;x&lt;0 \\
        qN_d  &amp; 0&lt;x&lt;x_n  \\
        0     &amp; x_n&lt;x
    \end{dcases} \\
    E(x)    &amp; =\begin{dcases}
        0                                &amp; x&lt;-x_p    \\
        -\frac{qN_a}{\varepsilon}(x+x_p) &amp; - x_p&lt;x&lt;0 \\
        \frac{qN_d}{\varepsilon}(x-x_n)  &amp; 0&lt;x&lt;x_n   \\
        0                                &amp; x_n&lt;x
    \end{dcases}
\end{align}
Where $E$ is found using \eqref{label:eq:def_electric_field_integral}.

</pre></body></html>