Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

USB headsets to digital audio workstation software...
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Thu Sep 30, 2021 4:34 pm

This is with 21k6
I'm using FLDigi's FMT mode to track my GPS to see the practical effect of these settings.
#1 One problem is the Buffer Size and Buffer Latency checkboxes are not being saved so have to change them on every restart of Thetis.
#2 Takes about 3 minutes to get close to where it should be...seems this could be faster so maybe the slew rate can be increased. I'll experiment
#3 I'm seeing a couple of transients which you can seen in the FLDigi data -- they coincide with a jump in the plot in Thetis. I'll have to capture one of those.
#4 Since I turned of Window buffer cache flushing I've had virtually no dropouts and been able to drop buffer size to 64.
Attachments
Screenshot 2021-09-30 112232.png
Screenshot 2021-09-30 112232.png (31.11 KiB) Viewed 43015 times
Screenshot 2021-09-30 112151.png
Screenshot 2021-09-30 112151.png (55.57 KiB) Viewed 43015 times
Screenshot 2021-09-30 111942.png
Screenshot 2021-09-30 111942.png (22.39 KiB) Viewed 43015 times
Mike W9MDB
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Thu Sep 30, 2021 4:45 pm

Caught one of the transients
Looks kind of like a bit flip from negative to positive
This was about 3 minutes after startup.
Attachments
Screenshot 2021-09-30 114418.png
Screenshot 2021-09-30 114418.png (10.89 KiB) Viewed 43012 times
Mike W9MDB
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Thu Sep 30, 2021 9:15 pm

Bumping up the FF Alpha to 0.02 got rid of the big transients. But long-term stability is not too good. Switching back for Force for now and will show how stable it is there.
Attachments
Screenshot 2021-09-30 161150.png
Screenshot 2021-09-30 161150.png (39.13 KiB) Viewed 42993 times
Screenshot 2021-09-30 122018.png
Screenshot 2021-09-30 122018.png (22.27 KiB) Viewed 42993 times
Mike W9MDB
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Thu Sep 30, 2021 9:45 pm

30 minutes with Force checked shows how stable things can be. Just one small burp of around 50mHz accuracy for some reason.
So the drift in the resampler needs to be looked at. Could this just be accumulated error? With 15 significant digits is there some scale difference in the resampler that may be hitting the 15-digit precision?
Attachments
Screenshot 2021-09-30 164022.png
Screenshot 2021-09-30 164022.png (39.41 KiB) Viewed 42992 times
Mike W9MDB
User avatar
ramdor
Posts: 1468
Joined: Wed Jul 03, 2019 3:07 pm
Contact:

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby ramdor » Thu Sep 30, 2021 10:43 pm

w9mdb wrote:This is with 21k6
#1 One problem is the Buffer Size and Buffer Latency checkboxes are not being saved so have to change them on every restart of Thetis.


are you saving the tx profile? Yellow items saved per tx profile.

txProfile.jpg
txProfile.jpg (89.66 KiB) Viewed 42986 times
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Thu Sep 30, 2021 11:06 pm

I've got "Auto Save TX Profile on change" checked....shouldn't that do it? But manually saving it worked...so thanks for that.
I also notice there's a new Restore VAC1 -- what values is that working with?
Mike W9MDB
User avatar
ramdor
Posts: 1468
Joined: Wed Jul 03, 2019 3:07 pm
Contact:

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby ramdor » Thu Sep 30, 2021 11:11 pm

w9mdb wrote:I've got "Auto Save TX Profile on change" checked....shouldn't that do it? But manually saving it worked...so thanks for that.
I also notice there's a new Restore VAC1 -- what values is that working with?


Input output driver names are saved per tx profile. That option when checked will attempt to recover them and reassign them. Useful if you have digi tx profile setup using virtual audio cables vs regular sound device for headset/speakers.

I will check if that auto save is working, but from memory it calls the same code as hitting the save button. So if one works, the other should, ideally.

EDIT: that option will only save the changes if you move to another tx profile

R.
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Fri Oct 01, 2021 12:03 am

Mike -- are you using a signal generator as the input signal for these tests?
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Fri Oct 01, 2021 3:22 am

Bodnar GPSDO

Mike
Mike W9MDB
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Fri Oct 01, 2021 3:23 am

w9mdb wrote:Bodnar GPSDO -- I've got 3 of them for testing different things. One is the 10MHz source for the 7000DLE MKII and using a 2nd for a secondary signal to measure.

Mike
Mike W9MDB
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Fri Oct 01, 2021 1:36 pm

@ w9dmb -- Very good, Mike, I can do the same here. No time to play radio today, though :(

However, I have done this experiment before using WWV and achieved better than 0.2Hz accuracy with the resampler, audio interface on internal reference, and radio on GPSDO. I think the resampler, and buffer sizes, when properly adjusted can provide the very high performance. Especially because I suspect most of that 0.2Hz came from ionospheric effects. But I will recheck with a local GPS derived 10MHz.

Also, slight thread drift, but given that DDC tuning in the radio is accomplished using a numerically controlled oscillator (aka DDS), there is a quantization of tuning, and frequency steps are 0.026Hz (rounded to the nearest millihertz).

The equation for tuning is: frequency_in_hz = phase_word_in_decimal / (2^32 * 122800000).

The nearest phase word (decimal) to 10MHz is 349753037, which give 9999999.996 Hz (rounded to the nearest millihertz).

BREAK

@ K1LSB -- Mark -- I tried your "astonishing" :) settings.

First I tried them with my normal "all buffers equal zero" settings, which went very poorly. I actually cut that test short, it was racking up 10's of counts per hour.

Then I tried them with the Ringbuffers set to 4, as you have them. This netted me 4.9 counts per hour, which is respectable but not as good as what I had tested previously.

So it would still seem that "your mileage may vary". We need more data from more people to help zero in on what will hopefully be just a couple or three changes to the defaults.
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Fri Oct 01, 2021 2:43 pm

Scott...have you tried turning off the windows buffer cache flushing? Did miracles here. As long as you're on on UPS you're protected. Blue screen of death horks the buffer flush anyways so doesn't matter.

As for phase word I don't think that's involved here at all, is it? That would be in the Frequency Calibration. we have a frequency correction in FLDigi that CAN get us to within 1mHz -- I didn't use that on the run above. Would be nice to add that fine resolution correction to Thetis too. And that's a good example of how to avoid precision problems.
Tempting to do this:
freq *= 1.000000000000001
But that pushes precision and you can see the difference doing it a different way
main()
{
double f = 10000000;
double f2;
f2 = f * 1.000000000000001;
printf("f=%.17f\n",f2);
f2 = f + f*0.000000000000001;
printf("f=%.17f\n",f2);
}
f=10000000.00000001117587090

f=10000000.00000000931322575


You can see from the FLDigi plot I showed earlier that the drift is about 30mHz so not much and I can see how you could get 0.2Hz with WWV -- I've done WWV to < 10mHz on a good day. I worked with Dave W1HKJ on the FMT mode in FLDigi to where I can measure a frequency to < 2mHz now. I was running my own FMT with a group of users while we were developing this and you'll see many of the FMT operators using FLDigi now.

Some value is askew in the resampler...perhaps hitting accumulated error due to too much precision being used....especially with the fact that you get 15-17 digits of precision from a double so anything over 15 will be lost or rounded.

If I had access to the source I could take a look at this.

Here's a measurement of a local AM station -- which is extremely stable but not terribly accurate -- I have to put fairly good size frequency correction to zero out FLDigi. The real frequency of the station is off about 0.4Hz. This is a good way to measure another frequency to check the resampler if one doesn't have a decent reference.
This measurement has a standard deviation of 5mHz
Attachments
Screenshot 2021-10-01 094335.png
Screenshot 2021-10-01 094335.png (66.27 KiB) Viewed 42853 times
Mike W9MDB
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Fri Oct 01, 2021 3:27 pm

Mike,

This frequency accuracy stuff is fun and interesting. I suggest we start a separate topic to focus on that.

Super quick results this morning:

- Updated to fldigi 4.1.20
- Learned to use FMT mode: it would seem VERY important to select 1/4 actual audio sample rate in the FMT modem config. I could not get good results otherwise.
- Looked at WWV, with resampler or with force checked, seeing approx. -0.0 to +0.2 Hz variation from 10MHz.

Off to do other things, will check back into the board tomorrow.

73,

Scott
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Fri Oct 01, 2021 4:12 pm

The frequency measurement is relative to the resampler....you can see here where I turned on the resampler at about the 51 minute mark and it dropped 40mhz slowly rising than hits some limit and goes nuts for a while.
Attachments
Screenshot 2021-10-01 110951.png
Screenshot 2021-10-01 110951.png (33.38 KiB) Viewed 42839 times
Mike W9MDB
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Sat Oct 02, 2021 10:38 pm

I spent most of today looking at frequency accuracy. I used a hybrid splitter to split my BG7TBL GPSDO output so I could continue to feed it to my 8000 reference input, and after putting on a big attenuator, feed it to the Ant 1 input at -63dBm.

I had the Bodnar available to the Presonus audio interface.

I used the fldigi FMT feature as my measurement device.

My take-aways so far:

- The resampler works well when everything is properly adjusted and one is not getting under/over-run counts. Typically ±0.001Hz slow variations with the GPS reference on the Presonus, twice that with the Presonus internal reference.

- Slightly mis-adjusting things so that I was getting a steady but slow diet of under/over-runs, say 60 per hour, the resampler was kind of a mess, wandering around strangely. But, still, not seeing anything worse than ±0.005 or so.

- Even force=on with the Presonus internal reference was good, but under/over-runs were much higher in this condition, and audible glitches were heard.

- Obviously a GPS reference on the Presonus with force=on was stellar. Unmeasurable variation. Rock solid.

- Under all conditions I had a strange frequency offset that I had to put into fldigi, -0.023Hz, even with the Bodnar selected in the Presonus and force=on. I could not tie that to Thetis tuning quantization. I have no idea where it's coming from. This is something I'd like to figure out.

Bottom line: any of these conditions would have been more than enough to easily achieve high honors (≤1Hz) in any FMT event, and are far more than adequate to run something like FT8. If things look stable in the VAC monitoring section then all should be well. We may be worrying about nothing here, although from an academic standpoint it is fun to look at.
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w9mdb » Sat Oct 02, 2021 10:45 pm

Have you tried doing a multi-hour run yet? That's where I see drifting and craziness once in a while long runs. That's the main concern I see left. The sampler should be stable and not drift and definitely not lose it's mind every 30-60 minutes.
Mike W9MDB
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Sun Oct 03, 2021 12:20 pm

w9mdb wrote:Have you tried doing a multi-hour run yet? That's where I see drifting and craziness once in a while long runs. That's the main concern I see left. The sampler should be stable and not drift and definitely not lose it's mind every 30-60 minutes.

I have done a 60 minute fldigi FMT run. The resampler never "lost its mind". It definitely seems to wander around somewhat aimlessly. Even using the lower performing internal reference in the Presonus, I never saw it wander more than ±0.005. But even if I'm not monitoring long enough and it chose to perform ten times worse, that would still not be enough to disturb FMT competition performance in any meaningful way, and it certainly would not be audible.

The only time things get crazy for me are when settings are not properly adjusted. When this occurs the under and overrun counters will accumulate many hundreds or thousands of counts, i.e. using fldigi FMT mode is not necessary for me to know when these conditions occur. The situation can range from inaudible (but would mess up FT8, for example) to very badly audible. However, now that I've lowered feedback gain and FF alpha settings, as multiple posts above have described I am seeing a lot less than 10 counts per hour under any conditions, and I can't remember the last time I started Thetis and the resampler went unstable. Of course with the feedback gain and FF alpha settings I've chosen I now need to be very patient for 5 or 10 minutes for things to settle, but it doesn't seem to go unstable.

Edited to add: also, for me I saw no difference with the buffer cache flush setting disabled. I run dual Samsung EVO 960 SSDs.

Second edit: after additional testing this morning I take that back! Turning this off does seem to help. Under/overrun counts are so very low I can't measure any in over an hour using my lowest performing configuration. I'm going to have to do all my testing over again, darn it! :D
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Sun Oct 03, 2021 5:38 pm

First of all, very important, many thanks to you, Mike, @w9mdb, for pointing out that disabling windows write-cache buffer flushing seems to make huge improvements in resampler performance. This may very well turn out to be as important as disabling network throttling.

How to disable write-cache buffer flushing:

- Right-click Computer in the Start menu, then select Properties
- Select Device Manager
- Select Disk drives
- Right-click your SSD and select Properties
- Under the Polices tab, check the Turn off Windows write-cache buffer flushing on the device box
- Close the Device Manager.
- Reboot

It would be good to get a larger population of folks to try this to confirm it's not just Mike and I.

BREAK

I got serious today and took a few hours of data. As before, my setup used a Mini Circuits hybrid splitter to split my BG7TBL GPSDO output so it could continue to feed the 8000 reference input and, after putting on a big attenuator, also feed the Ant 1 input at -63dBm. The Bodnar GPS reference was available to the Presonus audio interface, and the fldigi FMT feature was again the measurement device.

Thetis setup is as shown below (that's a composite image, not some special dual settings display :) ). Nothing crazy in the VAC advanced settings, just slowing down the feedback gain and FF alpha settings a bit from the default to gain better stability. Some step attenuation was added to lower IMD from the GPSDO 10MHz, and the passband was restricted to lower noise.

The computer was used for light web browsing while these experiments were taking place. No special measures were taken to restrict operating system activity.

If you right click any of these images and select "Open image in new tab" you will get them full size for easier viewing.

Thetis Settings.JPG
Thetis Settings.JPG (1.04 MiB) Viewed 42694 times


First up was a 6o minute test with the Presonus on its internal reference and the resampler active. Results were quite good. Very stable. There was clear evidence of a fast and slow loop in the repetitive pattern. You can judge for yourself what you think the periods are. The fldigi FMT configuration is as shown. A frequency offset in fldigi was necessary to get it close to zero. As before, I have no idea what is causing the offset. On the waterfall the input audio level was at -8dB, and there was at least 70dB of audio SNR, which is more than adequate.

Presonus Int Ref & Resampler.JPG
Presonus Int Ref & Resampler.JPG (407.1 KiB) Viewed 42694 times


Next I investigated what happens when you change feedback gain and FF alpha. Please ignore the startup transient. In the first approx. 20 minute period the feedback gain and FF alpha settings twice that of the results above. I had expected to see a change in periodicity but instead there is only a change of approx. a factor of two in the amplitude of the frequency variations. In the second 12 or 13 minutes or so the feedback gain and FF alpha were changed to 1/10 what it was in the first test. Again, this had a dramatic effect on the amplitude but not periodicity of the frequency variations.

Presonus Int Ref Resampler Changes.JPG
Presonus Int Ref Resampler Changes.JPG (340.41 KiB) Viewed 42694 times


After that the Presonus was switched from the internal frequency reference to the Bodnar GPS external reference. VAC advanced settings were set back to the starting condition as shown above. It took a good 20 minutes for things to settle down (not pictured). After they settled down, the results with the resampler are seen in the first 35 minutes of the data. You'll note the change required in the fldigi frequency correction. For the last 25 minutes Force was activated. Perfectly perfect, except for that annoying .023Hz frequency correction!

Presonus GPS Ref.JPG
Presonus GPS Ref.JPG (391.08 KiB) Viewed 42694 times


After all this my conclusions remain the same: any of these configurations would happily meet any requirements, from meat and potatoes phone and SSB, to FT8, to the most obscure FMT event. Under and overruns remained at zero throughout these tests after an appropriate period of stabilization had elapsed. No need to invest in a GPS reference for your audio interface, but the operator does need to do their part in smartly choosing VAC settings that work with their specific configuration. A GPSDO on the RF hardware can be quite worthwhile. IMHO, the default feedback gain and FF alpha settings need to be smaller than the current defaults. We can argue about how much smaller ;) The write-cache buffer flushing issue needs to be further investigated by more people and confirmed as a source of improved stability.

It's also worth noting that clicking "Apply" did not work to update resampler operation. I had to cycle one of the "manual" checkboxes when changing settings or test conditions.
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby K1LSB » Sun Oct 03, 2021 9:38 pm

w-u-2-o wrote:First of all, very important, many thanks to you, Mike, @w9mdb, for pointing out that disabling windows write-cache buffer flushing seems to make huge improvements in resampler performance. This may very well turn out to be as important as disabling network throttling.

Scott,

Can you be more specific regarding the "huge improvements in resampler performance" you're seeing? I'm reading in lots of places on the web that disabling windows write-cache buffer flushing is potentially a very bad thing, in that a BSOD can conceivably result in corrupted system files.

Thanks,
Mark
Joe-W4WT
Posts: 167
Joined: Sun Apr 09, 2017 5:27 pm
Location: Cumming, GA

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby Joe-W4WT » Mon Oct 04, 2021 1:38 am

Unless you are running an "Online" type UPS (sometimes called "double conversion") which is constantly supplying power from the battery through an inverter to your gear you are asking for trouble disabling the buffer flush. These units are nice but they are typically noisy and expensive.

Standby UPS's, which I use as do most people, are not 100% effective in keeping power up during a failure or power glitch. My standby UPS is a pretty good APC unit and 99.x% of the time it works perfectly but it does fail to switch fast enough during very rare power glitches. I don't know what causes these type glitches but i get maybe one a year and it "fools" the UPS and everything crashes. It happed last week for the first time this year. All computers and radios went down in an instant. No problems occurred but certainly could have if buffer flush was not enabled.

I personally feel the level of stability I and others are now seeing, as I think Scott said above, is more than "good enough" without turning off buffer flush and possibly sacrificing data integrity just to get that last little bit of VAC stability.

Joe W4WT
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Mon Oct 04, 2021 12:23 pm

K1LSB wrote:
w-u-2-o wrote:First of all, very important, many thanks to you, Mike, @w9mdb, for pointing out that disabling windows write-cache buffer flushing seems to make huge improvements in resampler performance. This may very well turn out to be as important as disabling network throttling.

Scott,

Can you be more specific regarding the "huge improvements in resampler performance" you're seeing? I'm reading in lots of places on the web that disabling windows write-cache buffer flushing is potentially a very bad thing, in that a BSOD can conceivably result in corrupted system files.

Thanks,
Mark

Mark,

With flush enabled I was seeing approx. 2 counts per hour on under/overrun counters. with flush disabled now I'm down to approx. 0.6.

Maybe it's not such a huge improvement on an absolute scale, but it is definitely better than a 3x improvement from a rate perspective.

Is it worth the risk? That's a personal decision. People disable this setting in the interests of speed, whereas here it's disabled for the purposes of smoother audio operation. Are a few clicks and pop's worth the risk? Maybe not for most people.

Joe-W4WT wrote:Unless you are running an "Online" type UPS (sometimes called "double conversion") which is constantly supplying power from the battery through an inverter to your gear you are asking for trouble disabling the buffer flush. These units are nice but they are typically noisy and expensive.

FWIW, I run APC Back-UPS 1000 and 1500VA units on my PC's and other IT hardware. I get outages every day, practically like clockwork. None have ever caused any of my equipment to go down. However, this may also be a function of the quality of the equipment and their power supplies plugged into these UPS units. Indeed this morning's event came in at 0748EDT, per the nice little email my UPS sends me every time it goes on or off battery. I'm guessing that my power company makes some sort of switching decision every morning. Living out in the sticks definitely requires robust power protection!

One other factor in my thinking is that all my PC's automatically back up to my NAS every night without fail. I can recover from the unlikely event of drive corruption in under 20 minutes. This is also proven, as I'm now on my third SSD in this machine. Further off topic, but remember that SSDs fail without warning, and they have limited lifetimes. Back up, back up, back up!
W6LVP
Posts: 14
Joined: Wed Aug 22, 2018 11:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby W6LVP » Mon Sep 05, 2022 8:32 pm

I hope this is right place for this post.

I have a simple objective. I want to connect Thetis 2.9.0 using VAC to a VARA digital modem. Actually a VARA modem is a consortium of 17 different modems that are dynamically selected to deliver the best throughput possible depending on chosen bandwidth, received signal-to-noise ratio, and message size. Three bandwidths - 500, 2300, and 2750 Hz - are supported with speeds ranging from 18 to 8489 bits per second. VARA implements a TCP/IP-like ARQ control protocol to deliver error-free messages.

Based on the high interest and activity around the VarAC digital chat mode built on the VARA modem, I know my objective is shared by other ANAN/Thetis operators.

I use Voice Meeter Banana with ASIO drivers set to 16 bits and 48 kHz.

I have tried all of the different combinations of RingBuffer Latency both manual and automatic, buffer size, and resampler configurations shown on this and another thread. My understanding is that the PortAudio setting don't apply to ASIO drivers.

With the resamplers running (Force unchecked), the VARA modem will only receive data transfers at is slowest and most forgiving mode. When I disable the resamplers (Force checked), I get expected error-free data transfers at speeds consistent with received signal-to-noise ratio.

What am I missing?

Larry
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Tue Sep 06, 2022 11:17 am

Larry,

You've posted nothing about what sort of performance the VAC diagnostics are reporting with the resampler enabled.

The first metric to look at are the under and overrun counters. Are you able to achieve conditions whereby those are not counting (you can reset them to zero by clicking on them)?

It is possible to use the resampler with VARA. I use the paid version VARA for Winlink and it works fine, ratcheting up and down through the various speed grades normally.

This is not relevant to your problem, but it's worth noting that ASIO is only running between Thetis and Voicemeeter. The connection between VARA and Voicemeeter is not ASIO (probably MME), however it appears that you have gone into the sound control panel and set the parameters for the various Voicemeeter virtual devices appropriately.

73,

Scott
W6LVP
Posts: 14
Joined: Wed Aug 22, 2018 11:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby W6LVP » Tue Sep 06, 2022 4:47 pm

As background, I am a retired electronics engineer and have an appreciation for the task at hand, albeit a foggy one. Fifty years ago, I designed a time base corrector that stabilized the analog video stream from a video tape recorder to within broadcast video standards.

I am encouraged. The way Winlink and VarAC use the VARA modem is very similar. If you can achieve the higher and more demanding speeds, I should be able to do the same.

With auto ringbuffer latency (boxes unticked), I can achieve a zero over and underruns during receive. However, the frequency instability of the output is well outside the range of usable. Keying the transmitter throws in a transient and VAC out underflows jump.

Perhaps from the posts on the forum, I should have been able to determine a procedure to achieve my optimized results. If that exists and I missed it, sorry, could you please point me to it. Otherwise, suggestions of a starting point and procedure would be appreciated.

Yes, the Voicemeeter inputs and outputs have been set to 16 bit 48 kHz.

Larry
W6LVP
Posts: 14
Joined: Wed Aug 22, 2018 11:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby W6LVP » Tue Sep 06, 2022 9:30 pm

I know it is not best form to reply ones own post. However, I have made some progress.

My setup is my ANAN 7000DLE and Icom IC-7300 both connected to dummy loads for an antenna. Separate instances of VarAC and VARA control the two radios. Transmit power from each radio into its dummy load determines the received signal-to-noise ratio of the other radio and is set to about +10 dB. The VARA modem uses the received SNR as part of its algorithm to adjust speed (modem selection) and needs to be at least 10 dB to go the higher possible speeds.

With in and out buffer latency set to 50 ms or greater, I can achieve sustained operation with very few over or underruns. The ring buffer pointer deviates only a percent or two from 50%. VARA file transfer speeds are consistent with the received SNR. With its combination of forward error correction and ARQ protocol, the VARA modem can handle a reasonable number of errors without a problem.

Other than reduced latency, is there any benefit to a smaller ring buffer?

VarAC is enjoying rapid growth of interest and activity. Lots of bored FT-8 users are looking for something more. I have several VarAC/ANAN owner friends who need a 95% solution if there is one.

Larry
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Wed Sep 07, 2022 12:55 am

There's nothing wrong with posting updates.

It's good that you got it working. However 50ms is a huge number. What buffer size (not ring buffer size) are you using? How fast is your PC?

There is no benefit to small buffers other than reduced latency. And for most digi modes this does not matter. However, since VARA is an ARQ mode, there is a point at which there is too much latency and it will not work. The good news is that VARA is relatively flexible. I've read that two way latency should not exceed something like 400 or so milliseconds. This is in contrast to, for example, WINMOR or PACTOR, both of which require very fast turn around times.
W6LVP
Posts: 14
Joined: Wed Aug 22, 2018 11:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby W6LVP » Wed Sep 07, 2022 2:56 am

I have two PCs both relatively quick with Passmark CPU ratings in the 13,000 range.

I have tried different buffer sizes between 64 and 256.

I have one PC connected to my 7K which is what I had been focused on. I decided to try to apply what I had learned to my ANAN 100 attached to a different and slightly faster PC. That didn't go well.

Below with 256 buffer and ANAN 100.

After the feedback servo stabilizes with ringbuffer between 45 and 55 %, I can reduce the receive ringbuffer size to about 20 before getting over and underruns. Unkeying the transmitter triggers a quick batch of receive over and underruns as the servo is destabilized.

The transmitter ringbuffer is stable during receive and transmit at about 25.

A few minutes ago, I had a VarAC QSO with a station where we exchanged SNR reports of about +15 dB. Exchanges both ways were at the slowest 18 bps rate until I ticked the two Force boxes. Speed shot up to the maximum 270 bps for small chat size messages. I attribute that to the frequency slewing caused by the resampler.

In addition to ARQ, the VARA modem implements good forward error correction. My experiments show no real difference in VARA large message transfer speed or packet error rate with resampler on and stable or off. I think it is time to give up on this one. As an old and tired clock maker, I just want to tell time.

Larry
W6LVP
Posts: 14
Joined: Wed Aug 22, 2018 11:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby W6LVP » Thu Sep 08, 2022 2:17 am

The second PC above with less desirable results is a newer Mini PC - basically a laptop without the keyboard, display, or battery in a 4 inch square box. The resampler servo needs to mate the PC and radio digital audio sample rates so PC digital audio static and dynamic clock rate are issues. It is likely that this newer and smaller PC has greater master oscillator frequency swing due to temperature and voltage change.

My take away is that there are way too many variables to allow one setup to transfer to another. Might also be a good idea to use a PC is a bigger box with a big power supply.

Is the digital audio clock, typically 48 kHz, derived from a source that is referenced to the 10 MHz input on the back of the radio?
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby w-u-2-o » Thu Sep 08, 2022 12:00 pm

W6LVP wrote:I have two PCs both relatively quick with Passmark CPU ratings in the 13,000 range.
Each PC will require it's own unique set of setting for the VAC resampler to work well.

I have tried different buffer sizes between 64 and 256.
I have a very fast computer and use 512. You should try larger values. The penalty for a larger main VAC buffer is very small compared to adding a lot of ringbuffer. Consider that at 48KHz a buffer of size 1024 is only 21ms long.

Unkeying the transmitter triggers a quick batch of receive over and underruns as the servo is destabilized.
AFAIK, that behavior has never before been described by anyone. That is a very unique problem and should not occur. TX/RX state should have no effect on VAC performance. It is indicative of some unique problem with your setup. Having never seen this problem before I'm somewhat at a loss to understand it.

My take away is that there are way too many variables to allow one setup to transfer to another.
That is correct.

Is the digital audio clock, typically 48 kHz, derived from a source that is referenced to the 10 MHz input on the back of the radio?
The problem is that there are two clock domains that must share data.

The first clock domain is that associated with the ANAN hardware. Ultimately the 48KHz rate of the audio data delivered to the PC, or accepted from the PC, is tied to the 10MHz reference (internal or external) associated with the ANAN hardware.

The second clock domain is that associated with the PC, and derived either from a clock on a sound interface installed in that PC, or the PC CPU itself.

Thus ultimately you have an audio source & sink at some frequency close to but not exactly 48KHz (clock domain 1, aka the PC clock domain), and another source/sink pair at another frequency close to but not exactly 48KHz and different from the other source/sink pair (clock domain 2, aka the ANAN clock domain). Data must be transferred from one domain to the other. Obviously there will be, by definition, errors associated with that because the two clock frequencies are not exactly the same.

The VAC interface gives you two ways to deal with those errors. Method 1 is to ignore them and let them happen (the force checkbox). Method 2 is to use a resampler algorithm to smooth them out (the resampler). The resampler DOES work, and work for demanding digital modes that require high levels of frequency stability (FMT tests, FT8, etc.). That has been proven beyond any shadow of a doubt in this thread and the other thread I referenced. However not everyone needs/wants/has-the-patience-to achieve that level of performance. If you are getting the results you want with the resampler turned off I suggest you stick with that. However the resampler DOES work, it's just unfortunately a very complex implementation that requires a lot of tweaking.

One thing I just thought of: it's not clear the ASIO implementation in Voicemeeter is stable unless you have an ASIO hardware sound device in the PC. Without an ASIO sound device assigned to the A1 hardware output of Voicemeeter you might be getting an unstable configuration. If you want to continue experimenting you might try switching VAC to WDM-KS. You might need to add in a little portaudio buffer with WDM.
W6LVP
Posts: 14
Joined: Wed Aug 22, 2018 11:47 pm

Re: Thetis 2.8.11-21+++ VAC advanced controls: results and discussion

Postby W6LVP » Thu Sep 08, 2022 1:22 pm

Thanks. Your last point is interesting. I don't have ASIO hardware so will try the WDM-KS drivers and point A! to it.

My Mini PC is small and probably too lacking in clock stability for this task. However, the little box uses just 5% of its CPU
to run Thetis, VARA, and VarAC.

Larry

Return to “Digital ("Virtual") Audio”