MM9Z1_638 LOW PASS FILTER

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MM9Z1_638 LOW PASS FILTER

跳至解决方案
4,297 次查看
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

 

标记 (1)
0 项奖励
回复
1 解答
4,277 次查看
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 项奖励
回复
1 回复
4,278 次查看
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 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2021582%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMM9Z1_638%E4%BD%8E%E9%80%9A%E6%BB%A4%E6%B3%A2%E5%99%A8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2021582%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8CNxp%20%E5%90%88%E4%BD%9C%E4%BC%99%E4%BC%B4%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E6%88%91%E4%B8%8D%E5%A4%AA%E6%98%8E%E7%99%BDMM9Z1_638%E7%9A%84LPF_Ax%EF%BC%88%E4%BD%8E%E9%80%9A%E6%BB%A4%E6%B3%A2%E5%99%A8%E7%B3%BB%E6%95%B0Ax%EF%BC%89%E8%AF%A5%E6%80%8E%E4%B9%88%E5%86%99%E3%80%82%3CBR%20%2F%3E%E5%81%87%E8%AE%BE%E6%88%91%E6%83%B3%E5%86%99%20A0%3D0.25%EF%BC%8CA1%3D0.5%EF%BC%8CA2%3D0.25%EF%BC%8C%E6%88%91%E5%BA%94%E8%AF%A5%E5%9C%A8LPF_Ax%E4%B8%AD%E5%86%99%E4%BB%80%E4%B9%88%EF%BC%9F%3C%2FP%3E%3CP%3E%E6%9C%89%E6%B2%A1%E6%9C%89%E6%AF%94%E4%BE%8B%E5%85%B3%E7%B3%BB%E6%88%96%E8%80%85%E6%8D%A2%E7%AE%97%E5%85%AC%E5%BC%8F%EF%BC%9F%3CBR%20%2F%3E%E4%BD%8E%E9%80%9A%E6%BB%A4%E6%B3%A2%E5%99%A8A0%E5%BA%94%E4%B8%BA%E6%B5%AE%E7%82%B9%E6%95%B0%EF%BC%8C%E4%B8%8D%E8%83%BD%E5%A1%AB%E5%86%99%E6%95%B4%E6%95%B0%E6%A0%BC%E5%BC%8FLPF_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%3E%E6%A2%81%E8%BF%88%E5%85%8B%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%3E%E5%9B%9E%E5%A4%8D%EF%BC%9AMM9Z1_638%20%E4%BD%8E%E9%80%9A%E6%BB%A4%E6%B3%A2%E5%99%A8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2021723%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8C%E8%BF%88%E5%85%8B%EF%BC%8C%3C%2FP%3E%0A%3CP%3EFIR%20LPF%20%E7%9A%84%E4%BD%BF%E7%94%A8%E6%98%AF%E5%8F%AF%E9%80%89%E7%9A%84%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%BE%AE%E8%B0%83%E9%87%87%E9%9B%86%E7%9A%84%E6%95%B4%E4%BD%93%E9%A2%91%E7%8E%87%E7%89%B9%E6%80%A7%E3%80%82%E5%A4%A7%E5%A4%9A%E6%95%B0%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E6%AD%A4%20FIR%20%E6%BB%A4%E6%B3%A2%E5%99%A8%E6%9C%AA%E8%A2%AB%E4%BD%BF%E7%94%A8%E6%88%96%E7%BB%95%E8%BF%87%E3%80%82%3C%2FP%3E%0A%3CP%3EFIR%20%E4%BD%8E%E9%80%9A%E6%BB%A4%E6%B3%A2%E5%99%A8%E7%9A%84%E4%B8%80%E4%B8%AA%E5%BE%88%E5%A4%A7%E7%9A%84%E7%BC%BA%E7%82%B9%E6%98%AF%E5%AE%83%E4%BC%9A%E6%98%BE%E8%91%97%E5%A2%9E%E5%8A%A0%E9%87%87%E9%9B%86%E7%9A%84%E5%BB%B6%E8%BF%9F%E3%80%82%E5%A6%82%E6%9E%9C%E4%BD%BF%E7%94%A8%2F%E5%88%87%E6%8D%A2%E4%B8%8D%E5%90%8C%E7%9A%84%20VSENSE%20%E9%80%9A%E9%81%93%EF%BC%8C%E5%88%99%E8%BF%99%E6%98%AF%E7%9B%B8%E5%85%B3%E7%9A%84%E3%80%82%3C%2FP%3E%0A%3CP%3E%E8%AF%B7%E5%8F%82%E9%98%85%E9%99%84%E4%BB%B6%20PDF%EF%BC%9A%3C%2FP%3E%0A%3CP%3E-%20%E6%95%B0%E5%AD%97%E4%BF%A1%E5%8F%B7%E5%A4%84%E7%90%86%2F%E6%BB%A4%E6%B3%A2%20%E7%AC%AC%20107%20%E9%A1%B5%3CBR%20%2F%3E-%20%E5%BB%B6%E8%BF%9F%20%E7%AC%AC%20115%20%E9%A1%B5%3C%2FP%3E%0A%3CP%3EFIR%20LPF%20%E5%8F%AF%E4%BB%A5%E5%90%AF%E7%94%A8%2F%E7%A6%81%E7%94%A8%EF%BC%88%E6%97%81%E8%B7%AF%EF%BC%89%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%23define%3C%2FSTRONG%3E%20ACQLPFEnable()%20(B_ACQ_ACC1%20%3D%20B_ACQ_ACC1_LPFENM_MASK%7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%80%BC%EF%BC%89%E3%80%82%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%3E%E6%88%91%E9%99%84%E5%8A%A0%E4%BA%86%E4%B8%80%E4%B8%AA%20Excel%20%E8%AE%A1%E7%AE%97%E5%99%A8%EF%BC%8C%E5%AE%83%E5%8F%AF%E4%BB%A5%E6%98%BE%E7%A4%BA%E5%90%84%E4%B8%AA%E8%BF%87%E6%BB%A4%E9%98%B6%E6%AE%B5%E7%9A%84%E5%BD%B1%E5%93%8D%E5%B9%B6%E5%85%81%E8%AE%B8%E8%AF%84%E4%BC%B0%E8%87%AA%E5%B7%B1%E7%9A%84%E5%80%BC%E3%80%82%E6%88%91%E6%83%B3%E8%BF%99%E5%B0%B1%E6%98%AF%E4%BD%A0%E8%A6%81%E6%89%BE%E7%9A%84%E4%B8%9C%E8%A5%BF%E3%80%82%3C%2FP%3E%0A%3CP%3EBRs%2C%20Tomas%3C%2FP%3E%3C%2FLINGO-BODY%3E