A traditional balancing robot project

Hello everyone, I am fairly new to arduino and electronics and I wanted to try making a balancing robot project to learn a few concepts. I have looked at a lot of similar projects people made. However, I have a couple of questions:

  1. I saw that the best thing is to use encoders alongside an IMU. Will the interrupts in the code cause any issues?

  2. I tried modeling the system (not the whole loop just the system dynamics) but I am not very confident of the result I got. I have attached the calculation and I would really appreciate any comments that can help me out with this.

Thank you in advance for your input and comments.

Balancing Robot Control Model.pdf (292 KB)

You may encounter timing problems on a controller without FPU. A state regulator with integer arithmetic looks most promising to me.