Content deleted Content added
Em3rgent0rdr (talk | contribs) →Algorithm: oops my typo -1 |
Em3rgent0rdr (talk | contribs) →Algorithm: tieing this algorithmic wording of s(x) to the actual circuit schematic by saying "s(x) represents the operation of the comparator mathematically..." |
||
Line 15:
The successive-approximation register is initialized with 1 in the [[most significant bit]] (MSB) and zeroes in the lower bits. The register's code is fed into the DAC, which provides an analog equivalent of its digital code (initially {{math|1={{sfrac|1|2}}''V''<sub>ref</sub>}}) to the comparator for comparison with the sampled input voltage. If this analog voltage exceeds {{math|''V''<sub>in</sub>}}, then the comparator causes the SAR to reset this bit; otherwise, the bit is left as 1. Then the next bit is set to 1 and the same test is done, continuing this [[Binary search algorithm|binary search]] until every bit in the SAR has been tested. The resulting code is the digital approximated output of the sampled input voltage.
The algorithm's objective for the {{math|''n''<sup>th</sup>}} iteration is to approximately digitize the input voltage to an accuracy of {{frac|1|2<sup>''n''</sup>}} relative to the reference voltage. To show this mathematically, the normalized input voltage is represented as {{math|''x''}} in {{math|[−1, 1]}} by letting {{math|1=''V''<sub>in</sub> = ''xV''<sub>ref</sub>}}. The algorithm starts with an initial approximation of {{math|1=''x''<sub>0</sub> = 0}} and during each iteration {{math|''i''}} produces the following approximation:<blockquote>{{math|''i''<sup>th</sup>}} approximation: {{math|1=''x''<sub>''i''</sub> = ''x''<sub>''i''−1</sub> − {{sfrac|''s''(''x''<sub>''i''−1</sub> − ''x'')|2<sup>''i''</sup>}}}}</blockquote>where {{math|''s''(''x'')}}
1 & \text{if } x \geq 0, \\
-1 & \text{if } x < 0. \end{cases}</math>It follows using mathematical induction that the approximation of the {{math|''n''<sup>th</sup>}} iteration has a bounded accuracy of: {{math|{{!}}''x''<sub>''n''</sub> − ''x''{{!}} ≤ {{sfrac|1|2<sup>''n''</sup>}}}}.[[File:ADC animation 20.gif|thumb|alt=Successive approximation animation|Operation of successive-approximation ADC as input voltage falls from 5 to 0 V. Iterations on the ''x'' axis. Approximation value on the ''y'' axis.|right]]
|