WINMOR Protocol Specification (Beta Release) : 1.0 Scope
WINMOR Protocol Specification (Beta Release) : 1.0 Scope
1.0 Scope:
This document describes the preliminary WINMOR sound card protocol at the physical
and data link levels. It is the complete specification of the WINMOR protocol. It does
not address higher level protocol layers. The WINMOR protocol is not proprietary and is
released to the public domain. This document describes the 500 Hz and 1600 Hz
bandwidth modes using 93.75 Baud (PSK) and 46.875 baud FSK modulation.
2.0 Purpose:
The intent of this document is two fold:
a) To serve as a working document during protocol development and testing
b) To serve as a template to allow others familiar with the art to build compatible
drivers that support the data link protocol layer.
1
Specifically:
Generally low S/N levels
Non channelized frequencies with interference
Poor to moderate propagation conditions including poor multipath environment.
Frequency offset (between send and receiver) and drift
Sound card sampling rate error and drift
WINMOR is not optimized for keyboarding or chat mode applications though this may
be possible with the appropriate user client. An optional FEC broadcast (unproto) mode is
also available.
Normally error correction is done in terms of layers for improved effectiveness and
efficiency. The following briefly describes these layers and how they are used in
WINMOR.
2
For data frames the Reed Solomon layer is actually implemented in two formats. The first
format is what is called weak R-S where a relatively few parity characters are appended
to the message. This weak R-S format is usually sufficient to correct the frame under
most conditions. If a data frame must be repeated (reciever did not ACK) then the second
strong R-S format is used which transmits just the parity charactes of a more robust R-S
code. These parity characters are then used along with the prior sent data (ignoring the
weak R-S Parity bytes) to attempt to correct the original message part of the first weak
R-S format. These two formats are alternated with each repeat of a data frame.
3
6) On Radios with built in sound card interfaces (e.g. Icom 7200) it is possible
to use the radio s built in sound card to send and receive SSB audio.
7) The sound card capture device (receiving data) MUST be able to support a real
or interpolated sampling frequency of 48000Hz +/- .1% (+/-1000 ppm)
8) The sound card playback Device (transmitting data) MUST be able to support
a real or interpolated sampling frequency of 12000 Hz +/-.1% (+/- 1000 ppm)
9) The processor or PC used to implement the protocol MUST be able to
complete the decoding of any frame and respond with the appropriate
response in 500 ms or less. (this is currently estimated to equate to a
Pentium/Celeron class processor of 500 MHz or above) It may be possible to
reduce the PC requirement in the future at the expense of session throughput.
6.1 Definitions:
Information Sending Station (ISS) := the station currently sending data to the other
station. The ISS MUST only send data or control frames.
Information Receiving Station (IRS) := the station currently receiving data or commands
from the other station. The IRS MUST only send Ack or control frames.
Carrier := one of the modulation carriers. There are either 4 or 6 modulation modes
supported depending on the desired session bandwidth:
1) 500Hz BW
a. PSK Modes: 4PSK TCM, 8PSK TCM, 16PSK TCM
2 Carriers at 1406.25 Hz and 1593.75 Hz
b. Mode 4FSK
2 groups of 1of 4 Carriers. (2 carriers active simultaneously)
Group 1: 1312.5, 1358.375, 1406.25 and 1453.125 Hz
Group 2: 1546.875, 1593.75, 1640.625 and 1687.5 Hz
2) 1600 Hz BW
a. PSK Modes: 8 carrier 4PSK TCM, 8PSK TCM, 16PSK TCM
8 Carriers at 843.75, 1031.25, 1218.75, 1406.25, 1593.75,
1781.25, 1968.75 and 2156.25 Hz
b. Mode 8 carrier 4FSK
8 groups of 1of 4 Carriers. (8 carriers active simultaneously)
Group 1: 750.0, 796.875, 843.75 and 890.625 Hz
Group 2: 937.5, 984.375, 1031.25 and 1078.125 Hz
Group 3: 1125.0, 1171.875, 1218.75 and 1265.625 Hz
Group 4: 1312.5, 1358.375, 1406.25 and 1453.125 Hz
Group 5: 1546.875, 1593.75, 1640.625 and 1687.5 Hz
Group 6: 1734.375, 1781.25, 1828.125 and 1875.0 Hz
Group 7: 1921.875, 1968.75, 2015.625 and 2062.5 Hz
Group 8: 2109.775, 2156.25, 2203.125 and 2250.0 Hz
c. Modes: 2 carrier 4PSK TCM
4
2 Carriers at 1406.25 Hz and 1593.75 Hz
d. Mode 2 carrier 4FSK
2 groups of 1of 4 Carriers. (2 carriers active simultaneously)
Group 1: 1312.5, 1358.375, 1406.25 and 1453.125 Hz
Group 2: 1546.875, 1593.75, 1640.625 and 1687.5 Hz
Pilot := Leader of the Frame. The Pilot is used to enable rapid identification of a
transmission, to DSP tune the receiving station accurately, to establish symbol and frame
sync and to indicate the frame type. The single carrier of 1500.00 +/- .1% is sent at full
modulation strength (Maximum PEP value) to maximize S/N during the Pilot interval
Ptun := 20 adjacent symbols of the pilot carrier (1500.0 Hz) alternating phase on each
symbol. The tuning signal MAY be extended up to 12 symbols (128 ms) for transceivers
with slow R>T switching or slow VOX PTT response if using VOX.
Pfsync := Frame sync symbol consisting of one symbol of the same phase as the
immediately preceding Ptun symbol. The Pfsync symbol serves as the frame sync symbol
for the following Ptfy symbols.
Pfty := 4 sequential 4FSK symbols. These 4 symbols encode the 4 bit frame type with an
extended 8,4 hamming code.
Frame := a unit of information. A frame is composed of a Pilot & Data. Frames are
identified by the syntax Fxyz where xyz is the frame descriptor.
Symbol := A symbol is one modulation burst of data. The symbol rate is 93.75 symbols
per second (baud) +/- .1% for PSK modes (93.75 = 12000/128) . For 4FSK modes the
symbol rate is 46.875 symbols per second (baud) +/- .1% (12000/256) Pilot symbols
consist of a single carrier with a root raised cosine envelope weighted at the maximum
PEP value. Data and control symbols consist of:
1) 2 carrier PSK modulated with a root raised cosine envelope. Each carrier is
weighted 53% of the pilot carrier
2) 2 Carrier 4FSK (one of 4 tones). Each carrier is weighted at 50% of the weight
of the pilot carrier.
3) 8 simultaneous carriers PSK modulated with a root raised cosine envelope.
Each carrier is weighted at 16.7% of the maximum PEP value.
4) 8 simultaneous carriers each 4FSK (one of 4 tones). Each carrier weighted at
14.3% of the maximum PEP value.
(Note: these carrier weightings are combined with limited soft and hard clipping
to reduce the crest factor. The percentages above are subject to change.
5
For PSK modes the initial symbol following the Pilot is the reference symbol Sr.
This establishes the reference for the next Differential symbol. The Sr symbol carries no
information but establishes the reference phase for each carrier. The reference phase for
each carrier need not be the same as a mechanism of reducing the crest factor. There is no
reference symbol for 4FSK modes.
Byte := the number of contiguous symbols to make one byte. After the frame type data
all frames send an integral number of bytes with a total length determined by the frame
type.
Symbol Modulation: With the exception of the pilot described above all data symbols and
all carriers MUST use the same modulation scheme. The supported schemes MUST
include Viterbi encode Trellis Coded Modulation (Pragmatic TCM) PSK ( differential
phase shift keying) and 4FSK.
SessionID := a 2 byte integer Bsid defined as CRC16 (Calling sign & Target call sign)
The session ID dramatically reduces the chances of a session contamination by a remote
non connected but audible rogue signal. The Session ID is used in the computation of the
sum check but is only sent specifically on data frames. Specific encoding example TBD.
The following frame types MUST be supported. For Detailed frame parameters see the
spread sheet in Appendix A.
6
FID ID frame: 2 Car 4FSK = type 15
Sent by the station to ID. Contains call sign of sending station and optional Grid 6
character Grid square.The ID frame is sent automatically at 10 minute intervals by the
ISS and upon a session end. At session end the ID frame may be optionally followed by a
CW ID.
FID Encoding:
FID := Pilot & Sr & Bdata & Bsch & Bscl & BRS
Bdata := Calling call sign & Grid Square. Callsign and grid square
are packed to 12 byte array of 6 bit characters and must be A-Z, 0-
9 with an optional, The call sign may have an optional ssid of 0
15. Function FormatCallsToByte is used to pack the 12 byte array.
7
Handles ACK for all carrier modes
Fack:= Pilot & Back & Bsc8 & BRS
Back is a 8 bit field. The 8 bits correspond to the ACK for each
carrier. The LSbit represents the highest carrier frequency.
Bsc8 is the 8 bit sum check of Bsid & Back
BRS is the 8 parity nibbles (4 bits) from a shortened RS (7,15 )
correcting up to four 4-bit characters.
(note the Coded control and ACK frames have the same length but
different frame types)
Fack Total payload (2 carriers) of 6 bytes including CRC8 and RS correction check
nibbles and is always sent using 2 carrier 4FSK modulation (2 user bits per
symbol)
8
Bscl is the low byte of the CRC16 sum check per carrier
BRS is the Reed Solomon 26 byte RS weak parity using a shortened RS
code of 229,255 (13 error correcting)
B00 is a one byte fill necessary to complete the 141 bytes due to the 3
bits/symbol
Encoding for type 2 (Extended RS Parity):
Fd16TCM := Pilot & Sr & Bsid & BRSX & B00
Where:
Bsid is the ones compliment of the 16 bit Session ID.
BRSX are the 138 extended Reed Solomon Parity bytes only of a strong RS code 117,255
(46 error correcting).
B00 is a one byte fill necessary to complete the 141 bytes due to the 3
bits/symbol
Encoding for type 2 (Extended RS Parity): Fd8TCM := Pilot & Sr & Bsid & BRSX
Where:
Bsid is the ones compliment of the 16 bit Session ID.
BRSX are the 92 extended Reed Solomon Parity bytes only of a strong RS code 163,255
(46 error correcting).
9
Fd4TCM 4PSK Pragmatic TCM
Encoding for type 1 (Data + weak Reed-Solomon error correction):
Fd4TCM := Pilot & Sr & Bsid & Bpsn & Bbc & Bdata & Bpad & Bsch & Bscl & BRS Where:
Bsid is the 16 bit Session ID.
Bpsn is the Packet Sequence Number (1 to 255 mod 256. PSN 0 is
reserved)
Bbc is the byte count (the number of bytes in Bdata only)
Bdata is the data bytes (up to 34 bytes)
Bpad is remaining B00 if required to fill Bdata frame if < 34 bytes are used
Bsch is the high byte of the CRC16 sum check per carrier
Bscl is the low byte of the CRC16 sum check per carrier
BRS is the Reed Solomon 8 byte RS weak parity using a shortened RS
code of 247,255 (4 error correcting)
Encoding for type 2 (Extended RS Parity): Fd4TCM := Pilot & Sr & Bsid & BRSX
Where:
Bsid is the ones compliment of the 16 bit Session ID.
BRSX are the 46 extended Reed Solomon Parity bytes only of a strong RS code 209,255
(23 error correcting).
10
BRSX are the 46 extended Reed Solomon Parity bytes only of a strong RS
code 209,255 (23 error correcting).
For 4FSK each carrier group of 4 tones is separated by 4 x 46.875 or 187.5 Hz.
Data Frames using this modulation mode:
Two carrier 4FSK, 500 Hz BW
Eight carrier 4FSK, 1600 Hz BW
11
7.0 Unproto (FEC Broadcast) Mode:
Although WINMOR is primarily intended as an ARQ (server-client) forwarding protocol
there is a provision to use the most robust data modes (4FSK 500 Hz and 4FSK 1600 Hz)
in an FEC broadcast (Unproto) mode. This mode uses a staggered repeating of carrier
data for additional robustness beyond the normal R-S FEC used in the 4FSK Modes.
Figure 7-1 shows a simplified diagram of the Unproto states of WINMOR.
Disconnected
FEC Data sent or
FEC abort command
Send FEC (Unproto) states
Transition States
Unconnected States Start FEC
12
Bsch is the high byte of the CRC16 sum check per carrier
Bscl is the low byte of the CRC16 sum check per carrier
BRS is the weak Reed Solomon 20 byte check sum using a shortened RS
code of 235,255 (10 error correcting)
For 4FSK each carrier group of 4 tones is separated by 4 x 46.875 or 187.5 Hz.
Data Frames using this modulation mode:
Two carrier 4FSK, 500 Hz BW (Frame type 13)
Eight carrier 4FSK, 1600 Hz BW (Frame type 14)
CLIENT SERVER
State Frame Sent State Frame Sent
CONNECTING CONREQ
DISCONNECTED ACK (BW)
ISS IDLE
IRS BREAK
ISS ACK
IRStoISS DATA
13
IRS ACK
ISS DATA
IRS ACK
ISS DATA
IRS ACK
ISS IDLE (end of data)
IRStoISS BREAK
ISS ACK
ISS DATA
IRS ACK
ISS DATA
..
IRS ACK
14
9.0 Frame Timing
Fig 9 -1 below shows the simplified frame timing requirements for WINMOR. The
TTransmitData, TACK, and TCTRL times can be calculated from the details in the WINMOR
Rate worksheet shown in Appendix A.
TDataCycle
ISS Leader Transmit Data TACK Leader Transmit Data
IRS
TTransmitData Leader ACK
TACKdly TACKdly
TCtrlCycle TLeader
TDataCycle Repeat interval if NO ACK received >= TTransmit Data + TACK + 2(TLeader + TACKdly)max
TCtrlCycle Repeat interval if NO ACK received >= TCTRL + TACK + 2(TLeader + TACKdly)max
15
Appendix A: WINMOR Mode Rate Worksheet
(details of frame construction for all modes, all bandwidths)
16
Appendix B: Pragmatic Trellis Code Modulation (PTCM)
Trellis code modulation is a combination of FEC encoding with PSK modulation used
to improve the Bit error rate of uncoded PSK modulation. Pragmatic means using
standard available encoders/decoders (e.g. Viterbi) in place of the slightly more
optimized Ungerbroeck Trellis coded modulation encoder/decoders. Pragmatic TCM
is within about .2 dB of the optimized Ungerbroeck code of the same constraint
length over the typical bit error rates encountered.
Figure B-1 shows the block diagram of the PTCM encoder as employed in the
WINMOR midrange speed mode (Trellis 8PSK). Similar schemes are used for the
4PSK and 16PSK modulation modes. In all cases the TCM adds one bit to the user
symbol doubling the number of PSK phases per symbol.
Weak/Strong
Selection
(toggles with each frame repeat)
17
bytes are mapped into 328 symbols of 2 bits each. The most significant symbol Bit U0
is not FEC coded and selects an angle of 0 degrees (U0 = 0) or 180 degrees (U0 = 1)
The least significant bit U1 is fed into a standard (NASA Voyager) R= ½ , K=7
Viterbi Encoder which produces 2 FEC coded output bits C0 and C1 for each input bit
U1.
C0 and C1 are mapped to one of 4 phase values 0, 45, 90 or 135 using a gray code
mapping. This phase value is added to the output of the multiplexer (0 or 180
degrees) to obtain the final 8PSK modulation angle (0 to 315 degrees in 45 degree
steps)
Figure B-2 is a diagram of the PTCM decoder used by WINMOR s Trellis 8PSK
mode.
WINMOR 8PSK Pragmatic Trellis Code Modulation (PTCM)
Demodulated 8PSK Differential Phase
Decoding Data
Weak RS
From DSP ( 0 to 360 degrees, with noise) Strong RS
+ U0
+ Best estimate U1
2 bit Symbol to
Byte packing Weak/Strong
- of Uncoded Comparator Reed-Solomon
Phase Decoder
Angle Weak/Strong
Multiplier 90 Frame toggle
2x Degrees
Modulo 360 Final Frame Data:
Degrees
(nullifies
uncoded
phase)
Most Likely Estimate of
Viterbi Encoded Phase
Angle to Soft
I and Q
Mapping Viterbi Decoding Viterbi Encoding Symbol to
Angle Mapping
[8 bit soft I & Q R=1/2, K = 7 R=1/2, K = 7 0, 45, 90,135
resolution] (Voyager) (Voyager) Degrees
Viterbi Decoder U1 Viterbi Encoder C0, C1 (Gray code)
Same as Encoding
18
& Q mapping. The Viterbi decoder generates the best estimate for the original binary
bit for each pair of soft I and Q inputs. This bit becomes the decoded symbol least
significant bit U1. U1 is also fed into a Viterbi Encoder and Symbol to Angle mapper
(exactly the same as is used in the encoder in Fig B-1) to yield the most likely
estimate of the original Viterbi encoded phase angle value. This most likely estimate
(0 to 135 degrees in 45 degree steps) is then subtracted from the original differential
phase angle from the DSP to yield a best estimate of the uncoded bit phase
(nominally 0 or 180 degrees). The resultant best estimate is compared to 90 degrees
to generate U0 the most significant bit of the symbol. The symbols composed of U0
and U1 are then packed 4 symbols/byte for Reed-Solomon decoding. If this is the
initial transmission of the frame the weak R-S code of 243,255 (6) shortened to 82
bytes is used. This weak R-S code will correct up to 6 byte errors in the total 82 bytes
transmitted. If the frame is a repeat (requested after a decode failure of initial attempt)
then the 82 bytes of data are interpreted as the ID + parity only component of a strong
R-S code of 175,255 code which can correct up to 40 errors of the shortened 150 code
consisting of the 70 original payload + overhead bytes concatenated with the 80
strong R-S parity bytes. Thus the strong R-S code can correct up to 40 errors of the
150 bytes of data plus strong parity (transmitted over two frames).
An Note: Vector
gl
e
= es Locus forced
90 gre
To lie on shaded
De De
(I=28, Q=161) gr 0 Part of IQ Plane
ee 18
s =
e
gl
An
Example Example
Angle = 60 deg Angle = 295 deg
(28,128) (228,128)
An
gl
s e
=
Soft Coding: ee 27
28 = perfect 0 egr 0
De
D gr
228 = perfect 1 0
= ee
128 = erasure e s
gl
An
(28,28) (228,28)
Strong 0,0 (128,28) (I=172, Q=28) Strong 1,0
19
A similar approach to PTCM encoding and decoding is done on both the 4PSK mode
(no uncoded bits, 2 Viterbi bits) and the 16PSK mode (2 uncoded bits, 2 Viterbi bits).
References:
3) Error Control Coding, Second Edition. Shu Lin and Daniel Costello
Pearson Prentice Hall 2004 ISBN 0-13-042672-5
20
Appendix C: Detailed State Change Rules
These rules provide the detail that implements the WINMOR Protocol State
Diagram shown in Fig 6-1.
21
4 Rules for CONNECT PENDING State
4.1 Event = Successful Decode to Target Call sign
Conditions: Target Call sign matches local call sign
Action: Send bandwidth specific ACK, set Repeat OFF
Next State: IRS
4.2 Event: Decode Failure
Conditions: Sumcheck fail or Target <> Local call sign
Actions: none
Next State: DISCONNECTED
22
6.7 Event: ID Frame Received
Conditions: none
Actions: Send ACK 00
Next State: IRS
23
Conditions: none
Actions: Send ID Frame (no delay or CWID) repeat until ACK 00
Next State: ISS
24
Conditions: Must have FEC reception enabled;
Must be in DISCONNECTED state
Action: Decode FEC, remove redundant PSN s
Flag incorrectable PSN s
Next State: DISCONNECTED
25