Skip to main content

Hi All,

I visited the awesome San Diego 3-rail (SD3R) club last night to have a look at their layout and setup, and found some interesting stuff going on that we may need to work on a bit with the experts here on the forum.

The anecdotal story is for you is "when the legacy base is connected to the track their DCS system (1 TIU) won't add engines or do any complicated exchanges. The moment the power is removed from the legacy base the DCS works fine."

So I looked into this a little more. Their club has a very strong legacy signal (almost 3V of swing on the carrier) which I think is artificially inflating the noise floor of the DCS packet in the receiver's CDMA correlator. Here's two screen captures showing with and without the legacy base on (note the absence of the carrier).

Legacy Off:

pic_208_5

Legacy On:

pic_208_6

Note these signal excursions are measured with engines on the track so they are smaller than what we measure with the TIU unloaded in the other threads.

In case anyone isn't familiar... how the DCS decoder works is it computes correlations on the overall 31 bit spreading sequence (see old post for details). I think what we're seeing is the super-imposed 3V sine wave is enough to hurt the correlation level to the point where it's not taking the packet as a successful spread-code match.

Like.... without the legacy carrier you are getting 29-31 / 31 levels of correlation and with the carrier there, it's inflating your noise floor (uncorrelated content) down to maybe 26-27 / 31 where the decoder starts to drop packets.

I think "DCS and Legacy compatibility" assumes the DCS packet is infrequent enough (10 us per second) that the legacy user/system isn't going to notice, and that the legacy voltage is small enough that it won't hurt the DCS correlator. Once the signals have comparable amplitudes (say factors of 3-4) the assumptions start to break down and the two systems interfere. DCS will always be the loser since legacy is continuous wave and it is not. We can probably work out the equations for detection probability of a 31 bit sequence with a sine interferer at a specific frequency. (usually its AWGN noise you do this for).

In the above situation it seems it's only killing them for long exchanges (adding engines, making them active, ...) not the short exchanges like whistles and speed. So in the in-term I suggested they just put a disruption momentary switch that disconnects the legacy base while they add engine. Essentially you hold the button down (open circuit) while the engine is being added. Their legacy performance is solid so I don't really want to attenuate the carrier since that might make new problems for them.

 

My thinking:

Maybe we could come up with a circuit that detects the rising edges of the DCS packet and temporary disconnects the legacy base (on microsecond scales) to let the DCS signal propagate without the noise floor inflation. It would have to be lightening fast. The DCS bit time is about 260ns (1/3.85 MHz) so probably too fast for a micro-controller.

Quick ideas:

ANALOG: Maybe something analog like a self-resetting latch with an RC delay.  So you have the SR latch with the S port set at a threshold above the legacy carrier but below the DCS excursion. When set it disconnects the legacy base. The R port is an RC network from Q with maybe a 10us (1 DCS packet long) delay before the latch is reset and the legacy restored. If you get successive packets it keeps firing S. You can put a transistor to flush the RC everytime S=1.

 

DIGITAL: Maybe a cheap FPGA clocked at 200-300 MHz, and just oversampling the waveform heavily. Set an input pin threshold so it's above the carrier, below the DCS excursion and just sample it every clock. If you see a "1" you open a pass-transistor on the legacy carrier. You have a clock counter with a termination value of maybe 100 counts. If you see another "1" on any clock you put the counter back to 0 and keep counting...

Thoughts?

Attachments

Images (2)
  • pic_208_5: Legacy off
  • pic_208_6: Legacy On
Last edited by Adrian!
Original Post

Replies sorted oldest to newest

PLCProf posted:

I dunno-

Your scope images show the composite track signal, I would assume (hope) that the DCS receiver/decoder has some frequency selectivity; the 455 kHz legacy signal is 4 octaves away! If the 455 kHz is getting through to the DCS decoder I can see the problem!

 

When you look at the spread code MTH uses:  101100000110011010111101000110001, there's sections of 4&5 repeated symbols so you need to support bandwidth down to like 1/5 to 1/6 the bit rate to get clean eye windows, that's a pass-band starting at around 500-600 KHz. It's not a digital FIR filter so the stop-band rejection down at 450 KHz isn't going to be so great. I guess that's why it does come inside.

gunrunnerjohn posted:

I wonder if a notch filter might help there, but it might need to actually be in the locomotive, probably a bit complicated.

FWIW, we've also noticed that at times the Legacy affects the DCS on the club layout.

Yup. It has to go in the engine. That's why it's hard to fix in a club with 100+ members.

Some more quick testing to take a closer look at this. I blew the dust off the old FPGA decoder in the (old post) from last year and made the following setup:

packet_corrlation

So what we have is the FPGA decoder talking with the TIU exchanging packets and reporting the value of Cx (the packet correlation result) back to the PC. Then we have a signal generator injecting a 450 KHz tone with varying amplitude to see the correlation result Cx at different amplitude levels. Obviously doing only 1 packet is statistically meaningless so we compute the average Cx over 1000 exchanges at each voltage level. I've scaled the plot out of 16 instead of 31 (since 0 is actually 100% correlated but inverted) so the single axis can represent best to worst. This is with the actual MTH spreading code (obviously since I am talking to a real TIU)

packet_corrlation2

I don't have control over the DCS excursion voltage since its set by the TIU and not adjustable but I did track it with the scope during the measurement (fixed at 6.17V in the test setup). As you can see from the above, once the injected 450 KHz tone gets to about 1.6V which is (about 25% (1.6 / 6.17) of the voltage of the DCS signal, the decoder correlation starts to drop off rapidly. I'm not sure if this scales linearly or not (like if we normalize the injection to DCS voltage will the drop at the same % each time).

It certainly doesn't fall apart gracefully, 1.2 to 1.8V (about a 0.6V change in injection) pretty much wipes out the correlator in my decoder. I'm sure the MTH one on the PS2/3 is pretty similar, at least according to their documentation.

I think the correlation confidence threshold Ct for MTH is somewhere around 13-14.

Attachments

Images (2)
  • packet_corrlation
  • packet_corrlation2
Last edited by Adrian!

Adrian, I wanted to thank you for spending the evening at the SD3R layout last night. A lot of the DCS users (me included) were going to leave the club over problems running DCS there. Finally, someone with real test equipment and an expert technical understanding DCS put the setup through a real diagnostic session.  The issues you discovered and that trick DCS panel you built gives SD3R's DCS users a light at the end of the tunnel--and I hope the light is an oncoming train...in O Gauge running DCS, that is. Thanks again!  

DJ's Trains posted:

Adrian, I wanted to thank you for spending the evening at the SD3R layout last night. A lot of the DCS users (me included) were going to leave the club over problems running DCS there. Finally, someone with real test equipment and an expert technical understanding DCS put the setup through a real diagnostic session.  The issues you discovered and that trick DCS panel you built gives SD3R's DCS users a light at the end of the tunnel--and I hope the light is an oncoming train...in O Gauge running DCS, that is. Thanks again!  

Thanks! I'm glad to help!

Immediately, I'm thinking it's probably best if you guys put in the Rev "M" TIU, get rid of the bulbs and other things that don't make sense on the track and just see how it works for a few weeks. Then I'll come back (probably mid June) and make sure the new TIU isn't degrading by repeating all the measurements we did last night. In parallel, I've got 2 or 3 ideas on new things we could build to manage the legacy interference (see above) that I'll be trying out prototypes for in our AGHR club the next few weeks or so...

After mid June I'll be a lot more free and I'm willing to come down to SD from LA as much as is needed to get your DCS running well. If there's more issues beyond what we already found, we'll figure it out together and share them with the community here!

Okay I have an interesting thought but I actually don't know that much about legacy and could use advice from someone like GRJ or someone else with legacy expertise... I actually only have DCS trains myself.

Thought Exercise:

I'm thinking the DCS packets are typically about 1.2 to 2.5ms in duration, and if a packet fails or gets a partial match, the TIU or PS2/3 will retry the exchange. If we just took a 555 timer and chopped a 6ms window into the legacy signal say every 25 ms the DCS should be able to find the holes through the retry process, and communicate in them provided they are wide enough, and frequent enough.

Something like this:

legacy_timer

 

What would this do to the legacy signal?

1. Would it notice the windows (I would expect not since the current DCS packets themselves don't disrupt it).

2. I'm struggling to find good information about the Legacy signal format (modulation, duration, framing, error checking). If the command duration is longer than the window spacing (25ms) legacy will obviously fail. Is there a pulse width and duration that could satisfy both systems?

This may be a simple $4 fix...

Thoughts?

Attachments

Images (1)
  • legacy_timer
gunrunnerjohn posted:
Adrian! posted:
Immediately, I'm thinking it's probably best if you guys put in the Rev "M" TIU, get rid of the bulbs and other things that don't make sense on the track and just see how it works for a few weeks.

Rev "M" TIU?  What's that?

Rev "M" (with quotes) is the TIU with the 1n4148s inside and TVS. The one in my other post. I put one together for the SD3R club.

GGG posted:

So just to be clear, nothing but MTH engines on layout with legacy active and MTH engines can not add?  Any other operator see this?  Lots of layouts run legacy and DCs so why just San Diego club.

 

I'm one of the DCS operators having to deal with this problem at SD3R.

"[N]othing but MTH engines on layout with legacy active and MTH engines can not add?"  Correct. And the same problem occurs with Legacy engines on the layout also. If no one is running Legacy the next time I'm operating trains down there, I'll do some experimenting with the issues I've been having with the Legacy transmitter base off and on.

Last edited by DJ's Trains

Add Reply

Post
The DCS Forum is sponsored by

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×