Setting integration tests and working on electrical schematics


The first part of the week was quite productive. In my last post I said that I wanted to work on a fully integrated processing chain and on the PCB schematics.

And here we are, on Wednesday:

I’ve started to design the schematics, that’s not finished yet, but I will spend my evening on it because I really want to make a list of questions and have some feedback from Alexis before the long week-end.
A bad news is that we might have some real difficulties with the battery autonomy because after some datasheet reading and calculation I found that the maximum current needed will be 700mA/h…

Secondly, I succeeded to create an automated test of our algorithms from Simulink and C for a database. Here are the main difficulties I had to overstep:

  • The main part of our algorithms is still in a Simulink model. This model includes in its configuration the input file, the sample time and the simulation time and we want to change those parameters for the different files in our database. The best thing I found is to edit the model file (.mdl) with a Python script to change theses values.
  • The next step was to find a way to launch the simulation from command line. And I finally found a way to give to Matlab instructions to do that.
  • Finally, we want to run some C algorithms on the outputs to qualify them. So we need to convert the Matlab output file into a file that will be easy to parse in C.

And here are the difficulties that still remains:

  • I want to be able to get the sample time and simulation time from the input files, not from an hard coded parameter in the script.
  • This is really slow, one minute per file, so about half an hour for our actual database… I think I can improve this, but I need to make tests and spend time on it before confirming it.

Now that I am getting used to Matlab and Simulink from command line, I want to create some scripts that would improve our efficacy. For example with a script that will allow, in a few seconds, to get the different curves after filtering from the csv data exported from the ADC testing card.

Eventually, I made a good start with the PCB and the test automations and I will continue this work for the small end of the week.

Xavier Chapron

3 comments to Setting integration tests and working on electrical schematics

  • Looks like you have fun working with proprietary programs 🙂

  • Dryvenn

    Those algorithms that you wanna use to “qualify” the outputs, where do they come from? Do they have to be implemented in C?

  • Xavier Chapron

    The algorithms that we are using were supposed to come from our partners but finally comes from Benjamin’s mind.
    We will need to implement them in C, but before that we are using Simulink to implement them easily and test them as we still don’t have data coming from our acquisition chain but data from our partners.

Leave a Reply