How Can I extract Fetal ECG from Maternal ECG using kalman filter, could anyone suggest me the steps to extract the Fetal Ecg waveform
1 view (last 30 days)
Show older comments
Fs = 4e3; Time = 40; NoSamp = Time * Fs;
%% Mother signal
X = 3.5*ecg(2700).'; Y = sgolayfilt(kron(ones(1,ceil(NoSamp/2700)+1),X),0,21); Rate = 1:Time*Fs'; Var = round(2700*rand(1)); Mcg = Y(Rate + Var)'; Op1 = 1/Fs:1/Fs:Time'; subplot(3,3,1) plot(Op1,Mcg) axis([0 3 -5 5]) grid on title('Motherheartbeat'); %% Fetal SIgnal
XF = 0.25*ecg(1725); YF = sgolayfilt(kron(ones(1,ceil(NoSamp/1725)+1),XF),0,17); Var = round(1725*rand(1)); Fcg = YF(Rate + Var)'; subplot(3,3,2) plot(Op1,Fcg) axis([0 2 -0.5,0.5]) grid on title('fetalbeat'); %% Measured signal;
Msg = [0 1.0 -0.5 -0.8 1.0 -0.1 0.2 -0.3 0.6 0.1]; D = filter(Msg,1,Mcg) + Fcg + 0.02*randn(size(Mcg)); subplot(3,3,3); plot(Op1,D); axis([0 2 -4 4]); grid on title('Measured signal') %% Measured Mother Heart Beat
C = D + 0.02*randn(size(Mcg)); subplot(3,3,4); plot(Op1,C); axis([0 2 -4 4]); grid on; title('Refernce signal')
0 Comments
Answers (0)
See Also
Categories
Find more on Multirate Signal Processing 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!