24
March
2023
Signal formation for a VHF radio beacon in PI4 mode
15:50

Signal formation for a VHF radio beacon in PI4 mode

24 March 2023 15:50

I received an email asking me how to generate a sound signal for a beacon in PI4 mode.
In the article I talk about how I managed to do it without using third-party hardware, only using Linux software capabilities.

Introduction

VHF radio beacons are designed to track the passage of a signal, determine “tropo” conditions under which, due to increased refraction of radio waves, long-distance VHF radio communication with high signal levels becomes possible. On ordinary days, the activity of radio amateurs on VHF is low, but on days of strong rain it increases many times, because... The audibility of distant correspondents in analogue modes CW, SSB and digital modes FT4, FT8, JT65A and others is dramatically improved. To detect in time an improvement in the propagation of radio waves on VHF, beacons are used. These are constantly or most of the time operating transmitters located on frequencies intended for VHF beacons.

IARU in Region 1 allows narrowband beacons in the region 144.400 - 144.490 MHz according to VHF Bandplan, the Russian amateur service frequency grid in the latest decision of the State Commission on Radio Frequencies (SCRF) Russia dated July 15, 2010 No. 10-07-01 refers on the frequency plan of the R1 range: "when using radio frequencies for the amateur service, it is recommended to take into account the frequency plan of the International Amateur Radio Union for region 1 in the part that does not contradict this decision of the SCRF". The signal bandwidth of the telegraph beacon should not exceed 500 Hz. For broadband experimental beacons for research on weak signals, the area 144.491 - 144.493 MHz is intended, where a signal bandwidth of up to 20 kHz is allowed.

The frequency of the RB1CA beacon in Priozersk is 144.420 MHz, the UA1ZFG beacon in Murmansk is 144.430 MHz.

PI4 is an ideal digital modulation that corresponds to the IARU VHF Region 1 Committee's mixed mode "MGM - CW - carrier" beacon modulation. The transmission duration is 1 minute (continuous transmission with virtually no pauses - 100% duty cycle 60 seconds), then the transmission is repeated.

In the article "Radio beacon RB1CA in Priozersk" the experience of receiving a beacon in the PI4RX program for Windows is given.

A search for information on signal generation methods led me to the site OZ2M "Next Generation Beacons".

Resources for writing a program

What is PI4 modulation?

Modulation description is available on the website OZ2M.

PI4 - modulation with 4 tones (FSK). Two tones cannot sound at the same time.

ПарThe parameters of FSK modulation depend on the coefficient K, which can take values ​​40, 80, 96 and 120. In fact, PI4-RX only recognizes modulation with K=40, and that’s what it used. Also, it is called "PI4 modulation".

КажThis frequency can be assigned a code of 0, 1, 2 or 3. The transmission duration of the machine generated signal (MGM - machine generated mode) is approximately 24 seconds.

fsk-code

At reception, it is necessary to set the reception frequency with an accuracy of +- 50 Hz relative to the carrier 800 Hz (preferably +- 12.5 Hz to be able to narrow the bandwidth of the frequency filter at reception from 100 Hz to 50 or 25 Hz).

The four tones are aligned with the 800 Hz carrier at

  • Tone 0: -117.1875 Hz
  • Tone 1: 117.1875 Hz
  • Tone 2: 351.5625 Hz
  • Tone 3: 585.9375 Hz

The distance between tones deltaF = 12000/2400 * k, for coefficient k=40 is 234.375 Hz.
The duration of the symbol is 2000/12000 = 0.166 seconds.

Title k deltaF, Hz CW-FSK offset, Hz Bandwidth, Hz
PI4 40 234.375 250 709.125
PI4-80 80 468.750 400 1412.250
PI4-96 96 562,500 400 1693,500
PI4-120 120 703.125 400 2115.375

Tone frequencies of PI4 mode (k=40)

FREQ0=682.8125 Hz
FREQ1=917.1875 Hz
FREQ2=1151.5625 Hz
FREQ3=1385.9375 Hz

Carrier frequency = 800 Hz - for fine tuning to the signal (important!).

First tone for DFCW = 800 Hz
Second tone for DFCW = 800-234.375 = 565.625 Hz (frequency is not important, since CW is not recognized in PI-RX).

PI4 beacon duty cycle

The transmission repetition cycle is 1 minute starting from 00 seconds (time synchronization on the transmitter and receiver must be very accurate - better than +-1 second.

pi4mod

A set of utilities for generating PI4

File Description Login Exit
stage1.c Console application in ANSI C language for generating a sequence of PI4 frequencies - developed independently based on the source texts of the open source program repository GitHub Guenael/tinybeacon. Can be used once. CALLSIGN in the text stage1.c Sequence of 146 digits
stage2.c Console application in ANSI C language for encoding Call Sign and Locator into a sequence of Dual Frequency CW Keying (DFCW) frequencies - developed independently. Can be used once. CALLSIGN, LOCATOR in the text stage2.c Sequence of N digits for CW
pi4-wav.sh shell script by PE1ITR to create a WAV file from PI4 modulations. To create a sound (sine wave), use the utility sox. Output of programs stage1.c and stage2.c WAV file with PI4 modulation, for transmission
run.zsh shell script to run mpv filename.WAV at the beginning of every minute. WAV file sound

Rule for writing call sign in the first part of the message (MGM)

The call sign string must be 8 characters long. After the call sign and "fraction" you need to add up to 8 characters to the line with spaces at the end.
table
By adding redundancy and the interleaved convolution function, these 8 characters during the encoding process are converted into a pseudo-random sequence of 146 characters. The duration of each symbol in the PI4 standard is chosen to be 2000/12000 = 0.1666 seconds. The total duration of the MGM part of the message, in which the call sign is transmitted using 4 tones -24.32 seconds.

Rule for creating a message in the second part of the beacon (CW) transmission

The length of the callsign and locator transmission at 12 WPM should be 12-20 seconds, for example, the message RA1AHQ ko59ct lasts 16.5 seconds. If the call sign is shorter, 4-digit, the length of the CW message is reduced and the length of the subsequent CW carrier is increased automatically, as provided in the script pi4-wav.sh.
Allowed characters are 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ/.
The time limit for the second part of the transmission is due to the fact that there must be time left for the “tuning” signal - the 800 Hz carrier.

To improve the readability of the calling beacon in noise, you can use the CW transmission pattern "VVV call sign locator".

800 Hz carrier for tuning (third part of transmission)

The sox utility, called with parameters from the pi4-wav.sh script, forms an 800 Hz carrier (for tuning for “zero beats”) in the remaining transmission time of up to 60 seconds - 60-24.3-16.5=19 seconds. Length of the last part of the carrier: 16-24 seconds depending on the different duration of the CW part.

Rule for broadcasting PI4 beacon messages

Messages must be time synchronized using the NTP protocol with maximum accuracy.
Accuracy to the second is acceptable. Message transmission starts at 00 seconds of every minute.

It is better to start transmitting PI4 at 58 or 59 seconds of every minute, because if the transmission starts late, PI4RX does not decode the signal.

Maximum deviations of the transmission start time from 0 seconds: -2.5...+1.2 s.

The message duration is slightly shorter than a minute, for example 58 or 59 seconds. Every minute the message is started from the beginning. The transmitter in USB (or DIG) mode for the beacon must be running continuously, and modulation is done by broadcasting a time-synchronized WAV file.
Transmitter frequency drift should not exceed +- 50 Hz (0.5 ppm= 72 Hz) at a frequency of 144.4 MHz.

Instructions (how to use the set of programs)

0) Install packages for compilation and the sox program for sound synthesis - a sine wave of a given frequency and phase.

sudo apt-get install build-essential sox

1) Correct the callsign in the source text of the stage1.c file. The call sign together with trailing spaces must occupy strictly 8 characters!
Compile the program and run it:

nano stage1.c
gcc stage1.c -o stage1
./stage1

2) Correct the text for the CW message of the second part of the beacon’s operation, compile the program, run it:

nano stage2.c
gcc stage2.c -o stage2
./stage2

3) Edit pi4-wav.sh - write down the sequences from points 1 and 2.

nanopi4-wav.sh

4) Run the file that will generate the WAV file for the beacon

bash pi4-wav.sh

4) Listen to the file in the same directory:result.wav

5) Improving the quality - reducing clicks when changing the frequencies of tones (FSK symbols) - In Audacity, apply a low-pass filter (remove frequencies from 2 kHz and above) using the "Equalizer" effect.

sudo apt-get install audacity
audacity result.wav

Select - All
Effects - Graphic EQ

eq

6) Save the processed sound to a file result!.wav.

7) Preparing to run the script - install zsh

sudo apt-get install zsh

8) Run the script under Linux run.zsh. The beacon will be transmitted from this PC.

9) Run the program under Windows PI4-RX. Let's look at the "waterfall" (for the test, I connected the sound source of one PC running Linux with a cable to a receiver on another PC running Windows. In real conditions, the first PC should output the signal to a transmitter with a beacon antenna, and the second PC should be far enough away from it to receive).

10) When observing several transmission cycles, we specify the time correction in the run.zsh file (I have a constant of -0.90 seconds) so that at reception there is a minimum deviation of the start of transmission from ~~ the beginning of the minute 0 seconds ~ ~ 59 seconds. For example, from -1.2 to +0.2 seconds depending on the cycle.
progress4

Archive with source codes of programs:
*pi4.zip


Date of last change: 08/11/2025



Related publications