This paper discusses the optimization of the array factor pattern in a 49-element active planar phased array using Particle Swarm Optimization (PSO) to compensate for up to 20% element failure. The methodology involves recalculating input amplitudes for the remaining functional elements without physical repairs, thereby demonstrating a cost-effective recovery approach. Results show that the PSO algorithm can effectively restore the array’s performance metrics, significantly improving side lobe levels and null depths post-failure.