Categories

BreathUp week 8 !

Sabaïdi !

This end of week, I was pretty sick, it wasn’t the best thing for the job but I tried to rest a lot and today, I began to work again on the project!

We are already at the end of november and we still do not have our PCB up, but I ended with my placing and Alexis will tell me what to change tomorrow afternoon so it will be over soon, I hope so !

 

Concerning the algorithm, I spent my morning redefining all the filtering part, starting from scratch ! But this time, I think I have a solution strong enough to be showed to Laurent. Indeed, I tested it on some acquisitions that weren’t giving any results but with the new algorithm, I can see the breathing EMG even if the patient is touching some 50Hz! I want to test it more and after I will keep implementing it in C

 

Stay tuned and good evening again !

Benjamin for BreathUp

BreathUp week 7!

‎晚上!

As Sylvain said it, this is our “off” week-end. Indeed, next week is an athens one so we are not supposed have embedded system lessons and Alexis told us to take some rest! Of course I did it 😉

As far as our project is concerned, on Friday, we had a new meeting with Alexandre and Laurent because we were not able to do our last Saturday experience. For some reasons, the EMG signal seems to be lost among noise… So with Laurent, we did a lot of tests and we saw that sometimes multiples of 50Hz have a far more important intensity for some strange reasons that we still do not know. So all the filtering chain may be changed during the next week. I will have to work a lot on it to delete these harmonics.

Besides, I began this morning to work on the placing and the linking. So I set up all the environment for our project and I began to look at what my mates did on the schematic. Thus I made a draft of the linking to spend less time on it.

For the following week, this is still the same two things, I need to work on it: linking and filtering !

 

Have a nice week !

 

Benjamin for BreathUp 😉

BreathUp half-week 7!

سهار مو نیکمرغه ! the

This week, I have two main things to achieve: the first was to begin with implementing algorithm in C and second one the linking. As the schematic wasn’t finished yet, I couldn’t work on it during the first part of this week but it seems that now Alexis is satisfied enough so that I will begin with the linking in the second half of the week.

On the other hand, I began the implementation of the algorithm. I finished yet two different adaptative filters that will canceled the 50Hz noise but I can’t actually test it because I need to pair it with some bandpass filters. However, as I ‘m quite sure that common filters have ever been implemented in C, I’m looking for libraries which permit me to do it. Thanks to Alexis, I found one interesting library (CMSYS-DSP) that I will continue to explore but I’m quite sure to use it for lowpass/bandpass/highpass filters in the filtering chain.

So from now until the end of the week, I expect to finish the first allocation try for our PCB and to have chosen the library I will use for the algorithm implementation.

Stay tuned !

Benjamin for BreathUp 😉

BreathUp Week 6!

Қайырлы таң!

The more weeks are passing, the more I’m asking myself if I will find a new way to say hello in Asia before the end of the project !

Concerning the project, this week was quite short, as Sylvain said, we had the challenge day (quite fun though !) on Friday so that it shortened the week !  And as excepted, I didn’t do what I wanted to do but I made some progress on other points that are far more important !

Just the once will not hurt, I will speak about algorithms ! I bet you didn’t expect that ! 😉 Thus, Saturday morning we met Laurent. During three hours, we made some acquisitions with the same context as Laurent did it with his last prototype and we analyze its. It helped me a lot to modify a little the filtering part and also the  electrodes position. But the most important thing is that Laurent approved my algorithms. As a consequence, I can now begin to implement it in C. So I hope, I will did it before the end of the next week.

Concerning what I was supposed to do, I can’t actually work on the PCB linking because the scheme isn’t completed yet. Afterwards, I didn’t have time to work on Bluetooth but it’s not really grave because we have time to do it!

 

To sum up, for the newt week, I have to do the linking and to implement algorithm in C !

Stay tuned for more informations

 

Benjamin for BreathUp 😉

BreathUp half-week 6!

سلام وعليکم !

This beginning of the week wasn’t really efficient. Indeed with the long weekend, I only did a rewriting of our Project Specific Success Criteria (PSSC). Indeed, because of some difficulties to acquire EMG’s results with the ADS1298, we are a little bit stuck and we can’t move forward both on acquiring chain and on algorithm part until we will see Laurent. So I had to change our deadlines and I updated the wiki.

At the same time, as I can’t continue my job on algorithm, I will begin to work on bluetooth for our device. I’m also waiting for the PCB scheme in order to do the linking. Thus, this is the two things I need to work on for the end of the week.

 

Have a nice evening !

Benjamin for BreathUp 😉

BreathUp Week 5

Namaste !

This week, I was supposed to work (again, like the last two weeks…) on filtering chain. If you remember my last post, we had a losing problem of the breathing signal that is to say, we were not able to see the EMG and we didn’t know if it was because of the filter or if the acquiring signal didn’t include the EMG. So, on Wednesday, I worked on many data that Alexandre gave me and try to analyze the results after filtering. But I never succeed to see the EMG.

Thus, I wondered whether the 50Hz wasn’t enough filtered, so that the EMG may have been hidden behind it. I spent about half day on processing signal theory and on the firm documents to understand their algorithms. As a consequence, now, I’m quite sure that the problem comes from the acquisition part and not from the algorithms.

So, in order to be sure, we need to see Laurent next week to help us with the acquisition in order to obtain verified curves and try another time to filter its.

 

Have a nice long week-end !

Benjamin for BreathUp 😉

BreathUp half-week 5 !

Өдрийн мэнд  !

This week, I’m supposed to try out processing signal algorithms on our acquisition, to translate Simulink in C and begin with the PCB routing. As a consequence, during the beginning of this week, I decided to focus a lot on algorithm.

On Monday, with Alexis and Samuel, we agree each other to change the deadline of the compilation from simulink to C of the algorithm. Indeed, like the auto-generated code isn’t usable, I will implement it in C by hand however, in order to not waste my time, I will do it when we will be sure that our algorithm really work with our final acquisition chain so this deadline is postponed after the receiving of our PCB.

Regarding to the filtering, Alexandre succeeded in acquiring some data from ECG and EMG so that for the first time we had some curves with noise. Thus, since Monday and my last changes on filters, we know that we are able to separate heart signals from breathing signals. We had some good curves about cardiac cycles with QRS waves but it appears that during the filtering process or during acquisitions, breathing signals are deleted so that we only see muscles activity. So I have to still work on it !

Good evening !

 

Benjamin for BreathUp 😉

BreathUp week 4 !

Mingalaba !

This week, I had to work on the algorithm part, especially I was supposed to test the algorithms given by the firm and to compile them in C to see if we can put the auto generated code directly in the embedded system.

Above all, I had to domesticate Simulink so that now, I know how to use it and I learnt a lot about the firm work. However, their algorithms weren’t really appropriate for our project so I tried to modify them to fit with our expectations. Once I did it, we had some data on which we could try out, unfortunately, Laurent told us that the files he gave us weren’t really adapted so on Saturday, he brought new data base. Yet, all the new data are already filtered so we can’t try out our algorithm on its… So this part is delayed by the acquisition part, indeed I must wait until Benoit and Alexandre get some interesting curves I can try to filter.

In theory, we are able to filter the 50Hz from our signal and to separate the ECG(ElectroCardioGram) and the parasternal EMG (ElectroMyoGram). I also wrote a small C code in order to count the number of beating heart cycle in an ECG and give the cardiac cycle.

Furthermore, all the filtering chain is written in Simulink so I looked after the auto-generated C code from our Simulink work. But I faced two main problems: the first one of course is the illegibility of the auto-generated code and the second one is that it’s very heavy and not really optimized. For example, our filter take a file as entry and in auto-generated C, this file is hard coding, which is not really useful because this file should change with time. Thus, if we want to use it we will need for sure to modify what is auto-generated which means that if we have to modify something on Simulink, every time we will need to modify the auto-generated C code. As a consequence, I think I will rewrite all the filtering algorithms in C but before I want to be sure that the algorithms are really efficient so again, I need to wait some acquisitions to be really sure…

To sum up, for this next week, I must try out filtering algorithm on our acquisition, to translate Simulink in C and begin with the PCB.

 

Benjamin for BreathUp 😉

Finding the right components to BreathUp

Hi!

We have started this week with a meeting with Laurent during which he gave us electrodes and his old signal processing chain.

I then spent a lot of time choosing the components we will put together to create our watching device. That was a rather difficult task, choosing an IMU, a LoRa and a BT chip, LEDs, a USB and a micro SD connectors and a buzzer over all the existing components. But after some feedback from Alexis and Samuel, I think we are quite done with that part of the project.

I also discovered Simulink with Benjamin. We had a small experience with Matlab, but had never used Simulink before, so that wasn’t really efficient…

Eventually I made a Python script to convert the output of the acquisition discovery card in Matlab input format (.mat) using Scipy and Numpy.

For next week I will have to start to design the PCB by connecting the different components together. I will also work with Benjamin on creating a complete test of the algorithms on Simulink.
That would be great if we could also work on how Simulink exports the signal processing chain to C, and how we will be able to integrate this C code in our project.

Xavier Chapron

BreathUp week 3 !

Sawat di khrap !

A lot of improvements for BreathUp this week !  Above all, we met Laurent (our contact from the firm) on Monday and spent like two hours with him to work on the project. After signing our project agreement, he gave us some electrodes and taught us how to put them on a patient body in order to make an EMG (ElectroMyoGram) of the parasternal way.

He, also, came with some curves he took few years ago and explained us how to analyze its. Eventually, Laurent gave us the famous signal processing we were expecting adding that he didn’t make a sorting… Indeed, four thousand matlab and simulink files ! As I’m the one responsible of the signal processing algorithms part, I did a huge sorting deleting more than three thousand five hundred files that were not meaningful, a very time consuming step but an important one !

At the same time, I ended with my summarize of the document about the first prototype that the firm developed. The document helped me a lot with the algorithm part because there were a lot of graphics and explanations. The document describes all the data acquisition chain, even if there are a lot of differences with ours, especially in the number of way to measure which affect the way to filter them also. Because they were using the measure of other signals to delete the same signal on other curves.

On Friday morning, with Xavier, we keep working on the algorithm part : we made, on simulink, a scheme of our data acquisition chain, so our 50Hz filter is ready being tried out, we just need to write a script that convert our .txt acquisition data into .mat file that can be read by Simulink.

If the filter works quite well on acquisition, I think that we will use the C compiler of Simulink to auto-generate C code. It will be a time profit because if we have modifications to do, we can do it on simulink, test it, and then auto-generate it again. Furthermore, we think that simulink will be easier to understand for Laurent than a C code.

Thus for the next week, we need to write the script, to work on a second filter that will split the EMG and the ECG (ElectroCardioGram) and eventually succeed in making the acquisition work in order to try out algorithms.

 

Benjamin for BreathUp 😉