The present invention relates to a method of determining a change in a signal over a time period or the gradient of an over sampled signal, and to an apparatus including a circuit for determining the gradient or change of an over sampled signal.
It is often desirable to be able to estimate the parameter, such as a current, by integrating the current over time. The slope of the integral represents an average value of a current. The average value is then digitised, for example by taking a sample at a first instant in time, taking a sample at a second instant in time, and subtracting the difference between the two values to obtain the difference, and hence infer a gradient during the sample period. Relying on one or two samples like this may render the measurements susceptible to noise. Whilst over sampling a signal can provide improvements in measurements of a parameter, the over sampling can give rise to a computational overhead.
According to the first aspect of the present invention there is provided a method of estimating a change of a variable over a measurement window, comprising the steps of:
According to a second aspect of the present invention there is provided an apparatus for estimating a change in a measurand during a measurement window, comprising the steps of:
It is thus possible to provide an improvement in the signal to noise ratio of the estimate of the variable/measurand whilst utilising a computationally simple technique which can be performed in dedicated hardware.
Where the length of the measurement window may vary in time, perhaps because the measurement window represents a “view” from a computerised tomography scanner and the scan head is subject to speed changes, then it may be necessary to take account of the fact that each of the samples are not equally spaced apart in time.
According to a third aspect of the present invention, there is provided a method of selecting samples for combination to form an estimate of a measurand, said samples occurring in a sequence, wherein a first parameter defines the length of a calculation window, a second parameter defines a number of measurements selected from opposing ends of the calculation window and a third parameter defines a separation between samples selected from the opposing ends of the calculation window.
The present invention will further be described, by way of example only, with reference to the accompanying drawings, in which:
a and 2b schematically illustrate the calculation of gradient between sample S1 and S12, and S1 and S8, respectively, within the samples of
a reproduces the plot of over samples from
a to 6d show alternative representations of the weighting functions shown in
Suppose that we have an ADC arranged to sample, at a regular sample rate such that we have series of measurements (x1, y1), (x2, y2) . . . (xn, yn) and where we further assume that each of the y values has a measurement error σi, but for simplicity we will assume each x value can be regarded as being error free.
If it is desired to fit the measurements to a straight line, as represented by
y=a+bx
then a chi-squared function can be used where
In the absence of measurement errors, the values of a and b can be estimated as the derivative with respect to these parameters can be minimised.
It is then further known (see for example P662 of “Numerical recipes in C: the art of scientific computing”, ISBN 0-521-43105-5)
that the following definitions can be made
Then if we let
Suppose, for the sake of simplicity that we have 10 samples and that σi is assumed to be a constant.
We see that:
The calculations of Δ is a further two multiplications and 1 subtraction. Calculation of a and b are a further two multiplies, one subtraction and a division each.
Thus, to estimate the values a and b from ten samples requires 50 summations, 67 multiplies, 3 divisions and 3 subtractions. Even if we only want the gradient b, we see that we still have to calculate S, Sx, Sy, Sxx and Sxy so there is virtually no saving in processing power.
Furthermore even if
is simplified to equal unity then the estimation of b still involves 50 summations and over 20 multiplications. This is computationally expensive and also requires numerous memories to hold intermediate values. This is not appropriate for use in systems working in real time with large numbers of parallel data streams.
In the absence of noise then there would be effectively no measurement error (except quantisation error) and it would be acceptable merely to take two measurements and to subtract one from the other, thereby avoiding, potentially, the overhead of the least squares approach described hereinbefore.
However, in the presence of noise the result of such a simple process can result in an error.
Consider
The inventors have noted that other factors affect the error in a gradient calculation. If we now consider
a compares samples S1 and S12. These samples are separated by 11 units in the x axis (which may represent time or distance or amount of rotation).
Thus the gradient, as represented by chain line 20 is
however, errors associated with the measurements could mean that the true gradient b′ could or should have been represented by the dotted line 22
∴the difference or error in the gradient could be
Similar considerations apply in
Therefore the estimate of the gradient is subject to more uncertainty as represented by Δb as the “distance” between measurements decreases.
However, it is known that the effects of noise can be reduced by taking multiple samples of a signal as the signal power increases linearly with the number of samples taken whereas noise power for Gaussian noise increases as the square root of the number of samples taken.
Taking multiple samples at points S1 and S12 may not be possible due to acquisition constraints, but taking multiple samples within the measurement window is.
However, the samples need to be processed in a computationally simple way. The inventors have realised that acceptable estimates of the gradient can be obtained by mere addition and subtraction of the sample values—subject to the sample values being modified by a weighting function.
If we consider
S1 and S2 can be averaged to give a new sample SA which can be regarded as being at
Similarly S11 and S12 can be averaged to give a new sample SB which can be regarded as being
The gradient calculation will be the same as calculated in
If we now consider the effect of the errors σ has reduced by
but the distance between the composite samples SA and SB has reduced from 11 in the case of
If we now include S1, S2, S3 and S10, S11, S12 then the value of σ reduces to
and the effective distance reduces to 9 units
If we now include S1, S2, S3 and S4 against S9, S10, S11, S12 then the value of σ reduces to
and the effective distance reduces to 8, so
If we now include S1, S2, S3, S4, S5 and S8, S9, S10, S11, and S12 then the value of σ reduces by
and the effective distance reduces to 7, so
It can be seen that even though more samples have been included, the error on the gradient has increased compared to the case of using four samples in each set of samples.
If we pair of all samples into S1 to S6 and S7 to S12 then on each composite sample the error has reduced by
and the effective distance between the composite sample is 6 so
Which is worse than only using S1, S2, S3 and S10, S11, and S12.
This demonstrates the surprising result that using more of the samples can degrade the estimate of the gradient.
The inventors, having realised this, propose that the contribution of the various readings should be weighted, such that the contributions from some of the samples can be ignored.
The weighting occurs in both X and Y directions such that the position of the composite sample points reflects the relative contribution of each of the samples to it.
In high through-put digital systems it is beneficial for the weighting function to be easy to implement. A particularly easy weighting function to implement is shown in
The weighting function shown in
Fni(A,B)
where A represents the number of samples that are taken in a measurement window and B represents the number of samples that occur in a first portion 41 (which may also be regarded as a sample set) where a non-zero weight is applied. From this parameterisation the hardware or system can deduce the existence of a second portion 42 within the measurement window where a non-zero weighting is applied. As will be shown later, this parameterisation scheme can be extended.
The parameterisation allows the weighting function to be modified rapidly if a controller determines that a different weighting/result combining function is required. The weighting signal can be readily regenerated using a counter to count the samples as they occur and to decide on the basis of the control parameter whether the samples are to be multiplied by 1 or to be discarded for the purposes of calculating the gradient.
More complex gradients may also be used and that shown in
d shows a further variation in which a linear function, which can be replicated to the digital domain by a staircase, extends in either direction from the mid-point of the window. Finally
In the present invention, the output of the integrator 52 is provided to an analog to digital converter 54 by way of a multiplexer 56. The multiplexer allows signals from several, for example 64 or 128, photodiodes to be sent to a single analog to digital converter in time multiplexed fashion. For simplicity, we need only consider what occurs in a single one of the channels.
As noted with respect to
The other functions are also describable in parameterised form or alternatively may be stored in a look-up table for use by the processor 60.
In some embodiments of the present invention the integrator is only reset when it gets close to the limits of its operation. A reset might occur during the measurement window thus, if a reset occurred between sample 6 and sample 7 then samples 7 to 12 would be offset from sample 6 by the size of the reset. This can be accommodated by storing a value for the integrator output value immediately following a reset and then adding a further offset representing the difference between the last sample value and the reset value to each of the subsequently sampled values for the remainder of the sample window.
In
It is thus possible to provide a method of calculating the gradient for an over sampled signal which is computationally fast and simple to do in hardware.
So far we have assumed that the samples occur at equal separations in time within the measurement window. However, in the context of a computerised tomography scanner the scanning head is very heavy and is mechanically driven. Consequently the rate of rotation of the scanning head can vary. It is therefore desirable in order to trigger the over sampling from synchronisation pulses which occur when the scanning head has reached predetermined positions. Each synchronisation pulse marks the end of one measurement window and the beginning of the next. Given that the rate of rotation of the scanning head is reasonably well known, it is possible to set the rate of over sampling to ensure that all of the samples are taken within the measurement window. Nevertheless, it can be observed that the time period between the final over sampled sample, and the next sample which coincides with the synchronisation pulse could, and indeed almost certainly will, have a time period which is greater than the inter-sample time period for any of the other samples within the measurement window. The length of this period is the sum of the inter sample period and a stretch time.
This can be seen more clearly in
The calculation of the gradient can then be modified to take account of the stretch periods.
This calculation can itself also be parameterised.
First, second and third parameters can be used to describe the process for calculating the gradient. These have been given labels O, P and Q.
This can be seen more easily in
(S0−S14)+(S1−S15)+(S2−S0*).
where “*” indicates that S0 comes from the next sample window, i.e. it follows S15 in
The result of this calculation is then scaled or normalised in order to give the gradient. It should be noted that this parameterisation scheme can be extended, as shown in
Where we use samples from the preceding view then the algorithm needs to accommodate the “stretch old”, when we have the stretch preceding the first synchronisation pulse of the current view. If the gradient is calculated as described hereinbefore, that is just by forming running sums, then the normalisation factor needs to be modified to take into account the stretches that occur between some of the sample points. The normalisation factor F can be defined as:
Where “sub” represents the time separation between data samples in the same units as the values “stretch old” and “stretch new”. The above formula works where the samples are selected to be symmetrically disposed around the window mid-point.
This normalisation factor applies in the case where:
It is useful to consider two examples to illustrate how the normalisation factor varies.
Suppose that we sample every 300 nS, and that the conversion window has 16 samples, that the number of samples used at the beginning and end of each range is 3, and that the distance between paired off samples is 14.
Thus
If no stretching occurs at all then we have
Which intuitively is correct as three sample pairs were used in place of one pair and no stretching occurred.
If a stretching of 150 nS (i.e. half a sample period) occurs consistently at the end of each sample window, then in this example we see that the S2 to S0* sample is too long.
The value of the scaling factor has gone up because two of the sample pairs are effectively under weight compared to the final sample pair (the one including the stretch time) and hence a longer weighting factor is appropriate.
The formula also works in the case illustrated in
The value in the channel memory is then multiplied by the factor F to rescale the result.
Other normalisation factors can be used where the weighting factors differ or where the curvature is non zero.
This application claims benefit to provisional application 60/839,307 filed Aug. 22, 2006.
Number | Name | Date | Kind |
---|---|---|---|
5561667 | Gerlach | Oct 1996 | A |
6262943 | Clarke | Jul 2001 | B1 |
6452996 | Hsieh | Sep 2002 | B1 |
7286871 | Cohen | Oct 2007 | B2 |
20050165879 | Nikitin et al. | Jul 2005 | A1 |
Number | Date | Country |
---|---|---|
WO 2004034311 | Apr 2004 | WO |
2008024327 | Feb 2008 | WO |
Number | Date | Country | |
---|---|---|---|
20080052045 A1 | Feb 2008 | US |
Number | Date | Country | |
---|---|---|---|
60839307 | Aug 2006 | US |