Searching \ for 'identifing electrical waveforms' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=identifing+electrical
Search entire site for: 'identifing electrical waveforms'.

Truncated match.
PICList Thread
'identifing electrical waveforms'
1995\09\16@110420 by Gerry Smith

flavicon
face
Hi All,
I have a pic16c71 that reads some electrical waveforms using the a/d converter.
Is it possible to program it to recognize specific qualities?  I have an eeg
sensor hooked up to it and would like it to recognize the different diseases
associated with each waveform.  If anyone has any information on this please
let me know.
Thanks in advance.

1995\09\16@113410 by Greg Riddick

flavicon
face
It can be quite difficult to even design algorithms to
discriminate "normal" EEG patterns from "abnormal" patterns. I
have worked with an EEG monitoring system that discriminates
seizure activity from background EEG, and even after a lot of
fine tuning, it is still only probably 80% accurate. Seizures
usually produce higher amplitude, periodic, waveforms.
Differentiating specific types of seizures or other patterns
would be even more difficult, except perhaps for very specific
things, like Abscence siezures that generally occur at specific
freqencies.
 You might start out by investigating the Fourier Transform code
in the Imbedded Control Handbook.   EEG patterns are periodic,
and  a FFT would resolve particular patterns to their fundamental
component freqencies.  You might find that particular "abnormal"
EEG's are associated with a typical pattern of component
frequencies, and that pattern matching for the FFT results might
be able to discriminate different conditions. If it were, me, I
would have the PIC send the digitized EEG serially to a PC, and
do the analyzing on the PC.

1995\09\16@152553 by Gerry Smith

flavicon
face
How about ECG signals?  I have a book that shows each characteristic of
different diseases.  Would the Fourier Transform code work in this way?
Also if I were to use a PC to analyze the data is there any information
on recognizing waveforms?  Thanks in advance.

1995\09\16@181958 by Greg Riddick

flavicon
face
Do you mean EKG's?  The heart of course produces a very periodic
signal that  could be analyzed with a FFT. OF course, as with the
EEG there is a lot of individual variation in basline frequency
and other characterstics of the signal.  Signal Processing is a
big field, and there are probably a lot of other people who are
more qualified to give you  advice here.  But you could take the
signal, say an EKG, and normalize it to a set baseline frequency,
say 70 BPM. Then you could run a FFT on a window looking at one
period of the heart beat. You would take the data from the FFT of
many patients who had a certain condition, say a slight
arrythmia, and perform a  procedure to extract the common
"signature" for that condition.  This procedure would not be
trivial, and could be a statistical matching function or maybe
even something like a neural-network type back-propagation
algorithm.  It might not be enough just to recognize fundamental
frequencies; the procedure would also have to be smart enough to
recognize other characteristics, like varying beat intervals in
an arrythmia.
 If you have access to a local medical school libary, do a
search on Medline for related topics, and I am sure you will find
a lot of papers on this subject.
 If you don't have experience doing this kind of thing, don't
expect to get anything working reliably within 6 months.
Cardiologists train for years to be able to detect subtle
differences in EKG's, and often can't tell you exactly why a
certain EKG suggests a certain condition.  Of course, with any
medical product, you unfortunately expose yourself to a lot of
liability, and that may be why we don't see more of this kind of
diagnostic software around.

1995\09\16@182412 by Andrew Warren

face
flavicon
face
Gerry Smith <spam_OUTLIUKBTakeThisOuTspamKIRK.NORTHERNC.ON.CA> wrote:

>How about ECG signals?  I have a book that shows each characteristic of
>different diseases.  Would the Fourier Transform code work in this way?
>Also if I were to use a PC to analyze the data is there any information
>on recognizing waveforms?

Gerry:

There are tens, if not hundreds, of millions of dollars waiting for the first
person to create an accurate EKG-reading machine; the fact that such a
machine doesn't exist should give you a clue as to the difficulty involved.

To do it, you'll need much more than just a Fourier transform and a PIC.  You
may want to read a few books on digital signal processing and (possibly)
fuzzy logic;  for starters, I'd suggest "Theory and Application of Digital
Signal Processing", by Rabiner and Gold (ISBN 0-13-914101-4), "Multirate
Digital Signal Processing", by Crochiere and Rabiner (ISBN 0-13-605162-6),
and "Signal Processing Algorithms", by Stearns and David (ISBN
0-13-809435-7).  That last book even comes with a disk; the programs are
written in FORTRAN, though.

Be forewarned... You'll need a strong mathematics background to get through
any of these books.

-Andy

--
Andrew Warren - .....fastfwdKILLspamspam@spam@ix.netcom.com
Fast Forward Engineering, Vista, California

1995\09\16@211402 by Paul Christenson [N3EOP]

flavicon
face
Sounds like an application for a set of correlation routines.  Unfortunately,
a PIC is probably underpowered for such an application.

You probably won't be able to get close to the accuracy of a trained person,
though.  However, if you are simply looking for some kind of warning device
to supplement that trained person, then you might be able to come up with
something useful.

1995\09\16@212851 by Rolan

flavicon
face
I am currently involved in a project where we do computer EKG analysis
quite a bit. I'm not sure what you are looking for in the signal.
EKG is the cleanest bio-signal to work with. EEG's and EMG's get a bit
hairy and inconsistent. We use S-Plus and Labview- both fine A/D and
signal analyis programs. I have also written some of my own stuff for
simple R-wave finding and interbeat intervals.

-()---()---()---()---()---()---()---()---()---()---()---()---()---()---()-
Rolan Yang            http://hertz.njit.edu/~rxy5310   Electrical Engineer
rxy5310spamKILLspamhertz.njit.edu                             .....kyuriusKILLspamspam.....tsb.weschke.com
VR,ROBOTICS,FENCING,HACKING,INDUSTRIAL MUSIC,ART,EXPLOSIVES,INLINE SKATING
                   THESE ARE A FEW OF MY FAVORITE THINGS.
-()---()---()---()---()---()-----()-()---()---()---()---()---()---()---()-
4 out of 10 people are annoyed by ^ this.

1995\09\17@101839 by Gerry Smith

flavicon
face
Well I meant EEG (brain waves) but I am also interested in ECG (heart waves).
So after using a FFT what should I do.  I see some code in the Embedded
Handbook for the FFT.  I have access to an ECG book which lists most of the
diseases and their waveforms.  How do I program it to actually recognize
the waveform? Thank{ in advance.

1995\09\17@102251 by Gerry Smith

flavicon
face
What is this Labview program?  Does it compare two signals and tells you if
they match?  Could you give me some more information on this?  I have been
told I should use a fast fourier transformation to isolate the main signals
then I should analyze it.  How can I get the analysis after I collected
everything?  Thanks in advance.

1995\09\17@120032 by Rolan

flavicon
face
On Sun, 17 Sep 1995, Gerry Smith wrote:

> Well I meant EEG (brain waves) but I am also interested in ECG (heart waves).
> So after using a FFT what should I do.  I see some code in the Embedded
> Handbook for the FFT.  I have access to an ECG book which lists most of the
> diseases and their waveforms.  How do I program it to actually recognize
> the waveform? Thank{ in advance.

What the FFT does is take your incoming signal (amplitude vs time) and
give you a spectral "plot." Which would be a graph, if you could imagine, of
frequency on the bottom and "loudness" on the side. What you are looking
at is the "volume" of sounds at different frequencies. A normal ECG or
EEG has a distinctive pattern (less distinctive on the EEG). Certain
diseases and illnesses also have distinctive patterns. What you would
probably want to do, is have the/some patterns in memory and run some
pattern matching algorithm between your spectral plot and your database
patterns. If you are good, you might be able to identify a disease- or
at least check wether the patient is healthy or not (though a patient
could still drop dead with perfectly good heart signal- brain tumor, or
whatever ;)
This pattern matching is still more of an art form than a science- that's
why it's left to the doctors. :)
Personally, I think you're using an ant to build a condominium - a job
too big for the PIC. Don't let me discourage you though- anything can
be done if you put your mind to it.

This reply is getting a little long. I am going to end it here and then
continue on a separate message so that those who don't care for this stuff
can.

-()---()---()---()---()---()---()---()---()---()---()---()---()---()---()-
Rolan Yang            http://hertz.njit.edu/~rxy5310   Electrical Engineer
EraseMErxy5310spam_OUTspamTakeThisOuThertz.njit.edu                             kyuriusspamspam_OUTtsb.weschke.com
VR,ROBOTICS,FENCING,HACKING,INDUSTRIAL MUSIC,ART,EXPLOSIVES,INLINE SKATING
                   THESE ARE A FEW OF MY FAVORITE THINGS.
-()---()---()---()---()---()-----()-()---()---()---()---()---()---()---()-
4 out of 10 people are annoyed by ^ this.

1995\09\17@121105 by Rolan

flavicon
face
Labview is a Windows program that helps with A/D and some basic signal
processing. I'm not an expert with labview yet, so I really can't give you
the whole review about it. Being a hacker, I usually write up the short
programs that I need to do signal analysis and pattern matching. You might
want to try the newsgroupds comp.dsp or something like that to find out
stuff on digital signal processing. Gotta go. Write more later...

-()---()---()---()---()---()---()---()---()---()---()---()---()---()---()-
Rolan Yang            http://hertz.njit.edu/~rxy5310   Electrical Engineer
@spam@rxy5310KILLspamspamhertz.njit.edu                             KILLspamkyuriusKILLspamspamtsb.weschke.com
VR,ROBOTICS,FENCING,HACKING,INDUSTRIAL MUSIC,ART,EXPLOSIVES,INLINE SKATING
                   THESE ARE A FEW OF MY FAVORITE THINGS.
-()---()---()---()---()---()-----()-()---()---()---()---()---()---()---()-
4 out of 10 people are annoyed by ^ this.

1995\09\17@125746 by Greg Riddick

flavicon
face
Like Andy said, try to match a signal to a particular (let's used
EKG as an example--same as ECG) heart condtion is not trivial.  I
could go into why I think it would not make millions of dollars,
but that's a little off topic.
 The simplest way to do pattern matching in this case is to (1)
normalize an EKG to a set frequency (2) Perform a FFT (3) Perform
a "best fit" analysis with averaged samples for a particular
heart condition.
 Best fit analysis would involve comparing a sample against a
"template" for a particular condition. The tempate would be
formed by averaging *many* normalized FFT's for a particular
condition.  A FFT can produce a histogram (or bargraph) that
shows frequencies and their relative amplitudes.  The best fit
would be between the sample and template that have the fewest %
different.
 Of course, something simple like this would kind of work but
not be very effective.  I gave the example of an arrythmia, which
would show up as an irregular beat frequency. Otherwise, the
frequency components might look quit normal.  You need to do an
analysis that can recognized more than superficial features, and
it's unlike that there is anything off the shelf that's going to
meet your needs exactly.  Neural net agorithms are sometimes
considered a little flaky, but they are good at extracting
hidden features.  I read a paper a while back about their used in
discriminating sonar echoes and they were actually more effective
than their human counterparts.  You might be able to find some
off-the-shelf software packages that can help--look in the
magazine section of a large bookstore or in a library for trade
journals that might carry advertisments.  I good primer for
neural-net algorithms is the PDP Two-Volume set from MIT Press.

1995\09\17@195830 by Stuart Allman

flavicon
face
About the ECG project.

I just thought of this.  Maybe I'm just slow or something, but wouldn't
this project be similar to voice recognition?  I'm less than a novice on
that subject; but the fact that a pattern is being looked for in each
case probably means that similar techniques can be used.  Real EE's please
correct me if I'm wrong.

Stuart Allman
RemoveMEstudioTakeThisOuTspamhalcyon.com

1995\09\18@044919 by Markus Imhof

flavicon
face
Just to cut into the discussion: I don't know anything about EEG or ECG
waveforms, but you might also look into wavelet transforms (similar to
fourier, but while fourier relies on sine waves, wavelets rely on short
wave packets, and will result in a 2-d array describing frequency and
amplitude distribution of the original wave). I had a look into them once
for another type of data analysis (not on a PIC - something slightly
bigger), but had dismissed them in favor of a plain old
least-squares-method (for the time being).

Bye
 Markus

1995\09\19@131653 by Martin McCormick

flavicon
face
       This isn't really PIC related, but you might find it interesting.

       I did a report in school, once about speech synthesizers and related
topics.  There is a fascinating treasure trove of information on this topic
that can be found in any good library called the "Benchmark Papers on
Acoustics" by Bell Labs which describes experiments which were done from
around the turn of the century until the early days of the computer age.

       One of the more awesome experiments described was an attempt to analyse
and regenerate human speech which was done in 1951.

       By then, it was understood that speech sounds were simply fundamental
tones fed through a series of filters which passed or attenuated various
harmonics.

       The Bell scientists used a spectrograph to create a graphical
representation of a spoken phrase.  They then built a device consisting of
a spinning disk with concentric bands of holes drilled in it.  When the disk
was spinning at the right speed, the bands of holes went past at rates which
corresponded to the center frequencies of their spectrograph machine.
By shining beams of light through the holes and placing photo cells in the
chopped beams, tones were generated in an amplifier which were them modulated
by sliding a clear plastic film containing a negative of the spectrogram
past at the same rate at which it had originally been recorded.  The thing
worked pretty well.

       What the scientists discovered was that information doesn't always
translate well between the audible and visual domain.  When they tried
to manually produce new spectrograms by looking at the machine-made ones and
modifying them, the playback system just made noises that were unintelligible.

       There is a set of films, now also on video tape, in which Eddy Albert
narrates a series of excellent science specials that were sponsored by the
Bell Telephone system and aired in the late fifties.  On one of them, this
experiment is briefly shown and you can actually hear the phrase
"Never kill a snake with your bear hands." plaid back.  It sounded a little
like somebody who has been in to the grape a bit and needs to dry out, but it
is quite clear considering how it was generated.

Martin McCormick WB5AGZ  Stillwater, OK 36.7N97.4W
OSU Center for Computing and Information Services Data Communications Group

More... (looser matching)
- Last day of these posts
- In 1995 , 1996 only
- Today
- New search...