Skip to main content
. 2020 May 8;20(9):2679. doi: 10.3390/s20092679
Algorithm 1 Wheezing sound separation using IIS-NMPCF.

Require: x[n], y[n], KR, KW, λR0, λR1, λW, α and M.

  • 1)

    Compute the normalized magnitude spectrogram X of the mixture x[n].

  • 2)

    Compute the normalized magnitude spectrogram Y of the training y[n].

  • 3)

    Divide the spectrogram X into L-segments X(1), X(2), …, X(L) using AMIE_SEG [53].

  • 4)

    Classify the L-segments into wheezing (C(l)=1) and non-wheezing (C(l)=0) using a wheezing detection algorithm [54].

  • 5)

    Initialize each activation and basis matrix UR, UW(l), VR(l), VW(l), HR with random non-negative values.

  • 6)

    Update each activation and basis matrix UR, UW(l), VR(l), VW(l), HR using Equations (9)–(13) for the predefined number of iterations M. At each iteration, normalize each activation and basis matrix UR, UW(l), VR(l), VW(l), HR and update the terms DxR, DxW and DyR using Equations (14) and (15).

  • 7)

    Compute the estimated magnitude spectrograms X^R(l) and X^W(l).

  • 8)

    Denormalize the estimated magnitude spectrograms X^R(l) and X^W(l).

  • 9)

    Apply a Wiener filtering [32] on X^R(l) and X^W(l).

  • 10)

    Concatenate all the estimated complex respiratory spectrograms: X^R=X^R(1),X^R(2),,X^R(L).

  • 11)

    Concatenate all the estimated complex wheezing spectrograms: X^W=X^W(1),X^W(2),,X^W(L).

  • 12)

    Synthesize r^[n].

  • 13)

    Synthesize w^[n].

          return r^[n] and w^[n]