I'm trying to automatically measure the amount of intermodulation based on a broadband spectrum capture(which is averaged over time). There is a given set of reasonably narrowband carrier waves, which are always present. If there's a non-linearity in the RF-path, such as a rusty bolt(which is basically a point contact diode) or an amplifier that's over/under driven, these will produce a set of intermodulation products.
So far, I've managed to automatically calculate the composite second order(CSO) and composite trible beat(CTB) frequencies. The thing is: a lot of CSO/CTB frequencies are exactly the same. So there are e.g. 10 CSO products at 622.25 MHz and 2 CTB products at 623 MHz. But that means they scale differently.
My idea to detect intermodulation is to numerically integrate the received power in a very narrow bandwidth around the precalculated CSO/CTB frequencies and try to find some thresholds for the result of that integral.
My question is: how should I scale n CSO/CTB-products that come together in a single point? Should I just subtract 10*log_10(n) dB from that datapoint? Should I also include scaling for the binomial coefficients of the CSO/CTB products?
Side question: are typical nonlinear distortions very frequency dependent? If yes, I would imagine that scaling for the number of products won't be very significant.