Author Topic: Speed matching with accutrack and excel  (Read 569 times)

0 Members and 1 Guest are viewing this topic.

ridinshotgun

  • Crew
  • *
  • Posts: 465
  • Gender: Male
  • Respect: +79
Speed matching with accutrack and excel
« on: July 16, 2023, 12:50:44 PM »
0
So I have had this video in my library for a while on using an excel spreadsheet to make calculations based on accutrack information to indicate changes in certain CVI numbers.  However, the guy who uploaded the video several years ago deleted the spread sheet from the file location and won't respond to requests for it.

SO for you math geeks what would be the formulas he is using?  I have tried to slow the video down but the clarity id not good enough or the frame with the formula id too quick to pick up all the formulas.  Can any of you math whizzes (and I know we have some on here) figure out the formulas he is using becuase I am not smart enough in the numbers department to figure it out.


Bendtracker1

  • Crew
  • *
  • Posts: 1466
  • Remember The Rock!
  • Respect: +1398
    • The Little Rock Line
Re: Speed matching with accutrack and excel
« Reply #1 on: July 16, 2023, 03:49:55 PM »
0
If this is what you need?

Looks like this:
Column E=D9/C9
Column F=E9*255

ridinshotgun

  • Crew
  • *
  • Posts: 465
  • Gender: Male
  • Respect: +79
Re: Speed matching with accutrack and excel
« Reply #2 on: July 16, 2023, 04:44:09 PM »
+1
OK I got those now.  I had column E but couldn't catch the frame with the Column F.

Now what about Column G?  Is that a function in that box or an input once you figure out the CVI from testing it through the accutrack?  He never explains those columns.

He has three sheets in that workbook.  I have the first sheet which is just a conversion chart but he never shows the second sheet labelled Throttle step conversion.  I think that is maybe the sheet with all the formulas he uses but not sure.  The third sheet is the one he mainly shows but not even sure if he has more columns than G and H which are CV5 max speed and CV 6 mid speed respectively.  Kind of frustrating trying to piece it together.  But thanks for the help so far!

kiwi_bnsf

  • Crew
  • *
  • Posts: 233
  • Respect: +239
Re: Speed matching with accutrack and excel
« Reply #3 on: July 20, 2023, 01:37:58 AM »
+6
That DBRX Youtube video has a few good recommendations — using JMRI and ops mode programming in combination with an Accutrack speedometer makes speed matching at lot faster and more consistent.

However, I've speed matched more than a hundred N scale locos from a wide variety of manufacturers using mixture of decoders, and I found that almost none of my locos have a naturally linear speed response. Therefore I don't really see any benefit from using a spreadsheet to calculate any values for speed tables.

The Theory:

Initially I used a reference loco — a Kato SD40-2 Mid with its max speed set to 75 (of 255) to get things a bit more sane, and then just manually speeded match every other loco to that by consisting them and running on parallel tracks and using JMRI Decoder Pro in ops mode.

However, upon purchasing an Accutrack speedometer, it became much easier (and more consistent) to linearise locomotive speeds. I find that this results in much better performance in the bottom of the speed range (which is where you're going to spend 90% of your time unless you are a speed demon).

By linear, I mean the same as the DBRX YouTube video where you pick a max speed that's equivalent to 100% throttle and then linearise from there. I chose a 60 mph top speed as I have some steam excursion locos and hotshot Z trains that can justify that. So I linearise as follows:

   100% throttle      =   60 mph
   75% throttle      =   45 mph
   50% throttle      =   30 mph
   25% throttle      =   15mph
   10% throttle      =   6 mph

The 10% throttle step is a good point to check when speed matching as it's surprising how much variation you get across different locos at the low end of the throttle curve.

I don't use 3-step speed tables as it doesn't give me enough control to get a linear response.


At this point I think that it's really worth mentioning BEMF motor control. This is a feature of most modern decoders that dramatically improves motor performance by measuring the Back Electromotive Force from the motor, and using this to achieve a constant speed. BEMF allows for extremely fine motor performance, especially at low speeds. It is enabled by default on almost all new decoder equipped locos.

There seems to be some misinformation out there on using BEMF — many people take it as gospel that you cannot consist locos that have BEMF enabled. This is simply not true. All my locos have BEMF configured, and they consist perfectly across a wide range of conditions (e.g. running light versus long heavy trains). The key thing if you want to take advantage of BEMF motor control, is that you need to closely match your locos speeds across the entire throttle range, otherwise they can "fight" each other where they are not well matched (and this can be very obvious at low speeds).

To an extent BEMF tuning is decoder specific, but most decoders have values for:
   K = gain factor of proportional part of the BEMF motor control
   I = gain factor of integral part of the BEMF motor control
   Reference Voltage (usually starts as a number that is equivalent to 12V)
   Sampling period (usually in milliseconds)
   Some configuration values that control how much BEMF control there is across the speed range
      (usually you want more BEMF influence at slow speeds, and then have things taper off up the speed range)
   

You need to get BEMF sorted before you do any speed matching, as changing the values will change the speed response of the loco.

I can happily bore everyone witless about the details of BEMF tuning, but there is a lot already written on how to configure BEMF for common decoders. Most of my decoders are ESU Loksound V5 which have great BEMF control (although I'd never use their automatic BEMF settings – these are rarely any good).



The Practice:

For what it's worth, here is the speed matching method that I use:


1. Get the loco running well at speed step 1 (1-2% throttle)

With default BEMF enabled, zero momentum, and Decoder Pro in ops mode, I lock speed steps 1 and 28.

I adjust the value of speed step 1 until the loco just creeps. Decoder Pro will automatically make the steps in between 1 and 28 straight — don't worry, this will be adjusted further as we go.

I'm a bit of a nutcase when it comes to low speed control, so I then experiment with the Motor control values of K and I to try to get throttle response as smooth as possible across the 1-20% throttle range. This can take a lot of trial and error, but once you have the values sorted for a specific decoder and motor combination, this can then form a start point for any similar locos that you have (I can usually get Scale Trains or Kato or Atlas Scale Speed loco to perform very well in a minute or two).

BEMF can only do so much. If slow speed performance can't be improved to a level that I'm happy with, I strip down the loco and give it a good clean and if possible check it runs smoothly on DC (with a DC light board).


2. Get the loco running at 60 mph at speed step 28 (100% throttle)

With the Decoder Pro speed table values locked for step 1 and 28, I reduce the value of step 28 down from 255 until the loco runs through the AccuTrack at exactly 60 mph.

It is a good idea to keep an eye out for any surging in response to throttle changes high up the speed curve, as this may indicate that the BEMF value for K is too high, and its influence needs to be reduced at higher speeds.

On the very rare occasion that you cannot get a loco to run fast enough, you can adjust the Motor reference voltage downwards if the decoder supports it, but once you do this and can achieve 60 mph, then you have to repeat step 1 as the loco will now likely run too fast and speed step 1.

Very occasionally you can encounter a loco that runs faster in one direction than the other. This can be tweaked in most decoders using forward or reverse trim. Usually you only want to adjust this a little bit. Generally I find it acceptable for a loco to run at slightly different speeds forward vs backward at 100% throttle, but it is more important that forward and reverse speeds are equal at lower speeds.

At this point you should have a loco that creeps beautifully at speed 1-10% throttle, and hits 60 mph at 100% throttle. If not, then repeat steps 1 and 2 until you do!


3. Get to loco running at 30 mph at speed step 14 (50% throttle)

With the Decoder Pro speed curve values locked for steps 1, 14, and 28, increase or decrease the speed step 14 value until you hit 30 mph at 50% throttle.

As the top, middle, and bottom values are checked, then these values will not change, and Decoder Pro will again change all the in between the checked values match straight lines.


4. Get to loco running at 45 mph at speed step 21 (75% throttle)

With the Decoder Pro speed curve values locked at 1, 14, 21, and 28, increase or decrease the step 21 value until you hit 45 mph at 75% throttle.


5. Get to loco running at 15 mph at speed step 7 (25% throttle)

With the Decoder Pro speed curve values locked at locked at 1, 7, 14, 21, and 28, increase or decrease the step 7 value until you hit 15 mph at 25% throttle.


6. Get to loco running at 6 mph at speed step 3 (10% throttle)

Leave everything else locked and then tweak steps 2 and 3 of the speed table until you get close to 6 mph at 10% throttle.


Here is an example for a Kato SD40-2 equipped with a Digitrax DN163K1C decoder showing the locked speed steps and the resultant curve:

[ Guests cannot view attachments ]


Congratulations, you should now have a loco with completely linear speed response and good slow speed performance  :)

If you want to add momentum, then you can do so at this point. You will just need to do some testing and maths if you are going to mix different brands of decoders (as they have different momentum effects).


When speed matching a similar loco, start by duplicating the closest DecoderPro roster entry and applying all the Motor Control and Speed table values for the quickest tuning. I find Scale Trains and Kato locos only vary by a few percent.

None of the above requires any spreadsheeting, and the Decoder Pro roster entries become your documentation (don't forget to back these up). For my ESU locos, I still use Decoder Pro for speed matching, and then read the final config values back from the loco using the LokProgrammer to update the ESU file's speed table and motor control values.


The only time I get a spreadsheet out is to keep track of ProtoThrottle notch settings and how these relate to the speed table — but that's outside of the scope of speed matching :)

I hope this helps de-mystify some aspects of speed matching!

Cheers
« Last Edit: July 21, 2023, 06:06:12 PM by kiwi_bnsf »
--
Tim Benson

Modelling Tehachapi East Slope in N scale circa 1999