## 4 Discussion  
In this study, we developed a method to optimize the element array of the skin-attachable US probes, enabling US imaging of the target even with positional and angular errors in the attachment. In our proposed method, the coordinates and shapes of the elements were optimized using a gradient method with automatic differentiation. As shown in Figures 4 and 6, since the linear array is designed to focus the US on the plane directly beneath the array, its image quality was best when there were small positional and angular errors, however, its image quality deteriorated significantly as these errors increased. In contrast, the optimized array was more robust to these errors compared to the conventional linear array, and it provided higher image quality than the matrix array. Furthermore, as shown in Figure 8, even under more realistic conditions where noise was added to the US signals, it was demonstrated that the US image of simulated blood vessel could be obtained with stable image quality, regardless of positional or angular errors. In the experiments comparing the combinations of the cost function weight, when the weight \(\beta_{1}\) was relatively large, the elements were positioned farther from the origin (Figure 3a). This element arrangement likely occurred because \(\beta_{1}\) is the weight for the main lobe width, and the main lobe becomes narrower as the aperture size of the element array increases [1]. Conversely, when the weight \(\beta_{2}\) for the side lobe level was relatively large, the elements were concentrated in the center (Figure 3a). This is thought to be due to the fact that the larger the element spacing, the higher the grating lobe level and the higher the side lobe level [27]. Furthermore, in the optimized array with relatively small \(\beta_{1}\) and \(\beta_{2}\), the element sizes were larger than the other two arrays. This may be due to the fact that when \(\beta_{1}\) and \(\beta_{2}\) are small, the relative weight for the main lobe level \(M_{L}\) in Equation (12) becomes larger, and optimization was performed to increase the main lobe level by  
Figure 8: Examples of US images of blood vessel scatterers obtained with the linear, matrix, and optimized arrays. Before the image reconstruction, white noise was added to the US signals so that the SNR became 20 dB. The left column shows the element arrays, and the top row shows the positional relationship between the imaging plane and the element arrays. The dynamic range of the ultrasound images is 25 dB. The average measurement error from the ground truth blood vessel inner diameter of 6 mm is displayed on each image. increasing the element size, which increased the transmission energy. In this study, the optimal weights were determined based on the signal-to-noise ratio (SNR) of the wires, resulting in relatively small \(\beta_{1}\) and \(\beta_{2}\). However, it is expected that the optimal weights will vary depending on the imaging target. For example, for the observation of small targets such as muscle fibers, a higher spatial resolution is necessary, and the optimal value of \(\beta_{1}\) would be larger. In the experiments of blood vessel imaging, the measured inner diameters of the blood vessels were smaller than the true value. The optimized array exhibited the most accurate measurement, yet it was still 0.5 mm smaller than the true value. This discrepancy can be attributed to two factors. The first factor is that scattering points were reconstructed with an axial extent equivalent to the US pulse length, which resulted in the blood vessel wall appearing thicker in the US image than it actually is. This phenomenon has been observed in general US imaging, not exclusive to imaging with skin-attachable probes. The second factor is that due to insufficient elevation focusing, scatterers located at positions deviating in the \(y\)-direction from the imaging plane were included in the US image.