Sunteți pe pagina 1din 12

1623179

CSC9YE

AI Assignment

AI Agent for Semi-autonomous Exo-skeleton Control


Overview This is a report about the construction of an Artificially Intelligent agent for the control of an electro-mechanical harness designed to give wheel-chair users the ability to walk in a natural way. I will cover the following topics:

The Task Goals and Performance Measures The Environment Actuators Sensors Sensor Processing Reflex Agent Environment Model Modelling the Limbs Learning Neural Network Training Planning and Searching Representing Knowledge Artificial Emotions Turing Test Conclusion Future Work References

1 of 12

1623179

CSC9YE

AI Assignment

The Task To develop an AI Agent to provide natural mobility to wheel-chair bound people. The hardware consists of a wearable exo-skeleton controlled by a miniature PC. The user input to the system is achieved using an EEG device to record and analyse the user's brainwave patterns, and a speech recognition system for voice command/control. The use of these input systems means that the user can issue both high-level and low-level commands.

The agent will perform the following actions: 1. Walking forward. 2. Stepping forward and backwards. 3. Turning left and right. 4. Stopping. 5. Sitting down and standing up. 6. Ascending and descending stairs. Goals and Performance Measures Goal- to get the user to his or her destination safely. Performance measures: to avoid collisions; to not fall-over / trip-over; to do so whether standing still or performing manoeuvres.

The Environment The agent will be designed to operate primarily in an outdoors urban environment. This consists of: pavements, roads, static ( lampposts, bins) and moving (other agents, pedestrians, cars) obstacles and stairs. The environment is characterised in the following way:

2 of 12

1623179 1. Partially observable:

CSC9YE

AI Assignment

The agent will not be able to see round corners. Vision and proximity sensing will also be limited when in a crowd situation. 2. Stochastic The environment is unpredictable- the next state of the environment has a degree of uncertainty i.e. a pedestrian could suddenly step out of a shop doorway. 3. Sequential The agent performs a sequence of actions, each action depending on the outcome of the previous. Future actions may also be affected by the outcome of the current action. 4. Continuous There are continuous signals coming into the sensors from the environment. 5. Dynamic The environment can change over time e.g. street furniture being set out or removed. Also things like roadworks and building works have to be taken into account e.g. scaffolding erected on a shop-front. 6. Multi-Agent Other pedestrians, car drivers.

Actuators The actuators will consist of muscle wire and servo-motors. The muscle wire will be woven together and integrated with the servo motors to produce a rigid wearable exo-skeleton. This should be able to be worn under clothing. Sensors The agent will receive input from the following sensors: 1. An EEG device provides user input. This allows the user to issue commands by manipulating their alpha and beta brainwave patterns. 3 of 12

1623179

CSC9YE

AI Assignment

2. A microphone for speech recognition provides user input. 3. A vision system will be employed for obstacle and road / pavement detection. This will be mounted on the user's head. 4. Ultrasonic proximity detectors are used for close-range obstacle detection. 5. Feedback from the servo-motors, which provide an output representative of the powerload. 6. Accelerometers for velocity data. 7. Flux-gate digital compass to determine directional orientation1. 8. Inclinometers with optoelectronic sensors will be used to maintain balance1. 9. Potentiometers attached at the limb joints to provide angle data. Sensor Processing This will involve the following. Elecro-mechanical Sensor Processing As the digital compass has an analogue output, this is converted into a digital format using an ADC (Analogue Digital Converter. The accelerometers already provide output in digital form and thus the output of these can be used directly. The servo-motor feedback is the difference between the desired and actual position of the rotor. This effectively describes the load the motor is under. This difference is then used to change the current (and hence the power) to the rotor. Thus, if the agent encounters an uphill path, the load will increase and the output from the motor will increase correspondingly. This is used to ensure that a constant velocity is maintained on inclines. As this can be achieved with with an electrical circuit, no processing is necessary and the current delivered can be used to feed back load information to the agent. User Input Processing Both the user inputs come in the form of waves (alpha / beta waves and sound waves), and these will need further processing to be useful. This shall be done using an Artificial Neural Network for signal processing.

4 of 12

1623179

CSC9YE

AI Assignment

A better solution would be to use a Dynamic ANN, as this can perform better in a noisy environment. These have an additional inhibitory neuron providing feedback into the network. This causes similar features in waveforms to be enhanced while suppressing dissimilar features. Dynamic Neural Networks can theoretically provide an order of magnitude increase in processing capability but this remains to be proven.

Visual Processing The visual processing system will perform the following recognition sequence:
Image as captured

Gaussian Blur at 3 pixels applied

Threshold level at 83 applied

5 of 12

1623179

CSC9YE

AI Assignment

Edge detection applied

Representation Has to be able to determine where the kerb is; know what is pavement and what is road. Also detect stairs. These can be determined through pattern recognition applied to the camera images. Pavements, kerbs and roads follow a uniform, parallel pattern in most cases, and this can be used in the detection algorithm Reflex Agent Is able to determine if the user is attempting to preform a potentially dangerous action e.g. stepping into the path of a moving vehicle; in this case the control inputs to the actuators will be suppressed and a warning issued to the user. This is also used to avoid collisions from other agents e.g. if the user is standing still and another agent (say, one who isn't actually looking where they are going) is on a collision path, then the reflex agent will cause the user to step out of the way. Environment Model A 2-D map of the environment is generated using the camera and proximity sensor data. This then allows the agent to plan ahead. This also needs to model the behaviour of the other agents in the environment in order to try and predict their movements. Thus by performing searches in the 2-D space, the agent can model the consequences of various actions. Modelling the Limbs The agent will not always be able to see the legs (i.e. if the user is looking straight ahead), so 6 of 12

1623179

CSC9YE

AI Assignment

a model is used to record the state of the limbs. This information would include overall direction, overall angle, angles of the joints between limbs, load currently experienced, current velocity. This is then represented in a knowledge-base which is then used by the agent as a form of self-analysissee Representing Knowledge. Learning For the limb-functionality, the learning is supervised. This is because the ability to move must be taught before the system is trained with a user. It is effectively a two-tier system, being divided into basic motor and reflex functions (which are the same across all instances of the system), and higher-level functions: user command /control; environment acquisition; area models. Basic Function Learning An able-bodied person will wear the training harness, which will have in addition several 3D position recorders installed at specific points i.e. hips, knees and ankles. They will then perform a series of actions and the position data recorded. When the data is analysed using Fourier transforms and correlated with the actuator data, this will give the basic movement parameters for the system. This also has the advantage that the transitions between movements can be smoothly achieved. This is based on a movement analysis system developed in the 1930's. See fig 1 below2.

Fig.1

The use of this system means that although discrete movement commands may be issued either by the user or the agent (in response to sensor events), these are effectively merged together. The fig.2 illustrates the difference : 7 of 12

1623179

CSC9YE

AI Assignment

Fig.2

Commands required: 1. Forward. Stop. Turn 90. Forward 2. Forward. Turn 90. Off-line Learning Off-line learning will be performed as follows: The movement data accumulated from the training system (as above) will be presented to the neural network as a continuous digital waveform correlated with the sensor and actuator data. This means that, rather than having to set precise output-values for each of the muscle-strands and servos, the values can be calculated as a function of the desired movement. This has the advantage that it is unnecessary to have precise values for the movement sequences hard-wired into the system. This also means that other parameters (such as surface incline) can be added into the function with little difficulty. Advanced Functions The mapping model(s) initially required by the agent will be mathematically transcribed and loaded onto the system. This is then used by the search algorithm to produce the paths needed to achieve the agent's goal. User command / control is dealt with next in Neural Network Training, and environment acquisition is looked at in Planning and Searching.

8 of 12

1623179 Neural Network Training

CSC9YE

AI Assignment

The neural network will be trained separately to perform the following tasks: 1. NIA command recognition. This will be user-specific training. The user will initially train on a simulated system in order to negate the possibility of injury to the user or damage to the system. Once the user can control the system with a high degree of accuracy, the neural network software and parameters will be transferred to the agent's system software. 2. Speech command recognition. Again, this type of training is best performed on a simulator 3. Movement control The output from the off-line learning will be used as input to the ANN for indirect motor/ muscle wire control. The user issues a command such as 'Forward' and on recognition, the agent will send an output stream to the actuators. The system will continue to move forward until another command is received- either from the user or from the system's sensors. For each of the neural networks, the training involves a training set of data and a test set of data. When the training set is applied, the weights on the synapses are adjusted in order to try and achieve the desired result. A neuron multiply its inputs by the corresponding synaptic weight and then sums the results. This has an activation function applied to it- often a sigmoid function, but others are possible. If the result is over the functional threshold, the neuron fires, broadcasting the result to its output synapses. This is then received by the input synapses of all the connected neurons in the next layer (could be the post-synaptic layer or a hidden layer). Planning and Searching This is a two-level process. The system will have a street map of the local area in which road junctions are modelled as nodes. The pavement that connects these junctions are modelled as edges. Thus houses/shops etc. would appear on the edges. When the system arrives at the junction corresponding to the required edge, the detailed 2D object map as described below determines the exact required location within the edge.

9 of 12

1623179

CSC9YE

AI Assignment

The local environment (i.e. the edges of the street-map model) is represented as a 2D object map. Some of these objects will be static and some dynamic with regards to location within the model. The system must search for a route to get from its start point in the object map to the desired location. The map is comprised of known data for the area along with dynamic data generated by the sensor processors i.e. Moveable street furniture, other agents.

The search space is constrained within the map by factors such as: not deviating from the pavement (unless the road is to be crossed); not colliding with shop-fronts, objects or other agents. As the model can be continuously changing due to the movement of other agents, at each time-step, the agent will have to preform a collision detection algorithm and update the model. This would check whether the next step would result in in a collision. It would make an attempt to determine the probable movements of the other agents by performing an extrapolation of their current speed and direction. Depth first search used. Each node within the constrained search space is an area not occupied by an object or other agent. Thus we are modelling the space available to move into.

Representing Knowledge Reasoning and Logic: The knowledge that needs to be stored is: The agent requires in addition to an environment model, a means of representing its own state. This could be considered the machine equivalent of human self-awareness. For example: If the agent is able to monitor the charge on its batteries (or possibly some exotic power cell e.g. hydrogen-based) and knows its own power usage, then it would be able to calculate whether or not a requested destination was in its range. Thus if the user requests a destination outside this range, the agent can inform the user that a charge or battery change is required prior to undertaking the journey. In First Order Logic, this can be represented in the following way: If we represent the required Journey (j), the actual Charge on battery(b) and the charge Required to make the journey (r) then: x Journey(x) = Charge(b) >= Required(r) 10 of 12

1623179

CSC9YE

AI Assignment

This means that there exists some journey for which the battery has a charge greater than or equal to the charge required to make the journey. This is a simplification, and would need to take into account the extra power required when ascending a steep slope, and the fact that a return journey is usually required.

Another example would be in the modelling of the agent's artificial emotions. In order to generate inhibitory feedback when encountering moving vehicles (thus precluding the possibility of walking in front of the vehicle) the following can be used: x Vehicle(x) ^ Moving(x) Dangerous(x) Which means all moving vehicles are dangerous Artificial Emotions These include happiness which is increased when performance measures are satisfied or the goal reached. Fear, which is an inhibitory emotion designed to prevent reckless behaviours e.g. getting too close to the edge of a cliff. These features would be included in the agent's 'self-model' and are used to feedback into the behavioural output of the agent. Thus if the agent perceives a potentially dangerous situation, it may either stop, or take slow-careful steps. On the other hand, if the agent's algorithms are performing well, then the system could take long-quick strides. Turing Test The agent could be said to pass the Turing Test if the user is able to confidently walk in public situations without any other person being able to identify that the user is augmented by an artificially intelligent system (obvious hardware notwithstanding). The agent might not be able to hold a conversation with another person, but if the user's behaviour appears indistinguishable from normal to an observer, then I suggest that for Weak-AI at least the test has been passed.

11 of 12

1623179 Conclusion

CSC9YE

AI Assignment

This report shows that the complexity involved in performing AI tasks can be overcome by breaking the system in a modular approach, and by using different AI technologies for specific tasks within a structured framework. This provides the power and flexibility required by such systems. In my opinion, the main challenge is in the integration and of- and communication between- these modules. Future Work The Fourier Transforms as discussed in Learning are operate in a mathematically similar way to the neurons in a neural network i.e the summation of inputted data. FFTs (Fast Fourier Transforms) are used in the mathematical representation of holograms. It may be that the neural network could implement the FFTs as part of the neural functionality, processing the inputs and storing information in a holographic manner. This in turn could lead to vastly superior AI processing capability. Another possibility is the reduction in size of the EEG sensor device, such that it can be inserted discretely as an implant. Visual implants have recently been performed successfully, and heart implants (valves / pacemakers) have been around for some time. Although the surgery involved in implanting an EEG sensor is invasive, the procedure would not be as life-threatening as heart surgery.

References
1

Jacobson L (1994) Garage Virtual Reality, SAMS Publishing, ISBN: 0-672-30270-5 (pg380) Talbot M (1996) The Holographic Universe, HarperCollinsPublishers, ISBN: 0-586-09171-8 (pg 28-29)

12 of 12

S-ar putea să vă placă și