/[dtapublic]/pubs/books/ucbka/trunk/c_rcs0/c_rcs0.tex
ViewVC logotype

Diff of /pubs/books/ucbka/trunk/c_rcs0/c_rcs0.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 139 by dashley, Fri Oct 7 01:36:46 2016 UTC revision 140 by dashley, Mon Jul 3 01:59:16 2017 UTC
# Line 1  Line 1 
1  %$Header: /home/dashley/cvsrep/e3ft_gpl01/e3ft_gpl01/dtaipubs/esrgubka/c_rcs0/c_rcs0.tex,v 1.2 2001/07/01 19:46:09 dtashley Exp $  %$Header$
2    
3  \chapter[\crcszeroshorttitle{}]{\crcszerolongtitle{}}  \chapter[\crcszeroshorttitle{}]{\crcszerolongtitle{}}
4    
5  \label{crcs0}  \label{crcs0}
6    
7    
8  \section{Introduction}  \section{Introduction}
9    
10  \index{ratiometric conversion and calculation}  \index{ratiometric conversion and calculation}
11  This chapter describes the construction and analysis of ratiometric conversion and  This chapter describes the construction and analysis of ratiometric conversion and
12  measurement systems.  By \emph{ratiometric}, we mean that the system requires input  measurement systems.  By \emph{ratiometric}, we mean that the system requires input
13  from multiple A/D channels to infer the data of interest, typically a potentiometer  from multiple A/D channels to infer the data of interest, typically a potentiometer
14  position.  Ratiometric conversion and calculation systems are most often used in  position.  Ratiometric conversion and calculation systems are most often used in
15  small microcontroller work because they can reduce cost by eliminating regulated  small microcontroller work because they can reduce cost by eliminating regulated
16  voltage supplies.  Successive sections in the chapter describe the analysis of progressively  voltage supplies.  Successive sections in the chapter describe the analysis of progressively
17  more complex ratiometric conversion and calculation systems.  more complex ratiometric conversion and calculation systems.
18    
19    
20  \section{Ratiometric Conversion In Hardware Versus Ratiometric Calculation In Software}  \section{Ratiometric Conversion In Hardware Versus Ratiometric Calculation In Software}
21    
22  Need to include a differentiation between conversion in hardware and  Need to include a differentiation between conversion in hardware and
23  calculation in software.  calculation in software.
24    
25    
26  %Section tag: srsy1  %Section tag: srsy1
27  %  %
28  \section{Potentiometer With $V_{+}$ Reference And Hardware Ratiometric Conversion}  \section{Potentiometer With $V_{+}$ Reference And Hardware Ratiometric Conversion}
29    
30  The simplest ratiometric potentiometer system  The simplest ratiometric potentiometer system
31  that would be constructed in practice  that would be constructed in practice
32  is shown in Fig. \ref{crcs0:srsy1:smplsys0}.  is shown in Fig. \ref{crcs0:srsy1:smplsys0}.
33  In this system, microcontroller software must sense  In this system, microcontroller software must sense
34  the potentiometer position $R_{P1}/R_P$\footnote{We hope that  the potentiometer position $R_{P1}/R_P$\footnote{We hope that
35  all of our readers have a background that allows them to  all of our readers have a background that allows them to
36  analyze resistor networks.  For readers without this background,  analyze resistor networks.  For readers without this background,
37  we recommend reading and working through the exercises in an  we recommend reading and working through the exercises in an
38  undergraduate circuit analysis text.} even as  undergraduate circuit analysis text.} even as
39  $V_{+}$ varies within the interval  $V_{+}$ varies within the interval
40  $V_{+} \in [V_{+MIN}, V_{+MAX}]$.  Such systems, with  $V_{+} \in [V_{+MIN}, V_{+MAX}]$.  Such systems, with
41  additional filtering and current-limiting components,  additional filtering and current-limiting components,
42  are commonly used in automobiles to allow a microcontroller  are commonly used in automobiles to allow a microcontroller
43  software load to sense seat or  software load to sense seat or
44  mirror position.  mirror position.
45  \index{seat position}  \index{seat position}
46  \index{mirror position}  \index{mirror position}
47  \index{battery voltage}  \index{battery voltage}
48  Using automobile battery voltage as $V_{+}$  Using automobile battery voltage as $V_{+}$
49  has the advantage that a regulated voltage is not  has the advantage that a regulated voltage is not
50  required, thus saving the component cost and circuit board  required, thus saving the component cost and circuit board
51  area of a voltage regulator.  area of a voltage regulator.
52    
53  \begin{figure}[!tb]  \begin{figure}[!tb]
54  \centering  \centering
55  \includegraphics[width=4.6in]{c_rcs0/s_rsy1/smplsys0.eps}  \includegraphics[width=4.6in]{c_rcs0/s_rsy1/smplsys0.eps}
56  \caption{Simple Ratiometric Measurement System With Hardware Ratiometric Conversion}  \caption{Simple Ratiometric Measurement System With Hardware Ratiometric Conversion}
57  \label{crcs0:srsy1:smplsys0}  \label{crcs0:srsy1:smplsys0}
58  \end{figure}  \end{figure}
59    
60  In the circuit of Fig. \ref{crcs0:srsy1:smplsys0}, the microcontroller  In the circuit of Fig. \ref{crcs0:srsy1:smplsys0}, the microcontroller
61  \index{A/D converter}A/D converter will convert $V_P$ using $V_R$ as a voltage  \index{A/D converter}A/D converter will convert $V_P$ using $V_R$ as a voltage
62  reference according to the relationship in (\ref{crcs0:srsy1:eq000}), where $N_{MAX}$  reference according to the relationship in (\ref{crcs0:srsy1:eq000}), where $N_{MAX}$
63  is the maximum count of the A/D converter.  The \index{floor function}$floor(\cdot{})$  is the maximum count of the A/D converter.  The \index{floor function}$floor(\cdot{})$
64  function in (\ref{crcs0:srsy1:eq000}) is used to model the effect of  function in (\ref{crcs0:srsy1:eq000}) is used to model the effect of
65  \index{quantization}quantization---the  \index{quantization}quantization---the
66  A/D count $N$ is required to be $\in \vworkintsetnonneg$.  A/D count $N$ is required to be $\in \vworkintsetnonneg$.
67    
68  \begin{equation}  \begin{equation}
69  \label{crcs0:srsy1:eq000}  \label{crcs0:srsy1:eq000}
70  N = \left\lfloor { \frac{N_{MAX} V_P}{V_R} } \right\rfloor  N = \left\lfloor { \frac{N_{MAX} V_P}{V_R} } \right\rfloor
71  \end{equation}  \end{equation}
72    
73    
74    
75  %Section tag: srsy0  %Section tag: srsy0
76  %  %
77  \section{Fixed $r_{1}$, Fixed $r_{2}$ System}  \section{Fixed $r_{1}$, Fixed $r_{2}$ System}
78  The simplest ratiometric system that would be constructed in practice  The simplest ratiometric system that would be constructed in practice
79  is shown in Fig. \ref{crcs0:srsy0:fr1fr2a}.  is shown in Fig. \ref{crcs0:srsy0:fr1fr2a}.
80  In Fig. \ref{crcs0:srsy0:fr1fr2a},  In Fig. \ref{crcs0:srsy0:fr1fr2a},
81  assume that the potentiometer is positioned so that  assume that the potentiometer is positioned so that
82  $R_{P1}$ is the resistance from the potentiometer wiper  $R_{P1}$ is the resistance from the potentiometer wiper
83  to ground, and $R_{P2}$ is the resistance from the potentiometer  to ground, and $R_{P2}$ is the resistance from the potentiometer
84  wiper to $V_{+}$.  By definition, $R_{P} = R_{P1} + R_{P2}$.  $z_R$ and  wiper to $V_{+}$.  By definition, $R_{P} = R_{P1} + R_{P2}$.  $z_R$ and
85  $z_P$ are the transfer coefficients which relate voltage to A/D counts.  $z_P$ are the transfer coefficients which relate voltage to A/D counts.
86  These transfer coefficients are an analysis convenience, and correspond to  These transfer coefficients are an analysis convenience, and correspond to
87  A/D converter characteristics.  A/D converter characteristics.
88    
89  \begin{figure}[!tb]  \begin{figure}[!tb]
90  \centering  \centering
91  \includegraphics[height=2.5in]{c_rcs0/s_rsy0/smplsys0.eps}  \includegraphics[height=2.5in]{c_rcs0/s_rsy0/smplsys0.eps}
92  \caption{Simple Ratiometric Measurement System With Software Ratiometric Calculation}  \caption{Simple Ratiometric Measurement System With Software Ratiometric Calculation}
93  \label{crcs0:srsy0:fr1fr2a}  \label{crcs0:srsy0:fr1fr2a}
94  \end{figure}  \end{figure}
95    
96  The circuit is designed to allow  The circuit is designed to allow
97  estimation of $R_{P1}$ (effectively, the potentiometer position)  estimation of $R_{P1}$ (effectively, the potentiometer position)
98  under conditions of varying $V_{+}$.  The economy of such a circuit  under conditions of varying $V_{+}$.  The economy of such a circuit
99  comes from the characteristic that $V_{+}$ need not be regulated,  comes from the characteristic that $V_{+}$ need not be regulated,
100  thus allowing less expensive lower-capacity voltage regulators or  thus allowing less expensive lower-capacity voltage regulators or
101  fewer voltage regulators to be used in an embedded system.  fewer voltage regulators to be used in an embedded system.
102  In an vehicle, for example, $V_{+}$ may be the battery voltage of  In an vehicle, for example, $V_{+}$ may be the battery voltage of
103  the vehicle, which will vary substantially based on which  the vehicle, which will vary substantially based on which
104  electrical loads are turned on, whether the starter motor is  electrical loads are turned on, whether the starter motor is
105  engaged, etc.  engaged, etc.
106    
107  The critical analysis question is,  The critical analysis question is,
108  how accurately can $R_{P1}/R_P$ be estimated under conditions  how accurately can $R_{P1}/R_P$ be estimated under conditions
109  of varying $V_{+} \in [V_{+MIN}, V_{+MAX}]$?  Or, equivalently,  of varying $V_{+} \in [V_{+MIN}, V_{+MAX}]$?  Or, equivalently,
110  given measured values of $y_R, y_P \in \vworkintsetnonneg$  given measured values of $y_R, y_P \in \vworkintsetnonneg$
111  and given $V_{+} \in [V_{+MIN}, V_{+MAX}]$,  and given $V_{+} \in [V_{+MIN}, V_{+MAX}]$,
112  what inequality describes the possible values of $R_{P1}/R_P$  what inequality describes the possible values of $R_{P1}/R_P$
113  (i.e. how much can be inferred or implied from the observation)?  (i.e. how much can be inferred or implied from the observation)?
114    
115    
116  From analysis of the circuit of Fig. \ref{crcs0:srsy0:fr1fr2a},  From analysis of the circuit of Fig. \ref{crcs0:srsy0:fr1fr2a},
117  it can be shown that (\ref{crcs0:srsy0:eq000}) applies.  it can be shown that (\ref{crcs0:srsy0:eq000}) applies.
118  However, because an A/D  However, because an A/D
119  count is necessarily $\in \vworkintsetnonneg$, (\ref{crcs0:srsy0:eq000b}) must be  count is necessarily $\in \vworkintsetnonneg$, (\ref{crcs0:srsy0:eq000b}) must be
120  used for analysis.  used for analysis.
121    
122  \begin{equation}  \begin{equation}
123  \label{crcs0:srsy0:eq000}  \label{crcs0:srsy0:eq000}
124  y_R = \frac{R_1 z_R V_{+}}{R_1 + R_2}  y_R = \frac{R_1 z_R V_{+}}{R_1 + R_2}
125  \end{equation}  \end{equation}
126    
127  \begin{equation}  \begin{equation}
128  \label{crcs0:srsy0:eq000b}  \label{crcs0:srsy0:eq000b}
129  y_R = \left\lfloor\frac{R_1 z_R V_{+}}{R_1 + R_2}\right\rfloor  y_R = \left\lfloor\frac{R_1 z_R V_{+}}{R_1 + R_2}\right\rfloor
130  \end{equation}  \end{equation}
131    
132  Similarly, (\ref{crcs0:srsy0:eq000c}) describes $y_P$ for analysis.  Similarly, (\ref{crcs0:srsy0:eq000c}) describes $y_P$ for analysis.
133    
134  \begin{equation}  \begin{equation}
135  \label{crcs0:srsy0:eq000c}  \label{crcs0:srsy0:eq000c}
136  y_P = \left\lfloor\frac{R_{P1} z_R V_{+}}{R_P}\right\rfloor  y_P = \left\lfloor\frac{R_{P1} z_R V_{+}}{R_P}\right\rfloor
137  \end{equation}  \end{equation}
138    
139    
140  \section{Unplaced Equations}  \section{Unplaced Equations}
141    
142  This section is a holding place for equations until can get my  This section is a holding place for equations until can get my
143  thoughts together.  thoughts together.
144    
145  \begin{equation}  \begin{equation}
146  y_P = \frac{R_{P1}}{R_P} V_{+}  y_P = \frac{R_{P1}}{R_P} V_{+}
147  \end{equation}  \end{equation}
148    
149  \begin{equation}  \begin{equation}
150  V_{+} = y_P \left( {\frac{R_P}{R_{P1}}} \right)  V_{+} = y_P \left( {\frac{R_P}{R_{P1}}} \right)
151  \end{equation}  \end{equation}
152    
153  \begin{equation}  \begin{equation}
154  y_R = \frac{R_1}{R_1 + R_2} V_{+}  y_R = \frac{R_1}{R_1 + R_2} V_{+}
155  \end{equation}  \end{equation}
156    
157  \begin{equation}  \begin{equation}
158  V_{+} = \frac{y_R ( R_1 + R_2)}{R_1}  V_{+} = \frac{y_R ( R_1 + R_2)}{R_1}
159  \end{equation}  \end{equation}
160    
161  \begin{equation}  \begin{equation}
162  y_P \left( {\frac{R_P}{R_{P1}}} \right) = y_R \left( {\frac{R1 + R2}{R1}} \right)  y_P \left( {\frac{R_P}{R_{P1}}} \right) = y_R \left( {\frac{R1 + R2}{R1}} \right)
163  \end{equation}  \end{equation}
164    
165  \begin{equation}  \begin{equation}
166  \frac{R_P}{R_{P1}} = \frac{y_R}{y_P} \left( {\frac{R_1 + R_2}{R_1}} \right)  \frac{R_P}{R_{P1}} = \frac{y_R}{y_P} \left( {\frac{R_1 + R_2}{R_1}} \right)
167  \end{equation}  \end{equation}
168    
169  \begin{equation}  \begin{equation}
170  \frac{R_{P1}}{R_P} = \frac{y_P}{y_R} \left( {\frac{R_1}{R_1 + R_2}} \right)  \frac{R_{P1}}{R_P} = \frac{y_P}{y_R} \left( {\frac{R_1}{R_1 + R_2}} \right)
171  \end{equation}  \end{equation}
172    
173  \begin{equation}  \begin{equation}
174  \frac{R_P V}{R_P V + 1} < \frac{\lfloor R_P V \rfloor}{\lfloor R_R V \rfloor} < \frac{R_P V + 1}{R_R V}  \frac{R_P V}{R_P V + 1} < \frac{\lfloor R_P V \rfloor}{\lfloor R_R V \rfloor} < \frac{R_P V + 1}{R_R V}
175  \end{equation}  \end{equation}
176    
177    
178  \vfill  \vfill
179  \begin{figure}[b]  \begin{figure}[b]
180  \noindent\rule[-0.25in]{\textwidth}{1pt}  \noindent\rule[-0.25in]{\textwidth}{1pt}
181  \begin{tiny}  \begin{tiny}
182  \begin{verbatim}  \begin{verbatim}
183  $RCSfile: c_rcs0.tex,v $  $RCSfile: c_rcs0.tex,v $
184  $Source: /home/dashley/cvsrep/e3ft_gpl01/e3ft_gpl01/dtaipubs/esrgubka/c_rcs0/c_rcs0.tex,v $  $Source: /home/dashley/cvsrep/e3ft_gpl01/e3ft_gpl01/dtaipubs/esrgubka/c_rcs0/c_rcs0.tex,v $
185  $Revision: 1.2 $  $Revision: 1.2 $
186  $Author: dtashley $  $Author: dtashley $
187  $Date: 2001/07/01 19:46:09 $  $Date: 2001/07/01 19:46:09 $
188  \end{verbatim}  \end{verbatim}
189  \end{tiny}  \end{tiny}
190  \noindent\rule[0.25in]{\textwidth}{1pt}  \noindent\rule[0.25in]{\textwidth}{1pt}
191  \end{figure}  \end{figure}
192    
193  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
194  % $Log: c_rcs0.tex,v $  % $Log: c_rcs0.tex,v $
195  % Revision 1.2  2001/07/01 19:46:09  dtashley  % Revision 1.2  2001/07/01 19:46:09  dtashley
196  % Move out of binary mode for use with CVS.  % Move out of binary mode for use with CVS.
197  %  %
198  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
199  % $History: c_rcs0.tex $  % $History: c_rcs0.tex $
200  %  %
201  % *****************  Version 5  *****************  % *****************  Version 5  *****************
202  % User: Dashley1     Date: 12/22/00   Time: 12:56a  % User: Dashley1     Date: 12/22/00   Time: 12:56a
203  % Updated in $/uC Software Multi-Volume Book (A)/Chapter, RCS0, Ratiometric Conversion And Measurement Systems  % Updated in $/uC Software Multi-Volume Book (A)/Chapter, RCS0, Ratiometric Conversion And Measurement Systems
204  % Tcl automated method of build refined.  % Tcl automated method of build refined.
205  %  %
206  % *****************  Version 4  *****************  % *****************  Version 4  *****************
207  % User: Dashley1     Date: 6/28/00    Time: 12:09p  % User: Dashley1     Date: 6/28/00    Time: 12:09p
208  % Updated in $/uC Software Multi-Volume Book (A)/Chapter, RCS0, Ratiometric Conversion And Measurement Systems  % Updated in $/uC Software Multi-Volume Book (A)/Chapter, RCS0, Ratiometric Conversion And Measurement Systems
209  % Substantial edits, forming thoughts.  % Substantial edits, forming thoughts.
210  %  %
211  % *****************  Version 3  *****************  % *****************  Version 3  *****************
212  % User: David T. Ashley Date: 6/27/00    Time: 11:51p  % User: David T. Ashley Date: 6/27/00    Time: 11:51p
213  % Updated in $/uC Software Multi-Volume Book (A)/Chapter, RCS0, Ratiometric Conversion And Measurement Systems  % Updated in $/uC Software Multi-Volume Book (A)/Chapter, RCS0, Ratiometric Conversion And Measurement Systems
214  % Initial check-in.  % Initial check-in.
215  %  %
216  % *****************  Version 2  *****************  % *****************  Version 2  *****************
217  % User: Dashley1     Date: 6/27/00    Time: 7:36p  % User: Dashley1     Date: 6/27/00    Time: 7:36p
218  % Updated in $/uC Software Multi-Volume Book (A)/Chapter, RCS0, Ratiometric Conversion And Measurement Systems  % Updated in $/uC Software Multi-Volume Book (A)/Chapter, RCS0, Ratiometric Conversion And Measurement Systems
219  % Edits for rationmetric conversion systems.  % Edits for rationmetric conversion systems.
220  %End of file C_RCS0.TEX  %End of file C_RCS0.TEX

Legend:
Removed from v.139  
changed lines
  Added in v.140

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25