[comp.sys.ibm.pc.hardware] What

sonny@charybdis.harris-atd.com (Bob Davis) (09/13/90)

	I know that MFM stands for "Modified Frequency Modulation"
and that RLL stands for "Run Length Limited". Beyond that, things
in my mind (and in those of all authors I have thus far found)
begin to get unbelievably fuzzy unbelievably fast.

	Would someone who KNOWS details about these hard drive
data modulation techniques, please explain them to someone who
understands digital modulation techniques, or point him to a reference?

	For example, is MFM simply binary Frequency Shift Keying (FSK)?
How is bit synchronization derived? In what sense is MFM "Modified"?

	On the RLL side, I am not so much interested in details of
the Run Length Limited coding as I am in the modulation scheme and
bit synchronization details. Is the basic modulation scheme still
FM as in MFM? Is it Binary FSK?

	I gather from what I read that MFM puts out some kind of pulse
at the beginning of EVERY bit time to aid bit sync. Is that true?

	I also gather that RLL's improved packing density comes
because it doesn't have to insert the "bit sync pulse" each bit time,
and therefore the average number of transitions per bit time is reduced.
Consequently, I can squeeze in more bits per track and still have
the same transition density per linear inch of track. Is this right?

	I gather that RLL drives must derive bit sync clock from
the data transitions themselves without help from MFM's "bit sync
pulses". Is that right?

	I gather by implication from stuff I read about RLL that the
coding limits long runs of zeros or long runs of ones PRIMARILY (solely?)
so that the bit synchronization circuitry does not have to "coast" too 
long between data transitions. Is that true?

	How do the transition densities per INFORMATION bit (including 
all synchronization pulses and coding overheads) compare for MFM vs. RLL?

	How do the transition densities per linear inch of track on the
media compare for MFM vs. RLL?

	If you know a reference that answers such questions as these,
or if YOU know answer(s), please tell me.

	Thanks.

______________________________________________________________________________
Bob Davis              \\ INTERNET : sonny@trantor.harris-atd.com  |  _   _  |
Harris Corporation, ESS \\    UUCP : ...!uunet!x102a!trantor!sonny |_| |_| | |
Advanced Technology Dept.\\ AETHER : K4VNO          |==============|_/\/\/\|_|
PO Box 37, MS 3A/1912     \\ VOICE : (407) 727-5886 | I SPEAK ONLY | |_| |_| |
Melbourne, FL 32902        \\  FAX : (407) 729-2537 | FOR MYSELF.  |_________|

grege@gold.GVG.TEK.COM (Greg Ebert) (09/14/90)

Let's backtrack a bit. FM encoding defines a 'bit cell' which is bounded by
clock bits. On the media, a flux reversal occurs each time a bit is written.
When a '0' is written, there are no flux-reversals inside the bit cell;a
'1' is written if there IS a transition in the bit cell. Now you might ask
"How do I synchronize ?" Easy. A preamble with one or more 0's, and a
missing clock bit will indicate that the next bit is definitely a clock
bit. The nominal time duration of the bit cell is called the data window.
The window is usually 'narrowed' somewhat so that the clock bits can jitter
somewhat without wreaking havoc. 

Seem wasteful ? Indeed. The clock bits contribute NOTHING to the data
storage capability. MFM mashes data and clock bits together subject to
the following rules:

1) If it's a '1', do a flux-reversal in the middle of the bit cell

2) If it's a '0', do nothing, BUT..

3) If the current bit is a '0', and the next bit is a '0', write a
   flux reversal at the EDGE of the bit cell.

If you write N bits/second in MFM, the time between bits is:

		1.0/N - for adjacent 1's
		1.5/N - for a 1-0-0
		2.0/N - for a 1-0-1

The smallest increment of time is 0.5/N, thus MFM data has an embedded
clock running at TWICE the data rate. Note, though, that the maximum
number of flux-reversals/time equals the data rate; this is the case
for adjacent 1's.

You need a timer to tell you how much time elapsed between bits. Seem fine
and dandy ? Well, it aint that easy. When flux reversals get squeezed 
together, they fight with eachother (wouldn't you ?). If you write them
at the exact intervals listed above, you won't see them at the same
intervals when they get read back. This is called bit shift. Someone
figured out that bit shift is predictable. You guessed it! They slightly
altered the intervals at which bits are written, depending upon the
pattern and the density. [Remember that bit density increases as you
move toward the inner tracks]. This is called write-precompensation.
When the bits are read-back, they pop-up when they are expected to do so.


Like MFM, RLL is self-clocking, and the clock rate is twice the data rate.
But, by using a different encoding scheme, it is possible to put 50% more
data onto the media WITH THE SAME number of flux-transitions per unit
length. There are two 2,7 RLL schemes I know of: IBM and XEROX. 

XEROX encoding extracts 1,2, or 3 bit packets, and encodes them into 2,4, or 6
bit streams with an embedded clock. The packet size chosen depends upon what
the data bits are. The resulting RLL encoded data has the property such
that there are at least 2 consecutive zeros between a 1, and at most 4
zeros. This is necessary to maintain synchronization with the data stream
via a phase-locked loop (PLL). I should have mentioned that MFM requires a
PLL as well.

The IBM technique is similar, except the packet size is 2,3, or 4 bits at
the input (4,6, or 8 encoded), and the minimum number of consecutive zeros
is 2; the maximum is 6.

Noting that the MINIMUM spacing between adjacent 1's is at least 2 zeros, and
that the encoded data stream is twice the rate of the incoming data, it
follows that the frequency (ie, flux-transitions/unit length) is actually
LESS than the data rate; 2/3 in this case. Remember that MFM had a worst-case
flux-transitions/time (or length) equal to the data rate. Since the flux-change
rate for RLL is LOWER than the data rate, we can get MORE data stored for the
same flux-transitions/length.
-------------------------------------------------------------------------
                                                               #####
{uunet!tektronix!gold!grege}    "Register to vote, then      ##  |  ##
grege@gold.gvg.tek.com           vote responsibly"          #    |    #
							    #   /|\   #
"Support the First Amendment, not those who attack it"       #/  |  \#
							      #######

sonny@charybdis.harris-atd.com (Bob Davis) (09/14/90)

Thanks, Greg, for your response.

In article <1453@gold.GVG.TEK.COM> grege@gold.GVG.TEK.COM (Greg Ebert) writes:
>
	[Stuff deleted]
>figured out that bit shift is predictable. You guessed it! They slightly
>altered the intervals at which bits are written, depending upon the
>pattern and the density. [Remember that bit density increases as you
>move toward the inner tracks]. This is called write-precompensation.
>When the bits are read-back, they pop-up when they are expected to do so.
>

	From my experience in high rate digital modems, it sounds like
"write-precompensation" is what I would call an Equalizer applied
*before* the channel (i.e., the disk) rather than the more often encountered
case of *after* the channel (i.e., at the demodulator) for the purpose
of controlling InterSymbol Interference (ISI) occurring in the channel.

	[Deletions]
[Continuing, discussing RLL:]

>
>Noting that the MINIMUM spacing between adjacent 1's is at least 2 zeros, and
>that the encoded data stream is twice the rate of the incoming data, it
>follows that the frequency (ie, flux-transitions/unit length) is actually
>LESS than the data rate; 2/3 in this case. Remember that MFM had a worst-case
                          ^^^ [Emphasis by Bob Davis]
>flux-transitions/time (or length) equal to the data rate. Since the flux-change
>rate for RLL is LOWER than the data rate, we can get MORE data stored for the
>same flux-transitions/length.

	So, if the flux transition rate for RLL is 2/3 that of MFM, then
when RLL increases the sectors/track from 17 for MFM to 26 for RLL, doesn't
the density of flux transitions ON THE MEDIA wind up almost precisely
the same for MFM and RLL?
	And if that is true, why do they recommend a special drive for
RLL? Why isn't an MFM drive good enough?

	Thanks...

P.S. I do not yet understand why this stuff is called Frequency Modulation.
     Do you?
     Is the signal recorded on the medium actually a carrier which has
     been FM'ed with these data transitions that everyone speaks of?
	Or is the baseband data itself some form of FM. (The MFM baseband
     data stream looks a lot like Serial Minimum Shift Keying, or SMSK,
     which is a binary FSK scheme that has attracted a lot of interest
     in high speed digital modems of late).

 Surely there must be a definitive technical reference article or book 
that someone can recommend to me that deals with these details and I can
adjourn my Learning from the Net. But I do know that ALL personal computer
books I have read treat this technical area with an abominably bad hand-waving
chapter or section.

______________________________________________________________________________
Bob Davis              \\ INTERNET : sonny@trantor.harris-atd.com  |  _   _  |
Harris Corporation, ESS \\    UUCP : ...!uunet!x102a!trantor!sonny |_| |_| | |
Advanced Technology Dept.\\ AETHER : K4VNO          |==============|_/\/\/\|_|
PO Box 37, MS 3A/1912     \\ VOICE : (407) 727-5886 | I SPEAK ONLY | |_| |_| |
Melbourne, FL 32902        \\  FAX : (407) 729-2537 | FOR MYSELF.  |_________|

grege@gold.GVG.TEK.COM (Greg Ebert) (09/14/90)

[This response also addresses another question about 'non-RLL' drives]

First of all, I goofed in my original posting. 'RLL' is actually "2,7 RLL"
which means that the minimum spacing is 2 zeros, and the maximum is 7 zeros.
I should have examined the patterns more closely because I stated IBM had
a maximum spacing of 8, and XEROX 6. They actually are both 7.

I believe the reason there are RLL drives is because the read-data timing
(also known as drive-margin) needs to be tighter for RLL than MFM because
there is a higher probability that a PLL will fall 'out-of-sync' when the
spacing between adjacent 1's is 7 zeros. For comparison, the maximum gap 
between adjacent 1's in MFM corresponds to a run of only 5 zeros in RLL.

The design of phase-locked loops (PLL's) is an art in itself. The PLL has
a profound effect on data reliability, but there are limits to it's
capabilities. Thus, an effort is made by the drive manufacturer to build
a drive with a better drive-margin. Factors such as spindle-speed variation,
signal-to-noise ratio, and write current contribute to bit shift.

However, I would feel comfortable using RLL formatting on an 'MFM-only'
drive if I had an error-correcting controller.
>
>P.S. I do not yet understand why this stuff is called Frequency Modulation.
>     Do you?
>
Nope. My guess is that its sloppy nomenclature, just like calling DOS an 
operating system (HA!).

-------------------------------------------------------------------------
                                                               #####
{uunet!tektronix!gold!grege}    "Register to vote, then      ##  |  ##
grege@gold.gvg.tek.com           vote responsibly"          #    |    #
							    #   /|\   #
"Support the First Amendment, not those who attack it"       #/  |  \#
							      #######

scjones@thor.UUCP (Larry Jones) (09/17/90)

In article <4313@trantor.harris-atd.com>, sonny@charybdis.harris-atd.com (Bob Davis) writes:
> P.S. I do not yet understand why this stuff is called Frequency Modulation.
>      Do you?
>      Is the signal recorded on the medium actually a carrier which has
>      been FM'ed with these data transitions that everyone speaks of?
> 	Or is the baseband data itself some form of FM. (The MFM baseband
>      data stream looks a lot like Serial Minimum Shift Keying, or SMSK,
>      which is a binary FSK scheme that has attracted a lot of interest
>      in high speed digital modems of late).

The recorded signal is the baseband data.  The resulting signal is
just simple Binary Frequency Shift Keying.  In FSK, a 0 bit is
represented by one frequency and a 1 bit by another, thus it is a
form of frequency modulation.  When dealing with digital signals,
it is convenient to have the two frequencies be in a 2:1 ratio so
that a zero is represented by a number of cycles of one frequency
and a one by twice as many cycles of twice that frequency which keeps
the durations equal.  For standard FM recording, the exact counts
are a half cycle for zero and a full cycle for one as shown in the
following diagram:
 ___     _______         ___     ___     _______     ___
|   |___|       |_______|   |___|   |___|       |___|   |_______|
|   1   |   0   |   0   |   1   |   1   |   0   |   1   |   0   |

MFM modifies this scheme by removing all the transitions that are
at bit cell boundaries except between two zero cells:
____             ___________         _______________
    |___________|           |_______|               |___________|
|   1   |   0   |   0   |   1   |   1   |   0   |   1   |   0   |

So, it's still a frequency modulation, but it's not nearly as easy
to see as in the FM case.  The best way to understand these recording
methods is to shift the time scale and label periods where a
transition occurs with "1" and periods without a transition with a
"0".  This way the FM and MFM signals are labeled as follows:

Data:   1   |   0   |   0   |   1   |   1   |   0   |   1   |   0   |
FM:  ___     _______         ___     ___     _______     ___
        |___|       |_______|   |___|   |___|       |___|   |_______
Trans:  1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 |

MF:  ___             ___________         _______________
        |___________|           |_______|               |___________
Trans:  1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 |

Now we can map the data bits into transitions using simple tables
(note that the mapping for MFM depends on the previous data bit as
well as the current bit):

    FM              MFM
Data|Trans   Prev|Cur|Trans
----+-----   ----+---+-----
  0 |  10      0 | 0 |  10
  1 |  11      1 | 0 |  00
               X | 1 |  01

From these tables it is easy to see that FM recording is RLL 0,1
since any data will result in transitions with between 0 and 1 zeros
between ones.  MFM is RLL 1,3 since the resulting transitions have
between 1 and 3 zeros in a row.  Since we're guaranteed that there
is at least one zero between each pair of ones, we can record the
signal twice as fast without increasing the number of transitions
per unit length.  The standard "RLL" recording is RLL 2,7 (I don't
have the transition mappings or I'd show them) which means we can
record the signal three times as fast as FM (1.5 times as fast as
MFM) without increasing the number of transitions per unit length.

However, even though the transition density doesn't increase, the
location of the transitions becomes more important.  For MFM, we
need the location twice as accurately as FM and for RLL three times.
How accurately the transitions can be recorded and detected depends
on both the recording medium and the record and playback electronics.
----
Larry Jones                         UUCP: uunet!sdrc!thor!scjones
SDRC                                      scjones@thor.UUCP
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150-2789             AT&T: (513) 576-2070
Let's pretend I already feel terrible about it, and that you
don't need to rub it in any more. -- Calvin

sonny@charybdis.harris-atd.com (Bob Davis) (09/17/90)

	My heartfelt thanks to Larry Jones for assembling one of the
most lucid groups of words on FM, MFM, and RLL digital modulations for disk
drives I have ever read.

In article <177@thor.UUCP> scjones@thor.UUCP (Larry Jones) writes:

  [REALLY Good Stuff deleted (Go back and read it or at least save it)]

>
>However, even though the transition density doesn't increase, the
>location of the transitions becomes more important.  For MFM, we
>need the location twice as accurately as FM and for RLL three times.
>How accurately the transitions can be recorded and detected depends
>on both the recording medium and the record and playback electronics.

	So, the density of flux transitions on the disk is exactly
the same for FM, MFM, and RLL, it appears. Thus it seems that stressing
the magnetic medium data storage capabilities is NOT the problem at all
in getting an MFM (or FM) disk to take RLL formatting.
	For ALL three schemes, it is necessary to be able to say whether
or not a flux transition occurs in the center of a bit time. Thus, it seems
that the bit clocks for all three drive types need to be able to define a 
window to look for the transition, and the window is of the SAME 
FRACTIONAL BIT TIME WIDTH ACCURACY for all three drive types.
	The real problem appears to be that, for this SAME flux transition
density on the disk, the transfer bit rates on and off the disk are in 
the ratios 1, 2, 3 for FM, MFM, and RLL, respectively. Thus, even though
the required transition window accuracies are of the same fractional bit 
time width, the ABSOLUTE WINDOW TIME WIDTH ACCURACIES required are in the 
ratios 1, 1/2, 1/3 for FM, MFM, and RLL, respectively.

	What I have learned is this: When an MFM drive is pressed into
RLL service, the magnetic properties of the platters is probably OK. The
electronics must pass 26/17 = 1.53 times the bit rate on and off the
disk in RLL service compared to MFM. The transition time window is
2/3 as wide. The drive motor speed control needs to hold the speed more
accurately so the transitions stay in the transition window.
	Some MFM drives can hack these tighter requirements of RLL service.
        Some can't. 
	I have had a cheap MiniScribe 3425 20Mb MFM drive in 
32Mb RLL service for a ZERO trouble year. Now and then I scan for sectors 
going bad. None have popped up. There are zero bad sectors on the entire
drive. Sometimes you get lucky.




______________________________________________________________________________
Bob Davis, UofALA'66   \\ INTERNET : sonny@trantor.harris-atd.com  |  _   _  |
Harris Corporation, ESS \\    UUCP : ...!uunet!x102a!trantor!sonny |_| |_| | |
Advanced Technology Dept.\\ AETHER : K4VNO          |==============|_/\/\/\|_|
PO Box 37, MS 3A/1912     \\ VOICE : (407) 727-5886 | I SPEAK ONLY | |_| |_| |
Melbourne, FL 32902        \\  FAX : (407) 729-2537 | FOR MYSELF.  |_________|

scjones@thor.UUCP (Larry Jones) (09/19/90)

In article <4320@trantor.harris-atd.com>, sonny@charybdis.harris-atd.com (Bob Davis) writes:
> 	What I have learned is this: When an MFM drive is pressed into
> RLL service, the magnetic properties of the platters is probably OK. The
> electronics must pass 26/17 = 1.53 times the bit rate on and off the
> disk in RLL service compared to MFM. The transition time window is
> 2/3 as wide. The drive motor speed control needs to hold the speed more
> accurately so the transitions stay in the transition window.
> 	Some MFM drives can hack these tighter requirements of RLL service.
>         Some can't. 

Actually there are a whole bunch of things that effect the timings.  The
platters do have some effect -- any non-uniformities in the coating
will cause the recorded bits to jitter out of position.  That's why most
RLL disks these days have plated media, it's very uniform.  As the
magnetic domains are squeezed together, they tend to change shape and
migrate.  Write precompensation is an attempt to predict these changes
and compensate for them when recording so that the playback will be more
accurate.  As the timing tolerance gets tighter, the precompensation
needs to be more accurate.  Also, the read amplification circuitry is
never completely linear, so you can get phase shift and other artifacts
that distort the recovered signal.  The motor speed control isn't as
critical since the absolute speed isn't as important as a constant
speed and the mass of the disk tends to prevent any short-term changes.
----
Larry Jones                         UUCP: uunet!sdrc!thor!scjones
SDRC                                      scjones@thor.UUCP
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150-2789             AT&T: (513) 576-2070
Hello, I'm wondering if you sell kegs of dynamite. -- Calvin

peng@chaource.cs.wisc.edu (PENG) (09/19/90)

In article <1456@gold.GVG.TEK.COM> grege@gold.GVG.TEK.COM (Greg Ebert) writes:

[explanation about the difference between RLL and MFM deleted]

Thanks for your explanation.  I believe many of us have learned a lot from
your series of articles.  But there seem to be two other terms that are
frequently connected with hard disk encoding, NRZ and ZBR.  NRZ seems to
stand for "non return to zero."  And I have no idea what ZBR stands for.
Would you care to explain these two terms to us?  Thanks!

-peng