Showing posts with label Flex 5000. Show all posts
Showing posts with label Flex 5000. Show all posts

Thursday, March 3, 2011

TX Overshoot on Flex 5K


[Additional Notes:

Latest News, 9 MARCH 2011:

Per FLEX, this problem is now FIXED!!!

Gerald's Email to FlexRadio Customers states, in part:
"Fixed ALC overshoot and corrected leveler gain
target in the transmitter audio signal chain.
These changes have been verified by customers
on air and in the FlexRadio lab using a digital
storage oscilloscope to eliminate overshoot."

7 MARCH 2011:

The word from Flex is that they've tested a solution which looks very promising.

Also, additional analysis reveals that the overshoot isn't due to Gibbs Phenomena (as I first hypothesized (see below)), but instead I now believe it's because ALC action occurs before the "real" TX signal is converted to I and Q. Shifting a signal's frequency components each by 90 degrees can result in a time-domain signal whose amplitude exceeds that of the original ALC-limited signal, as demonstrated in the graph below:




(Click on image to enlarge)

Blue Waveform (Sawtooth)
= sin(2πx) + 0.5(sin(2π2x)) + 0.33(sin(2π3x)) + 0.25(sin(2π4x)) + 0.2(sin(2π5x)) + 0.167(sin(2π6x))

Red Waveform (Sawtooth w/components shifted 90o)
= cos(2πx) + 0.5(cos(2π2x)) + 0.33(cos(2π3x)) + 0.25(cos(2π4x)) + 0.2(cos(2π5x)) + 0.167(cos(2π6x))

[By the way, despite the way it looks, the Red waveform does not have a DC shift. If you examine the equation from which this graph was generated, you'll note that there are only cosine terms in the equation, and that there is no "constant" term, which would represent a DC shift.]

Imagine that the Blue waveform, being our TX signal, had been "normalized" by ALC operation to have a maximum amplitude of 1.0 (i.e. divide all the values in the graph above by 1.5 so that the Blue waveform has a Vpeak of 1.0). The Red waveform, which is the TX signal with its frequency components shifted by 90 degrees, would have a peak amplitude exceeding 1.0 if its components were also normalized by the same amount (divided by 1.5).

And so, to properly limit the signal, ALC must be applied after the conversion from real to complex data. Which, coincidentally, my fix (described below) does.

Interestingly, if a Triangle-wave's components are phase-shifted by 90 degrees, the resultant signal has an amplitude less than the original's amplitude. Which correlates nicely with our observation that we don't see overshoot with a Triangle wave as our signal, but we do if the signal is a Sawtooth wave.

Below is a plot from a MATLAB simulation.  It shows the following:


o  Audio sawtooth waveform, fundamental frequency of 200 Hz and band-limited between 200 and 2400 Hz, and of peak amplitude = 1.
o  Audio sinewave (200 Hz) of peak amplitude = 1 (will be used as reference).
o  The original audio sawtooth waveform, but now with its frequency components shifted by -90 degrees.

o  RF Output, LSB, with 200 Hz tone modulation overlayed (for comparison) on RF LSB waveform with sawtooth modulation (and both shifted +4 to that, when plotted, they won't cover our original audio waveforms).

o  RF Output, USB, with 200 Hz tone modulation overlayed (for comparison) on RF USB waveform with sawtooth modulation (and both shifted -4 to that, when plotted, they won't cover our original audio waveforms).


(Click on image to enlarge)

Note that the Sawtooth's RF waveform has a peak of 1.759 compared to the 200 Hz Tone's RF peak of 1.000, even though both the Sawtooth and the Tone have the same peak audio amplitude of 1.0.  Therefore, if a transmitter were adjusted so that, when driven with the tone, its output was 100 watts (peak), then if the transmitter were driven with a Sawtooth of equal amplitude to the tone, its peak RF output would be 310 watts (i.e. an increase of 4.9 dB in peak power).

And here is the MATLAB code for the simulation, for reference:


clear
clc

% k6jca SSB Modulation Example
%
% Let audio be a 200Hz Sawtooth, of maximum amplitude 1 and band-limited
% between 200 and 2400 Hz.

% Plot 10K points
for inc = 1:100000
    % time tick represents 0.1us.
    % So total simulation time will be 1e-7*1e5 = 10ms. (2 cycles of 200Hz)
    t = (inc-1)*0.0000001;
    x(inc) = t;

    % in-phase sawtooth waveform with frequency components
    % from 200 to 2400 Hz.  And scaled by 1.725 so that peak amplitude is 1.
    i(inc) = (sin(2*pi()*200*t)+ 0.5*(sin(2*2*pi()*200*t))...
         + 0.33*(sin(3*2*pi()*200*t)) + 0.25*(sin(4*2*pi()*200*t))...
         + 0.2*(sin(5*2*pi()*200*t)) + 0.167*(sin(6*2*pi()*200*t))...
         + 0.1429*(sin(7*2*pi()*200*t)) + 0.125*(sin(8*2*pi()*200*t))...
         + 0.1111*(sin(9*2*pi()*200*t)) + 0.1*(sin(10*2*pi()*200*t))...
         + 0.0909091*(sin(11*2*pi()*200*t))...
         + 0.083333*(sin(12*2*pi()*200*t)))/1.7275;
     
    % quadrature generated by shifting in-phase with a 90 degree delay
    % (i.e. subtract pi/2)
    q(inc) = (sin(2*pi()*200*t-pi()/2)+ 0.5*(sin(2*2*pi()*200*t-pi()/2))...
        + 0.33*(sin(3*2*pi()*200*t-pi()/2)) + 0.25*(sin(4*2*pi()*200*t-pi()/2))...
        + 0.2*(sin(5*2*pi()*200*t-pi()/2)) + 0.167*(sin(6*2*pi()*200*t-pi()/2))...
        + 0.1429*(sin(7*2*pi()*200*t-pi()/2)) + 0.125*(sin(8*2*pi()*200*t-pi()/2))...
        + 0.1111*(sin(9*2*pi()*200*t-pi()/2)) + 0.1*(sin(10*2*pi()*200*t-pi()/2))...
        + 0.0909091*(sin(11*2*pi()*200*t-pi()/2))...
        + 0.083333*(sin(12*2*pi()*200*t-pi()/2)))/1.7275;

     % For reference (and comparison) generate a 200 Hz tone of peak ampitude 1
     i_tone_200(inc) = sin(2*pi()*200*t);
     q_tone_200(inc) = sin(2*pi()*200*t - pi()/2);

     % Now let's generate our RF.  First, in-phase.  Frequency is 1 MHz.
     rf_i(inc) = cos(2*pi()*1e6*t);
     
     % quadrature by delaying rf by 90 degrees (subtract pi/2);
     rf_q(inc) = cos(2*pi()*1e6*t - pi()/2);
     
     % Now let's calculate out in-phase and quadrature channels...
     in_phase(inc) = i(inc) * rf_i(inc);
     quad(inc) = q(inc) * rf_q(inc);
     
     
     % ...and then add or subtract them to make LSB and USB
     lsb(inc) = in_phase(inc) + quad(inc);
     usb(inc) = in_phase(inc) - quad(inc);
     
     % For reference, let's also make LSB and USB using the 200 Hz tone,
     % so that we can see if its peak RF differs from the sawtooth's 
     % peak RF
     lsb_tone(inc) = i_tone_200(inc) * rf_i(inc) + q_tone_200(inc) * rf_q(inc);
     usb_tone(inc) = i_tone_200(inc) * rf_i(inc) - q_tone_200(inc) * rf_q(inc);
     
end

top = max(i);
top_q = max(abs(q));

top_lsb = max(abs(lsb));
top_tone = max(abs(lsb_tone));

figure
plot(x,i,x,q,x,i_tone_200,x,lsb_tone+4,x,lsb+4,x,usb_tone-4,x,usb-4);
grid on;
legend('sawtooth (input)','input shifted -90 degrees','200Hz Tone (Reference)','LSB of 200Hz Tone','LSB of sawtooth','USB of 200Hz Tone', 'USB of sawtooth');




My original post is below...]

On the topic of TX overshoot with the Flex 5000...

Last summer a friend of mine mentioned that he was having a problem with PowerSDR and his Alpha amplifier -- it looked to him as though RF overshoots at the Alpha's input were causing it to shut down, and these shutdowns were occurring frequently enough to really annoy him.

I decided to do a bit of investigation. When I looked at the RF envelope from my Flex 5000, I saw overshoots with my 1.18 Console. Thinking that the problem might be related to the software revision, I downloaded the 2.0.7 PowerSDR Console and ran my tests again. Below are snapshots of the OUTPUT RF waveform from my 5000 using the 2.0.7 console.

Oscilloscope is my Tek 2445 that I use to monitor my transmit RF (via an RF-sampler). The two horizontal cursors you see on its CRT mark the peak-to-peak level of the RF signal when the 5000 is in TUN mode and the Tune level is set to 10 watts.

For the following snapshots, PowerSDR is set to:
  • Freq: 3.863 MHz
  • Mode: LSB
  • Drive: 10
  • Leveler: Disabled
  • TX EQ: OFF
  • DX: OFF
  • CPDR: OFF
  • DEXP: OFF
(Why use 10 watts and not 100? At some point the PA will limit and it won't be able to deliver any additional power. If we run the experiments at high power, we risk having PA-limiting influence our results. But if we run our experiments at low power, we should be able to get a better representation of how high the peaks actually go, because they won't be subjected to PA limiting.)

Anyone can try this experiment with these setting. Here are my results:

First, two nicely behaving waveforms:


Notice how the peaks don't exceed (by much) 10 watts?

But look at these next two. Yikes!



The four snapshots are:

  1. Triangle waveform from internal internal software Transmit generator. Looks great!
  2. Pulse, from the internal software Transmit generator (at its default settings for Pulse mode). Looks great!
  3. Sawtooth waveform from the internal software Transmit generator. Yikes -- it greatly exceeds the 10-watt cursors! Peak power is 49 watts on my LP-100 power meter, yet DRIVE is set to 10 watts.
  4. My voice, saying "Ahhh" loudly into microphone. Yikes again! Peak power is about 40-50 watts on my LP-100 power meter, yet DRIVE is set to 10 watts.
Both the "Ahhh" and Sawtooth signals greatly exceed the 10 watt Drive setting on the 2.0.7 console, and the level of the voice signal is very similar to what I'm seeing with my modified 1.18.4 console.

In AM mode, the sawtooth (as modulation) looks exactly as it should, so I don't believe the issue with the sawtooth is that it's somehow "broken."

I thought I'd experiment with the code a bit and see if I could gain further insight...

First, I experimented with the ALC code itself, as my first suspicion was that the overshoot was due to the non-zero attack time. But nope, that wasn't it. I changed the attack time to 0 (so that the ALC was a true peak-detector, and not one with a non-zero attack time), and it made no appreciable difference in the gross overshoots experienced by voice or sawtooth SSB modulation.

I then played around with the location of the ALC algorithm, and the results are very interesting. If the ALC code is prior to the filter_OvSv routine (as it is in the version of code I'm using (v1.18.4) as well as in the SVN 3862 code that I downloaded), then both Voice and Sawtooth waveforms grossly overshoot the target power, per the photos above. In other words, the current ALC code in its current position, in either my console (1.18.4) or in the 2.0.7 console, does not properly limit the output RF for certain waveforms.

However, if I move the ALC code to just after the filter_OvSv routine (and change the buffers used for ALC in newDttSPAGC from buf.i to buf.o), then there is minimal overshoot for all waveforms (Tone, Triangle, Sawtooth, and Voice), and their peaks are all near the target power. In other words, the output RF looks beautiful. [Note: I wasn't able to test the PULSE waveform, because my 1.18 version of the console doesn't have PULSE as one of the options for the test generator].

I'll make a wild guess that the overshoot is due to the bandpass filtering in filter_OvSv and thus similar to Gibb's phenomena. But this is just a guess. Conceptually, it makes sense to me that the ALC processing should be as late in the processing chain as possible, and moving it to just after filter_OvSv seems to be a better place for it than prior filter_OvSv. However, I'll be the first to admit that I don't know what the ramifications are of doing this. Are other problems introduced? I don't know.

Thursday, July 17, 2008

Transmit IMD and voice quality

I've had people tell me regarding one radio or another, "This radio has great IMD numbers compared to others. How can it sound bad?" And usually the number they quote is the third-order IMD product, measured at full power. How accurately does this IMD measurement reflect, in the real world, how a radio will sound? 

Unfortunately, the effect of Transmitter IMD upon perceived voice quality is poorly understood. So we're venturing off on our own into uncharted territory... First, let's consider the effect of testing IMD at full power. Makes sense, right? But suppose I told you that voice signals have a "crest factor" of somewhere in the order of 9 dB? What does this mean? 

Well, "Crest Factor" is the ratio of the peak level to the RMS level. A 9 dB Crest Factor means that quite often our voices are at a level well below peak. Which of course, raises the question, "What's the IMD of my transmitter when my voice power is not at peak, but at, say, 9 dB below? (By the way, for a 100 watt transmitter, 9 dB below peak power of 100 watts would be 12.5 watts.) 

Let's say IMD was measured only at peak power (in this example, 100 watts). Now, suppose IMD in our particular transmitter worsens as power is decreased from 100 watts. Given what we know of the crest factor of voice signals, an IMD measurement made only at peak power will give a falsely positive indication of how the transmitter sounds. So doesn't it make sense that IMD should be measured not only at peak power, but at lower powers, too? 

Personally, I recommend making IMD measurements at 4 different power levels: Max power and then at powers that are 3, 6, and 9 dB below max power. For a 100 watt transmitter these four measurement points would be at: 100, 50, 25, and 12.5 watts. I believe this will give a truer picture of how a transmitter will sound in comparison to others. 

Another problem with IMD measurements is that they're often stated solely in terms of the 3rd-order product (that is, the product just to either side of the two-tones used in the test, when viewed on a Spectrum Analyzer). In my experience, defining transmitter quality with only the 3rd-order product of IMD is not sufficient in determining how a transmitter will sound. 

For example, here are two different IMD plots:

(You can enlarge either image by clicking on it.) 


The first plot is my Flex 5000 at 0.1 watts. The second is the same transmitter at 100 watts. 

Note how, in both plots, the third-order products are essentially at the same level relative to the two-tone test tones. 

Yet, these two transmitters sound different. 

The difference is subtle, yet it's there. And if you look at the images, it's obvious why there's a difference: it's because, at 100 watts, the higher-order distortion products are present, too. 

Sunday, July 6, 2008

Flex 5000 Driver Distortion vs. Final Distortion

Here's another test of TRANSMIT Audio. To listen to it, send an email to jca1955 "at" sbcglobal.net and ask for the 6 July 08 test file, and I'll send you the mp3 file.

This mp3 again contains two recordings, but this time the source of both recordings is the same 5K (and again, feeding into a second SDR-1K as RF-demodulator/recorder). One recording was made by demodulating the RF received from the 5K's output antenna connector (in other words, the output from the 5K's PA), while the other recording was made by demodulating the RF tapped from the coupling transformer between the Driver and Final stages of the 5k's PA.

In both cases, the 5K was operated at full power (100 watts) and fed into a dummy load. I sampled the Final output by attaching an RF "tap" (essentially a 100:1 voltage divider) between the 5K's antenna connector and my external dummy load. The tap's output was then fed to my "receive" SDR-1K via a big attenuator.

To sample the signal from the 5K's Driver stage (to the Final stage input), I added a single turn link to the transformer between these two stages which I then connected to a BNC. I then disconnected the coax that had been connected to the RF tap (the other end goes to the 1K) and connected it instead to this new BNC at the Driver output. I kept the same big attenuator that I had attached at the input to the 1K receiver. In this configuration signal levels (at the 1K) are essentially equivalent for both configurations when measured with the 5K in TUNE mode.

Again, I used my Heil PR-40 mic as the audio input, and I read the same phrase for each test. TX bandwidth was 100 - 5KHz.

The first recording is from the Driver stage output. The second is from the Final stage (i.e. taken from my external "RF tap" attached to the 5K antenna output). Notice how the Driver stage sounds clean and the output from the PA stage sounds worse? This points to the PA stage (the final two FETs) as being the main source of my Flex 5000 transmit distortion.

Thursday, July 3, 2008

Flex TX Audio...

I've made an MP3 containing two recordings. One recording is the TX audio from my SDR 1000, the other is the TX audio from my Flex 5000. To obtain this recording, send an email to jca1955 "at" sbcglobal.net and request the Flex 1 July 08 Audio test file. I'll send you the mp3.

Once you've received this file, take a listen. What do you think - is there a difference between the two? If so, which sounds better (first or second recording), and why?

The recordings were made using the same WAV file as the audio source for the transmitters (using the playback feature of the Flex Console WAVE tab), so this test is really just testing each radio's output from DAC through the TX mixer and the Driver and Final stages.

I used a second SDR 1000 to receive the RF from each of the two radios "under test" (by connecting each test radio's output to the input of my second 1000 via a BIG attenuator), and I made the recordings using this second radio (again, using the WAVE tab of the Flex Console - this time in Record mode).

TX setups were the same for the 1K and the 5K (EQ, etc.). TX Bandwidth was 100 Hz - 5 KHz.

Receive bandwidth (on the second flex 1000) was 100 Hz - 5 KHz. No RX EQ.

By the way...if you listen to the recordings, please do so before reading the comments (so that you're not prejudiced one way or the other). And I haven't identified which audio is from the 1K and which is from the 5K, because, again, I don't want to prejudice any views beforehand.

Thanks!