Clear Filters
Clear Filters

Butterworth filter in simulink for semg processing

14 views (last 30 days)
Zainab
Zainab on 18 Jul 2024 at 15:29
Commented: Umar on 18 Jul 2024 at 21:28
Hello everyone,
I am on my final step of processing live semg signals to hopeful then move a prosthetic arm, however I am having trouble "quieting" the noise of the signal. Therefore, I have decided to add the Butterworth filter to my simulink path however I am running into errors. I am trying to have the lowpass filter to be 5, the highpass filter: 500 and what I think the main problem is that I am trying to filter live data. so the sample frequency will be based on the live data I am recieving from my semg device. I will apperciate all the help I can get
  1 Comment
Umar
Umar on 18 Jul 2024 at 21:28
Hi Zainab,
In order to help or assist you further, please share your code with us, screenshot of errors etc. In order to address your posted comments, consider using a Variable Bandwidth Butterworth Filter block in Simulink. This block allows you to adjust filter parameters dynamically based on the incoming data's sample frequency.Here's a sample code snippet to create a Variable Bandwidth Butterworth Filter block in Simulink:
% Define the filter parameters
order = 4; % Filter order
fs = 1000; % Sampling frequency
f_low = 20; % Lower cutoff frequency
f_high = 200; % Upper cutoff frequency
% Design the Butterworth filter
[b, a] = butter(order, [f_low/(fs/2), f_high/(fs/2)]);
% Apply the filter to the SEMG signal
filtered_signal = filtfilt(b, a, semg_signal);
By implementing this Variable Bandwidth Butterworth Filter, you can effectively process live SEMG signals with varying sample frequencies, ensuring noise reduction for accurate prosthetic arm control. Good luck!

Sign in to comment.

Answers (0)

Categories

Find more on Filter Design and Analysis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!