# Algorithm to estimate coherence when measuring a transfer function with a swept sine

I use a swept sine to measure a transfer function, multiplying the reponse by the in phase and quadrature excitation to get a complex response at each frequency. Can you suggest an enhancement to this technique to estimate coherence as well to give an estimate of measurement quality, especially at higher frequencies where the response is small.

• Are you talking about this definition of coherence? [Coherence](en.wikipedia.org/wiki/Coherence_(signal_processing) – Jacob Oct 23 '12 at 15:31
• Yes, but I want to calculate it or estimate it on the fly, while the swept sine (or really stepped sine, so I can integrate over a number of cycles) is running. – Nigel Davies Oct 23 '12 at 15:47

For example, if you measure at each frequency for Ncyc cycles, then divide these into Navg measurements each of Ncyc/Navg cycles.