• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » C6000 Single Core DSP » C67x Single Core DSP Forum » 60 Hz Notch Filter and baseline wander filter
Share
C6000 Single Core DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

60 Hz Notch Filter and baseline wander filter

This question is answered
1258021
Posted by 1258021
on Apr 23 2012 21:48 PM
Genius4330 points

Hi,

Thank You for you time and reading this post.

We are using C6727B DSP Processor with DSP/BIOS Os.

We are looking for 60 Hz Notch Filter alogrithm and baseline wander filter algorithm.

I had seen the following URL and downloaded DSPLIB from here: http://processors.wiki.ti.com/index.php/Software_libraries

Can someone please point me to the library where I can find the 60 Hz notch filter algorithm and baseline wander filter algorithm?

or else these libraries are not available directly from TI? Do we have to write on our own using the existing libraries?

Thank You & Regards,

GSR

 

Notch Filter and baseline wander filter
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Uday
    Posted by Uday
    on Apr 24 2012 16:17 PM
    Expert3750 points

    Hello GSR,

    I’m not sure of whether a notch or wander filter implementation is available. However, you might want to look at our medical imaging software toolkit which has a wall filter implementation on c64x+ and c66x. You can download it from http://www.ti.com/tool/s2meddus and could use it as a reference.

    Perhaps someone from the single core team can provide some further information.

    - Uday

    --- If you need more help, please reply. If this answers your question, please Verify Answer below this post ---

    stk-med filter
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rahul Prabhu
    Posted by Rahul Prabhu
    on May 01 2012 17:14 PM
    Verified Answer
    Verified by 1258021
    Genius15605 points

    Hi GSR,

    We do not have a ready to use notch filter implementation in our C6000 DSP software libraries but  there is source code for notch filters in the ECG kit on C5515 low power DSP that can be ported on C6000 DSPs. You can find this source code archived on the following url:

    http://code.google.com/p/c5505-ezdsp/

    Download the package ADS1298 ECG MDK mentioned under C5515. The 60 Hz Notch filter co-efficients can be found in the file ECG_Filter_Co-efficients.c. The data filtering process is implemented in C55x assembly but appears to simple convolution of fir filter coefficients with the input data. You can find optimized implmentation for FIR filter of order in the c674x DSPLIB. The C55x ECG kit implements a notch filter of order 531 so you may need to pad some zeros to make it work with the FIR implementation in DSPLIB. I did not find the baseline wander filter in that package but I will check internally if I can find that for you.

    Good luck!!

    Regards,

    Rahul

    ---------------------------------------------------------------------------------
    Please click the
    Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rahul Prabhu
    Posted by Rahul Prabhu
    on May 04 2012 14:58 PM
    Verified Answer
    Verified by 1258021
    Genius15605 points

    On the same url that I shared, you can download the MDK_Stethoscope_C5515EVM package. In that package. You can find a simple implementation of a baseline wander filter using moving average FIR filter in that package.

    Look for the filter implementation under the path MDK_Stethoscope_C5515EVM\StethSystem_v_0_12\projects\STETHSystem\src.  Let us know if this suffices your requirements?

    Regards,

    Rahul

    ---------------------------------------------------------------------------------
    Please click the
    Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 1258021
    Posted by 1258021
    on May 24 2012 23:57 PM
    Genius4330 points

    Hi Rahul,

    Thanks for the reply.

    While looking at the src folder we see one function FIR_PROCESSING.

    Is this function responsible for baseline wander filtering?

    Regards,

    GSR

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rahul Prabhu
    Posted by Rahul Prabhu
    on May 25 2012 11:09 AM
    Genius15605 points

    GSR,

    The FIR_PROCESSING function is a general function written in the application to convolve any FIR filter co-efficients with the input data. However the baseline wander filter implemented in the application is a Simple moving average(SMA) implementation which only requires computing the average of neighborhood samples of the input.   If you look for average filter in the source files, you will see the details of the 5th order moving average filter, where the sum of the neighborhood pixels is computed after applying the bandpass filter. The functionality is controlled by the muteflag in the application.

    Regards,

    Rahul

    ---------------------------------------------------------------------------------
    Please click the
    Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 1258021
    Posted by 1258021
    on May 30 2012 00:21 AM
    Genius4330 points

    Hi Rahul,

    Thanks for your suggestion. I will look for baseline wander filter as per your instructions.

    We have used a sample file to validate the notch filter algorithm. We have attached some files for reference.

    8270.filter.c

     The description of the attachments is filter.c which contains the source code being used to port from ADS1298 to C6727B processor.

    One question regarding the ECG_ProcessCurrSample function which is present in filter.c file.

    The size of the workingbuff array is 8 * 351 * 2. But, in the ECG_ProcessCurrSample function it is cleared for 8 * 351 times only. Do you suggest that the entire workingbuff array shall be cleared? 

    Is it mandatory to provide Int16 format to the function ECG_ProcessCurrSample or else can we supply a unsigned int values also?

    If you have any sample input file and output file can you share with us for validating the Notch filter?

    Thanks for your time and the reply.

    Regards,

    GSR

    C6727B Notch filter
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 1258021
    Posted by 1258021
    on Jun 01 2012 00:39 AM
    Genius4330 points

    Hi Rahul,

    We have ported the ECG_ProcessCurrSample to C6727B Processor.

    We observed two initialization issues

    • The array WorkingBuff is not initialized to zero completely
    • acc variable in the funciton ECG_FilterProcess_C is not initialized to zero

    I have modified the code to initialize entire WorkingBuff array to zero and acc in ECG_FilterProcess_C function also set to zero.

    Can you please confirm if these changes are requried or not?

    ECG_ProcessCurrSample is expecting a Signed 16-Bit data, can we provide a unsigned 16-Bit data to it or else is it mandatory to supply the 16-Bit Signed only?

    The Input file that we have used I am attachign here with the name 402S_1Ch_Data.h and the filtered output data is available in 2012_may_30_filterout_012.h. Filter.c contains the source code being ported to C6727B Processor. The file 402S_1Ch_Data.h contains the data in the form of single channel, 0 – 200 Hz data file. The data is at 1 kHz sample rate.

    4377.filter.c

    2783.2012_may_30_filterout_012.h

    4503.402S_1Ch_Data.h

    Regards,

    GSR

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • 1258021
    Posted by 1258021
    on Jun 04 2012 00:47 AM
    Genius4330 points

    Hello All,

    any suggestions or inputs?

    Regards,

    GSR

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use