ME 224 Project: Lie Detector

ME 224 Project: Lie Detector
June 6, 2003
Tim Fleck
Mike Gruener
Brian Halaburka
Chris Moskaites
Table of Contents
Summary……………………………………………………………………………………...…...2
Introduction to Polygraphs………………………………………………………………….……..2
Validity of Polygraphs……………………………………………………………………..…....2-3
Theory…………………………………………………………………………………………...3-4
Experimental Setup…………………………………………………………………….………..4-5
Procedure……………………………………………………………………………………......5-6
Logic…………………………………………………………………………………………….6-7
Data and Results………………………………………………………………………………...7-9
Difficulties……………………………………………………………………………………..8-12
Conclusions……………………………………………………………………………………....12
Appendix A: LABVIEW Programs………………………………………………………......13-15
Appendix B: References……………………………………………………………………........16
1
Summary:
For our final project for experimental engineering we will design, calibrate and implement a
polygraph test. We will sample data from two sensors collecting two distinct types of data. The
first sensor is a galvanic skin response sensor, which will measure the perspiration rate of the
subject’s hand. The second sensor, which is an electrocardiogram, measures movement of the
person who is being tested. After the detector is assembled, we will initially gather data from a
group of volunteers. Their movement and perspiration will be recorded while they are asked a
series of test questions. Afterwards they will be asked which questions they answered false.
Based on these we will calibrate the data and determine how much of a change indicates a lie.
From these determined values, a LABVIEW program will be assembled that will acquire future
readings from subjects and compare these new values to the calibrated data. If the new readings
are above our pre-determined level, the LABVIEW program will activate a light indicating that
the subject is most likely telling a lie.
Introduction to Polygraphs:
A “lie detector” or polygraph instrument measures
changes occurring in the body of a subject such as:
heart rate, blood pressure, respiratory rate, electrodermal activity, and arm and leg motions. These
measurements are then compared to the normal levels
of the subject. Polygraphs do not detect lies; however,
they are designed to look for substantial involuntary
changes in bodily rates, which occur in a person's body when that person is subjected to stress,
such as the stress associated with deception.
Validity of Polygraphs:
Years of study have shown that people generally exhibit certain characteristics when they are
lying. These studies have produced the modern polygraph. However, how do we know that
these studies are accurate for all people? The American Polygraph Association states that it “has
a compendium of over 80 research projects, involving 6,380 examinations. Researchers
conducted 12 studies of the validity of field examinations, following 2,174 field examinations
providing an average accuracy of 98%. Researchers conducted 11 studies involving the
reliability of independent analyses of 1,609 sets of charts from field examinations confirmed by
independent evidence providing an average accuracy of 92%.” Most errors occur with
inexperienced polygraph examiners. One misconception with the accuracy figures presented by
the American Polygraph Association is the fact that the numbers do not take inconclusive results
into account. Thus a 98% accuracy reading does not mean that polygraphs are able to determine
98% of all questions correct, only 98% of the questions it is able to provide an answer for.
Although the claims of nearly perfect accuracy for the modern polygraph are impressive, United
States courts rarely allow them admissible. The inadmissibility of polygraphs in courts is mainly
due to questions of inaccuracy. Most people are still uncertain about how emotions such as
being nervous, scared, or embraced will affect the monitor. Other questions arise from subjects
being able to manipulate the given rates being tested. Many websites and books are available on
how to fool a polygraph. Some of the methods suggested are sedatives, antiperspirant on
fingertips, tacks placed in shoes (to give the subject pain after each question), and biting the
tongue, lip, or cheek. These countermeasures may not even go into the accuracy levels provided
2
by the American Polygraph Association because the measures may produce inconclusive results,
not errors. Although measures can be made to stop some countermeasures, some may be hard to
detect. The validity of our detector is very inaccurate because of our design. We have fewer
sensors than a normal polygraph and our sensors are likely to be less accurate. Due to these
reasons, our lie detector is merely a primitive model that will portray how a real polygraph
works.
Theory:
The idea behind a
polygraph exam is a
simple concept, but
difficult to execute.
When a person is being
deceptive, the machine
will notice that certain
physiological activities
are varying from their
normal patterns. These
“activities” are monitored
by connecting various
tubes and wires to specific points on a test subject’s body which will be monitored by a host of
external sensors. The polygraph then ideally detects these physiological changes when a person
is engaging in deceptive behavior. Then a trained examiner (also known as a forensic psycho
physiologist) monitors the amount the activities fluctuate from their normal values. In general
the physiological activities the polygraph monitors are respiratory rate, blood pressure/heart rate,
galvanic skin resistance, and arm and leg motions.
Actual Polygraph (analog)
• Respiratory rate: Two air filled rubber tubes are fastened around the subject’s abdomen
and chest. When the muscles in these two bodily regions expand, the air in the fastened
tube is displaced by a certain amount. This air then interacts with a device in the tube
called a bellows, which contracts as the tubes expand. This bellows device is connected
to a mechanical arm which itself is fastened to writing device (typically a pen) that marks
on a moving sheet of paper every time the subject takes a breath.
•
Blood pressure/heart rate: An electrocardiogram is a painless and useful test that
measures the electrical activity of the heart. Electrodes are placed on the chest, arms, and
legs to monitor the heart’s rate and rhythm. An EKG is usually used for general health
care and can help determine a variety of problems such as: disturbances of the heart's
rhythm or rate, abnormalities in the axis, the direction of the heart's electrical flow, an
enlargement of the heart, and damage from a previous heart attack. Blood pressure can
be measured with an ordinary hospital blood-pressure cuff placed around the upper arm
of the person being tested. As the blood is pumped through an arm it creates a sound,
which causes a pressure change in the tubes. These tubes are also connected to a bellows,
which again is connected to a pen that moves along with these disturbances.
3
•
Galvanic skin resistance: This measures the sweat being perspired by your fingertips.
The fingertips were chosen because of their high pore to surface area density. On
average when a person is placed under stress more sweat is excreted. Two fingerplates
(called galvanometers) are attached to two of the subject’s fingers, these galvanometers
then measure the ability of the skin to conduct electricity. Electricity is more easily
conducted when the skin is moist (as with sweat) than when it is dry.
•
Arm and leg motion: Theoretically when a person is engaging in deceptive practices they
will make more random bodily movements than normal. Thereby comparing the normal
amount of bodily motion to the amount sensed when a question is asked a lie could
possibly be detected.
Our Polygraph
• Motion: We used the electrocardiogram (EKG) to measure bodily motions. Obviously
an EKG can measure heart rate, but we found it too difficult to have LABVIEW take
readings in real time. However, we did discover that the EKG could measure bodily
motions, such as moving the arms and legs. Increased bodily motions are indications of
increased stress and possible deception. By calibrating the LABVIEW program properly,
we can determine when a subject is moving more than usual. If the signals cross a certain
threshold value a green light goes on indicating that the person is probably engaged in
deceptive behavior. (This is based on the assumption that when a person is being
deceptive their movement rate will vary from their relaxed state.)
•
Galvanic skin resistance: Two of the test subject’s fingers are placed on two pads, which
measure the moisture on the fingers. As the fingers become moister, electricity is
conducted much easier. These values are then compared to the subject’s normal values
and a predetermined threshold.
Experimental Setup:
Electrocardiogram
• Originally, we set out to smooth this curve
to indicate heart rate in real time. As will
be discussed later, we had a variety of
problems with this function. However,
while attempting to read heart rate, we
discovered that the EKG also senses when
a person moves. Three sensors are placed
on the subject, a positive, a negative, and a
neutral. They are placed on both wrists
and one ankle. The signal is sent to both
an oscilloscope and to our LABVIEW
program. LABVIEW is set up to read
when a person is moving enough to make
their signal pass a predetermined threshold.
4
Galvanic Skin Resistance
• After several failed attempts at trying to make use of our GSR sensor, we decided to
construct our own sensor that would measure conductivity of the skin. In order to do this,
we used the principle that skin resistance decreases as it becomes moist. Dry skin has a
resistance of about 1 million ohms, whereas the resistance of moist skin is reduced by a
factor of ten or more. We used two resistors, both of 1,000,000, ohms to create a voltage
divider. The probes were connected in parallel to one of the resistors, so as the resistance
of the subjects’ skin changed, so would the output voltage. A decrease in the skin
resistance would result in an increase in output voltage. The 100nF capacitor functions as
a smoothing capacitor and removes the 50Hz induced mains hum that is found on a
person's body.
.
We found that the maximum change in voltage output, from dry skin to very moist skin is
around 0.3 V. Thus for our op-amp, we had a voltage gain of 10/0.3 = 33.33333. We
chose resistors R1 and R2 to be 100,000 ohms and 3,000 ohms, respectively. This setup,
with an offset voltage of around 1.5 V, gave us fairly accurate readings of skin moisture.
Procedure:
Professional Forensic Psych physiologist Procedure
• Pretest – During this first hour or so, the examiner interviews the subject. During this
time, the subject is not connected to the polygraph. The examiner gets to hear the
subject’s side of the story. The examiner also visually sees how the subject responds to
questions.
• Design questions - The examiner designs questions that are specific to the issue under
investigation and reviews these questions with the subject.
• In-test – This is the phase when the polygraph exam is given. Some of the questions
asked are relevant to the issue at hand. The other questions are asked as part of a control
5
group. Control questions are generally very general so that the examiner knows the true
answer to the question. Some example questions are: “Where do you live,” and
”Have you ever taken something that didn’t belong to you.” The subject will most likely
tell the truth to the first question. The examiner can see what you bodily rates are at
when the subject tells the truth. The second question is so vague that if any subject
answers ‘no,’ the examiner can determine the person’s bodily rates during a lie.
• Post-test - The examiner analyzes the data and makes a determination regarding whether
the person was being truthful. If there are significant fluctuations that show up in the
results, this may signal that the subject has been deceptive.
Our Procedure
• Design questions – This phase is much like the one described above. Our group will
design question to be answered by our subject. Unlike the professional examiner, we will
not review the questions with our subject. This is mainly due to a shortage of time and
would like to catch our subjects off guard.
• In-test – The test is given. We will ask a group of control questions at the beginning of
the exam to determine a control range. Based on this range, we will change certain
variables to calibrate our system to the individual. This is slightly different than a
professional examiner because we want to determine instantly if our subject is being
truthful or not. Thus we must have our control questions at the beginning rather than
interspersed throughout the exam.
Logic:
LABVIEW
-motion
• Take initial readings visually from the waveform graph
• Calibrate the high and low end of the threshold based on the initial readings
• Every question after will be compared to the threshold
• If a person’s motions go above the threshold, a LED goes on, indicating a lie
-galvanic skin response
• Takes voltage readings of subject’s fingers until button is pushed
• Then it computes and displays and average voltage for the given time period
• Displays a waveform chart showing how much the subject’s voltage is increasing from
the average as resistance decreases
• If the in average increase goes above a certain predetermined value, a light goes on,
indicating a lie
6
Project
Subject
Electrodermal
Sensor
Motion
Sensor
DAQ
New Data
LABVIEW Program/CPU
Value Data Base
-Acceptable
-Not acceptable
Display Result
Data and Results:
Electrocardiogram
• Below are graphs of our subjects being tested for their movements. The top is a graph
when the person is not in motion and telling the truth. The bottom is a graph when the
subject is in motion and lying.
7
8
Galvanic Skin Response
• Below is a graph of our results from the galvanic skin response sensor. As can be seen,
the subject was not lying because he/she was not above the predetermined threshold. If
the curve went above 0.47 voltage increase, a lie would be indicated.
Difficulties:
Heart Rate Monitor
• We made several attempts to measure the heart rate in order to use this as an additional
input in our polygraph. We had a waveform on the oscilloscope, but we needed to
convert the graphic form into a number of beats per minute. One of the most difficult
aspects was updating the number in real time as we conducted the test.
To find the heart rate continuously, we needed to measure the number of beats within a
specified time interval. We used a build array function in LABVIEW, and used both the
sampling rate and the continual voltage reading as inputs. We set the array indices so
that the array would change every millisecond to include the last twenty seconds of
readings. This part of our effort was successful. However, we had to try several different
methods of converting an array of voltage readings into a heart rate.
Our first method involved a series of mathematical operations on the array of voltage
readings. First we differentiated the array, and then squared all of the values so that they
would all be positive. Then we tried to smooth the curve to identify peaks, but we ran
into problems. We were unable to find LABVIEW functions that would work with the
data type that we needed, and we failed to convert the data into a more manageable type.
9
We were able to find extrema on the curve, but noise from the signal prevented us from
utilizing this data.
Our next effort involved MATLAB scripting. The fast Fourier transformation (fft)
function in MATLAB is able to perform a discrete Fourier transformation on an array.
With a series of algebraic and matrix manipulations, one can start with an array and come
up with a frequency. In initial tests, it proved successful in isolating a sine curve from
noise with over 5 times the amplitude of the sinusoid, and calculated the frequency to
within 0.1%. However, when we applied this code into LABVIEW, it failed to provide
reliable results. Occasionally it would produce a value that seemed accurate, but it would
just as often give that same value off by a factor of 2. Most of the time there was no
output, leading us to believe that the extensive MATLAB code, which performs several
complex matrix operations in each step, was unable to keep up with the 1 kHz sampling
frequency.
We next attempted to use some of the similar built-in LABVIEW functions. We tried
several functions from the waveform and signal processing menus, such as variation from
the mean and number of peaks. However, these were ultimately unsuccessful, and it is
likely that they also lagged behind the readings, which were taken with a high sampling
frequency.
Galvanic Skin Response
• We bought a commercial perspiration sensor, the GSR2 Biofeedback Relaxation System
from Bio-Medical Instruments, Inc. This device measures perspiration on the fingers and
detects the resistance of two fingers. The resistance decreases as perspiration increases.
The GSR2 emits an audible sound, and increases pitch with decreasing resistance. Thus a
higher pitch implies the subject is more likely to be lying.
A higher pitch corresponds to a higher frequency electronic signal. We opened up the
device and found the wires in the circuit board that led to the speaker. We soldered two
external wires to these leads and hooked them up to our circuit board. Our intent was to
send these signals into Labview, and use some of the waveform analysis tools to
determine the frequency. After calibrating the data for each subject, we could establish a
cutoff frequency that would indicate that the subject is lying.
We started off by inspecting the signal with our oscilloscope. By attaching the ground
lead to the negative terminal of the battery powering the GSR2, and attaching the red lead
to the wire leading to the speaker, we were able to intercept the analog voltage signal
being sent to the speaker. We noticed that the sounds emanating from the speaker were
high-pitched, and indeed the frequencies were in the range of 10-20 kHz. Preliminary
tests indicated a significant (~ 4 kHz) change from dry to moist fingers.
We then attached the two leads to the ground port and an analog input port of the Data
Acquisition Card. We wrote a Labview program that had a threefold function. First, it
sent voltage signals and corresponding time signals to an Excel spreadsheet. Second, it
created a real-time waveform chart in the front panel of our Labview program. Third, we
10
created a waveform from the input array and measured its period using a built-in Labview
function.
Unfortunately, only the first function seemed to create a waveform. The period function
gave us no response whatsoever. As we were tinkering with the second function, we
realized that the Data Acquisition Card samples only at 2 kHz. This is not nearly fast
enough to detect the frequencies we needed. In fact, the Excel spreadsheet only gave us
results because it was aliasing, a phenomenon that occurs whenever the sampling
frequency is below the source frequency. Our methods are reliable, and work with the
lab oscilloscope; however, the Data Acquisition Card is insufficient for our needs.
•
Our second attempt at a
galvanic skin response sensor
came from circuit found on the
Internet. Resistors R1 and R2
have resistances of 1,000,000
ohms. The voltage at the upper
probe wire is half the battery
voltage (about 4.5 volts). The
voltage at the upper probe wire
will change depending on a
person’s skin resistance. The
voltage at the probe wire will
fall as skin resistance falls.
Transistors TR1 and TR2
compare the voltages. If the voltage at the base of TR2 is higher than at the base of TR3
then the green LED (L1) will come on. If the reverse is true then the red LED (L2) will
light. A green light indicates that the subject’s fingers are not very moist. A red light
indicates that a person’s fingers are moist. Based on the assumption that a person
perspires more when he/she lies, a red light indicates a lie. We had difficulties utilizing
this model because it was not sensitive enough to determine when a person’s fingers
increased in moistness.
LABVIEW
• A significant amount of the problems that our group encountered were associated with
LABVIEW. Many of these problems stemmed from the differences in the user libraries
between the biomedical engineering and the mechanical engineering versions. The sub
vi.s needed to run our electrocardiogram monitor would not transfer to the computers in
the mechatronics lab, despite repeated efforts to transfer the fifty-six needed subprograms
between the computers. Also the mechatronics LABVIEW program would not recognize
the sub vi.’s it would request when attempting to open a program file. As to the cause of
these problems we are still uncertain. However, this setback forced our group to divide
our testing into two phases, one in the presentation room and one in the biomedical lab.
11
Lab Setup
• Since we were unable to successfully transport the LABVIEW program to different
computers, we were going to just display our project in the BME lab. However, we were
unable to connect both of our sensors at the same time because the computers were only
set up to with one channel. Thus, we will be displaying our project in two separate
sections.
Conclusions:
Although our lie detector did not determine if our subject’s were actually lying, the project did
aid in our group learning a great deal about circuitry, electronic devices, and experimental
engineering. First of all, we learned how complex simple electronic devices could be. Heart rate
and blood pressure seem so easy to determine. Yet, by adding the extra complexity of having to
measure each in real time, we discovered that they are not as simple as they seemed to be.
Second, we learned to question our equipment before we start building an experiment. We
learned too late that our DAQ did not have a large enough sampling rate to work with our
galvanic skin response sensor. Also, we may have realized that it is difficult to measure heart
rate continuously if we questioned the LABVIEW program before starting the project. Finally,
this project taught our group to keep trying when things go wrong. We were able to incorporate
two bodily responses into our analysis, which was actually enough information to determine
when a person had increased stress levels.
12
Appendix A: LABVIEW Programs
Motion
13
Galvanic Skin Response
14
15
Appendix B: References
Books
• Learning with LABVIEW 6i by Robert H. Bishop
Websites
• www.truthorlie.com
• www.howstuffworks.com
• www.polygraph.org
• www.hackcanada.com
16