LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multirate filtering high decimation rate artifacts

Solved!
Go to solution

Hi,

 

I am having problems with a high decimation ratio filter introducing artifacts into my data.

 

I am using the Digital Filter Design NStage MRate Filter Design VI to create a thee stage filter achieving a decimation ratio of 2000. The first stage is a CIC. The second two are FIR. The first stage decimation ratio is 500. The other two are 2. My incoming data rate is between 1 and 10 MS/s.

 

I am aquiring a couple seconds of data in 200 ksample blocks, and I am filtering them block by block. I get artifacts at the boundaries between blocks, as shown below at two different zoom levels:

 

Artifacts

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

artifactszoom.PNG

 

When implementing this filter, I get the best results using the DFD Nstage MRate Filtering for Single Block VI with the Symmetric extension type. I think this is supposed to avoid artifacts at domain extremes.

 

My implementation is below. Another loop acquires the blocks of data and stores them in the queue. This loop processes each block of data. The reason for the interior for loop is because the data is being acquired from two channels simultaneously, making the output waveform a 2x200000 array. The "IQ Mix" vi is a mixing an equivalent frequency wave with the data to convert it to DC-centered I and Q signals.

 

singleblocksnip.png

 

Anyone dealt with this problem before? It gets stronger with higher decimation ratio and lower passband.

0 Kudos
Message 1 of 3
(3,005 Views)

Good Afternoon!

 

Could you attach your code as well as the SubVI within you code?  I may then be able to understand why you are getting the artifacts.  Thank you!

 

-Cody C

0 Kudos
Message 2 of 3
(2,966 Views)
Solution
Accepted by topic author maxwellb

Cody,

 

Thanks for offering, but I think I've traced this problem down.

 

Number 1 was if I want to process data continuously, my mixing waves need to be continuous. I was mixing an identical wave with each block. I made the phase of my mixing wave continuous from block to block, and that removed a lot of the artifacts.

 

Number 2 was I need to use the correct filter processing VI. Above, I'm using the VI for single block, not continuous processing.

 

Number 3 was when using the continuous processing VI, I need to make sure to use a separate instance of the VI for each channel I want to process. This means that I can't use a for loop to loop through the channels. A non-parallelized for loop uses the same instance for all iterations. A parallelized for loop is not consistent with which iteration uses which instance.

 

I'm not completely out of the woods yet, though. I still have problems with the first block of data I process. I think this is a different enough problem for a seperate thread, though.

0 Kudos
Message 3 of 3
(2,948 Views)