MM9Z1_638 LOW PASS FILTER

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MM9Z1_638 LOW PASS FILTER

Jump to solution
4,287 Views
a852013777
Contributor III

Hi Nxp Partner

 

I don't quite understand how to write the LPF_Ax (low pass filter coefficient Ax) of MM9Z1_638.
Suppose I want to write A0=0.25, A1=0.5, A2=0.25, what should I write in LPF_Ax?

Is there a ratio relationship or a conversion formula?
Low pass filter A0 should be a floating point number that cannot be filled in integer format LPF_AX

影像 (3).png影像 (3).png

Br,

Mike Liang

 

Tags (1)
0 Kudos
Reply
1 Solution
4,267 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Mike,

The use of the FIR LPF is optional and allows to fine tune the overall frequency characteristics of the acquisition. In most cases this FIR filter is not used/bypassed.

One big tradeoff of the FIR low pass filter is that it will significantly increases the latency of the acquisition. This is relevant if different VSENSE channels are used/switched.

See attached PDF for:

- Digital signal processing/filtering p. 107
- Latency p. 115

The FIR LPF can be enabled/disabled (bypassed).

#define ACQLPFEnable()   (B_ACQ_ACC1 = B_ACQ_ACC1_LPFENM_MASK| B_ACQ_ACC1_LPFEN_MASK)     //!<  enable low pass filter for CSENSE & VSENSE channel

#define ACQLPFDisable()    (B_ACQ_ACC1 = B_ACQ_ACC1_LPFENM_MASK| 0)    //!<  disable low pass filter for CSENSE & VSENSE channel

If enabled the FIR coefficients and number of used coefficients can be programmed. The device already has a default set of coefficients programmed.

The code below is representing the default values (code is actually not required, as reset values of the respective registers).

B_ACQ_LPFC = 15;
B_LPF_A0 = 0x03DB;
B_LPF_A1 = 0x87B4;
B_LPF_A2 = 0x86B1;
B_LPF_A3 = 0x1580;
B_LPF_A4 = 0x04DF;
B_LPF_A5 = 0x9F70;
B_LPF_A6 = 0x81F5;
B_LPF_A7 = 0x5195;
B_LPF_A8 = 0x5195;
B_LPF_A9 = 0x81F5;
B_LPF_A10= 0x9F70;
B_LPF_A11= 0x04DF;
B_LPF_A12= 0x1580;
B_LPF_A13= 0x86B1;
B_LPF_A14= 0x87B4;
B_LPF_A15= 0x03DB;

I attached an Excel calculator which shows the impact of the individual filter stages and allows to evaluate own values. I guess it is what you are looking for.

BRs, Tomas

View solution in original post

0 Kudos
Reply
1 Reply
4,268 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Mike,

The use of the FIR LPF is optional and allows to fine tune the overall frequency characteristics of the acquisition. In most cases this FIR filter is not used/bypassed.

One big tradeoff of the FIR low pass filter is that it will significantly increases the latency of the acquisition. This is relevant if different VSENSE channels are used/switched.

See attached PDF for:

- Digital signal processing/filtering p. 107
- Latency p. 115

The FIR LPF can be enabled/disabled (bypassed).

#define ACQLPFEnable()   (B_ACQ_ACC1 = B_ACQ_ACC1_LPFENM_MASK| B_ACQ_ACC1_LPFEN_MASK)     //!<  enable low pass filter for CSENSE & VSENSE channel

#define ACQLPFDisable()    (B_ACQ_ACC1 = B_ACQ_ACC1_LPFENM_MASK| 0)    //!<  disable low pass filter for CSENSE & VSENSE channel

If enabled the FIR coefficients and number of used coefficients can be programmed. The device already has a default set of coefficients programmed.

The code below is representing the default values (code is actually not required, as reset values of the respective registers).

B_ACQ_LPFC = 15;
B_LPF_A0 = 0x03DB;
B_LPF_A1 = 0x87B4;
B_LPF_A2 = 0x86B1;
B_LPF_A3 = 0x1580;
B_LPF_A4 = 0x04DF;
B_LPF_A5 = 0x9F70;
B_LPF_A6 = 0x81F5;
B_LPF_A7 = 0x5195;
B_LPF_A8 = 0x5195;
B_LPF_A9 = 0x81F5;
B_LPF_A10= 0x9F70;
B_LPF_A11= 0x04DF;
B_LPF_A12= 0x1580;
B_LPF_A13= 0x86B1;
B_LPF_A14= 0x87B4;
B_LPF_A15= 0x03DB;

I attached an Excel calculator which shows the impact of the individual filter stages and allows to evaluate own values. I guess it is what you are looking for.

BRs, Tomas

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2021582%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMM9Z1_638%20LOW%20PASS%20FILTER%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2021582%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Nxp%20Partner%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20don't%20quite%20understand%20how%20to%20write%20the%20LPF_Ax%20(low%20pass%20filter%20coefficient%20Ax)%20of%20MM9Z1_638.%3CBR%20%2F%3ESuppose%20I%20want%20to%20write%20A0%3D0.25%2C%20A1%3D0.5%2C%20A2%3D0.25%2C%20what%20should%20I%20write%20in%20LPF_Ax%3F%3C%2FP%3E%3CP%3EIs%20there%20a%20ratio%20relationship%20or%20a%20conversion%20formula%3F%3CBR%20%2F%3ELow%20pass%20filter%20A0%20should%20be%20a%20floating%20point%20number%20that%20cannot%20be%20filled%20in%20integer%20format%20LPF_AX%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22%E5%BD%B1%E5%83%8F%20(3).png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22%E5%BD%B1%E5%83%8F%20(3).png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F317962iD34982BEF3BE33B8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22%E5%BD%B1%E5%83%8F%20(3).png%22%20alt%3D%22%E5%BD%B1%E5%83%8F%20(3).png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E%E5%BD%B1%E5%83%8F%20(3).png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EBr%2C%3C%2FP%3E%3CP%3EMike%20Liang%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2021723%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20MM9Z1_638%20LOW%20PASS%20FILTER%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2021723%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Mike%2C%3C%2FP%3E%0A%3CP%3EThe%20use%20of%20the%20FIR%20LPF%20is%20optional%20and%20allows%20to%20fine%20tune%20the%20overall%20frequency%20characteristics%20of%20the%20acquisition.%20In%20most%20cases%20this%20FIR%20filter%20is%20not%20used%2Fbypassed.%3C%2FP%3E%0A%3CP%3EOne%20big%20tradeoff%20of%20the%20FIR%20low%20pass%20filter%20is%20that%20it%20will%20significantly%20increases%20the%20latency%20of%20the%20acquisition.%20This%20is%20relevant%20if%20different%20VSENSE%20channels%20are%20used%2Fswitched.%3C%2FP%3E%0A%3CP%3ESee%20attached%20PDF%20for%3A%3C%2FP%3E%0A%3CP%3E-%20Digital%20signal%20processing%2Ffiltering%20p.%20107%3CBR%20%2F%3E-%20Latency%20p.%20115%3C%2FP%3E%0A%3CP%3EThe%20FIR%20LPF%20can%20be%20enabled%2Fdisabled%20(bypassed).%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%23define%3C%2FSTRONG%3E%20ACQLPFEnable()%26nbsp%3B%26nbsp%3B%20(B_ACQ_ACC1%20%3D%20B_ACQ_ACC1_LPFENM_MASK%7C%20B_ACQ_ACC1_LPFEN_MASK)%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%2F%2F!%26lt%3B%26nbsp%3B%20enable%20low%20pass%20filter%20for%20CSENSE%20%26amp%3B%20VSENSE%20channel%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%23define%3C%2FSTRONG%3E%20ACQLPFDisable()%26nbsp%3B%20%26nbsp%3B%20(B_ACQ_ACC1%20%3D%20B_ACQ_ACC1_LPFENM_MASK%7C%200)%26nbsp%3B%20%26nbsp%3B%20%2F%2F!%26lt%3B%26nbsp%3B%20disable%20low%20pass%20filter%20for%20CSENSE%20%26amp%3B%20VSENSE%20channel%3C%2FP%3E%0A%3CP%3EIf%20enabled%20the%20FIR%20coefficients%20and%20number%20of%20used%20coefficients%20can%20be%20programmed.%20The%20device%20already%20has%20a%20default%20set%20of%20coefficients%20programmed.%3C%2FP%3E%0A%3CP%3EThe%20code%20below%20is%20representing%20the%20default%20values%20(code%20is%20actually%20not%20required%2C%20as%20reset%20values%20of%20the%20respective%20registers).%3C%2FP%3E%0A%3CP%3EB_ACQ_LPFC%20%3D%2015%3B%3CBR%20%2F%3EB_LPF_A0%20%3D%200x03DB%3B%3CBR%20%2F%3EB_LPF_A1%20%3D%200x87B4%3B%3CBR%20%2F%3EB_LPF_A2%20%3D%200x86B1%3B%3CBR%20%2F%3EB_LPF_A3%20%3D%200x1580%3B%3CBR%20%2F%3EB_LPF_A4%20%3D%200x04DF%3B%3CBR%20%2F%3EB_LPF_A5%20%3D%200x9F70%3B%3CBR%20%2F%3EB_LPF_A6%20%3D%200x81F5%3B%3CBR%20%2F%3EB_LPF_A7%20%3D%200x5195%3B%3CBR%20%2F%3EB_LPF_A8%20%3D%200x5195%3B%3CBR%20%2F%3EB_LPF_A9%20%3D%200x81F5%3B%3CBR%20%2F%3EB_LPF_A10%3D%200x9F70%3B%3CBR%20%2F%3EB_LPF_A11%3D%200x04DF%3B%3CBR%20%2F%3EB_LPF_A12%3D%200x1580%3B%3CBR%20%2F%3EB_LPF_A13%3D%200x86B1%3B%3CBR%20%2F%3EB_LPF_A14%3D%200x87B4%3B%3CBR%20%2F%3EB_LPF_A15%3D%200x03DB%3B%3C%2FP%3E%0A%3CP%3EI%20attached%20an%20Excel%20calculator%20which%20shows%20the%20impact%20of%20the%20individual%20filter%20stages%20and%20allows%20to%20evaluate%20own%20values.%20I%20guess%20it%20is%20what%20you%20are%20looking%20for.%3C%2FP%3E%0A%3CP%3EBRs%2C%20Tomas%3C%2FP%3E%3C%2FLINGO-BODY%3E