  Although knowing the feeder topology and line impedances is a prerequisite
for solving any grid optimization task, utilities oftentimes have limited or
outdated information on their electric network assets. Given the rampant
integration of smart inverters, we have previously advocated perturbing their
power injections to unveil the underlying grid topology using the induced
voltage responses. Under an approximate grid model, the perturbed power
injections and the collected voltage deviations obey a linear regression setup,
where the unknown is the vector of line resistances. Building on this model,
topology processing can be performed in two steps. Given a candidate radial
topology, the line resistances can be estimated via a least-squares (LS) fit on
the probing data. The topology attaining the best fit can be then selected. To
avoid evaluating the exponentially many candidate topologies, this two-step
approach is uniquely formulated as a mixed-integer linear program (MILP) using
the McCormick relaxation. If the recovered topology is not radial, a second,
computationally more demanding MILP confines the search only within radial
topologies. Numerical tests explain how topology recovery depends on the noise
level and probing duration, and demonstrate that the first simpler MILP yields
a tree topology in 90% of the cases tested.
