-1

I have an electromagnetic sensor and electromagnetic field emitter. The sensor will read power from the emitter. I want to predict the position of the sensor using the reading.

Let me simplify the problem, suppose the sensor and the emitter are in 1 dimension world where there are only position X (not X,Y,Z) and the emitter emits power as a function of distance squared.

From the painted image below, you will see that the emitter is drawn as a circle and the sensor is drawn as a cross.

one emitter

E.g. if the sensor is 5 meter away from the emitter, the reading you get on the sensor will be 5^2 = 25. So the correct position will be either 0 or 10, because the emitter is at position 5.

So, with one emitter, I cannot know the exact position of the sensor. I only know that there are 50% chance it's at 0, and 50% chance it's at 10.

So if I have two emitters like the following image:

two emitters

I will get two readings. And I can know exactly where the sensor is. If the reading is 25 and 16, I know the sensor is at 10.

So from this fact, I want to use 2 emitters to locate the sensor.

Now that I've explained you the situation, my problems are like this:

  1. The emitter has a more complicated function of the distance. It's not just distance squared. And it also have noise. so I'm trying to model it using machine learning.
  2. Some of the areas, the emitter don't work so well. E.g. if you are between 3 to 4 meters away, the emitter will always give you a fixed reading of 9 instead of going from 9 to 16.

  3. When I train the machine learning model with 2 inputs, the prediction is very accurate. E.g. if the input is 25,36 and the output will be position 0. But it means that after training, I cannot move the emitters at all. If I move one of the emitters to be further apart, the prediction will be broken immediately because the reading will be something like 25,49 when the right emitter moves to the right 1 meter. And the prediction can be anything because the model has not seen this input pair before. And I cannot afford to train the model on all possible distance of the 2 emitters.

  4. The emitters can be slightly not identical. The difference will be on the scale. E.g. one of the emitters can be giving 10% bigger reading. But you can ignore this problem for now.

My question is How do I make the model work when the emitters are allowed to move? Give me some ideas.

Some of my ideas:

  1. I think that I have to figure out the position of both emitters relative to each other dynamically. But after knowing the position of both emitters, how do I tell that to the model?
  2. I have tried training each emitter separately instead of pairing them as input. But that means there are many positions that cause conflict like when you get reading=25, the model will predict the average of 0 and 10 because both are valid position of reading=25. You might suggest training to predict distance instead of position, that's possible if there is no problem number 2. But because there is problem number 2, the prediction between 3 to 4 meters away will be wrong. The model will get input as 9, and the output will be the average distance 3.5 meters or somewhere between 3 to 4 meters.
  3. Use the model to predict position probability density function instead of predicting the position. E.g. when the reading is 9, the model should predict a uniform density function from 3 to 4 meters. And then you can combine the 2 density functions from the 2 readings somehow. But I think it's not going to be that accurate compared to modeling 2 emitters together because the density function can be quite complicated. We cannot assume normal distribution or even uniform distribution.
  4. Use some kind of optimizer to predict the position separately for each emitter based on the assumption that both predictions must be the same. If the predictions are not the same, the optimizer must try to move the predictions so that they are exactly at the same point. Maybe reinforcement learning where the actions are "move left", "move right", etc.

I told you my ideas so that it might evoke some ideas in you. Because this is already my best but it's not solving the issue elegantly yet.

So ideally, I would want the end-to-end model that are fed 2 readings, and give me position even when the emitters are moved. How would I go about that?

PS. The emitters are only allowed to move before usage. During usage or prediction, the model can assume that the emitter will not be moved anymore. This allows you to have time to run emitters position calibration algorithm before usage. Maybe this will be a helpful thing for you to know.

off99555
  • 3,797
  • 3
  • 37
  • 49

1 Answers1

0

You're confusing memoizing a function with training a model; the former is merely recalling previous results; the latter is the province of AI. To train with two emitters, you need to give the useful input data and appropriate labels (right answers), and design your model topology such that it can be trained to a useful functional response fro cases it has never seen.

Let the first emitter be at position 0 by definition. Your data then consists of the position of the second emitter and the two readings. The label is the sensor's position. Your given examples would look like this:

emit2 read1 read2 sensor
  1    25    36     0
  1    25    16     5
  2    25    49     0
  1.5  25     9     5    distance of 3 < d < 4 always reads as 3^2

Since you know that you have an squared relationship in the underlying physics, you need to include quadratic capability in your model. To handle noise, you'll want some dampener capability, such as an extra node or two in a hidden layer after the first. For more complex relationships, you'll need other topologies, non-linear activation functions, etc.

Can you take it from there?

Prune
  • 76,765
  • 14
  • 60
  • 81
  • I do not have the position of the 2nd emitter in the training data. And this still look like a lot of training, because the real situation will be in 3D. – off99555 Jan 23 '19 at 02:12
  • From your item **1.** : "knowing the position of both emitters, how do I tell that to the model?" You tell it to the model in the training data. You control the training data; *put* it there. – Prune Jan 23 '19 at 18:06
  • "this still look [sic] like a lot of training". Yes, that's the way complex models work. You describe several characteristics and more problems thereafter. You have a non-trivial amount of discontinuities in the problem description; information theory says that you're not going to get out of this with a trivial amount of training. However, what you describe is still far simpler than the typical image-processing model, for instance. Training this should be relatively quick; the time will be spent in matching a model to your problem. – Prune Jan 23 '19 at 18:26