Presenting multiple signals
Copyright (C) 2022 Miodrag Bolic
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details <https://www.gnu.org/licenses/>.
This code was developed by Miodrag Bolic for the book PERVASIVE CARDIAC AND RESPIRATORY MONITORING DEVICES
% Changing the path from main_folder to a particular chapter
main_path=fileparts(which('Main_Content.mlx'));
%addpath(append(main_path,'/Chapter2'))
cd (append(main_path,'Chapter8/PlottingSignals'))
addpath(append(main_path,'/Service'))
SAVE_FLAG=0; % saving the figures in a file
Presenting ECG, PPG, PCG and SCG signals
We present ECG lead 1 signal, PPG signal measured at the finger, PCG signal collected by a microphone placed on the chest and accelerometer signal collected by an accelerometer placed on the chest
sig=readtable('sync_biomed_20201020_br12.csv');
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Voltage (V)', 'FontSize', 10)
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Voltage (V)', 'FontSize', 10)
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Voltage (V)', 'FontSize', 10)
% Filter SCG_z in the range of 0.47 Hz and 32 Hz using Wavelet
levelForReconstruction = [false, false, false, false, false, false, false, true, true, true, true, true, true, false, false, false, false];
% Perform the decomposition using modwt
wt = modwt(sig.SCG_Z, 'sym4', 16);
% Construct MRA matrix using modwtmra
mra = modwtmra(wt, 'sym4');
% Sum along selected multiresolution signals
a1 = sum(mra(levelForReconstruction,:),1);
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Voltage (V)', 'FontSize', 10)
exportgraphics(gcf,"Fig8.3_smartdraw.jpg", 'Resolution',600)
Presenting arterial central and peripheral blood pressure
We will present ECG lead 1 signal, PPG signal measured at the finger, arterial blood pressure and brachial oscillometric signal. Please note that the oscillometric signal is filtered. The signals and their units are:
Column 1: 'ECG ' (V)
Column 2: 'Arterial central BP' (mmHg)
Column 2: 'Arterial peritheral BP' (mmHg)
The patient has cardiomyopathy.
load('ecg_central_perBP.mat');
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Voltage (V)', 'FontSize', 10)
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Pressure (mmHg)', 'FontSize', 10)
title("Arterial central blood pressure");
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Pressure (mmHg)', 'FontSize', 10)
title("Arterial peripheral blood pressure");
exportgraphics(gcf,"Fig8.2_smartdraw.jpg", 'Resolution',600)
Presenting ECG, PPG, Arterial and oscillometric signals
We will present ECG lead 1 signal, PPG signal measured at the finger, arterial blood pressure and brachial oscillometric signal. Please note that the oscillometric signal is filtered. The signals and their units are:
Column 1: 'ECG' (V)
Column 2: 'Arterial BP' (mmHg)
Column 2: 'PPG' (V)
Column 4: 'Oscillometric total pressure' (mmHg)
The patient has cardiomyopathy.
load('abp_ecg_ppg_osc.mat');
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Voltage (V)', 'FontSize', 10)
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Voltage (V)', 'FontSize', 10)
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Pressure (mmHg)', 'FontSize', 10)
% Filter OSC in the range of 0.47 Hz and 16 Hz using Wavelet
levelForReconstruction = [false, false, false, false, false, false, true, true, true, true, true, true, false, false, false];
% Perform the decomposition using modwt
wt = modwt(a(:,4), 'sym4', 14);
% Construct MRA matrix using modwtmra
mra = modwtmra(wt, 'sym4');
% Sum along selected multiresolution signals
b1 = sum(mra(levelForReconstruction,:),1);
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Normalized pressure', 'FontSize', 10)
Presenting ECG and SCG signals
We present ECG lead 1 signal and a signal collected by an accelerometer placed on the chest
sig=readtable('sync_biomed_20201020_br12.csv');
plot(t,rescale1(sig.ECG))
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Normalized amplitude', 'FontSize', 10)
% Filter SCG_z in the range of 0.47 Hz and 16 Hz using Wavelet
levelForReconstruction = [false, false, false, false, false, false, false, false, true, true, true, true, true, false, false, false, false];
% Perform the decomposition using modwt
wt = modwt(sig.SCG_Z, 'sym4', 16);
% Construct MRA matrix using modwtmra
mra = modwtmra(wt, 'sym4');
% Sum along selected multiresolution signals
a1 = sum(mra(levelForReconstruction,:),1);
plot(t,rescale1(a1')+0.7)
Ploting Fig 8.10
sig=readtable('sync_biomed_20201020_br16.csv');
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Voltage (V)', 'FontSize', 10)
xlabel(' Time (s)', 'FontSize', 10)
ylabel('Voltage (V)', 'FontSize', 10)
title("Draw PPG signal");
exportgraphics(gcf,"Fig8.10.jpg", 'Resolution',600)