Author Topic: Generating Simultaneous Tones  (Read 5356 times)

0 Members and 1 Guest are viewing this topic.

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1182
  • Country: us
  • The other white meat.
Re: Generating Simultaneous Tones
« Reply #25 on: April 16, 2021, 04:22:05 am »
2. User end (decoder) is simple Arduino based FFT display.  32 "bins" seems possible.
3. Tones from 300 - 3000 Hz (audio passband of 220 MHz amateur transceiver) - preferably not harmonically related.

Well, then the obvious answer for how to generate the tones would be with an IFFT. The bins of an FFT have rational relationship, so not a great choice if you really want non-harmonic related tones. Using only 32 bins makes them quite wide, so poor SNR.

Quote
We already take this information and place it into an AX.25 packet and transmit it out at 1200 bps but it can run 1/2 to 3/4 second behind due to packetization and buffering.

You could just use the underlying Bell 202 with some simple error checking.

 

Offline fourfathom

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
Re: Generating Simultaneous Tones
« Reply #26 on: April 16, 2021, 07:25:24 am »
Why is it good to limit the low end of the frequency range so much?  If your tone spacing is 125 Hz, there's no reason in the processing to not use down to say, 200 Hz to allow a bit wider spacing.  Is there something about the RF gear that limits the low end range?
if I'm not mistaken, the OP intends to send these tones via ham narrowband FM.  These radios usually have a lower-frequency audio cutoff somewhere above 300 Hz, and they often limit the high end to 3 KHz or even less.  It's sort of like the old telephony audio range of 300-3000 Hz, and often even narrower.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 2398
  • Country: dk
Re: Generating Simultaneous Tones
« Reply #27 on: April 16, 2021, 09:21:58 am »
16 bits at 1200bps is ~13ms, an arduino should have no problem doing 1200bps
Unfortunately it's not the "bits" that are the problem with AX.25.
Once the initial connection is established, data is transferred in frames - I (information) frames to be specific.
Fields in a frame:
Flag (8 bits), Address (112 to 560 bits), Control (8 bits), PID (8  bits), Information (our 16 bits), FCS (16 bits), Flag (8 bits) -
Therefore we have to transmit a WHOLE BUNCH more than our 16 bits of data to satisfy the AX.25 protocol requirements.
Oh - and the frame, once received, must be acknowledged back to the sender before the sender will send the next frame.
Sigh - AX.25 was not the best implementation.  Why I'm asking the group mind for ideas.

Thanks,
Bill

so don't use the AX.25 protocol, just use the 1200bps and your own protocol







 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: aq
Re: Generating Simultaneous Tones
« Reply #28 on: April 16, 2021, 02:51:10 pm »
Why is it good to limit the low end of the frequency range so much?  If your tone spacing is 125 Hz, there's no reason in the processing to not use down to say, 200 Hz to allow a bit wider spacing.  Is there something about the RF gear that limits the low end range?
if I'm not mistaken, the OP intends to send these tones via ham narrowband FM.  These radios usually have a lower-frequency audio cutoff somewhere above 300 Hz, and they often limit the high end to 3 KHz or even less.  It's sort of like the old telephony audio range of 300-3000 Hz, and often even narrower.

So you are saying this is how the equipment is designed.  Is there a reason for this low end cutoff of the equipment being so high?  Is it just to reduce the required size of the coupling caps in the signal path?
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline fourfathom

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
Re: Generating Simultaneous Tones
« Reply #29 on: April 16, 2021, 03:05:43 pm »
So you are saying this is how the equipment is designed.  Is there a reason for this low end cutoff of the equipment being so high?  Is it just to reduce the required size of the coupling caps in the signal path?

Not at all!  The audio channel is optimized for voice communications, so the frequency cutoffs are chosen to pass the voice frequencies needed for comprehension.  By design it's not Hi-Fi, but an optimization of radio channel utilization and voice communications effectiveness. 

True, shifting down the low-frequency cutoff wouldn't increase the FM occupied bandwidth, but excess low-frequency response can reduce comprehension as it allows low-frequency noise (vehicle rumble, etc) to interfere.

« Last Edit: April 16, 2021, 03:09:14 pm by fourfathom »
 
The following users thanked this post: OldVolts

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1182
  • Country: us
  • The other white meat.
Re: Generating Simultaneous Tones
« Reply #30 on: April 16, 2021, 04:35:42 pm »
So you are saying this is how the equipment is designed.  Is there a reason for this low end cutoff of the equipment being so high?  Is it just to reduce the required size of the coupling caps in the signal path?

Not at all!  The audio channel is optimized for voice communications, so the frequency cutoffs are chosen to pass the voice frequencies needed for comprehension.  By design it's not Hi-Fi, but an optimization of radio channel utilization and voice communications effectiveness. 

True, shifting down the low-frequency cutoff wouldn't increase the FM occupied bandwidth, but excess low-frequency response can reduce comprehension as it allows low-frequency noise (vehicle rumble, etc) to interfere.

Amateur radio on the VHF/UHF bands uses the lower frequencies for CTCSS so the audio frequency response begins above this range.

https://en.wikipedia.org/wiki/Continuous_Tone-Coded_Squelch_System
 
The following users thanked this post: ogden, OldVolts

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3474
  • Country: lv
Re: Generating Simultaneous Tones
« Reply #31 on: April 16, 2021, 05:21:04 pm »
It's sort of like the old telephony audio range of 300-3000 Hz, and often even narrower.

So you are saying this is how the equipment is designed.  Is there a reason for this low end cutoff of the equipment being so high?  Is it just to reduce the required size of the coupling caps in the signal path?

Low end frequency of baseband will inevitably leave impact on frequency of symbol rate.
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: aq
Re: Generating Simultaneous Tones
« Reply #32 on: April 16, 2021, 06:56:40 pm »
So you are saying this is how the equipment is designed.  Is there a reason for this low end cutoff of the equipment being so high?  Is it just to reduce the required size of the coupling caps in the signal path?

Not at all!  The audio channel is optimized for voice communications, so the frequency cutoffs are chosen to pass the voice frequencies needed for comprehension.  By design it's not Hi-Fi, but an optimization of radio channel utilization and voice communications effectiveness. 

True, shifting down the low-frequency cutoff wouldn't increase the FM occupied bandwidth, but excess low-frequency response can reduce comprehension as it allows low-frequency noise (vehicle rumble, etc) to interfere.

Ok, there!  Everything in the first paragraph is not actually relevant.  But the need to limit the low frequency response to exclude noise would be an actual reason to limit the bandwidth.
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: aq
Re: Generating Simultaneous Tones
« Reply #33 on: April 16, 2021, 06:59:04 pm »
It's sort of like the old telephony audio range of 300-3000 Hz, and often even narrower.

So you are saying this is how the equipment is designed.  Is there a reason for this low end cutoff of the equipment being so high?  Is it just to reduce the required size of the coupling caps in the signal path?

Low end frequency of baseband will inevitably leave impact on frequency of symbol rate.

As does the tone spacing, so there is a tradeoff between the two with an optimum point.
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline fourfathom

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
Re: Generating Simultaneous Tones
« Reply #34 on: April 16, 2021, 07:08:03 pm »
The audio channel is optimized for voice communications, so the frequency cutoffs are chosen to pass the voice frequencies needed for comprehension.  By design it's not Hi-Fi, but an optimization of radio channel utilization and voice communications effectiveness.

Ok, there!  Everything in the first paragraph is not actually relevant.  But the need to limit the low frequency response to exclude noise would be an actual reason to limit the bandwidth.

Are you saying my first paragraph (quoted above] is irrelevant?  Why?  Commercial and ham narrowband FM works with narrow RF channel spacing, and widening the modulated FM signal by including the unnecessary high audio frequencies might lead to adjacent-channel interference.  By the way, we also have to allow for a small amount of transmitter frequency inaccuracy, so we need some buffer between channels -- again, to minimize adjacent channel interference.
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: aq
Re: Generating Simultaneous Tones
« Reply #35 on: April 16, 2021, 11:26:26 pm »
The discussion is about the low frequency cut off.  While below 500 Hz may not be required for intelligibility, unless there is a specific reason to not transmit it there is no reason to block it.  Telephony passes frequencies between 300 Hz and 500 Hz, so it would seem there may be some minor loss of intelligibility or the phone companies and radio would likely use the same pass band.   Your second paragraph gives a reason to block it, low frequency noise which is present in mobile applications.  This would not have been a consideration in the initial design of telephony systems which set their standard. 

In this post you have shifted to talking about the high frequency cutoff, totally unrelated. 

Someone else talked about using frequencies below 500 Hz for CTCSS so clearly frequencies below 500 Hz are being transmitted on the RF, just not used for voice. 
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline cdev

  • Super Contributor
  • ***
  • Posts: 6415
  • Country: 00
Re: Generating Simultaneous Tones
« Reply #36 on: April 17, 2021, 12:55:34 am »
use the sin() function. and summing of the separate generators and then a D to A converter (like a USB sound card?)

You can do the DDS thing in pure software. I've done it with only 2 simultaneous tones, but going to 16 only needs a faster processor. DDS is easy enough to even be feasible in assembly.

A small FPGA will also fit it, in case you need more speed.

Regards.
"What the large print giveth, the small print taketh away."
 

Offline cdev

  • Super Contributor
  • ***
  • Posts: 6415
  • Country: 00
Re: Generating Simultaneous Tones
« Reply #37 on: April 17, 2021, 12:57:38 am »
You may have to look pretty far back to find discussions on this but the search term "in band signalling" should bring up a fair amount of stuff.
The discussion is about the low frequency cut off.  While below 500 Hz may not be required for intelligibility, unless there is a specific reason to not transmit it there is no reason to block it.  Telephony passes frequencies between 300 Hz and 500 Hz, so it would seem there may be some minor loss of intelligibility or the phone companies and radio would likely use the same pass band.   Your second paragraph gives a reason to block it, low frequency noise which is present in mobile applications.  This would not have been a consideration in the initial design of telephony systems which set their standard. 

In this post you have shifted to talking about the high frequency cutoff, totally unrelated. 

Someone else talked about using frequencies below 500 Hz for CTCSS so clearly frequencies below 500 Hz are being transmitted on the RF, just not used for voice.
"What the large print giveth, the small print taketh away."
 

Offline MIS42N

  • Regular Contributor
  • *
  • Posts: 183
  • Country: au
Re: Generating Simultaneous Tones
« Reply #38 on: April 17, 2021, 04:02:32 am »
Are we being presented with a 'solution' to a not fully defined problem and then requested to flesh out the solution. I looked at it and thought 'I created a TOG for an ATmega328P, two of them would do it easily' [TOG - top octave generator, generates the 12 tones from D8 (4694.8Hz) to C9 (8368.2Hz) - used in old electronic organs]. But they are (a) not in the specified frequency range (b) continuous (c) come out of separate pins (d) square wave. So could that be modified to do the job? So then one asks, why use frequency division multiplexing (FDM) versus time division multiplexing. It is way more complex. A simple 1200 baud FSK signal would move 16 bits in 13ms, does it need to be quicker? If so, why? Although it requires parallel to serial conversion by the sender and serial to parallel conversion by the receiver, these are simple tasks offloaded to sub $1 parts.

I think we need a better definition of the problem. I know there was a partial explanation a few posts back, but it left out things like what data rate is required (more than 1200 bit/sec?), what delays are tolerable, how far the signal needs to propagate (is there a significant path delay), if there are errors, (a) that's OK (like in VoIP) (b) should be detected but don't require correction (c) need a forward correction like trellis encoding (d) could deal with as a simple ACK/NAK resend (if there's little latency, this could be achieved in less than 100ms). What is the significance of 16 bit? What SNR is this to work within. Is it a one off to fit a specific situation or should it allow for future mods and what might they be?

This is the bane of the system analyst. Brings to mind the story of the advertised job, financial manager pay $2 million p.a. Candidate asks what the job entails. "First figure out how you get paid".

 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3474
  • Country: lv
Re: Generating Simultaneous Tones
« Reply #39 on: April 17, 2021, 11:50:46 am »
Flag (8 bits), Address (112 to 560 bits), Control (8 bits), PID (8  bits), Information (our 16 bits), FCS (16 bits), Flag (8 bits) -
Therefore we have to transmit a WHOLE BUNCH more than our 16 bits of data to satisfy the AX.25 protocol requirements.
Oh - and the frame, once received, must be acknowledged back to the sender before the sender will send the next frame.
Sigh - AX.25 was not the best implementation.  Why I'm asking the group mind for ideas.

Overcomplicated. Especially considering that you are reinventing modem. For what? Single installation of 6 stations? I would use ISM band LoRa modules. It is <20$ whole radio including packet modem, thou w/o antenna :)
 

Offline cdev

  • Super Contributor
  • ***
  • Posts: 6415
  • Country: 00
Re: Generating Simultaneous Tones
« Reply #40 on: April 17, 2021, 01:09:05 pm »
Is there any reason you cannot use a widely available DTMF encoder/decoder?

DTMF has 16 tones available in a 4x4 matrix

You can generate and decode DTMF with Audacity although I don't know how or if it would generate or decode multiple tones occupying the same time slot properly.

Does Gnuradio have the tools to do this? It seems to me that it might, and if so that would save you building your own. I would look at that first.
« Last Edit: April 17, 2021, 01:12:18 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 12733
  • Country: us
  • DavidH
Re: Generating Simultaneous Tones
« Reply #41 on: April 17, 2021, 04:04:39 pm »
Amateur radio on the VHF/UHF bands uses the lower frequencies for CTCSS so the audio frequency response begins above this range.

I have modified a few FM transceivers to gain direct access to the FM modulator and demodulator.  As you mention, the frequencies below the lower end of the voice band are used for sub-audible signalling.  Frequencies above the voice band are used to measure quieting which is what triggers the squelch on the receiver.  But of course you cannot access either of these through the audio output because it is filtered to limit it to roughly 300 to 3000 Hz to remove them.

Another thing to consider is that the audio filtering will usually have considerable phase distortion which can interfere with modulation that relies on phase.
 

Offline fourfathom

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
Re: Generating Simultaneous Tones
« Reply #42 on: April 17, 2021, 05:16:41 pm »
About the original problem, I believe I was confused by the details of the multiple radio data source, and the desired data display.  So let me try to rephrase the problem (?):
* You have data from up to multiple radio/repeaters.  I think this is one or two bits per radio.
* A decision has been made to use AX.25  to transmit this data to a monitoring site.  This protocol has a lot of overhead, and generally uses 1200 bits/sec FSK on VHF links.
* You are looking for a more efficient (bits per second) way to send AX.25 over a narrowband FM channel, audio bandwidth perhaps 300 - 3000 Hz.

Is this correct?

If so, there are faster modulation methods being used for AX.25 over VHF.  I see that 9600-baud FSK is being used but that baud rate seems way too high for a 3KHz channel.  The documents I have seen are fuzzy on the whole bits/sec vs baud thing.

If you want to roll your own modem, then DMT modulation isn't a bad way to go (that's what telephone ADSL modems use, with rate-adaptive QAM and a variable number of carriers.)  But you might want to look at commercial radio-optimized modems like PACTOR or the almost-free VARA software modem.
« Last Edit: April 17, 2021, 05:18:48 pm by fourfathom »
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 1979
  • Country: us
Re: Generating Simultaneous Tones
« Reply #43 on: April 17, 2021, 06:40:45 pm »
This should be trivial using an FPGA, implementing 16 DDS blocks and generating, say, 8-bit sine waves.
Each sine wave digital value would be added to the current sample when its corresponding bit was a '1'.
The sine table would be scaled so all of them hitting the max value at the same time would not overload the number of bits on the output.  Then, you feed that sum to a DAC. 

I'm guessing for modest audio frequencies that this could be done with a DSP chip or maybe even fast microcontroller.

Jon
 

Offline fourfathom

  • Frequent Contributor
  • **
  • Posts: 632
  • Country: us
Re: Generating Simultaneous Tones
« Reply #44 on: April 17, 2021, 07:02:58 pm »
I'm guessing for modest audio frequencies that this could be done with a DSP chip or maybe even fast microcontroller.

Easily.  Or on a PC.  If I understand the problem, the use of 16 on/off carriers was just a suggested way to carry 16 bits of data per "Baud" or symbol period.  If so, there are better ways to do this. 

As I mentioned, VARA is a software modem, optimized for radio comms,  that runs on a standard PC.  It uses 52 carriers. with the individual carrier modulation adapted according to the channel characteristics.  The symbol rate (Baud) is 37.5 Hz.  The individual carrier modulation ranges from BPSK through 4PSK / 8PSK / 16QAM and 32QAM.  The bytes per packet rate (or packet length) is also varied to optimize for the  channel conditions.  The actual modulation and demodulation are probably the easy part, it's the adaptive capabilities that are quite complicated.

I'm not suggesting that the OP needs to do anything this complicated, just that a simple software modem isn't that hard and perhaps more bits/second could be achieved by choice of a better modulation technique.

VARA: https://rosmodem.wordpress.com/2017/09/03/vara-hf-modem/
 

Offline rfclown

  • Regular Contributor
  • *
  • Posts: 157
  • Country: us
Re: Generating Simultaneous Tones
« Reply #45 on: April 17, 2021, 07:13:09 pm »
Amateur radio on the VHF/UHF bands uses the lower frequencies for CTCSS so the audio frequency response begins above this range.

I have modified a few FM transceivers to gain direct access to the FM modulator and demodulator.  As you mention, the frequencies below the lower end of the voice band are used for sub-audible signalling.  Frequencies above the voice band are used to measure quieting which is what triggers the squelch on the receiver.  But of course you cannot access either of these through the audio output because it is filtered to limit it to roughly 300 to 3000 Hz to remove them.

Another thing to consider is that the audio filtering will usually have considerable phase distortion which can interfere with modulation that relies on phase.

And there is 6dB/octave pre-emphasis on Tx and de-emphasis on Rx. At least in the land mobile band it was required. You could cheat the requirement by using a "dummy microphone" as allowed by EIA. You could make the dummy mic response compensate for your desired response. I was once presented with the task of regulatory testing of a radio with a really weird Tx response. The original designer had gone beyond cheating and didn't even actually measure the response of the radio system, but the response of a audio module in "Ray's fixture". (That's what was in his log book). The R and C values I calculated to make a passive dummy mic to do the job were stupid, so I asked if it was ok to make an active dummy mic. I was told ok, so I cheated in the way that the regulation allowed.
 

Offline OldVolts

  • Contributor
  • Posts: 18
  • Country: us
Re: Generating Simultaneous Tones
« Reply #46 on: April 17, 2021, 07:19:52 pm »
Decoding is simple: Google for "Arduino audio analyzer" - plenty of examples.
Yes - Going to have to get rather picky about the tones to avoid intermod generated false tones. 
Pure sinewave would be best as most, if not all FM modulators have "deviation limiters" which clip the audio. 
Will have to keep the tones (combined waveform including peaks) well below the clipping level.
Currently looking at possible Arduino generation using PWM but finding that having only a single clock frequency to play with makes tone selection a big issue. 
More to learn unless the hive mind comes up with something simple.
Thanks,
Bill
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 5085
  • Country: nl
Re: Generating Simultaneous Tones
« Reply #47 on: April 17, 2021, 07:28:33 pm »
2. User end (decoder) is simple Arduino based FFT display.  32 "bins" seems possible.
If you can use an Arduino can't you just use a Teensy 4 with their audio library to generate the sines, sum them and output them?

I don't care how inefficient Arduino programming is, a 600 MHz Cortex M-7 is not going to care for this.
 
The following users thanked this post: OldVolts

Offline gf

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: de
Re: Generating Simultaneous Tones
« Reply #48 on: April 17, 2021, 08:07:52 pm »
Currently looking at possible Arduino generation using PWM but finding that having only a single clock frequency to play with makes tone

A DDS generator is not difficult either. For each sample of each tone, add a pre-calculated offset to the tone's phase accumulator and then use the upper N bits of the phase accumulator as index into a pre-calulated sine waveform table (of size 2^N). Just a handful of instructions per sample and tone. Then add the sine values of all tones and send the sample to the DAC. In practice one would not send each sample directly to the DAC, but one would rather use DMA and double buffering (as explained here). 3kHz bandwith require a sampling rate of > 6kHz. I would oversample though (say 4x, or even more if possible) in order to reduce the transition band steepness requirements for the analog reconstruction filter after the DAC.

EDIT: How many 16-bit symbols do you need to transmit per second?
« Last Edit: April 17, 2021, 08:15:27 pm by gf »
 

Offline gf

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: de
Re: Generating Simultaneous Tones
« Reply #49 on: April 17, 2021, 08:34:50 pm »
As I mentioned, VARA is a software modem, optimized for radio comms,  that runs on a standard PC.  It uses 52 carriers. with the individual carrier modulation adapted according to the channel characteristics.  The symbol rate (Baud) is 37.5 Hz.  The individual carrier modulation ranges from BPSK through 4PSK / 8PSK / 16QAM and 32QAM.  The bytes per packet rate (or packet length) is also varied to optimize for the  channel conditions.  The actual modulation and demodulation are probably the easy part, it's the adaptive capabilities that are quite complicated.

I'm not suggesting that the OP needs to do anything this complicated, just that a simple software modem isn't that hard and perhaps more bits/second could be achieved by choice of a better modulation technique.

VARA: https://rosmodem.wordpress.com/2017/09/03/vara-hf-modem/

I did not find any source code. Is it open source?
Btw, yet another (open source) soft modem implementation (for Linux) is linmodem.

But I would only consider a sophisiticated modem implementation if a higher bit rate and/or better BER are really required.
Seems to me that OldVolts has not very high requirements, though, and rather wants a simple solution.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf