To understand one-dimensional data acquisition and processing, including the sampling theorem, quantization effects, the frequency domain, windowing and filtering.
Biosignals originate from a variety of sources:
Bio-electric signals: generated by nerve and muscle cells by the membrane potential. The action potential of the cell itself may be measured in single cell recordings. Surface electrodes can be used to measure the field generated by many cells in the vicinity of the electrode due to the propagation through tissue.
Bio-impedance signals: tissue impedance provides information about composition, blood volume and distribution, endocrine activity, etc. Test sinusoidal currents may be injected into the tissue using a frequency range (50KHz-1MHz) to minimize electrode polarizations problems and low current (20MicroA to 20mA) to avoid tissue heating. The voltage drop due to the current and tissue impedance is measured.
Bio-acoustic signals: due to acoustic noise created by biological phenomena. Examples include the flow of blood in the heart or through vessels, the flow a air in the lungs and airways, in the joints and in the digestive tract. Sounds propagate and may be acquired on the surface with, for example, microphones.
Biomagnetic signals: Organs such as the heart, brain and lungs produce a weak magnetic field. These signals tend to have a low signal to noise due to the extremely low field strength.
Biomechanical signals: arising from a mechanical function of a biologic system such as motion, displacement, pressure, tension and flow. Since the mechanical phenomenon does not propagate, measurement must be performed at the site making the measurement difficult and invasive.
Biochemical signals: resulting from chemical measurements of tissue or samples. Example: measurement of ion concentration inside or near a cell using ion electrodes. These are typically low frequency signals.
Bio-optical signals: from optical functions of a biologic system, naturally occuring or induced. Example: blood oxygenation may be estimated by measuring the transmitted and backscattered light from a tissue.
Convolution is defined as:
The integrand is the product of two functions with the latter flipped and shifted.
See this java demonstration of convolution for a graphical explanation.
Any signal can be considered to be a sum of an
infinite number of sinusoidal waves of different frequencies. Think of a
musical audio signal being composed of high and low notes. The Fourier
transform is particularly important for linear (adding/scaling inputs
results in adding/scaling outputs), time-invariant (a shift in the input
gives a shift in the output) systems.
The response of such systems to a complex exponential (sinusoid) is just a
constant times the input. The Fourier transform is the weight or magnitude
of each component frequency and is computed by this integral:
Inverse Fourier Transform:
We can recover the original signal from its frequency domain representation
For discrete signals, such as we will deal with, the analogous transform
is the discrete Fourier transform:
Note, we will get a negative and positive peak for any frequency component, i.e. for a 100Hz signal, we will get components at 100 and -100.
Whitaker Shannon Sampling theorem:
Signals which include frequencies outside the bandlimit determined by the sampling rate will be aliased when sampled. The replicated spectra will overlap and high frequencies will appear shifted or aliased as low frequencies. Each frequency is shifted down to below the maximum frequency (half the sampling frequency). See Appendix below for more on sampling.
If the analog signal contains higher frequencies than half the sampling frequency, as in this example, the digitized signal will contain spurious oscillations not present in the original signal.
Power spectrum of an EEG signal originally bandlimited to 40Hz. The presence of 50 Hz noise in the original signal (a) causes an aliasing error in the 30Hz component in the sampled signal (b) if the sampling frequency is 80Hz.
Quantization produces a discrete signal, whose samples can only take certain values, using either rounding or truncation. The range of values is typically divided evenly (uniform quantization). Signals are commonly quantized to 8, 12 or 16 bits. The quantization interval = (high limit - low limit)/(2# of bits). Decreasing the range of the limits can therefore improve quantization.
Fourier Spectrum Analysis:
The frequency resolution of the frequency plot is determined by the total number of samples, n, used in the DFT and the sampling rate or frequency. The maximum frequency contained in the DFT is determined by the sampling rate where fmax = (sampling rate)/2. Thus, the frequency resolution is (sampling rate)/npts. The number of points in the time domain should be a power of 2 for computational efficiency.
Calculation of various functions requires the knowledge of the signal from minus infinity to plus infinity. The signal, of course, is not available for arbitrarily long durations. We must use a windowing signal instead.
A window w(t) is defined as a real and even time limited function (w(t) = 0 for |t| > T/2). The FT of the window is therefore real, even and not band-limited. Multiplying the signal by the window function will zero the signal outside the window duration (observation period) resulting in a windowed, time-limited signal s_w(t) = s(t)w(t). In the frequency domain, we have S_w(f) = S(f) * W(f). Windowing convolves the true spectrum of the signal with the FT of the window. Thus, a window with very narrow spectrum will cause low distortions. Sidelobes cause distortions. The simplest window is rectangular. More useful are, for example, the Hamming window and the Hann window designed to minimize the effects of the sidelobes.
Digital filtering can be used to improve a signal by removing noise or other unwanted components from the signal after it has been acquired indigital form. Digital filters are more flexible and do not require the precision hardware of analog filters (performed with circuitry). The design of these filters is a whole field and outside of the scope of this course. In their simplest form, they are functions that are convolved with the signal.
Filters are characterized by their behavior in the frequency domain. Low pass filters remove high frequencies (the stop band) and leave the low frequencies alone (the pass band). High pass filters remove low frequencies and leave the high frequencies alone. Band pass filters only pass frequencies in a given range. Band stop filters remove frequencies in a given range. None are ideal, however, and the degree to which they cut-off the designated frequencies (the steepness of the transition from stopband to passband; the size of undesired side lobes) characterizes their behavior.
Appendix: Sampling Theorem
Sampling a function can be expressed as a multiplication with a comb
function (a train of delta functions):
The dirac delta function is a generalized function, or distribution representing an infinitely brief, infinitely strong, unit area impulse. It is represented graphically as an arrow of unit height. It can be considered as the limit of a function, such as a Gaussian or rectangle, which gets narrower and taller preserving the area under the curve. It can also be considered to be the derivative of the unit step function.
A train of impulses or delta functions is called a comb function:
From delta function properties, we can see:
Then, a comb with spacing b is:
Sampling with a Comb:
In multiplying, the comb acts to sample x(t). The samples are spaced by b.
Convolving with a Comb:
Convolution with a comb replicates the function at each delta function as
you slide x along.
The Fourier transform of a sampled function is a replication of the transform of the unsampled version.
Whitaker Shannon Sampling theorem:
When undersampled, the replicated spectra overlap and this causes aliasing.