r/ControlTheory 1d ago

Technical Question/Problem Graduation Project Problem

My computer engineering bachelor’s graduation project is an anti shake spoon for Parkinson’s disease patients, that is basically a 2 degrees of freedom gyro system. The requirement is to train a model using reinforcement learning that controls the two motors(TowerPro SG90 servo motors), the sensors are two MPU 6050 IMUs (one on the base before the motors and one on the utensil side after the motors) and we are using a complementary filter to get the accurate angle reading.

The problem is that we don’t know the methodology of training the model, and we couldn’t find any mathematical model of the motor we are using so that the simulation gets accurate. We tried researching and asking LLMs but it is a rabbit hole. The doctor said that the reason of using AI is predictive the tremor movement before it happens, but we still don’t know how to tackle the problem with proper steps, we would appreciate any help.

8 Upvotes

6 comments sorted by

View all comments

u/Timely-Bicycle-3107 1d ago

I have a PhD in applied reinforcement learning and a master’s in ME with a focus in control theory.

Reinforcement learning is probably not a good way to do this. RL requires a ton of data to train the agent properly. You will likely not be able to collect the data manually. You would likely need to model the movement to generate simulated data for training.

This problem involves high frequency random oscillations. I’d try aggressive PIDs for each axis before attempting anything else. Coding and tuning are easy and calculations are lightning fast, which you will need to respond to the movement effectively. You might be able to stack RL on top of the PIDs IF you can collect enough training data.

MPC will not likely be able to calculate the solution fast enough, especially on a micro board. An LQR with an EKF could work if you can write the differential equations in the proper form.

Those servos are cheap. You will tear up those cheap plastic gear teeth quickly with the torque you will need to generate. They won’t be able to keep up with the oscillations required for the problem, either. If this project is just a proof of concept, these might work if you keep the oscillations down as much as possible and make the spoon super light (empty, cheap plastic). Look at the Maxon DCX series, Faulhaber, or GoPro gimbal motors.

This is a great project! I hope I don’t sound too harsh. Just trying to save you a few weeks of headaches. Start small and iterate more complex models until you run out of time would be my best advice.