Signal control method and system, terminal and computer storage medium

By using a microcontroller unit and attenuator in the RF signal control system, combining a power detection module and a microstrip coupling circuit, dynamic power attenuation of the RF signal is achieved, which solves the problem that the attenuation value cannot be dynamically adjusted in the prior art, and improves the The control effect of radio frequency signals and the stability of the system.

CN119094053APending Publication Date: 2024-12-06GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310659500.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-05
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing RF signal attenuation control system cannot dynamically adjust the attenuation value, which cannot meet the requirements of different attenuation values ​​for RF signals, which may lead to saturation or damage to the RF circuit.

Method used

Provide a signal control method and system, using a microcontroller unit and attenuator, dynamic power attenuation of radio frequency signals through power detection module and microstrip coupling circuit, and the attenuation value can be adjusted in two working modes to ensure output. The power of the signal reaches the preset value.

Benefits of technology

It realizes flexible control of RF signals, improves the control effect of RF signals, avoids saturation or damage of RF circuits, and adapts to the accuracy requirements of different frequency bands by dynamically adjusting the attenuation value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094053A_ABST
    Figure CN119094053A_ABST
Patent Text Reader

Abstract

The invention provides a signal control method and system, a terminal and a computer storage medium, and relates to the technical field of radio frequency communication. The method is applied to a micro-control unit in the signal control system, the signal control system further comprises an attenuator, and the method comprises the following steps: receiving and responding to a working mode instruction; under the condition that the working mode instruction is a first working mode instruction, receiving and responding to a numerical control instruction to determine a first preset value, and controlling an attenuator to perform power attenuation on the input signal according to the first preset value to obtain an output signal, the power difference value between the input power of the input signal and the output power of the output signal is equal to a first preset value; and under the condition that the working mode instruction is a second working mode instruction, the numerical control instruction is received and responded to determine a second preset value, the attenuator is controlled to carry out power attenuation on the input signal according to the second preset value to obtain an output signal, and the output power of the output signal is equal to the second preset value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of radio frequency communication technology, and in particular to a signal control method, system, terminal and computer storage medium. Background Art

[0002] In radio frequency (RF) circuits, higher signal levels can improve the signal-noise ratio (SNR) and reduce internal circuit component noise and external signal noise. However, the dynamic range of RF signals is usually higher than 30dB. If the communication system is designed to work properly with lower-level signals, there may not be room for higher power signals (RF, power, and signal levels are usually closely related), which will eventually lead to saturation or overload of the RF circuit, and even damage sensitive analog components such as front-end amplifiers. Therefore, when performing RF communication or measuring RF signals, it is usually necessary to attenuate the power of the RF signal to achieve stable transmission of the RF signal.

[0003] However, most RF signal attenuation control systems can only attenuate the power of RF signals in RF circuits at a fixed attenuation value, and cannot meet the demand for attenuating the power of RF signals at different attenuation values.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present application is to provide a signal control method, system, terminal and computer storage medium, which can at least improve the control effect of radio frequency signals to a certain extent.

[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0007] In a first aspect, a signal control method is provided, which is applied to a microcontroller unit in a signal control system, wherein the signal control system further includes an attenuator, and the method includes: receiving and responding to an operating mode instruction, wherein the operating mode instruction includes a first operating mode instruction and a second operating mode instruction; when the operating mode instruction is the first operating mode instruction, receiving and responding to a numerical control instruction to determine a first preset value, and controlling the attenuator to perform power attenuation on an input signal according to the first preset value to obtain an output signal, wherein the power difference between the input power of the input signal and the output power of the output signal is equal to the first preset value; when the operating mode instruction is the second operating mode instruction, receiving and responding to the numerical control instruction to determine a second preset value, and controlling the attenuator to perform power attenuation on the input signal according to the second preset value to obtain the output signal, wherein the output power of the output signal is equal to the second preset value.

[0008] In one embodiment of the present application, the signal control system further includes a power detection module and a microstrip coupling circuit, and the control of the attenuator to attenuate the input signal according to the first preset value to obtain an output signal includes: controlling the attenuator to attenuate the input signal according to the first preset value to obtain an actual output signal; determining the power difference between the input power and the actual output power of the actual output signal, wherein the input signal and the actual output signal are input into the power detection module through the microstrip coupling circuit, and the input power and the actual output power are obtained by detection by the power detection module; judging whether the power difference is equal to the first preset value; if the power difference is not equal to the first preset value, controlling the attenuator to adjust the attenuation value to be equal to the first preset value, and controlling the attenuator to attenuate the input signal according to the attenuation value to obtain the output signal.

[0009] In one embodiment of the present application, the signal control system further includes a power detection module and a microstrip coupling circuit, and the control of the attenuator to attenuate the input signal according to the second preset value to obtain the output signal includes: controlling the attenuator to attenuate the input signal according to the second preset value to obtain the actual output signal; determining the actual output power of the actual output signal, wherein the input signal and the actual output signal are input into the power detection module through the microstrip coupling circuit, and the actual output power is obtained by detection by the power detection module; judging whether the actual output power is equal to the second preset value; if the actual output power is not equal to the second preset value, controlling the attenuator to adjust the attenuation value, and controlling the attenuator to attenuate the input signal according to the attenuation value to obtain the output signal, wherein the attenuation value is equal to the power difference between the input power of the input signal and the second preset value.

[0010] In one embodiment of the present application, the method further includes: when the actual output power is equal to the second preset value, determining the actual output power of the actual output signal.

[0011] In one embodiment of the present application, the above-mentioned receiving and responding to the numerical control instruction includes: receiving the above-mentioned numerical control instruction sent by the numerical control button, wherein the above-mentioned numerical control instruction is generated when the above-mentioned numerical control button is pressed; judging whether the duration of the above-mentioned numerical control button being pressed is greater than the preset duration; in the case that the above-mentioned duration is greater than the preset duration, responding to the above-mentioned numerical control instruction, wherein the above-mentioned numerical control instruction is used to control the numerical value to increase or decrease by a first change amount every the above-mentioned preset duration.

[0012] In one embodiment of the present application, the method further includes: when the duration is less than the preset duration, determining whether the numerical control button is released; when the numerical control button is released, responding to the numerical control instruction, wherein the numerical control instruction is used to control the numerical value to increase or decrease by a second change amount; when the numerical control button is not released, determining whether the duration for which the numerical control button is pressed is greater than the preset duration.

[0013] According to a second aspect, a signal control system is provided, the system comprising a microcontroller unit and an attenuator; wherein the microcontroller unit is used to: receive and respond to an operating mode instruction, wherein the operating mode instruction comprises a first operating mode instruction and a second operating mode instruction; the microcontroller unit is also used to: when the operating mode instruction is the first operating mode instruction, receive and respond to a numerical control instruction to determine a first preset value, and control the attenuator to perform power attenuation on the input signal according to the first preset value to obtain an output signal, wherein the power difference between the input power of the input signal and the output power of the output signal is equal to the first preset value; the microcontroller unit is also used to: when the operating mode instruction is the second operating mode instruction, receive and respond to the numerical control instruction to determine a second preset value, and control the attenuator to perform power attenuation on the input signal according to the second preset value to obtain the output signal, wherein the output power of the output signal is equal to the second preset value.

[0014] According to a third aspect, a terminal is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the terminal executes the signal control method described in the first aspect.

[0015] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the signal control method described in the first aspect is implemented.

[0016] The embodiments of the present application provide a signal control method, system, terminal and computer storage medium, which have the following technical effects:

[0017] The signal control method can be applied to a microcontroller unit in a signal control system, which also includes an attenuator. The method can detect the power of the input radio frequency signal and dynamically control it, and can achieve different dynamic control effects in two working modes.

[0018] In the first working mode, the microcontroller unit determines a first preset value and controls the attenuator to attenuate the power of the input RF signal according to the first preset value, that is, to attenuate the power of the input signal with a fixed attenuation value and obtain an attenuated RF signal.

[0019] In the second working mode, the microcontroller unit determines a second preset value and controls the attenuator to attenuate the input RF signal according to the second preset value, that is, attenuates the input signal with a fixed output power and obtains an attenuated RF signal.

[0020] The present application can detect the power value of the radio frequency signal and implement power attenuation control of the radio frequency signal in different working modes, thereby improving the control effect of the radio frequency signal.

[0021] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 is a structural diagram of a signal control system provided by an exemplary embodiment of the present application;

[0024] Figure 2 It is a schematic diagram of an external device providing power to a signal control system according to an exemplary embodiment of the present application;

[0025] Figure 3 is a functional logic flow chart of a numerical control key provided by an exemplary embodiment of the present application;

[0026] Figure 4 is a flow chart of a signal control method provided by an exemplary embodiment of the present application;

[0027] Figure 5 is a working logic flow chart of a fixed attenuation value mode provided by an exemplary embodiment of the present application;

[0028] Figure 6 is a working logic flow chart of a constant output power mode provided by an exemplary embodiment of the present application;

[0029] Figure 7 is a structural diagram of a signal control system provided by an exemplary embodiment of the present application;

[0030] Figure 8 It is a block diagram of a terminal provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0032] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0033] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0034] In the related art, since the attenuator type used in the RF signal attenuation control system is usually a fixed attenuator, different RF attenuation links usually need to be configured with attenuators with different attenuation values, and when the attenuation value needs to be changed, the RF signal attenuation control system needs to be disconnected from other devices, which cannot meet the needs of dynamic attenuation value adjustment. In addition, additional insertion loss may be introduced due to port matching problems.

[0035] In view of the problems existing in the above-mentioned related technologies, the present application proposes a signal control method, system, terminal and computer storage medium to solve the problem that the related technologies cannot realize efficient control of radio frequency signals.

[0036] Below, each step of the signal control method in this example implementation will be described in more detail with reference to the accompanying drawings and embodiments.

[0037] Figure 1 A structural diagram of a signal control system provided by an exemplary embodiment of the present application is shown.

[0038] For example, Figure 1 As shown, the signal control system 100 includes a microcontroller unit 11, an attenuator 12, a power detection module 13, control buttons, a display screen, a universal asynchronous receiver / transmitter (UART) to universal serial bus (USB) communication module (hereinafter referred to as UART to USB module), and a microstrip coupling circuit.

[0039] For example, continue to refer to Figure 1 The microcontroller unit 11 may be a microcontroller unit (MCU). The MCU appropriately reduces the frequency and specifications of the central processing unit (CPU), and integrates peripheral interfaces such as memory, counter, USB, ADC, UART, PLC, DMA, etc. on a single chip to form a chip-level computer, which can perform different combination controls for different application scenarios, and has the advantages of high performance, low power consumption, programmability, high flexibility, etc.

[0040] For example, continue to refer to Figure 1 The signal control system 100 can be connected to the system to be tested and obtain the input radio frequency signal, wherein the system to be tested includes radio frequency devices, such as routers, Bluetooth devices, etc. After the signal control system 100 is connected to the system to be tested, the radio frequency signal sent by the system to be tested will be input into the signal control system 100.

[0041] For example, continue to refer to Figure 1 , after the input signal enters the signal control system 100, the microstrip coupling circuit will perform microstrip coupling on the power of the input signal. The microstrip coupling circuit will separate a certain ratio of power from the input power of the input signal, and input the power with the above certain ratio into the power detection module 13. The power detection module 13 can obtain the input power of the input signal according to the acquired power, thereby completing the power detection of the input signal. Among them, the power detection module 13 can use a power detector of the LMH2110 model with a working current of 5mA, with a dynamic detection range of -40dBm to 5dBm, which is suitable for accurate power measurement of modulated RF signals. The model, detection range, etc. of the above-mentioned power detection module 13 are only examples and are not limited in this embodiment.

[0042] For example, continue to refer to Figure 1 Since most MCUs do not have the function of directly reading power values, but have the function of voltage sampling, the power detection module 13 can convert the input power into a corresponding input voltage, so that the micro control unit 11 can perform calculation processing on the input voltage of the input signal.

[0043] For example, continue to refer to Figure 1 When the power detection module 13 communicates with the input to the micro control unit 11, the communication signal sent by the power detection module 13 needs to be converted into a digital signal through an analog-to-digital converter (ADC), so that the micro control unit 11 processes the communication signal in the form of a digital signal and obtains data such as the input voltage therein.

[0044] For example, continue to refer to Figure 1 , attenuator 12 (attenuator 12') can achieve power attenuation of the input signal. Attenuator 12 (attenuator 12') can use a CNC chip with a 31.5db range that is adjustable in 0.5db steps, and the model can be HMC1122. Two attenuator chips can be used in the signal control system 100, so that the maximum RF power attenuation can reach 63db. The high dynamic attenuation value can meet most usage scenarios, and some air interface transmission tests (Over The Air, OTA) can also be simulated using the signal control system 100. The step range, model and configuration quantity of the above-mentioned attenuator 12 are only examples and are not limited in this embodiment.

[0045] For example, continue to refer to Figure 1 The microcontroller unit 11 can control the attenuator 12 and the attenuator 12' through a serial peripheral interface (SPI), for example, changing the attenuation value in the attenuator 12 and the attenuator 12', etc. The advantage of controlling the attenuator through the SPI is that if the attenuator in the system needs to be replaced, there is no need to disassemble the attenuator, thereby saving time and reducing plug-in loss.

[0046] For example, continue to refer to Figure 1 , after the first input signal passes through the attenuator 12 and the attenuator 12', an attenuated output signal is obtained. Similarly, the microstrip coupling circuit will perform microstrip coupling on the power of the output signal. The microstrip coupling circuit will separate a certain ratio of power from the output power of the output signal, and input the power with the above certain ratio into the power detection module 13'. The power detection module 13' can obtain the output power of the output signal according to the acquired power, thereby completing the power detection of the output signal. The model, detection range, etc. of the power detection module 13' can refer to the above description of the power detection module 13, and will not be repeated in this embodiment.

[0047] For example, continue to refer to Figure 1 The power detection module 13' will also convert the output power into a corresponding output voltage, so that the micro control unit 11 can perform calculations on the output voltage of the output signal. The communication method between the power detection module 13' and the micro control unit 11 is described in the above embodiment, which will not be repeated in this embodiment.

[0048] Optionally, for signal power detection, the power detection module and the microstrip coupling circuit may be replaced with a receiver with higher sensitivity, etc. Different configuration schemes may be selected according to actual needs.

[0049] Optional, for input signal power attenuation, in addition to the configuration Figure 1 In addition to the single-channel attenuation shown, dual-channel attenuation, quad-channel attenuation, etc. can also be configured, which is not limited in this embodiment. Multi-channel power attenuation can better adapt to the test scenario of the multi-input multi-output system (Multi-Input Multi-Output, MIMO).

[0050] For example, continue to refer to Figure 1 The control button is connected to the micro control unit 11 through an input / output (I / O) port to achieve data communication. The control button can send mode selection instructions, numerical control instructions, etc. to the micro control unit 11, thereby achieving functions such as working mode selection and numerical increase and decrease.

[0051] For example, continue to refer to Figure 1 The micro control unit 11 can also communicate with the integrated circuit bus (Inter-Integrated Circuit, IIC or I 2 C) Connecting a display screen. The display screen may be an organic light-emitting diode (OLED) screen, and the resolution may be sufficient to display the working status of the signal control unit 100, for example, a resolution of 128×64. The display of the working status may include displaying parameters such as the working mode of the signal control unit 100, the power value of the signal, and the attenuation value.

[0052] For example, continue to refer to Figure 1 , a UART to USB module can also be added to the signal control system 100. The signal control system 100 is connected to the UART to USB module via the UART interface, and the UART to USB module is then connected to the external device via the Type-C interface, thereby realizing the connection between the signal control system 100 and the external device, and no other cables need to be connected. Among them, the external device includes a laptop, a desktop computer, a mobile phone, etc.

[0053] For example, the external device can provide power for the signal control system 100. Figure 2 The schematic diagram of the external device supplying power to the signal control system is shown in FIG. Figure 2 As shown, after the signal control system 100 is connected to an external device through the Type-C interface, the external device can provide a 5V power supply to the power chip configured in the signal control system 100, and the power chip can then provide the power required by the chips in other modules, control units, etc. in the signal control system 100. Figure 2As shown, the power chip 1 is the attenuator chip 1 in the attenuator 12, the attenuator chip 2 in the attenuator 12', the power detection chip 1 in the power detection module 13, and the power detection chip 2 in the power detection module 13', all of which provide 3.3V power, etc.; the power chip 2 provides 3.3V power for the micro control unit 11 and the display screen, etc. The power supply voltage provided by the above-mentioned external devices and the power supply voltage distribution of each module in the signal control system 100 are only examples and are not limited in this embodiment.

[0054] Exemplarily, the external device can also perform data communication with the signal control system 100. For example, the external device can transmit the above-mentioned mode selection instructions, numerical control instructions, etc. to the micro control unit 11 through a serial port tool, thereby realizing the same function as the control button.

[0055] For example, the control buttons provided in the present application are divided into mode selection buttons and numerical control buttons. The mode selection button is recorded as button 1, which can be used to select the working mode; the numerical control buttons are divided into two types, which are recorded as button 2 and button 3, respectively. Button 2 can be used to control the increment of the numerical value, and button 3 can be used to control the decrement of the numerical value.

[0056] Exemplary, reference Figure 3 The function logic flow chart of the numerical control buttons is shown in the figure. Button 2 and button 3 can realize the functions of fast increase and decrease by long press and fixed step by short press. Figure 3 As shown, the microcontroller unit 11 first executes step S410: determining whether the numerical control button is pressed. When button 2 or button 3 is not pressed, no numerical control instruction is generated, and the microcontroller unit 11 continues to execute step S310. When button 2 or button 3 is pressed, button 2 or button 3 will send a numerical control instruction to the microcontroller unit 11. After receiving the numerical control instruction, the microcontroller unit 11 executes step S320: controlling the timer to start working. The timer can be configured in the microcontroller unit 11.

[0057] For example, continue to refer to Figure 3, next, the microcontroller unit 11 executes step S330: determines whether the working time of the timer is greater than the preset time. If the working time of the timer is greater than the preset time, it means that button 2 or button 3 has not been released, and the time of being pressed exceeds the preset time. At this time, the microcontroller unit 11 will respond to the numerical control instruction and execute step S340: control the numerical value to increase or decrease by a first change every preset time. Among them, the preset time and the first change can be set according to actual needs. For example, if the preset time is set to 500ms and the first change is 5db, then at this time, the microcontroller unit 11 controls the numerical value to increase by 5db every 500ms (button 2 is pressed), or controls the numerical value to decrease by 5db every 500ms (button 3 is pressed), thereby realizing the function of long press and rapid increase and decrease.

[0058] For example, continue to refer to Figure 3 When the microcontroller unit 11 increases or decreases the first variation amount at every preset time, it can also execute step S350: determine whether the numerical control button is released. If button 2 or button 3 has not been released, continue to execute step S340; if button 2 or button 3 is released, the process ends and the control of increasing or decreasing the numerical value is stopped.

[0059] For example, continue to refer to Figure 3 When the microcontroller unit 11 executes step S330, if the judgment result is that the working time of the timer is less than the preset time, indicating that the time when button 2 or button 3 is pressed is less than the preset time, the microcontroller unit 11 executes step S360: judging whether the numerical control button is released. If the numerical control button is not released, continue to execute step S330. If the numerical control button is released, the microcontroller unit 11 responds to the numerical control instruction and executes step S370: controls the numerical value to increase or decrease by the second change amount, and then ends the process and stops the control of the increase and decrease of the numerical value. Among them, the second change amount can be set according to actual needs. For example, if the second change amount is set to 0.5db, then the microcontroller unit 11 controls the numerical value to increase by 0.5db (button 2 is pressed), or controls the numerical value to decrease by 0.5db (button 3 is pressed), thereby realizing the function of short-press fixed step.

[0060] Figure 4 FIG. 1 is a flow chart showing a signal control method provided by an exemplary embodiment of the present application. The method can be applied to Figure 1 In the micro control unit 11 shown.

[0061] S410, receiving and responding to a working mode instruction, wherein the working mode instruction includes a first working mode instruction and a second working mode instruction.

[0062] For example, the signal control system 100 can also implement different working modes, and different working modes can achieve different control effects on the power of the RF input signal. The following description takes two working modes as examples.

[0063] Exemplarily, the first working mode is a fixed attenuation value mode, and the second working mode is a constant output power mode. The working mode can be selected through the above-mentioned mode selection button (button 1), or through the serial port tool of the external device. When button 1 is pressed, a working mode instruction is generated and sent to the microcontroller unit 11. The working mode instruction includes a first working mode instruction and a second working mode instruction, which correspond to the above-mentioned first working mode and the second working mode, respectively. The external device can also send a working mode instruction to the microcontroller unit 11. The microcontroller unit 11 will receive the working mode instruction and respond to the above-mentioned working mode instruction.

[0064] S420, when the working mode instruction is the first working mode instruction, receives and responds to the numerical control instruction to determine the first preset value, and controls the attenuator to attenuate the power of the input signal according to the first preset value to obtain an output signal, wherein the power difference between the input power of the input signal and the output power of the output signal is equal to the first preset value.

[0065] In one possible implementation, Figure 5 The working logic flow chart of the fixed attenuation value mode is shown.

[0066] Exemplarily, after the signal control system 100 is started, an interface for selecting a working mode and an interface for changing a numerical value may be displayed on the display screen, so that the user can intuitively view the selected working mode and the adjusted numerical value.

[0067] For example, Figure 5 As shown, the user can press button 1 or select the working mode as fixed attenuation value mode (first working mode) through an external device, and set the first preset value ATT, i.e., a fixed attenuation value, through button 2 and / or button 3. For example, the first preset value is set to 0.5db. The microcontroller unit 11 receives and responds to the numerical control instruction sent by button 2 and / or button 3 to determine the first preset value. In the first working mode, fixed value attenuation of the input signal can be achieved, that is, the same attenuation value is used for all input signals for power attenuation.

[0068] For example, continue to refer to Figure 5 After the signal control system 100 is connected to the system to be tested, the radio frequency signal sent by the system to be tested enters the signal control system 100 as an input signal. The micro control unit 11 obtains the input power P of the input signal through the power detection module 13. i(This is to simplify the expression. The specific process is that the power detection module 13 detects the input power P i The input signal is converted into a corresponding input voltage and sent to the microcontroller unit 11. The following process of obtaining the power value is the same), and then the attenuator 12 and the attenuator 12' are controlled through the SPI interface to attenuate the input signal. The magnitude of the power attenuation value is the above-mentioned first preset value. However, since a slight error may occur when attenuating the input signal, the reason for the error may be that the actual attenuation value does not reach the first preset value. Therefore, the actual output power of the output signal may be somewhat different from the ideal output power. Therefore, it is necessary to determine whether the output power is the ideal output power and adjust the non-ideal output power.

[0069] For example, continue to refer to Figure 5 After the input signal is power attenuated, the micro control unit 11 obtains the actual output power P of the output signal through the power detection module 13'. o Then determine the input power P i The actual output power P o Whether the power difference is equal to the first preset value ATT, that is, whether ATT is equal to P i -P o (Here, the expression is simplified. The specific process is as follows: the power detection module 13 detects the P i and P o The voltage is converted into a corresponding voltage and sent to the microcontroller unit 11. The microcontroller unit 11 calculates the voltage value to obtain a voltage difference value, and then converts the voltage difference value into a power value. The following process of determining the power difference value is similar). If the input power P i The actual output power P o If the difference is not equal to the first preset value, that is, an error occurs during power attenuation, then it is necessary to control attenuators 12 and 12' to adjust the actual attenuation value to be equal to the first preset value, and continue to perform power attenuation on the input signal according to the adjusted attenuation value.

[0070] For example, continue to refer to Figure 5 , if the input power P i The actual output power P o If the difference between the input power and the actual output power is equal to the first preset value, the micro control unit 11 continues to obtain the input power and the actual output power, and performs the above-mentioned determination step.

[0071] S430, when the working mode instruction is a second working mode instruction, receiving and responding to a numerical control instruction to determine a second preset value, and controlling the attenuator to perform power attenuation on the input signal according to the second preset value to obtain an output signal, wherein the output power of the output signal is equal to the second preset value.

[0072] In another possible implementation, Figure 6 The working logic flow chart of the constant output power mode is shown.

[0073] Exemplarily, similarly, after the signal control system 100 is started, the display screen can display an interface for selecting a working mode and an interface for changing a numerical value, so that the user can intuitively view the selected working mode and the adjusted numerical value.

[0074] For example, Figure 6 As shown, the user can press button 1 or select the working mode as constant output power mode (second working mode) through an external device, and set the second preset value P, i.e., constant output power, through button 2 and / or button 3. For example, the second preset value is set to 5db. The microcontroller unit 11 receives and responds to the numerical control instruction sent by button 2 and / or button 3 to determine the second preset value. In the second working mode, input signals with different input powers can be output with the same output power.

[0075] For example, continue to refer to Figure 6 After the signal control system 100 is connected to the system to be tested, the radio frequency signal sent by the system to be tested enters the signal control system 100 as an input signal. The micro control unit 11 obtains the input power P of the input signal through the power detection module 13. i Then, the attenuator 12 and the attenuator 12' are controlled through the SPI interface to attenuate the input signal. For input signals with different input powers, the power attenuation value needs to be dynamically adjusted according to the second preset value, so that the actual output power P of the output signal o is equal to the second preset value.

[0076] For example, similarly, since a slight error may occur when attenuating the input signal, the reason for the error may be that the actual attenuation value does not reach the ideal attenuation value. Therefore, the actual output power of the output signal may differ from the second preset value. Therefore, it is necessary to determine whether the actual output power is equal to the second preset value. If the actual output power is not equal to the second preset value, the actual attenuation value needs to be adjusted.

[0077] For example, continue to refer to Figure 6 After the input signal is power attenuated, the micro control unit 11 obtains the actual output power P of the output signal through the power detection module 13'. o , and then determine the actual output power P o Is it equal to the second preset value P, that is, whether P is equal to P o If the actual output power P ois not equal to the second preset value, that is, an error occurs during power attenuation, then it is necessary to control the attenuator 12 and the attenuator 12' to adjust the actual attenuation value so that after the input signal is power attenuated according to the actual attenuation value, the actual output power P of the output signal obtained is o is equal to the second preset value.

[0078] The signal control method provided by the present application and the signal control system applied to the signal control method can realize the control of the radio frequency signal through different working modes, thereby improving the control effect of the radio frequency signal. In the signal control system, the attenuator is controlled in real time using SPI, which can avoid the problem of repeated disassembly and assembly of the attenuator in the traditional signal control system; two attenuator chips are used to make the maximum radio frequency power attenuation reach 63db, and the dynamic adjustment of the attenuation value can be realized; the microstrip coupling circuit can automatically detect the input power and output power of the signal, solving the accuracy problem when the attenuation value is applied to different frequency bands; and it can also communicate with external devices through the Type-C interface, and send data to the signal control system through the external device; in addition, connecting the display screen can also realize human-computer interaction through a visual user interface.

[0079] The following is a system embodiment of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the system embodiment of the present application, please refer to the method embodiment of the present application.

[0080] in, Figure 7 A structural diagram of a signal control system according to an exemplary embodiment of the present application is shown.

[0081] The signal control system 700 in the embodiment of the present application includes: a micro control unit 710, wherein the micro control unit 710 can execute Figure 1 The steps or processes executed by the micro control unit 11.

[0082] Specifically: the micro control unit 710 is used to: receive and respond to the working mode instruction, wherein the working mode instruction includes a first working mode instruction and a second working mode instruction;

[0083] The microcontrol unit 710 is further configured to: when the working mode instruction is a first working mode instruction, receive and respond to the numerical control instruction to determine a first preset value, and control the attenuator to perform power attenuation on the input signal according to the first preset value to obtain an output signal, wherein the power difference between the input power of the input signal and the output power of the output signal is equal to the first preset value;

[0084] The microcontroller unit 710 is also used to: when the working mode instruction is a second working mode instruction, receive and respond to the numerical control instruction to determine a second preset value, and control the attenuator to attenuate the power of the input signal according to the second preset value to obtain an output signal, wherein the output power of the output signal is equal to the second preset value.

[0085] In one possible implementation, the microcontroller unit 710 is specifically used to: control the attenuator to attenuate the input signal according to a first preset value to obtain an actual output signal; determine the power difference between the input power and the actual output power of the actual output signal, wherein the input signal and the actual output signal are input into the power detection module through a microstrip coupling circuit, and the input power and the actual output power are obtained by detection by the power detection module; determine whether the power difference is equal to the first preset value; if the power difference is not equal to the first preset value, control the attenuator to adjust the attenuation value to be equal to the first preset value, and control the attenuator to attenuate the input signal according to the attenuation value to obtain an output signal.

[0086] In a possible implementation, the micro control unit 710 is further configured to: determine a power difference between the input power and the actual output power when the power difference is equal to a first preset value.

[0087] In one possible implementation, the microcontroller unit 710 is specifically used to: control the attenuator to attenuate the input signal according to a second preset value to obtain an actual output signal; determine the actual output power of the actual output signal, wherein the input signal and the actual output signal are input into a power detection module through a microstrip coupling circuit, and the actual output power is obtained by detection by the power detection module; determine whether the actual output power is equal to the second preset value; if the actual output power is not equal to the second preset value, control the attenuator to adjust the attenuation value, and control the attenuator to attenuate the input signal according to the attenuation value to obtain an output signal, wherein the attenuation value is equal to the power difference between the input power of the input signal and the second preset value.

[0088] In a possible implementation, the micro control unit 710 is further configured to: determine the actual output power of the actual output signal when the actual output power is equal to the second preset value.

[0089] In one possible implementation, the microcontroller unit 710 is specifically used to: receive a numerical control instruction sent by a numerical control button, wherein the numerical control instruction is generated when the numerical control button is pressed; determine whether the duration of the pressing of the numerical control button is greater than a preset duration; and respond to the numerical control instruction if the duration is greater than the preset duration, wherein the numerical control instruction is used to control the numerical value to increase or decrease by a first change amount every preset duration.

[0090] In one possible implementation, the microcontroller unit 710 is further used to: determine whether the numerical control button is released when the duration is less than a preset duration; respond to a numerical control instruction when the numerical control button is released, wherein the numerical control instruction is used to control the numerical value to increase or decrease by a second change amount; and determine whether the duration for which the numerical control button is pressed is greater than a preset duration when the numerical control button is not released.

[0091] It should be noted that the signal control device 500 provided in the above embodiment only uses the division of the above functional modules as an example when executing the signal control method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the signal control device 500 provided in the above embodiment and the signal control method embodiment belong to the same concept, so for details not disclosed in the device embodiment of the present application, please refer to the above-mentioned signal control method embodiment of the present application, which will not be repeated here.

[0092] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0093] An embodiment of the present application also provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the program.

[0094] Figure 8 FIG. 1 shows a structural diagram of a terminal according to an exemplary embodiment of the present application. Figure 8 As shown, the terminal 800 includes: a processor 801 and a memory 802 .

[0095] In the embodiment of the present application, the processor 801 is the control center of the computer system, which can be the processor of a physical machine or the processor of a virtual machine. The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state.

[0096] In the embodiment of the present application, the processor 801 may execute Figure 1 The steps or processes performed by the micro control unit 11 in the signal control system 100, the processor 801 is specifically used for:

[0097] Receive and respond to an operating mode instruction, wherein the operating mode instruction includes a first operating mode instruction and a second operating mode instruction; when the operating mode instruction is the first operating mode instruction, receive and respond to a numerical control instruction to determine a first preset value, and control the attenuator to perform power attenuation on the input signal according to the first preset value to obtain an output signal, wherein the power difference between the input power of the input signal and the output power of the output signal is equal to the first preset value; when the operating mode instruction is the second operating mode instruction, receive and respond to the numerical control instruction to determine a second preset value, and control the attenuator to perform power attenuation on the input signal according to the second preset value to obtain the output signal, wherein the output power of the output signal is equal to the second preset value.

[0098] Further, in one embodiment of the present application, the processor 801 is specifically used to: control the attenuator to attenuate the input signal according to the first preset value to obtain an actual output signal; determine the power difference between the input power and the actual output power of the actual output signal, wherein the input signal and the actual output signal are input into the power detection module through the microstrip coupling circuit, and the input power and the actual output power are obtained by detection by the power detection module; determine whether the power difference is equal to the first preset value; if the power difference is not equal to the first preset value, control the attenuator to adjust the attenuation value to be equal to the first preset value, and control the attenuator to attenuate the input signal according to the attenuation value to obtain the output signal.

[0099] Optionally, the processor 801 is further used to: determine a power difference between the input power and the actual output power when the power difference is equal to the first preset value.

[0100] Optionally, the processor 801 is specifically used to: control the attenuator to attenuate the input signal according to the second preset value to obtain an actual output signal; determine the actual output power of the actual output signal, wherein the input signal and the actual output signal are input into the power detection module through the microstrip coupling circuit, and the actual output power is obtained by detection by the power detection module; determine whether the actual output power is equal to the second preset value; if the actual output power is not equal to the second preset value, control the attenuator to adjust the attenuation value, and control the attenuator to attenuate the input signal according to the attenuation value to obtain the output signal, wherein the attenuation value is equal to the power difference between the input power of the input signal and the second preset value.

[0101] Optionally, the processor 801 is further used to: determine the actual output power of the actual output signal when the actual output power is equal to the second preset value.

[0102] Optionally, the processor 801 is specifically used to: receive the numerical control instruction sent by the numerical control button, wherein the numerical control instruction is generated when the numerical control button is pressed; determine whether the duration of the pressing of the numerical control button is greater than a preset duration; if the duration is greater than the preset duration, respond to the numerical control instruction, wherein the numerical control instruction is used to control the numerical value to increase or decrease by a first change amount every preset duration.

[0103] Optionally, the processor 801 is further used to: when the duration is less than the preset duration, determine whether the numerical control button is released; when the numerical control button is released, respond to the numerical control instruction, wherein the numerical control instruction is used to control the numerical value to increase or decrease by a second change amount; when the numerical control button is not released, determine whether the duration for which the numerical control button is pressed is greater than the preset duration.

[0104] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage terminals, flash memory storage terminals. In some embodiments of the present application, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 801 to implement the method in the embodiment of the present application.

[0105] In some embodiments, the terminal 800 further includes: a peripheral terminal interface 803 and at least one peripheral terminal. The processor 801, the memory 802 and the peripheral terminal interface 803 may be connected via a bus or a signal line. Each peripheral terminal may be connected to the peripheral terminal interface 803 via a bus, a signal line or a circuit board. Specifically, the peripheral terminal includes: at least one of a display screen 804, a camera 805 and an audio circuit 808.

[0106] The peripheral terminal interface 803 may be used to connect at least one peripheral terminal related to input / output (I / O) to the processor 801 and the memory 802. In some embodiments of the present application, the processor 801, the memory 802, and the peripheral terminal interface 803 are integrated on the same chip or circuit board; in some other embodiments of the present application, any one or two of the processor 801, the memory 802, and the peripheral terminal interface 803 may be implemented on a separate chip or circuit board. This embodiment of the present application does not specifically limit this.

[0107] The display screen 804 is used to display the user interface (UI). The UI may include graphics, text, icons, videos and any combination thereof. When the display screen 804 is a touch display screen, the display screen 804 also has the ability to collect touch signals on the surface or above the surface of the display screen 804. The touch signal can be input to the processor 801 as a control signal for processing. At this time, the display screen 804 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments of the present application, the display screen 804 can be one, and the front panel of the terminal 800 is set; in other embodiments of the present application, the display screen 804 can be at least two, which are respectively set on different surfaces of the terminal 800 or are folded; in some other embodiments of the present application, the display screen 804 can be a flexible display screen, which is set on the curved surface or folded surface of the terminal 800. Even, the display screen 804 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 804 can be prepared using materials such as a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0108] Camera 805 is used to capture images or videos. Optionally, camera 805 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and virtual reality (VR) shooting function or other fusion shooting functions. In some embodiments of the present application, camera 805 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0109] The audio circuit 806 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 801 for processing. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 800. The microphone may also be an array microphone or an omnidirectional collection microphone.

[0110] The power supply 807 is used to power various components in the terminal 800. The power supply 807 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 807 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0111] The terminal structure block diagram shown in the embodiment of the present application does not constitute a limitation on the terminal 800. The terminal 800 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.

[0112] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method of any of the above embodiments are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0113] In this application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or order; the term "plurality" refers to two or more, unless otherwise expressly defined. The terms "installed", "connected", "connected", "fixed", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; "connected" can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances.

[0114] In the description of the present application, it is necessary to understand that the terms "upper", "lower", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or unit referred to must have a specific direction, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present application.

[0115] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A signal control method, characterized in that: A microcontroller unit applied to a signal control system, wherein the signal control system further includes an attenuator, and the method includes: Receiving and responding to an operating mode instruction, wherein the operating mode instruction includes a first operating mode instruction and a second operating mode instruction; In the case where the working mode instruction is the first working mode instruction, receiving and responding to the numerical control instruction to determine a first preset value, and controlling the attenuator to perform power attenuation on the input signal according to the first preset value to obtain an output signal, wherein the power difference between the input power of the input signal and the output power of the output signal is equal to the first preset value; When the operating mode instruction is the second operating mode instruction, the numerical control instruction is received and responded to to determine a second preset value, and the attenuator is controlled to perform power attenuation on the input signal according to the second preset value to obtain the output signal, wherein the output power of the output signal is equal to the second preset value.

2. The signal control method according to claim 1, characterized in that: The signal control system also includes a power detection module and a microstrip coupling circuit. The controlling the attenuator to perform power attenuation on the input signal according to the first preset value to obtain an output signal includes: Controlling the attenuator to perform power attenuation on the input signal according to the first preset value to obtain an actual output signal; Determine a power difference between the input power and the actual output power of the actual output signal, wherein the input signal and the actual output signal are input into the power detection module through the microstrip coupling circuit, and the input power and the actual output power are detected by the power detection module; Determining whether the power difference is equal to the first preset value; When the power difference is not equal to the first preset value, the attenuator is controlled to adjust the attenuation value to be equal to the first preset value, and the attenuator is controlled to perform power attenuation on the input signal according to the attenuation value to obtain the output signal.

3. The signal control method according to claim 2, characterized in that: The method further comprises: When the power difference is equal to the first preset value, a power difference between the input power and the actual output power is determined.

4. The signal control method according to claim 1, characterized in that: The signal control system also includes a power detection module and a microstrip coupling circuit. The controlling the attenuator to perform power attenuation on the input signal according to the second preset value to obtain the output signal includes: Controlling the attenuator to perform power attenuation on the input signal according to the second preset value to obtain an actual output signal; Determining the actual output power of the actual output signal, wherein the input signal and the actual output signal are input into the power detection module through the microstrip coupling circuit, and the actual output power is obtained by detection by the power detection module; Determining whether the actual output power is equal to the second preset value; When the actual output power is not equal to the second preset value, the attenuator is controlled to adjust the attenuation value, and the attenuator is controlled to attenuate the power of the input signal according to the attenuation value to obtain the output signal, wherein the attenuation value is equal to the power difference between the input power of the input signal and the second preset value.

5. The signal control method according to claim 4, characterized in that: The method further comprises: When the actual output power is equal to the second preset value, the actual output power of the actual output signal is determined.

6. The signal control method according to any one of claims 1 to 5, characterized in that: The receiving and responding to the numerical control instruction includes: receiving the numerical control instruction sent by the numerical control button, wherein the numerical control instruction is generated when the numerical control button is pressed; Determine whether the duration of pressing the numerical control button is greater than a preset duration; In the case where the duration is greater than the preset duration, the numerical control instruction is responded to, wherein the numerical control instruction is used to control the numerical value to increase or decrease by a first change amount every the preset duration.

7. The signal control method according to claim 6, characterized in that: The method further comprises: When the duration is shorter than the preset duration, determining whether the numerical control button is released; In the case where the numerical control button is released, responding to the numerical control instruction, wherein the numerical control instruction is used to control the numerical value to increase or decrease by a second change amount; When the numerical control button is not released, it is determined whether the duration of pressing the numerical control button is greater than a preset duration.

8. A signal control system, characterized in that: The system includes a micro control unit and an attenuator; Wherein, the micro control unit is used to: receive and respond to an operating mode instruction, wherein the operating mode instruction includes a first operating mode instruction and a second operating mode instruction; The microcontrol unit is further used to: when the working mode instruction is the first working mode instruction, receive and respond to the numerical control instruction to determine a first preset value, and control the attenuator to perform power attenuation on the input signal according to the first preset value to obtain an output signal, wherein the power difference between the input power of the input signal and the output power of the output signal is equal to the first preset value; The microcontroller unit is also used to: when the working mode instruction is the second working mode instruction, receive and respond to the numerical control instruction to determine a second preset value, and control the attenuator to attenuate the power of the input signal according to the second preset value to obtain the output signal, wherein the output power of the output signal is equal to the second preset value.

9. A terminal, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the terminal executes the signal control method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the signal control method according to any one of claims 1 to 7 is implemented.