Narrow-band weak signal mode for LF/MF

Ver 21.08.10 (beta)


MSK (Minimum Shift Keying) is very similar to PSK, but instead of changing the phase to signal data bits, the frequency is advanced or retarded a very small amount, sufficient to exactly achieve a 180 phase shift in one bit period. Because the phase modulation is produced without sudden changes in phase, the signal does not require other measures such as amplitude modulation to reduce the keying sidebands. The spectrum is virtually the same as PSK, but the phase relationship between the carrier and the data is different. MSK is little used on HF, but has been widely used on LF, notably (at 100 baud and 200 baud) for DGPS beacons, and (at 50 baud and 100 baud) for VLF submarine communications.

The HUGE advantage of MSK over PSK is that because there is no amplitude information on the signal, the transmitting amplifier need not be linear.

Designed for the Conditions

The LF and MF Amateur bands (2200m, 600m and 160m) are characterized by relatively stable carrier phase on received signals, accompanied by low Doppler shift. These bands have very strong lightning interference, but mostly local, not the background of random impulse noise typical of lower HF. While there is multi-path reception, especially on 160m, the path changes are slow. The slow fades can be very deep, and signals are generally quite weak, and frequently accompanied by man-made interference, so in order to have a conversation at typing speed on these bands we need a mode that is very sensitive, has excellent impulse noise and QRM tolerance, but need not have strong phase or Doppler tolerance.

It is no accident that MSK is used by military and commercial services on VLF and LF, or by the MF DGPS beacons around 300kHz. A well designed MSK mode can have all the features just described. In the ZL2AFP CMSK program, several important design features have been added to make a robust and very sensitivity MSK chat (QSO) mode.

We won't go into details here, but ZL2AFP CMSK uses convolutional FEC coding, an interleaver, and a very powerful synchronizing system based on a correlation technique. For maximum efficiency, a varicode is used to define the characters, and this is extended to include a Secondary Text capability typically used for automatic ID.

Mode Baud Rate Bandwidth Typing Speed ITU Definition
CMSK8 7.8125 12.5Hz 3.75 WPM 12H5F1B
CMSK31 31.25 50Hz 15 WPM 50H0F1B
CMSK63 62.55 100Hz 30 WPM 100HF1B
CMSK125 31.25 200Hz 60 WPM 200HF1B

The program offers symbol rates from 7.8125 to 125 baud, the default speed (pink background in the table) being CMSK63. The lowest speed is really only useful for beacon purposes, but given the extreme sensitivity, patience may reward you with a QSO! The default speed, 62.5 baud, has a reasonable typing speed, and sensitivity is so good that you can generally copy any CMSK signal you can see on the waterfall display.

The 125 baud mode has a transmitted bandwidth of under 200Hz, so is just within the bandwidth limit which applies in New Zealand.

This bandwidth is assured only if your transmitter is clean (noise, distortion and harmonic free) and has good carrier and sideband suppression!

Screenshot of the ZL2AFP MSK software
(Click on image for full-size view)

Guided Tour

Text Panes
Check out the screen-shot above. There are three text panes - the large receive pane at the top, a one-line strip just below centre (pink background - the Secondary Text display), and the yellow transmit text buffer pane below. Received text shows in the receive pane in dark green. What you type in the transmit buffer will appear in the receive pane as it is transmitted, but in red text.

The one-line Secondary Text strip shows the received Secondary Text (ID message), and once the line is full, it scrolls left as new text arrives. Transmitted Secondary Text does not show on the screen at the transmitting station.

The program window size defaults to a size suitable for a Netbook PC (600 pixels high). The height of the window can be stretched to suit other computers by dragging the top of the window up, or the bottom down. This enlarges only the receive pane. The width is fixed.

Function keys
A row of eight Function Keys F1 to F8 are shown below the transmit pane. These 'Macro Keys' place text into the keyboard buffer at the current cursor location. The key content can be defined by right-clicking on the button, and the keys are used by left-clicking the button or pressing the matching keyboard function key. You can also define the label on the key, as you see in the above example.

Function Key F9 is a special key, with its corresponding button labelled Send. This function key can't be changed in name or function. When you press F9 (or click on the Send button with the mouse), the transmitter starts and the button label changes to Receive. The transmission starts with any text already typed in the transmit pane, and will then send Secondary Text when the buffer is empty, interspersed with whatever characters you continue to type into the transmit buffer (make sure the cursor is in the transmit buffer by clicking the mouse there before typing).

To return to receive you can press the same F9 button, now labelled Receive. When you press the button, the transmitter stops IMMEDIATELY and the label changes back. This action is different from the F10 key function described next.

This button causes immediate return to receive, and you will lose everything currently in the transmit buffer.

F10 (labelled RX) can have it's content defined by right-clicking, but it has two special fixed functions. It defines the text used to indicate in the text buffer where an over finishes; when you press F10 or click the button, it places this text in the buffer. Edit this Function Key to assign a group of characters which you wish to use to cause the program to return to receive AFTER the transmit buffer has been emptied. Use a few characters that are unlikely to appear elsewhere in normal typing. For example, use '[EOT]' (the default setting), '{AR}' or '|RX|'.

Once defined, when you press the F10 key or click on the RX button at the end of your typed over, the transmission CONTINUES until the last of your typed text has been sent (and the EOT marker as well). This behaviour is what you expect when having a QSO, and is different to that of the F9 Send/Receive button (described above).

You can also use the same EOT marker in other Macro Keys, so you can automate the end of an over, as you can see in the screenshot example. Here are some Macro examples:


73 de ZL1XYZ RF72ku SK

During a QSO, you would normally use the F9 key to start an over, and the F10 key (or a macro containing the [EOT] sequence) to terminate the over.

Other Controls
To the right of the Function Keys is a further buttons, CWID, which causes the program to send an on-off keyed conventional Morse ID once. This feature is inhibited while transmitting.

Speed selection (which applies to both receive and transmit) is made using the radio buttons under the RX button. You can't change this while transmitting, and the selectors are then greyed out. The default speed is 63 baud, which has a typing speed of about 30 WPM and a sensitivity similar to PSK31 (although fewer errors).

Under the CWID button are two bar graph displays - on the left the Correlation Confidence (labelled SQL), and on the right the Signal to Noise Ratio (S/N). A horizontal line on the SQL bar graph indicates the confidence level above which the received text will print (i.e. the Squelch level). You can click on this bar graph to change the Squelch level. If you set it too high, weak signals may not print at all, or the last few words of a received transmission may not print. If set too low, you will have random text printed when there is no viable signal.

Tuning in Signals

At the bottom left of the program window is a waterfall tuning display, which works similarly to ARGO, except it moves down rather than sideways. Signals show as white on dark blue or with a multi-colour pallette (as in the example to the right). CW signals show as a thin line, while MSK signals tend to be broader - about 100Hz wide for CMSK63. A small red V marker on the scale above shows the current receiver tuning point, and left clicking on the waterfall (not the scale) changes reception tuning to the signal you click on, and moves the marker. This is no different from receiving PSK31 on popular HF programs.

A small blue | marker on the scale above the waterfall shows the current transmitter tuning point. On transmit, the transmitted signal tone does not follow the point you click on the waterfall to tune the receiver. This is because on MF you normally want to transmit on a particular frequency with high accuracy, and receiver tuning adjustment is usually only made to correct slight errors or to tune the receiver to someone else's frequency. The transmit centre frequency can be set to an exact frequency from the menu, or to any clear spot on the waterfall by right clicking on the waterfall. The default frequency is 1000Hz, but you can change it from the TX options menu to place the transmitted signal at an exact spot, to include any transmitter offset, coincide with the receiver tuning, in order to suit your favourite receiver filter.

Tuning Step 1: Click accurately on, or on the centre of, the CMSK signal. You can estimate the baud rate roughly from the width of the signal.

Eye Diagram
To the right of the waterfall is another little tuning window, called an 'Eye Diagram' (courtesy of Peter G3PLX). An enlarged example is shown here to the right. This display shows frequency in the horizontal direction, and time vertically, and the signal phase is painted on the diagram in sync with the received symbols. The pattern could be far more jumbled than shown, if the signal is weak. If the pattern is too wide or too thin, or there is no discernable eye, check that you have the correct symbol rate.

The signal needs to be fine-tuned so the elliptical 'eye' is centred on the cross hairs. The easiest way to do this is to slide the Fine Tune control under the display to centre the eye. In the vertical direction, the signal is automatically centered by the sync. If there is any tendency for the eye to slip or drift vertically, or not center well, the Sample Rate adjustment to the right of the slider can be used to correct this. In most cases the default 8000 samples/sec should be close enough. If the signal is weak and noisy, just tune as best you can and check the Correlation confidence bar graph for confirmation.

Tuning Step 2: Carefully and slowly (especially at lower baud rates) centre the eye of the CMSK signal. If the signal is very noisy or weak, this may not prove easy, so just centre the 'mess'.

Tuning Step 3: Watch the eye for vertical slip, and adjust the Sample Rate to minimize the vertical slip. Most computers will be close enough that this step will be a case of 'check' rather than 'adjust'.

One further receiver tuning display can be pulled up from the menu. This is the receiver PN-sequence Correlation Display or 'Correllogram' (see example on right). This is an amplified view of the correlator performance, frame by frame. It moves down slowly (speed depends on symbol rate), painting a line of correlator scores as it goes. Each dot represents the correlator score at each index (1 to 192 or 96) calculated as each bit is received. This display shows a black or grey dot where the correlation matches to indicate where the frame start offset is. The offset can move back and forth according to propagation delay (especially on 160m), or slide slowly sideways if the sampling rate between transmitter and receiver differ.

This diagram has several uses. First, it acts as a sensitive received signal detector. The correlation will show even if the signal is too weak to receive. It will of course also act as a mode sensor - if the speed is wrong (or the signal is not CMSK), the correlation line will not show. The display also acts as a fine tune feature for the sampling rate. Since the display does not scroll (it wraps around vertically), any mismatch in sample rate shows as a discontinuity between the new sample and the older ones below (as in the second example). Sometimes you will come across a signal with a sampling rate quite different to that of your computer, and the correlation line will step sideways occasionally. When this happens there is a risk of losing the correct text decoding, so use the Sample Rate control to correct this slant. If the line steps left, increase the Sample Rate, for example.

Tuning Step 4: Pull up the Correlogram. Watch the black line it slowly draws, looking for sideways slip, and adjust the Sample Rate to reduce this to a stable vertical line. Be patient - this takes time, especially at the slower speeds.

Once you have performed all four tuning steps, you should have best possible copy of the station you've tuned to. The process can be a little slow, but it gets better with practice, and it's worth the effort of doing it correctly.

Menu and Status Line

The menu line at the top of the program window has six entries:
Save screen to file now
Saves the complete receiver buffer (since the session started, and up to the point where Save File is requested) as a Rich Text file, with an automatically generated filename of the form 'CMSKdatetime.rtf'. FLWRAP files can be captured this way, and isolated from the resulting .rtf file by simply dropping the file on FLWRAP. Make sure you have captured both the [WRAP:beg] and [WRAP:end] metacommands. See http://www.w1hkj.com/Flwrap/index.html for more information.
(Transmit File)
No menu command is required. To transmit a file (a text file or WRAP file) simply drag and drop the file onto the program. Be aware that files longer than a few hundred bytes will take forever to transmit! Binary files and pictures can be sent, provided they have been pre-processed by the W1HKJ FLWRAP utility.
TX Options
Brings up a dialog allowing selection of the COM port used to control the transceiver PTT circuit.
Intended to define setup of computer control via CI-V protocol etc. Not yet implemented.
Transmit frequency
Defines the transmitter centre frequency (the frequency of the audio tone).
CWID speed
Defines the dot length for the Morse identification in milliseconds. The default value is 50ms (about 15 WPM).
Toggle beacon Mode ON/OFF
Enables or disables beacon mode. In beacon mode, whatever is in the transmit buffer is transmitted
over and over until the transmitter is stopped or the beacon mode is turned off.
Toggle tune signal ON/OFF
Turns the transmitter on and sends a centre frequency tuning carrier.
Starts the Windows sound mixer applet so you can set the input and output audio levels.
Audio Devices
Starts the Windows Sound and Audio Device Properties applet so you can choose which sound card to use.
Select soundcard
Brings up a small dialog which allows you to choose from the available sound cards or modules, which one to use with the program.
I and Q output
When 'I and Q' is selected, the left and right channels of the transmit output are the real (cosine) and imaginary (sine) renditions of the audio tones, i.e. with 90 phase difference. These are intended for use with a phasing type transmitter which requires quadrature inputs. The default mode is 'Mono', where both outputs are identical.
Correlation display
Enables a small window in which the recent correlation data is displayed, along with (in the banner) the Cross-correlator index and performance metrics.
Toggle waterfall pallette
Offers ARGO style (blue and white) or an alternative blue/cyan/white waterfall pallette.
Text options
Clear RX
Clears the receive pane and buffer
Clear TX
Clears the transmit buffer, but currently you need to return to receive and start transmit again for normal operation.
Secondary text
Dialog to allow setting the Secondary Text message. The default is callsign plus a following space. Will send 'nocall ' if no callsign has been set.
Allows you to set your callsign (will be used for CWID and also becomes default secondary text).
Pulls up the CMSK Help file (this file)
Pops up a small window which identifies the software and describes key parameters.
The status line at the bottom of the program lists (left to right) the receiver audio centre frequency, (where the red marker is); the indicated audio frequency and level (where the mouse is hovering if it is over the waterfall); the Tune signal status; whether the beacon mode is enabled or not; the current mode and interleaf setting; and the system date and time.

Installation and Setup

The program should run on most computers with Windows™ Win2000, WinXP or Win7. The program window is sized to work correctly on 600 pixel high 'Netbook' screens, and is known to work well on the Asus EEE PC. If you are new to PC sound card operation or digital modes by computer, see the * note below for further advice.
  1. Unzip the supplied archive into a new folder on your computer.
  2. Create a shortcut to the executable and drag it onto your desktop.
  3. Start the program using this shortcut, then click OK when the COM port warning message appears.
  4. From the menu, select TX options/PTT and set the COM port used to control the transmitter.
  5. From the menu, select Text options/Callsign and enter your callsign.
  6. From the menu, select Text options/Secondary text and enter a simple message, such as '-ZL1XYZ RF72ab -'.
  7. Right-click on the F10 button and define your EOT trigger (for example '{AR}').
  8. Check that the PTT works (operates the transmitter)*, then close the program (this saves the changes you have made).
  9. Start the program again, program any macros you need, set the transmit and receive audio levels as desired, using the Soundcard menu items. Windows™ Vista and 7 computers users may need to do this using operating system tools. Remember to set the receiver AGC to FAST. Then use the software for QSOs and enjoy yourself!
* If you have not previously used your rig with Digital Mode software, you will need to set up a digital interface which provides PTT control via a serial port, and handles the audio between the rig and the radio. For more information see:
Getting Started with Sound Card Digital Modes    Simple Digital Interface Design

If you have any questions or useful feedback about this program, please contact Con ZL2AFP (ZL2AFP at xtra dot co dot nz).

Copyright © Murray Greenman and Con Wassilieff 2010. All rights reserved.