0
$\begingroup$

So I feel like this should be possible, I'm just not sure how to do it. Let's say I'm generating a signal with a sample rate of 10K samples/second. Then let's say my signal is comprised of X number of frequencies( we'll use 3 for this example). For each sample I want to take the three frequencies and add them together, lets use 1000Hz, 1250Hz, and 1500Hz. Now that i've added them together, they might be too large (lets say the max value i can output is a 1) so then i need to normalize them. Is there a way to calculate the maximum or minimum value that these three frequencies will produce over a given period of time/number of samples so that i can get normalize my signal accordingly?

Thanks for any input on this!

$\endgroup$
  • $\begingroup$ If the sine waves are all harmonically related, the relative starting phases will affect the maxima peak. $\endgroup$ – hotpaw2 Aug 21 '15 at 23:13
1
$\begingroup$

The maximum value will occur when the frequencies all constructively interfere, which will certainly happen periodically if they are different frequencies. Normalize by the sum of all the individual magnitudes.

$\endgroup$
  • $\begingroup$ For a half/double frequency with a phase shift for the individual components this is not true, e.g., $s_1(n) = \sin(2\pi f_0/f_s n)$ and $s_2(n) = \sin(4\pi f_0/f_s n + \pi/2)$. However, summing the invidual magnitudes provides an upper limit. $\endgroup$ – Brian Aug 22 '15 at 12:04
  • $\begingroup$ lets say all the sine waves have a magnitude of 1, if i divide each point by 3, then i know that my max value will be no greater than 1, but i also don't think it will be 1, but rather something around .96 or something. so that wouldn't normalize the signal to the maximum value that i'd like (for this example i'd like the max to be 1). I know i can sum all the sine waves, find the max value, and then divide the whole signal by that value and then everything would be normalized to 1, I was just thinking there would be a way to calculate this before i even started adding the sine waves together $\endgroup$ – gerrgheiser Aug 24 '15 at 0:29
0
$\begingroup$

You describe the sum of the signals as mathematical sum of the sine waves and get derivatives. You might get local maxima, but you know that they are limited to the range of a 250Hz period (which is a multiple that creates the 3 frequencies). You could use a tool such as GeoGabra to get a feel of it. Note that the phase of the three frequencies impacts the results.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.