I want to filter a PPG signal on a microcontroller. I have limited memory and a was searching for low computational methods. I found the work of Kazuhiro Taniguchi, Earable POCER: Development of a Point-of-Care Ear Sensor for Respiratory Rate Measurement where they use moving average filters (m3, m30 and m80) in order to filter their data and obtain freequencies between certain values, specifically they create a a passband between 189 mHz and 504 mHz. Their idea is that after the initial m3 moving average(every 3 values) they create the m30 and m80 and they apply an iteration between them ( r= m30 - m80). This is their way to obtain the values corresponding to the passband of interest, eventhough, as they specify,
The moving average does not have an ideal lowpass filter function, and so some frequency elements other than those in the passband may pass, even if they are attenuated.
to obtain the window size for their moving average filters they applied the following equation:
I couldn't quite understand where this equation (5) was coming from but as soon as you replace the value $n$ with 30 or 80 you get the values of the passband cut-off freequencies 189 mHz and 504 mHz.
When I asked for specifications on how they did it, they send me to a japanese forum that unfortunately I couldn't translate but there were two links to stackexchange, on cuttoff freequency and filter design.
I tried to adapt all these new staff on my model but couldn't get the passband wanted (0.1 Hz - 0.8 Hz) using the equation (5) from the image above with my parameters (sampling freequency of 50Hz, cut-off freqs etc...).
I don't understand what is the problem and my question is the following:
What are the moving average filter windows that I have to use and in which order to be able to filter a signal with a sampling frequency of 50 Hz in order to isolate the frequencies between the passband 0.1 Hz - 0.8 Hz?