Presentation is loading. Please wait.

Presentation is loading. Please wait.

POCPA Conference 20..23 DESY Michele Martino (TE-EPC-HPM) CURRENT MEASUREMENT DIGITAL FILTERING - TUTORIAL - 1 POPCA 2012 FIR or IIR?

Similar presentations


Presentation on theme: "POCPA Conference 20..23 DESY Michele Martino (TE-EPC-HPM) CURRENT MEASUREMENT DIGITAL FILTERING - TUTORIAL - 1 POPCA 2012 FIR or IIR?"— Presentation transcript:

1 POCPA Conference 20..23 May @ DESY Michele Martino (TE-EPC-HPM) CURRENT MEASUREMENT DIGITAL FILTERING - TUTORIAL - 1 POPCA 2012 FIR or IIR?

2 CURRENT MEASUREMENT FOR CONTROL 2 voltage/current signal transmission Converter Control Current Transducer Power Circuit ADC Anti Aliasing / Signal Conditioning  Control systems can tolerate some delay in the measurement chain but certainly don’t like it ! Fundamental trade-off of the measurement chain: accuracy vs speed !  Properly designed digital controllers can “easily” handle delays (RST), so what’s the problem?  Delays increase model order (Z transf) → Model mismatch become rapidly critical for stability!

3 SAMPLING BASICS 3  Ideal Sampling Time DomainFrequency Domain Spectrum of a critically sampled strictly band-limited signal: no alias!!!  Noise is always present so there are no strictly band-limited signals!  Anti-aliasing filtering always needed!

4 WHY OVERSAMPLING? 4  Standard Nyquist Sampling  Oversampling Analog filter Anti-aliasing can be dealt with only analogically! Digital filter Analog filter Anti-aliasing filtering can be shared between analog and digital! Re-configurability now possible

5 DECIMATION 5 Replicas still occur due to decimation! SNR not improved due to lack of filtering!

6 THE NEVER-ENDING DISPUTE: IIR VS FIR 6 Charles M. Rader : The Rise and the Fall of Recursive Digital Filters – IEEE Signal Processing Magazine, Nov 2006 (non-causal)

7 7  Yes, 1-bit only! It is the digital filter that actually determines the ADC “precision”!

8 HOW TO SPECIFY DIGITAL FILTERS 8 “alias-free” bandwidth

9 MINIMUM-PHASE FIR  Actually not if the filter is part of the measurement chain of a control loop!!!

10 MINIMUM-PHASE FIR DECIMATION

11 IIR IMPLEMENTATION 11  Implementation on DSP hints  Hints based on Texas Instruments TMS320C28x with CCS  The hints clearly work with floating point DSP such as the TMS320F28335 _IQmpy ↔ *

12 IIR IMPLEMENTATION 12  Implementation hints on DSP : Break up Structure and Combine Terms

13 IIR IMPLEMENTATION 13  Implementation hints on DSP : Inline  Inline is automatic with –O3 Optimization mode  Source must be visible to calling file  Make data allocation/definitions visible to calling file  Compiler can make use of Direct Addressing Mode “@0..63

14 “INTERACTIVE” SESSION 14

15 MATLAB FDATOOL 15  Different algorithms are available for minimum-phase design  Generalized Equiripple calculates minimum (even) order filters!  Other algorithms can be successfully used once the filter order is approximately known  What about very long filters?  For filter orders larger than a thousand taps the algorithms fail  But the problem can be decomposed and the FDATOOL let you the “cascade”  You can also quantize coefficients and then create a.coe file

16 SOME SUBTLE PHENOMENA 16  What can go wrong?

17 SOME SUBTLE PHENOMENA 17  It looks very nice isn’t it?  It looks very “white” !!!!

18 SOME SUBTLE PHENOMENA 18  Let’s have a look at the histogram:

19 SOME SUBTLE PHENOMENA 19  Let’s have a look at the impulse response:

20 CASE STUDY

21

22

23

24

25

26  DC performance

27 CASE STUDY  AC performance

28 CASE STUDY  AC performance  Making hardware or perform measurements as flat as the digital filter may turn out to be unfeasible or unworthy!

29 CASE STUDY  Sine-fit Amplitude Estimation

30 REFERENCES 30  http://www.mit.bme.hu/books/quantization  IEEE Std 1241-2000 Standard for Terminology and Test Methods for Analog-to-Digital Converters  A. Tessarolo, Getting the Most from Your C Code on the TMS320C28x™ Controller Using Code Composer Studio™  Delta-Sigma Data Converters Theory, Design, and Simulation. Norworthy, Schreier, Temes, IEEE – Wiley-Interscience 1992  K. Steiglitz, T. W. Parks, and J. K. Kaiser, ”METEOR: a constrained-based FIR Filter design program,” IEEE Trans. Signal Proc., vol 40, no. 8, pp. 1901-1909, Aug. 1992  Digital Filters with MATLAB ® : Ricardo A. Losada, 2009, The MathWorks, Inc.  New class of recursive digital filters for decimation: Horacio G. Martinez and Thomas W. Parks, 1978, Rice University Electrical Engineering Dept. Huston  M. Martino, et al. “Low emission, self-tunable DSP based Stepping Motor Drive for use with arbitrarily long cables,” IFAC Large Scale Systems Symposium, Villeneuve d’Ascq, France, 2010

31 BACKUP SLIDES 31

32 MINIMUM PHASE FIR FILTERS 32  Delay is minimized, but there is a lot more overshoot! Is that a problem? 100A 10A

33 HOW TO SPECIFY DIGITAL FILTERS? 1 33

34 HOW TO SPECIFY DIGITAL FILTERS? 2 34  From Precision to Filter Specs 1.74 x 10 -5 1.74 x 10 -4 1.74 x 10 -3

35 HOW TO SPECIFY DIGITAL FILTERS? 3 35  From Precision to Filter Specs  Now we are done! Or maybe not?

36 WHY OVERSAMPLING? 1 36  A “bit” of theory  Quantization Process  Quantization is a non linear process - vast and tricky subject  Fortunately an approximated model works very well almost every time!  Ok but what does that mean?

37 WHY OVERSAMPLING? 2 37 a) b)  Easy analog filter design, reduced delay, re-configurability, Ok!  Is that all? What about PQN power? Sampling FrequencyBandwidth


Download ppt "POCPA Conference 20..23 DESY Michele Martino (TE-EPC-HPM) CURRENT MEASUREMENT DIGITAL FILTERING - TUTORIAL - 1 POPCA 2012 FIR or IIR?"

Similar presentations


Ads by Google