Since most model locomotives run at prototypically high speeds, and different models usually run at different speeds, it is worthwhile to match the speeds of your locomotives, especially if you wish to MU them in varying combinations.
My method requires nothing more than a cheap stopwatch and 3 distance markers (I use plastic bulletin board tacks with the pins cut off).
This method applies only to decoders that allow changes to CV2 (start voltage), CV6 (mid voltage) and CV5 (maximum voltage). For extra fine tuning, it is also helpful if your decoder can handle changes to CV116 (kick rate), CV117 (kick strength) and CV95 (reverse trim).
Step 1 - Adjusting the start speed via CV2
In Program on the main mode, I adjust CV2 until the locomotive just creeps at speed step 1 (using 128 speed steps). If you can't get the loco to creep with CV2 less than 30, you might adjust CV116 (kick rate) to somewhere from 2 to 5 and CV117 (kick strength) to somewhere from 4 to 25 to overcome striction in the motor. If the loco creeps faster in one direction than the other, adjust CV95 (reverse trim) by using a value of 1 to 127 to increase reverse speed and 129 to 255 to increase forward speed. In both cases, start at the low number and move up.
Step 2 - Adjusting top speed with CV5 and mid speed with CV6
Use your markers to measure out 2 distances along your track. I place my pins to set a maximum speed of 64 mph and a mid speed of 24 mph. With the mid speed less than half of the max speed, you get better control at low speeds. You can set your speeds wherever you want using the formulas given below.
The formula for HO is simple:
Distance (inches) to mark off for 5 seconds equals speed in scale miles per hour
eg. For 24 mph, measure 24 inches between markers
and for 64 mph, measure 64 inches between markers
The formula for N-scale is a little more complicated, but not very:
Distance (inches) to mark off for 5 seconds equals 0.55 X speed in scale miles per hour
eg. For 24 mph, measure 0.55 X 24 inches between markers (13 inches)
and for 64 mph, measure 0.55 X 64 inches between markers (35 inches)
So my pins are set at 0, 24 and 64 inches along the track:
The photo shows only the first two pins.
The following speed settings given are for my NCE system using 128 speed steps. My maximum speed step is 126 and my middle speed step is 63. You will adjust yours for whatever DCC system you are using.
Running your loco at top speed, measure how long it takes to cover the maximum measured distance (64" on my track). Adjust CV5 to have the loco take 5 seconds to cover it. (This is where the stopwatch comes in.)
Then run your loco at its middle speed step (mine is 63) and adjust CV6 until it takes 5 seconds to cover the middle speed distance (mine is 24").
If you've never tried to speed-match your locos before, try this method. It's fairly simple and the rewards are great. (Of course, you might have to go out and buy a cheap stopwatch