[hpsdr] Level calculation error in Two Tone Test generation routine

john_eckert at keysight.com john_eckert at keysight.com
Tue Nov 22 20:15:19 PST 2016


There is an error in the calculation of the levels for two tone testing.  The result is that the total output power is half of what is expected.  I believe the author intended to reduce the power of each tone by half with respect to a single CW tone.  This would have resulted in exactly the same output power.  Unfortunately, the voltage levels are being reduced by one half resulting in each tone dropping to one quarter the power.  The result is that the Two Tone power is at one half the desired power.

With the current code IMD testing can't be made at full power and current tests are at one half the indicated power.

Problem routine:

   private void chkTestIMD_CheckedChanged(object sender, System.EventArgs e)
        {
            if (chkTestIMD.Checked)
            {
                udTestIMDFreq1.Enabled = false;
                udTestIMDFreq2.Enabled = false;
                udTwoToneLevel.Enabled = false;
                udTestIMDPower.Enabled = false;
                chkInvertTones.Enabled = false;
                double ttfreq1 = (double)udTestIMDFreq1.Value;
                double ttfreq2 = (double)udTestIMDFreq2.Value;
                double ttmag = (double)udTwoToneLevel.Value;
                double ttmag1, ttmag2;
                ttmag1 = ttmag2 = 0.49999 * Math.Pow(10.0, ttmag / 20.0);    //      11/22/16   k2ox should be 0.707107

Hopefully a maintainer will change the 0.49999 constant to 0.707107.

73,
John
K2ox


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openhpsdr.org/pipermail/hpsdr-openhpsdr.org/attachments/20161123/7456362d/attachment.htm>


More information about the Hpsdr mailing list