Skip to main content
. 2022 Nov 29;22(23):9307. doi: 10.3390/s22239307
Algorithm 1. Client algorithm.
  • (1)

    Sample the data rate and put it in an array;

  • (2)

    Find maxima Lmax:

  • (i)

    Input bit rate samples in pairs of three (v1, v2, v3);

  • (ii)

    If (v1<v2>v3), add v2 to Lmax, # find maximum bit rate;

  • (iii)

    Continue step 2 until N received frames;

  • (3)

    Find minima Lmin:

  • (i)

    Input bit rate samples in pairs of three (v1, v2, v3);

  • (ii)

    If (v1>v2<v3), add v2 to Lmin, # find minimum bit rate;

  • (iii)

    Continue step 3 until N received frames;

  • (4)

    Max=Analyse(Lmax), # Call procedure to acquire α, β, and γ;

  • (5)

    Min=Analyse(Lmin), # Call procedure to acquire α, β, and γ;

  • (6)

    Find status:

  • (2)
    • (i)
      If (Max==β & & Min==β), set Status as Progressive;
    • (ii)
      Else if (Max==α & & Min==β), set Status as Stabilized;
    • (iii)
      Else if (Max==β & & Min==α), set Status as Fluctuated;
    • (iv)
      Else if (Max==α & & Min==α), set Status as Degraded;
    • (v)
      If (Max==γ || Min==γ),
set Status as non-monotonic and call Find_rms (Bit rates);
A. function Analyze (Bit rates):
Read start data point, startp;
Read end data point, endp;
Find median value, medianp;
If (startp, medianp, endp) tends to monotonic increase, return β;
Else if (startp, medianp, endp) tends to monotonic decrease, return α;
If (startp, medianp and endp) tends to neither monotonic increase nor decrease, return γ;
B. function Find_RMS (Bit rate):
Calculate the root mean square (RMS) of the samples;
Xrms=1/n(x12+x22++xn2)
Divide the N different samples into M segments (M = 3);
Continue Step1 to find the RMS values of each segments:
rms1,rms2, and rms3;
Compute the difference among the overall RMS and
the RMS of the corresponding segments;
Calculate diff1=RMSrms1;
Calculate diff2=RMSrms2;
Calculate diff3=RMSrms3 ;
If (diff1<=diff2<=diff3), then return 1;
Else if (diff1>=diff2>=diff3), then return 0;
Else return 2.