Skip to main content
. 2018 Oct 31;18(11):3705. doi: 10.3390/s18113705
Algorithm 1 Estimation of Instantaneous RR from PPG signal.
Input PPG
p(t) ← red or infrared PPG
Remove Base-line wander using SSA
X ← trajectory-matrix [p(t), M], M, embedding dimension
[U,Λ,V] ← Apply SVD onto X
X^=j=2,3,...,L[λjujvjT], selection of eigenvectors LM
p^(t) ← diagonal-averaging(X^), signal reconstruction
Detect pulse peaks of the p^(t)
Estimate Respiratory induced modulation
amplitude modulation (AM) or frequency modulation (FM)
r(t) Re-sample the modulation into a 4 Hz signal
Estimate average Respiratory Rate (RR)
ra average RR using Hilbert spectrum or AR-spectral method
Apply SSWT to the 4 Hz modulation
[f,Wssw]=SSWT(r(t)), replace s(t) by r(t) in Equation (1), implement Equations (3) and (4)
returns f, instantaneous frequencies (ωl)
and Wssw, signal energy in time and frequency plan, (i.e.,Tr(ωl,b))
Mask SSWT spectrum using averaged RR
(ti,i)=max[Wssw(t:t+δt-1,rf-ω:rf+ω)]
rf is associated respiratory frequency from average RR (ra)
δt, time-window size e.g., 32 s, ω, frequency-window size
ti, time indices, i, maximum-energy frequency indices
Find instantaneous frequencies fins
fins(ti)=f(i)
Estimate Instantaneous RR in terms of breaths per minute (fins×60)