|
This email has been checked for viruses by Avast antivirus software.
|
Hello,
while impatiently waiting for the new code with the spurs
cancellation, I have automated the TX output spectrum measurements,
using some routines from Quisk for controlling the H-L.
Here below is a sample image with the output spectra from an H-L without the reconstruction filter. Not sure this is adding any new data to the measurements already done, but the resulting image is looking quite nice to me, so I wanted to post it, hi.
Thanks for the plot. I really like how it presents the data. You can clearly see the spurs offset from 73.728 MHz that we were originally battling with a notch in the reconstruction filter. When we were using the 61.44 MHz oscillator, the spur was closer to the fundamental and impossible to filter as seen at TX near 32 MHz in your plot. I don't have any good explanation for why these spurs exist, except that they may be an artifact of the interpolation filter. Do you have any ideas?
I assume you are using the IAMP so we are seeing both harmonics from the IAMP as well as aliases from the DAC?
What spectrum analyzer are you using to collect this data?
I will also add links to your website from the Hermes-Lite wiki unless you object.
Admittedly, these types of experiments to test and improve the various analog blocks and filters at the RX and TX frontend have been sorely lacking. Jim Ahlstrom has done some good experiments with data too. John Williams and company have been doing good work on filtering post PA. If you and/or Jim want to redesign or tweak the frontend, please go right ahead. Your data on the reconstruction filter not performing well at higher frequencies agrees with Jim's. We'll be sure to take this into account in any future PCB revision, and also ask for your review.
I've been a bit distracted by a problem with the tx noise floor as seen by duplex reception being somewhat variable(still a mystery), this has made it hard to measure the effects of my cancellation.
My approach is to distort the dac output with simple power terms, when it is all behaving I can reduce 2nd, 3rd and 5th harmonics close to the noise floor and imd visibly reduces, I have seen harmonics on ssb voice reduce significantly. I realise that generating a cancellation signal that works for a controlled test signal is a world apart from a general solution but it is a step in the right direction.
I have code that gives me phase and amplitude control of 3rd, 4th and 5th harmonics with just a lut each for I&Q but am struggling with the maths of controlling phase on 2nd harmoics near 0 degrees without adding a third lut. Once we can control test signals the real work starts in using feedback to control real signals.
There are certain frequencies that lead to short repeating patterns when accessing the table. These cause spurs which are not removed by interpolation as seen below. Although the picture below looks bad, the worst spurs are still around 83 dBc.
By adding a bit of amplitude dither, these spurs can be reduced to around 95 dBc as seen below.
So we have a RAM-based NCO with arbitrary waveform loadable by software with worst spurs around 85 dBc. Shown below is the fundamental with the distortion spur that eliminates the 3rd harmonic for me on 40M.
I have similar plots for the current cordic used in the Hermes-Lite. I'm not including them here as there are already many pictures in this post. The cordic is a bit cleaner on most frequencies, fewer spurs and the worst spurs are in the 88-89 dBc range. For the problematic frequencies, the cordic is similar to the NCO, with many spurs in the 85 dBc range. For our 12-bit DAC, I don't anticipate problems with spurs even up to 74 dBc, the theoretical dynamic range of a 12-bit DAC. We see more dynamic range in these plots given the processing gains of the FFT.
73,
Steve
KF7O
- My understanding of Alan's experiments is that he is attempting to undo the nonlinear distortion terms as described above in point 2 immediately before the values are sent to the DAC. Since it is just a 12-bit DAC, he precomputes a 4096-entry lookup table that is essentially a function that when given an original DAC value input, produces an output which is that input value with the additional nonlinear distortion terms subtracted. Is this a correct understanding? There may be more than one table, and complex IQ entries, involved now. This seems like a very worthwhile direction to go. There are many hits on scholar.google.com when searching for digital predistortion rf amplifier. A quick scan makes me think that most work is using polynomials with memories at frequencies in the GHz range. We may be able to get by with something simpler like a few terms from the Taylor series in the HF range.
| always @(posedge ad9866_rxclk) | |
| begin | |
| if (ad9866_rxsync) begin | |
| ad9866_rx_stage[5:0] <= ad9866_rx; | |
| end else begin | |
| ad9866_rx_stage[11:6] <= ad9866_rx; | |
| ad9866_rx_input <= ad9866_rx_stage; | |
| end | |
| end | |
| always @ (negedge AD9866clkX1) | |
| DACD <= txsum[11:0]; // + {10'h0,lfsr[2:1]}; | |
[snip]
Last CVA9 Firmware Release:
Steve,
|
This email has been checked for viruses by Avast antivirus software.
|
Hi List,This weekend I was able to do some signal cancellation experiments to reduce the spur at 22.981 MHz when transmitting at 24.895 MHz. The summary is that it looks very possible to reduce this by 15 dB, -53 dBc down to -68 dBc! The 22.981 MHz spur is due to imperfections in the DAC, and is the 5th harmonic which occurs in the second Nyquist zone but aliased back into the first Nyquist zone. To enable experimentation, I added a small RAM memory "wave table" in the FPGA firmware. I hacked Quisk to load this wave table with whatever values I like. I can create sine waves with different levels and phases of predistortion with Python and then load them into the wave table. When the CW key is pressed, I can test the output. Because of the limited depth of the wave table, not all frequencies are possible, but enough to run experiments. I created a sine wave of the fundamental plus the 5th harmonic. I empirically varied the amplitude and phase of the 5th harmonic until I saw the best cancellation on my scope-based spectrum analyzer.The results appear very stable -- the required phase and amplitude do not seem to change much over time and other variations. I still need to test more variations, but I am convinced that it is stable enough not to require a fast loop on the FPGA. Software should be able to make adjustments every so often and do a good job. Unfortunately, I see different results from my spectrum analyzer compared to Quisk. In full-duplex, I can tune Quisk to look at the spurs with the receiver. I suspect that since the ADC and DAC are in the same package for the AD9866, there is less isolation between TX and RX when observing the AD9866 TX signal with the AD9866 RX. When I have the tap in place (not proximity OTA pickup), readings from Quisk and the spectrum analyzer may agree more.I am quite excited about this result, and want to see if I can predistort to diminish the harmonics introduced by the IAMP and eventually other amplifiers. I will look at 40M this week with that in mind.The challenge of making this practical is generating the fundamental with the proper predistortion. This is different than pure signal, as it is not distorting the audio (in the kHz) to improve IMD, but is distorting the fundamental (in the MHz) to overcome nonlinearities in the DAC and amplifiers. Still, I am optimistic it is possible and am thinking about three techniques:
- The fundamental is currently produced by a Cordic algorithm. I've studied the Cordic and think it is possible to generate not a pure sinusoid, but a sum of sinusoids, provided they are all harmonics. This requires computing something more complicated than an ArcTan, coming up with a different set of degree steps that map to simple integer divisions and not restricting the computation to a single quadrant. I have what to do all worked out in my head but need to write some code to test it. This would be the most direct replacement for what exists in the Hermes-Lite. I'd like to make the parameters programmable so that software can tune for various hardware and frequencies.
- An extension of what I am doing now is just to always use a wave table for transmission. I think it is possible to arrange a table deep enough and with variable depth used such that a rich set of IF frequencies can be generated. This could not be used by software that only supports 0 IF. I believe PowerSDR is in that bucket. Fortunately, Quisk and Alan's software allow for receivers that are not 0 IF. The wave table must have steps smaller than the minimum bandwidth (48 kHz) to cover the entire spectrum.
- The numerically controller oscillators (NCOs) provided by FPGA vendors usually have a range of options from designs requiring larger tables and few resources, to those requiring small tables and many resources. There are a number of these available, including several open source (1 2) IPs. I may need to study these to see what predistortion is possible.
73,SteveKF7O