A bare-metal microcontroller as a target for 20-sim-generated C code

By the use of 20-sim, real-time controllers for mechatronic systems can be developed. Using the 20-sim 4C software this controller can be run on actual hardware. Several development targets are by default supported by this software, it is also possible to make a custom target. The goal of this project is to explore the capabilities of a microcontroller as a target for a 20-sim-generated C code. A microcontroller is an interesting target as it can run without an operating system allowing for fast interrupt response times while having direct access to a wide range of peripherals.

Also, it can be low energy, has a small footprint on a PCB, and is relatively cheap. This comes at the cost of processing power. We found that the Arduino Due board, featuring an ARM-M3 microcontroller, can run a PID controller with a 10th-order low-pass filter at a loop frequency of 100[Hz]. The combined maximum latency per sample is 0.6[m s]. We measured latencies for the step calculation, reading input, setting output, and sending logging. Extending the IO-drivers would allow the system to be used on a wider range of plants. The latency can be reduced further by converting the control algorithm to work with fixed-point numbers. The data interface between the base station and the microcontroller should be im-proved as this is currently limiting the maximum sampling frequency.

BlueJeans videoconference join information:

Meeting URL
https://bluejeans.com/142183212

Meeting ID
142183212

Want to dial in from a phone?
Dial one of the following numbers:
+31.20.808.2256 (Netherlands (Amsterdam))
(see all numbers - https://www.bluejeans.com/numbers)

Enter the meeting ID and passcode followed by #