# Design and implementation of causal band-pass filter for biosignals - what to consider? [closed]

I currently work in a project of clinical software (C#) which deals with clinical biosignals, specifically EMG and other low-frequency signals (load-cells, goniometers, and other biomechanical instruments).

We have to be able to:

• Create filters based on cuttoff frequencies (low and high) and filter order, for a given sampling frequency; The band-pass could be a cascading of one low-pass and one high-pass filters;
• Apply filters in real-time, that is, adding a new input sample and immediately taking a new output sample, in a loop;

I have read a lot about filter types, but explanations are usually based on math notation, while I would need a more computational explanation.

Also, reading source code (mostly from Octave-Forge) I can only "see" a lot of numbercrunching without actually understanding what is happening.

As I understand (correct me if I am wrong), an implementation of what I need would involve:

• Choose some input parameters for filter creation, that is, Low Frequency, High Frequency, Sampling Rate, and Filter Order;
• Execute some magic operation on these parameters, that would give me a recurrence relation; This recurrence relation would be contained in an instance of a filter;
• This filter instance would have a buffer of size N. As I start to collect data, the following loop would start to run:
• Add new input sample to filter;
• Apply recurrence relation;

So what I have to ask is:

• Does my computational rationale about filter design and usage (as explained in the bullet-list just above) makes sense from a DSP perspective? That is, would it be a feasible plan to implement some Filter class according to such rationale?

• Which concepts should I know / read about in order to properly implement such filter? For example, I understand that recurrence relation, order, sampling rate, (implicit) impulse response, are a bare minimum to define a filter, but I also read about number of taps, poles and zeros, gain, direct form, cascaded sections, and I am not sure it is necessary to deal with all the concepts to satisfy my requirements.

• Is there any conceptual topic or resource (link, book) I should take a look? Preferrably one focusing on implementation (that is, without heavy math notation)?

## closed as too broad by Jason R, jojek♦, Peter K.♦Aug 2 '14 at 1:19

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• If this question is poorly formulated, please tell me so that I can rephrase it. – heltonbiker Jul 31 '14 at 17:11
• It's not clear what you're actually asking. I don't see any question marks in your post at all. – Jason R Jul 31 '14 at 17:55
• @JasonR I added a block with questions, thanks for pointing it out. – heltonbiker Jul 31 '14 at 18:12
• Your inquiry is very broad. You would be best served by researching a bit more and coming up with more pointed questions. – Jason R Jul 31 '14 at 18:47
• Digital signal processing is a lot of number crunching so it is difficult to avoid the math notation. Generally DSP algorithms involve a lot of operations on vectors and/or matrices. You need to choose a platform to do the work in and get familiar with how the math is represented in that platform. You will probably find a "toolkit" for the platform that has a lot of ready made algorithms. Here is a decent reference you can read online: dspguide.com – user2718 Jul 31 '14 at 18:51