## 1 Introduction  
Focusing and imaging through scattering media are of uttermost importance in bioimaging [1; 2; 3; 4; 5; 6; 7; 8] and measurements [9]. In scattering media, the extensive scattering of light is a significant obstacle for optical focusing and imaging [10]. For suppression of the scattering effect, various methods have been proposed and have achieved excellent compensation effects, such as modulating wavefront with transmission matrix measurement [11; 12; 13], iterative wavefront optimization [14; 15], and optical phase conjugation (OPC) [16; 17; 18]. However, the transmission matrix measurement requires massive data collection [13]. Additionally, time-consuming iterations are required for the compensation effect in iterative wavefront optimizations. Among these methods, OPC [19], with its time-reversal nature, can undo the effects of multiple scattering in scattering media without time-consuming iterations. Therefore, employing OPC to suppress scattering media is appealing, which simply requires the duplication of a transmission light field to make the phase at each point on the wavefront sign-reversed. OPC has been of interest in many fields, including wavefront shaping [20; 21], images through scattering media [22; 23], and high-resolution imaging [24; 25]. Generally, a phase-conjugate beam is generated by the analog OPC technique [26; 27; 28] and digital OPC (DOPC) [29; 30; 31; 32; 33]. In the analog OPC technique, the lack of freedom to manipulate the recorded hologram pattern and the phase-conjugated light results in restrictions in many biomedical applications. Therefore, DOPC can be the proper way to generate the phase conjugate for several intrinsic advantages, including higher phase conjugate reflectivity and a flexibly adjustable phase conjugate wavefront. DOPC consists of a charge-coupled device (i.e., CCD) and a spatial light modulator (SLM) to achieve recording and wavefront playback. Although straightforward in principle, the practical implementation and utility of DOPC are limited by the imperfections of the system in a complicated and coupled way. The optimal performance and compensation quality of a DOPC system are demanding for exact pixel-to-pixel alignment, which greatly restricts the actual compensation quality [22]. Pixel misalignment consists of two parts: pixel misalignment between SLM and CCD, and pixel misalignment between object light and conjugate light on the surface of the scattering medium. These problems can result in poor compensation effects in experiments. Generally, one direct method to eliminate pixel misalignment is to alter the misalignment parameters \(\Delta\)x, \(\Delta\)y, and \(\Delta\)z (misalignment parameters in the three displacement axes proposed in [32]) are defined as \(\Delta\)-xyz modes in this paper for simplicity. Unfortunately, it can greatly solve issues of pixel misalignment but has no significant effect on mechanical errors and optical aberrations that are mainly caused by optical elements, light sources, and surface profiles of SLM. The optical aberration in a DOPC system, such as astigmatism, and coma, can hinder the quality of the DOPC system. Therefore, for further improving the compensation effect, we used coefficients of 1 st to 8 th Zernike polynomials [34; 35] as optimization variables, called Zernike modes here, to characterize both misalignments in \(\Delta\)-xyz modes and other imperfections of the DOPC system. Zernike polynomials with higher orders are found to have less influence on DOPC [34]. Compared with \(\Delta\)-xyz modes, Zernike modes [34] not only have a two-dimensional translation function but can also compensate for higher-order aberrations, including curvature of SLM and other optical aberrations in the DOPC system. In order to obtain the optimal compensation effect and improve the quality of DOPC, it is necessary to seek an efficient and accurate algorithm to acquire the optimal Zernike coefficients.