Automatic tuning method and system of short wave transmitter, medium and program product
By moving the tuning element to a preset position in the shortwave transmitter and driving the motor in a preset direction, combined with real-time data acquisition and trend analysis, the problem of false extrema caused by noise interference in traditional tuning methods is solved, and a more efficient and accurate tuning process is achieved.
Patent Information
- Application Number
- CN202511845766.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-02-24
AI Technical Summary
Traditional automatic tuning methods for shortwave transmitters are susceptible to noise and interference in complex electromagnetic environments, leading to false extreme points during tuning and reducing tuning accuracy and efficiency.
By moving the tuning element to a preset initial position and driving the tuning motor in a preset direction, and continuously collecting key electrical parameters at a preset sampling frequency, the true extreme point is determined by trend analysis and multi-parameter comprehensive evaluation, thus avoiding the judgment of false extreme points.
It improves the accuracy and efficiency of tuning, enhances anti-interference capabilities, and ensures the reliability and precision of the tuning process.
Smart Images

Figure CN121567141A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of shortwave broadcast signal transmission, and particularly relates to an automatic tuning method and system, medium and program product for a shortwave transmitter. Background Technology
[0002] In the field of shortwave broadcast signal transmission, high-power shortwave transmitters are the core equipment for achieving long-distance signal coverage. To ensure the transmitter's radio frequency amplification system operates optimally and efficiently transmits modulated wave energy, its multiple internal resonant circuits require precise tuning. Traditional manual tuning methods are not only inefficient and reliant on operator experience, but also ill-suited to the rapid frequency switching demands of modern broadcasting services. Therefore, automatic tuning technology has emerged, aiming to replace manual operation with automated control.
[0003] In related technologies, a table-based tuning method based on simulated human logic is employed. This method establishes a basic database by pre-storing a large amount of data in the industrial control computer, corresponding to standard instrument readings measured at different frequencies and motor positions. During tuning, the system first retrieves the initial position of each tuning motor from the database based on the target frequency and drives the motor to quickly reach the vicinity of that position. Subsequently, the system enters a fine-tuning stage simulating human judgment. For example, during pre-tuning, the control program drives the pre-tuning motor to move slowly while continuously acquiring the table value of the pre-tuning cathode current via an A / D card. The minimum value of this current is found and located through point-by-point comparison logic, and the motor position corresponding to that point is taken as the resonant point.
[0004] However, the fine-tuning process described above relies on comparing the acquired table values point by point to find the extreme point. Therefore, its effectiveness depends on whether the acquired table value sequence is smooth and free of interference. But in the complex electromagnetic environment of actual transmitter operation, the acquired analog signals such as cathode current and grid current are easily affected by transient noise, power fluctuations, or other circuit crosstalk, leading to distortion in the acquired data sequence. When the control program encounters such a false extreme point caused by interference during point-by-point comparison, it will incorrectly determine that the target resonant point has been found and stop tuning prematurely. At this point, the true resonant point has not yet been reached, causing the tuning process to stop prematurely at an incorrect position, reducing the accuracy of the shortwave transmitter's automatic tuning. Summary of the Invention
[0005] This application provides an automatic tuning method and system, medium, and program product for a shortwave transmitter, which improves the accuracy of automatic tuning of the shortwave transmitter.
[0006] In a first aspect, this application provides an automatic tuning method for a shortwave transmitter, which controls the tuning element of the tuning motor of the shortwave transmitter to move to a preset initial position. The tuning element is a variable capacitor or a variable inductor in the resonant circuit of the shortwave transmitter. Starting from the preset initial position, drive the tuning motor in the preset direction; Key electrical parameters are continuously collected at a preset sampling frequency, and the continuously collected key electrical parameters are stored in a data window to obtain a real-time updated data sequence; After each data sequence update, a trend analysis is performed on the data sequence within the data window to determine whether the key electrical parameters show a trend reversal. When it is determined that the trend of the key electrical parameter has reversed, the true extreme point of the key electrical parameter has been determined and the true extreme point is defined as the target resonance point; Once the target resonance point is confirmed, stop driving the tuning motor.
[0007] By adopting the above technical solution, the system can obtain a complete parameter change process by moving the tuning element to a preset initial position and driving the tuning motor in a preset direction, combined with continuously acquiring key electrical parameters at a preset sampling frequency. The acquired key electrical parameters are stored in a data window and the data sequence is updated in real time, reflecting the dynamic characteristics of the parameters. Trend analysis is performed on the data sequence within the data window, and the true extreme point is determined by judging the trend reversal of key electrical parameters, avoiding false extreme value judgments caused by interference or noise. Driving the tuning motor stops after confirming that the target resonant point has been reached, improving tuning accuracy. Determining the resonant point through real-time data acquisition and trend analysis allows for more accurate capture of inflection points in parameter changes, reducing back-and-forth oscillations during tuning and improving tuning efficiency. Simultaneously, the use of data sequence analysis enhances the anti-interference capability of the tuning process and improves the accuracy of automatic tuning of the shortwave transmitter.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, controlling the tuning element of the tuning motor of the shortwave transmitter to move to a preset initial position specifically includes: The theoretical position value of the tuning element is calculated based on the correspondence between the target frequency and the preset frequency position. Subtract the preset offset from the theoretical position value to obtain the preset initial position; Control the tuning motor to drive the tuning element to move to the preset initial position; The actual position of the tuning element is detected in real time during the operation of the tuning motor.
[0009] By employing the above technical solution, the theoretical position value of the tuning element is calculated by establishing a correspondence between the target frequency and the preset frequency position. A preset initial position is then determined by subtracting a preset offset, making the tuning starting point closer to the final target resonant point. Real-time monitoring of the actual position of the tuning element during the operation of the tuning motor allows for timely detection and correction of positional deviations. This method, based on theoretical calculations and combined with real-time position detection, shortens the distance the tuning element travels from its initial position to the target resonant point, reducing the invalid search range during tuning. Because the starting position is selected more precisely, overshoot or undertuning that may occur during tuning is reduced, thus increasing the tuning speed.
[0010] In conjunction with some implementation methods of the first aspect, in some implementation methods, trend analysis is performed on the data sequence within the data window to determine whether a trend reversal has occurred in the key electrical parameters, specifically including: Calculate the rate of change of adjacent data points within the data window based on the data sequence to obtain the rate of change sequence; The data points in the rate of change sequence whose absolute value is less than a preset threshold are marked as candidate extreme points; At least three candidate extreme points are continuously collected, and curve fitting is performed on at least three candidate extreme points to obtain the fitted curve; The trend of key electrical parameters is determined by the first and second derivatives of the fitted curve. If the first derivative is zero and the second derivative changes sign, the trend of key electrical parameters is determined to have reversed.
[0011] By employing the above technical solution, at least three candidate extreme points are continuously collected and curve fitting is performed to obtain a fitted curve that characterizes the parameter change trend. The first and second derivatives of the fitted curve are used to determine whether the trend of key electrical parameters has reversed. The conditions for trend reversal are rigorously defined mathematically, improving the accuracy of extreme point identification. Curve fitting eliminates the influence of random fluctuations in the original data, making trend judgment more reliable. Using derivative analysis to determine the trend reversal point can accurately capture the inflection point location of parameter changes, improving the accuracy of resonance point location.
[0012] In conjunction with some implementations of the first aspect, in some implementations, after performing trend analysis on the data sequence within the data window to determine whether a trend reversal has occurred in the key electrical parameters, the method further includes: Record the position value of the tuning element at each trend reversal point, as well as the high-end screen grid current value, high-end plate current value, high-preceding phase phase difference, and high-end phase phase difference corresponding to the trend reversal point; Calculate the absolute value of the difference between the tuning element position values of adjacent trend reversal points to obtain the distance between adjacent trend reversal points; The trend reversal points are grouped sequentially according to the distance between adjacent trend reversal points. Adjacent trend reversal points whose distance is less than a first preset threshold are grouped into the same group to obtain several trend reversal point groups. Calculate the average value of the high-end screen current and the average value of the high-end plate current corresponding to the high-end screen current and the high-end plate current of each trend reversal point group; Divide the average value of the high-end screen current of each trend reversal point group by the average value of the high-end plate current to obtain the current ratio. Add the phase difference of the previous stage to the phase difference of the last stage in each group of trend reversal points to obtain the sum of the phase differences; Determine the number of trend reversal point groups that simultaneously satisfy the condition that the current ratio is between the second and third preset thresholds and the sum of the phase differences is between the fourth and fifth preset thresholds; When the quantity equals the preset value, the arithmetic mean of the position values of the tuning elements in the trend reversal point group is determined as the position value of the target resonance point, and the driving of the tuning motor is stopped. When the quantity exceeds the preset value, the tuning motor continues to be driven.
[0013] By employing the above technical solution, a comprehensive evaluation of the resonant point is achieved by calculating the sum of the current ratio and phase difference at each trend reversal point and setting multiple preset thresholds for screening. When determining the number of trend reversal point groups that meet the conditions, a preset value is used to decide whether to continue tuning, avoiding premature stopping or over-tuning. The target resonant point is determined through comprehensive analysis of multiple electrical parameters, overcoming the limitations of single-parameter judgment. The arithmetic mean is used to determine the final resonant point location, reducing the impact of individual outliers. This multi-parameter collaborative judgment method improves the accuracy of resonant point identification, while the preset value judgment mechanism ensures the convergence of the tuning process, making the entire tuning process more reliable and efficient.
[0014] In conjunction with some implementation methods of the first aspect, in some implementation methods, trend reversal points are grouped sequentially according to the distance between adjacent trend reversal points, and adjacent trend reversal points whose distance is less than a first preset threshold are grouped into the same group, resulting in several trend reversal point groups, specifically including: When the distance between adjacent trend reversal points is less than the first preset threshold, the tuning element position value and key electrical parameters of the two adjacent trend reversal points are taken as a set of data. When the distance between adjacent trend reversal points is equal to the first preset threshold, compare the high-level final stage screen current values of two adjacent trend reversal points. If the difference between the high-end screen grid current values of two adjacent trend reversal points is less than the sixth preset threshold, then the tuning element position values and key electrical parameters of the two adjacent trend reversal points will be used as a set of data. If the difference between the high-end screen grid current values of two adjacent trend reversal points is greater than or equal to the sixth preset threshold, then the tuning element position value and key electrical parameters of the two adjacent trend reversal points will be used as two sets of data respectively.
[0015] By adopting the above technical solution, when the distance between adjacent trend reversal points is less than a first preset threshold, they are directly grouped into the same group, reflecting the principle of spatial proximity. When the distance equals the first preset threshold, the difference in the current value of the final stage screen grid is introduced for judgment, and the current characteristics are used to further verify whether these points belong to the same resonance process. This dual judgment mechanism avoids misgrouping that may be caused by relying solely on positional distance, and also prevents the problem of ignoring positional relationships that may be caused by relying solely on current values. This scheme not only ensures that relevant data points are correctly classified in the actual resonance process, but also identifies and separates data points from different resonance processes, improving the accuracy and reliability of the grouping results.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after determining the number of trend reversal point groups that simultaneously satisfy the condition that the current ratio is between a second preset threshold and a third preset threshold and the sum of the phase differences is between a fourth preset threshold and a fifth preset threshold, the method further includes: Calculate the difference between the maximum and minimum values of the average value of the last-stage curtain current in each trend reversal point group to obtain the curtain current difference. Calculate the difference between the maximum and minimum values of the average plate current of the last stage in each trend reversal point group to obtain the plate current difference. The slope of the phase difference between the higher preceding stage and the higher final stage is calculated for each group of trend reversal points to obtain the phase change rate. Divide the difference in curtain grid current by the difference in plate current to obtain the current difference ratio; When the current difference ratio is greater than the seventh preset threshold and the phase change rate is greater than the eighth preset threshold, the corresponding trend reversal point group is marked as a pseudo-resonance point group. Recalculate the number of remaining trend reversal point groups after excluding pseudo-resonance point groups; When the remaining quantity equals the preset value, the arithmetic mean of the position values of the tuning elements in the remaining trend reversal point group is determined as the position value of the target resonance point, and the driving of the tuning motor is stopped. When the remaining quantity is greater than the preset value, the tuning motor continues to be driven.
[0017] By employing the aforementioned technical solution, the ratio of the screen grid current difference to the plate current difference is used as the judgment criterion. Combined with the threshold judgment of the phase change rate, the authenticity of the resonance can be comprehensively evaluated from two dimensions: current characteristics and phase characteristics. This multi-dimensional evaluation method overcomes the limitations that may exist in single-parameter judgment and improves the accuracy of pseudo-resonance point identification. The mechanism of re-evaluating the quantity after eliminating pseudo-resonance point groups ensures that all data used to determine the target resonance point comes from the real resonance process, thus improving the accuracy and reliability of automatic tuning.
[0018] In conjunction with some implementations of the first aspect, in some implementations, after the quantity equals a preset value, the method further includes: Sort the position values of the tuning elements in the remaining trend reversal point group in ascending order; Calculate the difference in position values between adjacent tuning elements to obtain a position interval sequence; Calculate the mean of the position interval sequence to obtain the average position interval; Remove the position values of adjacent tuning elements whose position interval is more than twice the average position interval; The position values of the removed tuning elements are weighted and averaged to obtain the weighted average value. The weighted average value is then determined as the position value of the target resonant point, and the tuning motor is stopped.
[0019] By employing the above technical solution, the mean of the position interval sequence is calculated as a reference standard. Adjacent position values that are more than twice the average position interval are identified as abnormal and removed. This statistically based screening method can remove abnormal position values caused by external interference or transient equipment fluctuations. Finally, a weighted average method is used to determine the target resonant point position value. This method assigns different weights to each measurement point based on its reliability, reducing the impact of abnormal data and improving the accuracy of the target resonant point position value, making the automatic tuning process more precise and stable.
[0020] In a second aspect, embodiments of this application provide an automatic tuning system for a shortwave transmitter, the automatic tuning system for the shortwave transmitter comprising: one or more processors and a memory; the memory is coupled to one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors invoke the computer instructions to cause the system to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a system, cause the system to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer program product that, when run on a system, causes the system to execute the method described in any possible implementation of the first aspect.
[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. This application provides an automatic tuning method for a shortwave transmitter. By moving the tuning element to a preset initial position and driving the tuning motor in a preset direction, combined with continuously acquiring key electrical parameters at a preset sampling frequency, the system can obtain the complete parameter change process. The acquired key electrical parameters are stored in a data window and the data sequence is updated in real time, reflecting the dynamic characteristics of parameter changes. Trend analysis is performed on the data sequence within the data window, and the true extreme point is determined by judging the trend reversal of key electrical parameters, avoiding false extreme value judgments caused by interference or noise. Driving the tuning motor stops after confirming that the target resonant point has been reached, improving tuning accuracy. Determining the resonant point through real-time data acquisition and trend analysis can more accurately capture the inflection points of parameter changes, reduce back-and-forth oscillations during the tuning process, and improve tuning efficiency. Simultaneously, the use of data sequence analysis enhances the anti-interference capability of the tuning process and improves the accuracy of automatic tuning of the shortwave transmitter.
[0024] 2. This application provides an automatic tuning method for a shortwave transmitter. By calculating the sum of the current ratio and phase difference for each group of trend reversal points and setting multiple preset thresholds for screening, a comprehensive evaluation of the resonant point is achieved. When determining the number of trend reversal point groups that meet the conditions, a preset value is used to decide whether to continue tuning, avoiding premature stopping or over-tuning. The target resonant point is determined through comprehensive analysis of multiple electrical parameters, overcoming the limitations that may arise from single-parameter judgment. The arithmetic mean is used to determine the final resonant point position, reducing the impact of individual outliers. This multi-parameter collaborative judgment method improves the accuracy of resonant point identification, while the preset value judgment mechanism ensures the convergence of the tuning process, making the entire tuning process more reliable and efficient.
[0025] 3. This application provides an automatic tuning method for a shortwave transmitter. It uses the ratio of the screen grid current difference to the plate current difference as a criterion, combined with a threshold judgment of the phase change rate, to comprehensively evaluate the authenticity of the resonance from two dimensions: current characteristics and phase characteristics. This multi-dimensional evaluation method overcomes the limitations of single-parameter judgment and improves the accuracy of identifying spurious resonant points. By eliminating spurious resonant point groups and then re-judging the quantity, it ensures that all data used to determine the target resonant point comes from the actual resonance process, thus improving the accuracy and reliability of automatic tuning. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating an automatic tuning method for a shortwave transmitter according to an embodiment of this application.
[0027] Figure 2 This is another flowchart illustrating an automatic tuning method for a shortwave transmitter in an embodiment of this application.
[0028] Figure 3 This is another flowchart illustrating an automatic tuning method for a shortwave transmitter in an embodiment of this application.
[0029] Figure 4 This is a schematic diagram of the physical device structure of an automatic tuning system for a shortwave transmitter provided in an embodiment of this application. Detailed Implementation
[0030] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0031] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0032] In the field of communications, shortwave communication holds an irreplaceable position in long-distance communication scenarios such as military, maritime, aviation, and emergency rescue due to its advantages such as beyond-line-of-sight transmission, no need for repeaters, and relatively low cost. As the core equipment of a shortwave communication system, the performance of the shortwave transmitter directly determines the communication quality. To achieve efficient energy transmission and protect the transmitter itself, its output matching network must resonate precisely with the antenna system at the current operating frequency. Because the operating frequency of shortwave communication often needs to be switched according to factors such as channel conditions, communication distance, and day / night variations, the transmitter requires frequent tuning operations.
[0033] In related technologies, the tuning of shortwave transmitters mainly relies on automatic control systems. These systems typically use a motor that drives the tuning element (such as a variable capacitor or variable inductor) while monitoring a key electrical parameter (such as VSWR, reflected power, or output current). When this parameter reaches a certain extreme value (such as the minimum value of VSWR or reflected power), the tuning is considered complete and the motor stops. This method can basically meet the tuning requirements under ideal electromagnetic conditions.
[0034] However, the impedance characteristics of the antenna can dynamically drift due to platform movement, attitude changes, and changes in the surrounding environment (such as buildings and mountains). Simultaneously, strong external electromagnetic interference or internal system noise can superimpose on the measurement signals of key electrical parameters, forming many false, transient "glitch" or spikes. Traditional tuning methods based on single-point extremum judgment are highly susceptible to being deceived by noise and interference. The system may misjudge a transient trough caused by noise interference as the true resonant point (i.e., the minimum value of the standing wave ratio), thus prematurely stopping tuning, leading to tuning failure or low tuning accuracy. Such inaccurate tuning not only reduces transmission efficiency and shortens communication distance but may also damage the transmitter's expensive power amplifier due to excessively high reflected power. Therefore, this application proposes an automatic tuning method for shortwave transmitters to overcome the above-mentioned technical defects. An embodiment is described below, combined with... Figure 1 The automatic tuning method for a shortwave transmitter according to an embodiment of this application is described below: Please refer to Figure 1 This is a flowchart illustrating an automatic tuning method for a shortwave transmitter in an embodiment of this application.
[0035] S101, Control the tuning element of the tuning motor of the shortwave transmitter to move to the preset initial position; The system controls the tuning motor of the shortwave transmitter to move the tuning element to a preset initial position. The tuning element is a variable capacitor or variable inductor in the resonant circuit of the shortwave transmitter. Specifically, the theoretical position value of the tuning element is calculated based on the correspondence between the target frequency and the preset frequency position. The preset offset is subtracted from the theoretical position value to obtain the preset initial position. The tuning motor is then controlled to drive the tuning element to the preset initial position. The actual position of the tuning element is monitored in real time during the operation of the tuning motor. The tuning element is the core variable component in the output matching network of the shortwave transmitter, usually a variable vacuum capacitor or variable inductor. Changes in its capacitance or inductance directly change the resonant frequency of the resonant network. The system first looks up a frequency-position correspondence table pre-stored in non-volatile memory based on the target operating frequency set by the user or determined by the superior command. This table is pre-established through experimental calibration or electromagnetic simulation and records the optimal correspondence between a series of frequency points and the mechanical position required for the tuning element to reach resonance. Through table lookup and interpolation calculation, the system can obtain a theoretical position value corresponding to the target frequency. To ensure that the subsequent search process fully covers the region containing the true resonant point, the system does not directly move the tuning element to the theoretical position. Instead, it subtracts a preset offset from the theoretical position value to obtain a preset initial position. This offset is set to compensate for deviations between the theoretical and actual positions caused by factors such as changes in the antenna environment and component aging, ensuring that the search starting point is located on one side of the true resonant point. Finally, the system sends a command to the drive circuit of the tuning motor, controlling the motor to drive the tuning element to move to the preset initial position. Throughout the movement, the system continuously detects the actual position of the tuning element through real-time feedback signals from position sensors (such as rotary encoders or linear potentiometers) mechanically connected to the tuning element, forming a closed-loop control to ensure positioning accuracy. The magnitude of the preset offset, the specific form of the frequency-position correspondence table, and the data density are not limited here.
[0036] This step can be achieved through at least two technical solutions. The first solution is a microcontroller (MCU) and stepper motor control scheme. The system's main controller (such as an embedded ARM development board) calculates the total number of steps the stepper motor needs to rotate to correspond to the preset initial position based on the target frequency. Then, the main controller sends a precise number of pulse sequences to the stepper motor driver via a pulse / direction (PUL / DIR) signal interface. Upon receiving the pulses, the driver drives the stepper motor to rotate precisely by the corresponding angle, moving the tuning element through a reduction gearbox and transmission mechanism. An absolute encoder coaxially mounted with the tuning element feeds back the current position information to the main controller in real time. The main controller compares the feedback position with the target position; if the target position has not been reached, it continues sending pulses; if it has been reached, it stops, achieving high-precision closed-loop position control. The second solution is a programmable logic controller (PLC) and servo motor control scheme. In this scheme, the system uses a PLC as the core controller. The PLC calculates the preset initial position based on the target frequency and generates an analog voltage or digital instruction as a position command, which is then sent to the servo driver. The servo drive integrates a high-precision PID controller, which simultaneously receives position commands from the PLC and real-time position feedback from the servo motor's built-in high-resolution encoder. By comparing the deviation between the command and feedback, the drive adjusts the current and voltage output to the servo motor in real time, driving the motor to move smoothly and at high speed to the designated position. This solution offers faster response and higher positioning accuracy, making it particularly suitable for applications with stringent requirements for tuning speed and precision.
[0037] S102. Starting from the preset initial position, drive the tuning motor in the preset direction; After the tuning element is precisely positioned to the preset initial position, this step marks the formal start of the precise search phase. The system drives the tuning motor in a preset direction, causing the value of the tuning element (variable capacitor or variable inductor) to change continuously and monotonically. This preset direction is determined based on the calculation method of the preset initial position. For example, in step S101, if the preset initial position is obtained by subtracting a preset offset from the theoretical position value, then the current position of the tuning element is to the left of the true resonant point (assuming the position value changes from small to large). Therefore, the preset driving direction should be the direction that increases the position value. Conversely, if the initial position is obtained by adding an offset, the driving direction should be the direction that decreases the position value. The purpose of this is to ensure that the movement of the tuning element can traverse the entire area where the true resonant point may exist. The speed of the driving motor is usually set to a relatively low, constant scan speed to ensure that the subsequent data acquisition system has enough time to capture subtle changes in key electrical parameters at a preset sampling frequency, thereby ensuring data integrity and resolution. Once the driving direction and speed are determined, they are usually kept unchanged until the target resonant point is found to ensure the continuity and predictability of parameter changes. Of course, the speed of the drive motor can also be dynamically adjusted according to the tuning process. For example, a faster speed can be used in areas far from the resonance point, and a slower speed can be used in areas close to the resonance point, but its driving direction remains unchanged in a single search. The specific type of drive motor, the specific value of the driving speed, and whether a variable speed drive is used are not limited here.
[0038] This step can be achieved using two technical solutions. The first solution is an open-loop constant speed control scheme, suitable for systems that are cost-sensitive and do not require extreme precision. The microcontroller (MCU) in the system calculates the pulse frequency to be provided to the stepper motor driver based on the preset scan speed. The timer / counter hardware module inside the MCU is configured in pulse width modulation (PWM) or frequency generator mode to continuously generate pulse signals at a constant frequency and send them to the stepper motor driver via I / O ports. After receiving the pulses at this stable frequency, the driver drives the stepper motor to rotate at a basically constant angular velocity, thereby driving the tuning element to move at a uniform speed. This method is simple to implement, has low hardware costs, and does not require position feedback for speed control. The second solution is a closed-loop speed control scheme, suitable for systems that require high smoothness in the tuning process. The system controller sends an analog voltage signal (e.g., 0-10V corresponding to 0-maximum speed) or a digital command (e.g., via CANopen or EtherCAT bus) representing the preset scan speed to the servo driver. The speed loop controller inside the servo drive compares the commanded speed with the actual speed fed back by the motor encoder in real time, and uses the PID algorithm to precisely adjust the power output to the motor, ensuring that the motor can maintain a very stable speed even when the load (such as mechanical friction) changes slightly.
[0039] S103. Collect key electrical parameters continuously at a preset sampling frequency and store the continuously collected key electrical parameters in a data window to obtain a real-time updated data sequence. During this phase, the system synchronizes with the movement of the tuning element, continuously monitoring key electrical parameters reflecting the matching status between the transmitter and antenna. These key electrical parameters are typically VSWR, reflected power, forward power, or load current, which exhibit distinct extreme characteristics near the resonant point (e.g., SWR and reflected power at their minimum values, forward power or load current at their maximum values). The preset sampling frequency is a crucial parameter, its setting requiring consideration of the motor's scanning speed and the parameter change rate to ensure a sufficiently dense collection of effective data points during the tuning element's movement. This allows for accurate depiction of the complete parameter change curve, avoiding missing true extreme points due to an excessively low sampling rate. Each acquired parameter value is stored in a specific memory area called a data window. Conceptually, this data window is a fixed-size First-In-First-Out (FIFO) queue or circular buffer. As new data points are acquired and stored in the window, the oldest data point is removed, ensuring the window always contains the latest continuous data. The set of these data points stored within the window constitutes a real-time updated data sequence. This sequence dynamically reflects the real-time trajectory of key electrical parameters as the position of the tuning element changes over a recent period, serving as the core basis for subsequent trend analysis. The size of the data window, the specific value of the preset sampling frequency, and the specific type of the key electrical parameters are not limited here.
[0040] This step can be achieved using the following two specific technical solutions. The first solution is based on the microcontroller's built-in ADC (Analog-to-Digital Converter). The system uses a directional coupler or a VSWR bridge to sample the forward and reverse power signals from the transmitter's output. After logarithmic detection and filtering, a DC voltage signal proportional to the power is obtained. These two voltage signals are sent to two channels of the high-speed ADC built into the main control MCU. The MCU is configured with a hardware timer to periodically trigger the ADC to perform conversion at a preset sampling frequency (e.g., 1kHz). After each trigger, the ADC simultaneously samples and converts both channels to obtain digitized forward and reverse power values. The MCU reads these values in the interrupt after each ADC conversion and calculates the real-time VSWR value according to the formula SWR = (1+sqrt(Pr / Pf)) / (1-sqrt(Pr / Pf)), where Pr is the reverse power and Pf is the forward power. The calculated SWR value is immediately stored in a fixed-length array (i.e., a data window) in memory, and a pointer or index manages the data's first-in, first-out (FIFO) flow. The second approach is based on an external dedicated RF detection chip and a high-speed bus. The system uses a dedicated RF power detection chip (such as the ADL5902) that integrates detection, ADC, and a digital interface. This chip is directly connected after the directional coupler, capable of simultaneously and accurately measuring both forward and reverse power, and directly outputting the measurement results via a high-speed digital bus such as SPI or I2C. The main controller reads the power data from this chip at a preset sampling frequency via polling or interrupt methods for subsequent processing and storage.
[0041] S104. After each data sequence update, perform trend analysis on the data sequence within the data window to determine whether the key electrical parameters show a trend reversal. After each data sequence update, trend analysis is performed on the data sequence within the data window to determine whether the key electrical parameters have shown a trend reversal. Specifically, the rate of change of adjacent data points within the data window is calculated based on the data sequence to obtain a rate of change sequence. Data points with absolute values less than a preset threshold in the rate of change sequence are marked as candidate extreme points. At least three candidate extreme points are continuously collected, and curve fitting is performed on these points to obtain a fitted curve. The first and second derivatives of the fitted curve are used to determine whether the trend of the key electrical parameters has reversed. If the first derivative is zero and the second derivative changes sign, then a trend reversal of the key electrical parameters is confirmed. Whenever a new data point is collected and updated to the data window, the system immediately triggers a trend analysis algorithm. The rate of change is the foundation of trend analysis; it represents the difference or slope between adjacent data points within the data window, reflecting the speed and direction of parameter changes. The sequence composed of these rates of change is the rate of change sequence. When the tuning element approaches the resonant point, the change of the key electrical parameters gradually flattens out, and the absolute value of its rate of change decreases. Therefore, the system sets a preset threshold and marks points in the rate of change sequence whose absolute values are less than this threshold as candidate extreme points. These points represent regions where trend reversal may occur. To further confirm this, the system requires at least three such candidate extreme points to appear consecutively, preventing misjudgments of fluctuations at single points. Once a sufficient number of candidate extreme points are collected, the system performs curve fitting on these points, approximating their distribution pattern with a mathematical function (such as a quadratic or cubic polynomial) to obtain a smooth fitted curve. Finally, the system makes a final judgment by analyzing the mathematical properties of this fitted curve. According to the principles of calculus, the first derivative of a curve is zero at its extreme points. By observing the sign change of the second derivative, it is possible to distinguish between a maximum and a minimum value and confirm the true reversal of the trend. If the sign of the second derivative changes within the neighborhood of a point where the first derivative is zero, the system can determine that the trend of the key electrical parameter has indeed reversed.
[0042] The specific technical solution for implementing this step is as follows. The first solution is based on the difference and quadratic polynomial fitting method. Within a data window of size N (e.g., N=20), the system first calculates the difference between adjacent data points, obtaining a change rate sequence of length N-1. Then, the system checks the latest several values (e.g., 5) of this change rate sequence to see if their absolute values are all less than a preset threshold (e.g., one ten-thousandth of the SWR value). If the condition is met, the original data points corresponding to these change rates are marked as candidate extreme points. After accumulating at least M (e.g., M=5) candidate extreme points, the system uses the position (or timestamp) of these points as the x-axis and the parameter value as the y-axis, and uses the least squares method to fit a quadratic polynomial y = ax^2 + bx + c. After fitting, the first derivative y' = 2ax + b, and the second derivative y'' = 2a. The system solves for y' = 0 to obtain the position of the extreme point x = -b / (2a). If the location point falls within the range covered by the current data window, and the sign of the second derivative 2a is opposite to the previous trend (for example, if the previous rate of change was negative, indicating a downward trend, and a > 0 indicates a minimum point), then the trend is determined to have reversed. The second approach is based on sign counting and sliding window slope analysis. The system divides the data window into two sub-windows. After each data update, the linear regression slopes of the data points in the two sub-windows are calculated, yielding slopes k1 and k2. Simultaneously, the sign (positive, negative, zero) of the difference between adjacent data points within the entire data window is calculated, and the number of positive and negative signs is counted. When the slope k1 is negative, while k2 is positive, and the number of negative signs in the sign sequence is approximately equal to the number of positive signs, the system determines that the trend has reversed.
[0043] S105. When it is determined that the trend of the key electrical parameter has reversed, the true extreme point of the key electrical parameter has been reached, and the true extreme point is defined as the target resonance point. The trend analysis algorithm in the previous step S104 confirmed that the trend of the key electrical parameters had reversed, and the system proceeded to this step, indicating that the tuning process had passed an inflection point. At this point, the system needs to map this mathematical inflection point back to the physical tuning state. The true extremum point refers to the theoretically optimal point within the data window, calculated through curve fitting or other algorithms. In practice, this point may correspond to an actual sampling point in the data window, or it may be located between two sampling points (obtained through interpolation). The system records the mechanical position of the tuning element corresponding to this true extremum point, as well as the key electrical parameter value at that point (e.g., the lowest SWR value). This finally confirmed true extremum point physically represents the state where the transmitter output network and the antenna system achieve optimal matching at the current operating frequency. Therefore, the system formally defines it as the target resonant point to be found in this automatic tuning process.
[0044] There are two specific technical solutions for implementing this step. The first solution is a direct positioning method based on data indexing. In S104, after the system analyzes the data sequence within the data window (e.g., an array containing 20 SWR values) and confirms a trend reversal, the system directly traverses the data window to find the minimum value. The array index corresponding to this minimum value points to the sampling point closest to the true extreme point. The system then queries the position information of the tuning element recorded with that sampling point (e.g., encoder readings) and determines that position as the target resonant point. This method is simple and direct, has low computational overhead, and can make decisions quickly. The second solution is a precise calculation method based on fitted curves. In S104, if curve fitting (e.g., a quadratic polynomial y = ax^2 + bx + c) is used, after determining a trend reversal, the system directly uses the fitted coefficients a and b to calculate the precise position x of the extreme point using the formula x = -b / (2a). This position x is a theoretically calculated value and may not be an integer (if x represents the sampling point number). The system can use linear interpolation to calculate a more precise target resonant point location and corresponding SWR value based on the x-value. For example, if x = 8.4 is calculated, the target resonant point location can be obtained by interpolating between the 8th and 9th sampling points in a 4:6 ratio. Theoretically, this method yields a more accurate target resonant point than the direct positioning method.
[0045] S106. After confirming that the target resonance point has been reached, stop driving the tuning motor.
[0046] Once S105 determines the target resonant point and obtains its precise physical location, the system controller immediately sends a stop command to the driver of the tuning motor. For stepper motor systems, this typically means stopping the transmission of pulse signals; for servo motor systems, it typically means setting the speed or position command to its current value and enabling servo lock. After the motor stops, the tuning element will stably remain at the target resonant point. At this point, the transmitter's output matching network and antenna system have reached optimal resonance, enabling the transmission of electromagnetic waves with maximum efficiency. The system can then report successful tuning to the user interface or the higher-level control system and display information such as the final SWR value. The successful completion of this step marks the end of a complete, accurate, and reliable automatic tuning process. It ensures that the tuning result is locked, providing a physical guarantee for subsequent stable shortwave communication.
[0047] There are two specific technical solutions to achieve this step. The first solution is the immediate stop solution. After the main controller (MCU) determines the target resonant point in S105, it immediately stops the operation of its internal timer module used to generate drive pulses. The disappearance of the pulse signal causes the stepper motor driver to stop outputting phase current, the electromagnetic torque of the motor disappears, and it stops rapidly under the action of mechanical friction. At the same time, the MCU can disable the enable pin of the stepper motor driver to further lock the motor position and prevent it from undergoing slight displacement due to external vibration. This method has the fastest response, but may produce a slight position deviation due to inertia. The second solution is the precise positioning stop solution. In S105, the system not only determines the target resonant point, but also obtains its precise position coordinates (e.g., encoder readings). The system then switches the control mode from the previous speed control mode to the position control mode. It sends a position command to the servo driver or the stepper motor controller with closed-loop control, the value of which is the precise coordinate of the target resonant point. Upon receiving the command, the driver utilizes its internal PID controller to precisely drive the motor to move and stabilize at the specified coordinate point. Even with external disturbances, the servo system will actively adjust to maintain the position. This method enables error-free precise positioning, ensuring that the tuning element ultimately stops at the ideal position.
[0048] After stopping the driving tuning motor, a new technical problem arises: dynamic changes in the environment can cause the resonant point to drift slowly. For example, in automotive applications, as a vehicle moves from open ground into an urban area, the changing environment alters the antenna impedance, causing the previously tuned resonant point to become less optimal. To address this issue, an automatic tracking and fine-tuning mechanism can be introduced: after completing initial tuning and stopping the motor, the system does not completely enter a dormant state but instead enters a low-frequency monitoring mode. In this mode, the system continuously collects key electrical parameters at a low frequency (e.g., once per second) and compares them with the parameter values of the previously locked target resonant point. When the monitored parameter values deteriorate beyond a preset detuning threshold, the system can automatically re-trigger a small-scale, location-centric automatic tuning process for fine-tuning, ensuring the transmitter always remains in optimal resonance and adapts to dynamic environmental changes.
[0049] In the above embodiments, by moving the tuning element to a preset initial position and driving the tuning motor in a preset direction, combined with continuously acquiring key electrical parameters at a preset sampling frequency, the system can obtain a complete parameter change process. Storing the acquired key electrical parameters in a data window and updating the data sequence in real time reflects the dynamic characteristics of parameter changes. Trend analysis of the data sequence within the data window determines the true extreme point by judging the trend reversal of key electrical parameters, avoiding false extreme point judgments caused by interference or noise. Stopping the tuning motor drive after confirming the target resonant point is reached improves tuning accuracy. Determining the resonant point through real-time data acquisition and trend analysis allows for more accurate capture of inflection points in parameter changes, reducing back-and-forth oscillations during tuning and improving tuning efficiency. Simultaneously, the use of data sequence analysis enhances the anti-interference capability of the tuning process and improves the accuracy of automatic tuning of the shortwave transmitter.
[0050] In the above embodiments, trend reversal points of key electrical parameters were determined through trend analysis. To further improve the accuracy of resonance point determination, the obtained trend reversal points need to be analyzed and processed in more detail. The following section combines... Figure 2 Another automatic tuning method for a shortwave transmitter, as described in the embodiments of this application, is as follows: Please refer to... Figure 2 This is another flowchart illustrating an automatic tuning method for a shortwave transmitter in an embodiment of this application.
[0051] S201. Record the position value of the tuning element at each trend reversal point, as well as the high-end screen grid current value, high-end plate current value, high-preceding phase difference, and high-end phase difference corresponding to the trend reversal point. This step is a crucial step in deep data acquisition based on the trend reversal points identified in the aforementioned embodiments. Whenever the system determines, through trend analysis (as described in S104), that trend of a key electrical parameter (such as VSWR) has reversed, that point is marked as a trend reversal point. At this instant, the system not only records the position value of the tuning element that caused the reversal (e.g., the motor step count or angle value reported by the encoder), but also simultaneously acquires and records a series of electrical parameters closely related to the operating state of the transmitter power amplifier stage. These parameters include: high final-stage screen grid current, i.e., the screen grid current of the high-power final-stage vacuum tube or field-effect transistor, which reflects the amplifier's gain and operating status; high final-stage plate current, i.e., the DC current of the plate or drain of the final-stage amplifier, which is directly related to the transmitter's output power; high preamplifier phase difference, i.e., the phase difference between the voltage and current at the output of the high-power preamplifier, reflecting the matching condition of the preamplifier; and high final-stage phase difference, i.e., the phase difference between the voltage and current of the final power output stage, which directly indicates the degree of resonance between the final-stage power amplifier and the load (matching network and antenna), and this value approaches zero at ideal resonance. By capturing this set of snapshot data at each trend reversal point, the system expands from a single matching parameter dimension to a multi-dimensional power amplifier status assessment, providing rich data support for subsequent identification of true resonance points and false interference points.
[0052] This step can be implemented using two technical solutions. The first solution is an interrupt-driven synchronous data acquisition scheme. When the system's main controller executes the S104 trend analysis algorithm, it immediately generates a high-priority data acquisition interrupt once a trend reversal is detected. In this interrupt service routine, the controller first reads the current position value of the tuning element through a hardware interface (such as SPI or a quadrature encoder interface) and stores it in memory. Then, the controller samples and converts the analog voltage signals representing the aforementioned current and phase parameters from the corresponding sensors (such as Hall current sensors, directional couplers, and phase detectors) using its multi-channel analog-to-digital converter (ADC). To ensure data synchronization, an ADC with synchronous sampling capabilities can be selected, or the conversion of all channels can be completed sequentially in a very short time. All acquired digital quantities (position, current, phase) are packaged into a data structure and appended to a dynamic array or linked list specifically used to store trend reversal point information. The second solution is an FPGA-based parallel snapshot acquisition scheme. In this scheme, a field-programmable gate array (FPGA) is used as a coprocessor. The FPGA connects all sensors and position encoders in parallel and monitors changes in key electrical parameters in real time. Once a reversal is detected, the trend analysis module running within the FPGA logic immediately latches the current values of all data channels in the next clock cycle. This frozen data is stored in a FIFO buffer inside the FPGA. The main controller can then read the pre-packaged, time-synchronized trend reversal point dataset in batches from this FIFO, significantly reducing the real-time requirements and acquisition latency of the main control CPU.
[0053] S202. Calculate the absolute value of the difference between the position values of the tuning elements at adjacent trend reversal points to obtain the distance between adjacent trend reversal points. The system accesses a list or array storing trend reversal point information and processes them in pairs according to the order of the records. Specifically, the system retrieves the Nth and (N-1th)th trend reversal points (where N starts from 2 and continues to the end of the list), and reads the tuning element position values for each point. Then, the system calculates the difference between these two position values and takes their absolute value. This result is defined as the distance between adjacent trend reversal points, representing the physical distance traveled for two consecutive parameter trend reversals along the tuning element's movement path. This distance forms the basis for subsequent clustering analysis (grouping). Typically, parameter fluctuations caused by true resonance will have reversal points densely clustered near the resonance point, resulting in small distances between them; while isolated reversal points caused by random noise or transient disturbances will have relatively large distances from their neighbors. The output of this step is a new sequence, consisting of the values of each adjacent distance.
[0054] The first approach is a post-processing array traversal scheme. When the motor stops scanning or reaches a stage endpoint, the system processes all trend reversal points recorded by S201 (assuming they are stored in an array called `reversal_points`, where each element contains position and other parameters). The system creates a new `distances` array and then uses a loop to increment `i = 1` until the length of `reversal_points` is decremented by one. Within the loop, it executes `distances[i-1] = abs(reversal_points[i].position - reversal_points[i-1].position)`. This process occurs after data acquisition, without consuming valuable real-time scanning time, making it suitable for systems with limited computing resources. The second approach is a streaming real-time computation scheme. In this scheme, the system maintains a small buffer containing only the information of the two most recent trend reversal points. Whenever S201 records a new trend reversal point, the system pairs it with the previous point already in the buffer, immediately calculates the distance between them, and stores this distance value in the results list. Then, the new point replaces the old point in the buffer, awaiting the arrival of the next point.
[0055] S203. Group the trend reversal points according to the distance between adjacent trend reversal points, and group adjacent trend reversal points whose distance is less than the first preset threshold into the same group to obtain several trend reversal point groups. Trend reversal points are grouped sequentially based on their distances to adjacent trend reversal points. Adjacent trend reversal points whose distances are less than a first preset threshold are grouped together, resulting in several trend reversal point groups. Specifically, when the distance between adjacent trend reversal points is less than the first preset threshold, the tuning element position values and key electrical parameters of two adjacent trend reversal points are used as one set of data. When the distance between adjacent trend reversal points is equal to the first preset threshold, the high-level screen current values of two adjacent trend reversal points are compared. If the difference between the high-level screen current values of two adjacent trend reversal points is less than a sixth preset threshold, the tuning element position values and key electrical parameters of two adjacent trend reversal points are used as one set of data. If the difference between the high-level screen current values of two adjacent trend reversal points is greater than or equal to the sixth preset threshold, the tuning element position values and key electrical parameters of two adjacent trend reversal points are used as two separate sets of data. The system uses the adjacent trend reversal point distance sequence calculated by S202 as input and introduces a key parameter—the first preset threshold. This threshold represents the maximum distance between adjacent points within the same group that the system can tolerate. Its value is based on empirical or experimental calibration and reflects the typical size of the parameter fluctuation region near the true resonant point. The grouping process is sequential: the system starts from the first trend reversal point, taking it as the starting point of the first group. Then, it checks the distance between this point and the second point; if it is less than the first preset threshold, the second point is also included in the first group. Next, it checks the distance between the second point and the third point; if it is still less than the threshold, the third point is also added to the first group, and so on. When the distance between the Nth point and the (N+1)th point is greater than or equal to the threshold, the group starting from the Nth point is declared over. Then, the system takes the (N+1)th point as the starting point of a new group and repeats the above process until all points are grouped. In addition, this step includes a refined boundary handling rule: when the distance is exactly equal to the threshold, the system initiates an arbitration mechanism, determining whether to group them by comparing the difference between the high-level screen grid current values of the two points and the size of the sixth preset threshold. If the current values differ very little (less than the sixth preset threshold), it indicates that their electrical characteristics are similar and they can still be grouped together; otherwise, they are determined to belong to points with different characteristics and should be separated. The final output of this step is one or more trend reversal point groups, each group being a data set containing one or more trend reversal points.
[0056] There are two specific technical solutions for implementing this step. The first is the single-pass linear scan grouping method. The system creates a list of groups, where each element is also a list to store all trend reversal points within a group. The system begins to traverse the list of trend reversal points recorded by S201. First, a new group is created, and the first point is added to it. Then, starting from the second point, the loop continues, and for each point i, its distance to the previous point i-1 is calculated. If the distance is less than a first preset threshold, point i is appended to the current (last) group. If the distance is greater than the first preset threshold, a new group is created, and point i is added to this new group. If the distance is equal to the first preset threshold, a sub-judgment is entered, comparing the difference between the high-level screen current values of point i and i-1 with a sixth preset threshold, and deciding whether to append point i to the current group or create a new group based on the comparison result. This algorithm has clear logic and is simple to implement. The second method is based on the disjoint set union (DSU) data structure. The system initializes each trend reversal point as an independent set. Then, iterate through all adjacent pairs of points. If their distance satisfies the grouping condition (less than a threshold, or equal to the threshold and satisfying the current condition), perform a union operation in the disjoint-set data structure, merging the sets containing these two points. After the iteration is complete, each remaining independent set in the disjoint-set data structure corresponds to a final trend reversal point group. This method has better scalability for handling more complex, non-linear grouping rules.
[0057] S204. Calculate the average value of the high-end screen current and the average value of the high-end plate current corresponding to the high-end screen current and the high-end plate current of each trend reversal point group. The system iterates through each trend reversal point group. For a specific group, the system accesses the data for all trend reversal points within the group. It then sums up the high-stage screen grid current values recorded at these points, and divides this sum by the total number of trend reversal points in the group to obtain the average high-stage screen grid current. In the same manner, the system also sums and averages the high-stage plate current values for all points within the group to obtain the average high-stage plate current. These two averages smooth out current reading variations near the resonant point caused by minor jitter or noise, providing a more stable and reliable reflection of the average operating state of the final-stage power amplifier when the tuning element is located in the region represented by the group. This step prepares smoothed input data for the subsequent current ratio calculation in S205.
[0058] This step can be achieved through two technical solutions. The first is to perform independent iterative calculations for each group. In the system's data structure, the result of S203 is a list of groups, and each group is a list of points. The outer loop iterates through the group list, while the inner loop iterates through the points within each group. In the inner loop, two accumulator variables (sum_ig, sum_ip) and a counter are set. For each point, its screen grid current value and plate current value are added to the accumulators. After the inner loop finishes, the accumulator value is divided by the counter value to obtain the two average values for the group. These two average values are then associated with the group and stored for the next iteration of the outer loop. This method is intuitive and easy to implement. The second solution is to integrate the calculation with the grouping process. During the grouping process of S2D3, when a new group is created or a new point is added to an existing group, the system can dynamically update the total current and number of members in that group. For example, each group's data structure contains three fields: sum_ig, sum_ip, and count. When adding a new point, the current value of the new point is directly added to sum_ig and sum_ip, and count is incremented by one. When the average value is needed, sum is simply divided by count. This method avoids performing a full traversal after grouping, thus improving computational efficiency.
[0059] S205. Divide the average value of the high-end screen grid current of each trend reversal point group by the average value of the high-end plate current to obtain the current ratio. For each trend reversal point group, the system extracts the average value of the screen grid current and the average value of the plate current of the highest-order stage. Then, a simple floating-point division operation is performed, using the average screen grid current as the numerator and the average plate current as the denominator; the quotient is the current ratio for that group. This ratio is an important indicator for diagnosing the operating state of a power amplifier. In vacuum tube or transistor power amplifiers, the plate (or drain) is the main power output circuit, while the screen grid (or gate) is the control circuit. Under a given operating class (e.g., Class AB) and excitation signal, the amplifier's efficiency is highest when the output load is an optimal purely resistive load (i.e., at resonance). At this point, there is a specific and relatively stable proportional relationship between the plate current and the screen grid current. When deviating from resonance, the load becomes capacitive or inductive, the amplifier efficiency decreases, and this current ratio changes accordingly. Therefore, by calculating this ratio, the system can transform complex current changes into a single characteristic value that characterizes the quality of resonance.
[0060] This step can be implemented using two specific technical solutions. The first is direct floating-point arithmetic. On processors that support hardware floating-point arithmetic (such as ARM Cortex-M4 / M7 cores with FPUs), this step is very straightforward. The system adds a `current_ratio` field to the data structure of each trend reversal point group. Then, it iterates through all groups, executing `group.current_ratio = group.avg_ig / group.avg_ip`. Before performing the division, a protective check can be added to determine if the denominator `avg_ip` is close to zero to avoid division by zero errors. If `avg_ip` is too small, the ratio can be set to a special flag value (such as infinity or -1) to indicate invalid data. The second method uses fixed-point or integer arithmetic. On low-cost microcontrollers without hardware FPUs, floating-point arithmetic is very time-consuming. In this case, fixed-point arithmetic can be used. The system pre-multiplies all current values by a large scaling factor (such as 1024 or 65536) and stores them as integers. When calculating the ratio, the numerator (average screen current) is multiplied by this scaling factor, and then integer division is performed. The result is the ratio amplified by the same factor. For example, (avg_ig * 1024) / avg_ip. Subsequent comparisons with the threshold are also performed under the same scaling. This method sacrifices some accuracy but greatly improves the calculation speed.
[0061] S206. Add the phase difference of the previous stage to the phase difference of the last stage in each trend reversal point group to obtain the sum of the phase differences; For each trend reversal point group defined in S203, the system extracts the high-preamplifier phase difference and high-final-stage phase difference recorded for all points within that group. Similar to S204, to obtain stable and representative values, the system first calculates the arithmetic mean of all high-preamplifier phase differences and the arithmetic mean of all high-final-stage phase differences within the group. Then, the system algebraically adds these two average phase difference values, and the result is defined as the sum of phase differences for that group. This sum comprehensively reflects the total phase distortion of the entire signal link from preamplifier drive to final-stage power output. Under ideal resonance conditions, each amplifier stage should operate under approximately purely resistive load conditions, with its voltage and current phase differences approaching zero. Therefore, the sum of phase differences at ideal resonance points should also approach zero. When the tuning deviates from the resonance point, the load exhibits reactance, leading to a significant phase difference, thus causing the sum of phase differences to deviate from zero. This parameter provides another important dimension for determining resonance, independent of the current parameter.
[0062] This step can be achieved using two technical solutions. The first is direct averaging followed by summation. Similar to the implementation of S204, the system iterates through each group, performing another iteration within the group, accumulating the higher-preceding phase difference and the higher-final-phase phase difference for all points. After calculating their respective averages, the two averages are summed, and the result is stored back in the group's data structure. This process can be done using floating-point numbers because phase values are typically between -180 and +180 degrees, with a controllable range. For example, `group.phase_sum = calculate_average(group.pre_phases) + calculate_average(group.final_phases);` The second method is summing for each point first and then averaging. For each trend reversal point within a group, the system first sums its recorded higher-preceding phase difference and higher-final-phase phase difference to obtain the total phase difference for that point. Then, the system calculates the arithmetic mean of the total phase differences for all points in the entire group, which is used as the final sum of the group's phase differences. Mathematically, the results of the two methods are equivalent, but in practice, the latter can calculate the total phase difference of each point when recording data in S201, thus simplifying the calculation in S206, which only requires one averaging.
[0063] S207. Determine the number of trend reversal point groups that simultaneously satisfy the condition that the current ratio is between the second preset threshold and the third preset threshold and the sum of the phase differences is between the fourth preset threshold and the fifth preset threshold. The system has now calculated two key characteristic indicators for each trend reversal point group: the current ratio (from S205) and the sum of phase differences (from S206). The system now introduces four thresholds—the second and third preset thresholds constitute the acceptable range for the current ratio, while the fourth and fifth preset thresholds constitute the acceptable range for the sum of phase differences. These two ranges together define an ideal resonance state window. The system iterates through each trend reversal point group and performs a double test on each group: first, it checks if its current ratio is greater than or equal to the second preset threshold and less than or equal to the third preset threshold; second, it checks if its sum of phase differences is greater than or equal to the fourth preset threshold and less than or equal to the fifth preset threshold. Only when a group simultaneously meets both conditions is it considered a qualified or candidate resonance point group. The system sets a counter, incrementing it each time a qualified group is found. After iterating through all groups, the final value of the counter—the total number of qualified groups—is the output of this step. This number directly reflects the clarity of the current tuning state: a number of 1 indicates that a unique and definite target has been found; a number greater than 1 indicates that there is ambiguity; and a number of 0 indicates that no target that meets the conditions has been found.
[0064] This step can be achieved using two technical solutions. The first is to use a flag array and a counter. The system creates a boolean flag array of the same size as the group list, initialized to false. Then, the system iterates through all groups. For the i-th group, it executes a compound if statement: `if ((group[i].ratio>= T2&&group[i].ratio<= T3)&&(group[i].sum>= T4&&group[i].sum<= T5))`. If the condition is true, `flags[i]` is set to true, and the counter is incremented. After the loop, the counter value is the desired count, and the flag array clearly indicates which groups are eligible for use by S208. The second solution is filtering and list construction. The system creates a new empty list to store eligible groups. Then, it iterates through all groups. For each group, if it meets the above two conditions, it is added to this new list of eligible groups. After the iteration, the length (size) of this new list is directly queried to obtain the number of eligible groups. This method is more elegant in logic, directly separating the screening results, making it easier to operate directly on the qualified groups later.
[0065] S208. When the quantity equals the preset value, the arithmetic mean of the position values of the tuning elements in the trend reversal point group is determined as the position value of the target resonance point, and the driving of the tuning motor is stopped. The system first compares the number of qualified groups obtained in S207 with a preset value. This preset value is usually set to 1, meaning that the system expects to find only one cluster of trend reversal points that perfectly matches the ideal resonance characteristics throughout the entire scan. When the number is exactly equal to this preset value, the system determines that a clear and unambiguous target resonance region has been found. The system then uses this single qualified group as the final target. To obtain a precise stopping position, the system calculates the arithmetic mean of the tuning element position values of all trend reversal points within the group. This averaging operation effectively smooths out the minor differences in the positions of each reversal point within the group caused by noise or minor jitter, resulting in a more stable and accurate target resonance point position value representing the center position of the group. After determining this position value, the system immediately sends a stop command to the drive controller of the tuning motor and precisely positions and holds the tuning element at the calculated average position. At this point, a successful automatic tuning process is complete.
[0066] This step can be achieved through two technical solutions. The first is conditional judgment and instruction execution. In the control flow, this step is represented by an `if (count == preset_value)` conditional branch. Inside this branch, the system first needs to find the unique qualified group from the filtering results of S207. Then, it iterates through all points in that group, accumulates their position values, and finally divides by the number of points to obtain the average position. After obtaining this target position value, the system calls a predefined `motor.stop_at(target_position)` function. This function performs the corresponding action based on the motor type (stepper or servo). For example, for a servo motor, it sends a position command; for a stepper motor, it calculates and executes the number of steps to back or forward, then locks the motor. The second method is precise positioning combined with weighted averaging. To further improve accuracy, the system can use weighted averaging when calculating the average position. The weights can be based on how well each point conforms to the ideal. For example, the lower the SWR value of a point, or the closer its current ratio and phase sum are to the center of the ideal range, the higher its weight. The final target position is calculated using sum(position_i * weight_i) / sum(weight_i). This method allows the best-performing point to contribute more to the final position, theoretically achieving a better localization than the arithmetic mean.
[0067] S209. When the quantity exceeds the preset value, continue driving the tuning motor.
[0068] When the number of qualified groups identified in S207 exceeds a preset value (usually greater than 1), it indicates that the system has found multiple (two or more) regions within the scanned range that all appear to be real resonant points. This situation can be caused by various physical reasons, such as the presence of multiple resonant modes in the antenna, or the existence of some structured strong interference that simulates the characteristics of resonance. Faced with this ambiguity, the system might make an incorrect choice if it rashly selects one of the options. Therefore, this step adopts a conservative and robust strategy: instead of making an immediate decision, it continues to drive the tuning motor. This means that the system control program skips the logic of stopping the motor, allowing the main loop to continue, enabling the tuning element to continue moving in the predetermined direction and speed, thereby expanding the search range and collecting more data.
[0069] In the above embodiments, a comprehensive evaluation of the resonant point is achieved by calculating the sum of the current ratio and phase difference of each trend reversal point and setting multiple preset thresholds for screening. When determining the number of trend reversal point groups that meet the conditions, a preset value is used to decide whether to continue tuning, avoiding premature stopping or over-tuning. The target resonant point is determined through comprehensive analysis of multiple electrical parameters, overcoming the limitations that may arise from single-parameter judgment. The arithmetic mean is used to determine the final resonant point position, reducing the impact of individual outliers. This multi-parameter collaborative judgment method improves the accuracy of resonant point identification, while the preset value judgment mechanism ensures the convergence of the tuning process, making the entire tuning process more reliable and efficient.
[0070] The above embodiments initially screened the trend reversal point group using the sum of current ratio and phase difference. However, in practical applications, pseudo-resonance phenomena may exist due to equipment characteristics or external interference, requiring more in-depth analysis to identify and eliminate pseudo-resonance points. The following section combines... Figure 3 The following describes another automatic tuning method for a shortwave transmitter in the embodiments of this application: Please see Figure 3 This is another flowchart illustrating an automatic tuning method for a shortwave transmitter in an embodiment of this application.
[0071] S301. Calculate the difference between the maximum and minimum values of the average value of the last stage curtain current in each trend reversal point group to obtain the curtain current difference. The system iterates through each individual trend reversal point group. For a specific group, the system needs to access all trend reversal points contained within that group. In previous steps, each trend reversal point recorded a high-level final stage screen grid current value. The system scans all points within the group for this current value, identifying the maximum (Max) and minimum (Min) values. Then, the system calculates the difference between these two values (Max - Min), and the result is defined as the screen grid current difference for that group. This difference reflects the severity of the final stage power amplifier screen grid current fluctuations as the tuning element moves within the range covered by the group. A true resonant point is typically accompanied by a significant change in the power amplifier's operating state, thus its screen grid current exhibits a distinct and concentrated fluctuation near the resonant point; however, certain pseudo-resonance phenomena (such as local standing wave troughs caused by transmission line effects) may not cause the same drastic change in the power amplifier's operating state. Therefore, this screen grid current difference can serve as an important characteristic for distinguishing between true and false resonances.
[0072] S302. Calculate the difference between the maximum and minimum values of the average plate current of the last stage in each trend reversal point group to obtain the plate current difference. For each trend reversal point group defined in S203, the system extracts the high-level plate current values recorded at all trend reversal points within that group. Similar to S301, the system scans all plate current values within each group, precisely identifying the maximum (Max) and minimum (Min) values. Subsequently, the system calculates the difference between these two extreme values (Max - Min) and defines this result as the plate current difference for that group. Plate current is a major contributor to the transmitter's output power, and its fluctuations near the resonant point directly reflect changes in power conversion efficiency. At the true resonant point, as the load changes from mismatch to matched and back to mismatch, the power amplifier's plate efficiency experiences a significant peak, resulting in a noticeable fluctuation in the plate current related to changes in the screen grid current. Therefore, the plate current difference, from a power output perspective, provides another crucial dimension of information for identifying true and false resonant points.
[0073] S303. Calculate the slope of the phase difference between the higher preceding stage and the higher final stage for each group of trend reversal points to obtain the phase change rate. Within a group, all trend reversal points naturally form an ordered sequence according to the position values of the tuning elements. The system needs to focus on the changes in two parameters with position: the phase difference of the higher preceding stage and the phase difference of the higher final stage. To obtain a comprehensive phase change rate, the system can first calculate the sum of the phase differences of the preceding and following stages at each point, resulting in a total phase difference sequence. Then, the system performs linear regression analysis on this total phase difference sequence corresponding to the position values, i.e., fitting these points with a straight line y = kx + b (where y is the total phase difference and x is the position value). The absolute value of the slope k obtained from the fitting represents the average rate of change of the total phase difference with position within the region covered by the group; this rate is defined as the phase change rate. A steep rate of change (a large absolute value of the slope) means that the phase is very sensitive to changes in position, which is a typical characteristic of a true resonant point, because on both sides of the resonant point, the reactance of the load changes sign and magnitude rapidly. Conversely, a gentle rate of change may indicate that this is simply a region of slowly varying parameters caused by some non-resonant effect.
[0074] S304. Divide the difference in curtain grid current by the difference in plate current to obtain the current difference ratio; For each trend reversal point group, the system retrieves the pre-calculated screen grid current difference and plate current difference. Then, the system performs a floating-point division operation, dividing the screen grid current difference (numerator) by the plate current difference (denominator). The result is the current difference ratio for that group. The physical meaning of this ratio lies in its quantification of the relative relationship between the fluctuation amplitudes of the screen grid current and the plate current in the region near the resonant point. During normal resonance, the fluctuations of the screen grid current and the plate current are usually proportional and coordinated. However, in certain pseudo-resonance cases (e.g., due to artifacts caused by power amplifier parasitic oscillations or nonlinear effects), the screen grid current may exhibit abnormally drastic fluctuations, while the plate current (representing effective output power) fluctuates only slightly. In such cases, the current difference ratio becomes abnormally large. Therefore, this ratio can serve as an effective indicator of abnormal amplifier behavior.
[0075] S305. When the current difference ratio is greater than the seventh preset threshold and the phase change rate is greater than the eighth preset threshold, the corresponding trend reversal point group is marked as the pseudo-resonance point group. The system comprehensively utilizes the features extracted from S303 and S304 to authenticate each trend reversal point group. Two new thresholds are set: a seventh preset threshold defines abnormal current difference ratios, and an eighth preset threshold defines abnormally drastic phase changes. The system checks each trend reversal point group one by one. For a group, the system examines both its current difference ratio and phase change rate. Only when a group's current difference ratio exceeds the seventh preset threshold (indicating that its screen grid current fluctuation is abnormally large relative to the plate current fluctuation), and its phase change rate also exceeds the eighth preset threshold (indicating that its phase change is abnormally steep), will the system determine that the phenomenon represented by this group is a pseudo-resonance point. Such pseudo-resonance points are usually related to parasitic oscillations or instabilities within the power amplifier. In this case, the screen grid circuit may experience high-frequency self-excitation, leading to drastic changes in screen grid current and abrupt phase jumps, but this energy is not effectively converted to the plate output. Once a group is determined to be a pseudo-resonance point group, the system will give it a clear label, for example, by setting a boolean flag `is_fake` to `true` in its data structure.
[0076] This step can be achieved through two technical solutions. The first is using loops and conditional statements. The system iterates through a list of all trend reversal point groups. Inside the loop, for each group g, a compound if statement is executed: if(g.current_diff_ratio>T7&&g.phase_change_rate>T8). If the condition is true, g.is_fake = true is executed; this process is simple and straightforward, directly translating logical judgments into code. The second solution is to build a credibility scoring model. The system can calculate a pseudo-resonance suspicion score for each group. For example, the score can be defined as Score = w1 * (Ratio / T7) + w2 * (Rate / T8), where Ratio is the current difference ratio, Rate is the phase change rate, T7 and T8 are normalization factors, and w1 and w2 are weights. Then, instead of using a hard threshold, it judges whether the Score is greater than a certain total score threshold. This scoring method is more flexible, allowing extreme anomalies in one indicator to compensate for slight deficiencies in another, providing a more flexible judgment boundary.
[0077] S306. Recalculate the number of remaining trend reversal point groups after excluding pseudo-resonance point groups. In S305, some trend reversal point groups may have been marked as pseudo-resonance point groups. Now, the system needs to evaluate how many true candidate resonance points remain after removing these pseudo-resonance points. The system will re-examine all trend reversal point groups. This time, it only focuses on those groups that were not marked as pseudo-resonance points. The system sets a counter, initially to zero. Then, it iterates through all groups, checking the `is_fake` flag for each group. If the flag is false (or there is no flag), it indicates that this is a remaining trend reversal point group considered true, and the system increments the counter. After the iteration is complete, the final value of the counter is the number of remaining trend reversal point groups. This new number is the basis for the final decisions in subsequent S307 and S308, and it reflects the true resonance situation more accurately than the original number in S207.
[0078] S307. When the remaining quantity is equal to the preset value, the arithmetic mean of the position values of the tuning elements in the remaining trend reversal point group is determined as the position value of the target resonance point, and the driving of the tuning motor is stopped. When the remaining quantity equals the preset value, the arithmetic mean of the position values of the tuning elements in the remaining trend reversal point group is determined as the position value of the target resonance point, and the driving of the tuning motor is stopped.
[0079] Preferably, after the quantity equals the preset value, the position values of the tuning elements in the remaining trend reversal point group can be sorted from smallest to largest; the difference between the position values of adjacent tuning elements can be calculated to obtain a position interval sequence; the mean of the position interval sequence can be calculated to obtain the average position interval; adjacent tuning element position values with a position interval greater than twice the average position interval can be removed; the position values of the removed tuning elements can be weighted and averaged to obtain a weighted average value, and the weighted average value can be determined as the position value of the target resonance point, and the driving of the tuning motor can be stopped.
[0080] The system compares the remaining number with a preset value (usually 1). When they are equal, it means that after rigorous verification, the system has found a unique resonant region considered genuine. This provides the system with a very high level of confidence to make a final decision. At this point, the system selects this unique genuine trend reversal point group from the remaining groups (there is only one at this time). Then, to obtain a stable and precise stopping position, the system calculates the arithmetic mean of the tuning element position values of all trend reversal points within the group and determines this average as the final target resonant point position value. After determining the position, the system immediately issues a stop command to the motor driver, causing the tuning element to stop precisely at that position. Furthermore, a preferred, more refined positioning scheme is provided: before calculating the average, the position values within the group are sorted, the intervals between adjacent positions are calculated, outliers with excessively large intervals are removed, and then a weighted average is applied to the remaining points. This preferred scheme further improves the robustness of positioning through internal consistency checks.
[0081] There are two specific technical solutions to implement this step. The first is the basic arithmetic mean scheme. In the branch of `if(remaining_count == preset_value)`, the system obtains the unique remaining group. Then, it calls a function `calculate_average_position(remaining_group)`, which iterates through all points in the group, accumulates their position values, divides by the number of points, and returns the arithmetic mean. This average is the target position, and then the system issues a stop command. The second is a scheme that implements optimized outlier removal and weighted averaging. In this scheme, the system first obtains the position values of all points in the group and stores them in a temporary array, then sorts the array. Next, it iterates through the sorted array, calculates the difference between adjacent elements, and calculates the average of these differences, `avg_interval`. It iterates through the differences again; if a difference is greater than 2 * `avg_interval`, it considers there to be a discontinuous transition between the two points, and one or both points can be marked as outliers. Finally, for all points not marked as outliers, weights can be calculated based on their SWR values or other performance metrics (the lower the SWR, the higher the weight), and a weighted average can be performed to obtain the final target location.
[0082] S308. When the remaining quantity is greater than the preset value, continue to drive the tuning motor.
[0083] When the remaining number calculated in S306 is greater than a preset value (usually greater than 1), this indicates that even after eliminating all groups identified as spurious resonant points, there are still multiple regions in the system that appear to be genuine resonant points. This situation is more challenging than the ambiguity encountered in S209 because it means that these candidate points have passed a more rigorous test. This step also adopts a conservative and exploratory strategy: instead of making an immediate decision, the tuning motor continues to drive. The system will skip the stop logic, allowing the tuning process to continue, further expanding the scanning range of the tuning element.
[0084] In the above embodiments, the ratio of the screen grid current difference to the plate current difference is used as the judgment criterion, combined with the threshold judgment of the phase change rate, to comprehensively evaluate the authenticity of the resonance from two dimensions: current characteristics and phase characteristics. This multi-dimensional evaluation method overcomes the limitations that may exist in single-parameter judgment and improves the accuracy of pseudo-resonance point identification. By eliminating pseudo-resonance point groups and then re-judging the quantity, it is ensured that all the data used to determine the target resonance point comes from the real resonance process, thus improving the accuracy and reliability of automatic tuning.
[0085] The system in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference needed]. Figure 4This is a schematic diagram of the physical device structure of an automatic tuning system for a shortwave transmitter provided in an embodiment of this application.
[0086] It should be noted that, Figure 4 The structure of the system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0087] like Figure 4 As shown, the system includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes based on a program stored in Read-Only Memory (ROM) 402 or a program loaded from storage portion 408 into Random Access Memory (RAM) 403, such as executing the methods described in the above embodiments. The RAM 403 also stores various programs and data required for system operation. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An Input / Output (I / O) interface 405 is also connected to the bus 404.
[0088] The following components are connected to I / O interface 405: input section 406 including a camera, infrared sensor, etc.; output section 407 including a liquid crystal display (LCD) and speakers, etc.; storage section 408 including a hard disk, etc.; and communication section 409 including a network interface card such as a LAN (Local Area Network) card and a modem, etc. Communication section 409 performs communication processing via a network such as the Internet. Drive 410 is also connected to I / O interface 405 as needed. Removable media 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed.
[0089] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs the various functions defined in the present invention.
[0090] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. The transmitted data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0091] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0092] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the system described in the above embodiments; or it may exist independently and not assembled into the system. The storage medium carries one or more computer programs that, when executed by a processor of a system, cause the system to implement the methods provided in the above embodiments.
[0093] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0094] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0095] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0096] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An automatic tuning method for a shortwave transmitter, characterized in that, include: The tuning element of the tuning motor of the shortwave transmitter is moved to a preset initial position. The tuning element is a variable capacitor or a variable inductor in the resonant circuit of the shortwave transmitter. Starting from the preset initial position, drive the tuning motor in a preset direction; Key electrical parameters are continuously collected at a preset sampling frequency, and the continuously collected key electrical parameters are stored in a data window to obtain a real-time updated data sequence; After each data sequence update, a trend analysis is performed on the data sequence within the data window to determine whether the key electrical parameters show a trend reversal. If it is determined that the trend of the key electrical parameter has reversed, the true extreme point of the key electrical parameter has been reached, and the true extreme point is defined as the target resonance point. Once the target resonance point is confirmed, the driving of the tuning motor is stopped.
2. The method according to claim 1, characterized in that, The process of moving the tuning element of the tuning motor controlling the shortwave transmitter to a preset initial position specifically includes: The theoretical position value of the tuning element is calculated based on the correspondence between the target frequency and the preset frequency position. Subtract the preset offset from the theoretical position value to obtain the preset initial position; Control the tuning motor to drive the tuning element to move to the preset initial position; The actual position of the tuning element is detected in real time during the operation of the tuning motor.
3. The method according to claim 1, characterized in that, The step of performing trend analysis on the data sequence within the data window to determine whether the key electrical parameter shows a trend reversal specifically includes: Calculate the rate of change of adjacent data points within the data window based on the data sequence to obtain a rate of change sequence; The data points in the rate of change sequence whose absolute value is less than a preset threshold are marked as candidate extreme points; At least three candidate extreme points are continuously collected, and curve fitting is performed on the at least three candidate extreme points to obtain a fitted curve; The trend of the key electrical parameter is determined based on the first and second derivatives of the fitted curve. If the first derivative is zero and the second derivative changes sign, the trend of the key electrical parameter is determined to have reversed.
4. The method according to claim 1, characterized in that, After performing trend analysis on the data sequence within the data window to determine whether the key electrical parameter shows a trend reversal, the method further includes: Record the tuning element position value at each trend reversal point, as well as the high-end screen grid current value, high-end plate current value, high-preceding phase difference, and high-end phase difference corresponding to the trend reversal point; The absolute value of the difference between the tuning element position values of adjacent trend reversal points is calculated to obtain the distance between adjacent trend reversal points; The trend reversal points are grouped sequentially according to the distance between adjacent trend reversal points. Adjacent trend reversal points whose distance is less than a first preset threshold are grouped into the same group to obtain several trend reversal point groups. Calculate the average value of the high-end screen current and the average value of the high-end plate current corresponding to the high-end screen current and the high-end plate current of each group of trend reversal points; Divide the average value of the high-end curtain current of each group of trend reversal points by the average value of the high-end plate current to obtain the current ratio. Add the phase difference of the higher preceding stage to the phase difference of the higher final stage for each group of trend reversal points to obtain the sum of the phase differences; Determine the number of trend reversal point groups that simultaneously satisfy the condition that the current ratio is between the second and third preset thresholds and the sum of the phase differences is between the fourth and fifth preset thresholds; When the quantity equals the preset value, the arithmetic mean of the position values of the tuning elements in the trend reversal point group is determined as the position value of the target resonance point, and the driving of the tuning motor is stopped. When the quantity exceeds the preset value, the tuning motor continues to be driven.
5. The method according to claim 4, characterized in that, The step of grouping the trend reversal points according to the distance between adjacent trend reversal points, and grouping adjacent trend reversal points whose distance is less than a first preset threshold into the same group, to obtain several trend reversal point groups, specifically includes: When the distance between adjacent trend reversal points is less than the first preset threshold, the tuning element position value and key electrical parameter of the two adjacent trend reversal points are taken as a set of data. When the distance between adjacent trend reversal points is equal to the first preset threshold, compare the high-level final-stage screen current values of two adjacent trend reversal points. If the difference between the high-end screen grid current values of two adjacent trend reversal points is less than the sixth preset threshold, then the tuning element position values and key electrical parameters of the two adjacent trend reversal points are taken as a set of data. If the difference between the high-level screen current values of two adjacent trend reversal points is greater than or equal to the sixth preset threshold, then the tuning element position values and key electrical parameters of the two adjacent trend reversal points will be used as two sets of data respectively.
6. The method according to claim 4, characterized in that, After determining the number of trend reversal point groups that simultaneously satisfy the condition that the current ratio is between a second preset threshold and a third preset threshold, and the sum of the phase differences is between a fourth preset threshold and a fifth preset threshold, the method further includes: Calculate the difference between the maximum and minimum values of the average value of the last-stage screen grid current in each group of trend reversal points to obtain the screen grid current difference value; Calculate the difference between the maximum and minimum values of the average plate current of the last stage in each group of trend reversal points to obtain the plate current difference. The slope of the phase difference between the higher preceding stage and the higher final stage in each group of trend reversal points is calculated to obtain the phase change rate. Divide the screen grid current difference by the plate current difference to obtain the current difference ratio; When the current difference ratio is greater than the seventh preset threshold and the phase change rate is greater than the eighth preset threshold, the corresponding trend reversal point group is marked as a pseudo-resonance point group. Recalculate the number of remaining trend reversal point groups after excluding the pseudo-resonance point groups; When the remaining quantity equals the preset value, the arithmetic mean of the position values of the tuning elements in the remaining trend reversal point group is determined as the position value of the target resonance point, and the driving of the tuning motor is stopped. When the remaining quantity is greater than the preset value, the tuning motor continues to be driven.
7. The method according to claim 6, characterized in that, After the quantity equals the preset value, the method further includes: Sort the remaining tuning element position values in the trend reversal point group in ascending order; Calculate the difference between the position values of adjacent tuning elements to obtain a position interval sequence; Calculate the mean of the position interval sequence to obtain the average position interval; Remove adjacent tuning element position values whose position interval is greater than twice the average position interval; The position values of the removed tuning elements are weighted and averaged to obtain a weighted average value. The weighted average value is determined as the position value of the target resonant point, and the driving of the tuning motor is stopped.
8. An automatic tuning system for a shortwave transmitter, characterized in that, The system includes: One or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the system to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the system, the system performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on the system, the system performs the method as described in any one of claims 1-7.