<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pc5271.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jialuo</id>
	<title>pc5271AY2526wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://pc5271.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jialuo"/>
	<link rel="alternate" type="text/html" href="https://pc5271.org/index.php/Special:Contributions/Jialuo"/>
	<updated>2026-04-15T20:44:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=503</id>
		<title>Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=503"/>
		<updated>2026-04-05T06:46:47Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Signal Conditioning and Filtering */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background and Theory==&lt;br /&gt;
&lt;br /&gt;
==System Architecture==&lt;br /&gt;
&lt;br /&gt;
== Signal Conditioning and Filtering ==&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic (sEMG) signals are highly susceptible to several sources of contamination during acquisition. In practical measurements, the dominant disturbances usually include low-frequency motion artifacts caused by electrode movement and electrode–skin impedance variation, narrow-band power-line interference centered at 50 Hz, and broadband high-frequency electronic noise introduced by the acquisition hardware. These unwanted components degrade the quality of the recorded signal and may significantly affect the reliability of subsequent feature extraction, parameter estimation, and muscle activity interpretation. For this reason, an effective signal-conditioning procedure is necessary before any higher-level analysis is performed.&lt;br /&gt;
&lt;br /&gt;
In the present implementation, the filtering strategy follows the principle of restricting the signal bandwidth first and then removing the remaining narrow-band interference in a targeted manner. Accordingly, the raw sEMG signal is first processed by a fourth-order Butterworth IIR band-pass filter and then by a 50 Hz notch filter. This processing sequence is illustrated in the flowchart below, where the signal passes through band-pass filtering, notch filtering, full-wave rectification, and envelope extraction before producing the final processed output.&lt;br /&gt;
&lt;br /&gt;
[[File:flowchart.png|thumb|center|500px|Flowchart of the real-time sEMG signal conditioning pipeline.]]&lt;br /&gt;
&lt;br /&gt;
The rationale of this order is that the &#039;&#039;&#039;band-pass stage&#039;&#039;&#039; first confines the signal to the main spectral region of interest for sEMG, thereby attenuating motion artifacts at very low frequencies and suppressing high-frequency noise components outside the physiological band. After this spectral preconditioning, the notch stage can more effectively suppress the residual 50 Hz power-line interference that lies inside the useful sEMG band. In transfer-function form, the band-pass filter may be written as &amp;lt;math&amp;gt;H_{BP}(z)=\frac{B_{BP}(z)}{A_{BP}(z)}&amp;lt;/math&amp;gt;, where the effective passband is selected as &amp;lt;math&amp;gt;20 \leq f \leq 160 \text{ Hz}&amp;lt;/math&amp;gt;. This frequency interval is consistent with the dominant spectral content of surface EMG: the lower cutoff near 20 Hz reduces motion artifacts and unstable low-frequency fluctuations, whereas the upper cutoff near 160 Hz removes high-frequency electronic noise while preserving the main energy-bearing components of the muscle signal. The use of a Butterworth structure is appropriate here because it provides a smooth monotonic passband response without ripple, which helps preserve signal morphology in real-time applications.&lt;br /&gt;
&lt;br /&gt;
After band limitation, a &#039;&#039;&#039;notch filter&#039;&#039;&#039; centered at the power-line frequency is applied to suppress interference that cannot be removed by the band-pass stage alone. The notch filter is designed around &amp;lt;math&amp;gt;f_0 = 50 \text{ Hz}&amp;lt;/math&amp;gt;, and its bandwidth is controlled by the quality factor &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, which is expressed as &amp;lt;math&amp;gt;Q = \frac{f_0}{\Delta f}&amp;lt;/math&amp;gt;. In transfer-function form, the notch stage is written as &amp;lt;math&amp;gt;H_{N}(z)=\frac{B_{N}(z)}{A_{N}(z)}&amp;lt;/math&amp;gt;. In the implemented program, a large quality factor is chosen so that the notch remains narrow, allowing effective rejection of the 50 Hz interference while minimizing distortion of neighboring useful spectral components. This is particularly important for sEMG because the interference frequency lies directly inside the physiological band of interest.&lt;br /&gt;
&lt;br /&gt;
Following the filtering stages, further signal conditioning is performed to obtain a representation that is more directly related to muscle activation intensity. The filtered sEMG waveform is first &#039;&#039;&#039;full-wave rectified&#039;&#039;&#039;, which converts the bipolar oscillatory signal into a unipolar signal by taking its absolute value.  Rectification does not remove noise by itself; instead, it transforms the signal into a form that is more suitable for amplitude-based analysis because both positive and negative deflections contribute positively to the activation measure.&lt;br /&gt;
&lt;br /&gt;
After rectification, the signal envelope is extracted to provide a smooth estimate of muscle activation level over time. In a general formulation, the envelope can be described as the &#039;&#039;&#039;low-pass filtered&#039;&#039;&#039; version of the rectified signal, namely &amp;lt;math&amp;gt;y_{\mathrm{env}}[n] = \mathrm{LPF}\bigl(y_{\mathrm{rect}}[n]\bigr)&amp;lt;/math&amp;gt;. In the present code implementation, this operation is realized by short-time averaging over a finite window, which is equivalent to a moving-average low-pass smoothing of the rectified waveform. The corresponding expression is &amp;lt;math&amp;gt;y_{\mathrm{env}}[n] = \frac{1}{N}\sum_{k=0}^{N-1} |x[n-k]|&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the window length in samples. With a window duration of approximately 200 ms, this envelope extraction method provides a stable and physiologically meaningful representation of muscle activation intensity, making it suitable for tasks such as force estimation, fatigue analysis, and motor-control studies.&lt;br /&gt;
&lt;br /&gt;
An important feature of the present &#039;&#039;&#039;implementation&#039;&#039;&#039; is that the entire filtering process is performed &#039;&#039;&#039;in real time&#039;&#039;&#039;, sample by sample, rather than by offline block processing. For this reason, IIR filters are preferred over FIR filters, since they can achieve comparable filtering performance with lower order, lower computational cost, and shorter delay. These properties are especially valuable in embedded systems, serial data streaming, and other low-latency experimental applications. However, unlike memoryless operations, an IIR filter depends not only on the current input but also on previous inputs and previous outputs. Its discrete-time behavior can therefore be represented by the recursive difference equation &amp;lt;math&amp;gt;y[n] = \sum_{k=0}^{M} b_k x[n-k] - \sum_{k=1}^{N} a_k y[n-k]&amp;lt;/math&amp;gt;. This equation makes clear that internal filter states must be preserved continuously during streaming operation. If the state variables were reinitialized for every incoming sample or data segment, artificial transients would appear and the output would no longer remain continuous.&lt;br /&gt;
&lt;br /&gt;
In the Python implementation, this state continuity is maintained using the internal initial-condition mechanism provided by SciPy, such as &amp;lt;code&amp;gt;lfilter_zi&amp;lt;/code&amp;gt;, together with recursive state updates during each filtering call. As a result, each newly acquired sample is passed first through the band-pass filter and then through the notch filter, while the internal states of both filters are updated after every step. This state-preserving sample-by-sample design ensures that the processing chain remains causal, continuous, and suitable for real-time display or downstream analysis without requiring storage of the entire signal segment.&lt;br /&gt;
&lt;br /&gt;
Overall, this signal-conditioning scheme provides an experimentally practical solution for real-time sEMG processing. The fourth-order Butterworth band-pass filter confines the signal to the main physiological band of interest, the 50 Hz notch filter removes narrow-band power-line contamination, and the subsequent rectification and envelope extraction generate a smooth amplitude descriptor of muscle activity. Combined with state-preserved streaming IIR implementation, this approach achieves a good balance between signal fidelity, computational efficiency, and real-time applicability in biomedical and physical experiment settings.&lt;br /&gt;
&lt;br /&gt;
==Data processing and analysis==&lt;br /&gt;
&lt;br /&gt;
===Data Processing===&lt;br /&gt;
&lt;br /&gt;
===Experimental Results===&lt;br /&gt;
&lt;br /&gt;
===Multi-subject Analysis===&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=502</id>
		<title>Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=502"/>
		<updated>2026-04-05T06:28:52Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Signal Conditioning and Filtering */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background and Theory==&lt;br /&gt;
&lt;br /&gt;
==System Architecture==&lt;br /&gt;
&lt;br /&gt;
== Signal Conditioning and Filtering ==&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic (sEMG) signals are highly susceptible to several sources of contamination during acquisition. In practical measurements, the dominant disturbances usually include low-frequency motion artifacts caused by electrode movement and electrode–skin impedance variation, narrow-band power-line interference centered at 50 Hz, and broadband high-frequency electronic noise introduced by the acquisition hardware. These unwanted components degrade the quality of the recorded signal and may significantly affect the reliability of subsequent feature extraction, parameter estimation, and muscle activity interpretation. For this reason, an effective signal-conditioning procedure is necessary before any higher-level analysis is performed.&lt;br /&gt;
&lt;br /&gt;
In the present implementation, the filtering strategy follows the principle of restricting the signal bandwidth first and then removing the remaining narrow-band interference in a targeted manner. Accordingly, the raw sEMG signal is first processed by a fourth-order Butterworth IIR band-pass filter and then by a 50 Hz notch filter. This processing sequence is illustrated in the flowchart below, where the signal passes through band-pass filtering, notch filtering, full-wave rectification, and envelope extraction before producing the final processed output.&lt;br /&gt;
&lt;br /&gt;
[[File:flowchart.png|thumb|center|500px|Flowchart of the real-time sEMG signal conditioning pipeline.]]&lt;br /&gt;
&lt;br /&gt;
The rationale of this order is that the &#039;&#039;&#039;band-pass stage&#039;&#039;&#039; first confines the signal to the main spectral region of interest for sEMG, thereby attenuating motion artifacts at very low frequencies and suppressing high-frequency noise components outside the physiological band. After this spectral preconditioning, the notch stage can more effectively suppress the residual 50 Hz power-line interference that lies inside the useful sEMG band. In transfer-function form, the band-pass filter may be written as &amp;lt;math&amp;gt;H_{BP}(z)=\frac{B_{BP}(z)}{A_{BP}(z)}&amp;lt;/math&amp;gt;, where the effective passband is selected as &amp;lt;math&amp;gt;20 \leq f \leq 160 \text{ Hz}&amp;lt;/math&amp;gt;. This frequency interval is consistent with the dominant spectral content of surface EMG: the lower cutoff near 20 Hz reduces motion artifacts and unstable low-frequency fluctuations, whereas the upper cutoff near 160 Hz removes high-frequency electronic noise while preserving the main energy-bearing components of the muscle signal. The use of a Butterworth structure is appropriate here because it provides a smooth monotonic passband response without ripple, which helps preserve signal morphology in real-time applications.&lt;br /&gt;
&lt;br /&gt;
After band limitation, a &#039;&#039;&#039;notch filter&#039;&#039;&#039; centered at the power-line frequency is applied to suppress interference that cannot be removed by the band-pass stage alone. The notch filter is designed around &amp;lt;math&amp;gt;f_0 = 50 \text{ Hz}&amp;lt;/math&amp;gt;, and its bandwidth is controlled by the quality factor &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, which may be expressed as &amp;lt;math&amp;gt;Q = \frac{f_0}{\Delta f}&amp;lt;/math&amp;gt;. In transfer-function form, the notch stage may be written as &amp;lt;math&amp;gt;H_{N}(z)=\frac{B_{N}(z)}{A_{N}(z)}&amp;lt;/math&amp;gt;. In the implemented program, a relatively large quality factor is chosen so that the notch remains narrow, allowing effective rejection of the 50 Hz interference while minimizing distortion of neighboring useful spectral components. This is particularly important for sEMG because the interference frequency lies directly inside the physiological band of interest.&lt;br /&gt;
&lt;br /&gt;
Following the filtering stages, further signal conditioning is performed to obtain a representation that is more directly related to muscle activation intensity. The filtered sEMG waveform is first &#039;&#039;&#039;full-wave rectified&#039;&#039;&#039;, which converts the bipolar oscillatory signal into a unipolar signal by taking its absolute value. Mathematically, this operation is written as &amp;lt;math&amp;gt;y_{\mathrm{rect}}[n] = |x[n]|&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;x[n]&amp;lt;/math&amp;gt; denotes the filtered discrete-time sEMG signal. Rectification does not remove noise by itself; instead, it transforms the signal into a form that is more suitable for amplitude-based analysis because both positive and negative deflections contribute positively to the activation measure.&lt;br /&gt;
&lt;br /&gt;
After rectification, the signal envelope is extracted to provide a smooth estimate of muscle activation level over time. In a general formulation, the envelope can be described as the &#039;&#039;&#039;low-pass filtered&#039;&#039;&#039; version of the rectified signal, namely &amp;lt;math&amp;gt;y_{\mathrm{env}}[n] = \mathrm{LPF}\bigl(y_{\mathrm{rect}}[n]\bigr)&amp;lt;/math&amp;gt;. In the present code implementation, this operation is realized by short-time averaging over a finite window, which is equivalent to a moving-average low-pass smoothing of the rectified waveform. The corresponding expression is &amp;lt;math&amp;gt;y_{\mathrm{env}}[n] = \frac{1}{N}\sum_{k=0}^{N-1} |x[n-k]|&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is the window length in samples. With a window duration of approximately 200 ms, this envelope extraction method provides a stable and physiologically meaningful representation of muscle activation intensity, making it suitable for tasks such as force estimation, fatigue analysis, and motor-control studies. In the flowchart, this stage is represented by the low-pass filtering block following full-wave rectification.&lt;br /&gt;
&lt;br /&gt;
An important feature of the present implementation is that the entire filtering process is performed in real time, sample by sample, rather than by offline block processing. For this reason, IIR filters are preferred over FIR filters, since they can achieve comparable filtering performance with lower order, lower computational cost, and shorter delay. These properties are especially valuable in embedded systems, serial data streaming, and other low-latency experimental applications. However, unlike memoryless operations, an IIR filter depends not only on the current input but also on previous inputs and previous outputs. Its discrete-time behavior can therefore be represented by the recursive difference equation &amp;lt;math&amp;gt;y[n] = \sum_{k=0}^{M} b_k x[n-k] - \sum_{k=1}^{N} a_k y[n-k]&amp;lt;/math&amp;gt;. This equation makes clear that internal filter states must be preserved continuously during streaming operation. If the state variables were reinitialized for every incoming sample or data segment, artificial transients would appear and the output would no longer remain continuous.&lt;br /&gt;
&lt;br /&gt;
In the Python implementation, this state continuity is maintained using the internal initial-condition mechanism provided by SciPy, such as &amp;lt;code&amp;gt;lfilter_zi&amp;lt;/code&amp;gt;, together with recursive state updates during each filtering call. As a result, each newly acquired sample is passed first through the band-pass filter and then through the notch filter, while the internal states of both filters are updated after every step. This state-preserving sample-by-sample design ensures that the processing chain remains causal, continuous, and suitable for real-time display or downstream analysis without requiring storage of the entire signal segment. In practical terms, the pipeline may therefore be summarized as raw sEMG input, band-pass filtering, notch filtering, rectification, envelope extraction, and processed output, exactly as shown in the inserted flowchart.&lt;br /&gt;
&lt;br /&gt;
Overall, this signal-conditioning scheme provides a scientifically sound and experimentally practical solution for real-time sEMG processing. The fourth-order Butterworth band-pass filter confines the signal to the main physiological band of interest, the 50 Hz notch filter removes narrow-band power-line contamination, and the subsequent rectification and envelope extraction generate a smooth amplitude descriptor of muscle activity. Combined with state-preserved streaming IIR implementation, this approach achieves a good balance between signal fidelity, computational efficiency, and real-time applicability in biomedical and physical experiment settings.&lt;br /&gt;
&lt;br /&gt;
==Data processing and analysis==&lt;br /&gt;
&lt;br /&gt;
===Data Processing===&lt;br /&gt;
&lt;br /&gt;
===Experimental Results===&lt;br /&gt;
&lt;br /&gt;
===Multi-subject Analysis===&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=501</id>
		<title>Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=501"/>
		<updated>2026-04-05T03:46:39Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Signal Conditioning and Filtering */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background and Theory==&lt;br /&gt;
&lt;br /&gt;
==System Architecture==&lt;br /&gt;
&lt;br /&gt;
==Signal Conditioning and Filtering==&lt;br /&gt;
&lt;br /&gt;
===Noise Sources in sEMG===&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic (sEMG) signals are mainly affected by three types of noise: power-line interference (50 Hz), motion artifacts concentrated below 20 Hz, and high-frequency electronic noise. These disturbances degrade signal quality and may reduce the reliability of subsequent feature extraction and parameter estimation. Therefore, an effective filtering strategy is essential for real-time sEMG processing.&lt;br /&gt;
&lt;br /&gt;
===Filtering Strategy===&lt;br /&gt;
&lt;br /&gt;
The proposed filtering scheme follows the principle of“band limitation first, precise filtering second.”Specifically, the raw sEMG signal is first processed by a band-pass filter and then by a notch filter. This structure can be summarized as:&lt;br /&gt;
&lt;br /&gt;
Band-pass → Notch&lt;br /&gt;
&lt;br /&gt;
Applying band-pass filtering first restricts the signal to its effective frequency range and suppresses low-frequency motion artifacts as well as high-frequency noise. On this basis, the notch filter can then more precisely remove the 50 Hz power-line interference that lies within the sEMG frequency band. This order improves both filtering efficiency and signal fidelity in real-time applications.&lt;br /&gt;
&lt;br /&gt;
===Band-pass Filter Design===&lt;br /&gt;
&lt;br /&gt;
A fourth-order Butterworth IIR band-pass filter is adopted in this study. The main design parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
-Type:Butterworth IIR  &lt;br /&gt;
-Order:4th order  &lt;br /&gt;
-Cutoff frequencies:20–160 Hz  &lt;br /&gt;
&lt;br /&gt;
This frequency range is selected according to the spectral characteristics of sEMG. The lower cutoff at 20 Hz helps suppress motion artifacts and unstable low-frequency noise from the electrode–skin interface, while the upper cutoff at 160 Hz removes high-frequency noise and preserves the main energy components of sEMG. The Butterworth structure provides a smooth passband response and is therefore suitable for preserving signal morphology.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_{BP}(z) = \frac{B(z)}{A(z)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;f_c \in [20, 160] \text{ Hz}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notch Filter Design===&lt;br /&gt;
&lt;br /&gt;
To suppress power-line interference, a 50 Hz notch filter is introduced after band-pass filtering. Since 50 Hz lies directly within the effective frequency range of sEMG, this interference must be removed to avoid distortion in subsequent analysis. The bandwidth of the notch filter is controlled by the quality factor (Q), which determines the trade-off between interference suppression and preservation of adjacent useful signal components.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_{N}(z) = \frac{B_N(z)}{A_N(z)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;f_0 = 50 \text{ Hz}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Q = \frac{f_0}{\Delta f}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Signal Post-processing===&lt;br /&gt;
&lt;br /&gt;
In addition to filtering, signal post-processing is necessary to reflect muscle activation intensity more clearly.After filtering, the sEMG signal is full-wave rectified by taking its absolute value. This converts the bipolar raw signal into a unipolar form that is more suitable for amplitude analysis.Following rectification, the signal envelope is extracted using a low-pass filter with a cutoff frequency of 5–10 Hz. This range corresponds to the typical variation frequency of muscle contraction. The resulting envelope provides a smooth representation of muscle activation intensity and is useful for applications such as force estimation, fatigue analysis, and motor control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y_{\mathrm{rect}}[n] = |x[n]|&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y_{\mathrm{env}}[n] = \mathrm{LPF}\bigl(y_{\mathrm{rect}}[n]\bigr)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y_{\mathrm{env}}[n] = \frac{1}{N}\sum_{k=0}^{N-1} |x[n-k]|&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Real-time Implementation===&lt;br /&gt;
&lt;br /&gt;
For real-time processing, IIR filters are preferred over FIR filters because they require lower order, less computation, and shorter delay to achieve comparable filtering performance. These properties make IIR filters more suitable for embedded systems and streaming applications.&lt;br /&gt;
&lt;br /&gt;
A key issue in real-time IIR filtering is that the filter output depends not only on current and previous inputs, but also on previous outputs. Therefore, state continuity must be maintained during streaming processing. If the internal states are reinitialized for each new data segment, transient distortion will appear at the beginning of the output. In practice, the filter state can be preserved and updated continuously, for example by using the lfilter_zi mechanism provided in SciPy.&lt;br /&gt;
&lt;br /&gt;
The filtering process is implemented in a sample-by-sample streaming manner. For each incoming sample, the signal passes sequentially through the band-pass filter and the notch filter, while the internal states of both filters are updated continuously. This strategy ensures causal, continuous, and low-latency filtering, which is essential for real-time sEMG applications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y[n] = \sum_{k=0}^{M} b_k x[n-k] - \sum_{k=1}^{N} a_k y[n-k]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
This section presents a real-time filtering scheme for sEMG signals based on a band-pass + notch structure. A fourth-order Butterworth IIR band-pass filter (20–160 Hz) is used to preserve the main sEMG components while suppressing motion artifacts and high-frequency noise, and a 50 Hz notch filter is applied to remove power-line interference. In addition, rectification, envelope extraction, and state-preserved streaming implementation further improve the practicality of the proposed method for real-time biomedical signal processing.&lt;br /&gt;
[[File:flowchart.png|thumb|center|500px|sEMG signal processing flowchart]]&lt;br /&gt;
&lt;br /&gt;
==Data processing and analysis==&lt;br /&gt;
&lt;br /&gt;
===Data Processing===&lt;br /&gt;
&lt;br /&gt;
===Experimental Results===&lt;br /&gt;
&lt;br /&gt;
===Multi-subject Analysis===&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=500</id>
		<title>Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=500"/>
		<updated>2026-04-05T03:26:18Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Real-time Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background and Theory==&lt;br /&gt;
&lt;br /&gt;
==System Architecture==&lt;br /&gt;
&lt;br /&gt;
==Signal Conditioning and Filtering==&lt;br /&gt;
&lt;br /&gt;
===Noise Sources in sEMG===&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic (sEMG) signals are mainly affected by three types of noise: power-line interference (50 Hz), motion artifacts concentrated below 20 Hz, and high-frequency electronic noise. These disturbances degrade signal quality and may reduce the reliability of subsequent feature extraction and parameter estimation. Therefore, an effective filtering strategy is essential for real-time sEMG processing.&lt;br /&gt;
&lt;br /&gt;
===Filtering Strategy===&lt;br /&gt;
&lt;br /&gt;
The proposed filtering scheme follows the principle of“band limitation first, precise filtering second.”Specifically, the raw sEMG signal is first processed by a band-pass filter and then by a notch filter. This structure can be summarized as:&lt;br /&gt;
&lt;br /&gt;
Band-pass → Notch&lt;br /&gt;
&lt;br /&gt;
Applying band-pass filtering first restricts the signal to its effective frequency range and suppresses low-frequency motion artifacts as well as high-frequency noise. On this basis, the notch filter can then more precisely remove the 50 Hz power-line interference that lies within the sEMG frequency band. This order improves both filtering efficiency and signal fidelity in real-time applications.&lt;br /&gt;
&lt;br /&gt;
===Band-pass Filter Design===&lt;br /&gt;
&lt;br /&gt;
A fourth-order Butterworth IIR band-pass filter is adopted in this study. The main design parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
-Type:Butterworth IIR  &lt;br /&gt;
-Order:4th order  &lt;br /&gt;
-Cutoff frequencies:20–160 Hz  &lt;br /&gt;
&lt;br /&gt;
This frequency range is selected according to the spectral characteristics of sEMG. The lower cutoff at 20 Hz helps suppress motion artifacts and unstable low-frequency noise from the electrode–skin interface, while the upper cutoff at 160 Hz removes high-frequency noise and preserves the main energy components of sEMG. The Butterworth structure provides a smooth passband response and is therefore suitable for preserving signal morphology.&lt;br /&gt;
&lt;br /&gt;
===Notch Filter Design===&lt;br /&gt;
&lt;br /&gt;
To suppress power-line interference, a 50 Hz notch filter is introduced after band-pass filtering. Since 50 Hz lies directly within the effective frequency range of sEMG, this interference must be removed to avoid distortion in subsequent analysis. The bandwidth of the notch filter is controlled by the quality factor (Q), which determines the trade-off between interference suppression and preservation of adjacent useful signal components.&lt;br /&gt;
&lt;br /&gt;
===Signal Post-processing===&lt;br /&gt;
&lt;br /&gt;
In addition to filtering, signal post-processing is necessary to reflect muscle activation intensity more clearly.After filtering, the sEMG signal is full-wave rectified by taking its absolute value. This converts the bipolar raw signal into a unipolar form that is more suitable for amplitude analysis.Following rectification, the signal envelope is extracted using a low-pass filter with a cutoff frequency of 5–10 Hz. This range corresponds to the typical variation frequency of muscle contraction. The resulting envelope provides a smooth representation of muscle activation intensity and is useful for applications such as force estimation, fatigue analysis, and motor control.&lt;br /&gt;
&lt;br /&gt;
===Real-time Implementation===&lt;br /&gt;
&lt;br /&gt;
For real-time processing, IIR filters are preferred over FIR filters because they require lower order, less computation, and shorter delay to achieve comparable filtering performance. These properties make IIR filters more suitable for embedded systems and streaming applications.&lt;br /&gt;
&lt;br /&gt;
A key issue in real-time IIR filtering is that the filter output depends not only on current and previous inputs, but also on previous outputs. Therefore, state continuity must be maintained during streaming processing. If the internal states are reinitialized for each new data segment, transient distortion will appear at the beginning of the output. In practice, the filter state can be preserved and updated continuously, for example by using the lfilter_zi mechanism provided in SciPy.&lt;br /&gt;
&lt;br /&gt;
The filtering process is implemented in a sample-by-sample streaming manner. For each incoming sample, the signal passes sequentially through the band-pass filter and the notch filter, while the internal states of both filters are updated continuously. This strategy ensures causal, continuous, and low-latency filtering, which is essential for real-time sEMG applications.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
This section presents a real-time filtering scheme for sEMG signals based on a band-pass + notch structure. A fourth-order Butterworth IIR band-pass filter (20–160 Hz) is used to preserve the main sEMG components while suppressing motion artifacts and high-frequency noise, and a 50 Hz notch filter is applied to remove power-line interference. In addition, rectification, envelope extraction, and state-preserved streaming implementation further improve the practicality of the proposed method for real-time biomedical signal processing.&lt;br /&gt;
[[File:flowchart.png|thumb|center|500px|sEMG signal processing flowchart]]&lt;br /&gt;
&lt;br /&gt;
==Data processing and analysis==&lt;br /&gt;
&lt;br /&gt;
===Data Processing===&lt;br /&gt;
&lt;br /&gt;
===Experimental Results===&lt;br /&gt;
&lt;br /&gt;
===Multi-subject Analysis===&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=499</id>
		<title>Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=499"/>
		<updated>2026-04-05T03:24:09Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Signal Conditioning and Filtering */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background and Theory==&lt;br /&gt;
&lt;br /&gt;
==System Architecture==&lt;br /&gt;
&lt;br /&gt;
==Signal Conditioning and Filtering==&lt;br /&gt;
&lt;br /&gt;
===Noise Sources in sEMG===&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic (sEMG) signals are mainly affected by three types of noise: power-line interference (50 Hz), motion artifacts concentrated below 20 Hz, and high-frequency electronic noise. These disturbances degrade signal quality and may reduce the reliability of subsequent feature extraction and parameter estimation. Therefore, an effective filtering strategy is essential for real-time sEMG processing.&lt;br /&gt;
&lt;br /&gt;
===Filtering Strategy===&lt;br /&gt;
&lt;br /&gt;
The proposed filtering scheme follows the principle of“band limitation first, precise filtering second.”Specifically, the raw sEMG signal is first processed by a band-pass filter and then by a notch filter. This structure can be summarized as:&lt;br /&gt;
&lt;br /&gt;
Band-pass → Notch&lt;br /&gt;
&lt;br /&gt;
Applying band-pass filtering first restricts the signal to its effective frequency range and suppresses low-frequency motion artifacts as well as high-frequency noise. On this basis, the notch filter can then more precisely remove the 50 Hz power-line interference that lies within the sEMG frequency band. This order improves both filtering efficiency and signal fidelity in real-time applications.&lt;br /&gt;
&lt;br /&gt;
===Band-pass Filter Design===&lt;br /&gt;
&lt;br /&gt;
A fourth-order Butterworth IIR band-pass filter is adopted in this study. The main design parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
-Type:Butterworth IIR  &lt;br /&gt;
-Order:4th order  &lt;br /&gt;
-Cutoff frequencies:20–160 Hz  &lt;br /&gt;
&lt;br /&gt;
This frequency range is selected according to the spectral characteristics of sEMG. The lower cutoff at 20 Hz helps suppress motion artifacts and unstable low-frequency noise from the electrode–skin interface, while the upper cutoff at 160 Hz removes high-frequency noise and preserves the main energy components of sEMG. The Butterworth structure provides a smooth passband response and is therefore suitable for preserving signal morphology.&lt;br /&gt;
&lt;br /&gt;
===Notch Filter Design===&lt;br /&gt;
&lt;br /&gt;
To suppress power-line interference, a 50 Hz notch filter is introduced after band-pass filtering. Since 50 Hz lies directly within the effective frequency range of sEMG, this interference must be removed to avoid distortion in subsequent analysis. The bandwidth of the notch filter is controlled by the quality factor (Q), which determines the trade-off between interference suppression and preservation of adjacent useful signal components.&lt;br /&gt;
&lt;br /&gt;
===Signal Post-processing===&lt;br /&gt;
&lt;br /&gt;
In addition to filtering, signal post-processing is necessary to reflect muscle activation intensity more clearly.After filtering, the sEMG signal is full-wave rectified by taking its absolute value. This converts the bipolar raw signal into a unipolar form that is more suitable for amplitude analysis.Following rectification, the signal envelope is extracted using a low-pass filter with a cutoff frequency of 5–10 Hz. This range corresponds to the typical variation frequency of muscle contraction. The resulting envelope provides a smooth representation of muscle activation intensity and is useful for applications such as force estimation, fatigue analysis, and motor control.&lt;br /&gt;
&lt;br /&gt;
===Real-time Implementation===&lt;br /&gt;
&lt;br /&gt;
For real-time processing, IIR filters are preferred over FIR filters because they require lower order, less computation, and shorter delay to achieve comparable filtering performance. These properties make IIR filters more suitable for embedded systems and streaming applications.&lt;br /&gt;
&lt;br /&gt;
A key issue in real-time IIR filtering is that the filter output depends not only on current and previous inputs, but also on previous outputs. Therefore, state continuity must be maintained during streaming processing. If the internal states are reinitialized for each new data segment, transient distortion will appear at the beginning of the output. In practice, the filter state can be preserved and updated continuously, for example by using the lfilter_zi mechanism provided in SciPy.&lt;br /&gt;
&lt;br /&gt;
The filtering process is implemented in a sample-by-sample streaming manner. For each incoming sample, the signal passes sequentially through the band-pass filter and the notch filter, while the internal states of both filters are updated continuously. The processing pipeline can be expressed as:&lt;br /&gt;
&lt;br /&gt;
Input → Band-pass → Notch → Output&lt;br /&gt;
&lt;br /&gt;
This strategy ensures causal, continuous, and low-latency filtering, which is essential for real-time sEMG applications.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
This section presents a real-time filtering scheme for sEMG signals based on a band-pass + notch structure. A fourth-order Butterworth IIR band-pass filter (20–160 Hz) is used to preserve the main sEMG components while suppressing motion artifacts and high-frequency noise, and a 50 Hz notch filter is applied to remove power-line interference. In addition, rectification, envelope extraction, and state-preserved streaming implementation further improve the practicality of the proposed method for real-time biomedical signal processing.&lt;br /&gt;
[[File:flowchart.png|thumb|center|500px|sEMG signal processing flowchart]]&lt;br /&gt;
&lt;br /&gt;
==Data processing and analysis==&lt;br /&gt;
&lt;br /&gt;
===Data Processing===&lt;br /&gt;
&lt;br /&gt;
===Experimental Results===&lt;br /&gt;
&lt;br /&gt;
===Multi-subject Analysis===&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=File:Flowchart.png&amp;diff=498</id>
		<title>File:Flowchart.png</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=File:Flowchart.png&amp;diff=498"/>
		<updated>2026-04-05T03:21:19Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=497</id>
		<title>Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=497"/>
		<updated>2026-04-05T02:37:23Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Signal Post-processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background and Theory==&lt;br /&gt;
&lt;br /&gt;
==System Architecture==&lt;br /&gt;
&lt;br /&gt;
==Signal Conditioning and Filtering==&lt;br /&gt;
&lt;br /&gt;
===Noise Sources in sEMG===&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic (sEMG) signals are mainly affected by three types of noise: power-line interference (50 Hz), motion artifacts concentrated below 20 Hz, and high-frequency electronic noise. These disturbances degrade signal quality and may reduce the reliability of subsequent feature extraction and parameter estimation. Therefore, an effective filtering strategy is essential for real-time sEMG processing.&lt;br /&gt;
&lt;br /&gt;
===Filtering Strategy===&lt;br /&gt;
&lt;br /&gt;
The proposed filtering scheme follows the principle of“band limitation first, precise filtering second.”Specifically, the raw sEMG signal is first processed by a band-pass filter and then by a notch filter. This structure can be summarized as:&lt;br /&gt;
&lt;br /&gt;
Band-pass → Notch&lt;br /&gt;
&lt;br /&gt;
Applying band-pass filtering first restricts the signal to its effective frequency range and suppresses low-frequency motion artifacts as well as high-frequency noise. On this basis, the notch filter can then more precisely remove the 50 Hz power-line interference that lies within the sEMG frequency band. This order improves both filtering efficiency and signal fidelity in real-time applications.&lt;br /&gt;
&lt;br /&gt;
===Band-pass Filter Design===&lt;br /&gt;
&lt;br /&gt;
A fourth-order Butterworth IIR band-pass filter is adopted in this study. The main design parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
-Type:Butterworth IIR  &lt;br /&gt;
-Order:4th order  &lt;br /&gt;
-Cutoff frequencies:20–160 Hz  &lt;br /&gt;
&lt;br /&gt;
This frequency range is selected according to the spectral characteristics of sEMG. The lower cutoff at 20 Hz helps suppress motion artifacts and unstable low-frequency noise from the electrode–skin interface, while the upper cutoff at 160 Hz removes high-frequency noise and preserves the main energy components of sEMG. The Butterworth structure provides a smooth passband response and is therefore suitable for preserving signal morphology.&lt;br /&gt;
&lt;br /&gt;
===Notch Filter Design===&lt;br /&gt;
&lt;br /&gt;
To suppress power-line interference, a 50 Hz notch filter is introduced after band-pass filtering. Since 50 Hz lies directly within the effective frequency range of sEMG, this interference must be removed to avoid distortion in subsequent analysis. The bandwidth of the notch filter is controlled by the quality factor (Q), which determines the trade-off between interference suppression and preservation of adjacent useful signal components.&lt;br /&gt;
&lt;br /&gt;
===Signal Post-processing===&lt;br /&gt;
&lt;br /&gt;
In addition to filtering, signal post-processing is necessary to reflect muscle activation intensity more clearly.After filtering, the sEMG signal is full-wave rectified by taking its absolute value. This converts the bipolar raw signal into a unipolar form that is more suitable for amplitude analysis.Following rectification, the signal envelope is extracted using a low-pass filter with a cutoff frequency of 5–10 Hz. This range corresponds to the typical variation frequency of muscle contraction. The resulting envelope provides a smooth representation of muscle activation intensity and is useful for applications such as force estimation, fatigue analysis, and motor control.&lt;br /&gt;
&lt;br /&gt;
===Real-time Implementation===&lt;br /&gt;
&lt;br /&gt;
For real-time processing, IIR filters are preferred over FIR filters because they require lower order, less computation, and shorter delay to achieve comparable filtering performance. These properties make IIR filters more suitable for embedded systems and streaming applications.&lt;br /&gt;
&lt;br /&gt;
A key issue in real-time IIR filtering is that the filter output depends not only on current and previous inputs, but also on previous outputs. Therefore, state continuity must be maintained during streaming processing. If the internal states are reinitialized for each new data segment, transient distortion will appear at the beginning of the output. In practice, the filter state can be preserved and updated continuously, for example by using the lfilter_zi mechanism provided in SciPy.&lt;br /&gt;
&lt;br /&gt;
The filtering process is implemented in a sample-by-sample streaming manner. For each incoming sample, the signal passes sequentially through the band-pass filter and the notch filter, while the internal states of both filters are updated continuously. The processing pipeline can be expressed as:&lt;br /&gt;
&lt;br /&gt;
Input → Band-pass → Notch → Output&lt;br /&gt;
&lt;br /&gt;
This strategy ensures causal, continuous, and low-latency filtering, which is essential for real-time sEMG applications.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
This section presents a real-time filtering scheme for sEMG signals based on a band-pass + notch structure. A fourth-order Butterworth IIR band-pass filter (20–160 Hz) is used to preserve the main sEMG components while suppressing motion artifacts and high-frequency noise, and a 50 Hz notch filter is applied to remove power-line interference. In addition, rectification, envelope extraction, and state-preserved streaming implementation further improve the practicality of the proposed method for real-time biomedical signal processing.&lt;br /&gt;
&lt;br /&gt;
==Data processing and analysis==&lt;br /&gt;
&lt;br /&gt;
===Data Processing===&lt;br /&gt;
&lt;br /&gt;
===Experimental Results===&lt;br /&gt;
&lt;br /&gt;
===Multi-subject Analysis===&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=491</id>
		<title>Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=491"/>
		<updated>2026-04-01T03:32:19Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Filter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background and Theory==&lt;br /&gt;
&lt;br /&gt;
==System Architecture==&lt;br /&gt;
&lt;br /&gt;
==Signal Conditioning and Filtering==&lt;br /&gt;
&lt;br /&gt;
===Noise Sources in sEMG===&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic (sEMG) signals are mainly affected by three types of noise: power-line interference (50 Hz), motion artifacts concentrated below 20 Hz, and high-frequency electronic noise. These disturbances degrade signal quality and may reduce the reliability of subsequent feature extraction and parameter estimation. Therefore, an effective filtering strategy is essential for real-time sEMG processing.&lt;br /&gt;
&lt;br /&gt;
===Filtering Strategy===&lt;br /&gt;
&lt;br /&gt;
The proposed filtering scheme follows the principle of“band limitation first, precise filtering second.”Specifically, the raw sEMG signal is first processed by a band-pass filter and then by a notch filter. This structure can be summarized as:&lt;br /&gt;
&lt;br /&gt;
Band-pass → Notch&lt;br /&gt;
&lt;br /&gt;
Applying band-pass filtering first restricts the signal to its effective frequency range and suppresses low-frequency motion artifacts as well as high-frequency noise. On this basis, the notch filter can then more precisely remove the 50 Hz power-line interference that lies within the sEMG frequency band. This order improves both filtering efficiency and signal fidelity in real-time applications.&lt;br /&gt;
&lt;br /&gt;
===Band-pass Filter Design===&lt;br /&gt;
&lt;br /&gt;
A fourth-order Butterworth IIR band-pass filter is adopted in this study. The main design parameters are as follows:&lt;br /&gt;
&lt;br /&gt;
-Type:Butterworth IIR  &lt;br /&gt;
-Order:4th order  &lt;br /&gt;
-Cutoff frequencies:20–160 Hz  &lt;br /&gt;
&lt;br /&gt;
This frequency range is selected according to the spectral characteristics of sEMG. The lower cutoff at 20 Hz helps suppress motion artifacts and unstable low-frequency noise from the electrode–skin interface, while the upper cutoff at 160 Hz removes high-frequency noise and preserves the main energy components of sEMG. The Butterworth structure provides a smooth passband response and is therefore suitable for preserving signal morphology.&lt;br /&gt;
&lt;br /&gt;
===Notch Filter Design===&lt;br /&gt;
&lt;br /&gt;
To suppress power-line interference, a 50 Hz notch filter is introduced after band-pass filtering. Since 50 Hz lies directly within the effective frequency range of sEMG, this interference must be removed to avoid distortion in subsequent analysis. The bandwidth of the notch filter is controlled by the quality factor (Q), which determines the trade-off between interference suppression and preservation of adjacent useful signal components.&lt;br /&gt;
&lt;br /&gt;
===Signal Post-processing===&lt;br /&gt;
&lt;br /&gt;
In addition to filtering, signal post-processing is necessary to reflect muscle activation intensity more clearly.&lt;br /&gt;
&lt;br /&gt;
After filtering, the sEMG signal is full-wave rectified by taking its absolute value. This converts the bipolar raw signal into a unipolar form that is more suitable for amplitude analysis.&lt;br /&gt;
&lt;br /&gt;
Following rectification, the signal envelope is extracted using a low-pass filter with a cutoff frequency of 5–10 Hz. This range corresponds to the typical variation frequency of muscle contraction. The resulting envelope provides a smooth representation of muscle activation intensity and is useful for applications such as force estimation, fatigue analysis, and motor control.&lt;br /&gt;
&lt;br /&gt;
===Real-time Implementation===&lt;br /&gt;
&lt;br /&gt;
For real-time processing, IIR filters are preferred over FIR filters because they require lower order, less computation, and shorter delay to achieve comparable filtering performance. These properties make IIR filters more suitable for embedded systems and streaming applications.&lt;br /&gt;
&lt;br /&gt;
A key issue in real-time IIR filtering is that the filter output depends not only on current and previous inputs, but also on previous outputs. Therefore, state continuity must be maintained during streaming processing. If the internal states are reinitialized for each new data segment, transient distortion will appear at the beginning of the output. In practice, the filter state can be preserved and updated continuously, for example by using the lfilter_zi mechanism provided in SciPy.&lt;br /&gt;
&lt;br /&gt;
The filtering process is implemented in a sample-by-sample streaming manner. For each incoming sample, the signal passes sequentially through the band-pass filter and the notch filter, while the internal states of both filters are updated continuously. The processing pipeline can be expressed as:&lt;br /&gt;
&lt;br /&gt;
Input → Band-pass → Notch → Output&lt;br /&gt;
&lt;br /&gt;
This strategy ensures causal, continuous, and low-latency filtering, which is essential for real-time sEMG applications.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
This section presents a real-time filtering scheme for sEMG signals based on a band-pass + notch structure. A fourth-order Butterworth IIR band-pass filter (20–160 Hz) is used to preserve the main sEMG components while suppressing motion artifacts and high-frequency noise, and a 50 Hz notch filter is applied to remove power-line interference. In addition, rectification, envelope extraction, and state-preserved streaming implementation further improve the practicality of the proposed method for real-time biomedical signal processing.&lt;br /&gt;
&lt;br /&gt;
==Data processing and analysis==&lt;br /&gt;
&lt;br /&gt;
===Data Processing===&lt;br /&gt;
&lt;br /&gt;
===Experimental Results===&lt;br /&gt;
&lt;br /&gt;
===Multi-subject Analysis===&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=442</id>
		<title>Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Surface_EMG_Sensor_for_Muscle_Activity_Measurement:_AFE_Design_and_Signal_Processing&amp;diff=442"/>
		<updated>2026-03-28T03:50:12Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: Created page with &amp;quot;==Filter== ===Introduction===  Surface electromyographic (sEMG) signals reflect the electrophysiological activity generated during skeletal muscle contraction and have been widely applied in sports medicine, rehabilitation assessment, and human–computer interaction. In practical acquisition environments, however, sEMG signals are often contaminated by various sources of noise. Power-line interference (50 Hz or 60 Hz), caused by electromagnetic coupling from power cable...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Filter==&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic (sEMG) signals reflect the electrophysiological activity generated during skeletal muscle contraction and have been widely applied in sports medicine, rehabilitation assessment, and human–computer interaction. In practical acquisition environments, however, sEMG signals are often contaminated by various sources of noise. Power-line interference (50 Hz or 60 Hz), caused by electromagnetic coupling from power cables, is one of the most common sources of interference. Motion artifacts, arising from relative displacement between the electrode and the skin, are mainly concentrated in the low-frequency band. In addition, high-frequency electronic noise may also be superimposed on the target signal. The presence of such noise severely degrades signal quality and, if not effectively suppressed, will directly affect subsequent feature extraction and parameter estimation.&lt;br /&gt;
&lt;br /&gt;
For this reason, filtering has become an indispensable step in sEMG signal analysis. Unlike offline processing, real-time application scenarios, such as prosthetic control, rehabilitation training, and human–computer interaction, impose much more stringent requirements on the filtering system. Specifically, the filter must achieve low-latency, continuous, and stable streaming processing while preserving signal fidelity. This part systematically presents a complete real-time filtering scheme for sEMG, including the design of the filtering chain, the rationale for parameter selection, and the details of engineering implementation.&lt;br /&gt;
&lt;br /&gt;
===Overall Design of the Filtering Chain===&lt;br /&gt;
&lt;br /&gt;
The proposed scheme adopts a filtering architecture whose core principle can be summarized as “band limitation first, precise filtering second.” In other words, the signal is first constrained to its effective frequency band by a band-pass filter, and then power-line interference is accurately suppressed by a notch filter. This processing order has been carefully designed. Applying the band-pass filter first can effectively reduce the signal dynamic range, thereby preventing amplifier saturation caused by high-frequency noise, while also narrowing the spectral range that must be handled by the notch filter. If the order were reversed, the full-bandwidth raw signal might overload the notch filter, and any phase distortion introduced at out-of-band frequencies would remain in the processed signal.&lt;br /&gt;
&lt;br /&gt;
A fourth-order Butterworth infinite impulse response (IIR) filter is adopted for band-pass filtering. This choice is motivated by the maximally flat magnitude response of the Butterworth filter in the passband, which minimizes the introduction of artificial signal components. In addition, its monotonic attenuation characteristic helps reduce signal distortion. The power-line notch filtering stage follows the same general design framework, with the notch bandwidth controlled by the quality factor (Q), thereby achieving a balance between interference suppression and signal fidelity.&lt;br /&gt;
&lt;br /&gt;
For sEMG, the passband is selected as 20–160 Hz, and its main energy is concentrated in the 50–150 Hz band. As a result, power-line notch filtering is especially important, because 50 Hz lies directly within the effective frequency range of sEMG. In the post-processing stage, the filtered sEMG signal requires additional rectification and envelope extraction in order to reflect variations in muscle contraction intensity.&lt;br /&gt;
&lt;br /&gt;
The constraints associated with real-time processing are considered throughout the entire design. First, the filter must satisfy causality, meaning that the current output can only depend on current and past inputs. This requirement excludes zero-phase filtering methods that rely on future samples. Second, the computational delay must remain within an acceptable range so as to satisfy the requirements of real-time feedback. Most importantly, state continuity must be maintained. Since the data arrive sequentially in a streaming manner, the filter must preserve the continuity of its internal states to avoid transient responses and signal discontinuities caused by state reinitialization.&lt;br /&gt;
&lt;br /&gt;
===sEMG Signal Filtering Chain===&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic signals originate from the superposition of action potentials generated by skeletal muscle fibers and measured on the skin surface. Their spectral characteristics are closely related to the muscle type, electrode configuration, and physiological properties of the subject. In general, the effective frequency range of sEMG extends from 10 Hz to 500 Hz, while the majority of its energy is concentrated in the 50–150 Hz band. The low-frequency components below 20 Hz mainly contain motion artifacts and unstable noise associated with the electrode–skin interface, whereas the high-frequency components above 200 Hz decay rapidly and are more susceptible to noise contamination.&lt;br /&gt;
&lt;br /&gt;
Based on these characteristics, the cutoff frequencies of the sEMG band-pass filter are set to 20 Hz and 160 Hz. The 20 Hz high-pass cutoff represents a practical compromise between motion artifact suppression and signal integrity. This choice is supported by the classical studies of De Luca and colleagues and is widely regarded as a best practice in sEMG preprocessing. The 160 Hz low-pass cutoff preserves the main energy components of sEMG while attenuating high-frequency noise. A fourth-order Butterworth filter is employed to provide a smooth frequency response and sufficiently steep attenuation.&lt;br /&gt;
&lt;br /&gt;
Power-line notch filtering is of particular importance for sEMG signals. The 50 Hz power-line component lies exactly within the core frequency band of sEMG. If not removed, it will significantly contaminate the signal and interfere with subsequent analysis. Therefore, the notch filter is designed to ensure accurate suppression of power-line interference while minimizing the phase and amplitude distortion imposed on adjacent frequency components.&lt;br /&gt;
&lt;br /&gt;
The post-processing of sEMG is also essential. Since the EMG signal is a bipolar, zero-mean stochastic process, its raw amplitude cannot directly indicate muscle contraction intensity. Therefore, after filtering, full-wave rectification is required to convert the bipolar signal into a unipolar one by taking its absolute value. This operation significantly changes the spectral distribution of the signal and highlights the low-frequency components corresponding to the envelope. Envelope extraction is then performed by low-pass filtering, with the cutoff frequency typically chosen between 5 Hz and 10 Hz, which matches the maximum frequency of muscle contraction, approximately 10 Hz. The resulting envelope provides a smooth representation of the time-varying intensity of muscle contraction and serves as the basis for muscle force estimation, fatigue analysis, and motor control.&lt;br /&gt;
&lt;br /&gt;
===Details of Real-Time Filtering Implementation===&lt;br /&gt;
&lt;br /&gt;
Real-time processing is the core constraint of the proposed scheme. It requires the filter to generate output immediately as the data arrive in a streaming manner, rather than waiting for the entire signal to be collected and then processed offline in batch mode. This requirement directly affects the choice of filter type. Compared with finite impulse response (FIR) filters, infinite impulse response (IIR) filters require a lower order, less computation, and shorter delay to achieve comparable frequency response characteristics. Therefore, they are more suitable for resource-limited embedded systems and real-time applications.&lt;br /&gt;
&lt;br /&gt;
A key challenge in implementing IIR filters is state preservation. Unlike FIR filters, which depend only on current and past input samples, the output of an IIR filter depends not only on current and previous inputs but also on previous outputs. These internal states must remain consistent throughout continuous data processing. In point-by-point processing mode, after each sample has been filtered, the internal state of the filter, including the historical input and output values stored in the delay line, must be preserved and then used as the initial state for the next incoming sample. In practice, this mechanism can be implemented using the `lfilter_zi` function in the SciPy signal processing library, which computes the initial state vector of the filter and ensures continuous state transfer between data blocks or during sample-by-sample processing.&lt;br /&gt;
&lt;br /&gt;
The importance of state preservation can be understood from several perspectives. First, it eliminates transient responses when the filter is restarted. If each new segment of data were processed from a zero initial state, the filter output would exhibit unstable oscillations at the beginning, which is unacceptable in real-time streaming applications. Second, it ensures both causality and continuity, meaning that the filter output depends strictly on current and past inputs in a physically consistent manner. Third, state preservation supports flexible processing strategies. Whether the data are handled sample by sample, in fixed-length buffers, or in variable-length blocks, the continuity of the filtering behavior can still be maintained.&lt;br /&gt;
&lt;br /&gt;
The point-by-point processing procedure constitutes the basic unit of the real-time filtering system. For each newly arriving sample, the system performs the following operations in sequence. First, the raw sample is fed into the band-pass filter, and the stored state vector is used to calculate the filtered output while updating the internal state. Second, the output of the band-pass filter is taken as the input to the notch filter, where filtering and state updating are carried out in the same manner. The final single-sample output is then obtained as the filtering result at the current time instant and can be used for display, storage, or subsequent analysis. By repeating this process at every sampling instant, a continuous streaming processing pipeline is formed.&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
This chapter has systematically presented a real-time filtering scheme for sEMG signals. Centered on Butterworth IIR filters, the proposed method establishes a two-stage processing chain consisting of band-pass filtering and power-line notch filtering. By properly selecting cutoff frequencies and filter parameters, the scheme achieves a good balance between signal fidelity and noise suppression. The real-time implementation adopts a point-by-point processing mode together with a state-preservation mechanism, thereby ensuring the continuity and causality of the streaming data.&lt;br /&gt;
&lt;br /&gt;
The main technical features of the proposed scheme can be summarized as follows. First, the filtering chain follows the principle of “band limitation first, precise filtering second,” whereby the initial band-pass filtering reduces signal dynamic range and creates favorable conditions for subsequent processing. Second, the use of Butterworth filters takes into account both frequency-response and phase-related considerations, and the maximally flat passband characteristic helps prevent the introduction of artificial signal components. Third, the IIR structure, together with state preservation, offers significant advantages in computational efficiency and real-time performance, making it particularly suitable for embedded systems and real-time applications. Finally, the proposed signal chain is adapted to the characteristics of sEMG, thereby demonstrating both practicality and flexibility in real-time biomedical signal processing.&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Main_Page&amp;diff=441</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Main_Page&amp;diff=441"/>
		<updated>2026-03-28T03:48:31Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the wiki page for the course PC5271: Physics of Sensors &amp;quot;(in AY25/26 Sem 2)!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the repository where projects are documented. You will need to create an account for editing/creating pages. If you need an account, please contact Christian.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Logistics&#039;&#039;&#039;:&lt;br /&gt;
Our &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;location is S11-02-04&amp;lt;/span&amp;gt;&#039;&#039;&#039;, time slots for &amp;quot;classes&amp;quot; are &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;Tue and Fri 10:00am-12:00noon&amp;lt;/span&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Projects==&lt;br /&gt;
&lt;br /&gt;
===[[Fluorescence Sensor for Carbon Quantum Dots: Synthesis, Characterization, and Quality Control]]===&lt;br /&gt;
&lt;br /&gt;
Group menber: Zhang yiteng, Li Xiaoyue, Peng Jianxi&lt;br /&gt;
&lt;br /&gt;
This project aims to develop a low-cost, repeatable optical sensing system to quantify the quality of Carbon Quantum Dots (CQDs). We synthesize CQDs using a microwave-assisted method with citric acid and urea, and characterize their fluorescence properties using a custom-built setup comprising a UV LED excitation source and a fiber-optic spectrometer. By analyzing spectral metrics such as peak wavelength, intensity, and FWHM, we establish a robust quality control protocol for nanomaterial production.&lt;br /&gt;
&lt;br /&gt;
===[[Inductive Sensors of Ultra-high Sensitivity Based on Nonlinear Exceptional Point]]===&lt;br /&gt;
Team members: Yuan Siyu; Zhu Ziyang; Wang Peikun; Li Xunyu&lt;br /&gt;
&lt;br /&gt;
We are building two coupled oscillating circuits: one that naturally loses energy (lossy) and one that gains energy (active) using a specific amplifier that saturates at high amplitudes. When tuning these two circuits to a nonlinear Exceptional Point (NEP), the system becomes extremely sensitive to small perturbations in inductance, following a steep cubic-root response curve, while remaining resistant to noise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CK:&#039;&#039;&#039; We likely have all the parts for this, but let us know the frequency so we can find the proper amplifier and circuit board.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SY:&#039;&#039;&#039; Thanks for your confirmation. The operating frequency is around 70-80 kHz.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CK:&#039;&#039;&#039; Have!&lt;br /&gt;
&lt;br /&gt;
===[[EA Spectroscopy as a series of sensors: Investigating the Impact of Film-Processing Temperature on Mobility in Organic Diodes]]===&lt;br /&gt;
Team members: Li Jinhan; Liu Chenyang&lt;br /&gt;
&lt;br /&gt;
We will use EA spectroscopy, which will include optical sensors, electrical sensors, and lock-in amplifiers, among other components as a highly sensitive, non-destructive optical sensing platform to measure the internal electric field modulation response of organic diodes under operating conditions, and to quantitatively extract carrier mobility based on this measurement. By systematically controlling the thin film preparation temperature and comparing the EA response characteristics of different samples, the project aims to reveal the influence of film preparation temperature on device mobility and its potential physical origins.&lt;br /&gt;
&lt;br /&gt;
===[[Optical Sensor of Magnetic Dynamics: A Balanced-Detection MOKE Magnetometer]]===&lt;br /&gt;
Team members: LI Junxiang; Patricia Breanne Tan Sy&lt;br /&gt;
&lt;br /&gt;
We will use a laser-based magneto-optical Kerr effect setup featuring a high-sensitivity differential photodiode array to measure the Kerr rotation angle induced by surface magnetism. This system serves as a versatile optical platform to investigate how external perturbations such as magnetic fields or radiation source alter the magnetic ordering of materials, allowing for the quantitative extraction of the magneto-optical coupling coefficients of various thin films.&lt;br /&gt;
&lt;br /&gt;
===[[Precision Measurement of Material and Optical Properties Using Interferometry]]===&lt;br /&gt;
Team members: Yang SangUk; Zhang ShunYang; Xu Zifang&lt;br /&gt;
&lt;br /&gt;
We will be constructing an interferometer and use it as a tool for precision measurement. One primary objective is determination of the refractive index of solution of different salt concentration by analyzing the resulting shift interference fringes.&lt;br /&gt;
&lt;br /&gt;
===[[Precision Thermocouple Based Temperature Measurement System]]===&lt;br /&gt;
Team members: Sree Ranjani Krishnan; Nisha Ganesh ; Burra Srikari&lt;br /&gt;
&lt;br /&gt;
We will design, build, and validate a precision thermocouple-based temperature measurement system using the Seebeck effect. The system will convert the extremely small thermoelectric voltage generated by a thermocouple into accurate, real-time temperature data. Since the output voltage is really small we will be using an instrumentation amplifier to amplify the output voltage and use an Arduino to digitalize the results.&lt;br /&gt;
Materials needed: K-type thermocouple/Thermophile;Arduino&lt;br /&gt;
&lt;br /&gt;
===[[Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing]]===&lt;br /&gt;
Team members: Liu Chenxi; Wang Jingyi; Zhong Baoqi; Hong Jialuo; Zhang Lishang;&lt;br /&gt;
&lt;br /&gt;
Electromyography (EMG) measures the electrical activity generated by skeletal muscles and is widely used in biomedical sensing, rehabilitation, and human–machine interfaces. The electrical signals produced by muscle fibers are typically in the microvolt to millivolt range and are easily corrupted by noise and motion artifacts, making proper signal conditioning essential. In this project, we design and implement an analog front-end (AFE) for surface EMG acquisition, including an instrumentation amplifier, band-pass filtering, and a 50 Hz notch filter to suppress power-line interference. The conditioned signal is then observed and recorded using an oscilloscope for further analysis of muscle activity in both the time and frequency domains.&lt;br /&gt;
&lt;br /&gt;
===[[Humidity  Detector Based on Quartz Crystal Oscillator]]===&lt;br /&gt;
&lt;br /&gt;
Group menber: Ma Xiangyi; Li Xukuan; Zhang Yixuan; Zhu Rongqi&lt;br /&gt;
&lt;br /&gt;
This project aims to develop a humidity sensor based on a quartz crystal oscillator. The group will first construct the oscillator circuit on a breadboard. They will then fabricate the sensing device by depositing water-absorbing materials onto the quartz crystal. Humidity detection will be achieved by measuring the frequency change of the circuit caused by the mass variation on the crystal surface.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;To Prof.&#039;&#039;&#039;   Several materials are available for use as the water-absorbing layer, such as PVA, polyimide, graphene oxide, and silica gel. We are currently unsure which material would be the most suitable for our device. Could you provide us with some suggestions?&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
===Books and links===&lt;br /&gt;
* A good textbook on the Physics of Sensors is Jacob Fraden: Handbook of Mondern Sensors, Springer, ISBN 978-3-319-19302-1 or [https://link.springer.com/book/10.1007/978-3-319-19303-8 doi:10.1007/978-3-319-19303-8]. There shoud be an e-book available through the NUS library at https://linc.nus.edu.sg/record=b3554643&lt;br /&gt;
* Another good textbook: John B.Bentley: Principles of Measurement Systems, 4th Edition, Pearson, ISBN: 0-13-043028-5 or https://linc.nus.edu.sg/record=b2458243 in our library.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
* Various Python extensions. [https://www.python.org Python] is a very powerful free programming language that runs on just about any computer platform. It is open source and completely free.&lt;br /&gt;
* [https://www.gnuplot.info Gnuplot]: A free and very mature data display tool that works on just about any platform used that produces excellent publication-grade eps and pdf figures. Can be also used in scripts. Open source and completely free.&lt;br /&gt;
* Matlab: Very common, good toolset also for formal mathematics, good graphics. Expensive. We may have a site license, but I am not sure how painful it is for us to get a license for this course. Ask if interested.&lt;br /&gt;
* Mathematica: More common among theroetical physicists, very good in formal maths, now with better numerics. Graphs are ok but can be a pain to make looking good. As with Matlab, we do have a campus license. Ask if interested.&lt;br /&gt;
&lt;br /&gt;
===Apps===&lt;br /&gt;
Common mobile phones these days are equipped with an amazing toolchest of sensors. There are a few apps that allow you to access them directly, and turn your phone into a powerful sensor. Here some suggestions:&lt;br /&gt;
&lt;br /&gt;
* Physics Toolbox sensor suite on [https://play.google.com/store/apps/details?id=com.chrystianvieyra.physicstoolboxsuite&amp;amp;hl=en_SG Google play store] or [https://apps.apple.com/us/app/physics-toolbox-sensor-suite/id1128914250 Apple App store].&lt;br /&gt;
&lt;br /&gt;
===Data sheets===&lt;br /&gt;
A number of components might be useful for several groups. Some common data sheets are here:&lt;br /&gt;
* Photodiodes:&lt;br /&gt;
** Generic Silicon pin Photodiode type [[Media:Bpw34.pdf|BPW34]]&lt;br /&gt;
** Fast photodiodes (Silicon PIN, small area): [[Media:S5971_etc_kpin1025e.pdf|S5971/S5972/S5973]]&lt;br /&gt;
* Photogates:&lt;br /&gt;
** reflective, with mounting holes: [[Media:TTElectronics-OPB704WZ.pdf|OPB704.WZ]]&lt;br /&gt;
** transmissive, no mounting holes: [[Media:Vishay_TCST1103.pdf|TCST1103]]&lt;br /&gt;
* PT 100 Temperature sensors based on platinum wire: [[Media:PT100_TABLA_R_T.pdf|Calibration table]]&lt;br /&gt;
* Thermistor type [[Media:Thermistor B57861S.pdf|B57861S]] (R0=10k&amp;amp;Omega;, B=3988Kelvin). Search for   [https://en.wikipedia.org/wiki/Steinhart-Hart_equation Steinhart-Hart equation]. See [[Thermistor]] page here as well.&lt;br /&gt;
* Humidity sensor&lt;br /&gt;
** Sensirion device the reference unit: [[media:Sensirion SHT30-DIS.pdf|SHT30/31]]&lt;br /&gt;
* Thermopile detectors:&lt;br /&gt;
** [[Media:Thermopile_G-TPCO-035 TS418-1N426.pdf|G-TPCO-035 / TS418-1N426]]: Thermopile detector with a built-in optical bandpass filter for light around 4&amp;amp;mu;m wavelength for CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; absorption&lt;br /&gt;
** [[Media:Thermopile_TS305_TCPO-033.pdf|TPCO-033 / TS305]]: Thermopile detector with wideband sensitivity 5um-25um&lt;br /&gt;
** [[Media:Thermopile_G-TPCO-019_TS105-10L5.5MM.pdf|G-TPCO-019 /TS105-10L5.5MM]]: Thermopile detector with wideband sensitivity 5um-25um and silicon lens (field of view: 10 degree)&lt;br /&gt;
* Resistor color codes are explained [https://en.wikipedia.org/wiki/Electronic_color_code here]&lt;br /&gt;
&amp;lt;!-- * Ultrasonic detectors:&lt;br /&gt;
** plastic detctor, 40 kHz, -74dB: [[Media:MCUSD16P40B12RO.pdf|MCUSD16P40B12RO]]&lt;br /&gt;
** metal casing/waterproof, 48 kHz, -90dB, [[Media:MCUSD14A48S09RS-30C.pdf|MCUSD14A48S09RS-30C]]&lt;br /&gt;
** metal casing, 40 kHz, sensitivity unknown, [[Media:MCUST16A40S12RO.pdf|MCUST16A40S12RO]]&lt;br /&gt;
** metal casing/waterproof, 300kHz, may need high voltage: [[Media:MCUSD13A300B09RS.pdf|MCUSD13A300B09RS]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* Magnetic field sensors:&lt;br /&gt;
** Fluxgate magnetometer [[media:Data-sheet FLC-100.pdf|FCL100]]&lt;br /&gt;
** Hall switch 1 (SOT-23 casing): [[media:INFineon_TLE49681KXTSA1.pdf|TLE49681]]&lt;br /&gt;
** Hall switch 2 (TO-92 casing): [[media:DiodesInc_AH9246-P-8.pdf|AH9246]]&lt;br /&gt;
** Linear Hall sensor (to come)&lt;br /&gt;
* Lasers&lt;br /&gt;
** Red laser diode [[media:HL6501MG.pdf|HL6501MG]]&lt;br /&gt;
* Generic amplifiers&lt;br /&gt;
** Instrumentation amplifiers: [[media:Ad8221.pdf|AD8221]] or [[media:AD8226.pdf|AD8226]]&lt;br /&gt;
** Conventional operational amplifiers: Precision: [[media:OP27.pdf | OP27]], General purpose: [[media:OP07.pdf | OP07]]&lt;br /&gt;
** JFET op-amp, reasonably fast: [https://www.ti.com/document-viewer/tl071/datasheet TL071]&lt;br /&gt;
** Transimpedance amplifiers for photodetectors: [[media:AD8015.pdf | AD8015]]&lt;br /&gt;
&lt;br /&gt;
==Some wiki reference materials==&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [[Writing mathematical expressions]]&lt;br /&gt;
* [[Uploading images and files]]&lt;br /&gt;
&lt;br /&gt;
==Old wikis==&lt;br /&gt;
You can find entries to the wiki from [https://pc5271.org/PC5271_AY2425S2 AY2024/25 Sem 2] and [https://pc5271.org/PC5271_AY2324S2 AY2023/24 Sem 2].&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Main_Page&amp;diff=440</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Main_Page&amp;diff=440"/>
		<updated>2026-03-28T03:47:55Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Filter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the wiki page for the course PC5271: Physics of Sensors &amp;quot;(in AY25/26 Sem 2)!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the repository where projects are documented. You will need to create an account for editing/creating pages. If you need an account, please contact Christian.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Logistics&#039;&#039;&#039;:&lt;br /&gt;
Our &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;location is S11-02-04&amp;lt;/span&amp;gt;&#039;&#039;&#039;, time slots for &amp;quot;classes&amp;quot; are &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;Tue and Fri 10:00am-12:00noon&amp;lt;/span&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Projects==&lt;br /&gt;
&lt;br /&gt;
===[[Fluorescence Sensor for Carbon Quantum Dots: Synthesis, Characterization, and Quality Control]]===&lt;br /&gt;
&lt;br /&gt;
Group menber: Zhang yiteng, Li Xiaoyue, Peng Jianxi&lt;br /&gt;
&lt;br /&gt;
This project aims to develop a low-cost, repeatable optical sensing system to quantify the quality of Carbon Quantum Dots (CQDs). We synthesize CQDs using a microwave-assisted method with citric acid and urea, and characterize their fluorescence properties using a custom-built setup comprising a UV LED excitation source and a fiber-optic spectrometer. By analyzing spectral metrics such as peak wavelength, intensity, and FWHM, we establish a robust quality control protocol for nanomaterial production.&lt;br /&gt;
&lt;br /&gt;
===[[Inductive Sensors of Ultra-high Sensitivity Based on Nonlinear Exceptional Point]]===&lt;br /&gt;
Team members: Yuan Siyu; Zhu Ziyang; Wang Peikun; Li Xunyu&lt;br /&gt;
&lt;br /&gt;
We are building two coupled oscillating circuits: one that naturally loses energy (lossy) and one that gains energy (active) using a specific amplifier that saturates at high amplitudes. When tuning these two circuits to a nonlinear Exceptional Point (NEP), the system becomes extremely sensitive to small perturbations in inductance, following a steep cubic-root response curve, while remaining resistant to noise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CK:&#039;&#039;&#039; We likely have all the parts for this, but let us know the frequency so we can find the proper amplifier and circuit board.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SY:&#039;&#039;&#039; Thanks for your confirmation. The operating frequency is around 70-80 kHz.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CK:&#039;&#039;&#039; Have!&lt;br /&gt;
&lt;br /&gt;
===[[EA Spectroscopy as a series of sensors: Investigating the Impact of Film-Processing Temperature on Mobility in Organic Diodes]]===&lt;br /&gt;
Team members: Li Jinhan; Liu Chenyang&lt;br /&gt;
&lt;br /&gt;
We will use EA spectroscopy, which will include optical sensors, electrical sensors, and lock-in amplifiers, among other components as a highly sensitive, non-destructive optical sensing platform to measure the internal electric field modulation response of organic diodes under operating conditions, and to quantitatively extract carrier mobility based on this measurement. By systematically controlling the thin film preparation temperature and comparing the EA response characteristics of different samples, the project aims to reveal the influence of film preparation temperature on device mobility and its potential physical origins.&lt;br /&gt;
&lt;br /&gt;
===[[Optical Sensor of Magnetic Dynamics: A Balanced-Detection MOKE Magnetometer]]===&lt;br /&gt;
Team members: LI Junxiang; Patricia Breanne Tan Sy&lt;br /&gt;
&lt;br /&gt;
We will use a laser-based magneto-optical Kerr effect setup featuring a high-sensitivity differential photodiode array to measure the Kerr rotation angle induced by surface magnetism. This system serves as a versatile optical platform to investigate how external perturbations such as magnetic fields or radiation source alter the magnetic ordering of materials, allowing for the quantitative extraction of the magneto-optical coupling coefficients of various thin films.&lt;br /&gt;
&lt;br /&gt;
===[[Precision Measurement of Material and Optical Properties Using Interferometry]]===&lt;br /&gt;
Team members: Yang SangUk; Zhang ShunYang; Xu Zifang&lt;br /&gt;
&lt;br /&gt;
We will be constructing an interferometer and use it as a tool for precision measurement. One primary objective is determination of the refractive index of solution of different salt concentration by analyzing the resulting shift interference fringes.&lt;br /&gt;
&lt;br /&gt;
===[[Precision Thermocouple Based Temperature Measurement System]]===&lt;br /&gt;
Team members: Sree Ranjani Krishnan; Nisha Ganesh ; Burra Srikari&lt;br /&gt;
&lt;br /&gt;
We will design, build, and validate a precision thermocouple-based temperature measurement system using the Seebeck effect. The system will convert the extremely small thermoelectric voltage generated by a thermocouple into accurate, real-time temperature data. Since the output voltage is really small we will be using an instrumentation amplifier to amplify the output voltage and use an Arduino to digitalize the results.&lt;br /&gt;
Materials needed: K-type thermocouple/Thermophile;Arduino&lt;br /&gt;
&lt;br /&gt;
=[[Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing]]=&lt;br /&gt;
Team members: Liu Chenxi; Wang Jingyi; Zhong Baoqi; Hong Jialuo; Zhang Lishang;&lt;br /&gt;
&lt;br /&gt;
Electromyography (EMG) measures the electrical activity generated by skeletal muscles and is widely used in biomedical sensing, rehabilitation, and human–machine interfaces. The electrical signals produced by muscle fibers are typically in the microvolt to millivolt range and are easily corrupted by noise and motion artifacts, making proper signal conditioning essential. In this project, we design and implement an analog front-end (AFE) for surface EMG acquisition, including an instrumentation amplifier, band-pass filtering, and a 50 Hz notch filter to suppress power-line interference. The conditioned signal is then observed and recorded using an oscilloscope for further analysis of muscle activity in both the time and frequency domains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Humidity  Detector Based on Quartz Crystal Oscillator]]===&lt;br /&gt;
&lt;br /&gt;
Group menber: Ma Xiangyi; Li Xukuan; Zhang Yixuan; Zhu Rongqi&lt;br /&gt;
&lt;br /&gt;
This project aims to develop a humidity sensor based on a quartz crystal oscillator. The group will first construct the oscillator circuit on a breadboard. They will then fabricate the sensing device by depositing water-absorbing materials onto the quartz crystal. Humidity detection will be achieved by measuring the frequency change of the circuit caused by the mass variation on the crystal surface.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;To Prof.&#039;&#039;&#039;   Several materials are available for use as the water-absorbing layer, such as PVA, polyimide, graphene oxide, and silica gel. We are currently unsure which material would be the most suitable for our device. Could you provide us with some suggestions?&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
===Books and links===&lt;br /&gt;
* A good textbook on the Physics of Sensors is Jacob Fraden: Handbook of Mondern Sensors, Springer, ISBN 978-3-319-19302-1 or [https://link.springer.com/book/10.1007/978-3-319-19303-8 doi:10.1007/978-3-319-19303-8]. There shoud be an e-book available through the NUS library at https://linc.nus.edu.sg/record=b3554643&lt;br /&gt;
* Another good textbook: John B.Bentley: Principles of Measurement Systems, 4th Edition, Pearson, ISBN: 0-13-043028-5 or https://linc.nus.edu.sg/record=b2458243 in our library.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
* Various Python extensions. [https://www.python.org Python] is a very powerful free programming language that runs on just about any computer platform. It is open source and completely free.&lt;br /&gt;
* [https://www.gnuplot.info Gnuplot]: A free and very mature data display tool that works on just about any platform used that produces excellent publication-grade eps and pdf figures. Can be also used in scripts. Open source and completely free.&lt;br /&gt;
* Matlab: Very common, good toolset also for formal mathematics, good graphics. Expensive. We may have a site license, but I am not sure how painful it is for us to get a license for this course. Ask if interested.&lt;br /&gt;
* Mathematica: More common among theroetical physicists, very good in formal maths, now with better numerics. Graphs are ok but can be a pain to make looking good. As with Matlab, we do have a campus license. Ask if interested.&lt;br /&gt;
&lt;br /&gt;
===Apps===&lt;br /&gt;
Common mobile phones these days are equipped with an amazing toolchest of sensors. There are a few apps that allow you to access them directly, and turn your phone into a powerful sensor. Here some suggestions:&lt;br /&gt;
&lt;br /&gt;
* Physics Toolbox sensor suite on [https://play.google.com/store/apps/details?id=com.chrystianvieyra.physicstoolboxsuite&amp;amp;hl=en_SG Google play store] or [https://apps.apple.com/us/app/physics-toolbox-sensor-suite/id1128914250 Apple App store].&lt;br /&gt;
&lt;br /&gt;
===Data sheets===&lt;br /&gt;
A number of components might be useful for several groups. Some common data sheets are here:&lt;br /&gt;
* Photodiodes:&lt;br /&gt;
** Generic Silicon pin Photodiode type [[Media:Bpw34.pdf|BPW34]]&lt;br /&gt;
** Fast photodiodes (Silicon PIN, small area): [[Media:S5971_etc_kpin1025e.pdf|S5971/S5972/S5973]]&lt;br /&gt;
* Photogates:&lt;br /&gt;
** reflective, with mounting holes: [[Media:TTElectronics-OPB704WZ.pdf|OPB704.WZ]]&lt;br /&gt;
** transmissive, no mounting holes: [[Media:Vishay_TCST1103.pdf|TCST1103]]&lt;br /&gt;
* PT 100 Temperature sensors based on platinum wire: [[Media:PT100_TABLA_R_T.pdf|Calibration table]]&lt;br /&gt;
* Thermistor type [[Media:Thermistor B57861S.pdf|B57861S]] (R0=10k&amp;amp;Omega;, B=3988Kelvin). Search for   [https://en.wikipedia.org/wiki/Steinhart-Hart_equation Steinhart-Hart equation]. See [[Thermistor]] page here as well.&lt;br /&gt;
* Humidity sensor&lt;br /&gt;
** Sensirion device the reference unit: [[media:Sensirion SHT30-DIS.pdf|SHT30/31]]&lt;br /&gt;
* Thermopile detectors:&lt;br /&gt;
** [[Media:Thermopile_G-TPCO-035 TS418-1N426.pdf|G-TPCO-035 / TS418-1N426]]: Thermopile detector with a built-in optical bandpass filter for light around 4&amp;amp;mu;m wavelength for CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; absorption&lt;br /&gt;
** [[Media:Thermopile_TS305_TCPO-033.pdf|TPCO-033 / TS305]]: Thermopile detector with wideband sensitivity 5um-25um&lt;br /&gt;
** [[Media:Thermopile_G-TPCO-019_TS105-10L5.5MM.pdf|G-TPCO-019 /TS105-10L5.5MM]]: Thermopile detector with wideband sensitivity 5um-25um and silicon lens (field of view: 10 degree)&lt;br /&gt;
* Resistor color codes are explained [https://en.wikipedia.org/wiki/Electronic_color_code here]&lt;br /&gt;
&amp;lt;!-- * Ultrasonic detectors:&lt;br /&gt;
** plastic detctor, 40 kHz, -74dB: [[Media:MCUSD16P40B12RO.pdf|MCUSD16P40B12RO]]&lt;br /&gt;
** metal casing/waterproof, 48 kHz, -90dB, [[Media:MCUSD14A48S09RS-30C.pdf|MCUSD14A48S09RS-30C]]&lt;br /&gt;
** metal casing, 40 kHz, sensitivity unknown, [[Media:MCUST16A40S12RO.pdf|MCUST16A40S12RO]]&lt;br /&gt;
** metal casing/waterproof, 300kHz, may need high voltage: [[Media:MCUSD13A300B09RS.pdf|MCUSD13A300B09RS]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* Magnetic field sensors:&lt;br /&gt;
** Fluxgate magnetometer [[media:Data-sheet FLC-100.pdf|FCL100]]&lt;br /&gt;
** Hall switch 1 (SOT-23 casing): [[media:INFineon_TLE49681KXTSA1.pdf|TLE49681]]&lt;br /&gt;
** Hall switch 2 (TO-92 casing): [[media:DiodesInc_AH9246-P-8.pdf|AH9246]]&lt;br /&gt;
** Linear Hall sensor (to come)&lt;br /&gt;
* Lasers&lt;br /&gt;
** Red laser diode [[media:HL6501MG.pdf|HL6501MG]]&lt;br /&gt;
* Generic amplifiers&lt;br /&gt;
** Instrumentation amplifiers: [[media:Ad8221.pdf|AD8221]] or [[media:AD8226.pdf|AD8226]]&lt;br /&gt;
** Conventional operational amplifiers: Precision: [[media:OP27.pdf | OP27]], General purpose: [[media:OP07.pdf | OP07]]&lt;br /&gt;
** JFET op-amp, reasonably fast: [https://www.ti.com/document-viewer/tl071/datasheet TL071]&lt;br /&gt;
** Transimpedance amplifiers for photodetectors: [[media:AD8015.pdf | AD8015]]&lt;br /&gt;
&lt;br /&gt;
==Some wiki reference materials==&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [[Writing mathematical expressions]]&lt;br /&gt;
* [[Uploading images and files]]&lt;br /&gt;
&lt;br /&gt;
==Old wikis==&lt;br /&gt;
You can find entries to the wiki from [https://pc5271.org/PC5271_AY2425S2 AY2024/25 Sem 2] and [https://pc5271.org/PC5271_AY2324S2 AY2023/24 Sem 2].&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
	<entry>
		<id>https://pc5271.org/index.php?title=Main_Page&amp;diff=439</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://pc5271.org/index.php?title=Main_Page&amp;diff=439"/>
		<updated>2026-03-28T03:46:11Z</updated>

		<summary type="html">&lt;p&gt;Jialuo: /* Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the wiki page for the course PC5271: Physics of Sensors &amp;quot;(in AY25/26 Sem 2)!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the repository where projects are documented. You will need to create an account for editing/creating pages. If you need an account, please contact Christian.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Logistics&#039;&#039;&#039;:&lt;br /&gt;
Our &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;location is S11-02-04&amp;lt;/span&amp;gt;&#039;&#039;&#039;, time slots for &amp;quot;classes&amp;quot; are &#039;&#039;&#039;&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;Tue and Fri 10:00am-12:00noon&amp;lt;/span&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Projects==&lt;br /&gt;
&lt;br /&gt;
===[[Fluorescence Sensor for Carbon Quantum Dots: Synthesis, Characterization, and Quality Control]]===&lt;br /&gt;
&lt;br /&gt;
Group menber: Zhang yiteng, Li Xiaoyue, Peng Jianxi&lt;br /&gt;
&lt;br /&gt;
This project aims to develop a low-cost, repeatable optical sensing system to quantify the quality of Carbon Quantum Dots (CQDs). We synthesize CQDs using a microwave-assisted method with citric acid and urea, and characterize their fluorescence properties using a custom-built setup comprising a UV LED excitation source and a fiber-optic spectrometer. By analyzing spectral metrics such as peak wavelength, intensity, and FWHM, we establish a robust quality control protocol for nanomaterial production.&lt;br /&gt;
&lt;br /&gt;
===[[Inductive Sensors of Ultra-high Sensitivity Based on Nonlinear Exceptional Point]]===&lt;br /&gt;
Team members: Yuan Siyu; Zhu Ziyang; Wang Peikun; Li Xunyu&lt;br /&gt;
&lt;br /&gt;
We are building two coupled oscillating circuits: one that naturally loses energy (lossy) and one that gains energy (active) using a specific amplifier that saturates at high amplitudes. When tuning these two circuits to a nonlinear Exceptional Point (NEP), the system becomes extremely sensitive to small perturbations in inductance, following a steep cubic-root response curve, while remaining resistant to noise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CK:&#039;&#039;&#039; We likely have all the parts for this, but let us know the frequency so we can find the proper amplifier and circuit board.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SY:&#039;&#039;&#039; Thanks for your confirmation. The operating frequency is around 70-80 kHz.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CK:&#039;&#039;&#039; Have!&lt;br /&gt;
&lt;br /&gt;
===[[EA Spectroscopy as a series of sensors: Investigating the Impact of Film-Processing Temperature on Mobility in Organic Diodes]]===&lt;br /&gt;
Team members: Li Jinhan; Liu Chenyang&lt;br /&gt;
&lt;br /&gt;
We will use EA spectroscopy, which will include optical sensors, electrical sensors, and lock-in amplifiers, among other components as a highly sensitive, non-destructive optical sensing platform to measure the internal electric field modulation response of organic diodes under operating conditions, and to quantitatively extract carrier mobility based on this measurement. By systematically controlling the thin film preparation temperature and comparing the EA response characteristics of different samples, the project aims to reveal the influence of film preparation temperature on device mobility and its potential physical origins.&lt;br /&gt;
&lt;br /&gt;
===[[Optical Sensor of Magnetic Dynamics: A Balanced-Detection MOKE Magnetometer]]===&lt;br /&gt;
Team members: LI Junxiang; Patricia Breanne Tan Sy&lt;br /&gt;
&lt;br /&gt;
We will use a laser-based magneto-optical Kerr effect setup featuring a high-sensitivity differential photodiode array to measure the Kerr rotation angle induced by surface magnetism. This system serves as a versatile optical platform to investigate how external perturbations such as magnetic fields or radiation source alter the magnetic ordering of materials, allowing for the quantitative extraction of the magneto-optical coupling coefficients of various thin films.&lt;br /&gt;
&lt;br /&gt;
===[[Precision Measurement of Material and Optical Properties Using Interferometry]]===&lt;br /&gt;
Team members: Yang SangUk; Zhang ShunYang; Xu Zifang&lt;br /&gt;
&lt;br /&gt;
We will be constructing an interferometer and use it as a tool for precision measurement. One primary objective is determination of the refractive index of solution of different salt concentration by analyzing the resulting shift interference fringes.&lt;br /&gt;
&lt;br /&gt;
===[[Precision Thermocouple Based Temperature Measurement System]]===&lt;br /&gt;
Team members: Sree Ranjani Krishnan; Nisha Ganesh ; Burra Srikari&lt;br /&gt;
&lt;br /&gt;
We will design, build, and validate a precision thermocouple-based temperature measurement system using the Seebeck effect. The system will convert the extremely small thermoelectric voltage generated by a thermocouple into accurate, real-time temperature data. Since the output voltage is really small we will be using an instrumentation amplifier to amplify the output voltage and use an Arduino to digitalize the results.&lt;br /&gt;
Materials needed: K-type thermocouple/Thermophile;Arduino&lt;br /&gt;
&lt;br /&gt;
=[[Surface EMG Sensor for Muscle Activity Measurement: AFE Design and Signal Processing]]=&lt;br /&gt;
Team members: Liu Chenxi; Wang Jingyi; Zhong Baoqi; Hong Jialuo; Zhang Lishang;&lt;br /&gt;
&lt;br /&gt;
Electromyography (EMG) measures the electrical activity generated by skeletal muscles and is widely used in biomedical sensing, rehabilitation, and human–machine interfaces. The electrical signals produced by muscle fibers are typically in the microvolt to millivolt range and are easily corrupted by noise and motion artifacts, making proper signal conditioning essential. In this project, we design and implement an analog front-end (AFE) for surface EMG acquisition, including an instrumentation amplifier, band-pass filtering, and a 50 Hz notch filter to suppress power-line interference. The conditioned signal is then observed and recorded using an oscilloscope for further analysis of muscle activity in both the time and frequency domains.&lt;br /&gt;
&lt;br /&gt;
==Filter==&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic (sEMG) signals reflect the electrophysiological activity generated during skeletal muscle contraction and have been widely applied in sports medicine, rehabilitation assessment, and human–computer interaction. In practical acquisition environments, however, sEMG signals are often contaminated by various sources of noise. Power-line interference (50 Hz or 60 Hz), caused by electromagnetic coupling from power cables, is one of the most common sources of interference. Motion artifacts, arising from relative displacement between the electrode and the skin, are mainly concentrated in the low-frequency band. In addition, high-frequency electronic noise may also be superimposed on the target signal. The presence of such noise severely degrades signal quality and, if not effectively suppressed, will directly affect subsequent feature extraction and parameter estimation.&lt;br /&gt;
&lt;br /&gt;
For this reason, filtering has become an indispensable step in sEMG signal analysis. Unlike offline processing, real-time application scenarios, such as prosthetic control, rehabilitation training, and human–computer interaction, impose much more stringent requirements on the filtering system. Specifically, the filter must achieve low-latency, continuous, and stable streaming processing while preserving signal fidelity. This part systematically presents a complete real-time filtering scheme for sEMG, including the design of the filtering chain, the rationale for parameter selection, and the details of engineering implementation.&lt;br /&gt;
&lt;br /&gt;
===Overall Design of the Filtering Chain===&lt;br /&gt;
&lt;br /&gt;
The proposed scheme adopts a filtering architecture whose core principle can be summarized as “band limitation first, precise filtering second.” In other words, the signal is first constrained to its effective frequency band by a band-pass filter, and then power-line interference is accurately suppressed by a notch filter. This processing order has been carefully designed. Applying the band-pass filter first can effectively reduce the signal dynamic range, thereby preventing amplifier saturation caused by high-frequency noise, while also narrowing the spectral range that must be handled by the notch filter. If the order were reversed, the full-bandwidth raw signal might overload the notch filter, and any phase distortion introduced at out-of-band frequencies would remain in the processed signal.&lt;br /&gt;
&lt;br /&gt;
A fourth-order Butterworth infinite impulse response (IIR) filter is adopted for band-pass filtering. This choice is motivated by the maximally flat magnitude response of the Butterworth filter in the passband, which minimizes the introduction of artificial signal components. In addition, its monotonic attenuation characteristic helps reduce signal distortion. The power-line notch filtering stage follows the same general design framework, with the notch bandwidth controlled by the quality factor (Q), thereby achieving a balance between interference suppression and signal fidelity.&lt;br /&gt;
&lt;br /&gt;
For sEMG, the passband is selected as 20–160 Hz, and its main energy is concentrated in the 50–150 Hz band. As a result, power-line notch filtering is especially important, because 50 Hz lies directly within the effective frequency range of sEMG. In the post-processing stage, the filtered sEMG signal requires additional rectification and envelope extraction in order to reflect variations in muscle contraction intensity.&lt;br /&gt;
&lt;br /&gt;
The constraints associated with real-time processing are considered throughout the entire design. First, the filter must satisfy causality, meaning that the current output can only depend on current and past inputs. This requirement excludes zero-phase filtering methods that rely on future samples. Second, the computational delay must remain within an acceptable range so as to satisfy the requirements of real-time feedback. Most importantly, state continuity must be maintained. Since the data arrive sequentially in a streaming manner, the filter must preserve the continuity of its internal states to avoid transient responses and signal discontinuities caused by state reinitialization.&lt;br /&gt;
&lt;br /&gt;
===sEMG Signal Filtering Chain===&lt;br /&gt;
&lt;br /&gt;
Surface electromyographic signals originate from the superposition of action potentials generated by skeletal muscle fibers and measured on the skin surface. Their spectral characteristics are closely related to the muscle type, electrode configuration, and physiological properties of the subject. In general, the effective frequency range of sEMG extends from 10 Hz to 500 Hz, while the majority of its energy is concentrated in the 50–150 Hz band. The low-frequency components below 20 Hz mainly contain motion artifacts and unstable noise associated with the electrode–skin interface, whereas the high-frequency components above 200 Hz decay rapidly and are more susceptible to noise contamination.&lt;br /&gt;
&lt;br /&gt;
Based on these characteristics, the cutoff frequencies of the sEMG band-pass filter are set to 20 Hz and 160 Hz. The 20 Hz high-pass cutoff represents a practical compromise between motion artifact suppression and signal integrity. This choice is supported by the classical studies of De Luca and colleagues and is widely regarded as a best practice in sEMG preprocessing. The 160 Hz low-pass cutoff preserves the main energy components of sEMG while attenuating high-frequency noise. A fourth-order Butterworth filter is employed to provide a smooth frequency response and sufficiently steep attenuation.&lt;br /&gt;
&lt;br /&gt;
Power-line notch filtering is of particular importance for sEMG signals. The 50 Hz power-line component lies exactly within the core frequency band of sEMG. If not removed, it will significantly contaminate the signal and interfere with subsequent analysis. Therefore, the notch filter is designed to ensure accurate suppression of power-line interference while minimizing the phase and amplitude distortion imposed on adjacent frequency components.&lt;br /&gt;
&lt;br /&gt;
The post-processing of sEMG is also essential. Since the EMG signal is a bipolar, zero-mean stochastic process, its raw amplitude cannot directly indicate muscle contraction intensity. Therefore, after filtering, full-wave rectification is required to convert the bipolar signal into a unipolar one by taking its absolute value. This operation significantly changes the spectral distribution of the signal and highlights the low-frequency components corresponding to the envelope. Envelope extraction is then performed by low-pass filtering, with the cutoff frequency typically chosen between 5 Hz and 10 Hz, which matches the maximum frequency of muscle contraction, approximately 10 Hz. The resulting envelope provides a smooth representation of the time-varying intensity of muscle contraction and serves as the basis for muscle force estimation, fatigue analysis, and motor control.&lt;br /&gt;
&lt;br /&gt;
===Details of Real-Time Filtering Implementation===&lt;br /&gt;
&lt;br /&gt;
Real-time processing is the core constraint of the proposed scheme. It requires the filter to generate output immediately as the data arrive in a streaming manner, rather than waiting for the entire signal to be collected and then processed offline in batch mode. This requirement directly affects the choice of filter type. Compared with finite impulse response (FIR) filters, infinite impulse response (IIR) filters require a lower order, less computation, and shorter delay to achieve comparable frequency response characteristics. Therefore, they are more suitable for resource-limited embedded systems and real-time applications.&lt;br /&gt;
&lt;br /&gt;
A key challenge in implementing IIR filters is state preservation. Unlike FIR filters, which depend only on current and past input samples, the output of an IIR filter depends not only on current and previous inputs but also on previous outputs. These internal states must remain consistent throughout continuous data processing. In point-by-point processing mode, after each sample has been filtered, the internal state of the filter, including the historical input and output values stored in the delay line, must be preserved and then used as the initial state for the next incoming sample. In practice, this mechanism can be implemented using the `lfilter_zi` function in the SciPy signal processing library, which computes the initial state vector of the filter and ensures continuous state transfer between data blocks or during sample-by-sample processing.&lt;br /&gt;
&lt;br /&gt;
The importance of state preservation can be understood from several perspectives. First, it eliminates transient responses when the filter is restarted. If each new segment of data were processed from a zero initial state, the filter output would exhibit unstable oscillations at the beginning, which is unacceptable in real-time streaming applications. Second, it ensures both causality and continuity, meaning that the filter output depends strictly on current and past inputs in a physically consistent manner. Third, state preservation supports flexible processing strategies. Whether the data are handled sample by sample, in fixed-length buffers, or in variable-length blocks, the continuity of the filtering behavior can still be maintained.&lt;br /&gt;
&lt;br /&gt;
The point-by-point processing procedure constitutes the basic unit of the real-time filtering system. For each newly arriving sample, the system performs the following operations in sequence. First, the raw sample is fed into the band-pass filter, and the stored state vector is used to calculate the filtered output while updating the internal state. Second, the output of the band-pass filter is taken as the input to the notch filter, where filtering and state updating are carried out in the same manner. The final single-sample output is then obtained as the filtering result at the current time instant and can be used for display, storage, or subsequent analysis. By repeating this process at every sampling instant, a continuous streaming processing pipeline is formed.&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
This chapter has systematically presented a real-time filtering scheme for sEMG signals. Centered on Butterworth IIR filters, the proposed method establishes a two-stage processing chain consisting of band-pass filtering and power-line notch filtering. By properly selecting cutoff frequencies and filter parameters, the scheme achieves a good balance between signal fidelity and noise suppression. The real-time implementation adopts a point-by-point processing mode together with a state-preservation mechanism, thereby ensuring the continuity and causality of the streaming data.&lt;br /&gt;
&lt;br /&gt;
The main technical features of the proposed scheme can be summarized as follows. First, the filtering chain follows the principle of “band limitation first, precise filtering second,” whereby the initial band-pass filtering reduces signal dynamic range and creates favorable conditions for subsequent processing. Second, the use of Butterworth filters takes into account both frequency-response and phase-related considerations, and the maximally flat passband characteristic helps prevent the introduction of artificial signal components. Third, the IIR structure, together with state preservation, offers significant advantages in computational efficiency and real-time performance, making it particularly suitable for embedded systems and real-time applications. Finally, the proposed signal chain is adapted to the characteristics of sEMG, thereby demonstrating both practicality and flexibility in real-time biomedical signal processing.&lt;br /&gt;
&lt;br /&gt;
===[[Humidity  Detector Based on Quartz Crystal Oscillator]]===&lt;br /&gt;
&lt;br /&gt;
Group menber: Ma Xiangyi; Li Xukuan; Zhang Yixuan; Zhu Rongqi&lt;br /&gt;
&lt;br /&gt;
This project aims to develop a humidity sensor based on a quartz crystal oscillator. The group will first construct the oscillator circuit on a breadboard. They will then fabricate the sensing device by depositing water-absorbing materials onto the quartz crystal. Humidity detection will be achieved by measuring the frequency change of the circuit caused by the mass variation on the crystal surface.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;To Prof.&#039;&#039;&#039;   Several materials are available for use as the water-absorbing layer, such as PVA, polyimide, graphene oxide, and silica gel. We are currently unsure which material would be the most suitable for our device. Could you provide us with some suggestions?&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
===Books and links===&lt;br /&gt;
* A good textbook on the Physics of Sensors is Jacob Fraden: Handbook of Mondern Sensors, Springer, ISBN 978-3-319-19302-1 or [https://link.springer.com/book/10.1007/978-3-319-19303-8 doi:10.1007/978-3-319-19303-8]. There shoud be an e-book available through the NUS library at https://linc.nus.edu.sg/record=b3554643&lt;br /&gt;
* Another good textbook: John B.Bentley: Principles of Measurement Systems, 4th Edition, Pearson, ISBN: 0-13-043028-5 or https://linc.nus.edu.sg/record=b2458243 in our library.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
* Various Python extensions. [https://www.python.org Python] is a very powerful free programming language that runs on just about any computer platform. It is open source and completely free.&lt;br /&gt;
* [https://www.gnuplot.info Gnuplot]: A free and very mature data display tool that works on just about any platform used that produces excellent publication-grade eps and pdf figures. Can be also used in scripts. Open source and completely free.&lt;br /&gt;
* Matlab: Very common, good toolset also for formal mathematics, good graphics. Expensive. We may have a site license, but I am not sure how painful it is for us to get a license for this course. Ask if interested.&lt;br /&gt;
* Mathematica: More common among theroetical physicists, very good in formal maths, now with better numerics. Graphs are ok but can be a pain to make looking good. As with Matlab, we do have a campus license. Ask if interested.&lt;br /&gt;
&lt;br /&gt;
===Apps===&lt;br /&gt;
Common mobile phones these days are equipped with an amazing toolchest of sensors. There are a few apps that allow you to access them directly, and turn your phone into a powerful sensor. Here some suggestions:&lt;br /&gt;
&lt;br /&gt;
* Physics Toolbox sensor suite on [https://play.google.com/store/apps/details?id=com.chrystianvieyra.physicstoolboxsuite&amp;amp;hl=en_SG Google play store] or [https://apps.apple.com/us/app/physics-toolbox-sensor-suite/id1128914250 Apple App store].&lt;br /&gt;
&lt;br /&gt;
===Data sheets===&lt;br /&gt;
A number of components might be useful for several groups. Some common data sheets are here:&lt;br /&gt;
* Photodiodes:&lt;br /&gt;
** Generic Silicon pin Photodiode type [[Media:Bpw34.pdf|BPW34]]&lt;br /&gt;
** Fast photodiodes (Silicon PIN, small area): [[Media:S5971_etc_kpin1025e.pdf|S5971/S5972/S5973]]&lt;br /&gt;
* Photogates:&lt;br /&gt;
** reflective, with mounting holes: [[Media:TTElectronics-OPB704WZ.pdf|OPB704.WZ]]&lt;br /&gt;
** transmissive, no mounting holes: [[Media:Vishay_TCST1103.pdf|TCST1103]]&lt;br /&gt;
* PT 100 Temperature sensors based on platinum wire: [[Media:PT100_TABLA_R_T.pdf|Calibration table]]&lt;br /&gt;
* Thermistor type [[Media:Thermistor B57861S.pdf|B57861S]] (R0=10k&amp;amp;Omega;, B=3988Kelvin). Search for   [https://en.wikipedia.org/wiki/Steinhart-Hart_equation Steinhart-Hart equation]. See [[Thermistor]] page here as well.&lt;br /&gt;
* Humidity sensor&lt;br /&gt;
** Sensirion device the reference unit: [[media:Sensirion SHT30-DIS.pdf|SHT30/31]]&lt;br /&gt;
* Thermopile detectors:&lt;br /&gt;
** [[Media:Thermopile_G-TPCO-035 TS418-1N426.pdf|G-TPCO-035 / TS418-1N426]]: Thermopile detector with a built-in optical bandpass filter for light around 4&amp;amp;mu;m wavelength for CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; absorption&lt;br /&gt;
** [[Media:Thermopile_TS305_TCPO-033.pdf|TPCO-033 / TS305]]: Thermopile detector with wideband sensitivity 5um-25um&lt;br /&gt;
** [[Media:Thermopile_G-TPCO-019_TS105-10L5.5MM.pdf|G-TPCO-019 /TS105-10L5.5MM]]: Thermopile detector with wideband sensitivity 5um-25um and silicon lens (field of view: 10 degree)&lt;br /&gt;
* Resistor color codes are explained [https://en.wikipedia.org/wiki/Electronic_color_code here]&lt;br /&gt;
&amp;lt;!-- * Ultrasonic detectors:&lt;br /&gt;
** plastic detctor, 40 kHz, -74dB: [[Media:MCUSD16P40B12RO.pdf|MCUSD16P40B12RO]]&lt;br /&gt;
** metal casing/waterproof, 48 kHz, -90dB, [[Media:MCUSD14A48S09RS-30C.pdf|MCUSD14A48S09RS-30C]]&lt;br /&gt;
** metal casing, 40 kHz, sensitivity unknown, [[Media:MCUST16A40S12RO.pdf|MCUST16A40S12RO]]&lt;br /&gt;
** metal casing/waterproof, 300kHz, may need high voltage: [[Media:MCUSD13A300B09RS.pdf|MCUSD13A300B09RS]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* Magnetic field sensors:&lt;br /&gt;
** Fluxgate magnetometer [[media:Data-sheet FLC-100.pdf|FCL100]]&lt;br /&gt;
** Hall switch 1 (SOT-23 casing): [[media:INFineon_TLE49681KXTSA1.pdf|TLE49681]]&lt;br /&gt;
** Hall switch 2 (TO-92 casing): [[media:DiodesInc_AH9246-P-8.pdf|AH9246]]&lt;br /&gt;
** Linear Hall sensor (to come)&lt;br /&gt;
* Lasers&lt;br /&gt;
** Red laser diode [[media:HL6501MG.pdf|HL6501MG]]&lt;br /&gt;
* Generic amplifiers&lt;br /&gt;
** Instrumentation amplifiers: [[media:Ad8221.pdf|AD8221]] or [[media:AD8226.pdf|AD8226]]&lt;br /&gt;
** Conventional operational amplifiers: Precision: [[media:OP27.pdf | OP27]], General purpose: [[media:OP07.pdf | OP07]]&lt;br /&gt;
** JFET op-amp, reasonably fast: [https://www.ti.com/document-viewer/tl071/datasheet TL071]&lt;br /&gt;
** Transimpedance amplifiers for photodetectors: [[media:AD8015.pdf | AD8015]]&lt;br /&gt;
&lt;br /&gt;
==Some wiki reference materials==&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [[Writing mathematical expressions]]&lt;br /&gt;
* [[Uploading images and files]]&lt;br /&gt;
&lt;br /&gt;
==Old wikis==&lt;br /&gt;
You can find entries to the wiki from [https://pc5271.org/PC5271_AY2425S2 AY2024/25 Sem 2] and [https://pc5271.org/PC5271_AY2324S2 AY2023/24 Sem 2].&lt;/div&gt;</summary>
		<author><name>Jialuo</name></author>
	</entry>
</feed>