In this guide we’ll outline the step-by-step procedure for generating PFIR coefficients and loading them into an ADRV9001 product using TES, as well as highlighting any key considerations to keep in mind at each step.
Step 1: Device Config and Setup
The first thing to do is consider your application, what type of filter best suits you and the carrier frequencies of interest. Note that the Tx frequency doesn’t overly matter for the PFIR design. The value listed under RF Channel Bandwidth, however, is very important for you PFIR design. The initial calibration “RX Gain Delay” sets it calibration tone at the RF Bandwidth divided by 5, so your filter must accommodate a bandwidth of at least this size.
For this example, we’ll be using an LTE setup in TDD mode with a Sampling Frequency of 61.44MHz and an Rx LO of 900MHz. For the first part we’ll only use one channel, however we’ll show at the end of the guide how you can program the Rx1 and Rx2 PFIR filters separately.


Step 2: Design Your Filter
Once satisfied with the setup, we can turn our attention to the PFIR. When TES is first opened it will have a “Default Filter” loaded, as shown here:

Before going to your design tool of choice we have a few things to keep in mind. The maximum number of coefficients this filter can accept is 128. If we provide it with fewer coefficients that 128, TES will append 0’s to our filter. If we provide more, TES will only accept the first 128 coefficients. The sampling frequency of your system will have an impact your filter’s maximum acceptable frequency, as well as the number of coefficients required to create a given filter response. This point will be illustrated soon.
For this example, we’ll use the MATLAB filter design tool. To view the documentation on this tool visit: https://uk.mathworks.com/help/signal/ref/designfilt.html We’ll generate 3 Lowpass Filters with varying cutoff (stopband) frequencies. Remembering the initial constraint imposed by the RX Gain Delay calibration, the minimum frequency we can accommodate is ~8MHz, so we’ll design one filter with its cutoff at 8MHz, one at 10MHz and one at 20MHz, while maintaining the same stopband attenuation.
Firstly, let’s design a simple lowpass filter with a cutoff frequency of 8MHz, a Passband ripple of 0.5dB and a Stopband attenuation of 50dB:

Notice we comfortably sit at 123 coefficients, which TES will accept no problem. If we now require 60dB stopband attenuation, notice that the number of coefficients increases:

At 141 coefficients, this filter is now too long to fit in the ADRV9001 PFIR. Attempting to use this filter will not throw any errors, however it will yield unpredictable responses. Increasing the desired performance in other ways, such as requiring a steeper roll-off, will also increase the filter length. Let’s return to using the 123-coefficient filter from before. Our next task is to extract the coefficients from the Filter object:

Each coefficient is currently stored as a 32-bit floating point value. ADRV9001 devices accept signed 24-bit integer coefficients, so our next step is to convert these coefficients to values that the device will accept. The last thing to do is write the coefficients to a file. Using either a ‘.txt’ or a ‘.csv’ will work fine, TES expects the values to be stored in a single row. In MATLAB, just using the ‘writematrix(…)’ command with default settings will work fine. For more information on this step go to:
https://uk.mathworks.com/help/fixedpoint/ref/num2int.html
https://uk.mathworks.com/help/fixedpoint/ref/quantizer.html
https://uk.mathworks.com/help/matlab/ref/writematrix.html

Step 3: Upload your Filter
With the coefficients now saved to a .csv file, we’re at a stage now where we’re ready to load this filter into the TES. Returning to the Filter tab, press the ‘Source’ drop-down menu and select “Upload custom filter”. Then simply navigate to your .csv file and select it. This will upload your FIR coefficients into TES:


*Note: The slight change is Stopband performance of the filter is caused by rounding the coefficients to signed 24-bit integers. By and large this won’t cause issues, but these discrepancies do not indicate anything has gone wrong in the process.
Step 4: Test and Verify your Filter
Finally, we’ll verify the performance of this filter by receiving signals at increasingly high offsets from the LO frequency (900MHz) while maintaining the same -10dBm signal power in every test. We’ll use 5MHz, 10MHz, and 25MHz on each of our 3 filters.
5MHz:

10MHz:

25MHz:

Extra Filters:
Now we’ll make a 10MHz LPF and write its coefficients to a .csv file:

5MHz:

10MHz:

25MHz:

Now our final filter, with a passband of 20MHz:

5MHz:

10MHz:

25MHz:

Programming each Rx PFIR Individually:
Certain applications require that Rx1 and Rx2 operate on different frequency ranges. To demonstrate how the PFIR design can be accommodated for these setups, we’ll modify our LTE setup to use both Rx1 and Rx2 by changing “Channels” to “Custom” on the Device Configuration tab. The carrier frequency tab can remain the same for this example.


Into the Rx1 PFIR we’ll load the coefficients for the 8MHz filter design (or the Narrowband design). Rx2 will be given the 20MHz filter (or the Wideband design). To demonstrate that these filters do indeed operate independently we’ll inject RF signals into both Rx1A and Rx2A with the same signal power (-10dBm) while increasing the offset from the carrier as we did before.

Rx1 will be colored Black.
Rx2 will be colored Blue.
5MHz:

10MHz:

25MHz:

Dynamically Switching PFIR Profiles:
The ADRV9001 product family supports dynamic switching of the PFIR profiles. Up to 4 different profiles can be stored in device memory, and any of these profiles can be loaded into any of the PFIRs on the device on demand under the control of the BBIC. More information on this functionality can be found in the RX DEMODULATOR - Rx Programmable FIR Filter section of the User Guide.
For more information on the API needed to call for a profile switch, read the documentation provided on the adi_adrv9001_arm.c file in the doxygen file provided in the SDK. The function of interest is called adi_adrv9001_arm_Profile_Switch(), as shown below: