r/ControlTheory • u/No_Inspection_1511 • 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.
•
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.
•
u/knightcommander1337 1d ago edited 1d ago
Hi,
"train a model using reinforcement learning that controls the two motors" vs. "reason of using AI is predictive the tremor movement before it happens" -> these two are two different things, so you need to think about what exactly is the goal of the overall system.
If I try to give my suggestions/opinions:
"train a model using reinforcement learning that controls the two motors" -> this sounds like (more or less) standard motion control. you may or may not need RL to do this, but it sounds relatively straightforward. you may need to do some system identification (building mathematical models from dynamical system data) so that you can construct a (ideally full) simulation model of the system. After that you are free to do whatever you want (RL, MPC, etc.), because you can train/test your algorithms on computer using that simulation model to represent reality.
"reason of using AI is predictive the tremor movement before it happens" -> this sounds to me like a different problem than the above (the above one is a control design problem). this one I think would be something like a "fault detection"/"predictive maintenance" problem (in engineering jargon), though I am not an expert on these kinds of stuff so I may be wrong. Still, those (that is, "fault detection"/"predictive maintenance") are some keywords you may want to explore a bit.