Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Filter EMG Signal in FPGA or Real Time

Hello,

 

I am having difficulties filtering my EMG signal. I am using a Delsys Trigno Wireless EMG unit and a single board rio. I am able to acquire the raw signal using an FPGA vi, however, when I try to implement a low (or high, or bandpass) filter in the FPGA vi, the treated signal looks exactly like the raw signal. Using a real time vi I tried to implement a similar filter and came across the same problems. I attached a picture of both of my vi's.

 

Any help would be greatly appreciated!

 

0 Kudos
Message 1 of 5
(5,943 Views)

Hello Kaci.Madden,

 

Can you post pictures of the signal you are trying to filter? And perhaps of the filter settings as well? 

 

Do any other signal processing functions work on your sbRIO?

0 Kudos
Message 2 of 5
(5,914 Views)

Kyle,

 

Thank you for the response! I attached pictures per your request. 

 

I have only tried fundamental filtering thus far. At a basic level I am trying to rectify the bandpass filter the EMG signal from 20-450 Hz. On the FPGA, there is no Butterworth bandpass filter option (only low or high pass), so I would have to string a low and high pass filter together. To start, I tried implementing just the low pass alone, but as you can see in the attachment below, I am not getting good results. It not only isn't filtering, it is returning negative values from a rectified signal....

 

 

Download All
0 Kudos
Message 3 of 5
(5,909 Views)

Here are the parameters for the other filter.

 

0 Kudos
Message 4 of 5
(5,908 Views)

I went ahead and did some research, and it looks like the negative signal post-filtering is actually expected behavior. Go ahead and try to play around with the filtering. High-pass or bandpass filters give negative values, while a low pass filter maintains the rectification. I guess that the rectification adds a very strong low-frequency positive component to any signal. When it is filtered out, the signal returns to negative values. 

 

Obviously, I'm no signals expert, but I would recommend filtering the signal first, and then rectifing it. This paper on EMG signals also filtered first, then rectified. 

 

As for the quality of the filters, the FPGA filter looks about right, but the Real-Time one looks a bit funky. I would recommend troubleshooting that further. Maybe try the same filtering procedure on your computer rather than a real-time target? 

0 Kudos
Message 5 of 5
(5,883 Views)