I would leave the alpha
value alone, and fill in the missing data.
Since you don't know what happens during the time when you can't sample, you can fill those samples with 0s, or hold the previous value stable and use those values for the EMA. Or some backward interpolation once you have a new sample, fill in the missing values, and recompute the EMA.
What I am trying to get at is you have an input x[n]
which has holes. There is no way to get around the fact you are missing data. So you can use a zero order hold, or set it to zero, or some kind of interpolation between x[n]
and x[n+M]
, where M
is the number of missing samples and n the start of the gap. Possibly even using values before n
.