Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2 3 4

Author Topic: Can you generate a crude TDR from router Hlin(f) stats?  (Read 22441 times)

les-70

  • Kitizen
  • ****
  • Posts: 1254
Can you generate a crude TDR from router Hlin(f) stats?
« on: May 29, 2012, 07:39:17 PM »

I was reading about the equivalence a TDR with the inverse fourier transform of a frequency sweep. ( http://cp.literature.agilent.com/litweb/pdf/5989-5723EN.pdf)
Noting the derivation of the Hlin(f) stats in a router  (eg in http://www.ee.kth.se/php/modules/publications/reports/2008/XR-EE-KT_2008_003.pdf).
  I decided to see what was obtained with discrete inverse fourier transform of Hlin(f).  i.e. in fortran

        tpie=((3.14159*2.0)/float(1024))
   do i=1,1024
   c(i)=0.0
   do k=1,512
   c(i)=c(i)+a(k)*cos(tpie*(i-1)*(k-1)) +b(k)*sin(tpie*(i-1)*(k-1))
   enddo
   enddo

 where a(k) and b(k) are the two individual tone values given for Hlin(f) and c(i) is the IDFT created.  Adapting Bald_Eagle's netgear ADSL2+ graphing script I have plotted the result.
I did the sums in a separate fortran program. Given my rusty programming the result may or may not be correct but does look a little interesting. 
 The horizontal scale should be time/space related and not tones.
 I think that one end of the plot (or the other end) corresponds to the max adsl2+ frequency of 2.2Mhz and the propagation speed in the cable about 0.6* speed of light. 
Of order 100m. 
Without doing any extra reading I would guess that the scale is linear in wavenumber and not space.   The attached show the usual montage plus the extra IDFT Hlin plot. The results have some coherence but do they correspond to part of a TDR trace?  and show either a cable end or the small bump in my Hlog plot.
The oscillations are probably to be expected with the truncation to 512 tones and may be less with vdsl. 

If anyone is the wiser I would be interested to hear!!  (I can see merits in a real TDR.)

   Small amendments made to formulae in an edit on 24/6/. 
« Last Edit: June 24, 2012, 06:42:56 PM by les-70 »
Logged

snadge

  • Kitizen
  • ****
  • Posts: 1450
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #1 on: May 30, 2012, 10:45:32 PM »

what does this mean?

guess: you can locate faults on lines using router stats?
Logged
Aquiss - 900/110/16ms - TP-Link AR73

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #2 on: May 31, 2012, 01:17:42 AM »

@les-70,

Never having learnt Fortran, I have gone through that block of code and it makes sufficient sense to me to be able to write the equivalent in C . . . all bar one line --

Quote
1   +b(k)*sin(tpie*float(i)*float(k))

Is there something missing from it?  ???
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

asbokid

  • Kitizen
  • ****
  • Posts: 1286
    • Hacking the 2Wire
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #3 on: May 31, 2012, 01:48:37 AM »

Thank you for posting this, Les.  Very interesting stuff. Although you lost me some while back, not least with the Fortran  ???
The plot is certainly curious, but what it represents is a mystery, at least to me. :D

We would expect to see a number of 'reflections' in the time-domain plot, from impedance mismatches at the DSLAM transceiver, from the splicing at the DP and at the PCP, and anywhere in between.

This about Hlin(f) from the ITU-T G.992.3 Recommendations [1]:

Quote
The channel characteristics function Hlin(i × ∆f), shall be represented in linear format by a scale factor and a normalized complex number a(i) + j × b(i), where i is the subcarrier index i = 0 to NSC – 1. The scale factor shall be coded as a 16-bit unsigned integer. Both a(i) and b(i) shall be coded as a 16-bit 2's complement signed integer.

The value of Hlin(i × ∆f) shall be defined as Hlin(i × ∆f) = (scale/215) × (a(i) + j × b(i))/215. In order to maximize precision, the scale factor shall be chosen such that max(|a(i)|, |b(i)|) over all i is equal to 215 – 1.

This data format supports an Hlin(f) granularity of 2–15 and an Hlin(f) dynamic range of approximately +6 dB to –90 dB. The portion of the scale factor range above 0 dB is necessary to accommodate that short loops, due to manufacturing variations in signal path gains and filter responses, may appear to have a gain rather than a loss.

An Hlin(i × ∆f) value indicated as a(i) = b(i) = –215 is a special value. It indicates that no measurement could be done for this subcarrier because it is out of the PSD mask passband (as relevant to the chosen application option – see annexes) or that the attenuation is out of range to be represented.

Here's a short excerpt of Hlin(f) data from this line..

Code: [Select]
# xdslcmd info --Hlin
xdslcmd: ADSL driver and PHY status
Status: Showtime
Retrain Reason: 8000
Max: Upstream rate = 1216 Kbps, Downstream rate = 19296 Kbps
Path: 0, Upstream rate = 1020 Kbps, Downstream rate = 17398 Kbps

Hlin scale factor: DS = 9600  US = 0
Tone number      Hlin
   0 0 1
   1 3 -151
   2 -222 74
   3 3 -151
   4 0 1
   5 -151 151
   6 0 -148
   7 148 -148
   8 -74 74
   9 -141 141
   10 70 211
   11 -70 -70
   12 70 -70
   13 0 1
   14 -70 70
   15 130 -3
   16 67 201
   17 67 67
   18 0 -134
   19 3 130
   20 0 1
   21 172 -52
   22 -264 158
   23 98 -486
   24 402 486
   25 -857 -123
   26 899 -673
   27 -243 1407
   28 -1008 -1636
   29 2394 723
   30 -2828 1453
   31 1414 -3791
   32 1774 4659
   33 -5435 -2846
   34 7276 -1816
   35 -5167 7530
   36 -1407 -10965
   37 10091 8659
   38 -15882 525
   39 13311 -13276
   40 -511 21921
   41 -17113 -18341
   42 27956 1086
   43 -22305 20541
   44 1626 -31881
   45 21374 24845
   46 -32767 -3922
   47 26947 -18637
   48 -8334 31133
   49 -13043 -28844
   50 27560 14200
   51 -29828 5505
   52 20079 -21935
   53 -2987 29017
   54 -14408 -24756
   55 25740 11512
   56 -27261 5442
   57 18915 -19868
   58 -4112 26799
   59 -11703 -24111
   60 23056 13124
   61 -26192 2102
   62 20323 -16274
   63 -7713 24651
   64 -7265 -24541
   65 19497 16295
   66 -25060 -2768
   67 22287 -11403
   68 -12249 21617
   69 -1555 -24629
   70 14648 19642
   71 -22831 -8405
   72 23578 -5294
   73 -16824 17134
   74 4842 -23360
   75 8482 22139
   76 -18954 -13974
   77 23335 1573
   78 -20407 11145
   79 11191 -20213
   80 1368 22905
   81 -13329 -18520
   82 21014 8479
   83 -22139 4017
   84 16489 -15057
   85 -5914 21363
   86 -6288 -21095
   87 16394 14440
   88 -21388 -3541
   89 19861 -8235
   90 -12415 17339
   91 1400 -21116
   92 9847 18517
   93 -17963 -10486
   94 20608 -525
   95 -17117 11149
   96 8662 -18319
   97 2183 19960
   98 -12196 -15730
   99 18453 6962
   100 -19201 3647
   101 14351 -12997
   102 -5435 18408
   103 -4888 -18376
   104 13579 13022
   105 -18210 -4045
   106 17505 -5936
   107 -11759 14016
   108 2775 -17928
   109 6835 16605
   110 -14298 -10595
   111 17540 1675
   112 -15727 7544
   113 9484 -14436
   114 -680 17103
   115 -8133 -14856
   116 14528 8468
   117 -16630 123
   118 14034 -8623
   119 -7548 14454
   120 -934 -16122
   121 8976 13237
   122 -14362 -6687
   123 15625 -1601
   124 -12486 9290
   125 5918 -14221
   126 2176 15106
   127 -9495 -11752
   128 14037 5184
   129 -14567 2701
   130 11082 -9629
   131 -4539 13801
   132 -3075 -14052
   133 9727 10419
   134 -13547 -3968
   135 13544 -3435
   136 -9812 9777
   137 3456 -13261
   138 3735 13060
   139 -9745 -9265
   140 12983 3001
   141 -12574 3968
   142 8750 -9703
   143 -2595 12690
   144 -4151 -12129
   145 9629 8281
   146 -12394 -2243
   147 11706 -4313
   148 -7847 9540
   149 1918 -12112
   150 4423 11307
   151 -9449 -7452
   152 11805 1626
   153 -10923 4525
   154 7085 -9343
   155 -1354 11533
   156 -4599 -10560
   157 9223 6733
   158 -11262 -1139
   159 10200 -4655
   160 -6398 9092
   161 938 -10983
   162 4680 9865
   163 -8944 -6094
   164 10701 747
   165 -9540 4701
   166 5812 -8789
   167 -606 10426
   168 -4698 -9234
   169 8620 5572
   170 -10165 -472
   171 8944 -4669
   172 -5333 8458
   173 359 -9918
   174 4638 8680
   175 -8309 -5135
   176 9674 271
   177 -8422 4606
   178 4934 -8137
   179 -172 9435
   180 -4571 -8182
   181 8003 4751
   182 -9234 -84
   183 7960 -4511
   184 -4585 7837
   185 31 -9004
   186 4468 7727
   187 -7692 -4412
   188 8789 -35
   189 -7523 4412
   190 4257 -7530
   191 95 8581
   192 -4352 -7322
   193 7361 4102
   194 -8369 144
   195 7107 -4278
   196 -3968 7205
   197 -183 -8168
   198 4221 6916
   199 -7050 -3833
   200 7960 -215
   201 -6733 4137
   202 3707 -6895
   203 243 7763
   204 -4059 -6549
   205 6736 3604
   206 -7576 261
   207 6377 -3992
   208 -3495 6585
   209 -275 -7392
   210 3904 6211
   211 -6426 -3400
   212 7198 -264
   213 -6045 3802
   214 3304 -6274
   215 278 7029
   216 -3724 -5904
   217 6116 3223
   218 -6853 271
   219 5756 -3632
   220 -3139 5982
   221 -264 -6683
   222 3537 5611
   223 -5823 -3065
   224 6518 -239
   225 -5484 3453
   226 2994 -5689
   227 246 6369
   228 -3371 -5354
   229 5537 2927
   230 -6207 239
   231 5220 -3280
   232 -2853 5392
   233 -208 -6063
   234 3184 5096
   235 -5269 -2793
   236 5904 -197
   237 -4983 3100
   238 2737 -5128
   239 179 5773
   240 -3008 -4863
   241 4990 2691
   242 -5632 158
   243 4751 -2923
   244 -2638 4867
   245 -144 -5491
   246 2835 4648
   247 -4747 -2595
   248 5361 -119
   249 -4549 2758
   250 2546 -4620
   251 98 5234
   252 -2673 -4444
   253 4500 2497
   254 -5121 84
   255 4359 -2603
   256 -2447 4394
   257 -67 -4934
   258 2518 4239
   259 -4271 -2401
   260 4814 -45
   261 -4154 2440
   262 2363 -4162
   263 28 4712
   264 -2373 -4059
   265 4066 2317
   266 -4595 10
   267 3953 -2296
   268 -2264 3964
   269 3 -4497
   270 2232 3876
   271 -3844 -2236
   272 4370 -3
   273 -3781 2172
   274 2186 -3759
   275 -14 4267
   276 -2109 -3703
   277 3654 2137
   278 -4172 -17
   279 3604 -2052
   280 -2091 3580
   281 24 -4052
   282 1996 3520
   283 -3474 -2028
   284 3950 28
   285 -3424 1929
   286 1982 -3357
   287 -42 3837
   288 -1890 -3315
   289 3269 1929
   290 -3717 -42
   291 3230 -1812
   292 -1876 3188
   293 49 -3611
   294 1777 3139
   295 -3079 -1802
   296 3495 45
   297 -3033 1707
   298 1756 -2962
   299 -35 3393
   300 -1647 -2938
   301 2874 1710
   302 -3269 -31
   303 2828 -1587
   304 -1671 2772
   305 56 -3167
   306 1527 2740
   307 -2680 -1601
   308 3061 63
   309 -2631 1460
   310 1548 -2557
   311 -59 2931
   312 -1382 -2539
   313 2451 1484
   314 -2814 -63
   315 2444 -1336
   316 -1453 2349
   317 91 -2673
   318 1255 2356
   319 -2243 -1389
   320 2574 91
   321 -2246 1167
   322 1340 -2130
   323 -105 2440
   324 -1103 -2162
   325 2021 1308
   326 -2320 -134
   327 2073 -1051
   328 -1266 1894
   329 148 -2200
   330 941 1971
   331 -1795 -1223
   332 2073 197
   333 -1869 860
   334 1192 -1657
   335 -204 1968
   336 -772 -1802
   337 1527 1160
   338 -1855 -261
   339 1710 -687
   340 -1153 1400
   341 317 -1735
   342 564 1643
   343 -1305 -1135
   344 1626 363
   345 -1573 486
   346 1118 -1167
   347 -409 1530
   348 -370 -1527
   349 1047 1139
   350 -1439 -472
   351 1481 -289
   352 -1111 955
   353 529 -1347
   354 193 1428
   355 -850 -1160
   356 1255 599
   357 -1386 74
   358 1192 -761
   359 -656 1199
   360 24 -1372
   361 645 1188
   362 -1139 -737
   363 1361 112
   364 -1223 589
   365 790 -1093
   366 -172 1364
   367 -497 -1280
   368 1058 867
   369 -1326 -246
   370 1305 -458
   371 -906 1033
   372 310 -1340
   373 398 1308
   374 -977 -948
   375 1340 373
   376 -1361 359
   377 1015 -966
   378 -402 1354
   379 -324 -1368
   380 945 1036
   381 -1357 -447
   382 1389 -303
   383 -1096 934
   384 454 -1350
   385 268 1424
   386 -913 -1089
   387 1361 486
   388 -1417 261
   389 1114 -938
   390 -500 1347
   391 -246 -1432
   392 938 1142
   393 -1389 -536
   394 1456 -236
   395 -1139 913
   396 536 -1389
   397 229 1449
   398 -927 -1160
   399 1368 536
   400 -1449 229
   401 1142 -917
   402 -536 1347
   403 -215 -1435
   404 906 1103
   405 -1347 -507
   406 1432 -225
   407 -1118 892
   408 511 -1322
   409 222 1400
   410 -906 -1111
   411 1336 504
   412 -1386 215
   413 1103 -899
   414 -511 1308
   415 -232 -1375
   416 892 1082
   417 -1297 -465
   418 1340 -239
   419 -1058 874
   420 472 -1276
   421 246 1319
   422 -846 -1036
   423 1248 451
   424 -1294 215
   425 987 -853
   426 -433 1216
   427 -232 -1276
   428 842 977
   429 -1216 -419
   430 1241 -246
   431 -938 825
   432 395 -1192
   433 243 1195
   434 -814 -934
   435 1146 384
   436 -1174 243
   437 885 -786
   438 -373 1135
   439 -261 -1163
   440 775 874
   441 -1089 -349
   442 1114 -253
   443 -835 765
   444 324 -1086
   445 243 1096
   446 -768 -811
   447 1047 320
   448 -1079 246
   449 775 -754
   450 -296 1022
   451 -275 -1029
   452 744 765
   453 -1019 -285
   454 1015 -289
   455 -719 747
   456 261 -994
   457 268 980
   458 -733 -712
   459 969 236
   460 -959 268
   461 684 -733
   462 -215 955
   463 -289 -931
   464 723 645
   465 -952 -204
   466 909 -317
   467 -606 705
   468 176 -924
   469 320 871
   470 -708 -589
   471 899 158
   472 -839 338
   473 564 -705
   474 -137 899
   475 -345 -825
   476 719 522
   477 -874 -77
   478 814 -377
   479 -493 719
   480 77 -874
   481 373 790
   482 -712 -472
   483 867 35
   484 -758 412
   485 437 -733
   486 0 846
   487 -426 -716
   488 747 402
   489 -839 42
   490 684 -465
   491 -363 751
   492 -77 -825
   493 497 673
   494 -758 -313
   495 807 -123
   496 -627 536
   497 271 -793
   498 162 804
   499 -567 -617
   500 793 222
   501 -800 208
   502 550 -578
   503 -172 786
   504 -253 -775
   505 617 518
   506 -814 -102
   507 765 -320
   508 -469 666
   509 59 -800
   510 366 712
   511 -712 -437
#

Your Fortran code is wasted on me since I've never studied Fortran.  :-[  However, Paul Lutus has released an open source C++ library of Fourier Transformation functions [2]

Using Lutus' code, and the Hlin(f) dataset above, and with a defined array size of 29 (512) to match the tone count for ADSL2+, and an assumed rate of 4,416,000 (512*4312.5*2) samples per second.

Code: [Select]
$ cat myhlin.proc.5.txt | ./fft_processor -i | ./gnuplot_driver -i -t "IFFT results" -p

produces this plot..



and plotting IDFT instead of IFFT produces this:



Both are very similar to your graph - confirming its correctness - but I'm still none the wiser as to what is shown!

cheers, a

[1] http://www.analytic.ru/articles/lib26.pdf
[2] http://www.arachnoid.com/signal_processing/fft.html
« Last Edit: May 31, 2012, 04:05:25 PM by asbokid »
Logged

les-70

  • Kitizen
  • ****
  • Posts: 1254
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #4 on: May 31, 2012, 07:38:15 AM »

  Just a holding reply to burakkucat at the moment.  The odd Fortran line is just a continuation line needed with the 80 character line limit. The character "1" in the 7th column indicates a continuation (some of us started careers paper tape and later with punch cards!).  For the rest I am still thinking and trying a few tests.
Logged

les-70

  • Kitizen
  • ****
  • Posts: 1254
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #5 on: May 31, 2012, 02:32:50 PM »

 Thanks for the responses, great to have some others trying to understand this.   However I am none wiser and more confused.   A good reason to be more confused is that for me I find Hlin changes (a lot) after a reboot or re-sync  ???.  I have no idea why! The first plot is an e.g. of another plot of Hlin IDFT after a reboot - the spikes are in a different place.   

   Comfortingly for all Hlin stats  a plot of the magnitude  c(i)= SQRT((a(i)**2+SQRT(b(i)**2) gives a linear version of Hlog --(shown in the second plot).  This does not change with reboots.  Also looking at "adslctl info --HlinS" I only obtain what looks identical to Hlin but with a different scales and this changes on reboot to match Hlin. 

The third plot  is another Hlin example after router reboot.

I wondered on the info contained in the shape of Hlog.  Thus for the third plot case I have also calculated the IDFT with the individual a and b values normalised by their individual combined magnitudes.  i.e. like making Hlog a constant for all f.  The gives a similar but slightly sharper plot.  The main info is clearly in the phase of the individual Hlin values.

  Texts seem to advise that Hlog and Hlin contain valuable line info, but actually using the info in Hlin seems to have no mention :'(
Logged

les-70

  • Kitizen
  • ****
  • Posts: 1254
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #6 on: May 31, 2012, 05:11:53 PM »

   Before thinking any more I have been exploring the variable results I obtained.

After lots of reboots and resync I have found that from a full power off/on reboot the values of Hlin are basically always the same as I assume they should be :). The "correct" power on version is attached.

  However after a re-sync with the router powered up the values change and spikes can appear almost anywhere in the 1-512 range  ???.  The "correct" power on version is attached. The router is a Netgear DG834Gv4 with DGteam firmware. 
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #7 on: May 31, 2012, 07:47:48 PM »

  Just a holding reply to burakkucat at the moment.  The odd Fortran line is just a continuation line needed with the 80 character line limit. The character "1" in the 7th column indicates a continuation (some of us started careers paper tape and later with punch cards!).  For the rest I am still thinking and trying a few tests.

Thank you, Les, that clarifies the mystery for me. A representation of 80-column punched card data is not the most obvious thing when viewing it on a monitor.

Paper tape. Ah, now that is something for cold winter nights when one has nothing better to do. Read it by eye -- to see what has been punched on the tape!  ;D
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

les-70

  • Kitizen
  • ****
  • Posts: 1254
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #8 on: June 24, 2012, 06:49:42 PM »

I have not given up but have returned to this having found some papers which I am still digesting.
 
  http://www.ece.usask.ca/eceresearch/faculty/ded632/files/Bernardo-53265.pdf

  http://www.jdsu.com/ProductLiterature/FDRdefine.pdf

  http://library.usask.ca/theses/available/etd-07052006-094509/unrestricted/b_celaya.pdf

  From these it seems that the needed information is in the spacing and decay of the oscillations in the IDFT of Hlin.  In the references the analysis of the IDFT seems to involve either an auto-correlation, or pre-processing followed by a DFT.  Without the pre-processing the DFT simply returns you back the Hlin values that you started with! 

I am puzzling over the pre-processing approach which seems best but thought some might be interested in the "autocorrelation of the IDFT of HLIN".  The attached text illustrates the most basic coding of the IDFT the DFT (not used except for a check) and the auto-correlation.

 The attached images are the IDFT and the Autocorrelation of the IDFT.  There was a small error in the IDFT’s in my earlier attempts, also note that the position of the wobbles in the IDFT is arbitrary.  The Autocorrelation is shown over just the first 128 points as it is zero for greater displacements. I think the autocorrelation is indicating distances over which amplitudes and or phases change.  I believe this is measured at the router from tones sent by the DSLAM. Whether the implied distances are deltas or from either end I have not worked out.
 
 The autocorrelation does look more like a possible TDR on my line albeit with a very long pulse length.  See http://forum.kitz.co.uk/index.php/topic,10970.45.html  for TDR examples on my line.

Any thoughts or advice most welcome and much needed but please take it all very lightly at this time as I am dabbling out of my depth.

Having got as far the IDFT maybe Asbokid could try the auto correlation? 
« Last Edit: June 24, 2012, 08:12:04 PM by les-70 »
Logged

asbokid

  • Kitizen
  • ****
  • Posts: 1286
    • Hacking the 2Wire
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #9 on: June 26, 2012, 05:54:01 PM »

Having got as far the IDFT maybe Asbokid could try the auto correlation?

Hi les-70,

Whilst your work is fascinating to read, it leaves me 99% baffled, but that will be added to my TODO list  :D

EDIT: The Dodds & Celaya paper seems familiar. IIRC there is a related paper by a team in India. This must have been it.  In hindsight, not a very detailed paper:

http://www.ncc.org.in/download.php?f=NCC2008/2008_P2_1.pdf

Some CPE modems supplied in North America have algorithms for determine Loop Length and for detecting Bridge Taps..

Not sure how the algorithms work, whether they are accurate, and why they aren't more widely used:

From:
http://www.dslreports.com/forum/remark,22525726 and
http://www.dslreports.com/forum/remark,22340248

Quote
According to my Netopia 2241N...
"Estimated loop length: 12548 feet (bridge tap)
Framing Mode: REDUCED OVERHEAD WITH MERGED SYNC"

According to my Motorola 2210...
"Estimated loop length: 12170 feet (bridge tap)
Framing Mode: REDUCED OVERHEAD WITH MERGED SYNC"

According to the 2241N again...
"Estimated loop length: 12525 feet (bridge tap)
Framing Mode: REDUCED OVERHEAD WITH MERGED SYNC"

And, the 2210 one last time...
"Estimated loop length: 12210 feet (bridge tap)
Framing Mode: REDUCED OVERHEAD WITH MERGED SYNC"

Another user reports ..

Quote
My Netopia 2210 modem reports...
"Estimated loop length: 15868 feet (straight loop)
Framing Mode:          FULL OVERHEAD WITH SYNC"


cheers, a
« Last Edit: June 26, 2012, 06:13:57 PM by asbokid »
Logged

les-70

  • Kitizen
  • ****
  • Posts: 1254
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #10 on: June 26, 2012, 06:40:46 PM »

  Your right to be baffled but hang on for while and don't try anything as I seem to be making some progress and my last post needs a big edit!!!. 
Logged

les-70

  • Kitizen
  • ****
  • Posts: 1254
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #11 on: June 26, 2012, 08:56:42 PM »

 I will dangerously add a bit  more here and I will try to find time this week to correct my recent posts and at least give a clear explanation of what I think!! ??? I am doing.  I am busy for the next few days and I am still struggling with what things mean though!

 Currently in answer to the question "Can you generate a crude TDR from router Hlin(f) stats?" A believe a simple answer is no. I think you can however get something useful but I still trying to fix the details.  Hlin is measured by transmission and not reflection and contains the amplitude and phase of the recieved signal.  Hlog gives the amplitude.  The Phase and how it changes with varying frequency (tone) also have extra information.

 My understanding is that rate at which the phase changes between two tones depends on the line length or changes caused by line imperfections. I have been looking at the FFT of the normalised real part of Hlin (you get almost the same from the imaginary part).  This seems to have clear peak at a particular narrow range of frequencies.  Linking that frequency with the speed of progation in the cable gives a plausible line length distance.    I attach a current results showing distance based on this.  A sensible distance emerges of about 1240m  :) on my line but a number of calcuation details puzzle  ??? me and it may not be right.   See attached for the plot from 180m to 2km.  Less than about 180m is too short to measure with the frequencies involved.

   This may be how a router could estimate the distance to the exchange.  In transmission mode weak reflections won't stand out above the larger tranmitted signal but a bad fault like a bridged tap would I think show as phases changing on shorter scales and give a noticable peak at twice the tap length. On my line there are significant features but the transmitted signal dominates.

 I notice that DMT gives estimates of loop length and gives a minimum value of 1260m on my line. Does anyone know the basis of the DMT calculation?  I assume it could just be based on the attenuation? 

 Again thoughts most welcome but I really don't know that I got anything right!!
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #12 on: June 26, 2012, 10:10:25 PM »

Very interesting.  :)  I await the next instalment.  :baby:
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

asbokid

  • Kitizen
  • ****
  • Posts: 1286
    • Hacking the 2Wire
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #13 on: June 26, 2012, 10:28:29 PM »

My understanding is that rate at which the phase changes between two tones depends on the line length or changes caused by line imperfections. I have been looking at the FFT of the normalised real part of Hlin (you get almost the same from the imaginary part).  This seems to have clear peak at a particular narrow range of frequencies.  Linking that frequency with the speed of propagation in the cable gives a plausible line length distance.    I attach a current results showing distance based on this.  A sensible distance emerges of about 1240m  :) on my line but a number of calcuation details puzzle  ??? me and it may not be right.   See attached for the plot from 180m to 2km.  Less than about 180m is too short to measure with the frequencies involved.

That's very interesting indeed! Ground-breaking!

Quote
This may be how a router could estimate the distance to the exchange.  In transmission mode weak reflections won't stand out above the larger transmitted signal but a bad fault like a bridged tap would I think show as phases changing on shorter scales and give a noticeable peak at twice the tap length. On my line there are significant features but the transmitted signal dominates.

Quote
I notice that DMT gives estimates of loop length and gives a minimum value of 1260m on my line. Does anyone know the basis of the DMT calculation?  I assume it could just be based on the attenuation? 

The Loop Length algorithm in DMT is based on attenuation measured at the CPE. It's a crude and arbitrary algorithm. I posted the algorithm code in a message to this forum, but can't find it at the moment.

Quote
Again thoughts most welcome but I really don't know that I got anything right!!

Not qualified to comment on correctness, but it looks good!
Logged

les-70

  • Kitizen
  • ****
  • Posts: 1254
Re: Can you generate a crude TDR from router Hlin(f) stats?
« Reply #14 on: June 28, 2012, 05:15:38 PM »

 A disappointment  I am afraid  :(


 The assumption that I have made is that HLlin returns the complex attenuation of the signal relative to a FIXED phase. As one proceeds through the tones the phase W will change as

  w=2*pi*f*DT ----- equation (1)

 Here the phase w is in radians and the frequency f is in Hertz and DT the time diference due to say the line length.

  DT= length/(c*VOP)

where c the speed of light and VOP the progation factor of the line eg about 0.66.

 This implies that the angle w given by Hlin's real and imaginary parts should vary as w=2*pi*df*n*DT where df is the tone interval and n the tone number.

 If we take a Discrete Fourier transform of the series of w values as function of n and obtain a peak at e.g coefficient number m then there is phase difference of 2*pi at the "frequency" m.  Frequency is in quotes as this is the frequency of a frequency change.  (If there are errors in this view they will most likely arise over this interpretation of the transform of the w values).   

  It follows that 2*pi=2*pi*df*m*DT

 i.e DT=1/m*df

 then length = (c*VOP)/m*df= (3*10power8)*0.66/(m*(4.3125*10**3)) = 0.4591 *10*5/m 



  In short I have taken the DFT or FFT of the N value of w=atan2(a(n),b(n)) series to give N/2 values of x(m),y(m) and I then plot the length = 0.4591*10*5/m against  spectral power (x(m)**2+y(m)**2). (a DFT of either of the separate a(n) or b(n) values will give essentially the same result but with some distortion of the "correct" result)

  You will see from the plot above in my last post that this can look very promising. However I found that with an overnight resync the peak can move in length eg between 1200m and 300m so far!!! It does not always move though! The plot always gives a very nice looking plot with a sharp peak at the frequency at which w derived from Hlin is varying.  The puzzle is that the frequency of variation changes after a resync suggesting that although the phase of HLIn varies nice and regularily to give a sharp peak it is not varying like equation 1.

  I attach the best and worst? of the plots

    I don't think anything more can be done without more understanding of why and how the Hlin phase changes.
« Last Edit: June 28, 2012, 06:15:56 PM by les-70 »
Logged
Pages: [1] 2 3 4
 

anything