Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/24/07 23:16
Read: times


 
#146160 - And moving forward
Responding to: ???'s previous message
Christoph Franck said:

Jason, you wrote that you could not use a moving average (or other FIR) filter because you cannot wait for four samples to arrive, and that you think that an IIR filter would do a "better" job. You would also like to adjust the time constant of that IIR filter in a range that easily spans several orders of magnitude.


Yes, it's working perfectly, the only downside is that my ADC reading is slow, but then, of course it is, it's going through a cr low pass filter.


Christoph Franck said:

Are you aware that an IIR filter with a large time constant will also take several input samples in order to reach a stable output ? And that it may output values that are wildly different from the actual ADC input during its startup period (unless you mess with the filter internals and set the output value to the first sample at the start of the measurement, instead of starting from zero) ?


Yes, I can switch out the cr low pass filter until E=Vc approx. and then switch it back in. I already have a push button/code whereby the end user can select whether the cr low pass is either 'in' or 'out'.

Christoph Franck said:

Are you aware that filter time constants that are below ~5 times your sampling period will lead to numeric problems during the calculation ? (Simulation rule of thumb -> simulation step size should be at least 1/5 of the smallest time constant of the system)


Yes, the end user can select 1..100 secs of integration. So the end user will not be allowed to venture below 1 sec, other than switching the cr filter out.

Christoph Franck said:

These two points will already place some limits on sensible values for the time constant.


Actually, a time constant of 3 to 8 secs works nicely.

Christoph Franck said:

I still believe that a variable-length moving average filter would be the better choice for your purpose. Average up to X of the last available ADC output samples (less than X if not that many samples have been taken since the start of the measurement). This filter will give results that are close to the ADC output even during its settling time.


Well, you might be happy to note that I'm going to build in a min/max/avg feature and from the average point of view at least, this will be a rolling average.

Christoph Franck said:

You could also combine the moving average filter with a median filter (e.g. regard the last 6 samples, throw away the highest and the lowest value, and average the remaining 4).


Well, given that the adc is a dual slope and therefore very slow, approx. 2 samples every second, I need to make every available sample count.

My next step, in my development is work on how the '51 is going to generate the correct calibration.

Cheers for now
Jason


List of 64 messages in thread
TopicAuthorDate
ADC last digit stability            01/01/70 00:00      
   DVM            01/01/70 00:00      
      DVM's only 10 bits?            01/01/70 00:00      
         Frequency response            01/01/70 00:00      
            Typically twice or more the sampling frequency            01/01/70 00:00      
               Missing the point            01/01/70 00:00      
   You usually don\'t _want_ a stable last digit.            01/01/70 00:00      
      Result            01/01/70 00:00      
         Hm.            01/01/70 00:00      
      Averaging/DSP/FIR filters            01/01/70 00:00      
         Math lecture ?            01/01/70 00:00      
            Can't use average-too slow            01/01/70 00:00      
               Analysis            01/01/70 00:00      
               already stated            01/01/70 00:00      
               Derivation            01/01/70 00:00      
                  The nitty gritty stuff            01/01/70 00:00      
                     Simulate using a spreadsheet            01/01/70 00:00      
                        Hi Russ and thanks for that            01/01/70 00:00      
                           My spreadsheet vs. your spreadsheet            01/01/70 00:00      
                              Unit test !            01/01/70 00:00      
                     As I said...            01/01/70 00:00      
                        Calibration?            01/01/70 00:00      
                           Horsefeathers            01/01/70 00:00      
                              Longs?            01/01/70 00:00      
                                 A long is more "accurate" than a float.            01/01/70 00:00      
                                    Yes it is, but....            01/01/70 00:00      
                                       _Known_ transfer functions.            01/01/70 00:00      
                                          FP pitfalls            01/01/70 00:00      
                                             The compiler isn't going to take care of that.            01/01/70 00:00      
                                                Mantissa fields            01/01/70 00:00      
                                                   Misunderstandings ?            01/01/70 00:00      
                                                      Adding FP's accurately            01/01/70 00:00      
                                 can you not read ?            01/01/70 00:00      
                           Nonsense ...            01/01/70 00:00      
                              Calculator?            01/01/70 00:00      
                     If you're really curious ...            01/01/70 00:00      
                        Climax time            01/01/70 00:00      
                           OOPS!!....            01/01/70 00:00      
                           Equations            01/01/70 00:00      
                              Quantisation            01/01/70 00:00      
                                 Works in unsigned integer, too:            01/01/70 00:00      
                                    Abstract?            01/01/70 00:00      
                                       Useful abstractions.            01/01/70 00:00      
                                          Nice talking with you, Christoph.            01/01/70 00:00      
                           What are the actual requirements ?            01/01/70 00:00      
                              re filters            01/01/70 00:00      
                              And moving forward            01/01/70 00:00      
               You can not due to Dither            01/01/70 00:00      
         Clueless ?            01/01/70 00:00      
            Just dump the LSB            01/01/70 00:00      
               Don't forget proper rounding.            01/01/70 00:00      
            Speaking of DSP            01/01/70 00:00      
         Fluke stability            01/01/70 00:00      
   Oh yes they do!            01/01/70 00:00      
   my take on this            01/01/70 00:00      
      Walk, don't run            01/01/70 00:00      
         :)            01/01/70 00:00      
      Hello Erik            01/01/70 00:00      
         have fun, Jason            01/01/70 00:00      
            I am having fun            01/01/70 00:00      
               Ok, you are aware of this            01/01/70 00:00      
                  He's learning            01/01/70 00:00      
                  Assumptions            01/01/70 00:00      
                     and I ...            01/01/70 00:00      

Back to Subject List