Linear phase shift, each frequency's starting phase is evenly spread out over 360°, Vpp = 16.9x the base amplitude, which feels pretty good considering there are 70 tones added together.
Do you really mean peak-to-peak, and not peak? And "base amplitude" means just the (single-sided) peak amplitude of the sine?
Then 16.9 would imply a crest factor of 16.9/2/(sqrt(0.5)*sqrt(70)) = 1.4283, which would very good for the sum (a single sine wave already has crest factor sqrt(2)).
If you mean this value, then it would be only approx peak, not peak-to-peak.
# print('peak: %.3f' % (max(y)/2-min(y)/2))
Thanks for sharing your results!
To try and clarify, when I said "Vpp=16.9x the base signal amplitude", I was incorrect, thanks for catching that!. I actually calculated the Vpp of the end signal and divided it by the Vpp of a single tone. Each tone is calculated as sin(2*pi*N), so the amplitude is 1.0, and Vpp would be 2.0. So that value would be same as the overall single-ended amplitude divided by the single-tone single-ended amplitude (what a tongue twister!)
So for crest factor, I think the actual with the linear-phase method is 2.853. I added this code at the end of my script, after the normalization (which doesn't affect crest factor):
vpp = (max(y) - min(y))
vp = vpp/2
ac_rms = np.std(y) # AC rms and standard deviation are mathematically equivalent
print('peak to peak: %.3f' % vpp)
print('peak (SE): %.3f' % vp)
print('std-dev (AC RMS): %.3f' % ac_rms)
print('Crest Factor: %.3f' % (vp/ac_rms))
and I got:
peak to peak: 2.000
peak (SE): 1.000
std-dev (AC RMS): 0.350
Crest Factor: 2.853
So your iterative phase guessing is about 35% (2.6dB) better. I'm curious if that would make a noticeable difference, I'm not sure. How quickly does your example script run for the 10kpt 1000 iteration script you shared?