Hi,
Let me write out the formula for the bn and see if this makes sense to you, or perhaps you can explain what you are doing here in a little more detail..
The bn come from the integral:
bn=(1/pi)*integral(f(x)*sin(n*x),dx,-pi,+pi)
which in words is:
"One over pi, times the integral of f(x)* sin(n*x) with respect to x, over the interval from -pi to +pi."
or in another form:
bn=(1/pi)*integral(f(x)*sin(n*x),dx,0, 2*pi))
That gives us a definite result, and for the unipolar square wave that has amplitude 1 (ie f(x)=1) from x=0 to x=pi and amplitude 0 from x=pi to x=2*pi we get:
bn=(1/pi)*(1-cos(pi*n))/n
and after multiplying that by pi we get:
Bn=(1-cos(pi*n))/n
Plotting this function from n=1 to say 5, we see a wave that is zero whenever n is an even integer, and non zero values for when n is an odd integer. The simplification is:
Bn=2/n
for n odd only from 1 to +infinity, or:
Bn=2/(2*k-1)
for k from 1 to +infinity, and of course the amplitude of bn is (1/pi) times either of these.
So for n=1 or k=1 we get:
B1=2
so we get:
b1=2/pi
This does not change, so i am not sure what you are doing here with 'negative frequencies'. Perhaps you meant allowing the signal to go negative as well as positive, as in a bipolar (plus and minus) square wave that has amplitude 1 from 0 to pi and -1 from pi to 2*pi.
A spectrum analyzer would give a reading of the normalized amplitudes, relative to the fundamental frequency. So if in the above we had b1=2/pi, then b3 would be equal to 2/(3*pi), and b5 would be 2/(5*pi), and these have amplitudes in decimal approximately:
0.6366
0.2122
0.1273
but the spectrum analyzer would see the 0.6366 and convert that to 1.0000 (multiply by the reciprocal of 0.6366 which is pi/2 or approximately 1.5708). It would then multiply the others by this same factor so we would get:
1.0000
0.3333
0.2000
so you can see that what we have now is:
1
1/3
1/5
and if we continued with more harmonics we would see:
1/7
1/9
1/11
etc.
That's because the square wave is made up of harmonics that are 1/n times the amplitude of the fundamental which has normalized amplitude exactly 1.
What this tells us is the amplitude relationship of each harmonic to the fundamental, which is usually of prime importance in design work. There are estimates that are known by people in the field that work out good in practice for certain types of designs, and knowing that (say) the 11th harmonic is say 20db down from the fundamental could mean the design is adequate, but if it is only say 10db down it is not good enough yet.
For the square wave we see that the 11th harmonic is already more than 20db down from the fundamental because 20*log10(1/11) is slightly more negative than -20, so if that was the final signal then the design would have met the spec. Likewise, if the spec was that the 9th harmonic had to be 20db down, then it would not meet the spec because 20*log10(1/9) is only about -19db down from the fundamental.
The relationship is almost always shown as a harmonic amplitude relationship to the fundamental for reasons like this because it allows for quick and universal comparisons.
I suppose you could have a spectrum analyzer with settings to output the actual amplitude or the normalized amplitudes. Some put out a signal that you can actually read on a scope, with a plot similar to what we plotted above for variation of the continuous n. In this case you can adjust the vertical gain to put the fundamental amplitude at some grad like "10", and then you could read off the other amplitudes relative to that number. Or better yet, "100", and then you could read off the other amplitudes in percent. So say the output for the fundamental was 10 volts, you could adjust the vertical for 10 grads, but thinking about them in terms of being divided by 10 each, which would give 100 minor divisions. Each minor division would then be 1 percent, and since the fundamental is adjusted for an exact 100 minor grads, then you would be reading amplitude in percent of the fundamental.