The state space model of the railway part in track circuits is built based on the Kirchhoff's voltage law and Kirchhoff's current law. 17 observers are designed corresponding to 16 kinds of component capacitor open fault and 1 normal state without fault in the track circuit. The residual is generated by computing the difference between the output of original system and that of observers. The fault diagnosis is achieved finally by using the coding set. Simulink results show that the proposed scheme is not only able to diagnosis the faulty capacitor in real time and but also robust to the noises and disturbances.