The track and tunnel intrusion detection behavior recognizes human intrusions and provides full-time protection against accidents, attacks and other malicious events, regardless of train motion and subsequent reflections. The self-learning engine recognizes the presence of a train and adjusts the parameters so that the trains motion and its passengers are ignored, while an object in the surrounding areas will be detected.