The digital modes provide a wonderful opportunity for those of us who would like to work on the HF bands but find CW too difficult and SSB phone prohibitive because of interference problems. These modes require very little power to work the world. Generally 25 to 50 watts is plenty of power. The digital modes are comparable to CW in that their bandwidths are very narrow. Bandwidths generally range from about 30 to 200 Hz compared with SSB which is 2,100 Hz. This is a huge difference and one of the main reasons why the digital modes are so effective at low power. Because of their low power and modulation schemes, the digital modes do not interfere with telephones and answering machines in the neighborhood the way the SSB often does.
The digital modes are easy to set up and get operating. What is needed is an HF rig, a computer running one of the many software programs that are available either for free (most are) or for a small purchase price, and a hardware interface between the computer and radio. Most computers come with a sound card and these modes work via the sound card input and output circuits. A fairly easy interface between the sound card and radio can be built for around $7.00 or a very nice and very adequate interface can be purchased that will handle any chore you might throw at these modes.
Best of all, the digital modes are incredible easy to use. The major software programs utilize a waterfall display that shows all of the signals currently operating on the band. All you have to do is click on a signal with your mouse, and the QSO pops up on your computer screen. It doesn’t get any easier than that.
The digital modes described in this article are mainly found on the High Frequency bands and will require a General class license or above (except on 10 meters where a Technician with morse code privileges can operate from 28.100 to 28.300 MHz).
There is a wide choice of digital modes to choose from. However, the most popular modes today are PSK31, BAUDOT (RTTY), MFSK-16, and PACTOR. PSK31 is the most popular of the digital modes because it is very effective at low power, is easy to set up (it requires only an HF radio and a computer with a sound card), and its waterfall display makes it extremely easy to use. Baudot RTTY is the second most popular, particularly for DX and contest work. RTTY is the oldest of the digital modes. However, new software with waterfall displays and using the computer’s sound card as the HF radio interface has given the old standby a new look. MFSK-16 is one of the newest modes that shows considerable promise. It is a good weak signal performer, reportedly better than PSK31, particularly for DX contacts that involve signal paths that pass through the Earth’s polar regions. It is a little more difficult to operate than PSK31 but does use a waterfall display and sound card radio interface. PACTOR is the most popular of the error correcting class of digital modes that includes AMTOR, Clover, and G-TOR. These modes utilize relatively complex protocols that automatically detect and recover from transmission errors through a combination of forward error correction and automatic retransmissions. They are excellent for message handling in that they deliver error free text to the computer screen. However, they are more than what is needed for most casual amateur radio QSOs. Because of their complex protocols, these modes require a multi-mode hardware controller box between the computer and HF radio. The multi-mode controller makes these modes more expensive to implement and a little more difficult to operate than the modes using waterfall displays and sound card interfaces. One point to mention about the sound card interface is that once you have it installed, you can switch between the various modes that use the interface (PSK31, RTTY, MFSK-16, and others) by simply activating the appropriate software package on your computer.
Where on the HF bands do you find hams using the digital modes? The following chart shows you were to look.
BAND
PSK31
RTTY
MFSK-16
PACTOR
80 Meters
3.580 - 3.584
3.580 - 3.620
3.610
3.580 - 3.620
40 Meters
7.070 - 7.074
7.080 - 7.100
7.080
7.080 - 7.100
30 Meters
10.130 - 10.140
10.130 - 10.140
10.130 - 10.140
10.130 - 10.140
20 Meters
14.070 - 14.074
14.070 - 14.095
14.080
14.070 - 14.095
18 Meters
18.100 - 18.105
18.100 - 18.105
18.100 - 18.105
18.100 - 18.105
15 Meters
21.070 - 21.074
21.070 - 21.100
21.080
21.070 - 21.100
12 Meters
24.920 - 24.925
24.920 - 24.925
24.920 - 24.925
24.920 - 24.925
10 Meters
28.120 - 28.124
28.070 – 28.120
28.130
28.070 - 28120
Where do you find the interface hardware and software that you need? 90% of the digital mode hams are using RIGblaster as the hardware interface and either MixW or Digipan as the digital mode software.
RIGblaster is the easiest way to properly connect a radio to a computer’s sound card. RIGblaster provides adjustable impedance and level matching between the sound card and the radio’s audio input and outputs. Without proper impedance and level matching, a sound card can overdrive the radio’s modulator resulting in a "dirty" wide bandwidth signal being transmitted that will annoy others on the band. RIGblaster also eliminates the need for a separate transmit/receive switch and permits easy switching between digital modes and SSB voice operation. RIGblaster is available in several models ranging in price from about $60 to $140. My choice is the RIGblaster PLUS at $140. This interface handles all aspects of the digital modes from rig control to sending CW using your computer keyboard. RIGblaster is built by West Mountain Radio and can be purchased through AES Ham Radio catalog (telephone number 1-800-558-0411 or on the web at www.aesham.com.
The digital mode software packages include the following:
PSK31SBW - This is a bare bones program that will get you on the bands using PSK31 that has no frills (i.e. no logging capabilities or other mode selections). This is a very small software program. It could be run off a floppy.
Digipan – This is one of the most popular PSK31 programs. Digipan has a more than adequate logging program to help make your record keeping easier. This is one of the first programs that I operated with and it worked quite well. Very user friendly which is most important especially if you decide to operate during a contest (i.e. Field Day)
Logger – This was one of the first true PSK31 programs that has a more than adequate logging program that tracks most of the award possibilities that one could garner if you were trying for awards from the ARRL. The author of this program added another program (Zakanaka) that came with a user interface that had the appearance of the above-mentioned Digipan. With in the past year the author has changed the Logger/Zakanaka to one program called Logger32b. It includes all of the bells and whistles of Logger/Zakanaka and includes Baudot capability. Zakanaka adds the waterfall capability to Logger PSK31.
Hamscope – This program is a good all around program that will handle most of the modes that you would be interested in operating. It will operate PSK31, QPSK, RTTY, CW, ASCII, PACTOR (receive only) and has some minimal logging capabilities.
MixW – This is the software program that was recently written about in QST. This is probably the preeminent digital program available. There is very little in the digital mode arena that cannot be done with this program. The user interface is very good. It has an excellent logging program and you can even design and print QSL cards. It handles all the chores of contesting quite well. Once you download MixW, you are given a 15 day trial period and then it quits working. The author will send you a file, that you put in the MixW directory. It will unlock the program once you pay the registration fee ($50). This program is well worth the $50 cost. It is my favorite. You can obtain this program through their web site at www.mixw.net
WinPSK – This program handles many of the PSK and logging chores that a digital operator would require.
MMTTY – This is a software program written solely for use on Baudot (RTTY). It has a very good user interface and a so so logging program. This program can be linked (for logging) to the Logger program listed above. MMTTY has a tuning scope for tuning in RTTY signals as part of the user interface. The tuning scope is really neat.
Stream – This is another stand-alone program for operating MFSK-16. Stream does the job for this mode but has some short comings. Most of the other programs have a waterfall at the bottom of the screen to see the signals on the band. In contrast, Stream has a vertical display that shows the signals on the band coming from the right side of the screen. This can make tuning the signals a little more difficult. One other fault with this program is the process required to begin transmitting. You must put your cursor on the bottom windowpane and hit the enter key. The transmitter then comes up. This makes it difficult if you want to enter text in the type ahead buffer before you transmit. I like to put text in the buffer while the other station is sending text to me. Makes it easier to comment about what was said by the other operator.
W1QSL – This program really puts on a show. How about copying 21 PSK31 QSO’s at one time. With this program you have a vertical display that has the signals on the band scrolling from the left to the right. Touch on a signal on the display and a box opens up with the text flowing. Touch another signal and another box opens up, and so on. Open as many as 21 PSK31 windows at once. I’ve told my wife that I can do two or three things at one time, but I will not confess to her that I have trouble reading all of the conversation and remembering what each QSO is about. Whew!
There are many other programs that I have not included. There are far to many to list in this article. Let me try and make it easier for you though, take your browser and point to one of the following URL’s to download most of the programs I listed above or to read more information about the various modes. Try this URL and you will get a chance to hear little snippets of what each of the listed modes above sound like (http://www.wb8nut.com/digital.html). Another URL that you will find interesting and informative is (http://www.aintel.bi.ehu.es/psk31.html). One last website is (http://home.wanadoo.nl/nl9222/digisoft.htm). This website has a very extensive list of programs that can be download for free or might have a small fee it they are shareware.
Wednesday, April 7, 2010
PSK Fundamentals
Background: The PSK31 philosophy.
PSK31 is the result of my belief that the present batch of "data" modes have left a gap in amateur radio operating, the gap that was previously filled by AMTOR or even traditional RTTY, in which two or more operators chat to each other on an open channel. Modes such as packet radio, Pactor, and others, are highly complex, are unsuited to multiway conversations, and in particular, the long block lengths introduce an unacceptable delay in the processing of text such that even normal conversation is unpleasant and quick-break question/answer sessions are impossible. The move to automated unattended message forwarding has left a gap in the person-to-person communication field, and PSK31 is an attempt to remedy this situation with a simple but efficient code structure coupled with the narrowest possible bandwidth, and with only enough error-correction to match typical typing-error rates, and with no time-consuming synchronisation, changeover, and ARQ processes.
The 31 baud BPSK modulation system used in PSK31 was introduced by SP9VRC in his SLOWBPSK program written for the EVM. Instead of the traditional frequency-shift keying, the information is transmitted by patterns of polarity-reversals (sometimes called 180-degree phase shifts). This process can be thought of as equivalent to sending information by swapping-over the two wires to the antenna, although, of course, the keying is more usually done back in the audio input into the transceiver. A well-designed PSK system will give better results than the conventional FSK systems that amateurs have been using for years, and is potentially capable of operation in much narrower bandwidths than FSK. The 31 baud data rate was chosen so that the system will just handle hand-sent typed text easily.
There is a problem with PSK keying which doesn't show up with FSK, and that is the effect of key-clicks. We can get away with hard FSK keying at moderate baudrates without generating too much splatter, but polarity reversals are equivalent to simultaneous switching-off of one transmitter and switching-on of another one in antiphase: the result being keyclicks that are TWICE AS BAD as on-off keying, all other things being equal. So if we use computer logic to key a BPSK modulator such as an exclusive-or gate, at 31 baud, the emission would be extremely broad. In fact it would be about 3 times the baudrate wide at 10dB down, 5 times at 14dB down, 7 times at 17dB down, and so on (the squarewave Fourier series in fact)
The solution is to filter the output, or to shape the envelope amplitude of each bit which amounts to the same thing. In PSK31, a cosine shape is used. To see what this does to the waveform and the spectrum, consider transmitting a sequence of continuous polarity-reversals at 31 baud. With cosine shaping, the envelope ends up looking like full-wave rectified 31Hz AC. This not only looks like a two-tone test signal, it IS a two-tone test signal, and the spectrum consists of two pure tones at +/-15Hz from the centre, and no splatter. Like the two-tone and unlike FSK, however, if we pass this through a transmitter, we get intermodulation products if it is not linear, so we DO need to be careful not to overdrive the audio. However, even the worst linears will give third-order products of 25dB at +/-47Hz (3 times the baudrate wide) and fifth-order products of 35dB at +/-78Hz (5 times the baudrate wide), a considerable improvement over the hard-keying case. If we infinitely overdrive the linear, we are back to the same levels as the hard-keyed system.
There is a similar line of reasoning on the receive side. The equivalent to "hard-keying" on the receive side is a BPSK receiver which opens a gate at the start of a bit, collects and stores all the received signal and noise during the bit, and then "snaps" the gate shut at the end. This process gives rise to the receive-side equivalent of key-clicks, namely sidelobes on the receiver passband. So, although this "integrate-and-dump" method is 100% efficient in the task of sorting out signal from noise, it will only reject signals by 10dB at 3 times the baudrate wide and so on, the same spurious rejection figures that we got as spurious emission figures for the transmit side. The PSK31 receiver overcomes this by filtering the receive signal, or by what amounts to the same thing, shaping the envelope of the received bit. The shape is more complex than the cosine shape used in the transmitter: if we used a cosine in the receiver we end up with some signal from one received bit "spreading" into the next bit, an inevitable result of cascading two filters which are each already "spread" by one bit. The more complex shape in the receiver overcomes this by shaping 4 bits at a time and compensating for this intersymbol interference, but the end result is a passband that is at least 64dB down at +/-31Hz and beyond, and doesn't introduce any inter-symbol-interference when receiving a cosine-shaped transmission.
Note that the transmitter and receiver filters have to be "matched" to each other for the ISI performance to be right. Some systems like this use a pair of identical receive and transmit filters which are matched. If I did this and someone else came along wanting to improve the performance, they would have to get everyone else to change their transmit filters. I have therefore chosen to use the simple cosine shape for the transmitter and match that in the receiver. This leaves the way open for others to develope better receivers without new transmitters being incompatible with old. This is slightly different from the SP9VRC approach.
To summarise: PSK31 has been designed not only to give all the weak-signal-in-white-noise advantages that PSK has to offer, but to go further and optimise the performance in the presence of other signals, to reject them on receive and not to interfere with them on transmit. PSK31 is therefore ideally suited to HF use, and would not be expected to show any advantage over the hard-keyed integrate-and-dump method in areas where the only thing we are fighting is white noise and we don't need to worry about interference.
The QPSK mode
In December 1997, PSK31 introduced the QPSK mode. In this mode, instead of just keying by phase reversals, that is, 180-degree phase-shift, an additional pair of 90 and 270 degree phase-shifts are possible. If you thought of BPSK as reversing the polarity of the signal, then QPSK can be thought of as two BPSK transmitters on the same frequency but 90 degrees out of phase with each other. By thinking of the receiver as being two BPSK demodulators at 90 degrees, we have two channels sharing the same frequency, but of course, with only half the transmitter power in each. We therefore have twice the bit-rate but at 3dB less signal-to-noise ratio. We could use this feature to transmit data at twice the speed with 3dB less noise margin.
The PSK31 philosophy is to stay at the speed needed to handle hand-keyed text, so why do we condider QPSK at all? The answer is that we can use the extra capacity to reduce the error-rate while keeping the bandwidth and the traffic speed the same. Note that because we have a 3dB SNR penalty with QPSK, any error-correction scheme we introduce has to be at least good enough to correct the extra errors which result from the 3dB SNR penalty, and preferably a lot more, or it will not be worth doing. By doing simulations in a computer, and tests on the bench with a noise generator, it has been found that when the bit error-rate is less than 1% with BPSK, it is much better than 1% with QPSK and error-reduction, but when the BER is worse than 1% on BPSK, the QPSK mode is actually worse than BPSK. Therefore, if we are dealing with radio paths where the signal is just simply very noisy, there is actually no advantage to QPSK at all!
However, all the tests we have done on the air show that QPSK with the chosen error-reduction scheme is better than BPSK, except where we have deliberately attenuated the signal to make it artificially weak. Typical radio circuits are far from being non-fading with white noise. Typical radio paths have errors in bursts rather than randomly spread, and error-reduction schemes can give useful benefits in this situation in a way that cannot be achieved by anything we can do in the linear part of the signal path. With the code used in PSK31, a 5:1 improvement is typical, but it does depend on the kind of path being used. For this reason it is worth keeping both modes available and remembering that there may be times when one mode works betterthan the other and others when the reverse will be the case. When comparing PSK31 with other modes, remember that the switch between "straight" and "error-corrected" modes in PSK31 is done with both the bandwidth and the data-rate remaining the same. In most other systems that can switch, either the bandwidth or the data rate changes when the system switches, and the figures for error-rate improvement can be misleading unless they are carefully compared.
The error-reduction code chosen is one of a type known as convolutional codes. The code systems used in the past have been block codes, where each character is a fixed-length code, and a fixed number of extra bits are added to make a longer block, and this longer block is capable of correcting errors within itself. These extended blocks are then transmitted as a serial bitstream. In a convolutional code, the characters are converted to a bitstream and then this bitstream is itself processed to add the error-reduction qualities. There is no relationship between the boundaries between characters and the error-reduction process. Since the channel errors are also not related in any way to the character boundaries, convolutional codes are better suited to serial links than block codes, which were originally designed for protecting errors in memory banks and similar structures.
It is not quite correct to refer to the convolutional code system as "error-correcting", since the raw data is not actually transmitted in it's original form and therefore it makes no sense to talk about it being corrupted by the link and corrected in the decoder. In PSK31, the raw data is transformed from binary (1 of 2) to quaternary (1 of 4) in such a way that there is a precisely known pattern in the sequence of quaternary symbols. In the code used in PSK31, the pattern of quaternary symbols is derived from a run of 5 consecutive data bits. For example, if we label the four phase-shifts as A, B, C, and D, and suppose that the transmitter sends continuous A's when the raw datastream is sending continuous 0's. Because the convolutional encoder works on a run of five bits, when the datastream sends ..000010000..., the transmitter actually sends ..AAAADCCBDAAAA..., that is, each binary bit to be transmitted results in a unique 5-symbol sequence, overlapping with the sequences from adjacent bits, in a predictable way which the receiver can use to estimate the correct sequence even in the presence of corruptions in parts of the sequence.
The decoder, known as a Viterbi decoder after the man who thought of it, is not really a decoder at all, but a whole bank of parallel encoders, each fed with one possible "guess" at the transmitted data sequence. The outputs of these parallel encoders are all compared with the received symbol-stream. Each time a new symbol is received, the encoders need to add an extra bit to their sequence guesses and consider that the new bit might be a 0 or a 1. This doubles the number of sequence guesses, but a clever technique allows half of all the guessed sequences to be discarded as being less likely than the other half, and this means that the number of guesses being tracked stays constant. After a large number of symbols have been received, the chances of a wrong guess at the first symbol tends to zero, so the decoder can be pretty sure that the first bit was right and it can be fed to the output. In practice this means that the decoder always outputs decoded data bits some time after they have been received. This delay in PSK31 is 20 bits (640mS) which is long enough to make sure that the decoder has done a good job, but not so long that it introduces an unacceptable delay in displaying the received text.
.
Information Coding: Varicode
This is a description of the variable-length coding used in the 31.25 baud BPSK system.
The normal asynchronous ASCII coding used on the original version of this system by SP9VRC, and indeed the asynchronous system used for transmission of RTTY for the last 50 years, uses one start-bit, a fixed number of data-bits, and one or more stop-bits. The start-bit is always the opposite polarity to that of the stop-bit. When no traffic is being sent the signal sits in stop polarity. This enables the receiver to start decoding as it receives the edge between the stop-signal and the start-bit.
One disadvantage of this process is that if, during a long run of traffic, an error occurs in either a stop-bit or a start-bit, the receiver will lose synchronisation, and may take some time to get back into sync, depending on the pattern of following characters: in some situations of repeated characters the receiver can even stay in a false sync. for as long as the repeated pattern persists.
Another disadvantage of this system arises when, as will be the case for normal amateur radio contacts, the traffic being sent consists of plain language. In all languages there are some characters which occur more often that others and there are some which may hardly ever be used. In morse code this is used to advantage by using short codes for the common letters and longer codes for less-common ones. In the asynchronous start-stop system all characters are neccesarily the same length, and so the overall speed of transmission of plain-language is not as fast as a variable-length code would be.
The variable-length code used in the BPSK system overcomes both these disadvantages, and works in the following way.
1. All characters are separated from each other by two consecutive 0 bits.
2. No character contains more than one consecutive 0 bit.
It follows from this that all characters must begin and end with a 1.
With such a code, the receiver detects the end of one code and the beginning of the next by detecting the occurence of a 00 pattern, and since this pattern never occurs inside a character, the "loss of sync" problem that occurs with asynchronous systems can never occur. The 00 gap between characters is equivalent to the gap between letters in morse code in this respect, and in a similar way allows the possibility of a variable-length code system.
The variable-length coding used in the BPSK system was chosen by collecting a large volume of English language ASCII text files and analysing them to establish the occurrence-frequency of each of the 128 ASCII characters. Next a list was made of all the binary patterns that meet the above rules, namely that each pattern must start and end with a 1, and must not contain more than 1 zero in a row. This list was generated by computer, starting at the shortest. The list was stopped when 128 patterns had been found. Next the list of ASCII codes, in occurence-frequency order was matched to the list of binary patterns, in length order, so that the most frequently-occuring ASCII codes were matched to the shortest patterns, and that completed the variable-code alphabet. To finish the job, a simple calculation was made to predict the average number of bits in typical plain language text transmitted by this code, taking into account the 00 gap between characters. The result was between 6 and 7 bits per character. This compares very favourably with 9 bits per character for the asynchronous system.
The actual alphabet is shown below, shown in ASCII order starting with NUL and ending with DEL.
Note that the lower case letters have the shortest patterns and so are the fastest to transmit. NUL 1010101011
SOH 1011011011
STX 1011101101
ETX 1101110111
EOT 1011101011
ENQ 1101011111
ACK 1011101111
BEL 1011111101
BS 1011111111
HT 11101111
LF 11101
VT 1101101111
FF 1011011101
CR 11111
SO 1101110101
SI 1110101011
DLE 1011110111
DC1 1011110101
DC2 1110101101
DC3 1110101111
DC4 1101011011
NAK 1101101011
SYN 1101101101
ETB 1101010111
CAN 1101111011
EM 1101111101
SUB 1110110111
ESC 1101010101
FS 1101011101
GS 1110111011
RS 1011111011
US 1101111111
SP 1
! 111111111
" 101011111
# 111110101
$ 111011011
% 1011010101
& 1010111011
' 101111111
( 11111011
) 11110111
* 101101111 + 111011111
, 1110101
- 110101
. 1010111
/ 110101111
0 10110111
1 10111101
2 11101101
3 11111111
4 101110111
5 101011011
6 101101011
7 110101101
8 110101011
9 110110111
: 11110101
; 110111101
< 111101101
= 1010101
> 111010111
? 1010101111
@ 1010111101
A 1111101
B 11101011
C 10101101
D 10110101
E 1110111
F 11011011
G 11111101
H 101010101
I 1111111
J 111111101
K 101111101
L 11010111
M 10111011
N 11011101
O 10101011
P 11010101
Q 111011101
R 10101111
S 1101111
T 1101101
U 101010111 V 110110101
X 101011101
Y 101110101
Z 101111011
[ 1010101101
\ 111110111
] 111101111
^ 111111011
_ 1010111111
. 101101101
/ 1011011111
a 1011
b 1011111
c 101111
d 101101
e 11
f 111101
g 1011011
h 101011
i 1101
j 111101011
k 10111111
l 11011
m 111011
n 1111
o 111
p 111111
q 110111111
r 10101
s 10111
t 101
u 110111
v 1111011
w 1101011
x 11011111
y 1011101
z 111010101
{ 1010110111
| 110111011
} 1010110101
~ 1011010111
DEL 1110110101
The narrow bandwidth of both psk31 modes is shown above.
Contact Information
The source code which you may have with this distribution is freeware, provided it is used only for amateur purposes. If you have suggestions for improvements, or you find bugs, please report them back to me and do not broadcast your own modifications or bug-fixes
Peter Martinez G3PLX
High Blakebank Farm
Underbarrow
Kendal
Cumbria LA8 8BN
United Kingdom
peter.martinez@btinternet.com
--------------------------------------------------------------------------------
Sound Card DSP Setup and Operating Tips - Some tips from
For most Ham Radio situations it will not be necessary to isolate with opto-couplers or transformers between the PC sound card and the radio. A simple interface between the computer and the radio can be constructed in a few hours time using junk box or Radio Shack parts. It is very important to use shielded cables and extra attenuation to the radio input. You can use small coax for the interface cable if you are careful to keep the shield on the "cold" side of the circuit. Make sure the shield is grounded to the radio chassis on any type cable you do use. Locate the appropriate connectors to fit your sound card and the radio jacks. A simple resistor network is used to attenuate the audio signal to the input of the MIC or AUX IN connector of the radio. If you are not handy with the solderring iron, several commercial interfaces are offered via the web, such as RigBlaster, to name one. The interface here applies to all the new sound card digi modes including SSTV!
To build your own interface follow these instructions. Connect a shielded audio cable from the audio output of your SSB transceiver to the LINE IN jack of your sound card. Connect to either left, right or both of the stereo inputs. (Don't use the MIC input on the sound card.) It's best to use the auxiliary audio output on the transceiver which does not vary in level with speaker volume. This single cable is all that is needed to monitor digi signals with a program.
Make another shielded cable, that includes a simple resistor attenuation pad, between the sound card LINE OUT and the transceiver audio input. (See diagram below.) The pad will prevent high inter-modulation distortion (IMD) caused by overdriving the first audio amp stage of the transceiver. This resistor pad is not strictly neccessary because you can adjust the sound card output to a very low level by using the Windows Master Sound Control Panel, however this will cause your PC system sound levels to be barely audible. (Ham programs like the MixW V2.0 will allow you to independantly adjust the audio out for each mode, but this is not found in other programs.) Using the MIC Gain control may not be adaquit to prevent overdriving the first audio amplifier stage on some radios. Using a variable resistance pad will give you flexibilty to balance your audio levels for use with other PC devices. Finally, use the sound card mixer control program (see example below) to make final adjustments of the audio levels.
Adjust the sound card audio INPUT level such that a nominal signal tuned in on the transceiver will be seen prominently in the program signal display window without overdriving the sound card input. (See PSK31 Screen Shot for an example of how this might look on the several ham programs.) Use the MASTER control to adjust the sound to the PC speakers (if you use them) and then re-adjust the other levels as needed. Note that other windows applications you run on your PC that provide sound card adjustment controls (such as WinAmp) may change your PSK31 settings! You may have to re-adjust these levels. Generally, once these levels have been set, you will not need to change them.
Adjust the sound card audio OUTPUT level to the transceiver such that a small amount of ALC voltage is detected at the transceiver while transmitting into a proper antenna load (50 ohms) with the MIC Gain control at a nominal setting. After this adjustment, you can reduce the MIC gain control slightly to achieve full output power with no ALC deflection. Note that full output on a 100 watt transceiver would be about 100 watts if using a single tone (CW) from the sound card, but would be about 50 watts if using the double tones of a PSK31 carrier.
When you get your first PSK31 contact, ask the other station for an "IMD report" on your signal. (You must allow several seconds of "no text" for the reading to be made.) A properly adjusted audio input level to your transceiver will have an IMD at least -20 dB below the carrier and a very clean signal will be around -28 dB. It should be noted that a strongly received PSK31 signal (S9 or greater) can appear to have a high IMD level when viewed on the digi program display. This is often the fault of the receiver's front-end being over driven by the strong signal. Before issuing a bad IMD report to another station, you should add attenuation to the receiver and observe the reading under a nominal signal strength.
The most simple sound card to radio interface is with a single shielded audio cable between the transceiver AUX audio output and sound card input, and another between the sound card output and the AUX audio input on the back of the transceiver. Using a program like MixW, that supports CAT functions for most popular radios, a single RS232 cable is used to control the transceiver for TX and RX. For this setup, the audio output from the sound card must be adjusted very low to achieve a clean signal.
If you don't have VOX or CAT operation to act as your transceiver T/R switch, you can make a simple circuit that will switch your T/R automatically as you send and receive from the program. Use the DTR or RTS and GND pins from your computers unused serial comport to turn ON/OFF a simple transistor switch that operates the transceiver PTT input line. The configuration menu in your digi program will let you select the comport you will use.
The homemade interface described above need not be a complicated work of electronic design! A picture of a simple MIC attenuator wired with a variable resistor and a RS232 PTT switch DB9 connector that were both in use for several years is shown here.
A tip for good PSK31 operation is to use the split VFO function of most modern transceivers. Set up the transceiver to allow transmission in the SSB mode and reception in the CW mode, so that the CW narrow IF filter can be used to eliminate QRM.
Another tip to help detect weak PSK31 signals in the presence of stronger signals is to turn OFF the receiver's AGC feature. This will allow the receiver to operate at full linearity and not reduce gain when a strong signal is present. Adding some attenuation to the front-end and using a narrow IF filter is advisable. Without receiver AGC your S-meter will not function and some strong signals may appear to be distorted, but with a sensitive waterfall display and a radio with good dynamic range, you will still be able to decode the weaker signals.
Operate at the power level needed to produce good printing. Operate PSK31 mode at half (or less) the rated power of the transceiver. Operate all digi modes at a level that produces no ALC voltage to the PA.
Multi-path QSB (flutter) will cause serious difficulty for PSK31 mode! Switch to MFSK16 or Feld Hell modes to elliminate this problem.
Use the other HF bands to find digi contacts when conditions permit. Try 7.0710 Mhz on 40 meters, 10.140 on 30 meters and 3581 on 80 meters in North America.
Use BPSK mode for calling and all normal PSK31 operation. Try QPSK mode if the print quality drops to 80% due to static or noisy band conditions.
Using lower case letters instead of all caps, will increase PSK31 speed and reduce TX time.
Space QSOs at least 100hz apart and help demonstrate the efficiency of these new low power narrow band digi modes.
Have Fun!
PSK31 is the result of my belief that the present batch of "data" modes have left a gap in amateur radio operating, the gap that was previously filled by AMTOR or even traditional RTTY, in which two or more operators chat to each other on an open channel. Modes such as packet radio, Pactor, and others, are highly complex, are unsuited to multiway conversations, and in particular, the long block lengths introduce an unacceptable delay in the processing of text such that even normal conversation is unpleasant and quick-break question/answer sessions are impossible. The move to automated unattended message forwarding has left a gap in the person-to-person communication field, and PSK31 is an attempt to remedy this situation with a simple but efficient code structure coupled with the narrowest possible bandwidth, and with only enough error-correction to match typical typing-error rates, and with no time-consuming synchronisation, changeover, and ARQ processes.
The 31 baud BPSK modulation system used in PSK31 was introduced by SP9VRC in his SLOWBPSK program written for the EVM. Instead of the traditional frequency-shift keying, the information is transmitted by patterns of polarity-reversals (sometimes called 180-degree phase shifts). This process can be thought of as equivalent to sending information by swapping-over the two wires to the antenna, although, of course, the keying is more usually done back in the audio input into the transceiver. A well-designed PSK system will give better results than the conventional FSK systems that amateurs have been using for years, and is potentially capable of operation in much narrower bandwidths than FSK. The 31 baud data rate was chosen so that the system will just handle hand-sent typed text easily.
There is a problem with PSK keying which doesn't show up with FSK, and that is the effect of key-clicks. We can get away with hard FSK keying at moderate baudrates without generating too much splatter, but polarity reversals are equivalent to simultaneous switching-off of one transmitter and switching-on of another one in antiphase: the result being keyclicks that are TWICE AS BAD as on-off keying, all other things being equal. So if we use computer logic to key a BPSK modulator such as an exclusive-or gate, at 31 baud, the emission would be extremely broad. In fact it would be about 3 times the baudrate wide at 10dB down, 5 times at 14dB down, 7 times at 17dB down, and so on (the squarewave Fourier series in fact)
The solution is to filter the output, or to shape the envelope amplitude of each bit which amounts to the same thing. In PSK31, a cosine shape is used. To see what this does to the waveform and the spectrum, consider transmitting a sequence of continuous polarity-reversals at 31 baud. With cosine shaping, the envelope ends up looking like full-wave rectified 31Hz AC. This not only looks like a two-tone test signal, it IS a two-tone test signal, and the spectrum consists of two pure tones at +/-15Hz from the centre, and no splatter. Like the two-tone and unlike FSK, however, if we pass this through a transmitter, we get intermodulation products if it is not linear, so we DO need to be careful not to overdrive the audio. However, even the worst linears will give third-order products of 25dB at +/-47Hz (3 times the baudrate wide) and fifth-order products of 35dB at +/-78Hz (5 times the baudrate wide), a considerable improvement over the hard-keying case. If we infinitely overdrive the linear, we are back to the same levels as the hard-keyed system.
There is a similar line of reasoning on the receive side. The equivalent to "hard-keying" on the receive side is a BPSK receiver which opens a gate at the start of a bit, collects and stores all the received signal and noise during the bit, and then "snaps" the gate shut at the end. This process gives rise to the receive-side equivalent of key-clicks, namely sidelobes on the receiver passband. So, although this "integrate-and-dump" method is 100% efficient in the task of sorting out signal from noise, it will only reject signals by 10dB at 3 times the baudrate wide and so on, the same spurious rejection figures that we got as spurious emission figures for the transmit side. The PSK31 receiver overcomes this by filtering the receive signal, or by what amounts to the same thing, shaping the envelope of the received bit. The shape is more complex than the cosine shape used in the transmitter: if we used a cosine in the receiver we end up with some signal from one received bit "spreading" into the next bit, an inevitable result of cascading two filters which are each already "spread" by one bit. The more complex shape in the receiver overcomes this by shaping 4 bits at a time and compensating for this intersymbol interference, but the end result is a passband that is at least 64dB down at +/-31Hz and beyond, and doesn't introduce any inter-symbol-interference when receiving a cosine-shaped transmission.
Note that the transmitter and receiver filters have to be "matched" to each other for the ISI performance to be right. Some systems like this use a pair of identical receive and transmit filters which are matched. If I did this and someone else came along wanting to improve the performance, they would have to get everyone else to change their transmit filters. I have therefore chosen to use the simple cosine shape for the transmitter and match that in the receiver. This leaves the way open for others to develope better receivers without new transmitters being incompatible with old. This is slightly different from the SP9VRC approach.
To summarise: PSK31 has been designed not only to give all the weak-signal-in-white-noise advantages that PSK has to offer, but to go further and optimise the performance in the presence of other signals, to reject them on receive and not to interfere with them on transmit. PSK31 is therefore ideally suited to HF use, and would not be expected to show any advantage over the hard-keyed integrate-and-dump method in areas where the only thing we are fighting is white noise and we don't need to worry about interference.
The QPSK mode
In December 1997, PSK31 introduced the QPSK mode. In this mode, instead of just keying by phase reversals, that is, 180-degree phase-shift, an additional pair of 90 and 270 degree phase-shifts are possible. If you thought of BPSK as reversing the polarity of the signal, then QPSK can be thought of as two BPSK transmitters on the same frequency but 90 degrees out of phase with each other. By thinking of the receiver as being two BPSK demodulators at 90 degrees, we have two channels sharing the same frequency, but of course, with only half the transmitter power in each. We therefore have twice the bit-rate but at 3dB less signal-to-noise ratio. We could use this feature to transmit data at twice the speed with 3dB less noise margin.
The PSK31 philosophy is to stay at the speed needed to handle hand-keyed text, so why do we condider QPSK at all? The answer is that we can use the extra capacity to reduce the error-rate while keeping the bandwidth and the traffic speed the same. Note that because we have a 3dB SNR penalty with QPSK, any error-correction scheme we introduce has to be at least good enough to correct the extra errors which result from the 3dB SNR penalty, and preferably a lot more, or it will not be worth doing. By doing simulations in a computer, and tests on the bench with a noise generator, it has been found that when the bit error-rate is less than 1% with BPSK, it is much better than 1% with QPSK and error-reduction, but when the BER is worse than 1% on BPSK, the QPSK mode is actually worse than BPSK. Therefore, if we are dealing with radio paths where the signal is just simply very noisy, there is actually no advantage to QPSK at all!
However, all the tests we have done on the air show that QPSK with the chosen error-reduction scheme is better than BPSK, except where we have deliberately attenuated the signal to make it artificially weak. Typical radio circuits are far from being non-fading with white noise. Typical radio paths have errors in bursts rather than randomly spread, and error-reduction schemes can give useful benefits in this situation in a way that cannot be achieved by anything we can do in the linear part of the signal path. With the code used in PSK31, a 5:1 improvement is typical, but it does depend on the kind of path being used. For this reason it is worth keeping both modes available and remembering that there may be times when one mode works betterthan the other and others when the reverse will be the case. When comparing PSK31 with other modes, remember that the switch between "straight" and "error-corrected" modes in PSK31 is done with both the bandwidth and the data-rate remaining the same. In most other systems that can switch, either the bandwidth or the data rate changes when the system switches, and the figures for error-rate improvement can be misleading unless they are carefully compared.
The error-reduction code chosen is one of a type known as convolutional codes. The code systems used in the past have been block codes, where each character is a fixed-length code, and a fixed number of extra bits are added to make a longer block, and this longer block is capable of correcting errors within itself. These extended blocks are then transmitted as a serial bitstream. In a convolutional code, the characters are converted to a bitstream and then this bitstream is itself processed to add the error-reduction qualities. There is no relationship between the boundaries between characters and the error-reduction process. Since the channel errors are also not related in any way to the character boundaries, convolutional codes are better suited to serial links than block codes, which were originally designed for protecting errors in memory banks and similar structures.
It is not quite correct to refer to the convolutional code system as "error-correcting", since the raw data is not actually transmitted in it's original form and therefore it makes no sense to talk about it being corrupted by the link and corrected in the decoder. In PSK31, the raw data is transformed from binary (1 of 2) to quaternary (1 of 4) in such a way that there is a precisely known pattern in the sequence of quaternary symbols. In the code used in PSK31, the pattern of quaternary symbols is derived from a run of 5 consecutive data bits. For example, if we label the four phase-shifts as A, B, C, and D, and suppose that the transmitter sends continuous A's when the raw datastream is sending continuous 0's. Because the convolutional encoder works on a run of five bits, when the datastream sends ..000010000..., the transmitter actually sends ..AAAADCCBDAAAA..., that is, each binary bit to be transmitted results in a unique 5-symbol sequence, overlapping with the sequences from adjacent bits, in a predictable way which the receiver can use to estimate the correct sequence even in the presence of corruptions in parts of the sequence.
The decoder, known as a Viterbi decoder after the man who thought of it, is not really a decoder at all, but a whole bank of parallel encoders, each fed with one possible "guess" at the transmitted data sequence. The outputs of these parallel encoders are all compared with the received symbol-stream. Each time a new symbol is received, the encoders need to add an extra bit to their sequence guesses and consider that the new bit might be a 0 or a 1. This doubles the number of sequence guesses, but a clever technique allows half of all the guessed sequences to be discarded as being less likely than the other half, and this means that the number of guesses being tracked stays constant. After a large number of symbols have been received, the chances of a wrong guess at the first symbol tends to zero, so the decoder can be pretty sure that the first bit was right and it can be fed to the output. In practice this means that the decoder always outputs decoded data bits some time after they have been received. This delay in PSK31 is 20 bits (640mS) which is long enough to make sure that the decoder has done a good job, but not so long that it introduces an unacceptable delay in displaying the received text.
.
Information Coding: Varicode
This is a description of the variable-length coding used in the 31.25 baud BPSK system.
The normal asynchronous ASCII coding used on the original version of this system by SP9VRC, and indeed the asynchronous system used for transmission of RTTY for the last 50 years, uses one start-bit, a fixed number of data-bits, and one or more stop-bits. The start-bit is always the opposite polarity to that of the stop-bit. When no traffic is being sent the signal sits in stop polarity. This enables the receiver to start decoding as it receives the edge between the stop-signal and the start-bit.
One disadvantage of this process is that if, during a long run of traffic, an error occurs in either a stop-bit or a start-bit, the receiver will lose synchronisation, and may take some time to get back into sync, depending on the pattern of following characters: in some situations of repeated characters the receiver can even stay in a false sync. for as long as the repeated pattern persists.
Another disadvantage of this system arises when, as will be the case for normal amateur radio contacts, the traffic being sent consists of plain language. In all languages there are some characters which occur more often that others and there are some which may hardly ever be used. In morse code this is used to advantage by using short codes for the common letters and longer codes for less-common ones. In the asynchronous start-stop system all characters are neccesarily the same length, and so the overall speed of transmission of plain-language is not as fast as a variable-length code would be.
The variable-length code used in the BPSK system overcomes both these disadvantages, and works in the following way.
1. All characters are separated from each other by two consecutive 0 bits.
2. No character contains more than one consecutive 0 bit.
It follows from this that all characters must begin and end with a 1.
With such a code, the receiver detects the end of one code and the beginning of the next by detecting the occurence of a 00 pattern, and since this pattern never occurs inside a character, the "loss of sync" problem that occurs with asynchronous systems can never occur. The 00 gap between characters is equivalent to the gap between letters in morse code in this respect, and in a similar way allows the possibility of a variable-length code system.
The variable-length coding used in the BPSK system was chosen by collecting a large volume of English language ASCII text files and analysing them to establish the occurrence-frequency of each of the 128 ASCII characters. Next a list was made of all the binary patterns that meet the above rules, namely that each pattern must start and end with a 1, and must not contain more than 1 zero in a row. This list was generated by computer, starting at the shortest. The list was stopped when 128 patterns had been found. Next the list of ASCII codes, in occurence-frequency order was matched to the list of binary patterns, in length order, so that the most frequently-occuring ASCII codes were matched to the shortest patterns, and that completed the variable-code alphabet. To finish the job, a simple calculation was made to predict the average number of bits in typical plain language text transmitted by this code, taking into account the 00 gap between characters. The result was between 6 and 7 bits per character. This compares very favourably with 9 bits per character for the asynchronous system.
The actual alphabet is shown below, shown in ASCII order starting with NUL and ending with DEL.
Note that the lower case letters have the shortest patterns and so are the fastest to transmit. NUL 1010101011
SOH 1011011011
STX 1011101101
ETX 1101110111
EOT 1011101011
ENQ 1101011111
ACK 1011101111
BEL 1011111101
BS 1011111111
HT 11101111
LF 11101
VT 1101101111
FF 1011011101
CR 11111
SO 1101110101
SI 1110101011
DLE 1011110111
DC1 1011110101
DC2 1110101101
DC3 1110101111
DC4 1101011011
NAK 1101101011
SYN 1101101101
ETB 1101010111
CAN 1101111011
EM 1101111101
SUB 1110110111
ESC 1101010101
FS 1101011101
GS 1110111011
RS 1011111011
US 1101111111
SP 1
! 111111111
" 101011111
# 111110101
$ 111011011
% 1011010101
& 1010111011
' 101111111
( 11111011
) 11110111
* 101101111 + 111011111
, 1110101
- 110101
. 1010111
/ 110101111
0 10110111
1 10111101
2 11101101
3 11111111
4 101110111
5 101011011
6 101101011
7 110101101
8 110101011
9 110110111
: 11110101
; 110111101
< 111101101
= 1010101
> 111010111
? 1010101111
@ 1010111101
A 1111101
B 11101011
C 10101101
D 10110101
E 1110111
F 11011011
G 11111101
H 101010101
I 1111111
J 111111101
K 101111101
L 11010111
M 10111011
N 11011101
O 10101011
P 11010101
Q 111011101
R 10101111
S 1101111
T 1101101
U 101010111 V 110110101
X 101011101
Y 101110101
Z 101111011
[ 1010101101
\ 111110111
] 111101111
^ 111111011
_ 1010111111
. 101101101
/ 1011011111
a 1011
b 1011111
c 101111
d 101101
e 11
f 111101
g 1011011
h 101011
i 1101
j 111101011
k 10111111
l 11011
m 111011
n 1111
o 111
p 111111
q 110111111
r 10101
s 10111
t 101
u 110111
v 1111011
w 1101011
x 11011111
y 1011101
z 111010101
{ 1010110111
| 110111011
} 1010110101
~ 1011010111
DEL 1110110101
The narrow bandwidth of both psk31 modes is shown above.
Contact Information
The source code which you may have with this distribution is freeware, provided it is used only for amateur purposes. If you have suggestions for improvements, or you find bugs, please report them back to me and do not broadcast your own modifications or bug-fixes
Peter Martinez G3PLX
High Blakebank Farm
Underbarrow
Kendal
Cumbria LA8 8BN
United Kingdom
peter.martinez@btinternet.com
--------------------------------------------------------------------------------
Sound Card DSP Setup and Operating Tips - Some tips from
For most Ham Radio situations it will not be necessary to isolate with opto-couplers or transformers between the PC sound card and the radio. A simple interface between the computer and the radio can be constructed in a few hours time using junk box or Radio Shack parts. It is very important to use shielded cables and extra attenuation to the radio input. You can use small coax for the interface cable if you are careful to keep the shield on the "cold" side of the circuit. Make sure the shield is grounded to the radio chassis on any type cable you do use. Locate the appropriate connectors to fit your sound card and the radio jacks. A simple resistor network is used to attenuate the audio signal to the input of the MIC or AUX IN connector of the radio. If you are not handy with the solderring iron, several commercial interfaces are offered via the web, such as RigBlaster, to name one. The interface here applies to all the new sound card digi modes including SSTV!
To build your own interface follow these instructions. Connect a shielded audio cable from the audio output of your SSB transceiver to the LINE IN jack of your sound card. Connect to either left, right or both of the stereo inputs. (Don't use the MIC input on the sound card.) It's best to use the auxiliary audio output on the transceiver which does not vary in level with speaker volume. This single cable is all that is needed to monitor digi signals with a program.
Make another shielded cable, that includes a simple resistor attenuation pad, between the sound card LINE OUT and the transceiver audio input. (See diagram below.) The pad will prevent high inter-modulation distortion (IMD) caused by overdriving the first audio amp stage of the transceiver. This resistor pad is not strictly neccessary because you can adjust the sound card output to a very low level by using the Windows Master Sound Control Panel, however this will cause your PC system sound levels to be barely audible. (Ham programs like the MixW V2.0 will allow you to independantly adjust the audio out for each mode, but this is not found in other programs.) Using the MIC Gain control may not be adaquit to prevent overdriving the first audio amplifier stage on some radios. Using a variable resistance pad will give you flexibilty to balance your audio levels for use with other PC devices. Finally, use the sound card mixer control program (see example below) to make final adjustments of the audio levels.
Adjust the sound card audio INPUT level such that a nominal signal tuned in on the transceiver will be seen prominently in the program signal display window without overdriving the sound card input. (See PSK31 Screen Shot for an example of how this might look on the several ham programs.) Use the MASTER control to adjust the sound to the PC speakers (if you use them) and then re-adjust the other levels as needed. Note that other windows applications you run on your PC that provide sound card adjustment controls (such as WinAmp) may change your PSK31 settings! You may have to re-adjust these levels. Generally, once these levels have been set, you will not need to change them.
Adjust the sound card audio OUTPUT level to the transceiver such that a small amount of ALC voltage is detected at the transceiver while transmitting into a proper antenna load (50 ohms) with the MIC Gain control at a nominal setting. After this adjustment, you can reduce the MIC gain control slightly to achieve full output power with no ALC deflection. Note that full output on a 100 watt transceiver would be about 100 watts if using a single tone (CW) from the sound card, but would be about 50 watts if using the double tones of a PSK31 carrier.
When you get your first PSK31 contact, ask the other station for an "IMD report" on your signal. (You must allow several seconds of "no text" for the reading to be made.) A properly adjusted audio input level to your transceiver will have an IMD at least -20 dB below the carrier and a very clean signal will be around -28 dB. It should be noted that a strongly received PSK31 signal (S9 or greater) can appear to have a high IMD level when viewed on the digi program display. This is often the fault of the receiver's front-end being over driven by the strong signal. Before issuing a bad IMD report to another station, you should add attenuation to the receiver and observe the reading under a nominal signal strength.
The most simple sound card to radio interface is with a single shielded audio cable between the transceiver AUX audio output and sound card input, and another between the sound card output and the AUX audio input on the back of the transceiver. Using a program like MixW, that supports CAT functions for most popular radios, a single RS232 cable is used to control the transceiver for TX and RX. For this setup, the audio output from the sound card must be adjusted very low to achieve a clean signal.
If you don't have VOX or CAT operation to act as your transceiver T/R switch, you can make a simple circuit that will switch your T/R automatically as you send and receive from the program. Use the DTR or RTS and GND pins from your computers unused serial comport to turn ON/OFF a simple transistor switch that operates the transceiver PTT input line. The configuration menu in your digi program will let you select the comport you will use.
The homemade interface described above need not be a complicated work of electronic design! A picture of a simple MIC attenuator wired with a variable resistor and a RS232 PTT switch DB9 connector that were both in use for several years is shown here.
A tip for good PSK31 operation is to use the split VFO function of most modern transceivers. Set up the transceiver to allow transmission in the SSB mode and reception in the CW mode, so that the CW narrow IF filter can be used to eliminate QRM.
Another tip to help detect weak PSK31 signals in the presence of stronger signals is to turn OFF the receiver's AGC feature. This will allow the receiver to operate at full linearity and not reduce gain when a strong signal is present. Adding some attenuation to the front-end and using a narrow IF filter is advisable. Without receiver AGC your S-meter will not function and some strong signals may appear to be distorted, but with a sensitive waterfall display and a radio with good dynamic range, you will still be able to decode the weaker signals.
Operate at the power level needed to produce good printing. Operate PSK31 mode at half (or less) the rated power of the transceiver. Operate all digi modes at a level that produces no ALC voltage to the PA.
Multi-path QSB (flutter) will cause serious difficulty for PSK31 mode! Switch to MFSK16 or Feld Hell modes to elliminate this problem.
Use the other HF bands to find digi contacts when conditions permit. Try 7.0710 Mhz on 40 meters, 10.140 on 30 meters and 3581 on 80 meters in North America.
Use BPSK mode for calling and all normal PSK31 operation. Try QPSK mode if the print quality drops to 80% due to static or noisy band conditions.
Using lower case letters instead of all caps, will increase PSK31 speed and reduce TX time.
Space QSOs at least 100hz apart and help demonstrate the efficiency of these new low power narrow band digi modes.
Have Fun!
Subscribe to:
Posts (Atom)