More servo modelling

Managed to try out my "discovery" on the servo controlling. But — big surprise — it either seems to make no difference adding in the unequally  spaced 80/20 points, or it makes the buzzing, clicking and whirring louder! :)

While I leave those models on the back-burner, at least I discovered why a loaded servo also buzzes.

I again resorted to numerical methods and a small model written in C.

Initially all I could get out of the test problem — starting a servo at position 0 with a constant torque applied — was a damped oscillation. I expected something of the kind at the start because the model actually assumes the servo is unloaded upto t=0, but then the torque is applied and the power turned on.

But there were no oscillations equivalent to the buzzing I can feel/hear from my loaded robo-doggies legs (or any other servo I twist while it’s told to stay still).

This is what I was seeing:

So what was I missing?

I added in a limiting torque for the servo motor itself. The model I was using assumed the reacting torque was just proportional to the difference between the actual position and desired position of the servo (I also realise this is not a linear relationship in real life — but we’re starting simple, right?).

That didn’t make any qualitative difference.

Next?

Well the servo can only detect differences down to 1-2 deg. Maybe if I quantize the difference between desired and measured positions, that might introduce some jitter?

Bingo!

This is what the model now does:

Ahhh. Constant oscillations after settling.

Knowling why they’re there doesn’t get me much closer to making them go away. But at least I have a model!