Contaminate an EMG with 50 Hz signal
조회 수: 7 (최근 30일)
이전 댓글 표시
I am trying to add a 50 Hz sinusoidal signal to an EMG signal but it isn't working. The amplitude of the 50 Hz signal should be 5% of the EMG signal amplitude. Can you give me with some tips on how to do it? I wrote the 50 Hz contamination like this: y = 0.005.*sin(2.*pi.*Fc.*t),
Thank you very much!
댓글 수: 0
채택된 답변
Star Strider
2020년 7월 3일
I have no idea what ‘isn’t working’ means.
This version of your code works:
Fs = 256; % Create Sampling Frequency (Hz)
Ts = 1/Fs; % Sampling Interval (sec)
t = 0 : Ts : 10; % Define Time Vector
Fc = 50; % Sine Curve Frequency
EMGRMS = 0.001; % EMG RMS Amplitude (V)
MainsNoise = EMGRMS * 0.05 * sin(2*pi*Fc*t); % Noise Vector
figure
plot(t, MainsNoise)
grid
xlim([0 0.1])
Note the additional detail. If you calculated it correctly, there should be five peaks in the plot (restricted to the first 100 ms).
I simply made up a value for the RMS amplitude. Note that to calculate the RMS amplitude (as I would have here if I had the signal), do this:
EMGRMS = sqrt(mean(EMG.^2));
where ‘EMG’ is your EMG signal vector.
.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!