More digital filter blocks

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
IoVo_297831
Level 4
Level 4
First like received

Hi all,

   

Our target application requires digital filtering of 14 sensors, ie 14 IIR filters (4rth order BPF).
Can we implement more than 2 filters with digital filter block?

   

Also, can we implement a digital filter writing a new component for UDBs?

   

Thank you in advance,
John

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The digital filter block within a PSoC5 is a rather complex hardware part and there are only two channels availlable.

   

So  two solutions come to my mind:

   

Software: Depending on your frequency requirements a software filter can use up a lot of CPU power, so a research how much a single channel calculation uses, will reveal how many filters could run in parallel.

   

UDB Hardware: There are 24 8-bit wide "Universal Digital Blocks" containing a few registers, an ALU that can perform some integer logic and arithmetic. So as long as a reduction of the filter into the "integer - world" lead to a solution.

   

A combination of both, hardware helping the software calculating, will probably the most powerful solution. Keep in mind,that the DMA system can be used to transfer data between components and UDBs.

   

 

   

Bob

View solution in original post

0 Likes
19 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The digital filter block within a PSoC5 is a rather complex hardware part and there are only two channels availlable.

   

So  two solutions come to my mind:

   

Software: Depending on your frequency requirements a software filter can use up a lot of CPU power, so a research how much a single channel calculation uses, will reveal how many filters could run in parallel.

   

UDB Hardware: There are 24 8-bit wide "Universal Digital Blocks" containing a few registers, an ALU that can perform some integer logic and arithmetic. So as long as a reduction of the filter into the "integer - world" lead to a solution.

   

A combination of both, hardware helping the software calculating, will probably the most powerful solution. Keep in mind,that the DMA system can be used to transfer data between components and UDBs.

   

 

   

Bob

0 Likes
IoVo_297831
Level 4
Level 4
First like received

The target application needs very low power dissipation so the final choice depends on the current consumption each solution requires.

   

If I understand correctly, there is no way of implementing more than two digital filters within the DFBs.

   

I believe that hardware solution, implementing filters within UDBs, would consume less power than using the CPU so I will work into that direction.
If the complete filter(s) cannot fit in the available UDBs then I will try to follow combination of both software and hardware as you suggested.

   

One more question. Could I use VHDL, because I am familiar with that one or I should migrate to Verilog HDL?

   

Thank you very much for your reply.
John

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Clearing one misunderstanding: I was not talking about power dissipation, I was talking about MIPS, a software filter could use a lot of CPU cycles.

   

I did always use VeriLog for programming the UDBs, it is already integrated into Creator. There is some documentation (already installed with Creator): a Component Author Guide and a Warp Verilog Reference Guide, both to find under your PSoC Creator3.1\Component Development Kit\

   

 

   

Bob

IoVo_297831
Level 4
Level 4
First like received

Thank you for your replies.

   

Sorry for this question bombing.
The DBFv1.30 component datasheet says "In addition, the system SW can ‘load sample or coefficient data in or out of the DFB data RAMs, reprogram for different filter operation in ‘block mode’, or both. This allows for multichannel processing or deeper filters than are supported in local memory." on Page 23.

   

I am confused. Does this mean that I could implement more than 2 filters with DFB component?
 

   

John

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I am afraid, no more than two (2) channels possible. Have a look at the DFB Assembler component which exposes two channels, too: To be really sure, create a MyCase and get answers from Cypress directly. Support & Community -> Technical Support -> Create a MyCase.

   

Can you tell us a bit more about the frequencies of your incoming signals?

   

 

   

Bob

IoVo_297831
Level 4
Level 4
First like received

 Thank you for your reply once more.
The sampling frequency of incoming signals is about 1KHz. Considering 14 signals, 14KHz could be sufficient.
It is not a high proccessing load. The task is to reduce power consumption of the chip.

   

John

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Running 14 (or 12) filters in software at 1ksps each leaves @60MHz ~4k cycles (5k). That could be doable using some optimizations.

   

Why do you need to reduce the power consumption?

   

 

   

Bob

ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The sampling frequency of incoming signals is about 1KHz. Considering 14 signals, 14KHz could be sufficient.

   

 

   

You would need to oversample the input freq by ~ 10, in order to get desired

   

response. Use the filter wizard and experiment with a cascaded biquad to get the

   

LPF and examine sample rate effects.

   

 

   

You could consider using the DFB assembler to time share the DFB and possibly

   

get the thruput you are looking for. In my opinion I think the goals are aggressive,

   

only a test case will reveal if possible.

   

 

   

    

   

         

   

http://www.cypress.com/?rID=60720     DFB Assembler, MAC Topics

   

    

   

         

   

https://www.youtube.com/watch?v=2UC4gCohrk8      DFB Video Part I

   

https://www.youtube.com/watch?v=6tr_CNWIA8M     DFB Video Part II

   

https://www.youtube.com/watch?v=nIa4X7gES3k     DFB Video Part III

   

 

   

 

   

 

   

 

   

Regards, Dana.

IoVo_297831
Level 4
Level 4
First like received

 Thank you both for your reply and for your time sharing information.

   

The target application will be portable device and that is why we need to reduce power consumption.
Optimizations so far include integer operations instead of floating-point and the minimum scaling up to maintain accuracy.

   

I know that the goal is very ambitious. The oversampling suggestion will be taken into account... even if it almost killed me 🙂
I use Matlab for filters simulation and I will check the effects on various sampling frequencies. I will also study the DFB to create a test app.

   

John

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You could get in touch with filterwizard@cypress.com and ask for guidance.

   

Kendall Castor Perry.

   

 

   

Or file a CASE -

   

 

   

    

   

          

   

To create a technical or issue case at Cypress -

   

 

   

www.cypress.com

   

“Support”

   

“Technical Support”

   

“Create a Case”

   

 

   

You have to be registered on Cypress web site first.

   

 

   

Regards, Dana.

ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

As a favor to the forum post back the results you get from

   

Kendall or a CASE. I would certainly be interested.

   

 

   

Regards, Dana.

IoVo_297831
Level 4
Level 4
First like received

Thanks again for your replies.

   

I will study better first and then I will create a case.
I will share Interesting conclusions.

   

John

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I am sure you already thought about this, but how long will one measurement be or does it have to be continous?

   

Do the 14 inputs have to be sampled simultaneously or can there be a (longer) time shift in between?

   

Where lastly go the 14 filtered values to?

   

 

   

Bob

IoVo_297831
Level 4
Level 4
First like received

The specification is that input signals are read (almost) concurrently.
Filtered values are combined to each other and further (but not complex up to kow) processing takes place to produce a vector output that is transmitted wireless to a station.

   

John

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

 @jvourv

   

Read this article till the end:

   

http://www.analog-eetimes.com/en/sample-multiple-channels-simultaneously-with-a-single-adc.html?cmp_...

   

 

   

It seems that your task can be accomplished (theoretically). Practically, as Bob mentioned above, you need to contact the author (K.Castor-Perry) for assistance, as no code examples are given.

   

 

   

odissey1

IoVo_297831
Level 4
Level 4
First like received

Thanks for the interesting article.
I will study it in detail.

   

John

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Note, when you work with the DFB Filter Wizard, you may have to

   

move the corner freq to get the cutoff you want for a given attenuation

   

level. Thats just one more design input you can adjust at will.

   

 

   

Regards, Dana.

   

 

   

IoVo_297831
Level 4
Level 4
First like received

Thank you for your notice.
I will take that into account.

   

John

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You are always welcome!

   

 

   

Dana.

0 Likes