High dynamic range analog-to-digital conversion with selective regression based data repair
09654134 ยท 2017-05-16
Assignee
Inventors
Cpc classification
H03M1/188
ELECTRICITY
International classification
H04B1/00
ELECTRICITY
Abstract
A multi-stage analog-to-digital conversion method and system use window functions and translation to match high gain frames of data to target frames of data. The technique selects window data packets for the output stream based the stage of data having the highest gain satisfying selection criteria, such as requiring a frame of data for the respective stage to satisfy a predetermined accuracy of fit value compared to a target frame of data for a zero gain stage.
Claims
1. A method of converting an analog input signal to a high fidelity digital output signal, comprising the steps of: transmitting an analog input signal from an analog signal source; providing the analog input signal in at least two stages having distinct levels of amplification; converting each resultant amplified analog input signal to a digital input signal for the respective stage, wherein the digital input signal for the respective stage comprises digital data samples; assigning the digital data samples for each stage to correspond to a frame in dependence on when they are received, wherein the time period of each frame is interchangeable between stages; applying a window function overlapping in time to each frame of data to create windowed data packets for each respective stage; providing the windowed data packets as inputs to a combiner; selecting a windowed data packet for one of the stages to be used by the combiner to generate the digital output signal.
2. The method according to claim 1 where each frame is stored in a buffer at a frame rate.
3. The method according to claim 2, wherein a frame of data in at least one buffer for one stage is translated to match a frame of data from another buffer for another stage prior to the application of the window function.
4. The method according to claim 3, wherein translation is performed utilizing least squares regression.
5. The method according to claim 4, wherein performance of least squares regression utilizes auto-correlation and cross-correlation statistics that are accumulated based on at least two digital data inputs over a finite time span equal to or greater than the span of each data buffer and applied during each frame.
6. The method according to claim 3, wherein translation includes adjusting at least one of in, DC offset, slope or delay.
7. The method according to claim 1, wherein the window function is constructed such that the addition of subsequent window data packets derived from a digital input signal for the same stage would substantially reproduce the original digital input signal for the stage.
8. The method according to claim 3, wherein the decision on which windowed data packets to select for a given frame is based at least in part on an accuracy of fit parameter created during the translation of one data buffer to match another.
9. The method according to claim 8 wherein the translation coefficients are locked to a predetermined value if the accuracy of fit parameter indicates a high degree of fit for an extended period of time between translated data and target data.
10. The method according to claim 7 wherein the accuracy of fit parameter is defined by the sum of squares for the difference between at least one buffer and at least one translated buffer.
11. The method according to claim 1, wherein the analog input signal for one stage has an amplification gain of zero dB.
12. The method according to claim 1, wherein the analog input signal for one stage has an amplification gain of 30 dB.
13. A method of converting an analog input signal to a high fidelity digital output signal, comprising the steps of: transmitting an analog input signal from an analog signal source; providing the analog input signal in at least two stages having distinct levels of amplification; converting each resultant amplified analog input signal to a digital input signal for a first stage and to digital input signal for a second stage, wherein the digital input signal for the respective stage comprises digital data samples; assigning the digital data samples for each stage to correspond to a frame in dependence on when they are received; translating a frame of data for the second stage to match a frame of data for the first stage; providing the translated frame of data for the second stage and the frame of data for the first stage for use by a combiner to generate the digital output signal.
14. The method according to claim 13 further comprising the step of storing frames of data samples for each stage to a corresponding data buffer prior to the translating step.
15. The method according to claim 14, wherein translation is performed utilizing least squares regression.
16. The method according to claim 15, wherein performance of least squares regression utilizes auto-correlation and cross-correlation statistics collected between two digital data inputs over a time span equal to or greater than the span of each data buffer.
17. The method according to claim 13, wherein translation includes adjusting at least one of gain, DC offset, slope or delay.
18. A multi-stage analog-to-digital conversion system comprising: a first stage and second stage analog-to-digital converter, each having an analog input transmitted from a common analog input source and each outputting a digital input signal, wherein the amplification gain of the second stage analog-to-digital converter is greater than the amplification gain of the first stage analog-to-digital converter; a digital processor that receives the digital input signal from the first stage analog-to-digital converter and the digital input signal from the second stage analog-to-digital converter and outputs a constructed digital output signal, said digital signal processor providing: means for applying a window function that overlaps in time to the frames of digital input data for each stage to generate windowed data packets corresponding to each stage of analog input; and a combiner configured to select a windowed data packet for one of the stages and sequentially combine the selected data packets to construct the digital output signal.
19. The system of claim 18 further comprising data buffers for storing frames of digital input signal data for each stage.
20. The system of claim 19, wherein the digital processor further provides translation means for matching data from the data buffer for the second stage to the data buffer for the first stage prior to the application of the window function.
21. The system of claim 20, wherein the translation means includes the operations of at least one of scaling, adding a DC offset, adjusting a slope or delaying.
22. The system of claim 21, wherein the translation means operates on a basis of minimizing the sum of squares for the error between a data buffer and translated data buffer.
23. The system of claim 19, wherein the sum of sequential window functions is unity.
24. The system of claim 19, wherein the combiner is configured to select windowed data packets based at least in part on an accuracy of fit parameter.
25. The system of claim 24, wherein the accuracy of fit parameter incorporates a measure of the sum of least squares between at least one data buffer and at least one translated data buffer.
26. The system of claim 19 further comprising one or more additional stages and analog-to digital converters, wherein each data buffer other than that derived from the digital input signal created by the analog-to-digital converter having the lowest level of analog input amplification is translated to match the data buffer derived from the digital input signal created by the analog-to-digital converter having the lowest level of analog input amplification.
27. The system of claim 25, wherein the combiner selects window data packets that correspond to those derived from the digital input signal whose analog-to-digital converter has the highest level of input amplification in deriving its analog input signal and whose translated buffers are within a prescribed tolerance when compared to the data buffer derived from the digital input signal from the analog-to-digital converter having the lowest level of amplification.
28. The system of claim 23, wherein each data buffer other than that derived from the digital input signal from the analog-to-digital converter having the highest level of quantization noise is translated to match the data buffer derived from the digital input signal from the analog-to-digital converter having the lowest level of quantization.
29. The system according to claim 18, wherein the multi-stage analog-to-digital conversion system is part of an apparatus including a multi-track audio recorder and each digital output signal is provided as an input to the multi-track audio recorder.
30. The system according to claim 18, wherein the multi-stage analog-to-digital conversion system is part of an apparatus including a multi-track audio mixer and each digital output signal is provided as an input to a multi-track audio mixer.
31. The system according to claim 18 further comprising a wireless microphone apparatus, wherein the multi-stage analog-to-digital conversion system is part of said apparatus.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
DETAILED DESCRIPTION
(10)
(11) As shown in
(12) Within the digital processor 102, the ADC output data 151, 152 and 153 is collected in buffering functions 131, 132 and 133 for constructing or forming input data buffers (or vectors or frames of data) 191, 192 and 193 respectively. For example, referring to the first stage, the digital input signal 151 s.sub.1(k) created by the ADC1 121 is accumulated over a number N.sub.w of samples and these are collectively provided as an input data buffer 191. The preferred number of samples collected for each buffer may be sample-rate dependent and range from a fraction of a millisecond (0.5 ms) to several milliseconds (10 ms) of data. As an example, if the sample-rate is set to 192 kHz, and the buffer length is set to 2 ms, N.sub.w=384 samples of data would be collected to fill an input data buffer. As another example again referring to the first stage, the digital input signal 151 s.sub.1 (k) may be continuously supplied as the input through a delay-line holding N.sub.w=384 samples, where the contents of the delay line is periodically referenced (once each frame) as representing a filled input data buffer. Throughout this disclosure, bold letters in equations refer to either matrices or vectors (or buffers), while non-bold variables refer to scalar (single dimension) entities. Furthermore, the discrete time index k refers to the most recent sample-period, while frame index q refers to the most recent frame (or buffer of data). Note that data referred to by a given frame preferably overlaps data from adjacent frames, so frames will be collected at a rate at least equal to and preferably faster than every N.sub.w sample periods. Using vector notation, we may express the output of the j.sup.th stage input data buffer completed at discrete-time index k (counting up by one for each sample collected during each sample period from the ADC's 151, 152, 153s), as
s.sub.kj=[s.sub.j(k)s.sub.j(k1)s.sub.j(k2) . . . s.sub.j(k(N.sub.w1))].sup.T(1)
where N.sub.w, refers to the size (or length) of the buffer (or vector or frame) and s.sub.j(k) (noting this non-bold symbol representing a scalar data sample, rather than buffer) refers to the digital input signal created by the respective ADC 151, 152, 153 for the j.sup.th stage at discrete time index k. Note this data buffer spans N.sub.w samples of data. For example, at time index k, s.sub.1(k) refers to the output of the first stage ADC1 121 and at time k and an ordered collection of the N.sub.w most recent samples from ADC1 121 comprises s.sub.k1, which refers to the input data buffer (or vector or frame) 191 from the first (j=1) stage that is output from the first stage buffering function 131. Upon the completion for each frame (at which time, frame index q increments by one), buffering functions 131, 132 and 133 provide additional (or updated) input data buffers 191, 192 and 193.
(13) As shown, input data buffers 191 and 192 (or vectors s.sub.k1 and s.sub.k2) output from the first and second respective buffering function 131 and 132 are fed as inputs to the buffer data fitting function 302 that performs the task of modeling relationships between those inputs. Furthermore, input data buffers 191 and 193 (or vectors s.sub.k1 and s.sub.k3) output from the respective first buffering function 131 and third buffering function 133 are fed as inputs to the buffer data fitting function 303 that includes modeling relationships between those inputs. Translation coefficients 502a, 502b and 502c derived from the first buffer data fitting function 302 are applied to translating buffers of data 192 supplied by the second buffering function 132 at operation 402, producing a second stage translated buffer 182. Translation coefficients 503a, 503b and 503c derived from the second data fitting function 303 are applied to translating buffers of data 193 supplied by the third buffering function 133 at operation 403, producing a third stage translated buffer 183. The input data buffer 191 is directly supplied as the input to windowing function 161 for creating the window-packet buffer 171. In contrast, the second stage translated buffer 182 and third stage translated buffer 183 are then be supplied as inputs to windowing functions, 162 and 163 respectively to create window-packet buffers 172 and 173 respectively. All three resultant window-packets 171, 172 and 173 are then supplied to a window-packet combiner 200 for generating the digital output stream 104. Accuracy of fit parameters .sub.12 342 and .sub.13 343 derived from the data fitting functions 302 and 303 respectively are also applied to the window-packet combiner 200.
(14)
(15) In contrasting the operation of the first and second stages, the second stage buffering function 132 preferably internally operates analogously to the first stage buffering function 131. Furthermore, window function 162 preferably internally operates similarly to window function 161. However, the translation process 402 present in the second stage between the output 192 of the second stage buffering function 132 and window function 162 contrasts the fact that no translation process is shown in the first stage between the output 191 of the first stage buffering function 131 and window function 161. Although in alternative embodiments one could be present, the exemplary embodiment described in
(16) Alternatively, other topologies for data fitting are envisioned in the scope of this disclosure. For example, the highest ordered stage may apply data fitting for its input data buffer to that for the preceding stage. Subsequently, data fitting may be applied for the result to data from the input data buffer from the stage before that. Subsequent data fitting of each result to data from the input buffer of each preceding stage may continue until data fitting is performed to data from the input buffer of the first (or lowest gain) stage. For example, the system 100A of
(17) The translation process 402 includes the operation of scaling 432 (or multiplying) the input data buffer 192 by a scalar .sub.12 502a supplied by the data fitting function 302. The translation block may further include the operation of adding a DC offset 422 using an offset coefficient .sub.12 502b. Finally, it may include an optional operation 412 for adding a ramp function using a slope coefficient .sub.12 502c. Following these operations, the result is output as a translated buffer 182 (or translated frame of data) to be fed as an input to the window function 162 to produce the window-packet 172. This window-packet 172 is supplied in combination with the window-packet from the first stage 171 to the window-packet combiner 200 along with an accuracy of fit parameter 342, .sub.12, derived from the data fitting function 302. Inside the window-packet combiner 200, a selector 201 selects window-packets where the decision as to which window-packet 171 or 172 to use is based on a window-packet selector index m.sup.q 206 (where m refers to the index for which window packet to select and q refers to the frame index) that is supplied by the selector index generator 207. The selector index generator 207 preferably uses the accuracy of fit parameter .sub.12 342 calculated by the data fitting function 342 during each frame for making decisions for the desired setting of window-packet selector index m.sup.q 206. The window-packet 204 selected by the selector 201 is supplied to an output construction process or a function 202 for adding in overlapping window-packets sequentially received from one frame to the next in constructing output buffers (or collections of one or more data values or vectors) 203. Subsequently, an output streamer (or streaming unit) 205 may retrieve individual sequential samples for creating the output stream 104, s.sub.out(k), from the data contained in constructed output buffers 203.
(18) Although the window-packet selector 201 is shown to select between two inputs, in general, this selector may have a total of N.sub.S inputs (for example, N.sub.S=3 inputs for the three-stage system 100A of
(19) Turning to the operation of the j.sup.th stage translation process (for example if j=2, referring to translation process 402), using matrix notation, we may express an (N.sub.wN.sub.c) regression matrix, where N.sub.c denotes the number of (N.sub.w1) columns contained in it. For example, by setting N.sub.c=3 a regression matrix for the j.sup.th stage may be constructed as
X.sub.j=[s.sub.kjbr](2)
In Eq. 2, s.sub.kj is defined by Eq. 1 selecting data from the j.sup.th stage, b represents an (N.sub.w1) column vector where each element is set to a constant value (such as a vector of ones) for modeling DC offset and r represents an (N.sub.w1) column vector of ramp values for modeling slope such as a vector where the first element is set to zero and subsequent values count based on their index multiplied by a constant step (such as
(20)
to a predetermined value (such as unity). For example, r may be set according to
(21)
Alternatively, other values for the constant step may be used. Note the subscript k is omited from the expression X.sub.j in the left part of Eq. 2 for simplicity. It should be understood that the definition of X.sub.j may be considered as flexible with regard to how many elements (or columns) are included in it. As will be described later, X.sub.j may include the three vectors, as shows in Eq. 2 or some of these terms may be omitted and/or others added. Generally, for fitting data from the j.sup.th stage to the first stage, the following auto-correlation matrix R.sub.j and cross-correlation matrix p.sub.j1 may be defined
R=X.sub.j.sup.TX.sub.j(4)
p.sub.j1=X.sub.j.sup.Ts.sub.k1(5)
From which the solution for the coefficients (or coefficient vector) that provides the least-squares fit when aligning (or translating) combinations of data from the regression matrix for the j.sup.th stage to most closely match (that is, minimizing the sum of squared errors over the span of the buffers) data from the reference input data buffer (first stage) becomes
c.sub.1j=R.sub.j.sup.1p.sub.j1(6)
It should be understood that the dimension of c.sub.1j in Eq. 6 is in general (N.sub.c1) and this is dependent on the dimension (N.sub.cN.sub.c) for R.sub.j from Eq. 4 that in turn depends on the dimension (N.sub.wN.sub.c) for X.sub.j, with Eq. 2 being a (N.sub.w3) example. An (N.sub.w1) vector of data that has been fitted to the input data buffer 191 from the first stage and is based on data contained in the input data buffer from the j.sup.th stage along with a DC constant and ramp vector as inputs is computed using the equation,
.sub.k1j=c.sub.1j.sup.TX.sub.j(7)
Vector .sub.k1j may be equivalently written in expanded form as:
.sub.k1j=[.sub.1j(k).sub.1j(k1).sub.1j(k2) . . . .sub.1j(k(N.sub.w1))].sup.T(8)
The hat symbol over the vector .sub.k1j and each of its elements indicates that these refer to data that has resulted from translating (or fitting) data from one input data buffer to match the first stage data buffer 191 as close as possible in minimizing the sum of squared errors between them. In cases where the combination of gain, slope and DC offset are modeled as is the case when X.sub.j is set according to Eq. 2, the computed weight vector c.sub.1j for the j.sup.th stage may be partitioned into three (N.sub.c=3) coefficients,
(22)
For example, in the case of the system 100B of
(23) Continuing with the case where data from the second stage is fitted to data from the first stage (see
(24)
R.sub.2=X.sub.2.sup.TX.sub.2(10)
and furthermore, a (31) cross-correlation vector may be determined according to
p.sub.21=X.sub.2.sup.Ts.sub.k1(11)
Operation 362 may apply Eq. 6 (again, to the second stage for this simplified case) and may be rewritten as
c.sub.12=R.sub.2.sup.1p.sub.21(12)
The translated buffer 182 may then be computed at operation 402 (see
.sub.k12=c.sub.12.sup.TX.sub.2(13)
(25) As another example, in cases where (N.sub.c=2), only gain and DC offset may be adjusted (where slope adjustment is omitted) and furthermore, if only two stages are used (N.sub.S=2), the (N.sub.w2) regression matrix comparable to Eq. 2 simplifies to
X.sub.2=[s.sub.k2b](14)
Using this, the resulting dimension for the data correlation matrix of Eq. 10 becomes (22) with a (21) cross-correlation vector resulting from Eq. 11. Applying these in Eq. 12 results in a (21) coefficient vector for fitting data from the second stage to the first stage that may be expressed as
(26)
Relating this back to
(27) Generally, the result for each coefficient determined according to this method will be interdependent on the results for other coefficients and which ones are included. For example, the values for coefficients .sub.12 502a and .sub.12 502b taken from Eq. 15 (computed based on the regression input matrix of Eq. 14 with only gain and DC offset), will in general be different than those same coefficients taken from Eq. 9 (where values for all three: .sub.12 502a and .sub.12 502b and .sub.12 502c are computed based on the input regression matrix of Eq. 2 applied to the second stage, j=2). This occurs since all coefficients in c.sub.12 (or in general, c.sub.1j) are optimally computed on an interdependent basis for the best least squares fit between the supplied buffers.
(28) In cases where translation is desired between two different stages and neither is the first stage, the techniques provided may be easily modified to apply the same techniques between those stages. In other words, if translation of an input data buffer from the j.sup.th stage is intended to match that for the i.sup.th stage (where j1 and i1), the equations previously described, may be applied with the substitution of index i for index 1 in each equation and matrix construction and reference to/from data from the i.sup.th stage rather than the first stage. This may be useful in embodiments where for example, data from a third stage 193 is translated to match data from a second stage 192 and then subsequently, the resultant data is translated to match data from a first stage 192, rather than matching data from a third stage directly to that from a first stage. For example, in general .sub.kij refers to data that has resulted from translating (or fitting) data from the j.sup.th stage input data buffer to match the i.sup.th stage data buffer as close as possible in minimizing the sum of squared errors between them where
c.sub.ij=R.sub.j.sup.1p.sub.ji(16)
.sub.kij=c.sub.ij.sup.TX.sub.j(17)
and
p.sub.ji=X.sub.j.sup.Ts.sub.ki(18)
In constructing X.sub.j data from an input buffer may be used as previously described, or alternatively, it may be constructed from data that has already been translated. For example, if resultant data from the third stage 193 that has already been translated to align it with data from the second stage buffer 192 (producing .sub.k23) is to be again translated to match the first stage input buffer 192, X.sub.2 could be constructed according to
X.sub.2=[.sub.k23br](19)
and Equations 16 through 18 would be applied with the setting j=2 and i=1.
(29) In some alternative embodiments, data provided at the output of corresponding ADC's (in the two stage case of
(30)
These equations may be implemented by initializing R.sub.j and p.sub.j1 to zero at the beginning of a frame (except for terms in R.sub.j that purely depend on constants such as R.sub.j(22), R.sub.j(23), R.sub.j(32) and R.sub.j(33) may be pre-computed). Then for each subsequent sample period throughout the frame, one of the N.sub.w terms during each sample period during which a new sample is received from each respective ADC is accumulated. In the two above equations, the variable p would range from 0 at the beginning of each frame to (N.sub.w1) during the last sample for each frame. Note that if frames overlap, more than one instance of R.sub.j and p.sub.j1 may exist at a given time. In these cases, each would be assigned to a frame and collect data for samples within the time period spanned by its assigned frame.
(31) In other embodiments, a more generalized version of a least squares fit may be generated using the above equations to include delay if the regression matrix of Eq. 2 is augmented to include forward (or backward) delayed versions for the output of the j.sup.th stage input data buffer s.sub.kj. For example, if the first two forward delays are to be included, two additional buffers (or vectors) s.sub.(k1)j and s.sub.(k2)j may be formed at the completion of each frame. These may be formed similar to the buffer (or vector) s.sub.kj, except that rather than collecting the most recent N.sub.w samples (as for s.sub.kj), the most recent N.sub.w samples are collected from the output of a one or two sample delay, respectively, being applied to the signal s.sub.j(k) (not shown in the figures). For example, in general if h sample periods of delay are present
s.sub.(kh)j=[s.sub.j(kh)s.sub.j(kh1) . . . s.sub.j(kh(N.sub.w1))].sup.T(22)
The two forward delay terms may be combined with the gain, DC offset and slope terms to produce a (N.sub.w5) data regression matrix X.sub.j with the form
X.sub.j=[S.sub.kjs.sub.(k1)js.sub.(k2)jbr](23)
Equation 23 (where N.sub.s=5) may be compared to Eq. 2 (where N.sub.s=3) or to Eq. 14 (where N.sub.s=2). In order to support the modeling of both backward and forward delays, the cross correlation vector may also be formulated to include delay. For example, Eq. 5 may be calculated using the adjusted formula where a single delay is added to the target input buffer (in the case of Eq. 24 below, the first stage input buffer 191).
P.sub.j1=X.sub.j.sup.Ts.sub.(k1)1(24)
In this case, applying Eq. 23 would result in the modelling of one forward and one backward delay.
(32) Applying the results of Eq. 23 and Eq. 24 back into Eq. 4 and Eq. 6, the solution for c.sub.1j will produce a (51) vector of coefficients. Using these results in evaluating Eq. 7 will yield a translated input data buffer that may include adjustment with respect to time (or phase differences between the two input data buffers) in addition to DC offset, gain and slope. In general, any number of forward and backward delays may be modeled using this approach described in this disclosure for adjustment in a frame-by-frame basis. The delay in the cross-correlation formula of Eq. 24 is preferably set to the maximum delay used by any column of the regression matrix if a balance between forward and backward delay levels is desired. However, it should also be noted that in general, if a good match in delay (or phase of the transfer functions) is present between the various input stages (in both the analog hardware and ADC's), the application of forward and backward delay modeling may not be required.
(33) Even more generalized versions of this algorithm (with the corresponding value for N.sub.s) may include an arbitrary mix of higher order terms (data values raised to an integer power), nonlinear functions or additional filters or linear transfer functions applied to regressor data to further improve the matching for the translation process in the presence of unknown delays (or phase) or nonlinearity between stages. Once the appropriate regression matrix (containing the terms to be modeled) is established, the same general method for determining the N.sub.s coefficients and parameters from hardware or software implementing Eq. 6 using the appropriate inputs for X.sub.j and p.sub.j1 may be applied.
(34) The matrix inverse in the solution for the coefficients of Eq. 6 depends on the determinant for the data auto-correlation matrix R.sub.j. In cases where the analog input signal 105 contains only very low frequency information or is substantially close to zero, there may be times when the data auto-correlation matrix is singular or near singular. In these instances, coefficients and parameters from the previous frame may be used. Alternatively, coefficients and parameters may be re-calculated using a smaller value for N.sub.c obtained by selective removal of some of the columns in X.sub.j (such as delay terms). In the case where only gain and DC offset are being computed and R.sub.j, and remains singular with N.sub.c set to 2, the following formulation is be useful:
set .sub.12=prior known or measured gain
.sub.1j=(p.sub.j1(1)R.sub.j(12).sub.1j)/R.sub.j(11)(25)
Where R.sub.j(11) represents the upper-left element from the matrix R.sub.j and R.sub.j(12) refers to the element directly to the right of it and p.sub.j1(1) represent the first element from the vector p.sub.j1. Monitoring the determinant of the matrix R.sub.j allows for identifying instances when it becomes ill-conditioned or singular.
(35) Referring to
(36) The auto-correlation matrix R.sub.j and cross-correlation vector p.sub.j1 of the previous equations have been based upon stored data that was collected during or referred to by the most recent frame (or spanning N.sub.w samples of data). However, in some embodiments, auto-correlation and cross-correlation matrices that cover a larger time-span may be desired. In these cases, a delay buffer of intermediary auto-correlation and cross-correlation matrices may be constructed. In cases where data from each frame overlaps (due to the window function design) its neighbor by of the data, it may be preferable and more efficient to construct intermediary auto-correlation and cross-correlation matrices based on the data obtained during the last of each frame (or spanning N.sub.w/2 samples of data). For example, if the intermediary auto-correlation and cross-correlation matrices most recently completed based on the most recent (or the q.sup.th) frame are referred to as R.sub.j.sup.q and p.sub.j1.sup.q, these results may be stored for late retrieval. The longer-term auto-correlation and cross-correlation matrices may then be computed from the most recent N.sub.Q intermediary results according to
(37)
In the special case where frames overlap by and N.sub.Q=2, Eq. 4 and Eq. 5 yield results equivalent to Eq. 26 and Eq. 27.
(38) Continuing with the flow-chart of
(39) When translating data from the j.sup.th stage to match data from the first stage, an accuracy of fit parameter may be expressed as
.sub.1j=e.sub.1j.sup.Te.sub.1j
Where
e.sub.1j=(.sub.k1js.sub.k1)
(40) So it may be calculated using
(41)
For example, if the regression matrix from Eq. 2 and Eq. 3 is used, this may be expanded as
(42)
An alternative simpler formulation that is generally applicable for any specified regression matrix may be derived as
.sub.1j=c.sub.1j.sup.TR.sub.jc.sub.1j2c.sub.1j.sup.Tp.sub.j1+s.sub.k1.sup.Ts.sub.k1(30)
For example, an efficient calculation for the accuracy of fit parameter .sub.12 342 in the system 100B of
(43) While the sum of squared errors may be used for the accuracy of fit criterion, additional methods are envisioned within the scope of this invention. For example, if the difference between the first stage input data buffer output 191 and the result 182 obtained by translating (fitting) the output of second stage input data buffer 192 to it is to be compared, a sum of the absolute values defined by
(44)
may also be applied. Yet other envisioned methods would involve determining the maximum of the squared or absolute values in the difference between the translated and target buffers.
(45) In cases where more than two stages are used, more than one accuracy of fit parameter may be presented to the selector index generator 207. For example, in the three-stage example of
(46) While operations are shown in
(47)
w=[w(0)w(1)w(2) . . . w(N.sub.w1)].sup.T(32)
Continuing with example of stage 1, these are the coefficients to be applied by a window function 161 to the first stage input data buffer 191 when creating the output window-packet 171. The window function 161 is applied on a sample-by-sample basis over the entire span of the first stage input data buffer 191 according to
v.sub.k1.sup.q(n)=w(n)s.sub.1(kn), where n=0,1, . . . N.sub.w1(33)
where v.sub.k1.sup.q(n) refers to the n.sup.th index of the window-packet vector that was created using data from the first stage at a discrete time index k that corresponds to the q.sup.th frame. In vector form, we may write the following expression noting this vector contains window-packet elements based on non-translated data from the first stage corresponding to a sample period ranging from k (the current sample index) to k(N.sub.w1).
v.sub.1.sup.q=w.sup.Ts.sub.k1(34)
where
v.sub.1.sup.q=[v.sub.k1.sup.q(0)v.sub.k1.sup.q(1)v.sub.k1.sup.q(2) . . . v.sub.k1.sup.q(N.sub.w1)].sup.T(35)
(48) For subsequent stages (j=2, 3 . . . N.sub.S), data from the translated buffers (rather than input data buffers) are used in constructing window-packets.
v.sub.kj.sup.q(n)=w(n).sub.1j(kn), where n=0,1, . . . N.sub.w1(36)
where v.sub.kj.sup.q(n) refers to the n.sup.th index of the window-packet vector that was created using data from the j.sup.th stage at a discrete time index k that corresponds to the q.sup.th frame.
In vector form, we may again write the following expression noting this vector contains window-packet elements based on translated data from the j.sup.th stage corresponding to a sample period ranging from k (the current sample index) to k(N.sub.w1).
v.sub.j.sup.q=w.sup.T.sub.k1j for (j=2,3 . . . N.sub.S)(37)
where
v.sub.j.sup.q=[v.sub.kj.sup.q(0)v.sub.kj.sup.q(1)v.sub.kj.sup.q(2) . . . v.sub.kj.sup.q(N.sub.w1)].sup.T(38)
Window-packets may be created at select values of k when packetizing is set to take place upon completing the acquisition for each frame of data and translation. They may be stored in addition to previous window-packets created during the last or previous frames to allow for construction of the output 104.
(49) For example, assume at the most recent time index k, Eq. 37 was implemented due to the completed acquisition and subsequent processing of the q.sup.th frame. Then v.sub.j.sup.q (at that time) refers to the most recently completed window-packet output for the j.sup.th stage, while v.sub.j.sup.q-1 refers to the window-packet previously calculated (N.sub.W/2) sample periods ago and was based on translated data that now corresponds to (the older) sample periods ranging from k(N.sub.W/2) to k(3N.sub.W/21).
(50) One sample period later, v.sub.1.sup.q would still refer to the most recent window-packet. However its elements would then refer to first stage data corresponding to sample periods k1 (since the current sample index k incremented by one) through kN.sub.w. Similarly, v.sub.11.sup.q-1 would now refer to first stage data corresponding to sample periods k(N.sub.w/2)1 to k(3N.sub.w/2). This would continue during each successive sample period until when reaching one sample prior to the complete acquisition for the next frame when elements of v.sub.1.sup.q would refer to data corresponding to sample periods k(N.sub.w/2)+1 through k(3N.sub.w/2)+2. Similarly, v.sub.1.sup.q-1 would now refer to first stage data corresponding to sample periods ranging from kN.sub.w+1 to k2N.sub.w+2). Upon the next sample period (when the next frame acquisition is complete), the value for q would be indexed by one and a new window-packet will be computed and assigned the label v.sub.1.sup.q. The previous window-packet (that was previously referred to as v.sub.1.sup.q) would now be assigned to index q1 and be referred to as v.sub.1.sup.q-1. The oldest window-packet (that was previously referred to as v.sub.1.sup.q-1) may be discarded if each window function only overlaps with of its neighbor and any output data relying on it has been constructed. At this point, each of the two window-packets could again refer to data corresponding to sample points having indexes as described in the previous paragraph (indexes k to k(N.sub.w1) for the new v.sub.1.sup.q and indexes k(N.sub.w/2) to k(3N.sub.w/21) for the new v.sub.1.sup.q-1), although with index k also continuing to index to the latest data. This process may be considered as continuing as the system continues to receive newer data.
(51) Since the quantization noise level for data 182 supplied to window function 162 is less than that for the output data 191 supplied to window function 161, window-packets 172 formed in the second stage may be considered similar to window-packets formed in the first stage 171, with the exception that quantization noise in window-packets for the second stage 172 is lower than compared with window-packets for the first stage 171 (provided that data in the second stage is not corrupted). Along these same lines, if the three stage system of
(52)
(53) An important property of the window function design is that the window functions when placed (or spaced) in time corresponding to the frame instances yields a constant summed value that is set to unity. This is illustrated in
(54) For example, the following symmetric window function that is based on a quadratic function may be used:
(55)
Numerous other functions may also be suitable and may include those derived from trigonometric functions or constructed based on linear segments. Note that in this example the sum where 0l<N.sub.w/2
(56)
(57)
(58) As an alternative, in some embodiments, it may be preferable to calculate each output sample 104 based on direct access to the window-packet buffers (171 and 172 in
(59)
In Eq. 41, the element corresponding to the oldest sample from v.sub.j.sup.q is being added and the element near the center of the vector v.sub.j.sup.q-1 since the first half of v.sub.j.sup.q-1 was used during the prior frame.
After a fixed number of l samples later (where 0<l<N.sub.w/2), the current sample index is related to the sample index corresponding to the start of the frame by k=k.sub.q+l, the above relation may be expressed as
(60)
As a further continuation of this example, if a two-stage system is used and during the previous frame, the selector index selected the first stage (m.sup.q-1=1 for the window-packet based on ADC1 data) and for the current frame, the selector index selects the second stage (m.sup.q=2 for the window-packet based on ADC2 data translated to fit data from the ADC1 buffer), the output may be written more specifically based on contents from the window-packet buffers 171 and 172 as
(61)
Furthermore, noting that since each frame occurs N.sub.w/2 samples apart and overlaps by this amount and when referencing the most recent (rather than the previous frames) input data buffers in the expression, Eq. 33 may be rewritten for the previous (q1).sup.th frame as
(62)
Using Eq. 36 (with j=2 and k=k.sub.q) along with these assumptions with respect to the range of data used on constructing each (current and previous) window-packets, Eq. 43 may be expanded as
(63)
For this example, Eq. 45 shows that the output may be expressed (or streamed as l ranges from 0 to N.sub.w/21) in terms of elements taken directly from the first stage input data buffer 191 and second stage translated buffer 182.
This process continues until l=N.sub.w/21 sample periods have elapsed since the first sample period of the frame when Eq. 45 becomes
(64)
During the next sample, the next frame of data is available and window-packs for that frame are calculated with window-packets being referenced by frame index q and the previous window-packets now being referenced by q1. If we again reset the sample reference k.sub.q to be the most recent sample from the current frame, the system of the previous three equations may be repeated for the creation of another N.sub.w/2 samples of output data.
As a further example, if we assume the selector index continues to select the first stage (m.sup.q-1=1 and m.sup.q=1). Equation 45 may be written as
(65)
With the substitution k.sub.q=kl, it may be rewritten as
(66)
Where if the condition that overlapping window functions sum to unity as in the example from Eq. 40, we obtain
s.sub.out(k)=s.sub.1(k(N.sub.w1))(49)
And in this example, the output may be expressed as a delayed version for the digital output of the low-gain first-stage ADC1 output s.sub.1(k) 151. On the contrary, if the data is conditioned such that the selector index continues to select the second stage (m.sup.q-1=2 and m.sup.q=2), the output would not be represented by either a delayed version of exactly s.sub.2 (k) or even a purely delayed version of .sub.12(k). Rather, it would represent the sum of each window-packet created from each frame of .sub.12(k) that was independently transitioned to match the corresponding ADC1 data (as described above), where the transitions between each frame is controlled by the shape for the edges of each window function.
(67) Since packets corresponding to stages other than the first stage are translated to represent de-noised packets associated with the first stage and as long as any selected packet does not reference corrupted data, the resultant output stream will closely track the output that would have been produced by simply locking the selector to always select the first stage packet 171. However, an important change takes place when the selector 201 begins selecting packet 172 corresponding to the second or a higher gain stage. Due to the higher analog gain preceding its input, ADC2 112 or an ADC from a higher-gain stage is making greater use of its input range. Assuming all ADC's have the same number of bits (typically 24), the quantization error in the output for each stage will be identical. In each case, the input buffering functions 131, 132 and any additional higher-gain stages can be thought of as collecting the original input signal (with varying gain) and noise (having the same power level). However, in translating the second or a higher stage input data buffer to serve as a de-noised version of the first input data buffer 191, a gain of less than unity would result and is applied to the sum of signal plus noise in data contained in the input data buffer 192 of the second stage input data buffer or higher stage buffer. In scaling, while the signal levels are brought to match those in input data buffer 191 of the first stage, the quantization will also be attenuated by the difference in gain. Therefore, in time periods when the selector is able to select uncorrupted packets 172 from the second or higher stage, it is essentially repairing sections of data corresponding to the range of those packets using higher quality (lower noise) data that has been aligned to average through (or curve-fit) the originally noisy data. During these times, the reconstructed output 104 will provide a digitized version of the analog input matching the first stage, but having lower quantization noise. For example, if the gain difference in a two-stage system is 30 dB, the quantization noise will be reduced by approximately 5 bits.
(68) Furthermore, the sloped edges of the adjacent window functions provide for a smooth transition (or cross-fade) between stages to further mask any errors in the DC offset, gain or slope, or other sources of data mismatch that indeed may already be at the bit-level or lower when compared to data from the first stage.
(69) There are times, however, when the system must select packets from the first stage. This may even be true whether or not data from the second stage is clipping. Ideally, with a perfectly linear-time-invariant system where the gain and offset were known precisely and no clipping existed on either ADC, one could model the differences or create an exact match between the high gain ADC2 outputs through the offset and scaling of it to match that of ADC1. This would of course have to include the addition of a noise term to account for the difference in quantization error between them. If we assumed further in this ideal environment that the digital input signal created by ADC2 intermittently clips, but that these clipping intervals had no effect on any output samples adjacent or near to them (when the analog signal was not clipping), a simple algorithm (see prior-art) could simply select or directly cross-fade between samples from ADC1 during ADC2 clipping events and from a scaled and shifted ADC2 otherwise. This would minimize the quantization noise levels in the output (always modeling the gain and offset of ADC1) along with preserving the dynamic-range in utilizing the non-clipping ADC1 (with higher quantization noise) output only when required.
(70) However, in practice, the gain and/or DC misalignment is occurring for a collection of reasons too numerous, complex and/or time-varying to quantify. Practical measurements indicate that these misalignments are time-varying and nonlinear, and vary depending on the frequency content of the signal. This prevents any stationary description of the relationships required to match ADC output data from differing stages. They can, however, be modeled over relatively short periods of time, typically measured in milliseconds. This invention utilizes these characteristics by decomposing the two signals into a set of windowed-packets for both the high and low-gain ADC's, where the continuous addition of window-packets for either ADC retrieves information originating from the original ADC output. The time-varying nature of fitting each individual packet gives the system 100A or 100B the unique ability to repair based on tracking non-stationary gains, offsets, changes in linearity, noise characteristics, delay and transfer functions and only doing so when the repair is advantageous. This overcomes limitations in the prior art where monitoring high gain signals for clipping or the simple application of timers following clipping events does not provide a reliable indicator for the suitability of using that data.
(71) Another advantage of the described invention is exceptionally fast and reliable tracking of very slight changes in gain difference (with or without delay), DC offset and possibly slope. Consider the data plots shown in
(72) In cases where the accuracy of fit for the highest gain analog stage remains within tolerance extended periods of time, it may be preferable to intermittently switch or transition off dynamics of the translation process while holding the selector 201 to select the highest gain stage. In this mode, the output signal simply becomes a scaled and offset version of the highest gain ADC output S.sub.N.sub.
(73) Turning now to
(74) If the accuracy criterion at operation 505 is met, the process decrements the hold counter at operation 506 toward minus one. Proceeding to operation 507, the hold counter is tested for a value greater than zero. If the hold-counter value is greater than zero, the process proceeds to operation 511. Otherwise, the hold counter is tested for a value of zero at operation 508. If the hold-counter is not equal to zero (value of minus one), the process proceeds to operation 510. Otherwise, the process proceeds to operation 509 where the auto-correlation matrix R.sub.N.sub.
(75) The process continues to operation 510 where a transition gain is compared with the gain of unity. If it has reached a gain of unity, the process continues to operation 511. Otherwise, a fading operation at operation 512 will increase the gain toward a value of unity. In some embodiments, the process of increasing the gain may either be exponential tracking or linear ramping. The process then continues at operation 511 where a faded set of translation coefficients for the stage is computed according to:
{tilde over (c)}.sub.1N.sub.
The vector
(76) Illustrative embodiments of the invention described herein have described fitting data from each stage following the first stage (operations 302 and 303 from
(77) While the lock-hold mode described earlier has focused on locking the output to the highest gain stage, other modes are envisioned where a lock-hold mode may be applied to stages other than the highest gain.
(78) For example in a three stage system, a lock-hold may be applicable to both the highest gain (third) stage and for the middle gain (second) stage. If the accuracy of fit criteria is satisfied over an extended period of time for translation of data relating the second stage to the first (.sub.12<T.sub.f), but the relation (.sub.13<T.sub.f), does not consistently hold for translating third stage data to the first, a lock-hold may be applied to output data from the second stage, except during intermittent frames where when the accuracy of fit criteria is satisfied for data from the third stage translated to match data from the second stage (.sub.23<T.sub.f), window-packets based on third stage data translated to match the locked second stage data may be selected.
(79) This disclosure also describes operation performed on a basis of buffers (or collections or frames) of data. This was done to facilitate a clear understanding for the principals and operation of the invention. However, alternative embodiments include those where some operations may be implemented on a sample-by-sample basis, which in some cases may bypass the need for completely collecting full-sized buffers of data for simplicity or efficiency of the implementation.
(80) In the exemplary embodiments described above, the translation operations were performed in data prior to packetization by the window function. However, performing translation operations after packetization is also possible and contemplated to be within the scope of the invention.
(81) Other configurations and variants within the scope of this invention will be apparent to those skilled in the art.