acconeer / acconeer-python-exploration

Acconeer Exploration Tool

Home Page:https://docs.acconeer.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Count the reps of breathing and respiration pattern

raghavendrajain opened this issue · comments

I have bought pulsed coherent radar module XM112 and XB112 board. I need some guidance on where to start for my application.

Context
I'm making a breathing app, in which different styles of breathing exercises are to be taught to the users. For example, in one exercise the inhaling has to be done for 3 seconds, holding for 5 seconds and exhalation for 3 seconds. In another exercise, inhalation is to be done with normal speed but exhalation has to be done very fast. There are more than 10 types of breathing patterns.

For all these exercises, the person is sitting either on chair facing a wall or sitting on the ground in lotus position.

Expected solution
I'd like to
(a) correct user using some verbal/sound feedback when his breathing pattern varies from the goal pattern
(b) count reps of breathing patterns

I looked into the GUI for Breathing and Sleep Breathing. I think the absolute movement of chest movement would provide me what I need. Please provide your insights into what should I look into. Thanks a lot!

Hi! I think a good place to start would be the breathing_history returned from the breathing example processor:

"breathing_history": breath_hist_plot,

It contains filtered estimates of the chest movement, seen in the lower right plot.

@erikmansson Thank you! Do you mean the plot titled Breathing Movement and gives me BPM and depth? I believe this gives me the absolute movement of the distance of the chest from the sensor. Although I expect the user to not move, there may be some small movements while breathing, so how do I filter the movement of anything that is not chest movement? Thank you!

Do you mean the plot titled Breathing Movement and gives me BPM and depth?

Yes

[...] how do I filter the movement of anything that is not chest movement?

This may be a bit tricky. As a start, you could play around with the filter parameters defined here:

self.breath_sos = np.concatenate(butter(2, 2 * 0.3 / self.f))

Another approach could be to try to detect if the user is moving too much and temporarily ignore the movement.

Thank you very much @erikmansson.

No problem. I'll close this for now but feel free to reopen or create a new issue if you have any more questions.