# Efficient Detection Approach for DTMF Signal Detection
## 3 Proposed Algorithm
In a bid to optimize the frequency response of a detector with respect to the phase angle \(\theta\) in (5), a cost function in the determination of the optimized phase angle \(\theta_{\text{opt}}\) is defined as  
\[\theta_{\text{opt}}=\text{arg}\underset{\theta}{\min}\big{\{}g_{\text{pr}}( \theta)\big{\}},\ 0\leq\theta<2\pi \tag{10}\]  
An open-loop search is conducted here to locate the optimal phase angle \(\theta_{\text{opt}}\) over the range of 0\({}^{\circ}\)\(\leq\theta<\) 360\({}^{\circ}\). As illustrated in Figure 4d-f, \(\theta_{\text{opt}}\) are consequently located at 102\(\pi\)/180, 230\(\pi\)/180, 264\(\pi\)/180 in the cases of \(M\) = 2, 4, 6, respectively. With reference to the frequency responses in Figure 4d-f, nearly consistent performance is provided among cases with various \(M\) values in this proposal. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Frequency**} & \multicolumn{2}{c}{**Value of \(k\)**} & \multirow{2}{*}{**Value of \(M\)**} \\ \cline{2-3}
**(Hz)** & **Min. (\(k\))** & **Max.** & \\ \hline
697 & 44 & 46 & 3 \\
770 & 48 & 51 & 4 \\
852 & 53 & 56 & 4 \\
941 & 59 & 62 & 4 \\
1209 & 75 & 80 & 6 \\
1336 & 83 & 88 & 6 \\
1477 & 92 & 97 & 6 \\
1633 & 101 & 108 & 8 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Values of \(k\) and \(M\) versus the tone frequencies on a condition that \(N\) = 512 and \(T_{\text{off}}\) = 3.5%. Figure 3: Frequency response synthesis of a multi-frequency detector (MFD). In addition, different \(M\) values among various tone frequencies, listed in Table 2, are adopted to evaluate the optimal phase \(\theta_{\text{opt}}\) by performing (5) and (10), and then the \(g_{\text{pr}}\), \(g_{\text{sr}}\), \(g_{\text{ps}}\) values can be estimated. Presented in Table 3 are respective optimal design parameters for detectors among various tone frequencies. In addition, the frequency response for an optimal detector versus the tone frequencies is presented in Figure 5. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{
\begin{tabular}{c} **Frequency** \\ **(Hz)** \\ \end{tabular} } & \multirow{2}{*}{\(M\)} & \multicolumn{4}{c}{**Parameters of an Optimal Detector**} \\ \cline{3-6}  & & \(\theta_{\text{opt}}\) & \(g_{\text{pr}}\) **(dB)** & \(g_{\text{sr}}\) **(dB)** & \(g_{\text{ps}}\) **(dB)** \\ \hline
697 & 3 & 282\(\pi\)/180 & 0.1431 & 6.4597 & 6.3166 \\
770 & 4 & 229\(\pi\)/180 & 0.2530 & 7.5342 & 7.2812 \\
852 & 4 & 230\(\pi\)/180 & 0.2537 & 7.5365 & 7.2829 \\
941 & 4 & 129\(\pi\)/180 & 0.3386 & 7.5170 & 7.1784 \\
1209 & 6 & 264\(\pi\)/180 & 0.3246 & 7.2856 & 6.9610 \\
1336 & 6 & 264\(\pi\)/180 & 0.3227 & 7.2913 & 6.9686 \\
1477 & 6 & 264\(\pi\)/180 & 0.3203 & 7.2759 & 6.9556 \\
1633 & 8 & 248\(\pi\)/180 & 0.3120 & 7.6119 & 7.2998 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Optimal design parameters for a detector versus the tone frequencies. Finally, a lookup table is built for a quick reference of \(\widetilde{W}_{M,N,\theta}^{nk^{\prime}}\) (i.e., \(w_{r}(n)\) and \(w_{i}(n)\)) at various tone frequencies, and, thus, eliminates repeated computations. As a one-point DFT algorithm does, this proposal requires \(2N\) and \((2N-2)\) number of multiplication and addition operations, but merely requires a one-time detection computation to complete a DTMF detection task. As a consequence, the single point detection disadvantage, a problem that a typical DFT and a Goertzel algorithm have in common, is resolved. In simple terms, this proposal, as a high-performance algorithm, results in a tremendous computational load reduction. The proposed detection approach is illustrated as a brief flowchart in Figure 6.  
Figure 5: Frequency responses for the optimal detectors versus the tone frequencies.