% SIMIODE-TeacherStudent-Template.tex and simiode.cls for LaTeX2e
% Version 22 November 2016.
% 
% This template is to be used with the  class file "simiode.cls". 
%  
% The latest version of this class and template files 
% can be found at
% 
%       <http://www.SIMIODE.org> in the Author section.
%
% A "Quick Start Guide" appears below.
%
% This file must be processed with version LaTeX2e or higher.
% Appreciation to Mark Frantz, IUPUI; John Thoo, Yuba College; and Eric Sullivan, Carroll College.
%
\documentclass{simiode}
%
% With this version of the tex file and the associated SIMIODE.cls file you can produce BOTH a Student Version and a Teacher Version of your modeling scenario or technique narrative.
%
% Student Version contains the title STUDENT VERSION along with the NAME OF SCENARIO, with no abstract, no keywords, no tags, no author identifiers, and no COMMENTS section. The Student Version contains only the STATEMENT of the modeling scenario only with appropriate figures, data, instructions, and perhaps a bibliography appropriate for student resourcing, but nothing in the bibliography which would "give away" the nature of the modeling scenario, etc.
%
%The Teacher Version contains the material in the Student Version, namely the title NAME OF SCENARIO, now headed with   TEACHER VERSION, but also full author  identification, abstract, key words, tag words, and, following the STATEMENT, a section of COMMENTS which can be discussion of presentation  ideas, "solutions," techniques, etc.
%
% Authors can prepare a full Teacher Version using the notions immediately below  to create a pdf for review, but in review please eliminate all information about the author as we use a double-blind referee system. Such information will be restored when accepted and published in SIMIODE at www.simiode.org.
%
%***********   Toggle the following line to turn the teacher version on (1) or off (0). ***********
%
\def\TeacherEdition{0} % Toggle this line's value.
\newcommand{\teacher}[1]{\ifnum\TeacherEdition=1 #1 \fi}
%
% The \teacher{ } command wraps any text that will appear only in the teacher version of
% the document. See this file for examples. This has been done for you in the document below.   
% Rename the pdf after you compile each final version.
%
\usepackage{amsmath,amssymb}
\usepackage{color}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{url}
%
\renewcommand{\baselinestretch}{1.3}
%
% NOTE regarding macros %%
%
% Any macros defined for your paper should be contained in 
% the top matter. Likewise, any environment definitions such 
% as \newtheorem or \newenvironment should also go in the 
% top matter. 
% 
% Do not \input your macros as separate files within your 
% final version because more files make it harder for the 
% editors and users to keep track of and/or modify and 
% append your paper.
%
% Top matter is above and the beginning of the document below.
%
\begin{document}

\newpage
%
% You only need to change the NAME OF SCENARIO in the next line and delete the footnote. 
% See above for instructions on toggling from Teacher Version to Student Version.
%
\title{\ifnum\TeacherEdition=1 TEACHER VERSION  \else STUDENT VERSION \fi\\Op Amp Differentiator}





\markboth{Op Amp Differentiator}{Op Amp Differentiator}

\author{Virgil C.~Ganescu\\
York College of Pennsylvania\\
York PA   17403 USA\\
vganescu@ycp.edu
}

\makeStitlePDFLaTex


\begin{abstract}
In this validation-oriented setup, the output waveform (function) of a operational
amplifier type of differentiator circuit is determined analytically from the first order governing
ordinary differential equation and the results are compared with the data acquired from
analyzing the numerical model (using Multisim \cite{NI2020}) of the circuit.
\end{abstract}





\section*{SCENARIO DESCRIPTION}

An operational amplifier (op-amp) differentiator (or a differentiating amplifier) is a circuit
configuration which produces an output voltage amplitude that is proportional to the rate of
change of the applied input voltage (signal).

An op-amp differentiator is an inverting amplifier, which uses a capacitor in series with the input
voltage. Differentiating circuits are typically used to find the high-frequency component of the
input signal and in applications of edge detection. In essence, these operational amplifier
circuits are meant to produce output voltages which are directly proportional to the input
voltage’s rate-of-change with respect to time.

For a sine wave input, the output of a differentiator is also a sine wave, which is out of phase by
180$^\circ$ with respect to the input (cosine wave); this stems from the fact that the input signal to our
subject circuit is applied to the inverting input of the op-amp.

Differentiators have frequency limitations while operating on sine wave inputs; the circuit
attenuates all low frequency signal components and allows only high frequency components at
the output \cite{Electronicshub2020}.

\section*{Part I: Analytically Solving the Governing Expression of the Circuit}

Consider the Op-Amp Differentiator circuit in Figure~\ref{fig:1-096-Figure1}.

\begin{figure}
\begin{center}

\includegraphics[width=13cm]{1-096-Figure1.jpg}

\caption{\label{fig:1-096-Figure1}  Schematic of Op-Amp Differentiator Circuit.}
\end{center}

\end{figure}




Since the input signal is applied to the capacitor, only alternating current (ac) type of input
voltage changes will be ``allowed” to pass through, and whose frequencies are dependent on the
rate of change of the input. At low frequencies, the reactance of the capacitor is high, resulting
in low gain, and hence low output voltage from the op-amp; at high frequencies however, the
reactance of the capacitor is much lower resulting in a higher overall gain, and higher output
voltage, respectively \cite{Electronicstutorials2020}.

Due to the fact that the node voltage of the operational amplifier at its inverting input terminal is
zero, the current ($I_{\rm in}$), flowing through the capacitor will be given by:

\begin{equation}\label{eq:EQ1}
I_{\rm in} = I_{\rm f}
\end{equation}

\noindent and

\begin{equation}\label{eq:EQ2}
 I_{\rm f}=-\frac{v_{\rm out}}{R}\, . 
 \end{equation}


The charge on the capacitor is given by:

\begin{equation}\label{eq:EQ3}
Q = C \cdot   v_{\rm in} 
\end{equation}

\noindent and therefore, the rate of change of $Q$ (which is the capacitor current) can be calculated as:

\begin{equation}\label{eq:EQ4}
I_{\rm in}(t) = \frac{dQ(t)}{dt} = C \frac{d v_{\rm in}(t)}{dt} \, . 
\end{equation}

Ultimately, from relationships (\ref{eq:EQ1}), (\ref{eq:EQ2}), and (\ref{eq:EQ4}) we conclude that the output voltage (function) governing the design above can be stated as:

\begin{equation}\label{eq:EQ5}
v_{\rm out}(t)= - C R \frac{dv_{\rm in}(t)}{dt}\, .
\end{equation}

Equation (\ref{eq:EQ5}) is a first order (ordinary) differential expression, typically having the output voltage
$v_{\rm out}$ as the unknown (function of time). $v_{\rm out}(t)$, determined in  Part I, will be compared with
$v_{\rm out}(t)$ computed using a numerical simulator, Multisim (to be demonstrated in Part II). Note that
these results may be eventually compared with the measured $v_{\rm out}(t)$ from an actual (physical)
circuit/prototype.

For this modeling scenario, an $v_{\rm in}(t)  = \sin(100t) V$, $R = 1 k\Omega$ and $C = 1 \mu F$ have been selected.

$v_{\rm out}(t)$ obtained using $v_{\rm in}(t)  = \sin(100t) V$, $R = 1 k\Omega$ and $C = 1 \mu F$  in (\ref{eq:EQ5}) represent instantaneous values
of the output voltage generated by the differentiator circuit. PEAK values of $v_{\rm out}(t)$ will be
observed for periodic instances in time when $\cos(100t)$ will be equal to $\pm 1$. Additionally,
note the ``minus” (to be interpreted as a phase shift) in front of the output signal coming out of
the differentiator circuit.

\section*{Part II: Determining $v_{\rm out}(t)$ Using Modeling Software (Multisim)}

Multisim software \cite{NI2020} integrates the industry-standard SPICE software \cite{Rhome2020} simulation with an
interactive schematic environment to instantly visualize and analyze electronic circuit behavior.
By adding powerful circuit simulation and analyses to the design flow, Multisim helps
researchers and designers reduce printed circuit board prototype iterations and save
development costs. One of the attractive features of using Multisim centers on the almost
non-existent learning curve. Free, limited time trials (for educational purposes) can be
downloaded from \cite{Multisim2020}. Workstations - with Multisim already installed - from a dedicated electrical
engineering lab, say, can also be used. Using Multisim, as seen in \cite{Ganescu2019}, the circuit shown in
Figure~\ref{fig:1-096-Figure2}  is built, with the source voltage $v_{\rm in}(t) = \sin(100t)$, that is, input capacitor $C (1 \mu F)$ and
feedback resistor $R (1 k \Omega )$ just used in Part I; additionally, a generic 741 operational amplifier is
recommended (with $\pm$15V DC biasing levels).

\begin{figure}
\begin{center}

\includegraphics[width=13cm]{1-096-Figure2.jpg}

\caption{\label{fig:1-096-Figure2} Multisim Schematic of the Op-Amp Differentiator Circuit.}
\end{center}

\end{figure}

In order to visualize the signal coming out from the circuit, an oscilloscope (XSC1 - top right
corner in Figure~\ref{fig:1-096-Figure2} is utilized. As connected, XSC1 is used to monitor the values of the output
voltage of the differentiator circuit, as well as indicate how this output voltage behaves.
For ease in contrasting the data gathered via the procedures suggested in Part I and Part II,
PEAK (highest or lowest) values are used for $v_{\rm out}(t)$, while identifying points in time where PEAKs can be
viewed on XSC1 and use said time values to analytically estimate $v_{\rm out}(t)$  - as derived from (\ref{eq:EQ5}).

Even more specifically, while in Multisim, the simulation is turned on, and then paused, once
stabilized. On the display of the oscilloscope XSC1, any of the two cursors is dragged to any of
the PEAKs (positive or negative PEAK) of the voltage visualized. These identified PEAKs are
observed at the very points in time ($t$, in seconds) we use to determine the PEAK values of
$v_{\rm out}(t)$, as calculated from (\ref{eq:EQ5}).

\begin{figure}
\begin{center}

\includegraphics[width=14cm]{1-096-Figure3.jpg}

\caption{\label{fig:1-096-Figure3} Screen of the oscilloscope (XCS1) from Figure~\ref{fig:1-096-Figure2}.}
\end{center}

\end{figure}


Cursor 2 (blue) from Figure~\ref{fig:1-096-Figure3} indicates a PEAK output voltage of approximately -0.099 V
(instance occurring at time $t = 293.171$ s). Note that this is just one of the many PEAKs!
To concisely summarize the modeling efforts, a table similar to Table~\ref{table:Table1} can be used.

\begin{table}[h]
\begin{center}

\begin{tabular}{|c|c|c|}\hline 
Time (in s) & V$_{\rm out}$ : Analytical (in V)& V$_{\rm out}$: Multisim (in V) \\ \hline 
293.171 &-0.098 &-0.099 \\ \hline 
another instance where&& \\
another peak was observed&& \\ 
\ldots && \\  \hline 
another instance where && \\
another peak was observed && \\ 
\ldots && \\  \hline 
another instance where && \\ 
another peak was observed && \\ 
\ldots &&\\  \hline 
\end{tabular}

\caption{\label{table:Table1}Analytical vs Numerical Output Voltage Levels.}
\end{center}

\end{table}

\teacher{
\vspace*{-.8 true cm}
\section*{NOTES FOR TEACHERS}

When comparing and contrasting results, remember to use radians.
Any values for the input signal (amplitude, frequency, etc.), $C$ and $R$ can be used here.
However, caution should be exercised in order to avoid over-bearing arithmetic calculations at
the expense of jeopardizing the value of the modeling scenario itself.
Ideally, in particular for engineering majors, it is suggested that one go over several sets of
measurements and run through several ``what-if'' scenarios, adjust (in Multisim) various
operating parameters, eventually determine accuracy/errors.
}

\begin{thebibliography}{98}



\bibitem{Electronicshub2020} Electronicshub. 2020. {\it Operational Amplifier a Differentiator\/}.
\href{https://www.electronicshub.org/operational-amplifier-as-differentiator}{https://www.electronicshub.org/\\operational-amplifier-as-differentiator}. Accessed 2 August 2020.

\bibitem{Electronicstutorials2020}  Electronics-tutorials. 2020. {\it Differentiator Amplifier\/}.
\href{https://www.electronics-tutorials.ws/opamp/opamp_7.html}{https://www.electronics-tutorials.ws/\\opamp/opamp\_7.html}. Accessed 2 August 2020.

\bibitem{Ganescu2019}  Ganescu, V. C. 2019. {\it Multisim Brief Tutorial\/}. \href{https://use.vg/On4CH7}{https://use.vg/On4CH7}. Accessed 2 August 2020.

\bibitem{Multisim2020}  Multisim. 2020.   {\it  Free Academic Evaluation of Multisim\/}.
\href{https://lumen.ni.com/nicif/us/academicevalmultisim/content.xhtml}{https://lumen.ni.com/nicif/us/\\academicevalmultisim/content.xhtml}. Accessed 2 August 2020.

\bibitem{NI2020} National Instruments. 2020. {\it What is Multisim?}
\href{https://www.ni.com/en-us/shop/electronic-test-instrumentation/application-software-for-electronic
-test-and-instrumentation-category/what-is-multisim.html}{https://www.ni.com/en-us/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/\\what-is-multisim.html}. Accessed 2 August 2020.

\bibitem{Rhome2020} Rhome Semiconductors. 2020. {\it Types of SPICE Models\/}.
\href{https://techweb.rohm.com/knowledge/simulation/s-simulation/01-s-simulation/8294}{https://techweb.rohm.com/knowledge/\\simulation/s-simulation/01-s-simulation/8294}. Accessed 2
August 2020.

\bibitem{Testguy2020} Testguy. 2020. {\it Peak vs. Average vs. RMS Voltage\/}.
\href{https://testguy.net/content/\%20270-Peak-vs-Average-vs-RMS-Voltage}{https://testguy.net/content/\%20270-Peak-vs-Average-vs-RMS-Voltage}. Accessed 2 August
2020.


\end{thebibliography}






\end{document}
