This paper presents a waveform matching technique for accurate fault diagnosis in high-voltage transmission lines, emphasizing the identification and location of faults through optimization methods. It incorporates the Bare Bones Particle Swarm Optimization and compares it with Bat Optimization to enhance the efficiency of fault detection algorithms. The study highlights the significance of utilizing modern digital devices for swift and precise fault location to improve power system reliability and reduce outages.