Given a set of N sine waves, each with their own amplitude and frequency, is there a straightforward way to select their phases such that the sum over all sines maintains a constant amplitude, given that the frequencies are spaced equally apart by df?
If all phases are 0, then at t=0 all the sines will constructively interfere to make a huge spike, then they will destructively interfere until they become commensurate again at t~1/df. My goal is to select a set of phases for the different sine waves which will leave the resultant sum with roughly constant peak-to-peak amplitude from t=0 to t=1/df. Picking all random phases does do a pretty good job, but ideally I'd like to find a way to find an optimal set of phases, or at the very least come up with a metric to quantify "how good" a given set of phase is at accomplishing my goal, which I can then optimize on.
edit: To clarify I'm not looking to have the sum of sines equal a constant value, but rather have the resulting periodic function have a roughly constant peak-to-peak amplitude. For instance, for a given set of frequencies all with equal amplitudes, if all phases are set to 0 then the resulting sum will look like:
Clearly, in the random-phase case the peak-to-peak amplitude of the resulting oscillatory function is roughly constant over the given time series, while in the 0 phase case it spikes often at times where commensurate sines add constructively. I'm looking for a way to find an optimal set of phases which keeps the peak-to-peak amplitude roughly constant, without just generating a million different random combinations and picking the best one.
Any help would be greatly appreciated.