3 Engineering Example 1

3.1 Detecting a train on a track

Introduction

One means of detecting trains is the ‘track circuit’ which uses current fed along the rails to detect the presence of a train. A voltage is applied to the rails at one end of a section of track and a relay is attached across the other end, so that the relay is energised if no train is present, whereas the wheels of a train will short circuit the relay, causing it to de-energise. Any failure in the power supply or a breakage in a wire will also cause the relay to de-energise, for the system is Òfail safeÓ. Unfortunately, there is always leakage between the rails, so this arrangement is slightly complicated to analyse.

Problem in words

A 1000 m track circuit is modelled as ten sections each 100 m long. The resistance of 100 m of one rail may be taken to be 0.017 ohms, and the leakage resistance across a 100 m section taken to be 30 ohms. The detecting relay and the wires to it have a resistance of 10 ohms, and the wires from the supply to the rail connection have a resistance of 5 ohms for the pair. The voltage applied at the supply is 4 $V$ . See diagram below. What is the current in the relay?

Figure 1

Mathematical statement of problem

There are many ways to apply Kirchhoff’s laws to solve this, but one which gives a simple set of equations in a suitable form to solve is shown below. ${i}_{1}$ is the current in the first section of rail (i.e. the one close to the supply), ${i}_{2}$ , ${i}_{3},\dots {i}_{10}$ , the current in the successive sections of rail and ${i}_{11}$ the current in the wires to the relay. The leakage current between the first and second sections of rail is ${i}_{1}-{i}_{2}$ so that the voltage across the rails there is $30\left({i}_{1}-{i}_{2}\right)$ volts. The first equation below uses this and the voltage drop in the feed wires, the next nine equations compare the voltage drop across successive sections of track with the drop in the (two) rails, and the last equation compares the voltage drop across the last section with that in the relay wires.

$\begin{array}{rcll}30\left({i}_{1}-{i}_{2}\right)+\left(5.034\right){i}_{1}& =& 4& \text{}\\ 30\left({i}_{1}-{i}_{2}\right)& =& 0.034{i}_{2}+30\left({i}_{2}-{i}_{3}\right)& \text{}\\ 30\left({i}_{2}-{i}_{3}\right)& =& 0.034{i}_{2}+30\left({i}_{3}-{i}_{4}\right)& \text{}\\ & ⋮& & \text{}\\ 30\left({i}_{9}-{i}_{10}\right)& =& 0.034{i}_{10}+30\left({i}_{10}-{i}_{11}\right)\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}& \text{}\\ 30\left({i}_{10}-{i}_{11}\right)& =& 10{i}_{11}& \text{}\end{array}$

These can be reformulated in matrix form as $A\underset{̲}{i}=\underset{̲}{v}$ , where $\underset{̲}{v}$ is the $11×1$ column vector with first entry $4$ and the other entries zero, $\underset{̲}{i}$ is the column vector with entries ${i}_{1},{i}_{2},\dots ,{i}_{11}$ and $A$ is the matrix

$A=\left[\begin{array}{ccccccccccc}\hfill 35.034\hfill & \hfill -30\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill -30\hfill & \hfill 60.034\hfill & \hfill -30\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill -30\hfill & \hfill 60.034\hfill & \hfill -30\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill -30\hfill & \hfill 60.034\hfill & \hfill -30\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -30\hfill & \hfill 60.034\hfill & \hfill -30\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -30\hfill & \hfill 60.034\hfill & \hfill -30\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -30\hfill & \hfill 60.034\hfill & \hfill -30\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -30\hfill & \hfill 60.034\hfill & \hfill -30\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -30\hfill & \hfill 60.034\hfill & \hfill -30\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -30\hfill & \hfill 60.034\hfill & \hfill -30\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -30\hfill & \hfill 40\hfill \end{array}\right]$

Find the current ${i}_{1}$ in the relay when the input is 4 $V$ , by Gaussian elimination or by performing an L-U decomposition of $A$ .

Mathematical analysis

We solve $A\underset{̲}{i}=\underset{̲}{v}$ as above, although actually we only want to know ${i}_{11}$ . Letting $M$ be the matrix $A$ with the column $\underset{̲}{v}$ added at the right, as in Section 30.2, then performing Gaussian elimination on $M$ , working to four decimal places gives

$M\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}=\phantom{\rule{0.3em}{0ex}}\left[\begin{array}{cccccccccccc}\hfill \phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}35.0340\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 4.0000\hfill \\ \hfill 0\hfill & \hfill 34.3447\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 3.4252\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 33.8291\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 2.9919\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 33.4297\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 2.6532\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 33.1118\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 2.3810\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.8534\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 2.1572\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.6396\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 1.9698\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.4601\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 1.8105\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.3077\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 1.6733\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.1769\hfill & \hfill -30.0000\hfill & \hfill 1.5538\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 12.0296\hfill & \hfill 1.4487\hfill \end{array}\right]$

from which we can calculate that the solution $\underset{̲}{i}$ is

$\phantom{\rule{2em}{0ex}}\underset{̲}{i}=\left[\begin{array}{c}\hfill 0.5356\hfill \\ \hfill 0.4921\hfill \\ \hfill 0.4492\hfill \\ \hfill 0.4068\hfill \\ \hfill 0.3649\hfill \\ \hfill 0.3234\hfill \\ \hfill 0.2822\hfill \\ \hfill 0.2414\hfill \\ \hfill 0.2008\hfill \\ \hfill 0.1605\hfill \\ \hfill 0.1204\hfill \end{array}\right]$

so the current in the relay is $0.1204$ amps, or $0.12$ A to two decimal places.

You can alternatively solve this problem by an L-U decomposition by finding matrices $L$ and $U$ such that $M=LU$ . Here we have

$L=\left[\begin{array}{ccccccccccc}\hfill 1.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill -0.8563\hfill & \hfill 1.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill -0.8735\hfill & \hfill 1.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill -0.8868\hfill & \hfill 1.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -0.8974\hfill & \hfill 1.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -0.9060\hfill & \hfill 1.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -0.9131\hfill & \hfill 1.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -0.9191\hfill & \hfill 1.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -0.9242\hfill & \hfill 1.0000\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -0.9286\hfill & \hfill 1.0000\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill -0.9323\hfill & \hfill 1.0000\hfill \end{array}\right]$

and

$U=\left[\begin{array}{ccccccccccc}\hfill 35.0340\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 34.3447\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 33.8291\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 33.4297\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 33.1118\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.8534\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.6395\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.4601\hfill & \hfill -30.0000\hfill & \hfill 0\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.3076\hfill & \hfill -30.0000\hfill & \hfill 0\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 32.1768\hfill & \hfill -30.0000\hfill \\ \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 0\hfill & \hfill 12.0295\hfill \end{array}\right]$

Therefore $U\underset{̲}{i}=\left[\begin{array}{c}\hfill 4.0000\hfill \\ \hfill 3.4240\hfill \\ \hfill 2.9892\hfill \\ \hfill 2.6514\hfill \\ \hfill 2.3783\hfill \\ \hfill 2.1547\hfill \\ \hfill 1.9673\hfill \\ \hfill 1.8079\hfill \\ \hfill 1.6705\hfill \\ \hfill 1.5519\hfill \\ \hfill 1.4464\hfill \end{array}\right]$  and hence $\underset{̲}{i}=\left[\begin{array}{c}\hfill 0.5352\hfill \\ \hfill 0.4917\hfill \\ \hfill 0.4487\hfill \\ \hfill 0.4064\hfill \\ \hfill 0.3644\hfill \\ \hfill 0.3230\hfill \\ \hfill 0.2819\hfill \\ \hfill 0.2411\hfill \\ \hfill 0.2006\hfill \\ \hfill 0.1603\hfill \\ \hfill 0.1202\hfill \end{array}\right]$ and again the current is found to be $0.12$ amps.

Mathematical comment

You can try to solve the equation $A\underset{̲}{i}=\underset{̲}{v}$ by Jacobi or Gauss-Seidel iteration but in both cases it will take very many iterations (over $200$ to get four decimal places). Convergence is very slow because the norms of the relevant matrices in the iteration are only just less than 1. Convergence is nevertheless assured because the matrix $A$ is diagonally dominant.