# Research on Sparse Representation Method of Acoustic Microimaging Signals
## 2 Materials and Methods
### Constraint Dictionary-Based Sparse Representation
#### 2.2.1 Constraint Dictionary  
In order to constrain the time-frequency parameters of the Gabor dictionary so that the atoms match the echoes better, a reference echo is introduced. The reference echo is selected from non-overlapping echoes, as in Figure 1b, and \(x_{0}(t)\) can be taken as the reference echo, whose expression is adopted from the Gabor function, i.e.,  
\[x_{0}(t)=\frac{1}{\sqrt{s_{0}}}g\Big{(}\frac{t-u_{0}}{s_{0}}\Big{)}cos(\omega _{0}t+\theta_{0}). \tag{9}\]  
The time-frequency parameter \(\gamma_{0}=(s_{0},u_{0},\omega_{0},\theta_{0})\) of the reference echo are calculated. Based on the reference echo \(x_{0}(t)\), the constraint method for the Gabor dictionary time-frequency parameters applicable to the electronic packages AMI is as follows.  
1. When ultrasonic waves propagate inside an electronic package, absorption attenuation is dominant, and the transfer function is: \[H_{d}(f)=e^{-2 da_{0}/\beta},\] (10) where \(\alpha_{0}\) is the attenuation factor, \(\beta\) is the frequency-dependent index (in electronic packages \(\beta\approx 1\)), and \(d\) is the distance between the reference interface and the target interface. According to Equations (9) and (10), the peak frequency of the target echo can be calculated as: \[\omega_{d}=\omega_{0}-\frac{2\alpha_{0}d}{s_{0}^{2}}.\] (11)  
Therefore, the discrete range of the frequency factor \(\omega\) can be constrained to \(\{\omega|(1-\Delta)\omega_{d}\leq\omega\leq\omega_{0}\}\), where \(\Delta\) is a constant less than \(1\), which is used to eliminate calculation errors and prevent over-constraining.  
The full width at one-tenth maximum (FWTM) of the Gaussian window is about 1.71s, and the duration \(T\) of Gabor atoms in the time domain can be approximated by FWTM, that is, \(T=1.71\)s. Relating the scale factor \(s\) to the frequency factor \(\omega\), \(s\) can be expressed as:  
\[s=\frac{T}{1.71}=\frac{2\pi p}{1.71\omega}. \tag{12}\]  
where \(p\) is the number of cycles within the FWTM [29], and the number of cycles of the reference echo is \(p_{0}\). Due to the attenuation of the medium, the range of the number of cycles of the target echo is \([(1-\Delta)p_{0},p_{0}]\). Therefore, the discrete range of the scale factor \(s\) can be constrained to \(\{2\pi p/(1.71\omega)|(1-\Delta)p_{0}\leq p\leq p_{0}\}\).
3. The displacement of the reference echo is \(u_{0}\), so the displacement of the target echo is \(u_{d}=u_{0}+2d/c_{L}\), where \(c_{L}\) is the longitudinal wave velocity in the medium. Therefore, the discrete range of the displacement factor \(u\) can be constrained to \(\{u|(1-\Delta)u_{d}\leq u\leq(1+\Delta)u_{d}\}\).
4. Due to the frequency-dependent attenuation of the medium, the target echo and the reference echo are no longer simply in-phase or anti-phase, but show a certain difference. Therefore, the dispersion range of the phase factor \(\theta\) can be constrained to \(\{\theta|(1-\Delta)\theta_{0}\leq\theta\leq(1+\Delta)\theta_{0}\}\).  
Figure 2 shows the spatial sampling of the frequency factor before and after the constraint. Before the constraint, the sweep interval of the frequency gradually becomes dense as the octave value increases. After the constraint, the sweep interval of the frequency is small and constant, and the frequencies of the atoms are close to the echo frequency. On the one hand, the calculation accuracy and efficiency are improved. On the other hand, signals with serious overlap can be separated.