Intruder detection ANS

Page 1

YouGoal:may

TP Intruder Detection Prerequisites / knowledge:  Principle of ultrasound  Knowledge of 2 layer neural networks (ie without hidden layers)

ToStartupstart, turn on the robot and position it a few tens of centimeters from a wall, so that it cannot move when its wheels are turning. Take a flat object such as a box for example that you can place between the wall and the robot to symbolize the intruder.

Question: When you remove the obstacle, the robot continues to beep. Why does the robot do this?

Configuration : Cf. scenario "detection of intruders" part: "preparation phase of the work environment"

Learning phase without intermediate layer Cf. scenario "detection of intruders" part: "Learning phase without intermediate layer" As it is a supervised learning, it is first up to you to show the robot how to behave. First of all do not put anything between the robot and the wall and press several times on the stop action next to the neural network. Then place the obstacle between the robot and the wall, in a very perpendicular way, and press "beep" several times

Answer The only input to the neural network is the distance calculated byultrasound. From this distance, the network will calculate a prediction for each of the two possible actions, namely beep or stand

have noticed that in some learning, especially those using the camera, layers of intermediate neurons are added. We will show you a simple example that allows you to better understand the difference that intermediate layers of neurons can bring. Here we will use the robot's ultrasound to make it act as an intruder detector; the robot will have to turn its wheels when it sees an intruder in front of it.

still, and it is the action that will have the greatest prediction that will be retained. What we can do is draw the curve of the predictions of the two actions as a function of the distance received by the ultrasound. For a given distance, we will know which action is chosen by looking at which curve is above the other. If there is an intruder, the distance returned by ultrasound will be shorter, so we would like it to be first the curve corresponding to "remain motionless" that is above, then the one corresponding to "beep"

What kind of (simple) function do you offer to remedy this problem? (NB: you can reason graphically) In our case, the network multiplies the input value by a weight (here ai);the curves of the predictions are therefore proportional lines. We then see that there is a problem; no matter what value the ultrasound will return, it will always be the action with the strongest weight that will be chosen; the information that ultrasound provides is therefore useless. To remedy this, it is enough to add a constant. In this case, we will be dealing with affine lines, and it will then be possible to have an area where the first curve is above the other and another area or it is the other way around. This constant is called a neural bias denoted bi.

Answer: When the intruder is at an angle, the signal emitted by the robot will be deflected, and the distance calculated by the ultrasound is not shorter than that of the wall but on the contrary much larger. We find ourselves in a situation where we would like curve 1 to be above for small and large distances, and curve 2 to be above for the values of the middle.

Question: Why doesn't it work anymore?

Let's go back to the software. Check the "neural bias" box and start learning the same way again. This time, the robot should be able to differentiate between the two scenarios; it will know that it is necessary to stop when there is no obstacle and turn the wheels when there is an obstacle. Now try to put the obstacle not perpendicular to the robot, but in a kiss. Then there is a problem; the robot fails to detect it. In fact, you may have resumed training, but you will not be able to detect both the intruder when it is perpendicular and at an angle.

But the only curves we can have with this model are straight lines, no matter how we cross them, we can never be with 3 distinct zones. To solve this problem, we should therefore no longer have to deal with the right. And this is where the intermediate layers of neurons will come in. These layers are nonlinear functions that will allow the prediction curves to be something other than straight lines and therefore to ensure that there are three distinct areas.

Let's go back to the software. In the AI window, in intermediate neuron layer, type 5. Retrain the robot with the 3 different scenarios and showing it how to act each time. When there is no intruder, stop. When there is an intruder at an angle, turn the wheels. When there is a perpendicular intruder, turn the wheels. After a while, the robot will behave as expected.

Analogy with the human brain to explain how a neural network works.

Bunch of parameters

A biological neuron is a nerve cell capable of transmitting information to other neurons through its various connections (synapses). It consists at its base of a structure formed by ramifications, the dendrites, which receive electrical signals from other neurons. When signals reach or exceed a certain threshold, the neuron in turn produces a nerve impulse that excites other neurons as it passes through the axon and terminal ramifications. The frequency of nerve impulses sent by a neuron depends on the sum of the excitations received: the higher the latter, the greater the frequency.

Note on the evolution of connection weights (evolution)

Artificial neural networks are a model as close as possible to the real functioning of biological neural networks from which the implicit associations of the brain emerge. Transposing their structure into computer systems would allow programs to acquire implicit knowledge on their own. A good understanding of the functioning of biological neurons would make it possible to better understand their equivalents in computer science.

• An activation function, which associates each aggregated value with a single threshold dependent output value.

• Inputs (X or E) can vary from 0 to 1, ( 1 to 1 with the sigmoid function[2]), the output applies the same operation

A neuron is a unit of calculation. It can have 1 or more inputs and 1 output calculated thanks to different characteristics:

• An aggregation function, which allows you to calculate a single value from the entries and corresponding weights.

• The result of the calculation of the neuron is none other than the sum of the products of all inputs and weights, all passed through a "filter" called activation function (output).

• Each of the entries has a weight (W) given to each of the entries and allowing to modify the importance of some in relation to the others.

• A threshold (or bias), to indicate when the neuron should act.

Moreover, artificial neural networks are simply systems inspired by the functioning of biological neurons. The most famous of them is the multilayer perceptron Preparation General principles

Or to select the settings yourself, launch the program. Go to the Settingstab, then to Settings View and select Intermediate in order to access additional settings. 1) Select "ultrasound" (Obstacle Distance Mode) 2) Turn off "speed" Select 1) Choosing supervised learning 2) Choosing supervised learning SENSOR TAB

3) Put learning speed to 0.05 4) Uncheck "neural bias"

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.