Biomed Exp

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Experiment 2

Aim- To test a band stop filter function block and plot the frequency response curve for the
same.

Software used - LTSPICE

Theory -
A band-stop filter, also known as a notch filter, is a type of electronic filter that attenuates a
range of frequencies while allowing frequencies outside that range to pass through. This is
achieved by using a combination of inductors and capacitors in a specific configuration.

Circuit Configuration
The most common configuration for a band-stop filter is the series RLC circuit. It consists of a
resistor (R), an inductor (L), and a capacitor (C) connected in series. The values of these
components determine the center frequency and bandwidth of the filter.

Frequency Response
The frequency response of a band-stop filter is characterized by a notch or dip at the center
frequency. Frequencies close to the center frequency are attenuated, while frequencies far from
the center frequency are passed through with minimal attenuation.

Key Parameters
Center Frequency (f0): The frequency at which the attenuation is maximum.
Bandwidth (BW): The range of frequencies that are significantly attenuated.
Quality Factor (Q): A measure of the sharpness of the notch. A higher Q value results in a
narrower notch.
Mathematical Analysis
The transfer function of a series RLC band-stop filter can be expressed as:

H(jω) = Vout(jω) / Vin(jω) = 1 - ω^2LC / (R^2 + (ωL - 1/ωC)^2)

Band-stop filters are widely used in various applications, including:

Audio Processing: To eliminate unwanted frequencies, such as hum from power lines (typically
around 50/60 Hz).
Communications: In radio systems to reject specific interference frequencies while allowing
others to pass.
Measurement Systems: To improve signal-to-noise ratios by filtering out known noise
frequencies.

When designing a band-stop filter, consider the following:

Component Tolerances: Variability in R, L, and C can affect performance.


Temperature Effects: Components may behave differently under varying temperature conditions.
Implementation: Digital vs. analog implementation; digital filters can provide greater flexibility
and precision.
Real-World Limitations: Inductors and capacitors have parasitic elements that can impact the
filter’s performance.

The band-stop filter is a crucial component in many electronic systems, providing a means to
selectively attenuate unwanted frequencies while preserving others. Understanding its
parameters and mathematical foundation allows for effective design and application across
various fields in electronics and signal processing.

Procedure-

1. Circuit Design: Use a Twin-T configuration, which consists of a parallel combination of a


low-pass and a high-pass filter.

2. Component Selection: Choose appropriate resistor (R) and capacitor (C) values to set the
notch frequency. For example:
- Low-pass: R1, R2, C1
- High-pass: C2, C3, R3

3. LTspice Setup:
- Open LTspice and create a new schematic.
- Place the components and connect them according to the Twin-T configuration.
- Add a voltage source for AC analysis.

4. Simulation Commands:
- Use the following commands in LTspice:
.ac lin 20 200 1.5k
.plot ac v(out)

5. Run Simulation: Execute the simulation to observe the frequency response and identify the
notch frequency where attenuation occurs.

Result - Simulation of notch filter and its frequency response is successful.

Experiment 3

Aim- To simulate Real-Time ECG QRS Detection model.

Software used - Simulink

Theory-
Electrocardiography (ECG) is a technique used to record the electrical activity of the heart over
time. The QRS complex represents the rapid depolarization of the ventricles and is a critical
component of the ECG signal. Accurate QRS detection is essential for various clinical
applications, including arrhythmia detection and heart rate monitoring.

Key Components of an ECG Signal

P Wave: Atrial depolarization.

QRS Complex: Ventricular depolarization (largest peak).

T Wave: Ventricular repolarization.

Objectives of QRS Detection

Identify the QRS complex within the ECG signal.

Determine the timing of each QRS complex.

Enable subsequent analysis, such as heart rate variability and arrhythmia detection.

Signal Characteristics

Frequency Range: ECG signals typically contain frequencies from 0.05 Hz to 100 Hz.

Amplitude Range: Ranges from 0.1 mV to 5 mV.

Noise: ECG signals can be affected by noise, muscle artifacts, and other interferences.

QRS Detection Algorithms

Several algorithms can be employed for QRS detection, including:

Threshold-Based Methods: Utilize fixed or adaptive thresholds to detect peaks in the ECG
signal.

Differential Techniques: Calculate the first or second derivative of the ECG signal to enhance
the steep slopes of the QRS complex.

Wavelet Transform: An advanced technique that decomposes the signal into different frequency
components for better detection.

Pan-Tompkins Algorithm: A widely used method that combines several techniques to achieve
high accuracy.

Procedure -
1. Open the ex_ecg_sigprocessing.slx model.
2. Change your current folder in MATLAB to a writable folder.

3. On the model toolstrip, click Run to start the simulation. View the heart rate and the raw and
filtered signal in the scope. You can also view the peak updates and the threshold and
estimated mean heart rate in the scope.

4. Open the dialog box of the ECG Signal Selector block. Select the ECG signal mean heart
rate in the drop-down menu. Click Apply and observe the real-time detection results in the
scopes and HeartRate display.

5. Click Stop to end simulation.

6. After selecting target hardware, you can generate code from the ECGSignalProcessing
subsystem and deploy it to the target.

Result- Simulation of Real-Time ECG QRS Detection model was successful.

Experiment 4

Aim- To obtain the EMG waveform in MATLAB.

Software used - MATLAB

Theory -

Electromyography (EMG) is a technique used to assess the electrical activity of muscles. EMG
signals are generated by muscle fibers during contraction and provide important information
about muscle function and health. Analyzing EMG waveforms can be useful in various fields,
including rehabilitation, prosthetics, sports science, and neurology.

Key Components of EMG Signals

1. Motor Unit Action Potentials (MUAPs): EMG signals are composed of electrical impulses from
multiple motor units (groups of muscle fibers activated by a single motor neuron).
2. Frequency Range: EMG signals typically contain frequencies from 0.1 Hz to 500 Hz.
3. Amplitude: The amplitude of EMG signals can vary significantly, generally ranging from a few
microvolts to several millivolts.

Objectives of EMG Waveform Acquisition

- Capture and visualize the EMG waveform.


- Analyze the waveform characteristics, including amplitude, frequency content, and muscle
activation patterns.
- Use the EMG data for further analysis, such as fatigue assessment or signal classification.

EMG Signal Characteristics

- Noise: EMG signals can be contaminated by various noise sources, including electrical
interference and motion artifacts. Proper filtering is essential.
- Sampling Rate: A high sampling rate (usually above 1000 Hz) is recommended to accurately
capture the rapid changes in muscle electrical activity.

Obtaining and analyzing EMG waveforms in MATLAB involves data acquisition, preprocessing,
and visualization steps. Understanding the signal characteristics and employing appropriate
filtering techniques are crucial for accurate analysis. The resulting EMG data can provide
valuable insights into muscle function and health, enabling applications in research,
rehabilitation, and clinical practice.

Result- EMG waveform was successfully obtained in MATLAB.

You might also like