×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Internal autoguide in EKOS makes thins worse

  • Posts: 9
  • Thank you received: 1
I played around with "Control Parameters"/"Proportional Gain" and, indeed, it makes auto-guiding work as intended. It isn't yet perfect, but there are other factors at play (my guiding hardware is DIY and needs improvement). Anyway, on a longer exposure I can already see the difference.

Many thanks to all of you, guys, for your help !

By the way, never heard about proportional gain before. Is there any documentation that explains what it does ?
4 years 1 month ago #50209

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 26
The autoguider control loop consists of a measurement (the image from the guide scope) and an actuator (the mount that responds to guide pulses) and the controller (Kstars). The autoguider measures the position of a guide star, knows where it should be and based on the difference between the two (the error), sends a signal to the mount to correct this. How large this signal will be, is dependent on a few gain settings.

Proportional, Integral and Derivative (PID) are the gain factors that are used in the commonly used PID control loop.
See:
en.m.wikipedia.org/wiki/PID_controller

The stability of the control loop is strongly dependent on these gain settings. It's easy to get it wrong. The settings are a bit of a trade-off between stability, fast settling time and remaining error.
Last edit: 4 years 1 month ago by Bart. Reason: forgot controller in control loop.
4 years 1 month ago #50211

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 26
...Which makes me think now:
Would it be interesting if there is a PID self-learning button? I wouldn't mind spending some time developing/ implementing a autotuning alghorithm if there is interest (Jasem?).
4 years 1 month ago #50212

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 182
That would cool! I could definitely use that.

Jo
4 years 1 month ago #50215

Please Log in or Create an account to join the conversation.

  • Posts: 133
  • Thank you received: 33
I'm interested! That would be great.
4 years 1 month ago #50216

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 1
The following user(s) said Thank You: Jeff Voight
Last edit: 4 years 1 month ago by Raul Chirea.
4 years 1 month ago #50238

Please Log in or Create an account to join the conversation.


Hi Bart,

That would be totally *epic* if you can get this to automatically adjust itself somehow? Maybe some machine learning (hey, it's the hype these days!) or another general purpose method? Btw, for now, I don't think the integral gain has any effect, it's not used in the code itself. So the PID controls themselves need quite a bit of work. The proportional gain is there but IIRC, the integral or derivative gains are not used at all. Please let me know if you have any questions on this!
4 years 1 month ago #50239

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 26
No need for machine learning. PID loops are in existence for ages and so are tuning methods (for example the Ziegler and Nichols method). I found a few papers on more efficient auto-tuning algorithm that are interesting to try out. I'll PM later.
4 years 1 month ago #50243

Please Log in or Create an account to join the conversation.

  • Posts: 126
  • Thank you received: 16
PID control loops can start oscillating if the parameters aren't set properly. You wouldn't want that to happen to your mount. That's why derivative gain in lin_guider wasn't used. But if I remember correctly, integrating gain is used.
4 years 1 month ago #50310

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 1
I'm a bit puzzled. As far as I can understand from the wikipedia page the integrative gain amplifies the oscillations and the derivative gain is the one that is smoothing the oscillations. Am I getting this wrong ?

Take a look at this: en.wikipedia.org/wiki/PID_controller#/me...nsation_Animated.gif
4 years 1 month ago #50349

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 182

"The proportional gain is there but IIRC, the integral or derivative gains are not used at all."

That hurts!

After all the hours I have spent fine-tuning integral and derivative gain and convincing myself on how important they are...

Crushed!!!

:-(((
4 years 1 month ago #50368

Please Log in or Create an account to join the conversation.

  • Posts: 1222
  • Thank you received: 565
Jo,

Don't dispair, there's hope! Though I have no clue as to how the internal guider works, your comment at least got me to search the source.
If you look at kstars/ekos/guide/internalguide/gmath.cpp at the method process_axes(), you can find the following lines:

// process axes...
for (int k = GUIDE_RA; k <= GUIDE_DEC; k++)
{
...
qCDebug(KSTARS_EKOS_GUIDE) << "delta [" << k << "]= " << out_params.delta[k];
qCDebug(KSTARS_EKOS_GUIDE) << "drift_integral[" << k << "]= " << drift_integral[k];

out_params.pulse_length[k] =
fabs(out_params.delta[k] * in_params.proportional_gain[k] + drift_integral[k] * in_params.integral_gain[k]);
out_params.pulse_length[k] = out_params.pulse_length[k] <= in_params.max_pulse_length[k] ?
out_params.pulse_length[k] :
in_params.max_pulse_length[k];

qCDebug(KSTARS_EKOS_GUIDE) << "pulse_length [" << k << "]= " << out_params.pulse_length[k];

and process_axes() seems to be called by perform_processing()

So, I can't be sure, but it seems to me that at least the proportional and integral gains are both used to compute the pulse length in the internal guider (no so much the derivative gain).
Turn out debug logging for the internal guider and look in your log for that "delta", "drift_integral" and "pulse_length" log line, and if you find them, this is probably the case.

Hy
The following user(s) said Thank You: Jose Corazon
4 years 1 month ago #50369

Please Log in or Create an account to join the conversation.

Time to create page: 0.619 seconds