Controlling magnetic field in electric motors
During my time in Robotics master’s program I worked on building software to control electric motors position. All projects were built in C and C++. Some hardware parts had to be developed from scratch as well.
The basic elements of a system were:
- Microcontroller (STM32). Executing software to control magnetic field. (STM32)
- Hardware module (Driver). Performing commands from the microcontroller for controlling voltage.
- Magnetic encoder. Measuring position of the rotor and sending it back to the microcontroller.
- Motor (BLDC)
By the end of my master’s degree I had built various systems from controlling a single motor to controlling a feedback loop stabilization system.
The first project implemented vector control or also called field oriented control (FOC) in C language. Later I reimplemented it in C++.
One of the fun things to implement was slow rotation of the motor, which was done using sinusoidal voltage control, meaning that the magnetic field was slowly and gradually rotated.
Eventually the robotics club in my university built a platform with a more powerful motor from a hoverboard, and I implemented the same system for it as well.
In my last year I put all the pieces together and built a stabilization platform. It used a gyroscope and accelerometer to measure its position.
Finally I gave a seminar about motor control algorithms