Why do I get only odd harmonics appearing? This not only happens at saturation of the transfer curve, but also in the linear portion of the curve.
I make an input signal and the power of this will saturate the amplifier.
So the details of the amplifier is that I have a a transfer curve for power in and power out. I also have a transfer curve for power in and phase deviation. Then I make a phasor that amplifies each point on the signal to do AM and PM of the amplifier.
This is basically how I do it
My input signal, x(t), is the sum of two sine waves
For each point on the transfer curve above I apply Amplitude and Phase modulation by using this array
modulating_phasor = (power_out / power_in) * exp(i*phase_deviation)
Then I look at my input signal and lookup where its value matches the input power of the transfer curve and use that location in the modulating_phasor array
output_signal = x(t) * modulating_phasor[location]
This makes the output signal complex array so I take the absolute value and for parts that should be negative, I multiply that location on by -1 by finding the correct location on input signal.
Now this is my output and no matter what my input level on my signal is, I always get odd harmonics!