ORT21BMI - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

ORT21BMI

Description:

... if we don't sample fast enough? ... To build a filter took many precisely matched ... eye movements combined with much higher frequency muscle noise ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 40
Provided by: larry100
Category:

less

Transcript and Presenter's Notes

Title: ORT21BMI


1
ORT21BMI
  • Topic 6--Being digital

2
Clinical context
  • Recall the request from your colleague to record
    a patients ERG and to store it in such a way
    that it could be compared with the ERGs of her
    family members
  • Getting an ERG recorded and displayed on an
    oscilloscope display or chart recording is one
    thing how do you store it in a computer?

3
Specific issues
  • How do you get the signal into the computer?
  • How is it represented inside the computer?
  • Where is it in the computer?
  • How does its representation in there differ from
    the original electrical signal?
  • Once its in the computer, what can you do with
    it?

4
Learning goals
  • What is the difference between continuous
    (analogue) and discrete signals?
  • What changes when a discrete signal is stored on
    a computer?
  • What are the implications of different sampling
    rates?
  • What happens if we dont sample fast enough?
  • What is the basic anatomy of the PC and what
    parts are relevant to our work?

5
Why digital?
  • Recall our clinical scenario where you were asked
    to both record and store for later comparison a
    familys ERGs
  • Without the use of digital technology, you have a
    problem!
  • With it, you have many tools available

6
Why digital instruments?
  • Patients were assessed long before computers
    became common
  • Consider the Goldman perimeter
  • ERGs were recorded in the early 20th century
  • Why bring computers into it?
  • The flexibility of digital processing has allowed
    computers to take over functions once done with
    conventional electronics

7
Whats the digital advantage?
  • Consider filtering
  • To build a filter took many precisely matched
    electronic components
  • Want to change the cut-off frequency?
  • Simultaneously switch in a number of resistors
    and capacitors or rewire the circuit by hand
  • Switches wear out
  • You can only use a value wired in already
  • With digital processing, all you need to do is
    enter a new parameter value. Thats it.

8
What else?
  • Many filing cabinets worth of paper records of
    ERGs, VEPs, etc can be stored on a single disk
  • You can re-analyse them whenever you want
  • You can compare them against others
  • You saw in the last lecture how filtering caused
    a time delay
  • With digital filtering of stored data, you can
    make time go backwards and eliminate this

9
Whats the difference between analogue and
digital?
  • You know what music is--
  • Just what are those MP3 files made of?
  • You know what a photo is--
  • How do they become jpg files attached to e-mails?
  • You know (I hope!) what an ERG is--
  • What does it become in a computer?
  • So the question isnt just confined to the
    clinic...

10
Discrete signals--the first step to digital
  • A fundamental transition is from analogue to
    discrete signals
  • Analogue signals are continuous in time that is,
    no matter how tiny a period of time you choose,
    the signal exists throughout that period
  • Discrete signals--the kind represented digitally
    on a CD or MP3 file--are defined (have a value)
    only at specific points in time (eg, every 1
    msec)
  • What else is like this?

11
How about pictures?
  • Consider a photograph taken with a film camera
  • Look at it under a strong magnifying glass
  • Youll notice, if its a good one with
    fine-grained film, that you can see more detail
  • The image exists at every point in the photo
  • Printed or on-screen pictures are no longer
    continuous

12
Continuous?
Note what the smooth line is actually like--it
seems to consist of discrete values
13
Discrete Signals
  • If something is defined only at separate
    intervals, it may still seem continuous, if the
    intervals are close enough together
  • Determining close enough is non-trivial
  • Consider the weather

14
From the manual
  • How often do you check the temperature?
  • Every day?
  • Every hour?
  • Every minute?
  • Lets say you check it every hour
  • Does the air still have a temperature, even if
    youre not checking it?

15
Heres a plot of air temperature vs. time
  • Youre checking it every hour
  • A lot less measuring than infinitely often
  • Does that seem to represent the true, continuous
    measured record pretty well?
  • What if someone held a match under the
    thermometer between 1320 and 1321 hours?
  • Could you tell from those hourly readings?

16
Discrete vs. continuous
  • For many purposes, you only need information at
    specific times
  • If so, then you can save a lot of work as opposed
    to recording something continuously at every
    fleeting instant of time
  • However, doing this does mean that you dont
    really know what happens between measurements
  • So, to do this, you must understand both your
    needs and the characteristics of your data

17
Discrete vs. continuous, contd
  • For discrete data, each measurement may be made
    with arbitrarily precise accuracy
  • That is, we could measure the temperature as
    18.3763933345681103555937 deg Celsius

18
Getting data into the computer
  • Discrete data is the first step towards
    computer-friendly data.
  • We need to limit how precisely we measure our
    data.
  • WHY THESE LIMITS?
  • To understand them, we need to confront how
    computers store things

19
Binary numberscomputers native language
  • Everything a computer contains is represented as
    a collections of 1s and 0s
  • Everything.
  • Your e-mails, your music, your snapshots
  • This means your ERGs, too.
  • Doesnt seem obvious, does it?
  • The 1s and 0s make up binary numbers, in the same
    way that the digits 0..9 make up decimal numbers

20
Storing binary data
  • Binary numbers can get long
  • This limits how precisely we can represent things
    digitally
  • Having to store and manipulate long strings of
    binary numbers also limits the precision with
    which we represent things
  • These limitations have gotten less stringent as
    computers get faster and storage cheaper, but
    they havent disappeared
  • Lets go back to the idea of sampling a signal at
    regular intervals as the first step towards
    digital data

21
Analogue to digital conversion
  • This is the electronic version of measuring the
    temperature periodically
  • At fixed intervals, the voltage of interest is
    sampled
  • Its then assumed not to change till the next
    sample
  • The value is stored, and after the appropriate
    wait, the next sample taken
  • But how does 0.124799653100824 volts get saved as
    1s and 0s? Well soon see

22
How close are the original copy?
  • Depends on 2 things
  • How often you sample
  • How precisely you measure
  • Increase the above and your digital version gets
    closer and closer to the analogue original
  • It also takes up more and more storage space
  • Well consider how you balance these
  • Some of it is techie stuff, but some decisions
    may be yours
  • If made badly, they may yield hopelessly invalid
    data!

23
Why is it ever your problem?
  • As well soon see, taking samples too slowly can
    create spurious data that cannot be removed
  • What determines how slowly is too slowly?
  • What the frequency content of the signal is!
  • Knowing a bit about your signal lets you set up
    your instrument properlyor at least know that
    you should ask someone if it is set up right
  • Does this really matter to non-engineers?

24
Yes.
  • Even apparently computerless things like chart
    recorders may actually be digitising the signal
    before they display it to you
  • Heres a physiological example

25
Where are we now?
  • Were taking measurements at some rate thats
    enough, whatever that means.
  • We then have to convert them from our familiar
    decimal numbers to ones the computer is
    comfortable with1s and 0s
  • These are known as binary numbers because you
    only have two values to work with
  • Well deal with the question of converting from
    our decimal to the computers binary numbers next
    week meanwhile, at what rate do we tell the
    computer to sample our crucial clinical signals?
  • Not a trivial question!

26
How fast do we go?
  • Recall that all waveforms can be represented as
    sums of sine waves
  • From this, it should follow that to accurately
    sample and store a waveform, we need to store all
    of the individual frequency components that make
    it upotherwise, the stored waveform will be
    missing some parts
  • So, how fast do we need to sample a sine wave?

27
Heres one thats thoroughly sampled!
28
Do we need to go that fast?
  • Remember that the more frequently we sample, the
    more data have to be stored and the more powerful
    the processor thats needed to manipulate them
  • Whats the lowest sampling rate we can get away
    with?

29
Hows this?
The result looks funny but its identifiable
(with some effort) as having the frequency of the
original
30
What if we go even slower?
Uh-ohwe seem to have stored a waveform thats
not at all representative of the real
thing! Notice that, once its stored, theres no
way to know that its wrong!
31
What happened?
  • The re-creation of a spurious low frequency
    digitised sine wave by means of sampling too
    slowly is called aliasing
  • The minimum allowable sampling frequency for a
    sine wave is twice its frequency this is called
    the Nyquist frequency after its discoverer
  • If a waveform contains multiple frequencies, as
    clinical data would, then you must sample at
    twice the highest frequency present in the data
  • Thus, if an ERG contains 100 Hz oscillatory
    potentials, then it must be sampled at 200 Hz or
    greater

32
Dont forget noise!
  • Eye movements recorded with skin electrodes
    results in low frequency eye movements combined
    with much higher frequency muscle noise
  • If we digitise these eye movements, we would do
    one of two things
  • 1) Filter out the noise before sampling
  • 2) sample fast enough to adequately represent the
    noise as well as the desired signal
  • Clearly, 1) would be the preferable option, where
    possible

33
And if we forget the noise?
  • Then it may be aliased into an unwanted low
    frequency component and stored with the eye
    movements
  • From this point on, it could not be corrected,
    because it couldnt be separated from the desired
    data

34
Lets look at an example, using the frequency
domain representation
Heres a motor unit action potential (in red) and
the 10 sine waves that can make a pretty good
representation of it (in blue)
35
Heres its spectrum
What frequency would we have to sample at to
capture this signal accurately?
36
Now lets add some 13 Hz noise
37
What if we still sample at 20 Hz?
Were in trouble!
38
What we need is an anti-aliasing filter!
If we know the noise is there and use an analogue
filter to get rid of it before digitising, then
we can use the lower sampling rate Note that we
cant do this digitally after digitising because
the erroneous component is at the same frequency
as a valid one So we need advance knowledge of
the composition of both the clinical signal and
any noise added to it
39
Next time
  • In particular, the tutorials at
    http//www.delsys.com/library/tutorials.htm under
    the heading Fundamental Concepts in SEMG Data
    Acquisition are really helpful (and are where
    lots of the figures used in this presentation are
    from)
  • You can download the PDF files and keep them as
    references
  • A site that will be useful for this and the next
    class is http//arts.ucsc.edu/ems/music/tech_backg
    round/TE-16/teces_16.html
Write a Comment
User Comments (0)
About PowerShow.com