I have a few thoughts for @geniusintraining.
Caveat/disclaimer: these are random thoughts and inferences I came up with from looking at the problem, I could be completely off base; it would not be the first time.
- I don't think tuning is the problem, I think system limitations inherent to the design choices are the problem. To wit
- We already mentioned backlash
- That servo looks like an RC analog servo. If so, then it takes a 20Hz (50ms) or 50Hz (20ms) PWM pulse frequency (period).
- Which should be fine, but the PID loop update time is 10ms, so only one of every five, or every other, loop update is going to actually effect a change (although the effect could be cumulative)
- On top of that, an RC analog servo typically works with a duty cycle (ON duration) of between 1% and 2%, or maybe up to 2.5%, of the PWM period.
- The 1400 PWMX.DC (Duty Cycle; cf. here) setting has a range of 0 (0% Duty Cycle i.e. always off) to 1000 (100% Duty Cycle i.e. always on).
- So that 1-2% range will mean the CV output to the PWM.DC control parameter will have a usable range of 10-20 out of 1000, or only 11 discrete values.
Maybe this has already been taken into account, and that is not an RC servo, or there is a 555 timer circuit or Arduino in between the 1400 and the servo to enhance the CV resolution.
Anyway, intuitively these issues make it seem like a fairly unworkable system, at least to me; I think it would be an interesting project or thought experiment to teach people about order-of-magnitude thinking in the design of mechanical and control systems, but I am not so sure it is going to teach anyone about PIDs.
For example, in the Circuit Cellar video that @ndzied1 posted, that ball has low rotational inertia compared to its translational inertia (i.e. mass), and they were moving the surface up to 36 degrees, so not only is anything close to a linear control characteristic a vain hope*, but with that largish range of angles and angle step they also left out a possibly significant centrifugal acceleration term from their model.
Sorry to be so negative, and again, I could be way off base. That said, on a more positive note, the control you have achieved is pretty impressive.
* although that could be handled if there was at least adequate servo resolution and linkage geometry, which there was not