In a first embodiment, electrodes are coupled to a surface at first, second, and third locations, the first location being further from the third location than from the second location. Impedance is measured at distinct frequencies between pairs of the electrodes. As a result, impedance is measured at differing regions below the surface, one region being deeper below the surface than the other region. In a second embodiment, a microfluidic device carries out an analysis. The analysis may be within a flexible patch adhered to a surface, or may be in a solid device implanted in a body of liquid surrounded by tissue. The analysis may involve pumping a fluid or may involve drawing an analyte electrophoretically through a microfluidic channel.