  Aims. To describe the theory of surface layer independent model fitting by
phase matching and to apply this to the stars HD49933 observed by CoRoT, and
HD177153 (aka Perky), observed by Kepler Methods. We use theoretical analysis,
phase shifts, and model fitting. Results. We define the inner and outer phase
shifts of a frequency set of a model star and show that the outer phase shifts
are (almost) independent of degree $\ell$, and that a function of the inner
phase shifts (the phase function) collapses to an $\ell$ independent function
of frequency in the outer layers. We then show how to use this result in a
model fitting technique to find a best fit model to an observed frequency set
by calculating the inner phase shifts of a model using the observed frequencies
and determining the extent to which the phase function collapses to a single
function of frequency in the outer layers. We give two examples applying this
technique to the frequency sets of HD49933 observed by CoRoT and HD177153 (aka
Perky) observed by Kepler, and compare our results with those of previous
studies and show that they are compatible with those obtained using different
techniques. We show that there can be many different models that fit the data
within the errors and that better precision on the frequencies is needed to
discriminate between the models. We compare this technique to that using the
ratios of small to large separations, showing that in principle it is more
accurate and avoids the problem of correlated errors in separation ratio
fitting.
