Is it possible to design a motion trajectory with SimpleFOC Studio?


I am new to motor control so, please forgive me if my questions are nuts. My task is to design a 1-D motion system to test accelerometer and gyroscope (like TDK’s icm 20948). Programmable trajectories are required with certain velocity and displacement profiles. There are commerical products for it but they are expensive.

Can I use SimpleFOC Studio for that purpose? Where to start?

Any suggestion is welcome.


Hi @JohnANT ! Welcome to SimpleFOC!

so what you describe is not supported out of the box by our library. In fact, we don’t even support motion trajectories at all, we’re specialised in the low level control of the motor via FOC (field oriented control) and leave things like motion planning and kinematics to the higher level layers.

However, depending on your needs, designing a 1D system to do what you need might not be too hard. Or it might be impossible. Not sure :smiley:, it really depends what you need.

As part of our library, you could set up a motor in either open loop or closed loop control modes. In closed loop we support velocity and position control modes. Some of the sensors we support have 14bit resolution, even more precise sensors are, in theory, possible.

So you could set up a motor system with closed loop velocity control based on a 14bit or more sensor, and then write you own code to run your velocity trajectories by changing the set-point.

With a bit of extra effort and the right MCU you can probably log the whole motion profile based on the sensor with 14bit sample depth and several kilo-samples per second.

What kind of accuracy do you need to achieve to validate your motion sensor tests?

Thanks a lot for the guideline. I will look into it. Do you know any application note or book on it, particularly with Python to code such velocity profile for a closed loop system?

Right now everything is rather vague. What I just know is that the accelerometer has a zero-g tolerance of +/-50mg and our full scale required is +/-4000mg. We would be happy to be able to trace down to 40mg.

There is this code which was recently pointed out on the forum, but I have not used it myself:

Otherwise, there are various systems for running robot kinematics, but I’m not sure they will be that helpful for you, as they are usually quite focused on calculating and coordinating the motion of multiple motors. With only one motor, your case is probably too simple to make it worth the learning curve of using such software.

1 Like

Hi Runger

Thanks a lot for your help. I will study joshua’s Derivs Limiter. It seems that is the one I need.