Hans video on decoding and generating Digital signals


Cox
 

Really enjoyed the video and the discussion on how you generate the signals requested by WSJT.  My immediate question is why the tone shifts aren't available directly from WSJT?  They must be available in the program so they can be converted to audio?  Anyway, Hans is one of those guys that can always find what is 'behind the black'.  Thanks again.


Mont Pierce KM6WT
 

On Tue, Oct 12, 2021 at 08:24 AM, Cox wrote:
Really enjoyed the video
Where is this video?  Can you provide a link?

Sounds very interesting...   :)


Thanks,
km6wt


Shirley Dulcey KE1L
 

WSJT-X could in theory provide the tone shift information directly rather than as an audio signal, but the existing software does not. That would require some sort of API for using that information. It is open source software, so somebody could modify it to add that capability.


On Tue, Oct 12, 2021 at 11:24 AM Cox <lstoskopf@...> wrote:
Really enjoyed the video and the discussion on how you generate the signals requested by WSJT.  My immediate question is why the tone shifts aren't available directly from WSJT?  They must be available in the program so they can be converted to audio?  Anyway, Hans is one of those guys that can always find what is 'behind the black'.  Thanks again.


Steve
 

I was just getting ready to search if someone mentioned that already.  Well done!

Glory to God in the highest, and on earth peace, good will toward men. Luke 2:14


On Tuesday, October 12, 2021, 12:37:23 PM EDT, Shirley Dulcey KE1L <mark@...> wrote:


WSJT-X could in theory provide the tone shift information directly rather than as an audio signal, but the existing software does not. That would require some sort of API for using that information. It is open source software, so somebody could modify it to add that capability.


On Tue, Oct 12, 2021 at 11:24 AM Cox <lstoskopf@...> wrote:
Really enjoyed the video and the discussion on how you generate the signals requested by WSJT.  My immediate question is why the tone shifts aren't available directly from WSJT?  They must be available in the program so they can be converted to audio?  Anyway, Hans is one of those guys that can always find what is 'behind the black'.  Thanks again.


Steve
 

Now that I think of it, how does WSJT decode tones?


Cox
 

https://youtu.be/j6Vnh8eiEpg


Steve
 

Thank you Cox I did view that earlier.  So you are saying that WSJT does it the same way?

Glory to God in the highest, and on earth peace, good will toward men. Luke 2:14


On Tuesday, October 12, 2021, 01:32:30 PM EDT, Cox <lstoskopf@...> wrote:


https://youtu.be/j6Vnh8eiEpg


Steve
 

Perhaps I was not clear in the question.  When WSJT receives tones from the sound card in digital format, how does it decode the bit stream to "know" what frequency it is?

Glory to God in the highest, and on earth peace, good will toward men. Luke 2:14


On Tuesday, October 12, 2021, 01:24:02 PM EDT, Steve <qed28@...> wrote:


Now that I think of it, how does WSJT decode tones?


Hans Summers
 

Hi Steve

Fast Fourier Transform then a bunch of algorithms

73 Hans G0UPL
http://qrp-labs.com


-------- Original message --------
From: "Steve via groups.io" <qed28@...>
Date: Tue, Oct 12, 2021, 8:43 PM
To: qrplabs@groups.io
Subject: Re: [QRPLabs] Hans video on decoding and generating Digital signals
Perhaps I was not clear in the question.  When WSJT receives tones from the sound card in digital format, how does it decode the bit stream to "know" what frequency it is?

Glory to God in the highest, and on earth peace, good will toward men. Luke 2:14


On Tuesday, October 12, 2021, 01:24:02 PM EDT, Steve <qed28@...> wrote:


Now that I think of it, how does WSJT decode tones?


Fred Spinner
 

As Hans said, it's a number in a FFT bin that is further filtered mathematically.  Honestly for this use the zero crossing method is a fast low latency way to do this.  Much better than "good enough for government work".  I think sending the data through a serial interface or whatever wouldn't work as well. Increased latency is highly likely. 

Fred W0FMS 

On Tue, Oct 12, 2021, 10:46 AM Hans Summers <hans.summers@...> wrote:
Hi Steve

Fast Fourier Transform then a bunch of algorithms

73 Hans G0UPL


-------- Original message --------
From: "Steve via groups.io" <qed28=yahoo.com@groups.io>
Date: Tue, Oct 12, 2021, 8:43 PM
To: qrplabs@groups.io
Subject: Re: [QRPLabs] Hans video on decoding and generating Digital signals
Perhaps I was not clear in the question.  When WSJT receives tones from the sound card in digital format, how does it decode the bit stream to "know" what frequency it is?

Glory to God in the highest, and on earth peace, good will toward men. Luke 2:14


On Tuesday, October 12, 2021, 01:24:02 PM EDT, Steve <qed28@...> wrote:


Now that I think of it, how does WSJT decode tones?


Steve
 

Thanks Hans.  Do you know that you make anyone who asks a question on this forum feel special when "the owner and CEO" takes the time out of your obviously busy day to reply to one of us!


Steve
 

Hi Fred!  I'm not sure I understand your answer.  What could be faster than just getting a single frequency (number) from WSJT and then commanding the QDX to transmit it?  Regards, Steve. KY4GX


Andy
 

On 12/10/2021 18:43, Steve via groups.io wrote:
When WSJT receives tones from the sound card in digital format, how does it decode the bit stream to "know" what frequency it is?
It's quite complex but one of the basics is you can do an FFT (Fast Fourier Transform) on the audio samples. The FFT output consists of basic how much energy there is a specific frequencies in your samples. The frequency resolution is sample rate / FFT size.

So an 8000Hz sample rate and 2048 point FFT has a frequency resolution of approx 4Hz. You can use that work out how much energy there is at 4Hz, 8Hz, 12Hz, 16Hz etc.

That is very simple view and there is oh so much more digital processing occurring but you can see the FFT lets you know which frequency components are in your sample stream. This is one of the basic components that digi mode software uses.

73
Andy


Steve
 

Hello Andy and thank you for the response!  When I was introduced to the mathematics of the FFT I remembered being "blown away" as it were. 

Glory to God in the highest, and on earth peace, good will toward men. Luke 2:14


On Tuesday, October 12, 2021, 02:05:02 PM EDT, Andy <mm0fmf@...> wrote:


On 12/10/2021 18:43, Steve via groups.io wrote:
> When WSJT receives tones from the sound card in digital format, how does
> it decode the bit stream to "know" what frequency it is?

It's quite complex but one of the basics is you can do an FFT (Fast
Fourier Transform) on the audio samples.  The FFT output consists of
basic how much energy there is a specific frequencies in your samples.
The frequency resolution is sample rate / FFT size.

So an 8000Hz sample rate and 2048 point FFT has a frequency resolution
of approx 4Hz. You can use that work out how much energy there is at
4Hz, 8Hz, 12Hz, 16Hz etc.

That is very simple view and there is oh so much more digital processing
occurring but you can see the FFT lets you know which frequency
components are in your sample stream. This is one of the basic
components that digi mode software uses.

73
Andy









Evan Hand
 

On Tue, Oct 12, 2021 at 01:03 PM, Steve wrote:
What could be faster than just getting a single frequency (number) from WSJT and then commanding the QDX to transmit it?
Hi Steve,

That is what the software is doing, sending an audio tone that is the frequency to send.  It is encoded as an audio tone that the QDX is decoding to the correct frequency.  That is the beauty of what Hans has done (though I do know of one other transceiver that is using the same general technique that shall remain nameless lest I be hit with the "Blaspheme" comment again :-).

73
Evan
AC9TU


Fred Spinner
 

Via what interface?

An emulated USB serial interface is slow.    You ain't getting 100 measurements per second that way.. 

This is also definitely the case of "good enough" bring a better solution than perfect.  The rig has no front panel.  It's going to be controlled from a external computer anyway.

Why reinvent the wheel?  What Hans did with this is a very clever hack that immediately will work with already existing programs at no operational cost in the modes it is compatible with. 

He's not running Bluetooth waveforms at 2.4 GHz.  It's HF. And single tone at that. 

Once that audio stream is set up and running it is relatively low latency and stable.   You would not only need those numbers to come out of a custom version of a program but you probably would need to write a custom USB interface at both ends to support it. 

This is primarily going to be used on the same software that dropped IQ support in the "X" version. 

Perfection is the arch enemy of good enough.

Fred W0FMS 

On Tue, Oct 12, 2021, 11:03 AM Steve via groups.io <qed28=yahoo.com@groups.io> wrote:
Hi Fred!  I'm not sure I understand your answer.  What could be faster than just getting a single frequency (number) from WSJT and then commanding the QDX to transmit it?  Regards, Steve. KY4GX


Hans Summers
 

Hi Steve, 

Arrgghh you're making the whole CEO thing sound a lot grander here than it really is hi hi. 

USB (Full-speed) sends one data packet per millisecond. Regardless of whether there's audio samples or frequency numbers you still get that kind of amount of latency. But a WSPR tone lasts 685 milliseconds so 1 millisecond is of no consequence. Even if it was, as long as the latency was a constant amount it still wouldn't matter as WSPR decodes +/- several seconds. 

WSJT-X sending just a frequency number would work and would be nice and I admit to having wished for it on more than one occasion. However, practically speaking, radios have a microphone input. That's what all SSB radios have in common. So it makes all the sense in the world for WSJT-X to speak a common language (audio!) that is understood by any radio. If it sent numbers whose radio would understand that apart from a few like QDX? 

As Evan mentioned, QRP Guys also developed independently a zero crossing and direct RF generation technique not long after I did. It isn't exactly the same but the concept is similar, though QDX has many other performance advantages. It's a very nice technique because the signal from WSJT-X is a very strong signal, the ONLY signal present. In the case of QDX there is zero noise and zero distortion because there is no actual translation to audio then back to numbers - as QDX has the built-in USB audio emulation. So it's possible to determine the audio frequency with very lightweight calculation and very quickly, and very accurately. Must faster and more precise than an FFT would be. 

When it comes to receive it's a different story. There are many WSPR signals in the band simultaneously and they can be right down near the noise floor. FFT is the way, and the complexity is orders of magnitude greater. 

I always found it interesting that many encoding systems are so assymetric - WSPR being a good example of this - easy to encode but orders of magnitude more difficult to decode.

Anyway the main point is: WSJT-X sending audio is simply a "language" that every SSB radio understands already. Numbers wouldn't be. 

73 Hans G0UPL
http://qrp-labs.com


-------- Original message --------
From: "Steve via groups.io" <qed28@...>
Date: Tue, Oct 12, 2021, 8:54 PM
To: qrplabs@groups.io
Subject: Re: [QRPLabs] Hans video on decoding and generating Digital signals
Thanks Hans.  Do you know that you make anyone who asks a question on this forum feel special when "the owner and CEO" takes the time out of your obviously busy day to reply to one of us!


Steve
 

Hi Fred!  So What I mean to say to try to be more clear,  We have WSJT software that decides we should send a tone at some frequency.  Because the software was written specifically to interface with a sound card it must actually create the tone in software and send that information to the sound card to be turned into an actual analog electrical tone signal.  This signal is then sent to the audio input of your rig and ends up modulated and transmitted at the appropriate frequency.

What I and others on this thread have said is, why have WSJT and QDX go through all that trouble?  Why not just have WSJT send a single number?  So if WSJT wanted a 700 Hz tone it would just send the number 700 to QDX.  QDX reads the single number and transmits the appropriate carrier signal.  QDX now does not have to get a whole data stream of values and then find a zero crossing and then do a strait line interpolation and then do an inversion to get the same number 700.

If I'm missing something here please tell me.  73! Steve, KY4GX.


Hans Summers
 

Hi Fred et al

USB (Full Speed) sends 1000 packets per second. This is not a software emulated low speed USB. This is a proper USB FS device peripheral in the STM32F401RBT6. It's very fast. The "baud rate" if you put it like that is 12 Mbps. Each 1ms packet contains 48 stereo samples (for 48ksps audio) which is to say, 48 x 2 x 4 = 384 bytes. 384,000 bytes per second for the audio stream... Plus the serial data and all the other things USB host and device chat to each other about. The processor has 64KBytes RAM so there's plenty of space to buffer this data then process it carefully spaced evenly through the following millisecond. One can certainly get 1000 measurements per second of say, a 1kHz signal. Or even a 500 Hz signal if measuring half-cycles which is also possible (and I will implement). 

The audio measurement is incredibly accurate and fast. Latency is 1ms (USB) plus measuring an audio cycle plus commanding the Si5351A. Say around 2ms? What modern SSB transceiver with all its DSP goes from audio to RF with 2ms latency?

The accuracy and speed are orders of magnitude more than necessary for the digi modes we're talking about. 

And yes I think the main point about decoding audio is that you are instantly compatible with every digi modes software application out there. Which themselves were written that way, to be instantly compatible with every SSB transceiver out there. It makes sense. If you wanted to go out on a totally new road, not compatible with any existing equipment, that would be a much bigger undertaking - not just technically but more so, getting a significant number of people to follow you. 

73 Hans G0UPL
http://qrp-labs.com


-------- Original message --------
From: Fred Spinner <fred.spinner@...>
Date: Tue, Oct 12, 2021, 10:07 PM
To: QRPLabs@groups.io
Subject: Re: [QRPLabs] Hans video on decoding and generating Digital signals
Via what interface?

An emulated USB serial interface is slow.    You ain't getting 100 measurements per second that way.. 

This is also definitely the case of "good enough" bring a better solution than perfect.  The rig has no front panel.  It's going to be controlled from a external computer anyway.

Why reinvent the wheel?  What Hans did with this is a very clever hack that immediately will work with already existing programs at no operational cost in the modes it is compatible with. 

He's not running Bluetooth waveforms at 2.4 GHz.  It's HF. And single tone at that. 

Once that audio stream is set up and running it is relatively low latency and stable.   You would not only need those numbers to come out of a custom version of a program but you probably would need to write a custom USB interface at both ends to support it. 

This is primarily going to be used on the same software that dropped IQ support in the "X" version. 

Perfection is the arch enemy of good enough.

Fred W0FMS 

On Tue, Oct 12, 2021, 11:03 AM Steve via groups.io <qed28=yahoo.com@groups.io> wrote:
Hi Fred!  I'm not sure I understand your answer.  What could be faster than just getting a single frequency (number) from WSJT and then commanding the QDX to transmit it?  Regards, Steve. KY4GX


Mike Perry, WA4MP
 

Hello Andy and thank you for the response! When I was introduced to the mathematics of the FFT I remembered being "blown away" as it were.
You were not alone. When I was studying electrical engineer, heavy drilling got me through calculus well enough, typically second in the class. My math talent was starting to fade with differential equations. I was totally lost in the course with FFT. I just faked it and was happy to survive.

—Mike Perry, WA4MP