• No results found

Physiological Signal Processing in the Command Layer

Design and Implementation of the EPICS Toolkit

5.3 Physiological Signal Processing in the Command Layer

It was stated in the introduction to this chapter that the second layer of physiological signal processing corresponded to advanced feature extraction from the physiological signal data stream with a view to translating features in the data stream into control commands. It was demonstrated that the complexity demanded for the second level of physiological signal processing was application-dependant and in a number of cases involved feature extraction from the data stream using a neural network. As the aim of this toolkit is to provide proof of the design concepts introduced here, a fairly simple second-level signal processing component has been created. This single command component extracts information from the physiological signal stream pertaining to the magnitude of a given signal, and acts like a switch, changing its own state depending on the magnitude of that signal.

Such a switching component can behave in either a latching or non-latching manner. In both instances a predefined threshold value is set within the component, which acts as the switching point. For a latching switch, if the value of a data point retrieved from the sensing hardware and corresponding to a given signal’s magnitude is above that of the threshold value then the switch is set. If a subsequent amplitude signal value falls below the threshold value, nothing happens, the switch remains set. The next time a value is received above that of the threshold, the switch is unset. For a non-latching switch, a received data point value above the threshold value sets the switch and the next data point value below the threshold, unsets it.

In Chapter 3 Dewan’s brain-controlled Morse code system relied on the amplitude of an alpha

signal to switch between two states. Prosthetic limbs also incorporate switching based on the amplitude of one or more EMG signals. A software component that models a switching command may be used for either application. Alternatively, it could be linked to an animation, sound or video clip that runs only when the switch is set. Or it may be used as the equivalent of a single mouse button event. Latching switches are particularly useful for implementing ‘sticky keys’ which are useful to motor disabled individuals. The inclusion of a switch command between the DMC and an interface component enables the continuous physiological signal stream to be used as if it were a series of discrete events. So, for example, an interface component could present a

button and the switching component in the command layer could facilitate discrete event driven operation of that button, but through a continuous data stream.

5.3.1 Encapsulating Common Interface Features

Early on in the design of the toolkit, a number of features were identified as being common to all electrophysiologically-responsive entities, be they command, interface or application level components. These common features included certain data values plus some common event handling functionality. In order to provide maximum flexibility (and consequent extensibility of the existing toolkit, as we shall see later) these common features have been encapsulated within a single generic software object. This software object effectively serves as the communications interface for any potential command, interface and application layer components. The composition of this generic object is described in Table 5.1.

Properties

Name Description

currentValue A data point corresponding to the current value (amplitude) of a physiological signal

signalID Identifier corresponding to one of a predetermined (by DMC) set of physiological signals

rewardThreshold This property used to set a switching value (see Section 5.3.2 below) maxScale

minScale

Formatting of some interface widgets requires information about the maximum and minimum potential values for a given signal

eventInterval This is the timer interval, which a widget makes available to Data Query Objects handling data about particular signals that widget is interested in.

Events

Related Methods Description

propertyChange

addPropertyChangeListener removePropertyChangeListener

Other entities outside of a widget component will want to be notified of changes in the following properties:

• signalID

• eventInterval

• currentValue

Table 5.1 Generic Object – the common interface provided by all components in receipt of pre- processed signals

with. When a component registers with the DMC, it exposes a series of properties, including an identifier corresponding to the signal it is interested in receiving information about, as well as information about the frequency at which it wants to receive notifications about new data points (the eventInterval property in Table 5.1). When a component first registers with the DMC, it does

not know what signals are available on the particular sensing device that the DMC is abstracting over. For this reason, the signalID property initially stores a dummy value until it has registered

with the DMC, when the list of available physiological signals that is held within the DMC is exposed to it. This is illustrated in Figure 5.10 (the variables labelled collectively as being User- set values are described in subsequent sections of this chapter).

Figure 5.10 DMC using the generic object interface to send data to an interface layer component

Sensing Hardware DMC Display Generic Object eventInterval signalID currentValue rewardThreshold minScale maxScale

Us

er

-set va

lue

s

Physiological signal data point