Speed Matching Locomotives

This article explains Speed Matching for your locomotives. Also read the article on Back-EMF for more details. Read the documentation for the decoder as well, as it may have advice on speed matching, plus CVs needed. CV29 enables the speed table. 
=== Speed Matching ===
Speed Matching involves running locomotives on a long section of track and timing how long a locomotive takes to travel a defined distance. For N scale 15-20 feet is needed, adjust this method to your scale. Measure out a known distance on the layout, the longer the better. You'll also need a stopwatch for timing. Clean the track and wheels beforehand to eliminate any pickup issues. A double tracked section of mainline can be used to compare two locomotives simultaneously. 
With this method, determine a locomotive's speed by measuring the time required to travel a known distance. This will need to be completed twice for each locomotive, using different throttle settings. Determine which locomotive starts at the lowest throttle setting, and which locomotives run the fastest at a high throttle setting.
:Another possibility is to use a test stand with a speedometer, such as that which was offered by Bachrus. That allows you to adjust speeds on your workbench.
Before beginning determine which locomotive runs the slowest at a given speed step. Trying to match a slow locomotive to ones which are faster will be frustrating.
 The speed matching process is much easier using DecoderPro. 
=== Preparations ===
 If not using DecoderPro, read the CVs below in each locomotive and make note of them before altering any CV. 
 Speed Tables are Optional, consult the decoder's documentation to determine if that feature is included. 
# Set the top speed
# Read the CVs from each locomotive
##If using DecoderPro: If the locomotive is not in DecoderPro's roster, create a new entry and read the decoder's CVs. 
# Set CVs 02, 03, 04, 05, and 06 to 0 (zero). If these CVs are NOT zero, their effects will adversely influence your observations; any effort will be fruitless.
## This clears the Vstart, Acceleration Rate, Deceleration Rate, Vhigh and Vmid values. 
# Turn off BEMF. This step may not be needed with TCS or QSI decoders.
#Set the command station to use the 128-speed step mode. If you typically use the 28-step mode, the decoders can be fine-tuned in that mode later.
=== Making Adjustments ===
 When speed matching two locomotives on parallel tracks, making them a consist simplifies control of both!
## This is CV5. Use a value of 180.
## If using a speed table, set CV94 to 180.
###If you are using DecoderPro, the easier method is to use the Match Ends command in the Speed Table tab.
# For each locomotive, determine which throttle setting gets the locomotive moving from a dead stop. Note this setting, and also the time it takes to travel the track section.
# Now run each loco at some ridiculously high throttle setting to determine which loco runs *faster* at that setting. (We can decrease top voltage on the faster one; we cannot increase the slow one.)
# Be sure to start the loco some distance before reaching the beginning of the measured distance, so that its speed stabilizes before it begins the measured distance.
Let's start adjusting the start speed:
# Determine which loco starts the slowest, or lowest speed step, preferably speed step 1.
## In this step, we are only interested in what it takes to get the loco moving from a dead stop. 
## Through decoder settings, we can adjust the startup voltage to get it to start moving at speed step 1.
# Once the reference locomotive has been found, match the other locomotives to that speed step.
## Slowly increase CV02 until it starts moving on that speed step.
### Consisting the locomotive to the fastest unit (but don't couple them) will visually indicate when the match is close. That way one throttle controls both units.
### If a double track is available, run them side by side to verify the result against the reference locomotive
## Repeat this step for each locomotive to get starting speeds matched.
## Verify the speeds match by increasing the speed up to speed step 10, for example.
# Repeat the process moving in reverse. They should be close. If not, adjustments to Forward Trim and Reverse Trim (CV66 and 95) will be necessary.
:Adjusting the Max Speed:
# Here, we will be adjusting the faster locomotive's speed to match the speed of the slower locomotives. Begin with one of the faster locomotives you wish to match. This is why a value of 180 was used in CV5.
# Keep adjusting CV05 (or CV95 if using the speed table) until the maximum speed matches that of the slowest locomotive you wish to match.
# Repeat the above step for each of the faster locomotives, remember, we are not changing this setting on the slowest locomotive.
:Mid-Range Speeds
After the Slowest and Fastest speeds have been matched, some adjustment in the middle will be needed.
# With a speed selected in the middle of the range, adjust the appropriate CV to match the faster unit to the slower one. Either locomotive can be tweaked, or both if needed.
# Again, verify the match is close in both directions, and make any adjustments needed.
# If using DecoderPro, the speed table can be adjusted using the midpoint as a reference, to create a straight line from the middle to the top and bottom of the curve. Don't alter the midpoint!
==== Speed Tracking ====
This is to verify the locomotives have a good match, by slowing incrementing the throttle and observing their behaviour. If problems appear, repeat the process to match them.
==== Momentum Adjustments ====
Using the notes made earlier, set the momentum via CVs 3 and 4 to their previous values. Run the units again, at various speeds, then change direction on the throttle to see how they slow to a stop and reverse. Make any adjustments deemed necessary. 
Once you get the above working, start turning on special features such as BEMF if you feel the need. After doing that, again verify that they are matched. If the Decoder supports BEMF Cutout, adjustments may be needed to make the locomotives have a similar cutout.
=== Things to Keep in Mind: ===
 It is not possible match the speed of every locomotive exactly. There are differences in motors, drivetrains, etc. It is impossible to eliminate these irregularities to match every speed perfectly. In time it may be necessary to make adjustments as the mechanism wears in.
* At a given throttle setting:
** Some vehicles will run at one speed going forward, and an entirely different speed going in reverse.
** Some vehicles run at one speed running "light", with a different speed when under load.
** Some vehicles will run at one speed going uphill, and another speed going down...
 Some decoders may have an optional Forward/Reverse Trim feature, which allows you to adjust the speed to match in both directions. 
=== Final Steps ===
Couple and consist the locomotives together. Take them out onto the mainline to observe how they behave at various speeds. Mute the sound (if equipped) so that odd noises, like wheel slippage can be heard. The consist should run smoothly with little surging or bucking. If so, the culprits may need additional tweaks to the speed ranges.
 If you used Decoder Pro, be sure to save the updated roster information for each locomotive. 
=== Possible Issues ===
 For more detailed information see the JMRI web page on Speed Tables. 
The NMRA DCC Standard S9.2.2 specifies that CV2 (VStart) is mandatory, CVs 5 and 6 are optional. These three CVs are only active when CV29 bit 4 is set to 0 (zero).
* Speed tables are optional. This feature (if available) is only active when CV29 bit 4 is set to 1 (one)
Note: Speed tables must not have a a step set to a value lower than that of the previous step. Doing so will cause problems. Software such as JMRI DecoderPro or ESU's LokProgrammer will prevent this mistake from happening.
* SoundTraxx Tsunamis work a little differently. When the speed table is active, CV2 is ignored but its value is used to adjust the speed table.
* QSI multifunction decoders do likewise: The values in CVs 2 and 5 impact the speed table.
* ESU V4 and Select multifunction decoders also have differences (excluding those with an early firmware version). Again, CVs 2 and 5 modify the speed table (when active) by specifying the VStart and VHigh values. CVs 67 and 94 are fixed values. The advantage is that the bottom and top of the speed curve can be altered easily while avoid mathematical errors possible when using QSI's method. The decoder determines the actual speed curve, so the speed curve always starts on the values found in VStart and VHigh. 
** Both DecoderPro and the LokProgrammer are aware of this restriction.
==== Digitrax ====
Some multifunction decoders from Digitrax offer scalable speed stabilization (back EMF) control to smooth operation in the low speed range. This feature is especially beneficial in N scale switching, allowing the decoder to select the effect’s intensity. Most decoders with this feature are shipped disabled.
Digitrax decoders use CV57 to control BEMF intensity in both normal and advanced consisting modes. When advanced consisting BEMF support is disabled, engine speed and performance drop significantly when part of an advanced consist. In other words, the engine may run alone but barely moves when part of an advanced consist.
CVs Used:
* CV55 (Static Compensation): Controls the intensity of speed reaction based on the difference between current and target speed.
* CV56 (Dynamic Compensation): Controls the speed adaptation rate based on historical speed differences.
* CV57 (Droop): Controls the speed loss under load, separately for regular and consist addresses.
** CV57 is a complex control value that operates independently using two separate settings. Consequently, the CV57 value must combine both values into a single value.
* Speed Stabilization Control: CV57 controls speed stabilization, with 015 or x0F hex for full on and 000 for off.
* Droop Value Impact: A high droop value (e.g., 005) reduces speed fall-off, while a low value (e.g., 001) has minimal effect.
* Optimal Value Determination: The ideal CV57 value depends on locomotive type and train size, requiring observation and experimentation.
CV55, CV56, and CV57 can be changed while the locomotive is moving using Ops Mode programming. Scalable speed stabilization automatically adjusts motor power to achieve the desired speed, making low speeds like 3% or 4% perform best with CV02 set to 00.
===== Setting Up a Decoder =====
# Speed Stabilization Activation: Program CV57 (Droop) to a CV value of 05 to activate speed stabilization.
# Speed Stabilization Adjustment: Adjust CV55, CV56, and CV57 to optimize speed stabilization based on locomotive performance.
For full details see: KB926: CV55, CV56 & CV57 - Scaleable Speed Stabilization (Back EMF)
=== See Also ===
* Speed Table
* Speed Matching Tips
* Speed Steps
* JMRI Speed Tables
== Speed matching Videos ==
Category:Multifunction Decoder