RF PA linearization

From DttspWiki

Jump to: navigation, search

>>> Extracted from Frank's message on the dttsp-linux list on 2008.09.14 12:43 about the pre-distortion code.

The waveshaping is applied first thing in the TX audio chain after the input gain control. Consistently with the rest of the TX audio processing, it expects (and only works on) a pure-real signal, with the signal in the Q part. (This is how the TX audio has always worked.)

Waveshaping at this stage is toggled on and off via the update command:

setTXWaveShapeSt [0 or 1]

The waveshaping table itself is set by

setTXWaveShapeFunc npts p0 p1 p2 ... p{npts-1}

in other words, it's just spelled out as a sequence of npts whitespace-separated values on a single update command line. These values should be between +/-1. Until we know what we're doing, there should be an odd number of points, with 0.0 at the center. (Some waveshaping can add significant DC which, since the function is nonlinear, can compound badly with very small inaccuracies near 0.)

The default waveshaping table is null, yielding no change to the input. You have to set it to something.

Simple examples:

setTXWaveShapeFunc 3 -1 0 1

produces the identity.

setTXWaveShapeFunc 5 -1 -0.5 0 0.5 1

Another more verbose way of producing the identity (same as above).

setTXWaveShapeFunc  9  -1 -0.75 -0.5 -0.25 0 0.25 0.5 0.75 1

The same, only more verbose.

setTXWaveShapeFunc 3 1 0 1

Produces a full-wave rectifier.

setTXWavweShapeFunc 3 0 0 1

Produces a half-wave rectifier.

setTXWaveShapeFunc 3 1 0 -1

inverts the input waveform.

setTXWaveShapeFunc  5 0 -1 0 1 0

produces a very crude overtone enhancer.


It's up to you to figure how to invert the final RF output to compute the appropriate input waveshape :-)

Again, this is an experiment. The code is tested but not exhaustively.

A few of the other recent additions were partially ill-formed, so I've also taken them out of the compile for the time being. The code is untouched in the repository pending cleanup.

Literature

Personal tools