Lab1/Lab1.tex

281 lines
11 KiB
TeX

\begin{filecontents}[overwrite]{\jobname.bib}
\end{filecontents}
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{circuitikz}
\usepackage{siunitx}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{amsmath}
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\usepackage{cancel}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage{framed}
\usepackage{longtable,booktabs,array}
\usepackage{caption}
\title{Lab 1 \\\quad\\ \small performed 2025-01-27}
\author{Martin Kennedy}
\begin{document}
\maketitle
\section{Introduction}
Unlike DC signals, AC signals are time-varying, posing unique
challenges to recording, characterizing and otherwise studying them.
In this lab, we will examine the circuit depicted in fig.~\ref{fig:circ}, and
focus on comparing the measurement of one aspect of an AC signal --
the RMS voltage -- as seen by two tools: the Digital Multimeter (DMM),
and the oscillscope. We will use numerical and analytical methods to
model this circuit and derive expected RMS values for comparison.
Figure~\ref{fig:circ} depicts the circuit we are studying.
\begin{figure}[h]
\caption{Our simple circuit}
\label{fig:circ}
\centering
\begin{circuitikz}[american voltages]
\draw
(0,0) to [sV,l=$V_{in}$] (0,2)
to (3,2)
to [ R, l_=$R$ ] (3,0)
to (0,0)
;
\end{circuitikz}
\end{figure}
We will be providing multiple variations on three different types of
AC signals at $V_{in}$.
We selected a resistor ${R=\SI{7.5}{\kohm}}$, with a $5\%$ precision
band; note that the exact resistance value of the resistor really
isn't important, since we are not studying its characteristics; we
only need its impedance to be much larger than the 50-ohm internal
resistance of our function generator.
\section{Analytic Modeling Results}
In the course of our lab procedure, three different types of AC signals are provided at $V_{in}$:
\begin{enumerate}
\item
\label{type:ac}
A sinusoidal signal with no DC offset, at two different frequencies and magnitudes
\item
\label{type:acoffset}
The same sinusoidal signals as above, but with a small positive DC offset
\item
\label{type:squarewave}
A square wave voltage, at $25\%$ and $50\%$ duty cycles, with two different AC magnitudes.
\end{enumerate}
For a signal $x(t)$, we are given the following formula for its RMS voltage:
\begin{equation} \label{eq:rms}
X_{RMS} = \sqrt{\frac{1}{T}\int{x(t)^{2}dt}}
\end{equation}
\subsection{Signal type ~\ref{type:ac} (sinusoidal AC)}
Given frequency $\omega$ (rad./s) and magnitude (peak amplitude) $V_m$, signal
type ~\ref{type:ac} can be modeled as:
\begin{equation}
v_{\ref{type:ac}}(t) = V_m\cos{(\omega{t})}
\end{equation}
(We can arrive here from the general form,
$V_m\cos{(\omega{t}+\theta)}$, by shifting the beginning and end of
our measurement window by $-\theta$, as the oscilloscope will do when
it measures RMS voltages from a peak-to-peak cycle.)
Substituting $v_{\ref{type:ac}}$ into equation
~\ref{eq:rms}, the RMS voltage $V_{\ref{type:ac}RMS}$ can be
expressed as:
\begin{align*}
V_{\ref{type:ac}RMS} \
&= \sqrt{\frac{1}{T}\int_{0}^{T}{V_{m}^{2}\cos^{2}{(\omega{t})}dt}} \\
&= V_{m}\sqrt{\frac{1}{T} \int_{0}^{T}{\frac{1}{2} + \frac{\cos{(2\omega{t})}}{2}dt}} \\
&= V_{m}\sqrt{\frac{1}{T} \left[ \frac{t}{2} + \frac{1}{4\omega} \sin{(2\omega t)} \right]_{0}^T} \\
&= V_{m}\sqrt{\frac{1}{T} \left( \frac{T}{2} + \frac{1}{4\omega} \cancel{\sin{(2\omega T)}} - \frac{1}{4\omega} \cancel{\sin{(0)}} \right)} \\
&= V_{m}\sqrt{\frac{1}{\cancel{T}} \frac{\cancel{T}}{2}} \\
&= \frac{V_{m}}{\sqrt{2}}. \numberthis \label{deriv:ac}
\end{align*}
\subsection{Signal type ~\ref{type:acoffset} (sinusoidal AC with DC offset)}
Given frequency $\omega$ (rad./s), peak amplitude $V_m$ and DC offset $V_b$, we
can model signal type ~\ref{type:acoffset} as:
\begin{equation}
v_{\ref{type:acoffset}}(t) = V_m\cos{(\omega{t})}+V_{b}
\end{equation}
Thus, substituting $v_{\ref{type:acoffset}}$ into equation
~\ref{eq:rms}, the RMS voltage $V_{\ref{type:acoffset}RMS}$ can be
expressed as:
\begin{align*}
V_{\ref{type:acoffset}RMS} \
&= \sqrt{\frac{1}{T}\int_{0}^{T}{ \left( V_{m} \cos{(\omega{t})} + V_{b} \right)^{2} dt}} \\
&= \sqrt{\frac{1}{T} \left( V_{m} \right)^{2} \int_{0}^{T}{\cos^{2}{(\omega{t})} + 2 \frac{V_{b}}{V_{m}} \cos{(\omega{t})} + \left( \frac{V_{b}}{V_{m}} \right)^{2} dt}} \\
&= V_{m}\sqrt{\frac{1}{T} \int_{0}^{T}{\frac{1}{2} + \frac{\cos{(2\omega{t})}}{2} + 2 \frac{V_{b}}{V_{m}} \cos{(\omega{t})} + \left( \frac{V_{b}}{V_{m}} \right)^{2} dt}} \\
&= V_{m}\sqrt{\frac{1}{T} \left[ \frac{t}{2} + \frac{1}{4\omega} \sin{(2\omega t)} + \frac{2 V_{b}}{\omega V_{m}} \sin{(\omega t)} + t \left( \frac{V_{b}}{V_{m}} \right)^{2} \right]_{0}^T} \\
&= V_{m}\sqrt{\frac{1}{T} \left( \frac{T}{2} + \frac{1}{4\omega} \cancel{\sin{(2\omega T)}} + \frac{2 V_{b}}{\omega V_{m}} \cancel{\sin{(\omega T)}} + T \left( \frac{V_{b}}{V_{m}} \right)^{2} - \frac{1}{4\omega} \cancel{\sin{(0)}} - \frac{2 V_{b}}{\omega V_{m}} \cancel{\sin{(0)}}\right)} \\
&= V_{m}\sqrt{\frac{1}{\cancel{T}} \left( \cancel{T} \right) \left( \frac{1}{2} + \left( \frac{V_{b}}{V_{m}} \right)^{2} \right)} \\
&= V_{m}\sqrt{\frac{1}{2} + \left( \frac{V_{b}}{V_{m}} \right)^{2}} \\
&= \sqrt{\frac{V_{m}^{2}}{2} + V_{b}^{2}}. \numberthis \label{deriv:acoffset}
\end{align*}
\begin{quote}
Note: I won't show it here, but general, for a periodic signal made
of two components $v = v_a + v_b$, where the two components are of
different frequencies, it can be shown from Equation ~\ref{eq:rms}
that the RMS voltage $V_{RMS}$ of the combined signal is equal to
the sum of the squares of the RMS voltages of its additive
components, i.e.
\begin{equation*}
\label{eq:rms_sq_comp}
V_{RMS} = \sqrt{{V_{aRMS}}^{2} + {V_{bRMS}}^{2}}.
\end{equation*}
\end{quote}
\subsection{Signal type ~\ref{type:squarewave} (square wave)}
Given magnitude $V_{m}$, frequency $\frac{1}{T}$ (Hz), and duty cycle
$D$, our square wave (type ~\ref{type:squarewave}) can be modeled as:
\begin{equation}
0 < t \leq T, \quad v_{\ref{type:squarewave}}(t) = \\
\begin{cases}
V_{m} & 0 \leq t < D T \\
-V_{m} & D T \leq t < T
\end{cases}
\end{equation}
This time, the integration is trivial: at any time,
$v_{\ref{type:squarewave}}(t)$ is either $V_{m}$ or $-V_{m}$, so
$(v_{\ref{type:squarewave}}(t))^{2}={V_{m}}^{2}$:
\begin{equation*}
V_{\ref{type:squarewave}RMS} = \sqrt{\frac{1}{T} \int_{0}^{T}{(V_{m})^{2}dt} } = \sqrt{\frac{1}{\cancel{T}} \cancel{T} {V_{m}}^{2}} = V_{m}. \
\numberthis \label{deriv:squarewave}
\end{equation*}
We will reference these three derivations in our ``Experimental Results'' section below.
\section{Numerical Modeling Results}
\section{Experimental Results}
\begin{figure}[h]
\caption{Breadboard, with resistor $R$ connected to our DMM, scope and function generator}
\label{fig:breadboard}
\centering
\includegraphics[width=\textwidth]{lab1breadboard}
\end{figure}
The circuit we implemented can be seen in
Figure~\ref{fig:breadboard}. This configuration connects one resistor
leg with the signal lead of the oscilloscope, the positive lead each
of the function generator and DMM; repeat the same with the other
resistor leg, the ground lead of the scope, and the negative leads of
each the DMM and function generator. In effect, all pieces of
equipment are placed in parallel, consistent with any other procedure
for measuring the facets of a signal's voltage.
(Our circuit builder was Peyton; our checker was Will; I was grouped
with these two as there were an odd number of students.)
We used this configuration for the entire lab procedure, and adjusted
both our function generator and oscilloscope through the variations of
the three different signal types; in all three cases, we first used
the oscilloscope to read the period and magnitude of the signal, and
then used the DMM to measure the signal's RMS voltage.
\subsection{Experiment ~\ref{type:ac} (sinusoidal AC)}
Given a read period of $T$ seconds, we calculate the frequency as
$\frac{1}{T}$ Hz. For the RMS voltage, we use the formula derived at
Equation ~\ref{deriv:ac}:
\begin{equation*}
V_{\ref{type:ac}RMS} = \frac{V_{m}}{\sqrt{2}}
\end{equation*}
\begin{longtable}[]{@{}lllllllll@{}}
\toprule
\endhead
\bottomrule
\endlastfoot
Set Mag. & Set Freq. & Read Mag. & Read Period & Calc. Freq. & Calc. RMS & Meas. RMS \\
2V & 100 Hz & 2.10 V & 9.994 ms & 100.1 Hz & 1.48 V & 1.4236 V \\
2V & 50 kHz & 2.05 V & 19.95 us & 50.13 kHz & 1.45 V & 1.4112 V \\
5V & 100 Hz & 5.11 V & 10.01 ms & 99.90 Hz & 3.61 V & 3.5522 V \\
5V & 50 kHz & 5.11 V & 20.01 us & 49.98 kHz & 3.61 V & 3.5451 V \\
\end{longtable}
\subsection{Experiment ~\ref{type:acoffset} (sinusoidal AC with DC offset)}
Given a read period of $T$ seconds, we calculate the frequency as
$\frac{1}{T}$ Hz. For this signal's RMS voltage, we use the formula derived at
Equation ~\ref{deriv:acoffset}:
\begin{equation*}
V_{\ref{type:acoffset}RMS} = \sqrt{\frac{V_{m}^{2}}{2} + V_{b}^{2}}
\end{equation*}
TODO NOTE ERROR could not check dc offset voltage bias
\begin{longtable}[]{@{}lllllllll@{}}
\toprule
\endhead
\bottomrule
\endlastfoot
Set Mag. & Set Freq. & DC bias & Read Mag. & Read Period & Calc. Freq. & Calc. RMS & Meas. RMS \\
2V & 100 Hz & 2V & 2.13 V & 10.00 ms & 100.0 Hz & 2.50 V & 2.44 V \\
2V & 100 Hz & -5V & 2.11 V & 9.996 ms & 100.0 Hz & 5.22 V & 5.19 V \\
5V & 100 Hz & 2V & 5.15 V & 9.998 ms & 100.0 Hz & 4.15 V & 4.05 V \\
5V & 100 Hz & -5V & 5.20 V & 9.997 ms & 100.0 Hz & 6.21 V & 6.16 V \\
\end{longtable}
\subsection{Experiment ~\ref{type:squarewave} (square wave)}
Given a read period of $T$ seconds, we calculate the frequency as
$\frac{1}{T}$ Hz. As we saw when deriving Equation
~\ref{deriv:squarewave}, this signal's RMS voltage is the same as its
magnitude.
\begin{longtable}[]{@{}lllllllll@{}}
\toprule
\endhead
\bottomrule
\endlastfoot
Set Mag. & Set Freq. & Duty & Read Mag. & Read Period & Calc. Freq. & Calc. RMS & Meas. RMS \\
2V & 100 Hz & 25\% & 2.11 V & 10.00ms & 100.0 Hz & 2.11 V & 2.02 V \\
2V & 100 Hz & 50\% & 2.13 V & 10.00ms & 100.0 Hz & 2.13 V & 2.01 V \\
5V & 100 Hz & 25\% & 5.20 V & 9.998ms & 100.0 Hz & 5.20 V & 5.04 V \\
5V & 100 Hz & 50\% & 5.20 V & 9.999ms & 100.0 Hz & 5.20 V & 5.01 V \\
\end{longtable}
\section{Data Comparison}
\section{Conclusions}
\nocite{*}
\printbibliography
\end{document}