## 2 Materials and Methods
### Ultrasound Signal Processing
#### 2.2.3. Dynamic Range Transformation Module Based on the Improved Scale-Free  
CORDIC Algorithm  
There are certain shortcomings in the commonly used hardware implementations for dynamic range transformation. For example, the memory cell of the table lookup method increases exponentially with increasing precision, and the Taylor series expansion  
Figure 4: Block diagram of the quadrature demodulation implementation.  
Figure 5: Block diagram of the partitioned-hybrid coordinate rotation digital computer (CORDIC) algorithm.  
method requires a large hardware area [45]. In contrast, the scale-free CORDIC algorithm in hyperbolic coordinates can implement logarithmic operations and has no scale factor, low algorithm complexity, and a simple structure that is easy to implement [46; 47]. However, due to the high number of iterations and the high computational delay, it is only suitable for applications with low requirements for real-time performance [48]. In hyperbolic coordinates, assuming that after the i-th rotation, the vector \((x_{i},y_{i})\) rotated by an angle \(\alpha_{i}\) yields the vector \((x_{i+1},y_{i+1})\), the corresponding relationship between the two coordinates is as follows [49; 50]:  
\[\begin{bmatrix}x_{i+1}\\ y_{i+1}\end{bmatrix}=K_{i}\begin{bmatrix}1&\delta_{i}\text{tanh}\alpha_{i}\\ \delta_{i}\text{tanh}\alpha_{i}&1\end{bmatrix}\begin{bmatrix}x_{i}\\ y_{i}\end{bmatrix} \tag{2}\]  
where \(K_{i}=\cosh\alpha_{i}\), the direction of micro rotation of the vector is \(\delta_{i}\in\{1,-1\}\). Let the micro rotation angle \(\alpha_{i}=\text{tanh}^{-1}\big{(}2^{-i}\big{)}\) simplify the calculation.  
[PERSON] et al., validated that when the angle \(\alpha\in[0,7\pi/88]\), the sine and cosine functions in the scale-free CORDIC algorithm can take a 3 rd-order approximation of the McLaughlin series expansion, thus meeting the accuracy requirements for a given word length [51]. Therefore, this paper uses an improved scale-free CORDIC algorithm to solve the logarithm function and selects the 3 rd-order approximation of the Maclaurin series expansion of the sine and cosine functions to ensure real-time logarithmic operation of ultrasound signals. The block diagram of the improved scale-free CORDIC algorithm is shown in Figure 6, including the iterative processing module and the angle accumulation module. Assuming that \(b\) represents the word length, the target angle \(\theta=\sum_{i}\delta_{i}\alpha_{i}\), \(i=2,3,\cdots,b\),  the micro-rotation angle \(\alpha_{i}=2^{-i}\), the third-order coefficients of the function expansion \(M_{i}=(3!)^{-1}\), the iteration equation in hyperbolic coordinates is:  
\[\begin{bmatrix}x_{i+1}\\ y_{i+1}\end{bmatrix}=\begin{bmatrix}1+\delta_{i}\cdot 2^{-1}\alpha_{i}&\delta_{i} \big{(}\alpha_{i}+M_{i}\cdot\alpha_{i}^{3}\big{)}\\ \delta_{i}\big{(}\alpha_{i}+M_{i}\cdot\alpha_{i}^{3}\big{)}&1+\delta_{i}\cdot 2 ^{-1}\alpha_{i}\end{bmatrix}\begin{bmatrix}x_{i}\\ y_{i}\end{bmatrix} \tag{3}\]  
To reduce the number of adders, when \(i>2\), \(M_{i}=2^{-3}\). When \(i\geq(b-1)/2\), \(2^{-1}\alpha_{i}^{2}=0\) and \(\alpha_{i}^{3}=0\), the iterative operations are simplified. Making the initial rotation angle \(z_{0}=|\theta|\), \(z_{i+1}=z_{i}-\delta_{i}\cdot 2^{-i}\), the corresponding value of \(\delta_{i}\) is determined by the binary code of \(z_{0}\). Therefore, by appropriately selecting the approximate order of the McLaughlin expansion of the sine and cosine functions, the iterative calculation of the path in the CORDIC algorithm can be omitted, thus improving the accuracy and speed of data processing.  
Figure 6: Block diagram of the improved scale-free CORDIC algorithm.