Download Amplifier 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Functional magnetic resonance imaging wikipedia , lookup

Electroencephalography wikipedia , lookup

Neural modeling fields wikipedia , lookup

Electrophysiology wikipedia , lookup

Single-unit recording wikipedia , lookup

Metastability in the brain wikipedia , lookup

Transcript
Background Information
Objective
The overall objective of this project is to design equipment that would measure
the brainwaves of a user that could be read and then translated into directional commands
of a remote-control car. This overall objective can be broken up into two main goals:

Find or design equipment that has the ability to measure the electrical impulses in
the brain.

Translate the brain’s electrical ‘code’ into commands that could be fed into a
remote control car to make it turn one way or the other.
Since this is a relatively new area in biomedical engineering requiring highly technical
equipment and a lot of time in research and development, the main focus will be on
accomplishing the first goal of the overall objective. Hopefully, others can use the
progress that is accomplished in this portion of the design project in the future in the
hopes of accomplishing the overall objective.
Method
The first step in the design of this project is research. A good understanding of
where the signals come from and what they mean are imperative to understand in order to
be successful. The first focus of research is to find a circuit model that could represent a
contact to the skin. This should be a relatively simple model, most likely involving just a
single resistor or capacitor. Once this is determined, a sufficient amplifier should be
designed, simulated, and constructed for implementation, whether it involves buying a
commercial amplifier or designing a prototype. The design of an amplifier will involve a
significant amount of research to find a good, working model. Finally, the amplifier
should be tested with the skin model to make sure it is working properly. Aside from the
technical aspects of the sources of brain waves and the design of a low noise amplifier,
there is a certain amount of psychology and feedback of biological systems that needs to
be considered due to the complexity of what is at hand.
Background
Electroencephalography (EEG), the science of recording the minute electric
currents produced by the human brain, was discovered by Hans Berger in the latter half
of the 1920’s.
Since then, neurological specialists have dedicated much time into
researching how to interpret these signals.
They are used to reveal functional
abnormalities of the brain, especially for the evaluation of comatose states.
EEG signals arise from the cerebral cortex, a several-centimeter-thick layer of
highly convoluted neuronal tissue. Neurophysiologists believe that the pyramidal cells of
the cerebral cortex are the source of EEG Voltages. Each of these nerve cells constitutes
a tiny current dipole, with a polarity that depends on whether the net input to the cell is
inhibitory or excitatory. Hence, the layer of densely packed pyramidal cells in the brain
produces a constantly shifting configuration of electrical activity as the nerve impulses
change. Measurements on the scalp can detect the underlying electrical patterns, albeit in
a form that is attenuated and unfocused by passage through the skull.
Overall, the observed brainwave frequencies must be thought of as
"epiphenomena," which are the byproduct of normal brain function and is not actually a
signal directly from the brain. The brain does not communicate, or do its business, using
the EEG. Rather, it is a secondary measure, such as the vibration measured from an
engine, or the temperature of an electronic circuit. It produces these waves as a result of
certain types of brain activity, which can be recognized, and taken advantage of by
learning what they represent, and what happens when we work with them.
Brain waves are categorized by form and frequency into four groups: alpha, beta,
theta, and delta waves. Alpha waves occur at a range of 8-12 Hz. They can be brought
on easily by actions as simple as closing one’s eyes; these waves are usually quite strong,
but they diminish in amplitude when a person is stimulated by light, concentrates on
vivid imagery, or attempts other mental efforts. Beta waves, which are also prevalent
during a waking state, are more prevalent in the frontal area of the brain. They are the
fastest type, typically ranging from around 13-30 Hz. During intense mental activity,
they can reach frequencies as high as 50 Hz. Theta and delta waves are the slower
rhythms, usually occurring during sleep. Theta waves, which take over alpha waves
when falling into a light sleep, usually range from 4-8 Hz. These usually arise from
emotional stress, especially frustration or disappointment.
Delta waves are present
during deep sleep, with a range of 1-4 Hz. Mu waves (also known as the wicket rhythm
because the rounded EEG traces resemble the wickets used in the lawn game croquet)
appear to be associated with the motor cortex: they diminish with movement or the
intention to move.
mentioned above.
Alpha
Illustrated below in Figure one are typical plots for the waves
Beta
Theta
Delta
Figure1. Four types of brain waves.
The EEG’s connection to the outside world is made by electrodes, and in that
results a methodical way to position and attach them. For EEG biofeedback applications,
all electrode systems consist of a minimum of one pair of electrodes (an “active” and an
“indifferent”) to record a channel of the EEG, plus a third electrode as the “ground.”
Generally, the “active” electrode will be located on the head, near the brain area that is
being monitored. The “indifferent” electrode can be either on the head or be on the ear,
or behind the ear. The “ground” electrode can be almost anywhere (typically located on
the ear or forehead). In order to record and do biofeedback on a single channel, it can be
as simple as placing a single electrode on the head, and an electrode on or behind each
ear, to complete the recording. If a second channel is desired, at least one additional
electrode is required; it can share the reference electrode with the first channel. However,
if “true” differential two-channel recording is desired, for example for left/right
coherence, or to compare two brain locations, then a different reference should be used.
Once the positioning is determined, the action of physically preparing the skin for
the electrode is next. The key to a clean and accurate EEG reading is to make certain that
the electrode is in proper contact with the skin. This is very important to maintain at all
times throughout the reading, and is very simple to obtain. The following steps should be
taken:

Clean the skin with an alcohol swab to remove surface oils.

Abrade the skin with fingernail or skin prep gel (Omni-Prep), applied with a Qtip.

Clean area with alcohol swab, prep and clean again.
It is imperative to do this twice as the second cleaning insures the skin is free of the gel,
so that the adhesive can stick well
Now that the surface for the electrode is prepared, it is important to ensure that a
good connection is made and maintained. Electrode impedances should be below 20k
each.
Placements of the electrodes on the head are done by what is called the 10/20
system of configuration. The International Federation of EEG has adopted standard
positions for each of the twenty electrodes placed on the surface of the scalp. Using
around ten different patterns of combinations of electrode pairs to create the
electroencephalogram then creates the EEG. This wide area of coverage allows different
areas of the brain to be sampled and averaged such that the cleanest signal with the least
amount of noise can be obtained. Figure 2 depicts a sample EEG using the 10/20 system
for electrode placement.
Figure 2. Headpiece using 10/20 electrode placement system.
Once these signals are captured they must be able to be manipulated in some way
in order to differentiate different signals.
Brain rhythms can also be trained by
conditioning using biofeedback. The term biofeedback refers to a group of procedures
and techniques in which an external sensor is used to provide the organism with an
indication of the state of a bodily process, usually in an attempt to effect a change in the
measured quantity and to promote the acquisition of self-control of physiological
processes.
By training an individual to learn how to produce (or reduce) specific
frequencies, changes in the brain can be produced. From a training standpoint, one can
learn what types of mental states or activities are affected by specific types of training.
Similarly, one can learn which brain/mind states, qualities, or activities are associated
with a preponderance of, or conversely a lack of, any particular rhythm or combination of
rhythms.
Research that is focused on understanding specific properties, such as attention,
alertness, mental acuity, etc., has uncovered combinations of rhythms, and other EEG
properties, that can be useful to complete the objectives at hand. Generally, derived
properties are found useful, that involve computer-processing of the EEG, to produce
measurements that are useful for research, monitoring, and eventually (in the case at
hand)
allowing
control
of
external
devices.
There has been a brief and relatively narrow history of using EEG for actual
mind-control based uses due to the fact that it is a new area in bio-engineering. However,
their have been a couple forerunners in this field that act to pave the way for the future.
Among these are two important research projects that are worth noting.
The first does not involve a human subject; rats were used to realize mind control.
John Chapin at MCP Hahnemann University in Philadelphia did the study. Six rats were
placed in a cage in which there was a water bottle controlled by an electric arm. When
the rats wanted water, they had to press a lever, and the arm would turn the bottle and the
rat would have water. A series of twenty-four electrodes monitored the brain of the rats.
As the rat pushed the lever, its brain activity was monitored. After time, a pattern was
discovered which demonstrated the neural code of the rat attempting the get water. The
lever was then removed, and the pattern of synapses firing was continually monitored so
that when the correct pattern was read, the rat was given water.
Chapin is now
attempting the same type of procedure using monkeys as the subject. He believes success
in humans could be only about a decade away.
The second project was undertaken at the Wright-Patterson Air Force Base in
Ohio by Gloria Calhoun.
Here, the military’s Alternative Control Technology
Laboratory has done experiments with a flight simulator which allows a pilot to turn left
or right, up or down, simply by thought. This is accomplished by using a computer to
monitor sensors that are placed on the skull.
Conclusion
At this juncture in the research and design project, the only conclusions that are
worth making are that of things to come. Once the low-noise amplifier and digital filter
system is completed, a more concrete assertion can be made about harnessing and
manipulating EEG signals. Of the information at our disposal the most useful brain wave
for our needs is the alpha wave. This is because of its sensitive characteristic of being
controlled by very distinct actions. Because of its behavior we feel as though a discrete
“high” and “low” signal can be obtained and interfaced with computer software.
However the challenge in there lies in the actual conditioning of the subject to be able to
consistently provide an accurate signal that the computer can recognize.
Design
After the background research was completed, the design portion of this project
went underway. The primary area of focus was on obtaining an amplifier that could be
used to magnify the brain signals in a manner in which these waves could be studied and
interpreted. The information found in the research was used to set parameters on certain
specifications of the amplifier, i.e. gain and bandwidth.
There were two possibilities on obtaining a working amplifier: to design an
amplifier or to search for an already existing one and buy it. Most of the already existing
amplifiers were expensive, so most of the focus went into designing an amplifier. But in
the search for an already existing amplifier, a circuit diagram for a working amplifier was
obtained. This amplifier and also one that is designed and built from scratch are the two
main focuses of this preliminary design report.
Amplifier 1
Component Analysis
Due to the great deal of random signals and noise that are omnipresent in EEG
waves, the issue of paramount importance when designing an amplifier is noise reduction
and leakage consideration. Deeming the difficulties associated with our objective, a
previously fabricated design will be analyzed, constructed, and tested (Courtesy of
Brainmaster).
The main IC that will be used in the design will be a high quality
instrumentation amplifier courtesy of Analog Devices (AD620 family more specifically).
Before continuing on with the specifics of the design, it is worth noting what makes an
instrumentation amplifier, more specifically the Analog Device amplifier suitable for this
experiment.
Despite the quality of performance parameters of this instrumentation amplifier,
the attribute that makes it appealing for our use is the relative inexpensiveness of the part
(ranging from $9.00-$15.00). This is a great deal for the how well the amplifier works.
This amplifier only requires one external resistor to set gains from 1-1000, which is
perfect for this experiment because of the very small magnitude of the EEG input signal.
In addition, the packaging of this amplifier is a great deal smaller than most, leading to
desirable characteristics such as a low supply current and allows it to work in accord with
portable and remote devices. The accuracy specifications also are worth noting and
include: 40ppm of maximum non-linearity, 50uV of offset voltage, and an offset drift of
0.6uV/C, which are ideal values for precision data acquisition systems. This is the main
goal of the experiment: Data Acquisition.
Other components that will be used in the EEG amplifier are selected for their
practicality, i.e. OP-90 (noted as a practical general purpose op-amp), and for the
consistency, i.e. highly accurate resistors and capacitors (1% metal film and 2%
polypropylene respectively. Now that the key components of the amplifier design have
been distinguished they must be integrated and analyzed in a comprehensive system.
System Integration Analysis
As a system, this amplifier is designed for the following: low noise, low power
consumption, better accuracy and common-mode rejection-ratio, and lower part count.
Illustrated below in Figure 1 is a PSPICE schematic for the proposed amplifier.
Figure 1. PSPICE Schematic of BrainMasters EEG Amplifier
Unfortunately, due to the constraints in student software a dependable simulation
of this system could not be attained, however, once the components are received
verifying the system performance of this circuit will be forthcoming. The overall gain of
the EEG amplifier is 20,000, allowing a typical 200uV peak-to-peak signal to be
amplified to 4 volts (also the supply voltage) and have an effective bandwidth spanning
from 1.7 to 34 Hz. These are the most desirable qualities of the amplifier due to the
nature of the input signal. The input signal is fed through the AD620, whose gain is
preset to 50. The purpose of this is to get the desired signal from the noise, and provides
a very high input impedance and CMRR. The input coupling has a pretty big time
constant and is not only independent of the CMRR, but doesn’t affect the low-frequency
response as well. The OP-90 in the first stage is used as an integrator which acts as a
low-pass filter, where the lower cut-off frequency. The second-stage of this amplifier can
be set to an arbitrary gain, but typically is set to be about 400, and this will be used to
provide an upper cutoff-frequency of about 34 Hz.
Even though this amplifier can be bought commercially, it is of utmost
importance to be able to assemble components and have opportunity not only to construct
a system but to be able to tweak and manipulate the components to get the best possible
signal retention. The are other components in this design that have been neglected due to
the fundamental need of getting a good, working model of the building blocks of this
experiment.
Amplifier 2
From the research, it was discovered that a differential amplifier was needed in
order to obtain an output with minimal noise. The gain needed to be extremely high,
somewhere between 80 – 100 dB. The bandwidth only needed to be around 50 Hz.
The initial circuit that seemed best was an instrumentation amplifier. This is a
differential amplifier that has two stages that could be used to obtain a high gain.
Figure 2. Circuit diagram of instrumentation amplifier.
Figure 2 depicts the circuit diagram. Some modifications needed to be done to make this
amplifier more suitable specifically for the application at hand. First of all, the resistors
at the input of the first two op amps were removed in order to a high input resistance.
This was needed since the input signals will be very small and not have much current,
therefore any resistance causing a voltage drop would make things more difficult. If
resistors R3=R3b, R4=R4b, and R5=R5b, the gain of this circuit can be calculated using
the following equation:
T (s) 
R5
2  R3
 (1 
)  (v1  v 2)
R4
R2
The gain was chosen to be 86.02 dB.
Next, capacitors needed to be added in order to minimize DC offsets. First, a
large capacitor in series with R2 was added. This capacitor needed to be very large in
order to minimize low frequency roll-off. The formula for computing the size of this
capacitor is as follows:
C
1
2    f  R2
Where f is the lowest frequency that needs to be part of the midband range of the circuit.
Also, two capacitors were placed in series at the input terminal. This was an idea that
was used from the circuit diagram of the previous example.
Figure 3 depicts a circuit diagram of the modified amplifier. The frequency
Figure 3. Circuit diagram of modified instrumentation amplifier.
response can be seen in Appendix 1. There is a low frequency roll-off, but the –3 dB
frequency is 0.158 Hz, which is much lower than is needed to monitor.
Results
Amplifier 1
The first task in order to achieve results is to simulate the low noise amplifier in PSPICE.
The circuit diagram used to model the EEG, BrainMaster circuit is simply an ideal
operational amplifier set to having a lower –3dB cutoff frequency of 1.6 and a gain of 50.
This is computed such that where the capacitor and resistor values are .01F and 10M
respectively. The gain is set at 50 by the ratio of the biasing resistors. The actual circuit
has an additional integrator in the first stage that is not present in the circuit layout, but
does not effect simulation results because it acts as a low-pass filter and allows the
instrumentation amplifier to operate with good linearity. The second stage is modeled by
a symbol amplifier producing a gain of 390 and has a filter at the output, resulting in a
upper cutoff frequency of 34 Hz. The circuit layout used to model the BrainMaster
circuit is located below.
Figure. PSPICE Schematic Modeling BrainMASTER Amplifier.
When an AC sweep was applied to this amplifier, the results were not exactly as expected
by the actual circuit description of the BrainMaster amplifier. This is predominantly due
to the inaccuracy of the op amp models and the biasing of the instrumentation amp.
However the results were still acceptable. Illustrated below is the frequency response of
the modeled amplifier.
Figure. Frequency Response of Modeled Amplifier.
Analysis of the simulation yields a gain slightly lower than the desired 20000, however
the bandwidth is just about the initial target. After the circuit was constructed I decided
to test the amplifier in single stages to minimize debugging and human error. The
resulting waveforms on the oscilloscope are illustrated below.
The second stage has a rather strange output for a sine wave input. This could be due to
non-linearities in the second stage, however was the best response that I could acquire.
Combining the two stages seemed to be a little bit of a problem with the clipping, even at
low input levels. A voltage divider was then put on the input to decrease the input
voltage by 10000, hence making what ever come out twice as much that came in.
However, no matter how many times I tried, the voltage divider wouldn’t let any AC
signal go in, and thus could not experimentally prove the gain of the amplifier, but in
theory the gain is correct. The frequency response of the amplifier was determined using
the HPVEE software and is illustrated below.
Figure. Frequency Response of Constructed BrainMaster Amplifier.
The experimental bandwidth turned out to be excellent, and having almost no deviation
from the simulation. There are a couple of spikes in the low end of the band, but has no
effect on picking up EEG signals. The gain is off by a great deal, probably due to the
clipping effects of the amplifier.
Conclusions
The amplifier, even though it displayed some of the desired performance characteristics,
was unable to harness something I would definitely be able decipher as a brainwave.
However, the experience of simulation, design, construction, and test is very valuable in
any discipline. The inability of this amplifier to fully work is rather disappointing,
however, that is why an alternative design was considered and worked properly.
Amplifier 2
After building the modified instrumentation amplifier, the first step was to
measure the single-ended gain. Since the gain theoretically was very high (86 dB), the
input signal needed to be very small. To achieve this, a voltage divider was used. A ten
Volt signal was sent through a 1 M resistor in series with a 10  resistor connected to
ground. The input to the circuit was taken from the ungrounded side of the 10  resistor,
which corresponds to a 0.1 mV signal. Figure 1 depicts the output signal.
Figure 1. Initial output signal.
The frequency of the input signal was chosen to be 20 Hz since this should be somewhere
in the midband region of the frequency response. The output signal was 20 Hz, therefore
there was no non-linearity in the actual transfer function of the circuit. The output
voltage was 2.2 V, which corresponded to a gain of 22,000, or 86.8 dB. This exceeded
the expectations by a small amount. The output signal in Figure 1 does look a little
choppy, which can be attributed to dropping the input voltage to such a small amount.
Since the ground in an experiment is not exactly zero volts but random minute values
close to zero, when the input signal is lowered to such a small value, the minute values on
the ground have a larger relative effect.
Next, the common mode gain and rejection ratio were measured. This was
achieved by applying a large signal (twenty Vpp) to both inputs and measuring the output
signal. At first, the output signal was around one volt. Normally, this value would be
considered large, but since the differential gain of the circuit was so large, this meant the
CMRR would be large. But replacing R5 with a potentiometer and adjusting it such that
the output signal was a small as possible could minimize the common mode gain. Figure
2 depicts the output after this modification was done.
Figure 2. Common mode output signal.
R5 was replaced with a 2.7 k resistor. With an output voltage of 0.64 volts, the
common mode gain became 0.032 V/V. Thus, the CMRR became 116 dB, exceeding the
expectation (~90 dB) but quite a lot.
The fact that to minimize the CMRR resistor R5 needed to be replaced by such a
different value than the original, it seemed that this signaled some problem in the circuit.
One possible problem was that using such a large resistance as 10 M causes problems
in experiments. Therefore, this resistor was replaced with a 1 M resistor and the gain
on the second stage was increased by a factor of ten. Also, electrolytic capacitors were
being used, so in order to make their polarities in the right direction, the 100 uF capacitor
was replaced by two 220 uF capacitors in series, using opposite polarities. Figure 3
depicts the modified circuit diagram.
Figure 3. Modified circuit diagram.
The PSPICE simulation of the frequency response of this circuit is included in Appendix
2. Its lower 3 dB frequency was around 0.14 Hz and upper frequency was well above 1
kHz. Both these values exceeded expectations.
The gain, frequency response, and CMRR were remeasured for this circuit.
Figure 4 depicts the output used for gain measurement.
Figure 4. Output signal using modified circuit.
The output signal was 2 volts, which corresponded to a gain of 20,000, or 86 dB.
Therefore, the gain did drop, but still meets the requirement.
The frequency response of the circuit was measured next. The graph is included
in Appendix 3. The lower cutoff frequency was around 1.25 Hz. This was a little higher
than calculated, but desired cutoff frequency was chosen to be much less than needed, so
a value a little larger is still acceptable. The upper cutoff frequency was greater than 1
kHz, far exceeding the necessary upper cutoff frequency of 50 Hz.
The CMRR was determined to be 102 dB. This seemed acceptable, but the same
method previously used to minimize CMRR was repeated anyhow. It turned out that by
leaving R5 unchanged, the CMRR was minimized.
To clean up the output signal, a low-pass filter was created at the output of this
circuit. Figure 5 depicts the circuit diagram of the Butterworth filter used.
Figure 5. Circuit diagram of filter.
This circuit has a cut-off frequency around 34 Hz. The output signal becomes
significantly improved. Figure 6 depicts this signal.
Figure 6. Output signal after filtering.
Finally, electrodes were connected to the head and a few screen captures were
taken. Figure 7 depicts the signal read while the subject was at rest.
Figure 7. Measured signal with subject at rest.
Figure 8 is the Fourier transform of this signal. As can be seen, there are several
Figure 8. FFT of signal with subject at rest.
low frequency components that were expected to be present. A small bit of 60 Hz noise
also was not cut off by the low-pass filter. Figure 9 depicts the signal of the subject
biting.
Figure 9. Measured signal with subject biting.
Figure 10 depicts the signal of the subject repeatedly blinking.
Figure 10. Measured signal of subject blinking.
One important thing to note is that immediately after the power supply is turned
on, the output hits the positive rail. Due to the large time constant of the capacitor and
resistor, it takes around 10-15 seconds for the capacitor to discharge so that there is no
DC level at the output.
One problem that needs to be addressed when a working model is built, is that the
amplifier needs to be shielded. When electrodes were hooked up, the circuit only picked
up 60 Hz noise. Most high gain, low noise circuits needs some kind of shielding to work
properly.
Appendix 1
Appendix 2
Appendix 3