Keyboard Shortcuts
Likes
Search
For ATU-100 *NEW Algorithmes versus* !!Testers needed!! s#atu-100
#file-notice
Hello, people
Tom Court developed a new algorithm for us based on deep mathematic analyse you can find his job here? Also, as you can know, I wanted to implement more efficient algorithm from ATU-10 to ATU-100 Now you have? a great opportunity to compare both of them and choose what is better. The winner will be implemented to new firmware for ATU-100. Plese write your notices here. Thank you. |
Thanks for the build DF. ?This first algorithm is really a proof of concept of the GitHub project testing platform I created. ?The test platform allows easy testing of tuning algorithms and comparisons of their performance to another tuning algorithm or the best possible tuning.? The attached algorithm did perform better than yours in theory, but I believe a lot more improvement is still possible. Still worth trying seeing if theory meets practice.? BTW, some of my tuning for starting tuning depends on LC, vs CL. I think I¡¯ve got the simulation correct for relay settings correct for this but it might be nice if somebody doubles check. NOTE - The naming for the functions for the circuit simulation have been reversed from the python code (the code that draws the colored smith charts), because we are going in the opposite direction |
One possible reason is in the routine:
int testSwLC(char sw, char l, char c) {
? ?SW = sw;
? ?ind = l;
? ?cap = c;
? ?Relay_set(ind, cap, SW);
? ?Delay_ms(5);
? ?get_SWR();
? ?return SWR;
} The SW and sw variables are seen as the same.? Change the sw to swx and recompile.? What this bug does is swap SW to the other "side" incorrectly. |
Have you tried changing the code and recompiling? I had a similar issue but luckily I found the sw vs SW issue which the compiler does not flag.? Until I changed the sw variable to another name it was going through the tune, finding a reasonable SWR value but then stopping with the wrong SW side set.
I see that Tom has corrected the sw/SW code in his latest github release. |
A word of caution. One can find the fastest match or one can find the best match. I suspect the two are not the same. It is possible for a tuner to have multiple combinations of L and C where a low SWR is produced. However, only one of these solutions is likely to be the most efficient. K6JCA did a lot of work creating his own 500 watt tuner. In Part 9 of his 10-part article he discusses finding the best return loss (lowest SWR) while obtaining a reasonably efficient match. His entire article is a trove of information about how an antenna tuner should be designed. One part I found particularly interesting was the section on inductor and capacitor selection.
Fortunately he defines his search algorithm in detail. One of my (many) complaints about "free" software is that it is poorly documented. I'm not complaining, but it is unfortunate that the ATU firmware archive does not include documentation on how it works. A flow chart would be very useful in order to quickly see how the algorithm works. It's simply not possible to compare dozens of pages of programming code to easily see how two different systems work! Perhaps, someday, I'll sit down and struggle through the C code and convert it to an easy-to-understand specification. My main point is that the efficiency of the final match needs to be considered, otherwise we are probably best sticking with what seems to work reasonably well. One last point. Poor efficency means that the power is going somewhere, just not into the antenna. That usually means higher voltages and currents within the tuner which then dissipates energy in the form of hot components. 73, Chris, K9EQ |
I've developed an extensive test framework for comparing both how fast and how well algorithms perform using a simulated matching circuit. I've commented the code for my newest algorithm to some extent. It's actually fairly straightforward except for the derivations of the WAGs (wild a$$ guesses). You can see it and the framework at?
The algorithm in the extensive article from k6jca you mentioned is not much different than my last iteration (the one posted on the group previously). |
Hi, Tom
Your algorithm has the disadvantage of unconditional 73 point checks. This causes SWR goes to very large value and a TRX reduces a power to almost zero. If you wanna build really practically working algorithm you must resolve this problem. Only one tester tried your algorithm and in the most cases it works slower than original one. I see very little interest in new algorithms. I think the old one works well and users just don¡¯t need it. |
I was a little surprised when you put the code built code out there to try. The algorithm was really just a first iteration at it was only about 20% improved over the existing algorith. I've got a much improved algorithm (with regards to the hill climbing) currently checked in to github, its more at 70%s. I'm still working on a better method for locating the hills to start climbing (the initial 73 points), until thats done I'm not sure if it will be completely practical.
There is a bug somewhere in the 'battleship' mode that I can't quite pin down, so I'm not sure if I'm getting the best values to begin with. Despite that, in emulation it does quite well. But I still do want to get rid of a fixed table for starting points anyways. Was the report of the slower tuning something on this board or a private communication? I did see your reference to getting stuck tuning. Regarding the porting issue due to SW = sw being misinterpreted. I'm wondering if there are other porting issues with the target compiler if the actual performance doesn't seem to match the emulated performance. |
I converted my ATU100 firmware 3.2 to use Tom Court's latest algorithm that is available from??see tune2.c and tried it on my usually problematic doublet antenna.? It works a treat on my usual bands (40/60/80) and achieves a sub 1.25 tune in just a few seconds.? Certainly the best algorithm I have tried.
I understand this is work in progress and there is potentially better to come. This is science ()?being applied by a good software engineer, thanks Tom Court. In my view David N7DDC did a good job with the hardware design and this software will take it to the next stage! 73's David M0TGC ? |
Correct, there is only one "ideal" matching point. The problem is finding it. The article I referenced was for an L-type tuner. The article also had a design of a search algorithm which is worth, at least, looking at. It looks pretty well thought out. Unfortunately I can't determine if the existing algorithm is well thought out as it is not documented.
73, Chris, K9EQ |
¿ªÔÆÌåÓýIs the Github code pointed to for the ATU-100 or ATU-10? Seems to be? a conflict here, nATU-100
in the post and ATU-10 at Github. glenn |
¿ªÔÆÌåÓýCould be either.? I used the code in tune2.c to replace the tune() routine in the ATU100 3.2 firmware
On 20/02/2024 21:58, Glenn via
groups.io wrote:
|
Chris, my tuning algorithm isn¡¯t too different than the article you referenced, but I think you will find that the tuning algorithm in the article results in a lot more switches to find a solution. ?It is certainly thorough, but without a way to re-use tunes by frequency matching, it might not be an ideal trade off.
|
Hi, |
Just been looking at the tune2.c, and seen the LRU list.
While looking at the LDG and MFJ relay patterns I see several repeats, given that the code tracks the best found so far, there seems no point in testing something that's already been tried. For the 7x7 + SW it's 15-bits = 32K combinations, but using 1 bit per (instead of a list that needs searching) that's 4K Bytes (so too much for the internal RAM). |