Abstract Direction of arrival (DOA) estimation of underwater targets is an important research direction in the field of underwater acoustic array signal processing. Due to factors such as assembly errors and component aging, amplitude and phase errors between each channel of the array are common, resulting in distortion of the array flow pattern matrix. At the same time, the non-uniform distribution of noise intensity at the positions of each array element further increases the difficulty of DOA for underwater targets. Based on the characteristics of sparse spatial distribution of underwater targets, this paper uses the flexibility of hyperparametric modeling to construct an array observation signal graph model. On this basis, the effects of amplitude and phase errors and non-uniform noise on the array model are added, and a comprehensive observation model with clear distribution types of amplitude and phase errors, signals, and noise is established. The variational Bayesian inference theory is used to obtain closed solutions of various variables and parameters, so as to achieve joint estimation of target azimuth and error parameters. Simulation results and sea trial data processing results show that the algorithm can achieve amplitude and phase error self correction while completing DOA estimation in the absence of prior information on the number of sources.