LogicSmith

### Seek Time

I offered to post a "short course" on hard drive seek times, and here it is. There's some historical information that may help some of you to understand what I'll be talking about.

I'll get a little bit technical, but there isn't any math more complicated than elementary algebra. I'll state various versions of Newton's laws of motion and Faraday's laws of electromagnetics without proof.

The path I'll follow is essentially how disk drive actuators were designed about 15 years ago, and it's still how the first cuts are done before optimization. I'll discuss a 3 1/2 inch disk drive because it's the most popular size today, and I'm working on one now so all the numbers are easy for me to remember.

Definitions

For reasons having to do with laziness and tradition more than anything else, a strange mixture of English, CGS and SI units are used in actuator and VCM design. I'll give some of the more common values and definitions here, so I won't have to interrupt the flow.

 Unit/Term Conversion/Definition 1 inch = 1 in = 1" = 25.4 mm 1 mil = 0.001 in = 25 microns (roughly) 1 microinch = 1 in = 0.000 001 in 1 micrometer = 1 micron = 0.001 mm 1 micron = 40 in (roughly; the exact number is 1 micron = 39.37 in) 1 Tesla = 10000 gauss 1 ips = 1 inch per second (traditional unit) 1 g = 32.2 feet per second per second = 386.4 ipss = 9800 mm/sec2 = the acceleration of gravity at the earth's surface 1 newton (unit of force) = the force required to accelerate a mass of 1 kg at 1 m/sec2 = 0.448 lb, roughly Acceleration is the rate of change of velocity, so it's distance divided by time, divided by time again. = angular acceleration. The units are angle per second per second, usually radians/sec2 in engineering. 2* radians = 360 degrees = the angle for one complete circle. (1 radian = 57 degrees, roughly)

Seek Profiles

What we're going to do is move the heads across the disks. It seems that most people are interested in doing that as fast as possible, so a good place to start thinking about actuator and VCM design is how you want it to move.

A 3 1/2 inch disk has an OD of 95 mm and an ID of 25 mm. However, you have to hold the disks to the spindle, and the clamp and spacers often have an OD of 31 mm, so theoretically, you have a maximum usable space from 15.5 mm radius at the ID out to 47.5 mm radius at the OD. You need to have a place to park the heads when the drive is stopped, and that is always at the ID, because that's where the motor will need the least torque to start up. It turns out that after monkeying around with tolerances and so forth, the outer data track will be at a radius of about 46 mm and the inner data track at a radius of about 21 mm, so the data zone is pretty close to 1" wide.

Some IBM engineers published a theoretical analysis in the early 1960s that showed how a 1/3 stroke seek, that is, a seek across 1/3 of the data zone, takes an amount of time equal to the average time for a large number of random-length seeks. Whether that conclusion is valid depends, of course, on whether their assumptions are valid. Well, they made very good assumptions. This short course uses the same assumptions they did, and we'll calculate 1/3 stroke seek times and have full confidence that they are equivalent to random access seek times.

Real disk drives today don't exactly follow the assumptions, and if you measure a modern drive, you'll probably get a slightly different answer, by 0.1 msec or so.

If the data zone is 1" wide and the average access time is defined by 1/3 of that, then we only have to study the access time for a 0.333" stroke. I'll round that to 0.3 inch for discussion.

How fast can you go for 0.3"? I'll start by stating an effective speed limit of 250 ips. It isn't smoke, you'll see a number pretty close to this later.

Let's calculate a Roadrunner seek. Suppose acceleration were meaningless, and you could be going as fast as possible, instantly, and then you could stop instantly. Boinnggg! Beep-beep!!

Newton said (among other things) t = s/v. If s = 0.3" and v = 250ips, then t = 1.2 msec.

Hmmm. Pretty fast. But what does it mean? If a Top Fuel dragster can be going 300 MPH at the end of the quarter, then he ought to be able to do the quarter in 3 seconds, using the same t = s/v equation. Well, they can't do that (but they're amazingly close) and we can't do 1.2 msec seeks either. And it's easier for a dragster than for a disk drive; in a disk drive you have to both start and stop, while a dragster isn't timed for stopping.

A disk drive isn't Roadrunner. It can't be going at maximum velocity instantly. It has to accelerate and decelerate. Let's calculate a dragster seek. We'll accelerate like a dragster and then decelerate at exactly the same rate. This is called a bang-bang triangular seek to we few cognoscenti. Since it's symmetrical, all we have to do is calculate the first half, then double the time. The equation according to Sir Isaac is t = . We have to pick a distance (0.15") and an acceleration. I'll grab 50 g's, not quite out of the air. Multiply 50*386.4 to convert acceleration from g's to ips and make everything come out right. The time (2t, remember) is 7.9 msec!

Does this mean that we're flinging the heads around at 50 g's or more in a cheap \$400 four Gigabyte disk drive? Yes. Actually, it's worse.

Stay tuned for the next thrilling episode!

Previously I introduced the idea that you need to accelerate and decelerate the heads when you seek, but I didn't show any particular reason for choosing the velocities and accelerations that I used in the examples. I'll let you peek over my shoulder as I get the specifications and do the first rough design for a new (hypothetical) disk drive.

The boss called a meeting and said, "The bozos in Marketing just said our new drive has to have an average seek time of 8 msec. I don't want to be caught short when they change the specs, so we'll design for 7 msec. OK?" At this point I didn't have any data to tell the man to take a long walk off a short dock, so I merely looked very grumpy. Then I went and talked to the servo engineers, and they said they'd like to have 3 msec of settle time. I said, "Holy cow! Do you really want me to do a bang-bang of 4 msec?" They said, "Sure!", because it wasn't their problem.

So I went back to the cube and fired up the rusty old spreadsheet.

1/3 stroke distance s = 0.3", time t = 4 msec ...

The acceleration a = where s and t are half the time and distance, because I'm calculating the acceleration half of the seek and assuming that the deceleration will be just the same.

So using s = 0.15 and t = 0.002, a = 75,000 in/sec2 = 194 g's!

The maximum velocity, when you stop accelerating and start decelerating, will be

v = at = 150 ips = 8.5 mph.

Now, the servo guys don't care about my problems with acceleration, but they do worry about maximum seek velocity. So I went back to their main man and said, "How does 150 ips sound?" He said, "Uckk! I'll get back to you."

I expected some such response, and I have my own less detailed version of their calculations tucked away in my spreadsheet.

Here's my version of the servo problem:

The new 7200 RPM drive is going to have about 10,000 tracks per inch. Embedded servo systems have roughly somewhere between 75 and 100 sectors per revolution. We call them “spokes” because the look like slightly curved spokes on a wheel when you develop a disk and make the magnetic patterns visible. I'll assume that this drive will have 90 spokes. So, if the drive is sitting on track, there will be 120*90 = 10,800 servo bursts per second, or a servo burst will come along every 92.59 microseconds.

If I'm seeking at 150 ips, I'll be getting 10,000*150 = 1.5 million track crossings per second, or doing a track crossing every 667 nanoseconds, that is, every 2/3 of a microsecond. When I'm seeking at 150 ips, I have 1,500,000 / 10,800 = 138.9 track crossings between servo bursts. Now, that's an awful lot of tracks to cross by "dead reckoning", so I expected the servo guy to propose a speed limit. Sure enough, I got a call saying, "How about 120 ips?" I figured he'd probably try to add a few more spokes and have a maximum of about 100 "blind crossings" at full speed.

Well, back to the spreadsheet. Now I'll accelerate to 120 ips, "coast" at speed for a while, then decelerate.

The distance s = + vt2 + , the velocity v = at1 and total seek time t = t1 + t2 + t1 = 2t1 + t2.

If I substitute the velocity into the distance I get s = + vt2 + = vt1 + vt2.

Rearranged, s/v = t1 + t2.

Subtracting, t1 = s/v - t2 = 1.5 msec, so t2 = 1 msec and a = v/t1 = 80,000 ipss = 207 g's.

Now I can tell the boss:

"Here's the story to get a 7 msec seek time with the servo requirements of 120 ips max velocity and 3 msec settle time. We accelerate at 207 g's for 1.5 msec, coast at 120 ips for 1 msec and decelerate at 207 g's for another 1.5 msec. Then we settle for 3 msec. I haven't done the VCM numbers yet, but I'm afraid the current to get that acceleration will be pretty high. While I'm doing that, can you maybe campaign for a little relief on the settle time?"

Next Problem: How to design a VCM without knowing all the details, and maybe, some negotiation on the specs.

Previously I came to the conclusion that to build a disk drive with 7 msec average seek time that includes 3 msec settling, I need to provide a VCM that will generate 207 g's of acceleration of the heads. I'll abandon the story format for now and engage in a short lecture on Newtonian physics and how Faraday's laws of electromagnetics interact.

Up to now, I've been describing the seek parameters as if the head were moving in a straight line, but in a rotary actuator the heads actually move in the arc of a circle. Fortunately, all we have to do is wrap the straight line around the circle.

Newton's second law of motion is usually described as F = mA for linear motion, but it's equally valid for rotation about a pivot. The rotary version is = I, where is torque, I is the polar moment of inertia about the pivot and is the angular acceleration.

Torque is force * the distance from the pivot. = rF.

Polar moment of inertia is, officially, the second moment of mass about the axis. Using integral calculus, it's I = dm. That means that each particle of mass in the object contributes to inertia as the square of its distance from the pivot.

a', angular acceleration, is measured as angle per second per second instead of distance per second per second. The conversion is A = ra'.

Hey! All I need to know to convert from linear to angular is the radius r! Oops. To get the required torque, I need to know the moment of inertia.

The way real engineers fill in a number that isn't known yet for a new design is to use a number that's "close" from an existing design.

The radius r is going to be 52 mm, because that's pretty close to the numbers for many current disk drives. The inertia is going to be 4400 gm*mm2 because that's realistic, too.

The angular acceleration = A/r = 39069 radians/sec2.

The torque is I = 39069*4400/9800 = 17541 gm mm. The 9800 is the acceleration of gravity, used to convert grams mass to grams force.

I'll also need the number in Newton meters:

= 4400*39069*1E-9 = 0.172 N m.

Maybe the torque number will mean more to some of you if I express it as 1.5 lb in, that is, a force of 1.5 pounds at a distance of 1" from the pivot. The heads are at a radius of about 2", so we're putting a sideways force on the heads of 3/4 pound to accelerate them at 200+ g's. Yes, they're very light!

In a disk drive, the required torque is provided by a VCM (Voice Coil Motor). It's a variation of the same device that makes loudspeakers work, hence the name. The principle of operation was noticed late in the 19th century by Michael Faraday. If you have a length of wire in a magnetic field and you run a current through the wire, you get a force. In physics, the relation is expressed as a vector cross product, but in disk drive design we go to great pains to keep everything at right angles, so we can just use the algebraic equation F = B L i. F is the force, B is the magnetic field strength, L is the length of wire within the field, and i is the current. The flux B is applied across the wire, and the force appears across the wire, too, at right angles to the flux. Here's an ASCII picture (I hope it helps):

```=======================      --> direction of current in wire
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ```

flux going upward

The force is going into the page (right hand rule).

I want to calculate the current. Rearranging, i = F / BL. The equation requires force, and I know torque. To convert, we divide the torque by the radius to the "effective point of application" of the force.

So, i = /BLr. To make it work right B has to be Tesla and has to be Newton meters. I'll use a radius of 20 mm (about 3/4") from the pivot to the center of the coil. If B = 0.9 Tesla, L = 20 mm, r = 20 mm and (above) is 0.172 Nm, then i = 478 A!

Holey Moley!

Actually I just did that to impress everyone. The calculation above assumes one length of wire 20 mm long in the magnetic field. Fortunately, we can wind a coil with lots of turns and use less current. Each turn contributes its own piece of force. In addition, we use 2 identical lengths of wire for each turn, passing through the magnetic field. It's time for another ASCII picture!

```             \===================================/
----------\     \======================/    /----------
|          \     \          |         /    /          |
|           \     \         |        /    /           |
|            \     \        |       /    /            |
|    N        \     \       |      /    /      S      |
|              \     \      |     /    /              |
----------------\     \==========/    /----------------
\===================/```

I'm not clever enough to draw the magnets in their actual pie shape, so they're shown square, and the coil is shown as a trapezoid. Also, there's a piece of steel behind everything, then a magnet below the coil, then another magnet above the coil, then another piece of steel. Imagine that the pivot is about where the angled legs of the coil point to. Current flows (say) clockwise around the coil. So with the current going up in the left leg and the flux coming out of the North pole of the left magnet, the force is to the left; on the right, the current is going down but the flux is going into the South pole of the right magnet, so the force is still to the left.

Real VCM's may have from about 130 to maybe 200 turns of wire in them. Assuming that our (not yet designed) VCM will have around 150 turns, we'll need to get 478 / (2*150) = 1.59A of seek current.

OK, now I can go back to the boss and tell him, "We're OK for your ridiculous 4 msec bang-bang time if you'll let me have at least 1.6A seek current." Fortunately, I get along well with my boss and he can stand a bit of ragging!

So there's a first rough pass at the design of a disk drive actuator for a specific seek time. There will be several passes around design calculations similar to the ones I've outlined, adjusting maximum current draw, maximum velocity, settle time allowance, and even the seek time spec, until a design emerges that's "equally unsatisfactory to everybody".

Those of you who know about this stuff will notice that I blithely ignored a couple of very significant factors--back EMF and inductance. Next, I'll try to discuss how they fit in (mostly, they just mess up the beautiful symmetry of these simple calculations) and I'll also try to get into settle time (from a distinctly high-altitude perspective).

Previously I finished calculating the raw bang-bang seek time of an actuator and figuring out how much current the VCM was likely to draw.

 Requirement Value/Status Seek time 7 msec / (given) Settle time 3 msec / (given) Raw seek time (bang-bang) 4 msec Accelerate time = decelerate time = 1.5 msec Coast time 1 msec Radius, pivot to head 52 mm / (given) Radius, pivot to center of VCM 20 mm / (given) 1/3 stroke seek distance 0.3 inches / (given) Tangential acceleration at head 207 g’s Maximum tangential velocity of head 120 ips / (given, after negotiation) Angular acceleration of actuator 39069 rad/sec2 Inertia 4400 gm mm2 / (given) Torque for acceleration/deceleration 17541 gm mm Magnetic flux in gap 9000 gauss / (given) Number of turns in coil 150 / (given) Seek current 1.59 A

It looks like a pretty complete lineup, even though I just tossed in some of the dimensions and VCM specs without any real explanation. If you tear apart a drive and play with a ruler and a gauss meter, you can verify that the numbers are "in the ballpark", or you can trust me!

I mentioned before that there are a couple of flies lurking in this fragrant ointment!

The first and most important is back EMF. When a current is passed through a wire that's in a magnetic field, a force appears on that wire, and that's the F=Bli equation I used previously. It's also been noticed that when a wire is moved through a magnetic field, a voltage appears across its ends. The equation is E=BLv, where E is voltage and v is velocity. The voltage is called "back EMF" because the voltage appears backwards to an engineer who just used current to generate a force and make the wire move; the voltage opposes the flow of current.

How does this affect the VCM? Well, at 120 ips at the head, the VCM coil is moving at an average of 120*20/52 = 46.2 ips. Converting everything to SI units and remembering that we have 2 passes and 150 turns for L, we get E = 0.9*2*150*0.02*46.2/39.37 = 6.33 V. By the time I get to full speed, I've lost over 6 volts of my driver! In a 3 1/2" drive we run the motor and VCM with 12V. After taking power supply tolerance and driver FET drop and resistance of the leads into account, we have about 9.5V available at the coil, and its wire size will be chosen to provide a resistance that just about allows the maximum start current. In this case, that's about 5.9 ohms (probably a little less in practice). Now at top speed I only have 9.5 - 6.33 = 3.17V available to push current, so I only get 3.17/5.9 = 537 mA, max. What happens is, as the actuator accelerates, it develops back EMF, so it gets less current and doesn't accelerate as fast any more. In fact, the acceleration curve is a decreasing exponential.

On the other hand, what happens when you switch the current around the other way to decelerate? All of a sudden, the back EMF is working in the SAME direction as the driver, and you have MORE voltage to push current through the coil! In our example, you get (9.5 + 6.33)/5.9 = 2.68 A of current. Of course, as you slow down, the current decreases until you get back to the 1.59A static value.

In any case, the power driver chip guy wails, "Oh, my poor smoking FETs!" (They do tend to get dramatic at times.)

So in real life, you must accelerate slower that the simple calculation, but you can decelerate faster. In theory, it all comes out even. In practice, the driver doesn't mind being saturated for acceleration (if the coil resistance is appropriate), but it usually needs to "control" on deceleration for reasons having to do with the servo code, as well as preventing the smoke from leaking out of the chip. So back EMF slows things down.

The other thing that messes up the tidy little calculations is inductance. When you pass a current through a coil of wire, you observe a property called inductance. The effect is that you apply voltage, but it takes a while for the current to rise to the value that you expected from measuring a straight piece of wire, and then when you remove the voltage, the current persists for a while. You can refer to the inductance as a quantity measured in a unit called henries (from Joseph Henry who discovered some of this kind of stuff) or you can refer to a "time constant", the time for the current to rise to 63% of its final value. Henries (or millihenries) don't help me much, so I usually remember the time constant, and typical coils for disk drives have a time constant of about 100 microseconds or a little more.

For those who'd like to calculate or measure, the coils in disk drive actuators are air core coils with an effective diameter of about 1". They're actually shaped like a piece of pie with the tip eaten off. 100 sec doesn't sound like much, but it's 6.7% of our accelerate time.

Settling Time:

One of the reasons that the initial specs for a disk drive have a large allocation for "settling time" is that when we calculate the raw seek time, then add the fudge factors for back EMF and inductance, the actual seek time eats into the settling allowance. You can figure that the actual seek time will be about 5% to 8% more than you figured. In a 7 or 8 msec drive, it's about 0.5 msec.

But settling is a real factor, not just a fudge. When you've just been decelerating at 200 g's for 1.5 msec, you've excited every vibration mode that the actuator knows about. The whole thing wants to ring like a bell. And despite the attempts of us mechanical men to make everything stiff, it's in the nature of metals to ring!

I suggested that my theoretical drive would have 10,000 TPI. Viking was rather conservatively designed; it only has 6432 TPI. The new IBM 2 1/2" drives have to have about 12,000 TPI if the reports in the papers make any sense (I haven't seen actual specs). Anyway, 10,000 TPI will be a commonplace within the next 6 months, and that translates to 100 in from track to track.

A head has to be within about 15% of the track centerline to read data reliably, and if you allow a head to drift more than 10% off the track centerline while writing, you're taking very serious risks of destroying data on the next track over. Remember, the next track could also be 10% off closer to your track, and we want to write as wide as possible to improve the integrity of the data. We can't have very narrow tracks with large safety margins between them and get these huge data capacities; we have narrow tracks with even narrower margins!

10% of 100 in is only 10 in. It isn't hard to get a head to vibrating back and forth with a zero to peak amplitude of 10 in!

To get the best possible seek time, the servo system is slightly underdamped. That is, as it comes up to the destination track, it's expected to overshoot slightly, then correct and wobble back and forth a couple of times. Ideally, the head should stay within the 15% on the first wobble, but it works out to be OK if it's on the second one. If you tried to land precisely on track, you'd have to approach more slowly, and it turns out that the slow approach takes more net time than the chance of an extra wobble.

Here's another case where I really wish I had a virtual whiteboard! This stuff would be a lot easier to see if I could draw you a picture, but my ASCII art abilities are sadly limited!

Before I mentioned that a servo burst might occur every 92.59 sec. Say it's 100 sec to make it easier to figure. That makes the sampling frequency 10 kHz, and the Nyquist frequency beyond which the servo theoretically can't see anything, 5 kHz. Aliasing happens, and we see it, but I'll ignore it for now.

Here's where I get out of my depth. There's a set of relationships between the Nyquist frequency, the servo "crossover" frequency, the mechanical stiffness of the actuator (the main frequency is usually around 4 kHz to 5 kHz) and the precision with which the servo system can follow the track centerline. I don't understand all that well enough to explain it very clearly even to myself; I just accept what the servo people tell me. They do the same with respect to what's possible in the mechanics, so I guess we're even!

I guess I'll just have to let it sit here. As the actuator arrives on track, it wobbles back and forth until the servo system is satisfied that it isn't going to be more than 15% (or so) off track on the next wobble, then "seek complete" is posted and it's OK to read data. After the wobbling has dissipated some more and there have been a "sufficient" number of samples within 10% (or so) of the track centerline, the servo system posts "OK to write". You can be sure that a lot of agony goes into deciding what the minimum "sufficient" number is and what the (or so) offset from 10% can be!

Anyway, all that wobbling around and decision making is rolled into "settling time".

OK, how do seek time, settle time and latency play together? And how about head switch time, while we're at it?

A hard disk drive is usually sitting on whatever track it last read from or wrote to, and the active head is whatever head was active on the last operation. When the system requires more data to be read or written, the drive hardware translates that into a physical track number, head and sector number. If the data (to read) is already in the drive's on-board cache, it just spits it out, and the hardware is unaffected.

For any write operation, and for any read operation that isn't in cache, these are the possibilities:

1: The destination is a sector on the present head and track.

In this case, the only delay is to wait until the destination sector passes under the head. That's latency. If you assume that the target could be anywhere on the track with equal probability, then on average it'll take half a revolution of the disk to get it under the head (anywhere from just coming up to Shucks! Just went by!)

 RPM Rotation time (msec/rev) Average Latency (msec) 3600 16.67 8.33 4500 13.33 6.67 5400 11.11 5.56 7200 8.33 4.16 10000 6.00 3.00

2: The destination is on the present track, but on a different head.

You have to switch heads, then wait the latency period. Actually switching the active head only takes a few microseconds, but it takes some time to make sure that the new head is on the center of the track. Head switches and 1-track seeks usually take about the same amount of time; you have to wait for the next sector to see where you are, and a few more to be sure you're where you want to be. The spec sheets usually say 1 msec or 1.5 msec head switch time, and the average time is usually half that or less. If your spokes come up about every 100 sec, it's about 4 to 6 spokes to complete a head switch or a 1-track seek.

3: The destination is on a different track, but the same head.

4: The destination is on a different head and track.

You have to seek. Seek time is usually given as an average, and settling is usually included in the seek time. The minimum is a 1-track seek as described above. The maximum is usually in the spec sheet, maybe 18 to 22 msec on a new, fast drive.

The time to access the data is the seek/settle time plus latency.

A "read seek" is what's usually in the broadsheet. A "write seek" takes a little longer, 0.5 msec to 1 msec longer, because of the additional settling before you can allow writing. Notice, that the additional settling for writing can overlap the latency. On the other hand, if your target comes by during the settle time, then you still have to wait (a whole rev!), so the whole thing cancels out, on average.

On a 7200 RPM, 8 msec seek time drive, the average time to access any sector is about 12 msec. If you knock a msec out of any of the factors-seek time, settle time or latency, you knock a msec off the total. As usual in engineering jobs, you need to balance other factors-acoustics, power consumption, cost of hardware, and so forth, to make a good decision.