Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

signal processing on FPGA

Status
Not open for further replies.

mahendra.p12

Newbie level 4
Joined
Dec 30, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
Hi,
I am trying to perform filtering operation on ECG signal on my sparton 3 e starter kit.Can anyone tell me how to proceed I have searched many forums but I am not getting exact idea as how to start with it.Basically I am trying to implement a 50Hz notch fir filter.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,738
Helped
14,307
Reputation
28,877
Reaction score
13,034
Trophy points
1,393
Location
Bochum, Germany
Activity points
281,503
Can we presume that you have already implemented an analog frontend supplying digitized ECG data to the FPGA?
 

permute

Advanced Member level 3
Joined
Jul 16, 2010
Messages
923
Helped
295
Reputation
590
Reaction score
268
Trophy points
1,343
Activity points
8,543
step1: create a FIR filter in matlab/octave. you can use a windowing method or something like firpm/remez/firls/etc...
step2: model the filter with quantized coefficients. this will aid you in determining how many bits to use for the multipliers.
step3: use the sample rate, filter length, and the multiplier size to determine how many multipliers are needed in the FPGA. eg, if you have 1000 samples per second with a 100 tap filter with 16b coefficients (fitting in 1 18x18 multiplier) then you need to do 100*1000 multiplications per second. A single multiplier could then be used with a state machine and could run at 100kHz (very easy timing). A 19200 tap filter and 192000 sps system would need 3.86E9 multiplies per second. This would need around 16 multipliers running in parallel and running a little over 230MHz. Likewise, if 32b coefs are needed, this could mean even more multipliers. At that point, it is probably better to look into decimating the data as it is unlikely a heart rate has a 90kHz bandwidth requirement...
step 4: post more information or begin to write the code for the design.
 

mahendra.p12

Newbie level 4
Joined
Dec 30, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
thanks premute.
for future reference ,one's i have generated filter coefficients using say matlab FDA tool am I supposed to store them in memory.How about using FIR filter cores available.I have heard of them but dnt knw exactly as how efficient they are from point of view of consuming resources on board.
 

mahendra.p12

Newbie level 4
Joined
Dec 30, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
Yes .i am using the onboard ADC of sparton 3 e kit.You can assume i have the digitizes data available with me.How to proceed next.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,738
Helped
14,307
Reputation
28,877
Reaction score
13,034
Trophy points
1,393
Location
Bochum, Germany
Activity points
281,503
I think, permute has addressed the important points. Presuming you have the Spartan-3e starter kit with LTC1407 ADC, you'll want to decimate the input data stream to a suitable rate, e.g. 500 or 1000 samples per second.
 

mahendra.p12

Newbie level 4
Joined
Dec 30, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
I am trying to design FIR filter in Matlab and get the filter coefficients.But the order of filter that i am getting with windowing technique is too large e.g for kaiser window I am getting order of 1590.Can you suggest me something to design the notch filter with lesser no of coefficients??Though it is possible to have very less order with IIR filters but I need fir filters so that i can have a linear phase response.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top