My idea was to just add a check-mark for a fixed backlash of 100 or better 10% of the default range 1000. Too many settings could be confusing. If the focuser can cope with 100 it can cope with any backlash.
Also an up/down or forward/backward arrow for direction. Detecting of the direction has to based on the delta focuser position.
Han
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was thinking it could just be as simple as the user setting the number of backlash steps.So:
0 = no backlash,
100 = 100 steps of backlash.
There are two reasons why is helpful for it to be specific, if your are:
1. using a process to measure the backlash
2. testing whether a backlash compensation process is working
In both cases its useful to know exactly what the backlash steps are.
The reason it's best of it's user settable, is because I can't see how scale any of tge usual focusing parameters to get a universal factor.
For example n my real setup my:
Full focuser range is 43,500 steps
Best Focus point is about 27,500
Backlash is about 83
But for a friends its:
Full focuser range is 1000 steps
Best Focus point is about 550
Backlash is about 5
What do you think?
Cheers, Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Brilliant! Thanks. I have bee testing with APT and as as far as I can tell Sky Sim is doing what I expect. I think it has shown up an issue with APT backlash detection, but that is what I wanted it for. :-)
There is one thing I don't understand... for some reason with a sky sim backlash of 100, an APT Auto Focuser Aid run run shows the same HFD reading over 200 steps. Suggesting a backlash of 200. However, the rest of the curve gives the expected result of backlash of 100 (see: test 135 apt.jpg).
Similarly, with a sky sim backlash of 100 and an APT backlash set at 100, the first 100 steps are the same HFD (see: test 137 apt - apt backlash set.jpg ), but again the curve produces the correct result (i.e. no backlash)
The curves look much better then in December. Was APT updated?
The backlash 100 meant initially for me that the real position can run 100 steps behind the focus indication in both directions. That means it can move 200 steps total so 100 up and 100 down. So like plate with a hole of 200 long and a pin in the hole pulling it. When the pin is in the middle the backlash is zero.
Maybe it should be called then backlash 200 since the clearance is 200 peak to peak.
I will change it.
Cheers, Han
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well APT us going through a major change with the introduction of a completely new Auto Gicus routine. So a lot is happening in this area. Also turning of SkySim's annotations made a big difference too.
I think focusing algorithms give me more of a headache than astro calculations!
100 step backlash means to me: if you move inward more than 100 steps (i.e. clear any backlash) then move outward 1 step at a time, the hfd won't change until you have taken 101 steps. If you now move inward 1 step at a time, the hfd won't change until you have 101 steps.
Is that the same thing?
Cheers, Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have uploaded a version 0.1.23a which divides the entered factor by two. Then it should behave as you expected. :) But if the clearance is 100 steps, the error is maximum 50 both ways.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't find v0.1.23a. The ASCOM page only seems to have v0.1.23
(https://sourceforge.net/projects/sky-simulator/files/program/)
"But if the clearance is 100 steps, the error is maximum 50 both ways" - this is what makes my head hurt!
So if the backlash is set to 100, and you are starting in position where the full backlash needs taking up, then: the HFD wont change for 100 steps the offset of the best focus point will be 100 steps more than where it would be with no backlash.
* This will be true in both outward and inward directions
Or am I completely confused?
Cheers, Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Jim, I haven't changed the installer file name. Just download
0.1.2. In the program, you will see 0.123a.
If you set it at 100, the focuser is 100 steps loose but halfway it is
perfect. So if the motor is fixed, you could pull/ push the focuser 100
steps peak to peak. Then it can run 50 steps behind to 50 step before.
Cheers, Han
On 31/01/2021 10:24, Jim Hunt wrote:
Hi Han,
I can't find v0.1.23a. The ASCOM page only seems to have v0.1.23
(https://sourceforge.net/projects/sky-simulator/files/program/)
"But if the clearance is 100 steps, the error is maximum 50 both ways"
- this is what makes my head hurt!
So if the backlash is set to 100, and you are starting in position
where the full backlash needs taking up, then:
/the HFD wont change for 100 steps
/ the offset of the best focus point will be 100 steps more than where
it would be with no backlash.
* This will be true in both outward and inward directions
Assume a loose minute indicator of a clock:
A clock where the minute indicator can move 10 minutes up down is max 5
minute late or before.
So at time 12:05 hours, it will jump/turn from indicating 12:00 to
12:10, so 10 minutes
That's the best analogy I've come across. When you explain it this way, it makes it so simple!
It also helps me ( think) to see the difference of the way I see backlash and the way you do. Well possibly.
So I think the way you see it is, the amount of the backlash (10mins) is always expressed about the centre point of the backlash (12:05)?
The way I see it is the backlash (10mins) is always expressed at the end point of the backlash. So my example would be:
Assume a clock with a very worn motor gear. The motor can turn the gears, but the weight of hands is not enough to turn them.
So, with the clock turning clockwise, the minute indicator can always be up to 10min late, but never early.
So at 11:55 hours, it will show 11:45, so 10 minutes late. At 12:15 it will show 12:05, again 10m late.
If the clock happened to run backwards (anti-clockwise), then the clock will always show 10mi early. So at 12:05, the clock would show 12:15, now 10 min early. At 11:45 it will show 11:55.
This requires a "backlash" setting of 10min to fix.
This is the way the Pegasus Focuser driver and APT both work. In the Pegasus driver I enter a backlash of 83. This clears the backlash, by adding adding 83 steps to whenever the motor first reverses direction.
Part of a possible confusion is that the correction parameter gets called "backlash", but it should really be called "backlash comoensation". The gears have the "backlash", the "backlash compensation" compensates for it.
Does that all make sense?
So as far as I can see 0.1.23a doesn't fix the problem. Sorry.
Cheers, Jim
Last edit: Jim Hunt 2021-01-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Assume a clock with a very worn motor gear. The motor can turn the gears, but the weight of hands is not enough to turn them.
So, with the clock turning clockwise, the minute indicator can always be up to 10min late, but never early.
So at 11:55 hours, it will show 11:45, so 10 minutes late. At 12:15 it will show 12:05, again 10m late.
That is possible if there is friction. But with only a little friction after indicating 12:00 hours gravity will pull the indicator down and it will drop forward soon after indicating 12:00 hours.
If the clock happened to run backwards (anti-clockwise), then the clock will always show 10mi early. So at 12:05, the clock would show 12:15, now 10 min early. At 11:45 it will show 11:55.
This requires a "backlash" setting of 10min to fix.
The setting required should be 20 minutes and the backlash will be 20 minutes. By hand you can move the indicator 20 minutes. From 10 minutes before the actual time and 10 minutes after the actual time.
This is the way the Pegasus Focuser driver and APT both work. In the Pegasus driver I enter a backlash of 83. This clears the backlash, by adding adding 83 steps to whenever the motor first reverses direction.
I can not comment on that but assume you make of iron wire a pendulum-swing. You can pull push it with the blue circle. The blue circle and the swing are maximum 50 positions different. But by hand I can move the wing from -50 to +50 so 100 steps from left to right and backwards. So by moving it by hand, my conclusion would be that the backlash is 100.
This is from Wikipedia:
In a gear train, backlash is cumulative. When a gear-train is reversed the driving gear is turned a short distance, equal to the total of all the backlashes, before the final driven gear begins to rotate.
So for a backlash of 100, after a reverse it takes 100 steps before the focuser moves again. Since it is symmetrical, this 100 can be interpreted as 50 steps behind or 50 steps before.
Thanks for your patience. :-)
I think we are basically saying the same thing :-)
But this is the bit I don't understand...
Test 1
Sky Sim is set for best focus at 25000. Each focusing move is 50 steps
The first image (test1.jpg) shows a focus run with a sky sim backlash of 0.
The run starts at position 24700 and HFD of 11.19.
The best focus is identified as at position 25000, with an HFD of 5.92.
It takes 6 moves * 50 = 300 steps to reach best focus.
The positions and values are for this curve are:
Positions: { 24700 24750 24800 24850 24900 24950 25000 25050 25100 25150 25200 25250 }
Values: { 11.19 10.3 9.32 7.99 6.9 5.9 5.84 5.92 6.84 7.98 9.13 10.27 }
Test 2
The 2nd image (test2.jpg) is using v0.1.23 and shows a focus run with a sky sim backlash of 100.
The run starts at position 2700 and HFD 9.03.
In test 1 the HFD at 24700 was 11.19. Why should the HFD be different at the same location? I made sure the inbound backlash was removed, so "physically" 24700 is the same location for both test 1 and 2.
The Best Focus point is at identified as 25100 and an HFD of 5.74. You would expect 25100 because an extra 100 steps are required to take up the backlash.
It takes 4 points (3 red and 1 blue) to clear the backlash. That is 4 moves * 50 = 200 steps. So this indicates the backlash is 200 steps, which is unexpected.
It takes 4 moves x 50 = 200 steps to reach best focus, so the rate of change of the focusing has changed from 300 steps to 200 steps. Why?
The positions and values are for this curve are:
Positions: { 24700 24750 24800 24850 24900 24950 25000 25050 25100 25150 25200 25250 }
Values: { 9.02 9.01 9.04 9.02 9.01 7.76 6.72 6.06 5.74 6.08 6.75 7.74 }
Test 3
The 2nd image (test3.jpg) is using v0.1.23a and shows a focus run with a sky sim backlash of 100.
The run starts at position 2700 and HFD 10.33.
In test 1 the HFD at 24700 was 11.19. Why should the HFD be different at the same location? I made sure the inbound backlash was removed, so "physically" 24700 is the same location for both test 1 and 2.
The Best Focus point is at identified as 25050 and an HFD of 5.69. Why 25050. This doesn't make any sense to me, if the backlash is 100.
It takes 2 points to clear the backlash. That is 2 moves * 50 = 100 steps. So this indicates the backlash is 100 steps as expected.
It takes 5 moves x 50 = 250 steps to reach best focus, so the rate of change of the focusing has changed from 300 steps to 250 steps. Why?
What I would expect
A focus run with a sky sim backlash of 100.
The run starts at position 2700 and HFD 11.19.
In test 1 the HFD at 24700 was 11.19. So the HFD should be the same? Especially if I make sure the inbound backlash was removed, so "physically" 24700 is the same location as test 1.
The Best Focus point is at identified as 25100 and an HFD of about 5.69. You would expect 25100 because an extra 100 steps are required to take up the backlash.
It takes 2 points to clear the backlash. That is 2 moves * 50 = 100 steps. So this indicates the backlash is 100 steps as expected.
It takes 8 moves * 50 = 2 to clear backlash + 6 to to reach best focus = 400 steps to reach best focus.
That is... all the backlash does is increase all position readings, of a test with 0 backlash, 100 steps to the right. Nothing else should change.
At least all are in focus and curves are excellent.
For v0.1.23, the backlash of 100 is like 200.
For v0.1.23a the backlash of 100 is 100.
Take the v0.123a, set backlash at 100. Depending on the direction you will find focus at 25050 or 24950.
To move 1 step backwards you have to move 100+1 backwards. (After 100 the backlash in compensated)
To move 200 step backwards you have to move 100+200 backward
To move 0 step backwards you have to move 100+0 backwards
Since backlash is not well defined (is it 90 or 110?) you can not move 1 step backward reliable. You should move only one way from the beginning or end of the range. The direction should be depending on the type of telescope. For reflectors (Newton) you have to move focuser OUT since they shrink when it gets later and colder. For refractors you have to move focuser IN since the refraction factor of lenses changes that way when it gets colder.
Cheers, Han
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been thinking about this all night and I think I can now describe the problem (I hope!).
The problem is not to do with the definition of backlash. Rather it's to do with the effect after the backlash has been cleared. In every system, once the backlash is cleared, the relationship between between input and output is constant and is the same as if there had been no backlash (except for the constant backlash offset). This holds true as long as the direction of input is not changed.
So to use your clock analogy...
A clock is running 5 minutes fast and the minute hand is a 10 mins past the hour, instead of 5 mins. There is a knob that when turned 300 times moves the minute hand 5 mins. (Test 1.jpg)
When you turn the knob, you find that you have to turn it 200 times before the hands start to move. Of course, you still have to turn the knob 300 times to move the knob the 5 mins. So the total number of turns required, to move the minute hand 5 mins, is 200 + 300 = 500. However, your v0.1.23 code says you only have to turn it 200 + 200 = 400 times (Test 2.jpg). This is clearly wrong.
You have the same problem with another clock, only this time you have to turn the knob 100 times before the minute hand moves. Of course, you still have to turn the knob 300 times to move the knob the 5 mins. So the total number of turns required, to move the minute hand 5 mins, is 100 + 300 = 400. However, your v0.1.23a code says you only have to turn it 100 + 250 = 350 times (Test 3.jpg). Again, this is also clearly wrong.
In both instances, after the backlash has been cleared, you have changed the relationship of the input to the output (300 to 200 and 300 to 250). But the relationship between input and output, after the backlash is cleared is fixed. So, there is no way this can happen.
At the beginning you mentioned implementing Hysteresis. Is it possible you have applied it twice. Once on the overall movement to introduce the initial backlash and once on the movement after the backlash has been cleared. If so, this may be the source of the problem as the 2nd Hysteresis should not be applied.
I hope that explains it?
Thanks, Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
At the moment it still looks good to me but I could oversee something. To test it I had to disable the backlash compensation in CCdCiel.
I have now added both the focuser indication and the real focuser position in the display. I have created a logger which write to a log file simulator_log.txt at your documents folder. It writes the log as below. Delete the file to have clean start. I improved the code a little. See file 0.1.23b...
Indicate in the log file where it goes wrong. The values could be imported in a spreadsheet and a graph could be created.
Cheers, Han
simulator_log.txt (Actual should be called real position):
I'll try an testcas soon as I can. would it be possible to date/time stamp the logfile? It would juse help identify separate test runs.
So do you agree with my comment "In every system, once the backlash is cleared, the relationship between between input and output is constant and is the same as if there had been no backlash (except for the constant backlash offset). This holds true as long as the direction of input is not changed." which is the cornerstone of my assumption.
Cheers, Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just a quick addition... you also need to log the HFD of the image, as this is the y axis. And of course, you can only tell when the best focus has been reached using the HFD. The focus position will not be at the SKy Sim Best Focus position because of the backlash.
Cheers, Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The HFD is calculated from the real_position. The real position is in the log file and that is the X axis . From the real_position, the hyperbole is calculated so that is the Y axis. You could draw a parabola instead of the hyperbola by something like sqr((real_position - 25000)/100?)
Han
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Han,
Ivo and I have been using your sim extensively whilst testing APT's new focusing aid. It has been brilliant!
Would it be possible to implement a Focusing Backlash into the sim?
Cheers, Jim
Hysteresis will be easy to implement. But before that, do you get always the correct focus result at around 25000 or the value you have set?
Hi Han,
Yes, within a few steps.🙂
Could tge backlash be a user settable option?
Cheers, Jim
My idea was to just add a check-mark for a fixed backlash of 100 or better 10% of the default range 1000. Too many settings could be confusing. If the focuser can cope with 100 it can cope with any backlash.
Also an up/down or forward/backward arrow for direction. Detecting of the direction has to based on the delta focuser position.
Han
Hi Han,
I was thinking it could just be as simple as the user setting the number of backlash steps.So:
0 = no backlash,
100 = 100 steps of backlash.
There are two reasons why is helpful for it to be specific, if your are:
1. using a process to measure the backlash
2. testing whether a backlash compensation process is working
In both cases its useful to know exactly what the backlash steps are.
The reason it's best of it's user settable, is because I can't see how scale any of tge usual focusing parameters to get a universal factor.
For example n my real setup my:
Full focuser range is 43,500 steps
Best Focus point is about 27,500
Backlash is about 83
But for a friends its:
Full focuser range is 1000 steps
Best Focus point is about 550
Backlash is about 5
What do you think?
Cheers, Jim
Try version 0.1.23 just uploaded.
Cheers, Han
Hi Han,
Brilliant! Thanks. I have bee testing with APT and as as far as I can tell Sky Sim is doing what I expect. I think it has shown up an issue with APT backlash detection, but that is what I wanted it for. :-)
There is one thing I don't understand... for some reason with a sky sim backlash of 100, an APT Auto Focuser Aid run run shows the same HFD reading over 200 steps. Suggesting a backlash of 200. However, the rest of the curve gives the expected result of backlash of 100 (see: test 135 apt.jpg).
Similarly, with a sky sim backlash of 100 and an APT backlash set at 100, the first 100 steps are the same HFD (see: test 137 apt - apt backlash set.jpg ), but again the curve produces the correct result (i.e. no backlash)
Any thoughts as to why?
Thanks, Jim
Last edit: Jim Hunt 2021-01-30
Hello Jim,
The curves look much better then in December. Was APT updated?
The backlash 100 meant initially for me that the real position can run 100 steps behind the focus indication in both directions. That means it can move 200 steps total so 100 up and 100 down. So like plate with a hole of 200 long and a pin in the hole pulling it. When the pin is in the middle the backlash is zero.
Maybe it should be called then backlash 200 since the clearance is 200 peak to peak.
I will change it.
Cheers, Han
Hi Han,
Well APT us going through a major change with the introduction of a completely new Auto Gicus routine. So a lot is happening in this area. Also turning of SkySim's annotations made a big difference too.
I think focusing algorithms give me more of a headache than astro calculations!
100 step backlash means to me: if you move inward more than 100 steps (i.e. clear any backlash) then move outward 1 step at a time, the hfd won't change until you have taken 101 steps. If you now move inward 1 step at a time, the hfd won't change until you have 101 steps.
Is that the same thing?
Cheers, Jim
I have uploaded a version 0.1.23a which divides the entered factor by two. Then it should behave as you expected. :) But if the clearance is 100 steps, the error is maximum 50 both ways.
Hi Han,
You are a star! :-)
I'll try and test it tomorrow and report back.
Thanks, Jim
Hi Han,
I can't find v0.1.23a. The ASCOM page only seems to have v0.1.23
(https://sourceforge.net/projects/sky-simulator/files/program/)
"But if the clearance is 100 steps, the error is maximum 50 both ways" - this is what makes my head hurt!
So if the backlash is set to 100, and you are starting in position where the full backlash needs taking up, then:
the HFD wont change for 100 steps
the offset of the best focus point will be 100 steps more than where it would be with no backlash.
* This will be true in both outward and inward directions
Or am I completely confused?
Cheers, Jim
Yes this can be confusing
Assume a loose minute indicator of a clock:
A clock where the minute indicator can move 10 minutes up down is max 5
minute late or before.
So at time 12:05 hours, it will jump/turn from indicating 12:00 to
12:10, so 10 minutes
Han
Last edit: han.k 2021-01-31
Hello Jim, I haven't changed the installer file name. Just download
0.1.2. In the program, you will see 0.123a.
If you set it at 100, the focuser is 100 steps loose but halfway it is
perfect. So if the motor is fixed, you could pull/ push the focuser 100
steps peak to peak. Then it can run 50 steps behind to 50 step before.
Cheers, Han
On 31/01/2021 10:24, Jim Hunt wrote:
Hi Han,
That's the best analogy I've come across. When you explain it this way, it makes it so simple!
It also helps me ( think) to see the difference of the way I see backlash and the way you do. Well possibly.
So I think the way you see it is, the amount of the backlash (10mins) is always expressed about the centre point of the backlash (12:05)?
The way I see it is the backlash (10mins) is always expressed at the end point of the backlash. So my example would be:
Assume a clock with a very worn motor gear. The motor can turn the gears, but the weight of hands is not enough to turn them.
So, with the clock turning clockwise, the minute indicator can always be up to 10min late, but never early.
So at 11:55 hours, it will show 11:45, so 10 minutes late. At 12:15 it will show 12:05, again 10m late.
If the clock happened to run backwards (anti-clockwise), then the clock will always show 10mi early. So at 12:05, the clock would show 12:15, now 10 min early. At 11:45 it will show 11:55.
This requires a "backlash" setting of 10min to fix.
This is the way the Pegasus Focuser driver and APT both work. In the Pegasus driver I enter a backlash of 83. This clears the backlash, by adding adding 83 steps to whenever the motor first reverses direction.
Part of a possible confusion is that the correction parameter gets called "backlash", but it should really be called "backlash comoensation". The gears have the "backlash", the "backlash compensation" compensates for it.
Does that all make sense?
So as far as I can see 0.1.23a doesn't fix the problem. Sorry.
Cheers, Jim
Last edit: Jim Hunt 2021-01-31
That is possible if there is friction. But with only a little friction after indicating 12:00 hours gravity will pull the indicator down and it will drop forward soon after indicating 12:00 hours.
The setting required should be 20 minutes and the backlash will be 20 minutes. By hand you can move the indicator 20 minutes. From 10 minutes before the actual time and 10 minutes after the actual time.
I can not comment on that but assume you make of iron wire a pendulum-swing. You can pull push it with the blue circle. The blue circle and the swing are maximum 50 positions different. But by hand I can move the wing from -50 to +50 so 100 steps from left to right and backwards. So by moving it by hand, my conclusion would be that the backlash is 100.
This is from Wikipedia:
So for a backlash of 100, after a reverse it takes 100 steps before the focuser moves again. Since it is symmetrical, this 100 can be interpreted as 50 steps behind or 50 steps before.
Cheers, Han
Hi Han,
Thanks for your patience. :-)
I think we are basically saying the same thing :-)
But this is the bit I don't understand...
Test 1
Sky Sim is set for best focus at 25000. Each focusing move is 50 steps
The first image (test1.jpg) shows a focus run with a sky sim backlash of 0.
The run starts at position 24700 and HFD of 11.19.
The best focus is identified as at position 25000, with an HFD of 5.92.
It takes 6 moves * 50 = 300 steps to reach best focus.
The positions and values are for this curve are:
Positions: { 24700 24750 24800 24850 24900 24950 25000 25050 25100 25150 25200 25250 }
Values: { 11.19 10.3 9.32 7.99 6.9 5.9 5.84 5.92 6.84 7.98 9.13 10.27 }
Test 2
The 2nd image (test2.jpg) is using v0.1.23 and shows a focus run with a sky sim backlash of 100.
The run starts at position 2700 and HFD 9.03.
In test 1 the HFD at 24700 was 11.19. Why should the HFD be different at the same location? I made sure the inbound backlash was removed, so "physically" 24700 is the same location for both test 1 and 2.
The Best Focus point is at identified as 25100 and an HFD of 5.74. You would expect 25100 because an extra 100 steps are required to take up the backlash.
It takes 4 points (3 red and 1 blue) to clear the backlash. That is 4 moves * 50 = 200 steps. So this indicates the backlash is 200 steps, which is unexpected.
It takes 4 moves x 50 = 200 steps to reach best focus, so the rate of change of the focusing has changed from 300 steps to 200 steps. Why?
The positions and values are for this curve are:
Positions: { 24700 24750 24800 24850 24900 24950 25000 25050 25100 25150 25200 25250 }
Values: { 9.02 9.01 9.04 9.02 9.01 7.76 6.72 6.06 5.74 6.08 6.75 7.74 }
Test 3
The 2nd image (test3.jpg) is using v0.1.23a and shows a focus run with a sky sim backlash of 100.
The run starts at position 2700 and HFD 10.33.
In test 1 the HFD at 24700 was 11.19. Why should the HFD be different at the same location? I made sure the inbound backlash was removed, so "physically" 24700 is the same location for both test 1 and 2.
The Best Focus point is at identified as 25050 and an HFD of 5.69. Why 25050. This doesn't make any sense to me, if the backlash is 100.
It takes 2 points to clear the backlash. That is 2 moves * 50 = 100 steps. So this indicates the backlash is 100 steps as expected.
It takes 5 moves x 50 = 250 steps to reach best focus, so the rate of change of the focusing has changed from 300 steps to 250 steps. Why?
Positions: { 24700 24750 24800 24850 24900 24950 25000 25050 25100 25150 25200 25250 }
Values: { 10.33 10.32 10.36 9.32 7.99 6.92 5.99 5.69 5.97 6.83 7.96 9.13 }
What I would expect
A focus run with a sky sim backlash of 100.
The run starts at position 2700 and HFD 11.19.
In test 1 the HFD at 24700 was 11.19. So the HFD should be the same? Especially if I make sure the inbound backlash was removed, so "physically" 24700 is the same location as test 1.
The Best Focus point is at identified as 25100 and an HFD of about 5.69. You would expect 25100 because an extra 100 steps are required to take up the backlash.
It takes 2 points to clear the backlash. That is 2 moves * 50 = 100 steps. So this indicates the backlash is 100 steps as expected.
It takes 8 moves * 50 = 2 to clear backlash + 6 to to reach best focus = 400 steps to reach best focus.
That is... all the backlash does is increase all position readings, of a test with 0 backlash, 100 steps to the right. Nothing else should change.
Cheers, Jim
Last edit: Jim Hunt 2021-01-31
Hello Jim,
At least all are in focus and curves are excellent.
For v0.1.23, the backlash of 100 is like 200.
For v0.1.23a the backlash of 100 is 100.
Take the v0.123a, set backlash at 100. Depending on the direction you will find focus at 25050 or 24950.
To move 1 step backwards you have to move 100+1 backwards. (After 100 the backlash in compensated)
To move 200 step backwards you have to move 100+200 backward
To move 0 step backwards you have to move 100+0 backwards
Since backlash is not well defined (is it 90 or 110?) you can not move 1 step backward reliable. You should move only one way from the beginning or end of the range. The direction should be depending on the type of telescope. For reflectors (Newton) you have to move focuser OUT since they shrink when it gets later and colder. For refractors you have to move focuser IN since the refraction factor of lenses changes that way when it gets colder.
Cheers, Han
Hi Han,
I've been thinking about this all night and I think I can now describe the problem (I hope!).
The problem is not to do with the definition of backlash. Rather it's to do with the effect after the backlash has been cleared. In every system, once the backlash is cleared, the relationship between between input and output is constant and is the same as if there had been no backlash (except for the constant backlash offset). This holds true as long as the direction of input is not changed.
So to use your clock analogy...
A clock is running 5 minutes fast and the minute hand is a 10 mins past the hour, instead of 5 mins. There is a knob that when turned 300 times moves the minute hand 5 mins. (Test 1.jpg)
When you turn the knob, you find that you have to turn it 200 times before the hands start to move. Of course, you still have to turn the knob 300 times to move the knob the 5 mins. So the total number of turns required, to move the minute hand 5 mins, is 200 + 300 = 500. However, your v0.1.23 code says you only have to turn it 200 + 200 = 400 times (Test 2.jpg). This is clearly wrong.
You have the same problem with another clock, only this time you have to turn the knob 100 times before the minute hand moves. Of course, you still have to turn the knob 300 times to move the knob the 5 mins. So the total number of turns required, to move the minute hand 5 mins, is 100 + 300 = 400. However, your v0.1.23a code says you only have to turn it 100 + 250 = 350 times (Test 3.jpg). Again, this is also clearly wrong.
In both instances, after the backlash has been cleared, you have changed the relationship of the input to the output (300 to 200 and 300 to 250). But the relationship between input and output, after the backlash is cleared is fixed. So, there is no way this can happen.
At the beginning you mentioned implementing Hysteresis. Is it possible you have applied it twice. Once on the overall movement to introduce the initial backlash and once on the movement after the backlash has been cleared. If so, this may be the source of the problem as the 2nd Hysteresis should not be applied.
I hope that explains it?
Thanks, Jim
Hello Jim,
I will display some more variables in the display and run the simulation to understand the behavior in more detail. :)
Hello Jim,
At the moment it still looks good to me but I could oversee something. To test it I had to disable the backlash compensation in CCdCiel.
I have now added both the focuser indication and the real focuser position in the display. I have created a logger which write to a log file simulator_log.txt at your documents folder. It writes the log as below. Delete the file to have clean start. I improved the code a little. See file 0.1.23b...
Indicate in the log file where it goes wrong. The values could be imported in a spreadsheet and a graph could be created.
Cheers, Han
simulator_log.txt (Actual should be called real position):
Indication,24948, actual,24998
Indication,25448, actual,25398
Indication,25348, actual,25398
Indication,25248, actual,25298
Indication,25148, actual,25198
Indication,25048, actual,25098
Indication,24948, actual,24998
Indication,24848, actual,24898
Indication,24748, actual,24798
Indication,24648, actual,24698
Indication,24548, actual,24598
Indication,24448, actual,24498
Indication,24948, actual,24898
Indication,25049, actual,24999
Indication,24949, actual,24999
Indication,25449, actual,25399
Indication,25349, actual,25399
Indication,25349, actual,25299
Last edit: han.k 2021-02-01
Hi Han,
Thank you 🙂
I'll try an testcas soon as I can. would it be possible to date/time stamp the logfile? It would juse help identify separate test runs.
So do you agree with my comment "In every system, once the backlash is cleared, the relationship between between input and output is constant and is the same as if there had been no backlash (except for the constant backlash offset). This holds true as long as the direction of input is not changed." which is the cornerstone of my assumption.
Cheers, Jim
Hi Han,
Just a quick addition... you also need to log the HFD of the image, as this is the y axis. And of course, you can only tell when the best focus has been reached using the HFD. The focus position will not be at the SKy Sim Best Focus position because of the backlash.
Cheers, Jim
Yes your statement is correct.
I have added the date and time. The file is called 0.1.23c The program is still indicating 0.1.23b
I will wait for your investigation results. :) The log I will remove in the final version. No need to keep it.
Hello Jim,
The HFD is calculated from the real_position. The real position is in the log file and that is the X axis . From the real_position, the hyperbole is calculated so that is the Y axis. You could draw a parabola instead of the hyperbola by something like sqr((real_position - 25000)/100?)
Han