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

Back to Subject List

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


 
#146102 - Equations
Responding to: ???'s previous message
but we don't even have do that and infact we can run a differential equation(ODE) directly in software with a little thought.

Treating a digital filter as a numeric simulation of an analog filter is certainly possible, but I think I've mentioned why this might not be the best approach and why more "advanced" ODE solvers (basically, anything other than the explicit Euler method) are completely unsuited for signal processing applications (mainly: You do not have the input values for fractional samples).

 In_filter:
Dti = Adc_present - Adc_last ;test charging/discharging
If Dti < 0 Then              ; if neg. then exec. following code
Dti = Adc_last - Adc_present
Dti = Dti * 0.35             ; calibrate filter to secs
Dti = Dti / Fil_time         ; fil_time=cr time (adjustable)
Adc_last = Adc_last - Dti    ; form final output
Gosub Disp                   ; display it
Return                       
End If
Dti = Dti * 0.35             ; if discharging then go here
Dti = Dti / Fil_time
Adc_last = Adc_last + Dti
Gosub Disp
Return


Still, why do you distinguish between charging and discharging ?
The following does the same job:

 In_filter:
Dti = Adc_present - Adc_last ;test charging/discharging
Dti = Dti * 0.35             ; calibrate filter to secs
Dti = Dti / Fil_time         ; fil_time=cr time (adjustable)
Adc_last = Adc_last + Dti    ; form final output
Gosub Disp                   ; display it
Return 


How would I adjust it as outlined in 1 and 2 using your difference equation?

Well, let's look at your equation:

Adc_out_new = Adc_out_old + (t_sample / fil_time) * (Adc_in_new - Adc_out_old)


It can be rearranged to:

Adc_out_new = ( 1 - (t_sample / fil_time) ) * Adc_out_old + (t_sample / fil_time) * Adc_in_new


... from which it is quite easy to see that a in my equation corresponds to (t_sample / fil_time) in yours.


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