A multi-channel programmable radio frequency attenuation method and system

CN122993838APending Publication Date: 2026-10-27YANGXIN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611246527.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]本发明的目的在于提供一种多通道程控射频衰减方法及系统,以解决上述背景技术提出的现有问题

Benefits of technology

[0017]与现有技术相比,本发明的有益效果是:该多通道程控射频衰减方法及系统,围绕多通道程控射频衰减系统中的控制指令解析、补偿参数调用、基础衰减值分配、设定衰减值修正、级间调整以及残余修正进行处理,使主控单元能够根据工作频率、目标衰减值、通道号和级联位置对各级数控衰减单元进行对应控制,从而使多级级联的数控衰减单元在允许设置范围内完成对应通道的衰减设置,具体如下:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122993838A_ABST
    Figure CN122993838A_ABST
Patent Text Reader

Abstract

This invention relates to the field of radio frequency signal processing technology, and discloses a multi-channel programmable radio frequency attenuation method and system, applicable to a programmable radio frequency attenuation system including multiple independent radio frequency attenuation links. The method includes: receiving and parsing control commands sent by a host computer to obtain the channel number, target attenuation value, and operating frequency; determining the frequency band and attenuation interval based on the operating frequency and target attenuation value; calling compensation parameters based on the frequency band, attenuation interval, channel number, and cascade position; generating multiple basic attenuation values, and correcting them according to the compensation parameters to obtain multiple set attenuation values; when the set attenuation value exceeds the allowable setting range, performing inter-stage adjustments based on the remaining setting range of other cascade positions, and issuing control codes after correction based on residual differences before generating control codes. This invention combines frequency band, attenuation interval, channel number, and cascade position for compensation correction, improving the matching between the attenuation value and the allowable setting range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of radio frequency signal processing technology, specifically to a multi-channel programmable radio frequency attenuation method and system. Background Technology

[0002] Radio frequency attenuators are commonly used in scenarios such as radio frequency testing, communication link debugging, and signal strength simulation. By controlling the attenuation of radio frequency signals, the device under test can complete performance verification under different signal conditions. As the number of test channels increases, multi-channel programmable radio frequency attenuation systems are used to independently control multiple radio frequency signals.

[0003] Existing multi-channel programmable radio frequency attenuation systems typically involve a host computer sending control commands to a main control unit. The main control unit then generates control codes based on the target attenuation value and sends them to the corresponding digitally controlled attenuation units (DNCs) of the channel. When the attenuation range of a single DNC is insufficient, multiple cascaded DNCs are usually required in the same radio frequency attenuation link, with multiple DNCs working together to set the target attenuation value. In the process of multi-channel, multi-level cascaded radio frequency attenuation control, different operating frequencies, different target attenuation ranges, different channels, and different cascade positions can all affect the actual attenuation effect. If control codes are directly split and sent according to the target attenuation value, it is easy for the actual attenuation value to deviate from the target attenuation value, or for the compensated set attenuation value to exceed the allowable setting range of the corresponding DNC.

[0004] In response to the above, the technical problem that needs to be solved is how to correct and adjust the attenuation setting in the process of multi-channel programmable radio frequency attenuation by combining the operating frequency, target attenuation value, channel number and cascade position, so that the set attenuation value of each level of digitally controlled attenuation unit can meet the allowable setting range and improve the consistency of attenuation control. Summary of the Invention

[0005] The purpose of this invention is to provide a multi-channel programmable radio frequency attenuation method and system to solve the existing problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a multi-channel programmable radio frequency attenuation method, applied to a programmable radio frequency attenuation system including multiple independent radio frequency attenuation links, each radio frequency attenuation link including multiple cascaded digitally controlled attenuation units, the method being executed by a main control unit, including: S1. Receive control commands sent by the host computer and parse them to obtain the channel number, target attenuation value and operating frequency; S2. Determine the frequency band based on the operating frequency, and determine the attenuation range based on the target attenuation value; S3. Based on the frequency band, attenuation range, channel number and cascade position of the multi-level cascade, call the corresponding compensation parameter from the compensation parameter table. The cascade position is used to characterize the serial position of the numerically controlled attenuation unit in the corresponding RF attenuation link. The compensation parameter is used to correct the basic attenuation value of the corresponding cascade position. S4. Based on the target attenuation value and the allowable setting range of the numerical control attenuation unit at each level, generate multiple basic attenuation values, which correspond to multiple cascaded positions in the same RF attenuation link. S5. Based on the compensation parameters corresponding to the cascade position, the multiple basic attenuation values ​​are corrected to obtain multiple set attenuation values; S6. When any set attenuation value exceeds the allowable setting range of the corresponding CNC attenuation unit, the multiple set attenuation values ​​are adjusted between stages according to the remaining setting range of other cascaded positions. S7. Generate corresponding control codes based on the adjusted multiple set attenuation values, and send the control codes to the numerical control attenuation units at each level of the corresponding channel.

[0007] Furthermore, the multi-stage cascaded numerically controlled attenuation unit includes at least two stages of numerically controlled attenuation units arranged in series along the direction of radio frequency signal transmission, wherein the cascade position is the serial position of any numerically controlled attenuation unit in the corresponding radio frequency attenuation link.

[0008] Furthermore, each RF attenuation link includes three cascaded numerically controlled attenuation units; The cascade positions include a first cascade position, a second cascade position, and a third cascade position arranged sequentially along the radio frequency signal transmission direction; The first cascade position, the second cascade position, and the third cascade position each correspond to a different numerically controlled attenuation unit.

[0009] Furthermore, the compensation parameter table includes a frequency band field, an attenuation interval field, a channel number field, a cascade location field, and a compensation parameter field; The compensation parameter field is used to record the attenuation correction amount under the corresponding frequency band, corresponding attenuation interval, corresponding channel number, and corresponding cascade position.

[0010] Furthermore, the compensation parameter table is generated from calibration data, which includes the deviation between the actual attenuation value and the theoretical attenuation value measured at different calibration frequencies, different calibration attenuation values, different channel numbers, and different cascade positions. The deviation is written into the compensation parameter table according to the corresponding frequency band, corresponding attenuation range, corresponding channel number and corresponding cascade position to form the compensation parameters for the corresponding cascade position.

[0011] Furthermore, the generation of multiple basic attenuation values ​​includes: Based on the allowable setting range and control step of each level of CNC attenuation unit, the target attenuation value is divided into multiple basic attenuation values ​​corresponding to multiple cascaded positions. Wherein, the difference between the sum of the plurality of basic attenuation values ​​and the target attenuation value is no greater than one control step, and each basic attenuation value is within the allowable setting range of the corresponding numerical control attenuation unit.

[0012] Furthermore, the correction of the multiple base attenuation values ​​includes: The basic attenuation value is summed with the compensation parameter at the corresponding cascade position to obtain the set attenuation value at the corresponding cascade position. When the compensation parameter is positive, the base attenuation value at the corresponding cascade position is increased; When the compensation parameter is negative, the base attenuation value at the corresponding cascade position is reduced. When the compensation parameter is zero, the base attenuation value at the corresponding cascade position remains unchanged.

[0013] Furthermore, the remaining setting range is the adjustable range between the set attenuation value and the boundary of the allowable setting range of the corresponding CNC attenuation unit; The inter-level adjustment includes: adjusting the set attenuation value that exceeds the allowable setting range to the boundary value of the corresponding allowable setting range, and allocating the excess part to other cascaded positions that still have remaining setting range, so that each set attenuation value after adjustment is within the allowable setting range of the corresponding CNC attenuation unit; When the control command corresponds to multiple channel numbers, the main control unit uniformly issues the control codes corresponding to each target channel after the control codes of each target channel are generated, and determines the abnormal channel based on the control execution status returned by each target channel. The control execution state includes control code response state, latching state, and error state. The abnormal channel includes channels where the control code is not responded to, latching fails, or the error state is set.

[0014] Furthermore, before generating the corresponding control code based on the adjusted multiple set attenuation values, the method further includes: Calculate the residual difference, which is the difference obtained by subtracting the sum of the adjusted set attenuation values ​​from the target attenuation value; When the absolute value of the residual difference is greater than a control step, and there exists a cascade position that still has a remaining setting range along the correction direction of the residual difference, the cascade positions participating in the residual correction are determined. Based on the remaining setting range, compensation parameters, and control steps of each cascade position participating in the residual correction, the residual correction amount of each cascade position participating in the residual correction is determined. The residual correction amount of the i-th cascade position participating in the residual correction satisfies the following relationship:

[0015] in, The residual correction amount at the i-th cascade position participating in residual correction. The residual difference, The sign function of the residual difference. For the control step of the numerical control attenuation unit, The remaining setting range of the cascaded position participating in the residual correction along the correction direction of the residual difference. Let be the compensation parameter corresponding to the i-th cascade position participating in residual correction. The remaining setting range along the correction direction of the residual difference for the j-th cascaded position participating in residual correction. Let be the compensation parameter corresponding to the j-th cascade position participating in residual correction. The number of cascade positions participating in the residual correction is represented by i and j, where i and j are the cascade position numbers participating in the residual correction. Indicates rounding down; The main control unit sums the set attenuation value of each cascaded position participating in residual correction with the corresponding residual correction amount to obtain the set attenuation value after residual correction, and generates the corresponding control code based on the set attenuation value after residual correction.

[0016] The present invention also provides a multi-channel programmable radio frequency attenuation system, which includes a host computer, a main control unit, a compensation parameter storage unit, a control code generation unit, and multiple independent radio frequency attenuation links. Each radio frequency attenuation link includes multiple cascaded numerically controlled attenuation units. The host computer is used to send control commands; The main control unit is used to parse the control command to obtain the channel number, target attenuation value and operating frequency, and to determine the frequency band according to the operating frequency and the attenuation range according to the target attenuation value; The compensation parameter storage unit is used to store a compensation parameter table, which is used to provide corresponding compensation parameters according to the frequency band, the attenuation interval, the channel number and the cascading position. The control code generation unit is used to generate multiple basic attenuation values ​​based on the target attenuation value, correct the multiple basic attenuation values ​​according to the corresponding compensation parameters to obtain multiple set attenuation values, and when any set attenuation value exceeds the allowable setting range of the corresponding CNC attenuation unit, perform inter-level adjustment according to the remaining setting range of other cascaded positions, and perform residual correction according to the residual difference before generating the control code; The multi-channel RF attenuation link is used to receive the control code of the corresponding channel and output the corresponding attenuation status through the numerically controlled attenuation units at each level in the corresponding channel.

[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: This multi-channel programmable radio frequency attenuation method and system focuses on the parsing of control commands, the calling of compensation parameters, the allocation of basic attenuation values, the correction of set attenuation values, the adjustment between stages, and the residual correction in the multi-channel programmable radio frequency attenuation system. This enables the main control unit to control each level of the numerically controlled attenuation unit according to the operating frequency, target attenuation value, channel number, and cascade position. This allows the multi-level cascaded numerically controlled attenuation units to complete the attenuation settings of the corresponding channels within the allowable setting range, as detailed below: The frequency band is determined based on the operating frequency, the attenuation range is determined based on the target attenuation value, and the corresponding compensation parameters are called from the compensation parameter table in combination with the channel number and cascade position. This makes the compensation parameters no longer correspond to a single attenuation value or a single channel, but are associated with the frequency band, attenuation range, channel number and cascade position at the same time. This allows for corresponding corrections to attenuation deviations under different frequency conditions, different attenuation ranges, different channels and different cascade positions. Multiple basic attenuation values ​​are generated based on the target attenuation value and the allowable setting range of each level of CNC attenuation unit. Then, multiple set attenuation values ​​are obtained based on the compensation parameters of the corresponding cascade positions. This allows the target attenuation value to be allocated to multiple cascade positions in the same RF attenuation link, and ensures that the set attenuation value of each level of CNC attenuation unit matches its corresponding compensation parameter. This helps to improve the correspondence between the set data and the specific cascade position in the multi-level cascade attenuation control process. When any set attenuation value exceeds the allowable setting range of the corresponding CNC attenuation unit, inter-level adjustment is performed based on the remaining setting range of other cascaded positions, and residual correction is performed based on the residual difference before generating control code. This ensures that the adjusted set attenuation value is subject to the joint constraints of the allowable setting range, the remaining setting range, and the control step, thereby reducing the problem of control code being difficult to execute effectively due to a single cascaded position exceeding the limit or control step limitation. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the multi-channel programmable radio frequency attenuation system of the present invention; Figure 2 This is a schematic diagram of the cascaded RF attenuation link of the present invention; Figure 3 This is a schematic diagram illustrating the generation and invocation of the compensation parameter table of the present invention; Figure 4 This is a schematic diagram of the multi-channel programmable radio frequency attenuation method of the present invention; Figure 5 This is a schematic diagram of the inter-level adjustment and residual correction logic of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Example 1: This invention provides a technical solution: a multi-channel programmable radio frequency attenuation method, applied to a programmable radio frequency attenuation system including multiple independent radio frequency attenuation links. The programmable radio frequency attenuation system includes a host computer, a main control unit, a compensation parameter storage unit, a control code generation unit, and multiple independent radio frequency attenuation links. The host computer is used to send control commands, the main control unit is used to parse the control commands and call the compensation parameters, the compensation parameter storage unit is used to store the compensation parameter table, the control code generation unit is used to generate control codes, and the radio frequency attenuation links are used to output the corresponding attenuation status according to the control codes.

[0021] In this embodiment, each RF attenuation link includes multiple cascaded numerically controlled attenuation units. Each numerically controlled attenuation unit is sequentially connected in series along the RF signal transmission direction. A compensation parameter table records the corresponding compensation parameters according to the frequency band, attenuation interval, channel number, and cascade position. This allows the main control unit to sequentially complete channel parsing, frequency band and attenuation interval determination, compensation parameter calling, basic attenuation value generation, set attenuation value correction, inter-stage adjustment, and control code distribution after receiving control commands. The method is executed by the main control unit and includes: S1. Receive control commands sent by the host computer and parse them to obtain the channel number, target attenuation value and operating frequency.

[0022] Specifically, after receiving the control command from the host computer, the main control unit reads the channel field, attenuation field, and frequency field from the control command according to the pre-agreed command format. It then parses the channel field into a channel number, the attenuation field into a target attenuation value, and the frequency field into a working frequency. The channel number is used to identify the RF attenuation link that needs to be attenuated this time, the target attenuation value is used to represent the total attenuation that the RF attenuation link needs to achieve, and the working frequency is used to represent the RF signal frequency corresponding to this attenuation control. The output results are the channel number, target attenuation value, and working frequency that can be called upon for subsequent processing.

[0023] In this embodiment, the host computer is used to send control commands. Specifically, the host computer generates control commands based on the RF test task. The RF test task includes a test channel, a set attenuation amount, and a test frequency. The test channel is written into the channel field of the control command, the set attenuation amount is written into the attenuation field of the control command, and the test frequency is written into the frequency field of the control command. This enables the main control unit to obtain the corresponding channel control conditions, attenuation control conditions, and frequency control conditions from the same control command. The output result is a control command containing the channel field, attenuation field, and frequency field.

[0024] The main control unit is used to parse control commands to obtain the channel number, target attenuation value, and operating frequency. Specifically, after receiving a control command, the main control unit first identifies the command type. If the control command belongs to the attenuation setting command, it continues to execute field parsing. If the control command does not belong to the attenuation setting command, it generates a command type exception flag and stops attenuation control processing for the control command. The output result is the control command type identification result.

[0025] The channel number, target attenuation value, and operating frequency are obtained through parsing. Specifically, the main control unit performs channel validity checks on the channel number, attenuation value validity checks on the target attenuation value, and frequency range validity checks on the operating frequency. The channel validity check confirms whether the channel number corresponds to a configured RF attenuation link in the programmable RF attenuation system. The attenuation value validity check confirms whether the target attenuation value can be executed by the corresponding RF attenuation link. The frequency range validity check confirms whether the operating frequency is within the frequency range covered by the compensation parameter table. The output results are the validity check results for the channel number, target attenuation value, and operating frequency.

[0026] This is applied to a programmable RF attenuation system that includes multiple independent RF attenuation links. Specifically, when the channel number in the control command is a single channel number, the main control unit determines the RF attenuation link corresponding to that channel number as the target RF attenuation link. When the channel number in the control command is multiple channel numbers, the main control unit determines the target RF attenuation link corresponding to each channel number and establishes an independent control data record for each target RF attenuation link. The output result is the target RF attenuation link identifier corresponding to the channel number.

[0027] The method is executed by the main control unit. Specifically, the main control unit writes the parsed and determined valid channel number, target attenuation value, and operating frequency into the same control data record. The control data record is a set of data used to store the channel number, target attenuation value, operating frequency, and target RF attenuation link identifier under the same control command. It also serves as a unified data source for subsequent frequency band determination, attenuation range determination, compensation parameter invocation, basic attenuation value generation, and control code generation. The output result is the control data record that has been confirmed as valid by the main control unit.

[0028] S2. Determine the frequency band based on the operating frequency, and determine the attenuation range based on the target attenuation value.

[0029] Specifically, the main control unit reads the operating frequency and target attenuation value from the control data record formed by S1, matches the operating frequency with the preset frequency band boundary, matches the target attenuation value with the preset attenuation boundary, and obtains the frequency band identifier and attenuation interval identifier for subsequent calls to compensation parameters, and outputs the frequency band and attenuation interval corresponding to the same control command.

[0030] The main control unit parses control commands to obtain the channel number, target attenuation value, and operating frequency. It then determines the frequency band based on the operating frequency and the attenuation range based on the target attenuation value. Specifically, the main control unit first converts the operating frequency to the frequency unit used in the compensation parameter table, and then queries the preset frequency band range in order from low to high frequency. When the operating frequency falls within a preset frequency band range, the number corresponding to that preset frequency band range is determined as the current frequency band, and the output result is the frequency band identifier corresponding to the operating frequency. In this embodiment, a frequency band refers to an index range used to distinguish different RF operating frequency ranges. The frequency band boundary is preset according to the calibration frequency range of the programmable RF attenuation system. The main control unit uses the same set of frequency band boundaries to match the operating frequency and the compensation parameter table, so that the compensation parameters called in S3 can correspond to the actual operating frequency of the current RF signal, and the output result is the frequency band identifier corresponding to the frequency band field in the compensation parameter table.

[0031] The attenuation range is determined based on the target attenuation value. Specifically, the main control unit compares the target attenuation value with the preset attenuation boundary and assigns the target attenuation value to the corresponding attenuation range. The attenuation range is an index range used to distinguish different target attenuation value ranges. Each attenuation range corresponds to a type of attenuation correction data in the compensation parameter table. The output result is an attenuation range identifier that corresponds to the attenuation range field in the compensation parameter table.

[0032] When the operating frequency is equal to the boundary value of two adjacent frequency bands, the main control unit determines a unique frequency band according to the preset boundary assignment rule. When the target attenuation value is equal to the boundary value of two adjacent attenuation intervals, the main control unit determines a unique attenuation interval according to the preset attenuation boundary assignment rule, so that the same control command corresponds to only one set of frequency band and attenuation interval index in the subsequent S3, and the output result is a uniquely determined frequency band identifier and attenuation interval identifier.

[0033] In this embodiment, the main control unit writes the frequency band identifier and attenuation interval identifier into the control data record formed in S1, and keeps them associated with the channel number, target attenuation value and operating frequency, so that the subsequent S3 can call the compensation parameters based on the frequency band, attenuation interval and channel number corresponding to the same control command, and the output result is a control data record containing the channel number, target attenuation value, operating frequency, frequency band identifier and attenuation interval identifier.

[0034] S3. Based on the frequency band, attenuation range, channel number, and cascade position of the multi-level cascade, call the corresponding compensation parameters from the compensation parameter table. The cascade position is used to characterize the serial position of the numerically controlled attenuation unit in the corresponding RF attenuation link, and the compensation parameters are used to correct the basic attenuation value of the corresponding cascade position.

[0035] Specifically, the main control unit reads the frequency band and attenuation range output by S2, and combines them with the channel number output by S1. It then performs a joint indexing in the compensation parameter table according to the frequency band, attenuation range, channel number, and cascade position to obtain the compensation parameters corresponding to each level of the numerically controlled attenuation unit in the target RF attenuation link. The output result is a set of compensation parameters that correspond one-to-one with each cascade position.

[0036] The multi-stage cascaded numerically controlled attenuation unit includes at least two stages of numerically controlled attenuation units arranged in series along the direction of radio frequency signal transmission. The cascade position is the serial sequence position of any numerically controlled attenuation unit in the corresponding radio frequency attenuation link. Specifically, the main control unit determines the transmission direction of the radio frequency signal in the radio frequency attenuation link according to the cascade configuration information of the target radio frequency attenuation link, and assigns a cascade position to each numerically controlled attenuation unit according to the direction of radio frequency signal transmission, so that each stage of numerically controlled attenuation unit has an identifiable serial sequence position in the compensation parameter table. The output result is the cascade position corresponding to each numerically controlled attenuation unit in the target radio frequency attenuation link.

[0037] Each RF attenuation link includes three cascaded numerically controlled attenuation units; the cascaded positions include a first cascaded position, a second cascaded position, and a third cascaded position arranged sequentially along the RF signal transmission direction; the first cascaded position, the second cascaded position, and the third cascaded position correspond to different numerically controlled attenuation units. In one specific embodiment, the main control unit determines the numerically controlled attenuation unit closest to the RF input end as the first cascaded position, the numerically controlled attenuation unit located in the middle cascaded position as the second cascaded position, and the numerically controlled attenuation unit closest to the RF output end as the third cascaded position, and calls independent compensation parameters for the first cascaded position, the second cascaded position, and the third cascaded position respectively, and the output results are the compensation parameters for the first cascaded position, the compensation parameters for the second cascaded position, and the compensation parameters for the third cascaded position.

[0038] The compensation parameter table includes a frequency band field, an attenuation range field, a channel number field, a cascade position field, and a compensation parameter field. Specifically, the frequency band field records the RF operating frequency range corresponding to the compensation parameter; the attenuation range field records the target attenuation value range corresponding to the compensation parameter; the channel number field records the RF attenuation link corresponding to the compensation parameter; the cascade position field records the serial sequence position of the numerically controlled attenuation unit corresponding to the compensation parameter; and the compensation parameter field records the attenuation correction amount under the common constraints of the above fields. The output result is a compensation parameter table that can be queried by the main control unit according to the combination of fields.

[0039] In this embodiment, the compensation parameter field is used to record the attenuation correction amount under the corresponding frequency band, corresponding attenuation interval, corresponding channel number, and corresponding cascade position. Specifically, when the main control unit determines the frequency band, attenuation interval, channel number, and cascade position corresponding to the current control command, it combines the above four types of index conditions to form compensation query conditions, and reads the attenuation correction amount that matches the compensation query conditions from the compensation parameter field. The attenuation correction amount is a signed value used to increase or decrease the basic attenuation value of the corresponding cascade position, and the output result is the compensation parameter of the corresponding cascade position.

[0040] The compensation parameter table is generated from calibration data. This calibration data includes the deviation between the actual attenuation value and the theoretical attenuation value measured at different calibration frequencies, different calibration attenuation values, different channel numbers, and different cascade positions. Specifically, during the system calibration phase, the calibration equipment measures the actual attenuation value at preset calibration frequencies, preset calibration attenuation values, each channel number, and each cascade position. The deviation between the actual and theoretical attenuation values ​​is used as the calibration data source, enabling the compensation parameters to reflect the attenuation offset caused by different frequencies, attenuation amplitudes, different channels, and different cascade positions. The output is the calibration data used to generate the compensation parameter table. In this embodiment, the compensation parameter is determined by the deviation obtained by subtracting the actual attenuation value from the theoretical attenuation value. When the actual attenuation value is less than the theoretical attenuation value, the compensation parameter is positive; when the actual attenuation value is greater than the theoretical attenuation value, the compensation parameter is negative.

[0041] The deviation is written into the compensation parameter table according to the corresponding frequency band, corresponding attenuation range, corresponding channel number, and corresponding cascade position, forming the compensation parameters for the corresponding cascade position. Specifically, the main control unit or external calibration equipment assigns the calibration frequency point to the corresponding frequency band, assigns the calibration attenuation value to the corresponding attenuation range, and writes the deviation obtained under the same channel number and the same cascade position into the compensation parameter field, forming the compensation parameter record corresponding to the frequency band field, attenuation range field, channel number field, and cascade position field. The output result is a compensation parameter table containing multi-dimensional index relationships.

[0042] The compensation parameter table is used to provide corresponding compensation parameters based on the frequency band, attenuation range, channel number, and cascade position. During operation, the main control unit does not re-execute calibration measurements. Instead, it directly queries the stored compensation parameter table based on the frequency band, attenuation range, channel number, and cascade position corresponding to the current control command, and temporarily stores the obtained compensation parameters in the compensation cache corresponding to the current control data record. This allows S5 to correct the basic attenuation value according to each cascade position, and the output result is the compensation cache data associated with the current control command.

[0043] When a compensation parameter record exists in the compensation parameter table that perfectly matches the current frequency band, attenuation range, channel number, and cascade position, the main control unit determines that compensation parameter record as the compensation parameter for the current cascade position. When no perfectly matching record exists in the compensation parameter table, the main control unit records the compensation parameter mismatch status and stops generating the set attenuation value for that cascade position. In this embodiment, the output result obtained in S3 is a set of compensation parameters corresponding to the current channel number, current frequency band, current attenuation range, and each cascade position. The set of compensation parameters includes at least the compensation parameter corresponding to each cascade position involved in attenuation control, and serves as the data input for correcting multiple basic attenuation values ​​in S5.

[0044] S4. Based on the target attenuation value and the allowable setting range of the numerical control attenuation unit at each level, generate multiple basic attenuation values. These multiple basic attenuation values ​​correspond to multiple cascaded positions in the same RF attenuation link.

[0045] Specifically, the main control unit reads the target attenuation value obtained in S1 and the allowable setting range of each level of the numerically controlled attenuation unit in the target RF attenuation link, and according to the cascade position order determined in S3, splits the target attenuation value into basic attenuation values ​​corresponding to each level of the cascade position, so that each basic attenuation value can be used as the initial attenuation setting data for subsequent compensation and correction of the corresponding cascade position.

[0046] Each RF attenuation link includes three cascaded numerically controlled attenuation units; the cascaded positions include a first cascaded position, a second cascaded position, and a third cascaded position arranged sequentially along the RF signal transmission direction; the first cascaded position, the second cascaded position, and the third cascaded position correspond to different numerically controlled attenuation units. In one specific embodiment, the main control unit decomposes the target attenuation value into a basic attenuation value for the first cascaded position, a basic attenuation value for the second cascaded position, and a basic attenuation value for the third cascaded position. The basic attenuation value for the first cascaded position is used to correspond to the numerically controlled attenuation unit near the RF input end, the basic attenuation value for the second cascaded position is used to correspond to the numerically controlled attenuation unit in the middle cascaded position, and the basic attenuation value for the third cascaded position is used to correspond to the numerically controlled attenuation unit near the RF output end.

[0047] Based on the allowable setting range and control step of each level of CNC attenuation unit, the target attenuation value is divided into multiple basic attenuation values ​​corresponding to multiple cascaded positions. Specifically, the main control unit first determines the minimum attenuation value, maximum attenuation value, and control step that each level of CNC attenuation unit can execute. Then, it allocates the target attenuation value sequentially according to the cascaded position order and the maximum attenuation value of each level of CNC attenuation unit, and adjusts the allocation result to an integer multiple of the control step. The control step is the smallest attenuation adjustment unit that the CNC attenuation unit can recognize and execute, and the allowable setting range is the attenuation setting interval that the corresponding CNC attenuation unit can receive and execute.

[0048] Among them, the difference between the sum of multiple basic attenuation values ​​and the target attenuation value is no greater than one control step, and each basic attenuation value is within the allowable setting range of the corresponding CNC attenuation unit. Specifically, when allocating basic attenuation values, the main control unit constrains each basic attenuation value to be no lower than the lower limit of the corresponding allowable setting range and no higher than the upper limit of the corresponding allowable setting range, and adjusts each basic attenuation value to an integer multiple of the control step, so that the sum of each basic attenuation value can be close to the target attenuation value and the difference between the two does not exceed one control step.

[0049] Multiple base attenuation values ​​correspond to multiple cascaded positions within the same RF attenuation link. When the target attenuation value is less than or equal to the upper limit of the allowable setting range for a single CNC attenuation unit, the main control unit allocates a base attenuation value to one cascaded position and sets the base attenuation values ​​for the remaining cascaded positions to the lower limit of the allowable setting range. When the target attenuation value is greater than the upper limit of the allowable setting range for a single CNC attenuation unit, the main control unit allocates the target attenuation value to multiple cascaded positions in sequence, allowing multiple CNC attenuation units within the same RF attenuation link to share the target attenuation value. Based on the target attenuation value and the allowable setting range of each CNC attenuation unit, during the base attenuation value generation process, the main control unit records the adjustable amount of each cascaded position relative to the allowable setting range boundary. This adjustable amount is used to subsequently determine the remaining setting range, ensuring that the base attenuation value allocation result can be seamlessly integrated with subsequent compensation corrections and inter-stage adjustments.

[0050] In this embodiment, the output of generating multiple basic attenuation values ​​is a set of basic attenuation values ​​corresponding to the current channel number. The set of basic attenuation values ​​includes basic attenuation values ​​corresponding to each cascade position, and serves as the data input for correction in S5 based on the compensation parameters corresponding to the cascade positions.

[0051] S5. Based on the compensation parameters corresponding to the cascade positions, correct the multiple basic attenuation values ​​to obtain multiple set attenuation values.

[0052] Specifically, the main control unit reads the set of basic attenuation values ​​generated by S4 and the set of compensation parameters obtained by S3. It establishes the correspondence between the basic attenuation values ​​and the compensation parameters one by one according to the cascaded positions in the same RF attenuation link. This ensures that the basic attenuation value of each cascaded position is corrected by the compensation parameters under the same channel number, the same frequency band, the same attenuation range, and the same cascaded position. The output result is the initial set attenuation value corresponding to each of the multiple cascaded positions.

[0053] The basic attenuation value is summed with the compensation parameter at the corresponding cascade position to obtain the set attenuation value for the corresponding cascade position. In this embodiment, the compensation parameter is a signed attenuation correction amount. The main control unit obtains the set attenuation value for the i-th cascade position according to the following relationship:

[0054] in The set attenuation value for the i-th cascade position. Let i be the base attenuation value at the i-th cascade position. Here is the compensation parameter corresponding to the i-th cascade position, where i is the cascade position number in the same RF attenuation link; When the compensation parameter is positive, the base attenuation value of the corresponding cascade position is increased; when the compensation parameter is negative, the base attenuation value of the corresponding cascade position is decreased; when the compensation parameter is zero, the base attenuation value of the corresponding cascade position remains unchanged. Specifically, the main control unit determines the correction direction based on the sign of the compensation parameter. A positive compensation parameter indicates that the cascade position needs to increase the attenuation setting under the current frequency band, current attenuation range, and current channel number; a negative compensation parameter indicates that the cascade position needs to decrease the attenuation setting under the current frequency band, current attenuation range, and current channel number; and a zero compensation parameter indicates that the base attenuation value of the cascade position can be directly used as the set attenuation value.

[0055] The compensation parameter field is used to record the attenuation correction amount under the corresponding frequency band, corresponding attenuation interval, corresponding channel number, and corresponding cascade position. In this embodiment, when the main control unit corrects the i-th cascade position, it only calls the compensation parameter in the compensation parameter table that matches the current frequency band, current attenuation interval, current channel number, and i-th cascade position simultaneously. This allows the attenuation deviations between different channels, different frequency bands, and different cascade positions to enter the calculation process of the set attenuation value for the corresponding cascade position. Multiple basic attenuation values ​​correspond to multiple cascaded positions in the same RF attenuation link. Therefore, after obtaining multiple set attenuation values, the main control unit will continue to maintain the binding relationship between each set attenuation value and the original cascaded position, and form a set of set attenuation values. The set of set attenuation values ​​is used to represent the attenuation setting data that each level of the numerical control attenuation unit in the same RF attenuation link needs to execute after compensation and correction.

[0056] In this embodiment, the output result obtained by S5 is a number of set attenuation values ​​corresponding to the current channel number, current frequency band, current attenuation interval and each stage position. The multiple set attenuation values ​​are used as data inputs for S6 to determine the allowable setting range and adjust the interstage.

[0057] S6. When any set attenuation value exceeds the allowable setting range of the corresponding CNC attenuation unit, the multiple set attenuation values ​​are adjusted between stages according to the remaining setting range of other cascaded positions.

[0058] Specifically, the main control unit reads multiple set attenuation values ​​obtained from S5 and compares each set attenuation value with the allowable setting range of the corresponding cascade position. When the set attenuation value of a certain cascade position is lower than the lower limit of the corresponding allowable setting range or higher than the upper limit of the corresponding allowable setting range, the cascade position is determined as an out-of-bounds cascade position. At the same time, other cascade positions in the same RF attenuation link that still have adjustable space are determined as acceptable cascade positions. The output results are the out-of-bounds cascade position, the out-of-bounds direction, and the acceptable cascade position.

[0059] The remaining setting range is the adjustable range between the set attenuation value and the boundary of the allowable setting range of the corresponding CNC attenuation unit. Specifically, when an attenuation value needs to be increased at a certain cascade position, the remaining setting range is the amount of attenuation that can still be increased between the current set attenuation value at that cascade position and the upper limit of the corresponding allowable setting range. When an attenuation value needs to be decreased at a certain cascade position, the remaining setting range is the amount of attenuation that can still be decreased between the current set attenuation value at that cascade position and the lower limit of the corresponding allowable setting range. The output result is the remaining setting range corresponding to each cascade position along the current adjustment direction.

[0060] Inter-level adjustment includes: adjusting the set attenuation value that exceeds the allowable setting range to the boundary value of the corresponding allowable setting range, and allocating the excess portion to other cascaded positions that still have remaining setting range. Specifically, when the set attenuation value of the cascaded position that exceeds the boundary is higher than the upper limit of the corresponding allowable setting range, the main control unit adjusts the set attenuation value to the upper limit of the corresponding allowable setting range and uses the attenuation amount above the upper limit as the excess portion to be transferred. When the set attenuation value of the cascaded position that exceeds the boundary is lower than the lower limit of the corresponding allowable setting range, the main control unit adjusts the set attenuation value to the lower limit of the corresponding allowable setting range and uses the attenuation amount below the lower limit as the excess portion to be replenished. The output result is the set attenuation value after adjustment to the boundary value of the allowable setting range and the excess portion to be allocated.

[0061] Based on the remaining setting range of other cascaded positions, multiple set attenuation values ​​are adjusted between stages. Specifically, the main control unit allocates the excess portion to other cascaded positions that still have remaining setting ranges, according to the size of the remaining setting range of each cascaded position that can be accepted within the same RF attenuation link. This causes the set attenuation value of the cascaded position to be adjusted in the compensation direction opposite to that of the out-of-bounds cascaded position, while maintaining the correspondence between the adjusted set attenuation value and the original cascaded position. The output result is multiple set attenuation values ​​after interstage allocation.

[0062] To ensure that all adjusted attenuation values ​​fall within the allowable setting range of the corresponding CNC attenuation unit, the main control unit, after completing one inter-stage allocation, re-determines the allowable setting range of the attenuation values ​​for each cascade position. If there are still cascade positions where the set attenuation value exceeds the corresponding allowable setting range, and the remaining setting range of other cascade positions can accommodate the excess, the inter-stage adjustment continues according to the relationship between the out-of-bounds cascade positions, the excess portion, and the accommodating cascade positions. If the remaining setting range of other cascade positions cannot accommodate the excess portion, the main control unit records the inter-stage adjustment anomaly and outputs multiple set attenuation values ​​that satisfy the allowable setting range constraints or the inter-stage adjustment anomaly. When the main control unit records an inter-stage adjustment anomaly, it stops generating control codes for the corresponding control commands.

[0063] In this embodiment, the output result obtained by S6 is a plurality of adjusted set attenuation values. The plurality of adjusted set attenuation values ​​correspond to a plurality of cascaded positions in the same RF attenuation link and are used as data input for the subsequent generation of corresponding control codes.

[0064] Before generating the control code, the main control unit performs residual correction processing on the adjusted set attenuation values ​​obtained in S6. This residual correction processing further reduces the deviation between the sum of the adjusted set attenuation values ​​and the target attenuation value, ensuring that the final set attenuation value used to generate the control code simultaneously satisfies the constraints of control step, remaining setting range, and compensation parameters, based on the fact that each set attenuation value already meets the allowable setting range. The main control unit first calculates the residual difference, which is the difference between the target attenuation value and the sum of the adjusted set attenuation values. When the residual difference is positive, it indicates that the sum of the adjusted set attenuation values ​​is lower than the target attenuation value, requiring correction in the direction of increasing the attenuation value. When the residual difference is negative, it indicates that the sum of the adjusted set attenuation values ​​is higher than the target attenuation value, requiring correction in the direction of decreasing the attenuation value. The main control unit determines whether the absolute value of the residual difference is greater than one control step, and determines whether there is a cascade position in the same RF attenuation link that still has a remaining setting range along the correction direction of the residual difference. When the absolute value of the residual difference is greater than one control step and there is a cascade position that still has a remaining setting range along the correction direction of the residual difference, the cascade position is determined as the cascade position participating in the residual correction.

[0065] In this embodiment, the control step is the smallest attenuation adjustment unit that the numerically controlled attenuation unit can execute. The remaining setting range is the amount of attenuation that can still be adjusted between the current set attenuation value of the corresponding cascade position and the boundary of the allowable setting range. The compensation parameter is a signed attenuation correction amount called from the compensation parameter table. The cascade positions participating in the residual correction are those that can still increase or decrease the set attenuation value in the current correction direction. The main control unit determines the residual correction amount of each cascade position participating in the residual correction based on the remaining setting range, compensation parameter, and control step. The residual correction amount of the i-th cascade position participating in the residual correction satisfies the following relationship:

[0066] in, The residual correction amount at the i-th cascade position participating in residual correction. The residual difference, The sign function of the residual difference. For the control step of the numerical control attenuation unit, The remaining setting range of the cascaded position participating in the residual correction along the correction direction of the residual difference. Let be the compensation parameter corresponding to the i-th cascade position participating in residual correction. The remaining setting range along the correction direction of the residual difference for the j-th cascaded position participating in residual correction. Let be the compensation parameter corresponding to the j-th cascade position participating in residual correction. The number of cascade positions participating in the residual correction is represented by i and j, where i and j are the cascade position numbers participating in the residual correction. This indicates rounding down to the nearest integer.

[0067] In the above formula, This represents the maximum number of control steps that the i-th cascaded position participating in residual correction can execute in the current correction direction. Used to indicate the number of control steps that the residual difference can correspond to. This is used to represent the correction allocation weight of the i-th cascaded position participating in residual correction under the combined effect of the remaining setting range and the compensation parameter. When the remaining setting range of a cascaded position is large and the absolute value of the compensation parameter is small, the cascaded position receives a large residual correction allocation; when the remaining setting range of a cascaded position is small or the absolute value of the compensation parameter is large, the cascaded position receives a small residual correction allocation. The main control unit, according to... Determine the direction of the residual correction amount. When the value is positive, the set attenuation value at the corresponding cascade position is summed with the positive residual correction. When the value is negative, the set attenuation value at the corresponding cascade position is summed with the negative residual correction amount to obtain the set attenuation value after residual correction.

[0068] When the absolute value of the residual difference is not greater than one control step, or there are no cascaded positions with remaining setting range along the residual difference correction direction, the main control unit keeps the adjusted multiple set attenuation values ​​obtained in S6 unchanged, and uses the adjusted multiple set attenuation values ​​as data input for generating control codes in subsequent S7. In this embodiment, the output result of the residual correction processing is multiple set attenuation values ​​after residual correction. These multiple set attenuation values ​​after residual correction correspond to multiple cascaded positions in the same RF attenuation link, and are used as data input for generating corresponding control codes in S7.

[0069] S7. Generate corresponding control codes based on the adjusted multiple set attenuation values, and send the control codes to the numerical control attenuation units at each level of the corresponding channel.

[0070] Specifically, the main control unit reads the adjusted set attenuation values ​​output by S6, and converts each set attenuation value into a control code that can be recognized by the corresponding CNC attenuation unit according to the correspondence between the set attenuation value and the cascade position. The control code is digital control data used to enable the CNC attenuation unit to execute the corresponding attenuation setting. The output result is the control code that matches the CNC attenuation unit at each level in the corresponding channel.

[0071] The control code generation unit generates multiple basic attenuation values ​​based on the target attenuation value, corrects these basic attenuation values ​​according to the corresponding compensation parameters to obtain multiple set attenuation values, and performs inter-stage adjustments based on the remaining setting range of other cascade positions when any set attenuation value exceeds the allowable setting range of the corresponding CNC attenuation unit. Before generating the control code, residual correction is performed based on the residual difference to generate the control code. Specifically, when the multiple set attenuation values ​​output by S6 already meet the allowable setting range of each level of CNC attenuation unit, the control code generation unit converts the adjusted multiple set attenuation values ​​into control codes for the corresponding cascade positions, based on the cascade positions, so that the control code can simultaneously contain the corresponding channel information, cascade position information, and attenuation setting information.

[0072] Before generating the corresponding control code based on the adjusted multiple set attenuation values, the process also includes calculating the residual difference. Specifically, when the residual corrected set attenuation value has been obtained according to the residual correction rule before generating the control code, the control code generation unit uses the residual corrected set attenuation value as the input for generating the control code. When the residual correction condition is not triggered, the control code generation unit uses the adjusted multiple set attenuation values ​​output by S6 as the input for generating the control code, and the output result is the control code corresponding to the final set attenuation value.

[0073] The multi-channel RF attenuation link is used to receive the control code of the corresponding channel and output the corresponding attenuation status through the numerically controlled attenuation units at each level in the corresponding channel. Specifically, the main control unit determines the target of the control code according to the channel number and determines the order of the control code in the same RF attenuation link according to the cascade position, so that the numerically controlled attenuation units corresponding to the first, second and third cascade positions receive the control code corresponding to their own set attenuation value, and the output result is the attenuation setting status of the numerically controlled attenuation units at each level in the corresponding channel.

[0074] When a control command corresponds to multiple channel numbers, the main control unit uniformly sends out the corresponding control codes for each target channel after the control codes for each target channel have been generated. Specifically, the main control unit first generates the control codes for each level of the numerical control attenuation unit in each target channel, and temporarily stores the control codes of different target channels in the corresponding channel's sending buffer. After the control codes for each target channel have been generated, the main control unit sends the corresponding control codes to each target channel according to the preset sending sequence, so that multiple target channels can complete the attenuation setting based on the same control command.

[0075] The abnormal channel is determined based on the control execution status returned by each target channel. The control execution status includes control code response status, latch status, and error status. Abnormal channels include channels where the control code has not responded, latching has failed, or the error status is set. Specifically, after the control code is issued, the main control unit reads the control execution status returned by each target channel. When a target channel does not return a control code response status, the corresponding CNC attenuation unit does not form a latch status, or the error status is set, the target channel is determined as an abnormal channel, and the channel number and cascade position corresponding to the abnormal channel are recorded.

[0076] In this embodiment, the output result obtained by S7 is the control code that has been sent to each level of the numerical control attenuation unit in the corresponding channel, the control execution status returned by each target channel, and the abnormal channel record determined according to the control execution status.

[0077] Example 2: The present invention provides a multi-channel programmable radio frequency attenuation system. The multi-channel programmable radio frequency attenuation system includes a host computer, a main control unit, a compensation parameter storage unit, a control code generation unit, and multiple independent radio frequency attenuation links. Each radio frequency attenuation link includes multiple cascaded numerically controlled attenuation units. The host computer is used to send control commands; The main control unit is used to parse control commands, obtain the channel number, target attenuation value and operating frequency, determine the frequency band based on the operating frequency, and determine the attenuation range based on the target attenuation value; The compensation parameter storage unit is used to store the compensation parameter table, which provides the corresponding compensation parameters according to the frequency band, attenuation range, channel number and cascade position. The control code generation unit is used to generate multiple basic attenuation values ​​based on the target attenuation value, correct the multiple basic attenuation values ​​according to the corresponding compensation parameters to obtain multiple set attenuation values, and when any set attenuation value exceeds the allowable setting range of the corresponding CNC attenuation unit, it performs inter-level adjustment according to the remaining setting range of other cascaded positions, and performs residual correction according to the residual difference before generating the control code; The multi-channel RF attenuation link is used to receive the control code of the corresponding channel and output the corresponding attenuation status through the digitally controlled attenuation units at each level in the corresponding channel.

[0078] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A multi-channel programmable radio frequency attenuation method, characterized in that, A programmable radio frequency attenuation system is applied to a system comprising multiple independent radio frequency attenuation links, each radio frequency attenuation link including multiple cascaded numerically controlled attenuation units. The method is executed by a main control unit and includes: S1. Receive control commands sent by the host computer and parse them to obtain the channel number, target attenuation value and operating frequency; S2. Determine the frequency band based on the operating frequency, and determine the attenuation range based on the target attenuation value; S3. Based on the frequency band, attenuation range, channel number and cascade position of the multi-level cascade, call the corresponding compensation parameter from the compensation parameter table. The cascade position is used to characterize the serial position of the numerically controlled attenuation unit in the corresponding RF attenuation link. The compensation parameter is used to correct the basic attenuation value of the corresponding cascade position. S4. Based on the target attenuation value and the allowable setting range of the numerical control attenuation unit at each level, generate multiple basic attenuation values, which correspond to multiple cascaded positions in the same RF attenuation link. S5. Based on the compensation parameters corresponding to the cascade position, the multiple basic attenuation values ​​are corrected to obtain multiple set attenuation values; S6. When any set attenuation value exceeds the allowable setting range of the corresponding CNC attenuation unit, the multiple set attenuation values ​​are adjusted between stages according to the remaining setting range of other cascaded positions. S7. Generate corresponding control codes based on the adjusted multiple set attenuation values, and send the control codes to the numerical control attenuation units at each level of the corresponding channel.

2. The multi-channel programmable radio frequency attenuation method according to claim 1, characterized in that, The multi-stage cascaded numerically controlled attenuation unit includes at least two stages of numerically controlled attenuation units arranged in series along the direction of radio frequency signal transmission. The cascade position is the serial position of any numerically controlled attenuation unit in the corresponding radio frequency attenuation link.

3. The multi-channel programmable radio frequency attenuation method according to claim 2, characterized in that, Each RF attenuation link includes three cascaded numerically controlled attenuation units; The cascade positions include a first cascade position, a second cascade position, and a third cascade position arranged sequentially along the radio frequency signal transmission direction; The first cascade position, the second cascade position, and the third cascade position each correspond to a different numerically controlled attenuation unit.

4. The multi-channel programmable radio frequency attenuation method according to claim 1, characterized in that, The compensation parameter table includes a frequency band field, an attenuation range field, a channel number field, a cascade location field, and a compensation parameter field. The compensation parameter field is used to record the attenuation correction amount under the corresponding frequency band, corresponding attenuation interval, corresponding channel number, and corresponding cascade position.

5. The multi-channel programmable radio frequency attenuation method according to claim 4, characterized in that, The compensation parameter table is generated from calibration data, which includes the deviation between the actual attenuation value and the theoretical attenuation value measured at different calibration frequencies, different calibration attenuation values, different channel numbers, and different cascade positions. The deviation is written into the compensation parameter table according to the corresponding frequency band, corresponding attenuation range, corresponding channel number and corresponding cascade position to form the compensation parameters for the corresponding cascade position.

6. The multi-channel programmable radio frequency attenuation method according to claim 1, characterized in that, The generation of multiple basic attenuation values ​​includes: Based on the allowable setting range and control step of each level of CNC attenuation unit, the target attenuation value is divided into multiple basic attenuation values ​​corresponding to multiple cascaded positions. Wherein, the difference between the sum of the plurality of basic attenuation values ​​and the target attenuation value is no greater than one control step, and each basic attenuation value is within the allowable setting range of the corresponding numerical control attenuation unit.

7. The multi-channel programmable radio frequency attenuation method according to claim 1, characterized in that, The correction of multiple base attenuation values ​​includes: The basic attenuation value is summed with the compensation parameter at the corresponding cascade position to obtain the set attenuation value at the corresponding cascade position. When the compensation parameter is positive, the base attenuation value at the corresponding cascade position is increased; When the compensation parameter is negative, the base attenuation value at the corresponding cascade position is reduced. When the compensation parameter is zero, the base attenuation value at the corresponding cascade position remains unchanged.

8. The multi-channel programmable radio frequency attenuation method according to claim 1, characterized in that, The remaining setting range is the adjustable range between the set attenuation value and the boundary of the allowable setting range of the corresponding CNC attenuation unit; The inter-level adjustment includes: adjusting the set attenuation value that exceeds the allowable setting range to the boundary value of the corresponding allowable setting range, and allocating the excess part to other cascaded positions that still have remaining setting range, so that each set attenuation value after adjustment is within the allowable setting range of the corresponding CNC attenuation unit; When the control command corresponds to multiple channel numbers, the main control unit uniformly issues the control codes corresponding to each target channel after the control codes of each target channel are generated, and determines the abnormal channel based on the control execution status returned by each target channel. The control execution state includes control code response state, latching state, and error state. The abnormal channel includes channels where the control code is not responded to, latching fails, or the error state is set.

9. The multi-channel programmable radio frequency attenuation method according to claim 1, characterized in that, Before generating the corresponding control code based on the adjusted multiple set attenuation values, the method further includes: Calculate the residual difference, which is the difference obtained by subtracting the sum of the adjusted set attenuation values ​​from the target attenuation value; When the absolute value of the residual difference is greater than a control step, and there exists a cascade position that still has a remaining setting range along the correction direction of the residual difference, the cascade positions participating in the residual correction are determined. Based on the remaining setting range, compensation parameters, and control steps of each cascade position participating in the residual correction, the residual correction amount of each cascade position participating in the residual correction is determined. The residual correction amount of the i-th cascade position participating in the residual correction satisfies the following relationship: ; in, The residual correction amount at the i-th cascade position participating in residual correction. The residual difference, The sign function of the residual difference. For the control step of the numerical control attenuation unit, The remaining setting range of the cascaded position participating in the residual correction along the correction direction of the residual difference. Let be the compensation parameter corresponding to the i-th cascade position participating in residual correction. The remaining setting range along the correction direction of the residual difference for the j-th cascaded position participating in residual correction. Let be the compensation parameter corresponding to the j-th cascade position participating in residual correction. The number of cascade positions participating in the residual correction is represented by i and j, where i and j are the cascade position numbers participating in the residual correction. Indicates rounding down; The main control unit sums the set attenuation value of each cascaded position participating in residual correction with the corresponding residual correction amount to obtain the set attenuation value after residual correction, and generates the corresponding control code based on the set attenuation value after residual correction.

10. A multi-channel programmable radio frequency attenuation system, applied to the multi-channel programmable radio frequency attenuation method according to any one of claims 1-9, characterized in that, The multi-channel programmable radio frequency attenuation system includes a host computer, a main control unit, a compensation parameter storage unit, a control code generation unit, and multiple independent radio frequency attenuation links. Each radio frequency attenuation link includes multiple cascaded numerically controlled attenuation units. The host computer is used to send control commands; The main control unit is used to parse the control command to obtain the channel number, target attenuation value and operating frequency, and to determine the frequency band according to the operating frequency and the attenuation range according to the target attenuation value; The compensation parameter storage unit is used to store a compensation parameter table, which is used to provide corresponding compensation parameters according to the frequency band, the attenuation interval, the channel number and the cascading position. The control code generation unit is used to generate multiple basic attenuation values ​​based on the target attenuation value, correct the multiple basic attenuation values ​​according to the corresponding compensation parameters to obtain multiple set attenuation values, and when any set attenuation value exceeds the allowable setting range of the corresponding CNC attenuation unit, perform inter-level adjustment according to the remaining setting range of other cascaded positions, and perform residual correction according to the residual difference before generating the control code; The multi-channel RF attenuation link is used to receive the control code of the corresponding channel and output the corresponding attenuation status through the numerically controlled attenuation units at each level in the corresponding channel.