0

I'm attempting to write a Graph Neural Network (GNN) to solve the Time Difference of Arrival (TDoA) multilateration problem. The problem statement is as follows: given the known coordinates of 4 sensors, and the complete set of pairwise arrival time differences of some signal, I wish to reconstruct the unknown coordinates of the signal source. There are many solutions to this problem, and I am investigating the use of GNN's purely out of curiosity.

I'm planning to use TensorFlow's tensorflow_gnn API and, while I've had graph theory, I've unfortunately found the tensorflow_gnn documentation to be a rather obtuse mix of math, computer science, and machine learning jargon. I've decided to model the problem as a fully-connected graph with 5 nodes whose features are their coordinates, representing the 4 sensors + 1 signal source, and 10 edges whose features are the signal arrival time differences (e.g. the edge between nodes 1 and 2 is associated with a feature whose value is the signal arrival time difference between those nodes). I've put together a corresponding GraphTensor object:

def create_graph_tensor(node_coordinates, time_differences):
        graph_tensor = tfgnn.GraphTensor.from_pieces(
                node_sets = {
                        "nodes": tfgnn.NodeSet.from_fields(
                                sizes = tf.shape(node_coordinates),
                                features = {
                                        'coordinates': node_coordinates
                                }
                        )
                },

                edge_sets = {
                        "pseudoranges": tfgnn.EdgeSet.from_fields(
                                sizes = tf.shape(time_differences),
                                features = {
                                        'time-difference': time_differences
                                },

                                adjacency = tfgnn.Adjacency.from_indices(
                                        source = ("nodes", np.array([0,0,0,1,1,2,0,1,2,3])),
                                        target = ("nodes", np.array([1,2,3,2,3,3,4,4,4,4]))
                                )
                        )
                }
        )

        return graph_tensor

enter image description here

It isn't clear to me, however, where I might go from here. How do I add this as a layer to a sequential model, and then train the network to predict the coordinates of the 5th node (i.e. signal source)? I know in a very high-level sense what I need to do, but implementing it in code using this API is another thing. The documentation seems to be restricted largely to describing a number of rather complex examples.

Where do I go from here?

0 Answers0