% 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\\RL Series Circuit - Analytical Solution vs\\ Modeling Software vs Physical Setup}




\markboth{RL Series Circuit - Analytical Solution vs Modeling Software vs Physical Setup}{RL Series Circuit - Analytical Solution vs Modeling Software vs Physical Setup}

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

\makeStitlePDFLaTex


\begin{abstract}
In this validation-oriented setup, the first order linear ordinary differential  equation governing a small signal RL series AC circuit is solved analytically  and the results are compared with the data acquired from analyzing the numerical model (using Multisim) of the circuit. This is  compared to an investigation of the actual physical prototype (on protoboard) of the circuit.
\end{abstract}

\section*{SCENARIO DESCRIPTION}

 

An inductor in an electrical circuit ``opposes'' the flow of current through it. An ideal inductor has no resistance or capacitance associated with its coil windings. A series RL (Resistance Inductance) small AC (Alternating Current) circuit consists of an AC source connected in ``series'' with a resistor (of resistance R) arranged in ``series'' with an inductor of inductance L.

This modeling and validation experiment consists of three parts. 

\section*{Part I: Analytically solving the governing equation of the circuit}

Consider the RL series circuit in Figure~\ref{fig:1-077-Fig1-Circuit}.

 \begin{figure}[h]
\begin{center}
\includegraphics[width=10.6cm]{1-077-Fig1-Circuit.png}



\parbox{12.2 true cm}{\caption{\label{fig:1-077-Fig1-Circuit}  Schematic of the series RL circuit}}
\end{center}
  \end{figure}



Ohm's law \cite{MakerPro}  for the voltage drops across the resistor R and across the inductor L, in combination with KVL (Kirchhoff's Voltage Law), applied to the entire circuit \cite{Kirchhoff}, gives the above circuit's ``governing'' differential equation. The equation used as the basis for this modeling scenario can be stated as:

\begin{equation}\label{eq:vsolve}
v_{s(t)}=\left(\frac{d_{is(t)}}{dt}\right) + R_{i_{s(t)}}	\, .		
\end{equation}

This is a first order linear ODE (ordinary differential equation), having the current $i_{s(t)}$ as the variable (function of time).  $i_{s(t)}$,  determined in Part I,  will be compared with the current $i_{s(t)}$ computed using a numerical simulator, Multisim,  in Part II. These results may be compared  with the measured $i_{s(t)}$ from the actual (physical) circuit in Part III.

From a more specific stand point, the relationship above can be re-written as:

\begin{equation}\label{eq:first}
\frac{d\,i_{s(t)}}{dt}+ \frac{R}{L} i_{s(t)} = \frac{1}{L} v_{s(t)} \, ,
\end{equation}

\noindent which fits the very form of a first order linear ODE.


The differential equation (\ref{eq:first}) is solved (\cite{Nagle}), and yields (an instantaneous value at time $t$) an $i_{s(t)}$ given by:

\begin{equation}\label{eq:integrate}
i_{s(t)} = e^{-\frac{Rt}{L}}{\int \left(e^{-\frac{Rt}{L}}\frac{v_{s(t)}}{L}\right) dt + C}\, ,
\end{equation}

\noindent where, the input source voltage $v_{s(t)}$ is a sinusoidal waveform. Moreover, for the purpose of our simulation, $ i_{s(0)} = 0$A is the initial condition. This  allows for the calculation of constant $C$ in (\ref{eq:integrate}) above, while the values selected for the resistance $R$ and inductance $L$, are carefully chosen so that they are the same component values used in Part II (virtual simulation), as well as in Part III (actual, physical circuit) of the simulation. 
Equation (\ref{eq:integrate}) is therefore solved for $v_{s(t)} = \sin (100t) V$, $i_{s(0)}  = 0$A, $R = 1\Omega$ and $L = 0.01$H, giving:

\begin{equation}\label{eq:solve}
i_{s(t)} = 0.5\left(\sin(100t) – \cos(100t) + e^{-100t}\right)	\, .
\end{equation}

The form of $i_{s(t)}$ obtained in (\ref{eq:solve}) represents the instantaneous value of the current through the RL circuit.

\section*{Part II: Determining $i_{s(t)}$  using modeling software Multisim}

Multisim$^{\ rm TM}$  software \cite{NationalInstruments} integrates the industry-standard SPICE software \cite{SPICE} 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{Multisim}. 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 skhown in Figure~\ref{fig:1-077-Fig2-CircuitDiagram}  is built, with the source ($v_{s(t)}$), $R$, and $L$ values used in  Part I.

 


 \begin{figure}[h]
\begin{center}
\includegraphics[width=10.6cm]{1-077-Fig2-CircuitDiagram.png}


\parbox{12.2 true cm}{\caption{\label{fig:1-077-Fig2-CircuitDiagram}  Schematic of the series RL circuit.}}
\end{center}
  \end{figure}

A digital multimeter (XMM1) is used to collect RMS (root-mean-square \cite{Peak}) current, $i_{s(t)}$, measurements (determined to be at 499.188 mA); these measurements can be compared with the RMS current measurements  taken in Part III (physical setup) of the simulation. The multimeter is connected in series with (as part of) the circuit.

Additionally, in order to visualize the signal through the circuit, an oscilloscope (XSC1) is utilized. The oscilloscope is connected for voltage measurements across the resistor $R$ (in parallel with the resistor). XSC1 will show peak \cite{Peak} values of the voltage across resistor $R$, as well as indicate how the voltage across $R$ behaves.

For ease in contrasting the data gathered via the procedures suggested in Part I and Part II, PEAK current values are determined (PEAK voltage values are acquired by XSC1 using  Ohm's law \cite{MakerPro} is used) by analyzing the data acquired from Multisim.

Specifically, while in Multisim, the simulation is turned on, and stopped once stabilized. On the display of the oscilloscope XSC1, any of the cursors is dragged to any of the PEAKS of the voltage visualized (voltage across resistor $R$). This   also represents the very point in time used to determine the peak current from (\ref{eq:vsolve}).
 
  \begin{figure}[h]
\begin{center}
\includegraphics[width=12.6cm]{1-077-Fig3-Oscilloscope.png}


\parbox{12.2 true cm}{\caption{\label{fig:1-077-Fig3-Oscilloscope}  Screenshot of oscilloscope (PEAK voltage across R is displayed. Cursor 2 (yellow) from Figure~\ref{fig:1-077-Fig3-Oscilloscope} indicates a PEAK voltage across $R$ of approximately 704.854 mV (instance occurring at time $t = 7.814$ s).}}
\end{center}
  \end{figure}





The PEAK current through the circuit is obtained indirectly, by applying Ohm's law \cite{MakerPro} at the level of the resistor (the observed PEAK voltage). Radians are used to evaluate $\sin$ and $cos$. This data  validates the analytical analysis of the RL circuit against the numerical modeling via Multisim.

\section*{Part III: Determining $i_{s(t)}$ from an actual/physical prototype of the circuit}

This part reiterates the realistic applicability of modeling via ODEs, while reinforcing the advantages associated with numerical simulations, e.g., using Multisim, one can consider various tolerances to the components used as well as the  fluctuating temperature of operation.

In a dedicated electrical engineering lab, the circuit from Figure~\ref{fig:1-077-Fig2-CircuitDiagram} is constructed. The function generator used (to supply the input voltage $v_{s(t)})$ has to be set on sinusoidal output. The voltage, frequency, resistance and inductance values used have to be the same values implemented in Parts I and II of the experiment.

In order to keep the analysis concise, limited to strictly basic measurement equipment, and to make use of yet another industry specific apparatus, it is suggested that RMS current values be recorded with a (preferably digital) multimeter, connected in the same manner as XMM1 from Figure~\ref{fig:1-077-Fig2-CircuitDiagram}. 

RMS current through the physical circuit is measured at 498.9mA, which matches the RMS value indicated by XMM1 in Part II of the simulation. Moreover, converting this 498.9mA RMS to PEAK \cite{Peak}, we obtain 705.851mA for the current value, which is in line, yet again, with the results obtained in Parts I and II.

\begin{thebibliography}{99}

\bibitem{Ganescu2019}Ganescu, V.~C. 2019. Building a Circuit in Multisim. \href{https://app.vidgrid.com/view/yPwnkhhgvEVq/?sr=vT2IRl}{https://app.vidgrid.com/view/yPwnkhhgvEVq/?sr=vT2IRl}. Accessed 2 March 2019.

\bibitem{Kirchhoff} Wikiversity. 2018. Electric Circuit Analysis/Kirchhoff's Voltage Law. \href{https://en.wikiversity.org/wiki/Electric\_Circuit\_Analysis/Kirchhoff\%27s\_Voltage\_Law}{https://en.wikiversity.org/wiki/Electric\_Circuit\_Analysis/Kirchhoff\%27s\_Voltage\_Law}  Accessed 2 March 2019.

\bibitem{Multisim}  {\it Multisim\/}. 2019. Free Academic Evaluation of  {\it Multisim\/}. \href{https://www.ni.com/en-us/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/what-is-multisim/multisim-education.html}{https://www.ni.com/en-us/shop/electronic-test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/what-is-multisim/multisim-education.html}.  Accessed 11 May 2022.

\bibitem{MakerPro} {\it MakerPro\/}. 2019. The Basics of Ohm's Law. \href{https://maker.pro/custom/tutorial/basics-of-ohms-law}{https://maker.pro/custom/tutorial/basics-of-ohms-law}. Accessed 2 March 2019.)

\bibitem{Nagle} Nagle, R.~K., A.~D.~Snider, and E.~B.~Saff. 2018. {\it Fundamentals of Differential Equations, 9th Edition\/}.  Boston: Pearson.

\bibitem{NationalInstruments} National Instruments. What is Multisim? 2019. \href{http://www.ni.com/en-us/shop/electronic- test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/what-is-multisim.html}{http://www.ni.com/en-us/shop/electronic- test-instrumentation/application-software-for-electronic-test-and-instrumentation-category/what-is-multisim.html}. Accessed 2 March 2019.  



\bibitem{SPICE} Rhome Semiconductors. 2019. SPICE Model (Whatd is SPICE?) \href{https://www.rohm.com/electronics-basics/spice/what-is-spice}{https://www.rohm.com/electronics-basics/spice/what-is-spice}. Accessed 2 Marchi 2019.  

\bibitem{Peak} testguy.net. 2019. Peak vs. Average vs. RMS Voltage. \href{https://testguy.net/content/270-Peak-vs-Average-vs-RMS-Voltage}{https://testguy.net/content/270-Peak-vs-Average-vs-RMS-Voltage}. Accessed 2 March 2019.  



\end{thebibliography}

\teacher{
\section*{NOTES FOR TEACHERS}

When comparing and contrasting  results, remember to use radians when entering the angular values for $i_{s(t)}$ derived analytically.

Multimeter XMM1  measures the RMS value of the current through the circuit, while the oscilloscope XSC1  measures (and helps visualize), the peak and peak-to-peak values of the voltage drop across the resistor $R$.

Any values for the input signal (amplitude, frequency, etc.), $R$ and $L$ 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.

Depending on the local logistics, Part III need not to be completed, since Parts I and II ensure a decent level of validation and utility.

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.
}







\end{document}
