Detecting element failure in a phased array antenna plays a crucial role in ensuring a communication system's efficiency since faulty elements lead to a degradation of the array performance. Under the assumption that only a few antenna elements are faulty, fault diagnosis can be accomplished by applying compressive sensing techniques to solve the resulting system of equations. We present a fault diagnosis method of a linear antenna array, where the measurements are taken at a fixed location, and excitations are optimized. We solve the compressive sensing problem that leads to a reduction in the number of measurements required for successful diagnosis using the optimized excitations. We show how the excitations can be optimized for fault detection in the presence of cosine squared field pattern of an antenna element in a linear array. © 2021 EurAAP.