Programming Attenuation Using NI-RFSA

Given a reference level, NI-RFSA configures the hardware attenuation for optimal performance. However, you can customize some aspects of the configuration.

The topics in this section provide information about the ways in which you can customize attenuation-related properties and attributes, as well as any special considerations your adjustments might require.

Device Attenuation Value Relationships

The coupling between the reference level, solid-state attenuation, and mechanical attenuation varies depending on which attributes or properties are set.

The following table describes the relationship between the applicable attributes or properties. In the following table, Total Attenuation comprises both mechanical attenuation and solid-state attenuation.

The Set Mixer Level Offset, Set Mechanical Attenuation, and Set Total Attenuation columns indicate whether you need to set the applicable property or attribute to achieve the behavior specified in the Description column. The Restriction column specifies any parameter relationships you should observe.

Note The Reference Level property and the NIRFSA_ATTR_REFERENCE_LEVEL attribute also affect the NI-RFSA behavior. If you set this property or attribute, the value,
PREF
, is used in the formulas shown in the following table. If you do not set this value, NI-RFSA uses the default value of 0 dBm for calculations in which reference level is a factor.
Set Mixer Level Offset Set Mechanical Attenuation Set Total Attenuation Description Restriction
No No No There are no user constraints on the settings. The total attenuation is calculated based on the specified reference level and default mixer level.
Note Even if you do not set the Reference Level property or the NIRFSA_ATTR_REFERENCE_LEVEL, the default value of 0 dBm is used in all calculations.
PREF(ANSS+AMECH)+GPA10 dBm
PREF(ANSS+AMECH)+GPA10 dBm
Yes No No Total attenuation is calculated based on the reference level and mixer level.
PREF(ANSS+AMECH)+GPAPMIX
PREF(ANSS+AMECH)+GPAPMIX
No Yes No The total attenuation, consisting of mechanical and solid state attenuators, is calculated based on the stated reference level and default mixer level. The amount of mechanical attenuation is user-constrained; the remaining solid-state attenuation is calculated to best match the values you specify.
PREF(ANSS+AMECH)+GPA10 dBm
PREF(ANSS+AMECH)+GPA10 dBm
Yes Yes No This configuration is similar to the preceding configuration, with the exception that a user-specified mixer level (offset) constraint is taken into the equation instead of a default value.
PREF(ANSS+AMECH)+GPAPMIX
PREF(ANSS+AMECH)+GPAPMIX
No No Yes The attenuators are set based on the user-specified total attenuation constraint. The balance between mechanical and solid state attenuators is calculated by NI-RFSA.
PREF(ANSS+AMECH)+GPA+5 dBm
PREF(ANSS+AMECH)+GPA+5 dBm
No Yes Yes This configuration is similar to the preceding configuration, with the exception that the balance between mechanical and electronic attenuation is calculated based on the user-specified constraints.
PREF(ANSS+AMECH)+GPA+5 dBm
PREF(ANSS+AMECH)+GPA+5 dBm
Yes N/A Yes This configuration produces an error. The mixer level and the total attenuation are both specified as part of the same setup. In this invalid configuration, mechanical attenuation is irrelevant. N/A

where

  • AMECH
    is the nominal mechanical attenuation in dB
  • ANSS
    is the nominal solid-state attenuation in dB
  • GPA
    is the nominal preamplifier gain in dB
  • PMIX
    is the mixer level in dBm
  • PREF
    is the reference level in dBm
Note
PMIX
satisfies the following relationship: -100 dBm
PMIX
+5 dBm
Note The gain, GPA, is 15 dB when the preamplifier is present and enabled, and 0 dB when the preamplifier is not present or disabled.
Note The IF gain of the PXIe-5665 is nominally
PIFPREF+ANSS+AMECHGPA
, where
PIF
is set with the IF Output Power Level property or the NIRFSA_ATTR_IF_OUTPUT_POWER_LEVEL attribute.

Attenuation-Related Properties and Attributes

You can customize the hardware attenuation configuration by explicitly setting the following NI-RFSA properties and attributes.

LabVIEW Property LabWindows CVI/C Attribute
RF Attenuation NIRFSA_ATTR_ATTENUATION
RF Attenuation Step Size NIRFSA_ATTR_RF_ATTENUATION_STEP_SIZE
Mechanical Attenuation NIRFSA_ATTR_MECHANICAL_ATTENUATION
Mixer Level NIRFSA_ATTR_MIXER_LEVEL
Mixer Level Offset NIRFSA_ATTR_MIXER_LEVEL_OFFSET
IF Output Power Level NIRFSA_ATTR_IF_OUTPUT_POWER_LEVEL
IF Output Power Level Offset NIRFSA_ATTR_IF_OUTPUT_POWER_LEVEL_OFFSET
External Gain NIRFSA_ATTR_EXTERNAL_GAIN

Relationship Between Reference Level, RF Attenuation, and Mixer Level

The reference level, RF attenuation, and mixer level settings interact with each other. Customizing the value of one setting can have an effect on the value of another setting.

RF attenuation refers to all the attenuation that occurs before the mixer, which includes both solid-state (or electronic) attenuators and mechanical attenuators. NI-RFSA uses the value of the Reference Level property or the NIRFSA_ATTR_REFERENCE_LEVEL attribute even if you do not set it. The default value is 0 dBm. The reference level determines the amount of RF attenuation deployed based on the mixer level. If you do not specify a value for the Mixer Level property or the NIRFSA_ATTR_MIXER_LEVEL attribute, the default value is -10 dBm.

If you set the mixer level, the RF attenuation is calculated so that it satisfies the following equation:

reference level - RF attenuationmixer level

NI-RFSA adjusts the settings to get close to the desired mixer level, but it does not return an error if the signal level is too low. NI-RFSA does return an error if the reference level is so high that even with the maximum available RF attenuation, it cannot lower the signal at mixer below the specified mixer level. Because of the relationship between mixer level and RF attenuation, you cannot set both the mixer level and the RF attenuation at the same time or NI-RFSA returns an error.

To configure the mixer level, specify the value of the Mixer Level property or the NIRFSA_ATTR_MIXER_LEVEL attribute, or the Mixer Level Offset or the NIRFSA_ATTR_MIXER_LEVEL_OFFSET attribute (but not both-setting both results in an error). If you are interested in particular mixer levels, specify a mixer level. If you are interested in the noise/distortion, specify a mixer level offset. Mixer level offset does not depend on absolute mixer levels, so it supports the PXIe-5665 as well as other devices. When the mixer level is specified in conjunction with the reference level, the RF attenuation is determined by the formula reference level - RF attenuationmixer level. Notice that no matter how low the reference level is, the RF attenuation never drops below the minimal amount designed to protect the front end of the downconverter. The default RF attenuation for the PXIe-5603/5605 is 10 dB.

To control the RF attenuation setting directly, use the RF Attenuation property or the NIRFSA_ATTR_ATTENUATION attribute. You can specify a value as low as 0 dB.

Note NI-RFSA returns an error if you set both the RF attenuation and mixer level at the same time.

Controlling RF Attenuation Step Size

To change the RF attenuation step size for your device, use the RF Attenuation Step Size property or the NIRFSA_ATTR_RF_ATTENUATION_STEP_SIZE attribute.

Note For the PXIe-5603, the driver uses 1 dB steps to change RF attenuation. For the PXIe-5605, the available RF attenuation changes depending on the specified center frequency. In the high band signal path, frequencies greater than 3.6 GHz, the only available RF attenuation is the mechanical attenuator that you can change in 5 dB steps. In the low band signal path, frequencies less than or equal to 3.6 GHz, an additional 31 dB of solid-state attenuation is available in 1 dB steps. The default step size for the PXIe-5605 is 5 dB. This default value indicates that even when in the low band signal path, NI-RFSA changes the RF attenuation in 5 dB steps using only the mechanical attenuator. You can use the RF Attenuation Step Size property or the NIRFSA_ATTR_RF_ATTENUATION_STEP_SIZE attribute to affect when the device changes the RF attenuation settings. To use the solid-state attenuation in the low band signal path, change the step size to a value other than a multiple of 5 (for example, a step size of 1 dB). If you use a value other than a multiple of 5 while in the high band signal path of the PXIe-5605, NI-RFSA returns an error.

Controlling Mechanical Attenuation

To control the mechanical attenuator directly, specify a mechanical attenuation value using the Mechanical Attenuation property or the NIRFSA_ATTR_MECHANICAL_ATTENUATION attribute.

The value you specify works together with the value of the RF Attenuation property or the NIRFSA_ATTR_ATTENUATION attribute. You can set both values, but you are not required to do so. For example, you can set the mechanical attenuation to a certain value and then perform a power sweep by changing the reference level in a loop. Without specifying a mechanical attenuation value, NI-RFSA calculates the attenuation value every time based on the prescribed algorithm, and that calculation could include different amounts of mechanical and electronic attenuation. By constraining the mechanical part, you can achieve faster sweep times, resulting from the lower settling times for the electronic attenuators compared to the mechanical attenuators, and it can cause less wear on the mechanical attenuator.

Enabling the RF Preamplifier

The last RF front-end property and attribute, which can be set in addition to the mixer level or attenuation, are the RF Preamplifier Enabled property or the NIRFSA_ATTR_PREAMP_ENABLED attribute. You can enable the preamplifier in conjunction with low reference levels but only if the input signals are low.

Controlling IF Output Power Level and Offset

You can specify either the IF output power level or the IF output power level offset.

Notice NI-RFSA returns an error if you specify both the IF output power level and the IF output power level offset at the same time.

Choose between IF output power level and IF output power level offset as follows:

  • If you are familiar with your digitizer requirements, set the IF Output Power Level property or the NIRFSA_ATTR_IF_OUTPUT_POWER_LEVEL attribute to the expected value.
  • If you want to achieve better dynamic range at the output without considering the absolute value of the output, use the IF Output Power Level Offset property or the NIRFSA_ATTR_IF_OUTPUT_POWER_LEVEL_OFFSET attribute.

Resetting Attenuation-Related Settings

After you set attenuation-related properties and settings, the settings you select persist until you reset them.

If you are using LabVIEW, use the NI-RFSAProperty Node to reset a property. To reset a property in the Property Node, select the property, right-click the Property Node, and select Change To » Default Value from the shortcut menu.

If you are using LabWindows/CVI, use the niRFSA_ResetAttribute function to reset an attribute.