## 2 Materials and Methods
### Methodology
#### 2.1.2 Signal Filtering  
The signal obtained from the amplification block is mounted on a DC component with an amplitude of 20 to 50 mV; this is due to the impedance produced by the contact between the skin and the electrode [33; 34]. For this reason, a passive first-order high-pass filter with a cut-off frequency \(f_{c}=3\) mHz to \(-3\) dB and unit gain is proposed for removing the DC component, using the following:  
\[f_{c}=\frac{1}{2\pi RC}, \tag{2}\]  
where \(C=10\)\(\mu\)F is the proposed capacitor and \(R\) is the calculated resistance for a given \(f_{c}\). Solving for \(R\) from Equation (2) and substituting the other values gives \(R=5.6\) M\(\Omega\). Next, a notch filter with a cut-off frequency of 60 Hz is used to reduce noise from the  
Figure 2: Biopotential amplification block. electrical grid. This filter is implemented using a TL082 operational amplifier, which has a low total harmonic distortion of 0.003% and a CMRR of 86 dB. The calculation of this filter is performed as follows:  
\[\frac{2R_{2}}{R_{1}}=\frac{C_{1}}{C_{2}}, \tag{3}\]  
\[f_{r}=\frac{1}{2\pi R_{1}C_{1}},\ C_{0}=2C_{1}, \tag{4}\]  
where \(C_{1}=100\) nF and \(C_{2}=100\) nF are the proposed capacitance values for the notch filter, \(R_{1}\) is the feedback resistance of the operational amplifier, \(R_{2}\) is the resistance that forms part of the notch filter, \(C_{0}\) is the grounding capacitance of the notch filter, and \(f_{r}=60\) Hz is the rejection frequency for which the notch filter is designed. Solving for \(R_{1}\) from Equation (4) and substituting the values gives \(R_{1}=26.52\) k\(\Omega\), which is adjusted to the commercial value of \(R_{1}=25\) k\(\Omega\). The value of \(R_{2}\) is calculated from Equation (3), yielding a value of \(R_{2}=12.5\) k\(\Omega\). The value of \(C_{0}\) is determined to be a value of 200 nF. Figure 3 shows the schematic diagram used to eliminate the DC component and the 60 Hz frequency noise using the calculated values [54]. To obtain EEG biopotential signals, active band-pass filters are proposed (one for each frequency range of the analyzed biopotential). For filtering the \(\beta\) signal, a fourth-order Butterworth active band-pass filter with a bandwidth of 12 to 33 Hz is proposed. This filter consists of a low-pass filter stage and a high-pass filter stage connected in series, implemented using a TL084 with a CMRR of 86 dB. This IC contains four operational amplifiers, reducing noise introduced by external components. Similarly, for filtering the \(\alpha\) signal, a second active band-pass filter with a bandwidth of 8 to 13 Hz, also implemented with a TL084 with the same characteristics described above, is proposed. In the design of the low-pass and high-pass filters, the parameters \(\alpha\) and \(k_{f}\), called frequency factors, are used to calculate the damping factor required for the filter order. These parameters are defined as \(\alpha_{1}=1.848\), \(\alpha_{2}=0.765\), \(k_{f1}=1\), and \(k_{f2}=1\)[54, 55]. The low-pass filter is calculated using Equations (5) and (6):  
\[C_{1}=\frac{2}{\alpha},\ C_{2}=\frac{\alpha}{2}, \tag{5}\]  
\[f_{c}=f_{3 dB}\times k_{f1},\ w_{c}=2\pi f_{c}R_{1,2}=\frac{1}{w_{c}},\ R_{3}= \frac{2}{w_{c}}, \tag{6}\]  
where \(C_{1}\) and \(C_{2}\) are the capacitances used to tune the filter to the desired cut-off frequency; \(\alpha_{1}\), \(k_{f1}\) and \(\alpha_{2}\), \(k_{f2}\) are the frequency factors used in the first and second section of the low-pass filter, respectively, \(f_{c}\) and \(w_{c}\) are the cut-off frequencies of the filter in Hz and  
Figure 3: High-pass filtering and band suppressor for biopotentials. rad/s, respectively, \(f_{3 dB}=33\) Hz is the desing frequency of the filter, and \(R_{1,2}\) and \(R_{3}\) are the resistors used to tune the filter to the given \(f_{c}\). Next, the values for the first section of the low-pass filter are calculated, yielding the following: \(f_{c}=33\) Hz, \(C_{1}=108\) nF, \(C_{2}=92.4\) nF, \(w_{c}=207.345\) rad/s, \(R_{1,2}=48.2\) k\(\Omega\), and \(R_{3}=96.4\) k\(\Omega\).