Multi-coupler radio frequency cavity beam-free open-loop power confinement modeling method and system

By introducing local physical derivative constraints in the beamless open-loop modeling of multi-coupler RF cavities, a physical constraint model is constructed, which solves the problem of inconsistent response in the sparse region of the samples and improves the reliability of the model and the accuracy of power estimation.

CN123179767APending Publication Date: 2026-11-27FUJIAN RUISIKE MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611698624.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-30
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing open-loop modeling of multi-coupler RF cavities without beam current, the local physical trends and data fitting are not effectively combined, resulting in inconsistent responses in the sparse region of the sample and affecting the reliability of power estimation.

Method used

By introducing local physical derivative constraints, a method and system for beam-free open-loop power constraint modeling of multi-coupler RF cavities is constructed. The system includes a configuration acquisition module, a synchronization screening module, an event grouping module, a data partitioning module, a constraint training module, and a verification and solidification module. It generates a physical constraint model and checks the eligibility, version, and valid domain of the externally given state, returning a reason code to ensure the reliability of the model.

Benefits of technology

It suppresses local directional errors, improves the reliability of the model in engineering applications, reduces the interference of invalid or out-of-bounds power estimation results on equipment debugging, and improves the reliability of the model's generalization evaluation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179767A_ABST
    Figure CN123179767A_ABST
Patent Text Reader

Abstract

The application provides a multi-coupler radio frequency cavity beam-free open-loop power confinement modeling method and system, and relates to radio frequency measurement data processing; a channel description table is synchronized for calibration and screening of historical records, a source group is combined and a data subset is divided according to a control setting quantity change, and a training set statistic is normalized; a local physical derivative constraint loss in a non-empty applicable sample set is used together with a prediction data error for model updating, and a read-only model package is formed through verification and coverage checking; a given external state is subjected to qualification, version, effective domain and output effectiveness checking, a power estimation result is output when qualified, and a reason code is returned otherwise; a prediction that violates a confirmed physical trend is suppressed through derivative constraint in an applicable interval, and is used for read-only power evaluation of a given state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer data processing technology, and in particular to a method and system for beamless open-loop power constraint modeling of multi-coupler radio frequency cavities. Background Technology

[0002] The multi-coupler RF cavity feeds RF power into the common cavity through multiple feed ports and records the power in the forward, reflection and cavity sampling channels. In the beamless open-loop stage before beam tuning, the cavity field amplitude and phase feedback do not participate in the adjustment. It is necessary to estimate the channel resolution power based on the drive strength, gain, phase and thermal-resonance state to help the debugging personnel judge the given state.

[0003] Nonlinear regression based on historical data typically updates the model using the error between measured input and power. However, historical records are limited by debugging batches and scan paths, resulting in uneven coverage of different input combinations. For operating regions where other conditions are controlled, power sources are unsaturated, and local response trends are confirmed, models trained solely on fitting errors may still exhibit local variations inconsistent with these trends in sparsely populated areas. Such deviations are not necessarily revealed by the overall average error but can affect the reliability of power estimates for a given state. Therefore, the main shortcoming of existing modeling methods lies in their failure to combine well-defined local physical trends with data fitting, making it difficult to constrain non-physical responses in covered but sparsely sampled regions. Summary of the Invention

[0004] This application provides a method and system for beamless open-loop power constraint modeling of multi-coupler RF cavities. By introducing local physical derivative constraints within a non-empty sample set with confirmed applicable conditions, it suppresses responses that violate local physical trends in power estimation for a given state and returns reason codes for calls that fail qualification, version, valid domain, or output checks.

[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: A first aspect is a beam-current-free open-loop power constraint modeling method for multi-coupler RF cavities, the method comprising: The hardware topology and the correspondence between power channels and physical ports are registered to generate a channel description table. Based on the channel description table, control setpoints, thermal-resonance states, and power measurement data are collected to obtain multi-rate raw measurement data. Time alignment and calibration conversion are performed on the multi-rate raw measurement data to obtain synchronous acquisition frames. Valid historical records are obtained by screening synchronous acquisition frames based on their beamless open-loop eligibility, quality, and stability. Parameter change events are identified based on changes in control setpoints in the valid historical records, and source groups are merged to obtain candidate datasets. The candidate datasets are then divided into training, validation, and test subsets according to the completeness of the source groups. A normalized dataset is formed using training set statistics. An initial model is constructed based on the normalized dataset. Local derivatives are calculated within a non-empty applicable sample set. The degree of violation of the confirmed monotonicity or curvature trend is used to form a physical derivative constraint loss, which is updated together with the prediction data error to obtain a physically constrained model. Based on the validation and coverage check results of the physically constrained model, a read-only model package containing model parameters, channel description tables, training set statistics, and effective domain rules is solidified. The eligibility, version, and effective domain of the externally given state are checked based on the read-only model package. If the check confirms that the output is valid, the output power estimation result is obtained; otherwise, a reason code is returned.

[0006] Secondly, a multi-coupler RF cavity beam-current-free open-loop power constraint modeling system includes: The system consists of a configuration acquisition module, a synchronization filtering module, an event grouping module, a data partitioning module, a constraint training module, a verification and solidification module, and an evaluation output module, which are connected sequentially. The configuration acquisition module obtains multi-rate raw measurement data according to the channel description table. The synchronization filtering module generates synchronization acquisition frames and filters valid historical records accordingly. The event grouping module merges source groups based on changes in control settings of valid historical records to form candidate datasets. The data partitioning module partitions candidate datasets according to source groups and uses training set statistics to form a normalized dataset. The constraint training module uses the normalized dataset, combining prediction data errors and local physical derivative constraint losses within the non-empty applicable sample set for parameter updates to obtain a physical constraint model. The verification and solidification module checks the physical constraint model and forms a read-only model package. The evaluation output module checks the external given state based on the read-only model package; if the qualification, version, valid domain, and output validity checks are passed, the power estimation result is output; otherwise, a reason code is returned.

[0007] The above-described solution of the present invention has at least the following beneficial effects: By incorporating local physical derivative constraints within the confirmed applicable conditions into the training loss, additional constraints are provided on the non-decreasing trend and near-peak concavity within the same applicable interval, which can suppress local directional errors that occur when training based solely on sample errors. This effect is limited to the covered applicable interval and does not constitute a guarantee of prediction accuracy in sparse regions or physical correctness across the entire domain.

[0008] By freezing and solidifying the model parameters and valid domain rules into a read-only model package, and performing condition eligibility, version consistency, and valid domain checks before estimating power for a given external state, and returning a reason code if the checks fail, the interference of invalid or out-of-bounds power estimation results on parameter setting and power state judgment during equipment commissioning is reduced, which helps to improve the reliability of the model in engineering applications.

[0009] By maintaining the integrity of the source group in data partitioning and normalizing the training set statistics, the risk of training and validation data leakage is reduced, making the generalization evaluation results of the physical constraint model more reliable. Attached Figure Description

[0010] Figure 1 This is a schematic diagram of the multi-coupler RF cavity modeling method provided in the embodiments of this application.

[0011] Figure 2 A schematic diagram of the physical constraint modeling system and read-only data boundary provided in the embodiments of this application.

[0012] Figure 3 This is a schematic diagram illustrating the parameter change events, source combinations, and complete division provided for embodiments of this application.

[0013] Figure 4 This is a schematic diagram of local physical constraint training, acceptance, and invocation gating provided for embodiments of this application. Detailed Implementation

[0014] The embodiments of this application are described below with reference to the accompanying drawings; the first and second are used to distinguish objects, and the same name represents the same technical object in the data processing, model training and calling stages. The connecting lines in the drawings are used to represent the data flow or power chain already described, and do not represent new hardware control functions.

[0015] like Figures 1 to 4 As shown in the embodiments of this application, a method and system for beam-free open-loop power constraint modeling of multi-coupler radio frequency cavities are proposed, which are applicable to radio frequency cavities in particle acceleration devices such as radio frequency quadrupole accelerators.

[0016] The multi-coupler RF cavity refers to an RF cavity structure in which RF power is fed into a common RF cavity through multiple power couplers, and monitoring channels are arranged at each power supply port and cavity sampling position to obtain the power response; the beamless condition refers to the working state in which no particle beam passes through the RF cavity; the open-loop condition refers to the working state in which neither cavity field amplitude feedback nor phase feedback participates in the adjustment of the actuation quantity.

[0017] In open-loop operation without beam current, such as before accelerator beam tuning or when the beam is turned off, it is necessary to estimate the power response of each power monitoring channel based on the control settings and thermal-resonance state for equipment debugging, parameter tuning, and power status assessment. The control settings include gain settings, phase settings, and common or source-level drive intensity variables. The thermal-resonance state includes thermal state quantities such as cooling water temperature and cavity wall temperature, as well as frequency-resonance state quantities such as frequency state and detuning.

[0018] For ease of description, the following conventions are made for some concepts in this embodiment.

[0019] The channel-resolved power vector is a vector formed by arranging the scalar power values ​​of each monitoring channel at the same recording time in the order of the channels registered in the channel description table; the channel description table is a configuration table that registers information such as the correspondence between each power channel and the physical port, the measurement reference surface, the calibration version, and the valid flag; the source group is a data set partitioning unit formed by merging continuous parameter change events of the same commissioning batch, the same continuous scan, or trigger intervals less than the source protection time; the physical constraint model is a model that can output the channel-resolved power estimation results after the parameter update is participated in by local physical derivative constraints.

[0020] like Figure 2 As shown, the system provided in this embodiment includes a configuration acquisition module, a synchronization filtering module, an event grouping module, a data partitioning module, a constraint training module, a verification and solidification module, and an evaluation output module; the above modules are connected in sequence, and the output of the previous module serves as the input of the next module.

[0021] The modeling system in this embodiment adopts a hierarchical structure and defines a unidirectional data boundary. Starting from the radio frequency device and the existing control and protection side, the data flows sequentially through the synchronous measurement and state read-only interface, the data qualification event and source group construction stage, the physical constraint model training and model library stage, and finally reaches the read-only power evaluation stage for a given state.

[0022] All data flows are along the data reading direction, and there is no control flow returned from the model evaluation end to the RF execution chain; that is, the model and its evaluation service established in this embodiment only read the measurement data and status information of the RF device in one direction, do not write back any control quantity to the RF fast execution chain, and do not participate in the adjustment, interlocking or protection of RF power.

[0023] The multi-power-source, multi-coupler RF cavity involved has two links: a power chain and a measurement chain. In the power chain, the RF reference and low-level RF excitation signals enter the multi-power source and transmission synthesis chain, and are fed into the common RF cavity through the forward reflection measurement reference surface and the input coupler. The RF power is transmitted along the direction from the power source to the common RF cavity. In the measurement chain, the signals collected by the forward reflection sampling end and the cavity sampling sensor are frequency-selected, frequency-converted and conditioned by the analog front end, and then enter the analog-to-digital converter and field-programmable gate array to complete digital demodulation and power extraction. Finally, the signals are written into the historical database and modeling calculation node with timestamp, quality bit, channel description and calibration version information.

[0024] The measurement chain is for read-only measurement and recording. In this embodiment, the model output is not written back to the RF fast execution chain.

[0025] On a single-feed branch, the output of the power amplifier enters the transmission line and input coupler via a directional coupler and a specified reference plane, ultimately reaching the common RF cavity. The forward sampling end and the reflection sampling end undergo attenuation, limiting, filtering, frequency conversion or detection, and analog-to-digital conversion to obtain the forward scalar power and the reflection scalar power, respectively. The cavity sampling end undergoes sampling conditioning and protection, frequency conversion or detection, and analog-to-digital conversion to obtain the cavity sampling equivalent power. The calibration parameter memory provides each power conversion module with channel coefficients, zero bias, effective range, reference plane, and calibration version. The effective setting register and its timestamp directly enter the sample frame construction unit.

[0026] Register the hardware topology, measurement reference plane, and calibration version of the power source, transmission branch, input coupler, cavity sampling, and forward reflection monitoring channel. Establish the correspondence between the setting channel and the physical port and monitoring channel, and generate a channel description table accordingly.

[0027] Each actual RF power branch can sequentially include an effective digital setting register, a digital-to-analog converter or RF converter, a power amplifier, a directional coupler, a feeder, and an input coupler, and finally connect to a common RF cavity; the number of power sources, the number of adjustable excitation chains, and the number of input couplers can correspond one-to-one, or they can form a many-to-one or one-to-many relationship through a fixed combining or distributing network; the latter case must be recorded in the topology configuration table, and the fixed topology must not be mistakenly written as a dynamic reconfiguration at runtime.

[0028] In the above process, the actual effective setting register value after mode selection, quantization, and limiting is read first. If the device can only provide the requested setting value, its reading position is fixed and noted in the model package, and the requested value and the effective value must not be mixed. The actual effective setting register value refers to the value that actually acts on the RF link after the setting amount has been processed by the device's internal mode selection, quantization, and limiting.

[0029] The channel description table records the channel identifier, physical type, corresponding power supply port or cavity sampling location, measurement reference surface, unit, channel sequence, calibration coefficient and calibration version, update cycle, effective range and current valid flag.

[0030] The specific structure of the channel description table (Table 1) is shown in the table below, where each row corresponds to a registered power channel and each column corresponds to an attribute of the channel.

[0031] Table 1 Channel Description Table

[0032] The forward sampling end, the reflection sampling end, and one or more cavity sampling ends of the directional coupler are converted into real scalar power of a specified reference plane through attenuation, limiting, frequency selection, down-conversion or power detection, analog-to-digital conversion and digital processing, respectively; if the in-phase orthogonal acquisition method is adopted, the power of the j-th channel of the α-th type is converted according to the following process.

[0033] For each in-phase positive channel, subtract the square of the in-phase zero offset from the in-phase sampled value, and subtract the square of the quadrature zero offset from the quadrature sampled value; add the two squared values ​​and multiply by the positive calibration coefficient of the channel to obtain the scalar power of the channel on the registered reference plane.

[0034] In-phase, quadrature, and corresponding zero-bias values ​​use the same amplitude unit. The unit of the calibration coefficient is the power unit divided by the square of the amplitude unit. This coefficient includes the sampling ratio, gain, and reference plane conversion. It is applicable to measurement chains where the amplitudes of the two quadrature branches are consistent and the quadrature error is negligible or has been calibrated. Each cavity sampling, forward, and reflection channel uses its own calibration parameters.

[0035] If a power detector is used, the scalar power is obtained by converting the calibrated detector voltage versus power curve. Regardless of the detection or demodulation method used internally, the output entering the model is the real power with channel identification, unit, reference plane, and calibration version, rather than the complex in-phase orthogonal envelope. It should be noted that the cavity sampling equivalent power is not necessarily equal to the cavity dissipation power.

[0036] Before calibration conversion, the processor reads calibration records under the same reference plane, same frequency band, and no limiting conditions. In the records with no RF input and unchanged measurement chain operation, the in-phase and quadrature mean values ​​are calculated as zero bias. For each calibration point with known reference power, the two quadrature sums of squares after removing the zero bias are calculated. A positive proportionality coefficient is fitted with the reference power as the target. Specifically, each sum of squares is multiplied by the reference power and summed, then divided by the sum of the squares of each sum of squares to obtain the positive calibration coefficient. The calibration version is rejected if the denominator is zero, the coefficient is not positive, or the fitting residual exceeds the calibration tolerance.

[0037] The calibration points are derived from the existing metrology or calibration records of the equipment. In this implementation method, the unknown power is not back-calculated into the calibration true value. When the two orthogonal branches are unbalanced and the front-end calibration is not completed, the simple sum of squares model does not hold. The confirmed orthogonal calibration configuration should be used first, or the original detector calibration curve path should be selected. The detector curve is saved with the effective calibration points arranged in ascending voltage order. When the query falls between two adjacent points, the difference between the query voltage and the low-end voltage is taken first and then divided by the voltage difference between the two ends. The resulting ratio is multiplied by the power difference between the two ends and then added to the low-end power to obtain the scalar power. Queries with repeated voltage points, non-single-value areas, or those exceeding the calibration range are not extrapolated.

[0038] The calibration coefficients and ranges are saved along with the channel identifier, reference plane, and version. The forward and reflection directions must not be interchanged. The cavity sampling quantity only represents the equivalent power after the sampling chain is calibrated. Without a separately established and verified energy relationship, it is not written as the cavity wall dissipation power, thereby avoiding the forced application of energy identity constraints using quantities with the same power dimension but different physical meanings.

[0039] Without a unified reference surface and dynamic energy storage conditions, the forward power minus the reflected power and the cavity sampling amount are not forced to be written as an exact identity for each sample.

[0040] Based on the channel description table, control settings, thermal-resonance status, and power measurement data are synchronously acquired to obtain multi-rate raw measurement data. The multi-rate raw measurement data refers to the original record set with inconsistent update frequencies formed by the different update cycles of RF power sampling, setting register, temperature, and frequency status.

[0041] Based on the multi-rate raw measurement data, delay compensation and calibration conversion are performed under a unified time reference to obtain synchronous acquisition frames. Specifically, the system saves the timestamp, frame number or period count, data age, quality bits and configuration version for each raw record, and performs known link delay compensation, measurement window aggregation or resampling under a unified time reference.

[0042] Link delay compensation is based on the registered meaning of the timestamp; if the timestamp represents the time of arrival at the recording end, the known fixed link delay from the effective sampling to the recording end is subtracted to obtain the effective sampling time; if the timestamp has already been generated by the sampling end at the moment of sampling, only clock offset conversion is performed without deducting the transmission delay again; clock offset, fixed delay and its error are obtained from the existing synchronization configuration or the recorded common timestamp; if the delay is unknown and its error exceeds the allowable synchronization error, the channel does not generate a qualified synchronization frame.

[0043] For a common frame moment, the power acquisition window selects valid records that fall within the same window after correction time. The power conversion is completed for each record first, and then the power is averaged. The in-phase orthogonal amplitudes in the phase change are not averaged and squared first. The latter method may underestimate the power due to phase cancellation. The entire window is unqualified when the configuration within the window changes, saturates, or the number of valid records is insufficient. The window length and allowable age are saved separately. The slow variable adopts the most recent valid value no later than the frame moment to form a synchronous acquisition frame with the original record association.

[0044] For variables that update slowly, the most recent valid record whose time after delay compensation is no later than the current frame is selected. It is only used when the data age obtained by subtracting the valid time of the record from the current frame time does not exceed the lock validity period. The validity period is determined by the update cycle and the allowed state drift. The original timestamp is retained, and future records are not used to make up the most recent historical value. The phase uses the same phase branch in event detection, training and invocation.

[0045] A synchronous acquisition frame is formed for the common recording time tk, and its structure is determined according to the following process.

[0046] Synchronous acquisition frames are associated with input status, channel-resolved power vector, operating mode and beamless qualification, beam qualification, channel quality and data age, hardware topology and other configuration versions at the same recording time. All of these components together constitute the synchronous acquisition frame.

[0047] Each synchronous acquisition frame retains its recording time and original record identifier. The configuration version includes hardware topology, channel description table, measurement calibration, phase reference and time synchronization version. Channel quality and data age also record saturation and missing status. Only when the necessary variables are time aligned, the data age is qualified, the channel quality is valid and the version is compatible can the synchronous acquisition frame enter the subsequent screening.

[0048] The synchronous acquisition frame includes a timestamp, input status consisting of control settings and thermal-resonance state, channel-resolved power vector, operating mode and beamless qualification flag, beam qualification flag, channel quality and data age information, as well as hardware topology, channel description table, calibration version and phase reference information.

[0049] Among them, the beam qualification criteria are jointly determined by the beam triggering state, the ion source extraction state, and the beam monitoring quantity; it should be emphasized that the beam monitoring quantity is only used to confirm the qualification of the beamless open-loop condition and is not used as the input variable of the initial model.

[0050] The number and order of each input component are fixed when the model version is built, and the input state is constructed as follows.

[0051] The input components are spliced ​​together in a fixed order of driving strength, gain setting, phase setting, thermal state quantity, and frequency resonant state quantity to obtain the input state; the input dimension is equal to the sum of the number of the above-mentioned components.

[0052] The driving strength is the actual effective setting of the common or source level. The gain setting and phase setting correspond to the registered excitation chain, respectively. The thermal state quantity includes the cooling water temperature or cavity wall temperature. The frequency resonance state quantity takes values ​​according to the fixed definition of this model. The quantity, unit, order and source of each component are written into the input definition. The splicing only arranges the components and does not add components with different dimensions.

[0053] If the driving carrier frequency is fixed within the corresponding data subset, the frequency state can be characterized by the measured resonant frequency; if the driving carrier frequency is variable and traceable, the detuning amount is preferred for characterization, and the detuning amount is the difference between the driving carrier frequency and the measured resonant frequency; the two definitions must not be mixed in the same model version; the input state does not include beam current intensity, beam pulse width, feedforward setting or closed-loop error and other band closed-loop variables.

[0054] The channel resolution output vector is defined according to the following process.

[0055] Arrange the non-negative scalar power of all enabled channels according to the category order of cavity sampling, forward, and reflection, and the channel order within each category, to obtain the channel resolution power vector; the output dimension is equal to the sum of the number of enabled channels in the three categories.

[0056] The channel-resolved power vector belongs to the non-negative real space corresponding to the output dimension. The number of cavity sampling, forward, and reflection channels are registered separately. The number of these three types does not need to be the same as the number of power sources. It is not required that all ports have forward and reflection monitoring. Channels that are not installed or are disabled are excluded when the model version is established. If the quality of a single frame of a required channel that has been included is invalid, the frame is removed. The output component is not temporarily deleted.

[0057] The output dimensions and channel order of the initial model are determined by the channels currently marked as enabled in the channel description table; the physical constraint model is not automatically used when the monitoring channel is disabled, the measurement reference plane is changed, or the calibration version is changed.

[0058] Subsequently, based on the synchronously acquired frames, the valid historical records are filtered according to the conditions of open-loop operation without beam current, data quality, and stability. The filtering process includes three levels.

[0059] The first level is operating condition screening; based on the operating mode, beamless qualification flag and beam qualification flag in the synchronously acquired frame, it is determined whether the beamless open-loop operating condition qualification is met, and the operating condition screening result is obtained; when the operating mode is open-loop, the beamless qualification flag is valid and the beam qualification flag confirms that there is no beam, the operating condition screening result is judged as qualified.

[0060] The second layer is quality screening; whether the data quality conditions are met is determined according to the channel quality, data age information, calibration version information, and input state validity in the synchronous acquisition frame, so as to obtain a quality screening result; when all channels included in the model are not missing, not saturated, not overflowing, and within the calibration range, the data age does not exceed the preset validity period, the calibration version is compatible with the version of the channel description table, and the input state is valid, the quality screening result is determined to be qualified.

[0061] The third layer is stability screening; a power change rate or window variance is calculated according to the channel resolution power vector and input state in the synchronous acquisition frame, so as to determine whether the stability conditions are met and obtain a stability screening result; the power change rate refers to the ratio of the change amplitude of the channel resolution power vector between adjacent records to the time interval; the window variance refers to the variance of each component value of the channel resolution power vector within a set time window; the determination rule of the stability condition is as follows.

[0062] When only the power change rate criterion is enabled, the power change rate not exceeding the preset upper limit is determined to be qualified; when only the window variance criterion is enabled, the window variance not exceeding the preset upper limit is determined to be qualified; when both criteria are enabled at the same time, the result is determined to be qualified only when both do not exceed their respective upper limits; the upper limit of the power change rate is determined according to the channel measurement noise standard deviation and the sampling time interval during steady-state operation, the upper limit of the window variance is determined according to the measurement noise variance during the same steady-state period, and the adopted criterion type and upper limit are written into the data processing configuration.

[0063] The specific calculation process of the power change rate is as follows.

[0064] For each enabled channel, the current power is subtracted from the power of the previous valid aligned frame, then divided by the positive time interval between the two frames, and the absolute value is taken to obtain the power change rate of the channel; repeated timestamps are first deduplicated according to the frame number, and when the interval is non-positive or spans a missing interval, this frame is not used for stability judgment.

[0065] The power change rate of each channel is compared with the locked upper limit of the corresponding channel, and the power change rate criterion is passed only when all required channels are qualified; the change rates of channels with different ranges are not directly compared with the upper limit of a certain channel after taking the maximum value.

[0066] A stability time window ending at the current frame is taken, the mean value of the valid power in the window is first calculated for each channel, then the mean of the square of the difference between each power and the mean is calculated to obtain the window variance of the channel; the window contains at least 2 valid values at different times, and when the window span, minimum quantity, or continuity is not satisfied, it is judged as insufficient data.

[0067] The variance of each channel window is compared with the upper limit of the variance of that channel. Only when all required channels pass can the window variance criterion be satisfied. At the same time, it is checked that the changes in the control settings and the thermal-resonance state within the window do not exceed their respective stability upper limits. When only one power criterion is used, the judgment is made according to that criterion. When both are used, all must pass to form a stability screening result.

[0068] When the working condition screening result, quality screening result, and stability screening result all indicate that they are qualified, the corresponding synchronous acquisition frame will be extracted as a valid historical record.

[0069] For ease of consistent expression, this embodiment constructs a training qualification, the definition of which is determined according to the following process.

[0070] Check the open-loop, unbundled, synchronized, configuration calibration compatibility, input validity, output validity, and stability in sequence. Only take the pass or fail condition for each condition; if all conditions pass, the training qualification is passed; otherwise, it is failed.

[0071] Open-loop indicates that neither the cavity field amplitude nor the phase feedback participates in the execution quantity adjustment; beamlessness is jointly confirmed by beam current triggering, ion source extraction status, and effective beam current monitoring; synchronization indicates that time alignment and slow variable data age are qualified; configuration calibration compatibility includes consistency in topology, calibration, phase reference, and channel description table; valid input indicates that the settings, temperature, and frequency status are valid; valid output indicates that each necessary power channel is not missing, not saturated, not overflowing, and is within the calibration range; stability indicates that the lock-in stability criterion is met.

[0072] Among them, the training qualification value is taken as the pass value only when all factors are in the pass state, and the record is entered into the modeling data pool.

[0073] It should be noted that the measured output range is only used for training and screening of existing historical records. Unknown real outputs cannot be used as prior gating during the query phase. Interlocking, operation permission, or protection status are only used as data qualification information. This embodiment does not implement shutdown, shielding, reset, re-adding RF, or fault recovery actions. For implementations that allow some output channels to be missing, the required channel set and effective masking rules should be fixed before training. The output semantics cannot be arbitrarily changed in a single loss calculation.

[0074] See Figure 3 The system identifies changes in control settings in valid historical records, including changes in gain settings, phase settings, and drive intensity. Based on these changes, parameter change events are triggered, and consecutive parameter change events are merged into a source group to obtain a candidate dataset.

[0075] The change markers in the valid historical records are used to associate the qualified steady-state states before and after the change, and transient power that has been removed is not added back to the training. If there is a screening gap between two adjacent valid historical records, the processor checks the batch, scans and sets the change time along the original record markers saved by both, and conservatively classifies the relevant debugging records into the same source group. If the trigger time cannot be accurately located from the valid record, the trigger time is marked as uncertain and processed according to the source that covers the gap. The unrecorded transient response cannot be deduced from the two steady-state endpoints.

[0076] During the entire debugging process, if the setting is increased and then restored to its original value, only the steady-state settings at both ends may show zero change. Therefore, the original time and batch association cannot be discarded. This implementation uses these associations to prevent the data from the same debugging session from being scattered into training and validation. If the original record and batch association are both missing and the homology cannot be ruled out, such records are not used as independent sources of validation or testing. The model output is still a steady-state given state estimate and is not extended to a dynamic model with memory.

[0077] First, combine the drive strength, gain settings, and phase settings into a setting vector, and define it according to the following process.

[0078] The driving strength, gain setting, and phase setting are extracted sequentially from the input state of each valid historical record and arranged in a fixed order to obtain the setting vector.

[0079] The dimension of the vector is set to be equal to the sum of the number of drive intensity components, gain setting components, and phase setting components, with each component using its own variation threshold; settings in different units are not directly added or compared.

[0080] Furthermore, a change threshold is given to each setting component in the setting vector. This change threshold must be higher than the quantization error and recording noise of that setting component. The rules for setting the change threshold are as follows.

[0081] The noise standard deviation of the measured value of the setting component during the steady-state holding period is compared with the quantization step size of the setting component. The larger of the two is then multiplied by a preset multiple greater than 1 to serve as the change threshold of the setting component. This determined change threshold can filter out false triggers caused by steady-state noise and quantization fluctuations, form an event identifier for setting changes that reach the threshold, and ensure that changes below the threshold are not detected.

[0082] Based on this, the event trigger quantity is constructed, and its definition is determined by the following process.

[0083] Calculate the absolute value of the change of each setting component between adjacent valid historical records, and then divide it by the positive change threshold of that component; trigger the parameter change event when any ratio is not less than 1, and do not trigger it when all ratios are less than 1.

[0084] Phase changes are first calculated by taking the principal difference or continuous expansion difference according to the fixed phase branch of the model, and other settings use the corresponding numerical differences; the change threshold is consistent with the unit of the setting component, and the resulting ratio is dimensionless. Before calculation, the threshold is checked to be positive and the input is finite. If the threshold is invalid, a configuration error is returned and the division is not performed.

[0085] When the event trigger value is 1, a parameter change event Em is established at the trigger time tm, and the time boundary of the event is jointly defined by the preset maximum observation duration and the next trigger. Its definition is determined by the following process.

[0086] Using the current trigger time as the starting point of the event, the time obtained by adding the maximum observation time to the current trigger time is compared with the last available record time before the next trigger time, and the earlier one is taken as the event endpoint; the valid historical records from the starting point to the endpoint are retained as records of the parameter change event.

[0087] The maximum observation duration is positive and is configured based on the observation time required for the power to recover to a steady state after the setting changes. When there is no next trigger for the last event, the endpoint is defined by the end time of the data. If the endpoint is earlier than the start time, it is recorded as an empty event, and only the event identifier is retained for homologous association and is not used as a training sample.

[0088] Multiple setting changes occurring at the same time are grouped into a single multivariable event; when a new event is triggered before the event window has closed, the previous event terminates before the new event is triggered.

[0089] Merge source groups based on parameter change events with time boundaries; conservatively merge events belonging to the same debugging batch, the same continuous scan, or with a trigger interval less than the source protection time; remove records with incompatible modes or configurations first according to eligibility rules, and do not use directional rollback as the basis for terminating the same source association; the source protection time is determined based on the duration of the same debugging association and the time required for power to recover and stabilize.

[0090] An event is the smallest unit of observation, and a source group is the unit of data set partitioning; the judgment process for the same debugging batch is as follows.

[0091] The system associates events in the same batch based on the debugging batch identifier carried in the original records. Even if the events in the same batch are not adjacent in the valid historical records, the association is retained. Continuous scans are associated with priority based on the original scan identifier. When there is no scan identifier, the system identifies events by setting the change direction, trigger interval, and original operation sequence. Adjacent events that cannot be identified independently are treated as having the same source.

[0092] For all events that satisfy any common origin criterion, establish associations, and repeatedly merge events that are associated with the current group into the group until no more events are added to the group, thus forming a source group with a closed transitive relationship.

[0093] Finally, the stable-state valid historical records located outside the event protection zone are subjected to sparse processing to obtain candidate datasets. The event protection zone refers to the time interval covered by the time boundaries of each parameter change event. The sparse processing adopts one or more of the following methods: minimum time interval sampling, input binning limit, or stratified sampling, to avoid duplicate stable-state samples suppressing parameter change samples. The minimum time interval sampling means that the time interval between two adjacent retained stable-state records is not less than a preset minimum interval. The input binning limit means that after dividing the input state into several intervals, an upper limit is set on the number of stable-state records in each interval, and the part exceeding the upper limit is discarded.

[0094] Steady-state records outside the event protection zone must also have source group identification; they should be grouped according to the original commissioning batch first, and if there is no batch information, they should be conservatively associated according to the time continuous blocks. Continuous blocks that have a common scan or protection time association with existing event sources should be merged into the same group. Each steady-state record should not be regarded as an independent source. Grouping should be completed first, and then the first and subsequent qualified records of each block should be retained according to the minimum locked time interval.

[0095] When using input binning limits, the pre-configured input boundaries and bin widths are used to locate the interval for each input component. Ordinary bins are left-closed and right-open, and the last bin includes the right endpoint. The bin numbers of each dimension are concatenated according to fixed channels and input order. Within each source group and bin number, records not exceeding the locked limit are retained by time sorting. Then, the valid records and sparsely retained records within the event interval are summarized to form a candidate dataset. Binning only controls the sample redundancy, does not change the source attribution, and does not replace the high-dimensional joint coverage check of the effective domain of the model.

[0096] The event is first used to identify records from the same source and prevent data leakage; if there are still multi-valued responses that exceed the measurement uncertainty near the same observable input, observable states should be added, state-level modeling should be performed, or related records should be removed, rather than replacing identifiability processing with increased model complexity.

[0097] While maintaining the integrity of the source group, the candidate dataset is divided into training subset, validation subset and test subset; the input and output data are normalized using the statistics of the training subset to obtain the normalized dataset.

[0098] First, based on the source groups in the candidate dataset, the candidate dataset is divided into a training subset, a validation subset, and a test subset, ensuring that records within the same source group only enter one of the subsets, thus obtaining the partitioned data subsets; the specific operation process of source group partitioning is as follows.

[0099] All source groups are arranged in order of trigger time, and then allocated to the training subset, validation subset, and test subset in sequence according to the preset allocation ratio. During allocation, a source group is included as a whole, and all records within the same source group are included in the same subset along with that source group. They cannot be split.

[0100] To avoid bias caused by time sequence, a combination of random starting position and cyclical allocation can be used to distribute the source groups of adjacent time periods as widely as possible to different subsets. After allocation, the sample size of each subset is counted. When the sample size of a subset is significantly insufficient, the allocation is readjusted or historical data is added. The constraint on the integrity of the source group is determined according to the following process.

[0101] Verify the record affiliation of each source group one by one; if any record of a source group enters a subset, all candidate records of that source group must enter the same subset, and no record may be assigned repeatedly.

[0102] The partitioned data subsets are the training subset, the validation subset, and the test subset. The record identifier sets of the three subsets are mutually exclusive and, when merged, equal the candidate dataset. If it is impossible to form three non-empty subsets with independent sources, the dataset is not supplemented by copying records, and insufficient data is returned.

[0103] This constraint means that when a source group intersects with a certain data subset, all records of the source group must fall completely into that data subset and cannot be split into multiple subsets; the validation subset is used for the selection of model structure and hyperparameters, and the test subset does not participate in training or hyperparameter tuning before the final model is frozen.

[0104] Further, based on the training subset within the divided data subset, the mean and standard deviation of the input and output data are calculated to obtain the training set statistics.

[0105] Based on the statistics of the training set, the input and output data in the partitioned data subsets are normalized to obtain a normalized dataset. The normalization process is determined according to the following procedure.

[0106] For each input component, the original input value is subtracted from the training mean of that component, and then divided by the positive normalization scale of that component; for each output channel, the measured power is subtracted from the training mean of that channel, and then divided by the positive normalization scale of that channel, to obtain the normalized input and normalized output respectively.

[0107] The mean is the sum of all valid values ​​of the component in the training subset divided by the number of valid samples. The standard deviation is the square root of the average of the squares of the differences between each value and the mean. The normalization scale is the larger of the standard deviation and the preset positive scale lower limit of the component. The input and output use the scale lower limit of the same unit as themselves. The training set statistics simultaneously store the mean, standard deviation, actual scale used, and lower limit.

[0108] Normalized parameters are calculated only from the training subset and used as is for the validation subset, test subset, and calls; constant or near-constant inputs retain their established semantics and positive scaling, but the directional derivative constraint is not enabled, and the effective domain is limited by the training observation range; constant outputs use the same positive scaling rules, do not perform division by zero, and do not directly assume that the measurement is noise-free due to small power variance.

[0109] See Figure 4 An initial model is constructed based on the normalized dataset, the prediction data error is calculated, and the parameters of the initial model are updated in combination with the preset local physical derivative constraints to obtain the physical constraint model.

[0110] The processor determines the model dimension based on the input definition and channel description table, and constructs a differentiable multi-output nonlinear response model; the parameters to be trained control the mapping of the model from the input state to the final power response, and the model must retain the independent output of each channel and the common input dependency.

[0111] The direct response implementation method is determined according to the following process.

[0112] The actual input is normalized according to the statistics of the training set, and the input is differentiable and the output is nonlinearly mapped to obtain the normalized predicted value. The predicted value of each channel is multiplied by the corresponding output scale and then added to the corresponding output mean to obtain the final power response.

[0113] Input normalization and output denormalization work together. The network output is a normalized value, and the final power response is restored to the power unit registered for each channel. Subsequent data loss, physical derivative constraints, and output calls are all based on this final power response.

[0114] If a verified low-order equivalence relation, calibration response surface, or other differentiable reference response exists, a hybrid form may be used, the definition of which is determined by the following procedure.

[0115] Calculate the differentiable baseline response for the actual input; subtract the corresponding baseline response from the measured power of the training subset, calculate the mean and scale with positive lower bound of the training residuals channel by channel, and use them to train the residual model; when calling, multiply the predicted value of the residual model by the residual scale and add the mean of the residuals, and then add the baseline response to obtain the final power response.

[0116] The baseline response and its parameters are saved in the training configuration. The residual inverse normalization uses residual statistics and cannot be superimposed again using the original power output mean. Data loss, physical derivative constraints, and output checks are always based on the sum of the baseline response and the residual response. When there is no reliable baseline response, the direct response implementation method is used.

[0117] The initial model can be implemented by a unified multi-output model or by several coordinated output sub-models. When using coordinated output sub-models, each sub-model must share the same input definition, the same synchronization frame source, the same source group division, the same channel description table, the same calibration version, the same normalization rule, and the same effective domain rule, and be managed by the same model package. Independent models with unrelated data scope and applicable conditions cannot be spliced ​​together afterward. The model must be at least one order differentiable with respect to the required input direction.

[0118] When near-resonance local curvature constraints are enabled, the model is at least second-order differentiable with respect to the resonant variables at the corresponding frequencies.

[0119] A preferred embodiment employs a differentiable network structure with learnable univariate functions as edge mappings, normalized inputs as the outputs of the zeroth layer nodes, and subsequent node outputs are calculated layer by layer according to the following process.

[0120] The zero-layer node output is a normalized input; for each connection edge in the current layer, the smooth activation function value is multiplied by the edge activation coefficient, the basis function values ​​of each spline are multiplied by the corresponding spline coefficient, the sum is multiplied by the spline amplitude coefficient, and the two parts are added to obtain the edge function output; the output of the edge function is obtained by summing all edge function outputs entering the same node in the next layer, and the output of that node is obtained. This process is repeated layer by layer until the output layer is reached.

[0121] The activation coefficient, spline amplitude coefficient, and spline coefficient are learnable parameters. The node sequence, degree, and positions of input and output nodes of each edge are all explicitly stored. The number of output layer nodes is equal to the number of enabled power channels, and the order of each node is consistent with the channel description table, thus forming a multi-output nonlinear mapping that can be directly calculated.

[0122] The smooth activation function uses the input multiplied by the logic function value. For non-negative inputs, the natural exponent of the opposite number is taken first, and the sum of 1 and the exponent is divided by 1 before multiplying by the input. For negative inputs, the natural exponent of the input is taken first, and the sum of 1 and the exponent is divided by the exponent before multiplying by the input. The two branches are algebraically equivalent and the exponent does not exceed 1, which avoids directly calculating the maximum exponent.

[0123] The spline edge function uses cubic splines, with each boundary node repeated 4 times. The internal nodes are strictly increasing and non-repeating, ensuring internal second-order continuity. Given the node sequence and spline coefficients of an edge, the zero-order basis function is set to 1 in the corresponding left-closed and right-open node interval, and 0 in other positions. As the degree increases, the two adjacent basis functions of the previous degree are weighted. The first weight is the input minus the current node divided by the distance from the current node to the node after the current number of moves. The second weight is the value after the current number of moves plus one node minus the input divided by the distance from the node after the current number of moves. The entire weighted term with a denominator of zero is set to 0. The limit value approximated from the left is used at the rightmost endpoint of the closed effective interval. All basis functions are not set to zero. When the spline effective interval is exceeded, the derivative constraint at that point is not enabled.

[0124] The first derivative of a spline can be obtained by dividing the current degree by the span of the two corresponding nodes, multiplying by the corresponding lower-degree basis function, and then subtracting the next term from the previous term. Terms with a zero span are treated as zero. The second derivative is obtained by recursively applying the same derivative to the aforementioned lower-degree basis function. Only the defined one-sided limit is used at the boundary. The simple nodes inside ensure the continuity of the second derivative. The training parameters only update the coefficients and do not move the node positions in the current iteration. Therefore, the input second derivative and parameter update have a definite computational path.

[0125] Another implementation uses a multi-output feedforward network with a smooth activation function. Each layer first multiplies the output of the previous layer by the connection weights, sums them, and adds a bias. Then, the smooth activation function is calculated. The last layer uses the linear output to form the normalized power predictions. The number, width, and initialization seed of hidden layers are registered as finite candidate configurations before training and selected according to the validation subset. The selected configuration is saved with the read-only model package and cannot be replaced by the model name without specifying the calculation method.

[0126] Input data from a training subset of the normalized dataset is input into the initial model for forward propagation to obtain the predicted channel resolution power vector; the difference between the predicted channel resolution power vector and the true channel resolution power vector is calculated, and combined with the preset channel weight matrix, the prediction data error is obtained; wherein, the setting rules of the channel weight matrix are as follows.

[0127] Each channel first divides its measurement uncertainty by the output scale to obtain a dimensionless uncertainty; the reciprocal of the larger of this value and the preset lower limit of positive uncertainty is used as the denominator to obtain the initial channel weight; then each initial weight is divided by the sum of all initial weights to obtain the positive channel weight with a sum of 1; in matrix representation, the diagonal elements are the square roots of the corresponding weights.

[0128] The definition of data loss is determined by the following process.

[0129] Within a non-empty training batch, the difference between the final power response and the measured power is calculated for each sample and channel, then divided by the output scale of that channel. The squared normalized residual is then multiplied by the positive loss weight of that channel. The summation is applied to all channels, and then the average is applied to the batch samples to obtain the prediction data error.

[0130] The sum of channel weights is 1. When the weight matrix is ​​represented, its diagonal elements are the square roots of the corresponding weights. Therefore, the weighted residual square is multiplied by the weight only once. The prediction data error is dimensionless. Empty batches do not calculate the mean or update the parameters. All stages use the same output scale instead of changing the statistical caliber in the noise channel.

[0131] Furthermore, within the non-empty applicable sample set corresponding to the preset local physical derivative constraints, the local first-order derivative or local second-order derivative of the initial model with respect to the input data is calculated; based on the local first-order derivative or local second-order derivative, it is determined whether the output response change direction of the initial model violates the preset physical monotonicity trend or physical curvature trend, and the degree of violation of the trend is quantified into physical violation quantity to obtain the physical derivative constraint loss.

[0132] To facilitate the description of local derivatives, we first define the local sensitivity matrix, which is determined by the following process.

[0133] For each output channel and each input component, keeping the other inputs constant, calculate the first-order partial derivative of the input with respect to the final power response. Arrange the results with the output channels as rows and the input components as columns to obtain the local sensitivity matrix.

[0134] The local sensitivity matrix represents the local rate of change of real-valued settings and state quantities to scalar power, and its units vary with the column input units. This matrix is ​​not equivalent to the complex radio frequency transfer matrix and is not used for complex inversion or amplitude-phase pre-compensation. The normalized coordinate derivatives need to be converted according to the actual positive scale used.

[0135] In the direct response, the first-order partial derivative of the normalized output with respect to the normalized input is multiplied by the output scale and then divided by the input scale to obtain the actual first-order partial derivative; the corresponding second-order partial derivative is multiplied by the output scale and then divided by the square of the input scale to obtain the actual second-order partial derivative.

[0136] The above scales are all positive scales of the actual statistics stored in the training set, not the original standard deviations without lower bound processing; the first partial derivative of the mixed response should be added to the first partial derivative of the baseline response, and the second partial derivative should be added to the second partial derivative of the baseline response. The residual term conversion uses the residual scale, and the response conversion formula cannot be directly applied to the mixed response without distinction.

[0137] The processor keeps the other input components of the same sample unchanged, calculates the first-order partial derivative of the final power response, and then calculates the second-order partial derivative with respect to the same input direction. During training, the derivative operation graph is retained so that the loss can be used to continue differentiating the model parameters. When automatic differentiation is not possible, the final power response after increasing and decreasing the positive step size of the input is calculated separately in the applicable range. The difference between the two responses is divided by twice the step size to obtain the first-order central difference. The sum of the two responses minus twice the central response is divided by the square of the step size to obtain the second-order central difference. When the step size is halved but still not lower than the input resolution and both sides are still in the same applicable range, the dimensionless derivative difference is calculated and compared repeatedly. Only if the locking tolerance is met is the constraint used. If the condition is not met or a two-sided perturbation cannot be formed, the difference constraint at that point is not enabled. The selection set in training is fixed before each parameter update.

[0138] The preset local physical derivative constraints include three rules.

[0139] The local non-decreasing constraint of the drive strength and the cavity sampling channel is only enabled within the applicable range where the correspondence has been confirmed. It requires that the other inputs, operating modes and topologies be fixed, the power source is not saturated or limited, and there is a local record or verified relationship to support that the cavity sampling power does not decrease when the drive increases.

[0140] When multiple power sources feed the same RF cavity, the field of the same mode within the cavity is coherently superimposed by the complex fields of each branch. It is not possible to infer that all driving directions have positive slopes by simply adding the scalar power of each branch. With a fixed frequency and other branches, the in-phase and quadrature contributions of the changing branch to the mode are written as the non-negative amplitude of the branch multiplied by the corresponding fixed field coefficient. The contributions of the other branches are respectively treated as fixed background components. The in-phase contributions of the two types are added and squared, the quadrature contributions of the two types are added and squared, and the two squares are added and multiplied by the positive sampling coefficient to obtain the local cavity sampling power. This derivation is only used to determine the constraint sign and does not change the definition of the actual input and output of the model as real-valued states and power.

[0141] To calculate the first-order rate of change of the above amplitude, first multiply the two field coefficients of the branch being changed by their respective total field components and then add them together. Then multiply by 2 and the positive sampling coefficient to obtain the rate of change of power with respect to the amplitude. Since the fixed background component can be opposite to that branch, its rate of change can be negative. For example, when the background amplitude on the in-phase axis of the two branches is 1, and the adjustable branch is opposite in phase and has an amplitude of 0.2, the total amplitude is 0.8. When the adjustable amplitude is increased to 0.3, the total amplitude decreases to 0.7, and the normalized power changes from 0.64 to 0.49. This example is an arithmetic counterexample of coherent superposition and is not the actual measured performance of this device.

[0142] When the common drive scales all branches by the same non-negative ratio and the relative phase, branch ratio, and cavity transmission conditions are fixed, the total field scales by this ratio, and the sampled power changes by the square of this ratio, thus possessing a non-falling direction; for the source-level individual drive, the sign is confirmed one by one according to the correspondence, and the non-falling constraint in this direction is not enabled when the condition is not met, so that the descent caused by the actual cancellation cannot be trained into a "default", thereby avoiding the physical constraint from distorting the power response supported by the measurement.

[0143] The corresponding constraint loss is determined according to the following process.

[0144] For the relationship between the activated drive strength and the cavity sampling channel, calculate the actual first-order partial derivative of the final cavity sampling power with respect to the drive strength for each applicable sample, then multiply it by the input scale and divide it by the output scale; take the larger of the inverse of the dimensionless derivative and zero, accumulate it across the activation relationship and divide it by the sum of the corresponding applicable sample numbers to obtain the monotonicity loss of the drive strength.

[0145] The applicable sample size is counted according to the input-output relationship and the pairing of the samples. The same sample can participate in different enabled relationships. Negative derivatives produce positive default values, and non-negative derivatives produce zero default values. Positive scaling maintains the sign of the derivative and avoids changes in the relative magnitude of loss due to different power units or setting units.

[0146] The second constraint is the local monotonicity constraint between the gain setting and the forward monitoring channel; within the non-empty applicable sample set corresponding to the gain setting and the forward monitoring channel, a local monotonicity constraint is applied to the forward monitoring power by the gain setting, that is, the forward monitoring power should not decrease when the gain setting increases.

[0147] The corresponding constraint loss is determined according to the following process.

[0148] For the relationship between the enabled gain setting and the forward monitoring channel, calculate the actual first-order partial derivative of the final forward power with respect to the gain setting for each applicable sample, multiply it by the input scale and divide it by the output scale; take the larger of the inverse of the dimensionless derivative and zero, accumulate them across the enabled relationships and divide them by the sum of the corresponding applicable sample numbers to obtain the gain monotonicity loss.

[0149] Gain settings must use a fixed definition that increases the corresponding excitation when the gain is increased. If the register actually represents the attenuation amount, the non-decreasing gain relationship is not directly enabled. The loss is calculated only in the confirmed applicable non-saturated, non-limited regions. Reflections and cross-port channels do not automatically receive the same constraint due to similar names.

[0150] The local curvature constraint between the frequency resonance state and the cavity sampling channel applies to the peak-connected neighborhood when the other inputs are fixed. When the detuning amount is calculated by subtracting the measured resonant frequency from the driving carrier frequency, the first derivative has the opposite direction and the second derivative has the same sign when the carrier frequency is fixed and the resonant frequency itself is used. Therefore, the concavity cannot be extended to the full scanning range.

[0151] In addition to satisfying the three conditions of sufficient local coverage, effective measurement, and unsaturated or limited power source, the applicable sample set corresponding to this constraint is also limited to samples located in the near-resonant concave region centered on the resonant point. Samples outside this concave region and wing samples where the sign of the second-order partial derivative of the cavity sampling power changes with frequency are not included in this constraint. The corresponding constraint loss is determined according to the following process.

[0152] The near-resonance concave interval is determined according to the correspondence between each frequency state and the cavity sampling channel: First, the local neighborhood where the driving intensity, gain setting, phase setting, and thermal state are located is fixed, and the samples are sorted according to the frequency state. The frequency state where the cavity sampling power reaches the local maximum value is taken as the candidate resonant point. Then, the continuous sample window is gradually expanded with the candidate resonant point as the center. The frequency state and cavity sampling power within the window are subjected to secondary local fitting. Only the largest continuous interval with negative quadratic coefficients, fitting residuals not exceeding the upper limit determined by the measurement uncertainty, and samples on both sides of the window are retained. For records with multiple disconnected peaks or where negative quadratic terms cannot be obtained, the curvature constraint of this correspondence is not enabled. Since the local quadratic term of the near-resonance power peak is negative, and the sign of curvature may change after moving away from the peak, the above-mentioned connected interval can limit the concave constraint to the peak neighborhood with measurement support, avoiding the incorrect extrapolation of local laws to the wings.

[0153] To verify the physical meaning of the near-peak concavity, a single-peak steady-state response can be used as an explanation under local conditions of fixed excitation, fixed coupling, and a single resonant mode dominating: the dimensionless detuning ratio is obtained by dividing the detuning by the positive half-power half-width, the square of this ratio is added to 1, and the positive peak power is divided by the sum to obtain the sampling power of this interpretation relationship; this relationship reaches its peak at resonance and drops to half of the peak value when the absolute value of the detuning is equal to the half-power half-width, with the half-width and detuning both using the same frequency unit.

[0154] When calculating the second-order rate of change of the above response, first multiply the square of the dimensionless detuning ratio by 3 and then subtract 1, then multiply by 2 times the peak power as the numerator; multiply the square of half-power half-width by the cube of the square of the dimensionless detuning ratio plus 1 as the denominator, and divide the two to obtain the second-order rate of change of power with respect to the detuning amount. Therefore, when the absolute value of the detuning ratio is less than the square root of 1 divided by 3, it is negative; when it is equal to the boundary, it is zero; and when it exceeds the boundary, it is positive. This derivation shows that the single-peak response is only concave near the peak. In actual cases of multiple couplers, thermal drift, or multimode, the interval still needs to be determined by historical local fitting. This interpretation relationship should not replace the confirmation of the actual applicable interval.

[0155] Local quadratic fitting uses the candidate resonance point as the center, subtracts the center from each frequency state and divides by the positive scale in that direction to obtain local coordinates; for each sample, a row is formed consisting of a constant 1, the local coordinates and their squares, and all rows constitute the fitting design matrix. With the channel sampling power as the target, orthogonal decomposition is used to find the least squares coefficients. At least 3 different frequency positions are used and the matrix has full column rank. Samples on both sides of the peak and independent residual check records are retained. Only when the number of samples exceeds 3 can the fluctuation on the additional degrees of freedom be estimated from the fitting residuals. Zero residuals at exactly 3 points are not considered as a trend and are fully verified.

[0156] The actual second derivative is obtained by multiplying the quadratic term coefficient by 2 and dividing by the square of the local frequency scale. A negative coefficient only supports the fit concavity within the tested window. When expanding from a small window, the sign of the quadratic term, residuals, and coverage on both sides of the peak should be checked for each adjacent overlapping sub-window. Expansion should stop if any sub-window fails to meet the requirements. It is not allowed to include the local convex segment in the applicable interval simply because the average quadratic term of the entire window is negative. This relationship should not be enabled when negative curvature and zero curvature cannot be distinguished within the measurement resolution and uncertainty range. The model package saves the actual window, frequency definition, and other input neighborhood conditions.

[0157] For the relationship between the activated frequency resonance state and the cavity sampling channel, calculate the actual second-order partial derivative of the final cavity sampling power with respect to the frequency state for each applicable sample, multiply it by the square of the input scale and then divide it by the output scale; take the larger of the dimensionless second derivative and zero, accumulate them across the activation relationship and divide them by the sum of the corresponding applicable sample numbers to obtain the local curvature loss.

[0158] A positive second derivative indicates a violation of the confirmed local concavity and produces a positive violation quantity, while a non-positive second derivative produces a zero violation quantity. The denominator counts the number of applicable sample pairs for the enabled relation of this class, which cannot be replaced by the input dimension or the total number of training samples. The applicable scope does not include wings that are far from the peak and whose curvature changes sign.

[0159] The corresponding sets of the three constraints are defined as follows.

[0160] The corresponding set Rsc of drive intensity and cavity sampling channel is a subset of the Cartesian product of the drive intensity sequence set and the cavity sampling channel sequence set; the corresponding set Rgf of gain setting and forward monitoring channel is a subset of the Cartesian product of the gain setting sequence set and the forward monitoring channel sequence set; the corresponding set Rζc of frequency state and cavity sampling channel is a subset of the Cartesian product of the frequency state sequence set and the cavity sampling channel sequence set; each corresponding set has an associated non-empty applicable sample set, which only contains records with sufficient local coverage, effective measurement, and unsaturated or limited power sources.

[0161] Before calculating the loss for each physical constraint, first delete the input-output correspondences with empty applicable sample sets, and only sum the numerators of the remaining enabled relationships, using the sum of the applicable sample counts of all enabled relationships as the denominator; when there is no enabled relationship for a certain type of constraint, the loss and corresponding weight of that type of constraint are both set to zero and no division is performed; when there is no enabled relationship for any of the three types of constraints, the current training does not meet the physical constraint modeling conditions, the model package is not frozen, and the reason for insufficient constraint coverage is returned.

[0162] The process for establishing the applicable sample set is as follows.

[0163] For each confirmed input-output correspondence, records that meet the conditions are filtered one by one from the training subset. During the filtering process, the following three conditions are judged in sequence: Local coverage fully represents that, with the current record as the center, other input components are in a locked, dimension-wise neighborhood, and the differentiated input direction has distinguishable values ​​and bilateral coverage. Neighborhood records are selected by sorting by dimensionless distance, and the number of different input positions, the rank of the fitting matrix, and the convergence of the difference are checked. Coverage cannot be determined solely by the total number of samples on a single input axis.

[0164] The measurement is valid, meaning that the output channel power value corresponding to the record is not missing, not saturated, not overflowing, and is within the calibration range.

[0165] The power source is not saturated or limited, meaning that the power source operating point corresponding to the record has not entered the saturation region and has not triggered the limiting protection. Only records that meet all three conditions can be included in the applicable sample set. After performing the above screening on each pair of corresponding relationships, the applicable sample set associated with each corresponding relationship is obtained.

[0166] When a certain correspondence is unclear, or the corresponding applicable sample set is empty, or the coverage is lower than the preset coverage lower limit, the correspondence will not be included in the loss and will be marked as not enabled in the model package; the rules for determining the coverage lower limit are as follows.

[0167] Record the number of applicable samples for each relation in the training subset and its ratio to the total number of valid records in the training subset as the training coverage. Check the minimum number of distinct input positions, local fitting rank, two-sided coverage, and overall relation coverage respectively. The total sample ratio cannot replace local identifiability.

[0168] First-order local trends require at least different input positions, and second-order local fitting requires at least three different input positions and full column rank. Independent records are added to check the stability of the sign based on the measurement uncertainty. The lower limit of coverage and the lower limit of the number of local records are locked in the planned coverage area before training. The enabled relationship must have a non-empty applicable sample set and positive weights. The reflection power and cross-port response do not have universal monotonicity. Local soft constraints do not represent the physical laws of the whole space.

[0169] Finally, the prediction data error and physical derivative constraint loss are weighted and fused according to preset weights, and the total loss function is obtained by introducing a regularization term; the definition of the total loss function is determined according to the following process.

[0170] The driving intensity monotonicity loss, gain monotonicity loss, and local curvature loss are multiplied by their respective non-negative constraint weights and added to the prediction data error. The sum of squares of all learnable parameters is multiplied by non-negative regularization weights and added to the sum to obtain the total loss.

[0171] In this implementation, the regularization term uses the sum of squared parameters. The weights of each enabled constraint are positive, while the losses and weights of unenabled constraints are zero. Since each loss is dimensionless, the weights are dimensionless values. The regularization term is used to limit the parameter size and cannot guarantee that all local responses are smooth or meet physical trends.

[0172] The rules for setting each weight are as follows.

[0173] The data loss weight is set to 1 as the baseline. Other weights, model complexity, and stopping configuration use a pre-registered finite candidate set. By comparing the channel-wise error and the default rate of applicable constraints with the validation subset, candidates that do not meet the lockout acceptance limit are first eliminated, and then the remaining candidates are selected according to the validation error. Each physical derivative is dimensionless using positive scales of input and output before summation, so the constraint weights no longer bear the responsibility of dimension balancing, and the test subset does not participate in the weight or structure selection.

[0174] Based on the total loss function, the parameters of the initial model are updated through gradient optimization to obtain the physical constraint model.

[0175] Before each round of parameter updates, the batch of records and the set of applicable samples are fixed, the total loss is calculated and its computation graph is preserved, and the gradient of the total loss with respect to each learnable parameter is obtained by back-derivative. The current value of the parameter is subtracted from the product of the corresponding gradient and the forward learning step size to obtain the updated parameter. If a non-finite value is found during recalculation, the previous finite snapshot is restored and the step size is halved for recalculation. If the preset maximum number of retries is reached and the problem still fails, the process is terminated and a numerical anomaly is returned. The update is only preserved when the gradient and all intermediate losses are finite.

[0176] The stop configuration includes the maximum training period, minimum effective improvement margin, and number of consecutive periods without improvement, which are registered before training. After each period, the normalized prediction error of the validation subset and the default rate of the enabled relationship are statistically analyzed. A snapshot of the finite parameters with the lowest error when the constraint acceptance limit is met is saved. When the maximum period or the condition of consecutive periods without improvement is reached, the training stops and the snapshot is restored. If there is no qualified snapshot, the validation fails, and the physical constraint model for this round is obtained.

[0177] The physical constraint model is validated and its coverage is checked. When the preset conditions are met, the model parameters are frozen, and the model parameters, channel description table, training set statistics, and effective domain rules of the physical constraint model are solidified into a read-only model package.

[0178] First, an error check is performed. Based on the physical constraint model and the validation subset in the partitioned data subset, the prediction error of each output channel and the source group stratification error are calculated to obtain the error check results. The source group stratification error refers to the prediction error of the records in the source group with parameter changes and the steady-state samples respectively, so as to evaluate whether the model performs equally on the two types of samples. The specific calculation process of the source group stratification error is as follows.

[0179] The steady-state qualified records within the observation interval of parameter change events in the verification subset are divided into two categories: those outside the interval and those sparsely retained records. The mean absolute value and root mean square error of the difference between the predicted power and the measured power are calculated for each channel. The absolute value of the difference between the mean absolute errors of the two categories is then taken as the stratification difference. At the same time, the channel error is calculated for each source group to prevent large groups from masking small groups. If any necessary channel or source group exceeds the locked upper limit, it is considered unqualified. If a necessary layer is empty, it is returned as insufficient verification coverage and cannot be regarded as zero error.

[0180] The upper limit of error for each output channel and the upper limit of difference between source components are locked before reading the results of the validation subset and are saved with the validation configuration. The upper limit of error is determined based on the uncertainty of the corresponding measurement chain, the calibration range, and the allowable error of power estimation during equipment commissioning. The upper limit of difference between source components is determined based on the combined value of the measurement uncertainties of the two types of samples. During validation, only the measured error is compared with the locked upper limit, and the same validation result is not used to generate the upper limit for this acceptance test. If the upper limit needs to be adjusted, a new validation configuration should be formed and the full validation should be re-executed.

[0181] Based on the training subset, establish and freeze the input intervals, other input neighborhoods, channel quality, and mode conditions for each enabled relationship, and then apply the same applicable rule independently to the validation subset. The training coverage is calculated by dividing the number of applicable training samples by the total number of records in the training subset, and the validation coverage is calculated by dividing the number of applicable validation samples by the total number of records in the validation subset. The default rates are calculated separately for each sample, and training samples are not reused as validation samples.

[0182] The specific statistical process for the default rate is as follows.

[0183] For each enabled relation, the dimensionless derivative default value is calculated within its respective non-empty applicable sample set. Samples that exceed the locked derivative tolerance are recorded as defaults. The default value is divided by the number of samples in the set to obtain the default rate of the set. The training and validation coverage must reach the lower limit of the lock and the validation default rate must not exceed the pre-locked upper limit to be considered qualified. If the applicable validation set is empty, the model package containing the relation is not released. If necessary, the coverage is supplemented and the model is retrained.

[0184] The upper limit of the default rate is locked between 0 and 1 based on the acceptance requirements that allow deviations from the physical trend and the derivative error tolerance before reading the default results of the current training and validation models. The training default rate is only used for diagnosis and model comparison, and does not automatically raise the upper limit of the current acceptance by adding margin to the training default rate.

[0185] Based on this, effective domain rules are established; according to the input data distribution of the training subset in the normalized dataset, dimensional range boundaries and high-dimensional joint coverage rules are established to obtain effective domain rules; the dimensional range boundaries refer to the lower and upper bounds of the values ​​on each input dimension, and their determination rules are as follows.

[0186] The minimum and maximum values ​​of the input are taken from the training subset for each dimension boundary. In this implementation, the range is not expanded to the uncovered range. The joint coverage adopts the weighted nearest neighbor distance of the normalized input space. Each distance weight is a fixed positive value and the sum is 1. The distance between two points is obtained by multiplying the square of the difference of each dimension by the corresponding weight, summing the weights, and then taking the square root. The minimum distance from the query point to all training samples is the query nearest neighbor distance.

[0187] The candidate distance thresholds are obtained by sorting the nearest neighbor distances of each record in the training subset to training records from other source groups, excluding self-repeating and homologous near-duplicate points. The candidate thresholds are compared with the confirmed in-domain samples of the validation subset and the pre-constructed out-of-domain or joint void pressure samples. The minimum qualified value is selected according to the pre-locked acceptance and rejection rate requirements. If there is no qualified value, the model package is not frozen. The pressure samples only test the rejection rules and do not assign measured power labels. They cannot be deemed physically unusable just because a combination does not appear verbatim in the training subset. Dimensional range and joint coverage must still be satisfied simultaneously.

[0188] Further numerical stability checks are performed; based on the physical constraint model and training subset, the model parameters, gradients and loss function values ​​are checked for non-finite values, and a damped approximate Hessian matrix is ​​constructed based on the parameter Jacobian matrix of the normalized prediction residuals of the training batch. The condition number of the damped approximate Hessian matrix is ​​then checked to obtain the numerical stability check results.

[0189] Non-empty batches are drawn from a fixed subset of the training data. The first-order partial derivatives of the normalized prediction residuals with respect to all learnable parameters are arranged into a parametric Jacobian matrix for each sample and channel. The number of rows is the number of batch samples multiplied by the output dimension, and the number of columns is the number of parameters. The matrix is ​​transposed, multiplied by the original matrix, and then the positive damping coefficient is added and multiplied by the same-order identity matrix to obtain the damped approximate Hessian matrix. The damping value is locked before this diagnosis and is not arbitrarily increased according to the current condition number. The spectral condition number of the positive definite matrix is ​​calculated by dividing the largest eigenvalue by the smallest eigenvalue. After multiplying by the precision of the floating-point machine used, it is compared with the preset relative numerical error budget. If the eigenvalue is not finite, the minimum value is not positive, or the product exceeds the limit, it is considered unqualified.

[0190] The damped approximate Hessian matrix is ​​a local numerical diagnostic of the normalized data residuals, not a complete total loss Hessian matrix containing second-order physical constraint terms, nor does it prove that the parameters are uniquely identifiable. Even if the Jacobian of all data residuals with respect to the parameters is zero, positive damping can still produce a matrix with a condition number of 1. Therefore, it is necessary to retain the checks on the validity of error, constraints, coverage, and parameter updates. The model cannot be released based solely on the condition number. After changes to the model structure or regularization configuration, retraining and validation are required.

[0191] When the number of parameters is large, the non-zero spectrum can be obtained by first calculating the square of the singular values ​​of the parameter Jacobian matrix. If the column rank is insufficient, the original minimum eigenvalue of the uncovered direction is taken as zero. Then, the maximum and minimum eigenvalues ​​are respectively added with the same locking damping and the ratio is calculated. This calculation is equivalent to the spectral condition number of explicitly constructing the transpose product and adding damping. Zero singular directions that are not returned in the rectangular Jacobian should not be omitted. The batch identifier, accuracy, damping and error budget used are all saved with the acceptance record.

[0192] When both the non-finite value check and the condition number check pass, the numerical stability check result is deemed satisfactory.

[0193] When the error check results, constraint check results, and numerical stability check results are all qualified and the effective domain rules have been established, the physical constraint model parameters are frozen, and an independent verification with the same caliber is performed using a test subset that did not participate in parameter tuning. Only when the verification is passed is the model packaged and released; if the verification fails, the failure is recorded and the model is not released. The model is not selected for this round based on the test error, and the unused independent test source group is retained when it is redeveloped in the future.

[0194] Based on the frozen physical constraint model, the model parameters, channel description table, training set statistics, calibration version, phase branch, and effective domain rules are encapsulated and a unique version number and integrity check value are generated to obtain a read-only model package. The unique version number is used to identify the data time range, channel configuration, and calibration version corresponding to the model package. The integrity check value is obtained by performing a digest calculation on the content of the model package and is used to verify that the model file has not been tampered with or damaged during loading.

[0195] The model package is written in a fixed field order, including model structure, learnable parameters, input definitions, channel description table, positive normalization scale, phase branch, local constraint application conditions, acceptance limits, and effective domain training reference points. Configuration values ​​are saved in a format that can restore the original floating-point values. First, a standard summary is calculated for the load without a verification field, and then the summary is written to the list. The version number is associated with the data source and construction record. During loading, the summary of the same load is read and recalculated and compared byte by byte. The summary is not recursively calculated for files containing the summary itself.

[0196] The caller returns a main cause code in the order in which the causes occur, and may attach other diagnostic items. If the integrity is not met, it returns "model package corrupted"; if the mode or unbundled qualification is not met, it returns "operating condition inapplicable"; if the input definition or version is inconsistent, it returns "version inconsistent"; if dimensional or joint coverage fails, it returns "status out of bounds"; if the calculation is not finite, the power is out of limit, or the applicable derivative cannot be calculated, it returns "output invalid". All failure responses do not contain a valid power array that can be misused. The request status, model version, and cause code are recorded for traceability, but no alternative settings are generated or written to the RF execution register.

[0197] Based on the read-only model package, the system performs operating condition eligibility, version consistency, and valid domain checks on the given external state. If the checks pass, the power estimation result is output; otherwise, a reason code is returned.

[0198] First, perform a qualification version check; based on the externally given state and the read-only model package, determine whether the open-loop condition qualification is met, and simultaneously verify the consistency of the input definition, topology, channel description table, measurement reference surface, calibration version and phase branch with the read-only model package to obtain the qualification version check result.

[0199] When the external given state does not meet the open-loop condition without current, or when any of the input definitions, topology, channel description table, measurement reference plane, calibration version, or phase branch is inconsistent with the read-only model package, the model is directly returned as inapplicable, the query point is not projected to the nearest sample, and other settings are not searched.

[0200] The definition of query eligibility and valid domains is determined by the following procedure.

[0201] The query eligibility check sequentially verifies the open-loop flow without current, input source synchronization and data age, configuration calibration version, and input validity. If all of these are passed, the check then verifies whether each input component is at its corresponding upper and lower bounds and whether it meets the joint coverage requirement. The state where all query eligibility, dimension-by-dimensional boundaries, and joint coverage are passed together constitutes the effective domain of the model.

[0202] The query qualification does not use unknown measured power or steady-state criteria based on unknown power; the external given state represents the steady-state power estimation request under fixed settings and given thermo-resonant state, and is not interpreted as an instantaneous transient response after setting changes. When reading the state in real time, the current valid qualification and input time information are used.

[0203] Next, a valid domain check is performed. Based on the qualification version check result and the valid domain rules in the read-only model package, the dimensional range boundary and high-dimensional joint coverage of the external given state are checked to obtain the valid domain check result. When each input component of the external given state falls between the lower and upper bounds of the corresponding dimension, and the high-dimensional input combination is covered by the joint coverage rule, the valid domain check result is determined to be passed.

[0204] Subsequently, model calculations are performed; when both the qualification version check result and the valid domain check result indicate that they have passed, the physical constraint model in the read-only model package is input into the external given state for calculation, and the model calculation result is obtained.

[0205] Furthermore, an output validity check is performed on the model calculation results to obtain the output check results; the output validity check includes the following items.

[0206] All required outputs are finite non-negative values ​​and are within the effective output range of each channel in the model package. The output range must be within the calibrated range and supported by training and validation. The channel order and enabling configuration are consistent with the model package. When the query status meets the applicable conditions of a certain local physical relationship, the default amount is calculated according to the same dimensionless derivative rule and compared with the locking limit. The limit cannot be modified after reading the query result.

[0207] The specific determination process for output validity checking is as follows.

[0208] Each output component is checked for finiteness, nonnegativity, and fixed effective range within the packet. The channel order and activation configuration are then verified. For the local physical relationship applicable to the query state, the same dimensionless derivative non-component is calculated. The difference points must be located in the same applicable interval and meet the accuracy requirements. If the required derivative cannot be calculated, the output check is judged as a failure. If any item fails, no power estimation result is given. Only when all items pass is a valid output check result formed.

[0209] When the output check result indicates that it is valid, the power estimation result is output. The power estimation result includes the scalar power estimate of all enabled channels, the channel identifier and unit, the model version and applicable status, and can also return the local sensitivity diagnostic quantity used to interpret the model. When the qualification version check result or the valid domain check result indicates that it has failed, the corresponding reason code is generated and returned. When the output check result indicates that it is invalid, the output invalid reason code is generated and returned.

[0210] It should be noted that the query phase only accepts a single externally given operation status and does not use unknown real outputs for prior screening; the judgment is only based on the single externally given status and does not generate, search, or sort new control parameters; when the port connection, power source operating mode, or monitoring topology changes, the current model is judged as inapplicable, and if corresponding operating condition data exists, a new model should be built according to the new static topology; when the model file verification fails or the calculation times out, the model is not loaded or the estimate is not returned; the above anomaly handling only applies to data and model services and does not trigger, disable, reset, or restore hardware interlocks.

[0211] like Figure 2 As shown, this embodiment also provides a multi-coupler RF cavity beamless open-loop power constraint modeling system, whose modules correspond to the aforementioned method.

[0212] Configure the acquisition module to register the hardware topology and the correspondence between power channels and physical ports, and generate a channel description table; based on the channel description table, synchronously acquire control settings, thermal-resonance status and power measurement data to obtain multi-rate raw measurement data.

[0213] The synchronous screening module is used to perform delay compensation and calibration conversion on the multi-rate raw measurement data under a unified time reference to obtain synchronous acquisition frames; based on the synchronous acquisition frames, the valid historical records are obtained by screening according to the open-loop condition qualification, data quality and stability conditions.

[0214] The event grouping module is used to identify changes in control settings in valid historical records, trigger parameter change events based on the changes in control settings, and merge consecutive parameter change events into source groups to obtain candidate datasets.

[0215] The data partitioning module is used to partition the candidate dataset while maintaining the integrity of the source group, to obtain a training subset, a validation subset, and a test subset; the statistics of the training subset are used to normalize the input and output data to obtain a normalized dataset.

[0216] The constraint training module is used to perform the aforementioned non-empty applicable sample set establishment, prediction data error and dimensionless local physical derivative constraint loss calculation and parameter update to form a physical constraint model; the data partitioning module provides fixed training set statistics and source group partitioning, and the constraint training module does not change the test subset assignment.

[0217] The verification and solidification module is used to perform error, constraint, coverage, numerical stability and independent test verification. After passing the verification, the model parameters, channel description table, training set statistics, configuration version, constraint applicable rules and effective domain rules are formed into a read-only model package. If any necessary check fails, the model will not be released.

[0218] The evaluation output module is used to check the operating condition qualification, version consistency and valid domain of the externally given state based on the read-only model package. After calculation, it checks the validity of the output. If all pass, it outputs the power estimation result. If it fails, it returns the reason code and does not write back the control quantity to the RF execution chain.

[0219] The system described above is based on the same technical concept as the aforementioned method embodiments. The specific implementation process of each module can be found in the corresponding descriptions in the aforementioned method embodiments, and will not be repeated here.

[0220] Without logical conflicts and without violating the aforementioned input-output dependencies, source independence, and read-only boundaries, the technical features of each implementation can be combined; modules can be implemented by the same computing node or computing nodes that communicate with each other, and the division of each module does not change the described data members, processing conditions, and output meanings.

Claims

1. A method for beam-current-free open-loop power constraint modeling of multi-coupler RF cavities, characterized in that, The methods include: Register the hardware topology and the correspondence between power channels and physical ports, and generate a channel description table; Based on the channel description table, control settings, thermal-resonance state and power measurement data are collected to obtain multi-rate raw measurement data; Time alignment and calibration conversion are performed on the multi-rate raw measurement data to obtain the synchronous acquisition frame; Valid historical records are obtained by screening the open-loop qualification, quality and stability of synchronously acquired frames without current. Based on changes in control setpoints in valid historical records, parameter change events are identified and source groups are merged to obtain candidate datasets; The candidate dataset is divided into training subset, validation subset and test subset according to the integrity of the source group, and the training set statistics are used to form a normalized dataset; An initial model is constructed based on a normalized dataset. Local derivatives are calculated within a non-empty applicable sample set. The degree of violation of the confirmed monotonicity or curvature trend is used to form a physical derivative constraint loss. The parameters are updated together with the prediction data error to obtain a physically constrained model. Based on the verification and coverage check results of the physical constraint model, a read-only model package containing model parameters, channel description tables, training set statistics, and effective domain rules is solidified. The eligibility, version, and valid domain of the externally given state are checked based on the read-only model package. If the output is valid, the power estimation result is output; otherwise, a reason code is returned.

2. The multi-coupler RF cavity beam-current-free open-loop power constraint modeling method according to claim 1, characterized in that, Register the hardware topology and the correspondence between power channels and physical ports, and generate a channel description table, including: Register the physical type, power supply port or cavity sampling location, measurement reference plane, channel sequence, calibration coefficients and version, update cycle, effective range, and valid flags according to the channel identifier to enable the fixed model output dimensions and sequence of the channel. Re-verify applicability when the channel is deactivated, or when the measurement reference plane or calibration version changes, forming a channel description table. Perform time alignment and calibration conversion based on the multi-rate raw measurement data to obtain synchronous acquisition frames, including: The raw multi-rate measurement data is aligned and calibrated. The input state is composed of the control setting and thermal-resonance state associated with the recording time, the channel-resolved power vector is arranged in channel order, and the operating mode, beamless qualification, beam qualification, channel quality, data age and configuration version are also included. The thermal-resonance state includes thermal state quantity and frequency resonance state quantity. The beam qualification is determined based on the beam triggering state, ion source extraction state and beam monitoring quantity. The beam monitoring quantity is only used for beamless qualification judgment. The associated information is combined into a synchronous acquisition frame.

3. The multi-coupler RF cavity beam-current-free open-loop power constraint modeling method according to claim 2, characterized in that, Based on the open-loop eligibility, quality, and stability of the synchronously acquired frames, valid historical records are obtained, including: Based on the operating mode, beamless qualification and beam qualification of the synchronous acquisition frame, it was confirmed that the cavity field amplitude and phase feedback did not participate in the execution quantity adjustment and there was no beam, thus obtaining the working condition screening results; Based on channel quality, data age, configuration version, and input status validity, the necessary variables are time aligned and all enabled channels are not missing, not saturated, and are within the calibration range to obtain the quality screening results. Based on the channel-discriminated power vector, calculate the absolute value or window variance of the power change rate of each channel, compare it with the corresponding upper limit of each channel, and obtain the stability screening result by combining the input state stability. When the working condition screening results, quality screening results, and stability screening results are all qualified, the corresponding synchronous acquisition frames and their original times are retained and associated with the batch to form a valid historical record.

4. The multi-coupler RF cavity beam-current-free open-loop power constraint modeling method according to claim 1, characterized in that, Based on changes in control setpoints in valid historical records, parameter change events are identified and source groups are merged to obtain candidate datasets, including: The driving strength, gain setting, and phase setting of adjacent valid historical records are compared. The phase change is calculated according to a unified phase branch. When any change reaches the corresponding positive change threshold, a parameter change event is formed. The event interval is determined based on the trigger time, maximum observation duration, and the next trigger boundary; events from the same debugging batch, the same continuous scan, or with a trigger interval less than the source protection time are merged and formed into source groups according to their transmission relationship; For record gaps caused by filtering, the original batch association is retained, and records from the same source on both sides of the gap are not split; The valid steady-state historical records outside the event interval are assigned to the source group in a continuous time block and sparsely preserved. The valid historical records within the event interval are associated with the sparsely preserved valid steady-state historical records in the source group and summarized to form a candidate dataset.

5. The multi-coupler RF cavity beam-current-free open-loop power constraint modeling method according to claim 4, characterized in that, The candidate dataset is divided into training, validation, and test subsets based on the integrity of the source group. A normalized dataset is formed using training set statistics, including: Records are allocated as a whole based on the source group identifier of the candidate dataset, so that the same source group belongs to only one subset. Each subset is checked to ensure that they do not overlap and that each subset has valid records, thus obtaining the training subset, validation subset and test subset. The mean and standard deviation of each input component and output channel are calculated based on the training subset, and the larger of the corresponding standard deviation and the preset positive scale lower limit is used as the normalization scale to form the training set statistics. Subtract the corresponding mean from each subset's input component and output channel, then divide by the normalization scale, retaining the source group, channel order, and configuration version to form a normalized dataset; The validation and test subsets use the same statistics as the training set, without re-estimating the normalization scale, and the local derivative constraint is not enabled for the constant input direction.

6. The multi-coupler RF cavity beam-current-free open-loop power constraint modeling method according to claim 1, characterized in that, An initial model is constructed based on the normalized dataset. Local derivatives are calculated within a non-empty applicable sample set. The degree of violation of the confirmed monotonicity or curvature trend is used to form the physical derivative constraint loss. This loss is used together with the prediction data error to update the parameters, resulting in a physically constrained model, including: Construct a differentiable multi-output initial model according to the input and output dimensions; calculate the prediction data error based on the normalized prediction residuals and positive channel weights of the non-empty training batches; Keeping the other input components unchanged, the local first derivative or local second derivative of the final power response is calculated and converted into a dimensionless derivative using a fixed positive scale. The positive defaults that violate the non-decreasing or concave trend are accumulated and averaged according to the applicable sample size to obtain the physical derivative constraint loss. The prediction data error, physical derivative constraint loss and parameter regularization term are weighted and the parameters are updated according to the total loss gradient. The stopping position is determined based on the validation subset, and the corresponding finite parameters are restored to form a physical constraint model.

7. The multi-coupler RF cavity beam-current-free open-loop power constraint modeling method according to claim 6, characterized in that, Keeping the other input components constant, calculate the local first or second derivative with respect to the final power response, convert it to a dimensionless derivative using a fixed positive scale, accumulate the positive violations of non-decreasing or concave trends respectively, and average them according to the applicable sample size to obtain the physical derivative constraint loss, including: Records in the training subset that are valid in measurement, have sufficient local coverage, and whose power sources are not saturated or limited are selected based on the relationship between input components and output channels; The non-decreasing constraint of the driving intensity on the cavity sampling power is limited to other settings and thermal-resonance state control, and it is confirmed that there is no destructive decrease in the range. The gain setting imposes a non-decreasing constraint on the forward monitoring power, limiting the range where increasing the gain increases the excitation of the corresponding branch. The concave constraint of the frequency resonance state on the cavity sampling power is limited to connected regions where the other inputs are controlled, the peaks are covered on both sides, and the quadratic fitting supports negative curvature. Universal monotonicity is not imposed on reflection power or cross-port response; empty set relations are not enabled; when all are disabled, insufficient coverage and unfixed model package are returned. The average dimensionless default value is calculated based on the applicable samples of the enabled relationship, and the physical derivative constraint loss is obtained.

8. The multi-coupler RF cavity beam-current-free open-loop power constraint modeling method according to claim 7, characterized in that, Based on the validation and coverage check results of the physical constraint model, a read-only model package containing model parameters, channel description tables, training set statistics, and effective domain rules is solidified, including: For each channel of the physical constraint model, the prediction error of the validation subset and the layered error of the source group are calculated. The coverage and default rate of the training subset and the validation subset are statistically analyzed according to the applicable rules determined by the training subset to obtain the error and constraint check results. Establish effective domain rules based on the input range of the training subset and the weighted nearest neighbor distance; check the finiteness of model parameters, gradients and loss; form an approximate Hessian matrix with positive damping based on the parameter Jacobian matrix of the normalized prediction residuals; and evaluate numerical stability by condition number. When the error and constraint check results, effective domain rules and numerical stability are all qualified, the parameters are frozen and independently verified using the test subset that was not selected. Once the verification is passed, the model parameters, channel description table, training set statistics, configuration version, phase branch, applicable constraint rules, and effective domain rules are encapsulated, and a version identifier and integrity verification value are generated to form a read-only model package. If the verification fails, the model package will not be released.

9. The multi-coupler RF cavity beam-current-free open-loop power constraint modeling method according to claim 8, characterized in that, The eligibility, version, and valid domain of the externally given state are checked based on the read-only model package. If the output is valid, the output power estimation result is returned; otherwise, a reason code is returned, including: Verify the integrity of the read-only model package, check the open-loop qualification, input definition, hardware topology, channel description table, calibration version and phase branch of the externally given state, and obtain the qualification version check result; Based on the qualification version check results, verify the dimension-by-dimensional range boundary and weighted nearest neighbor joint coverage to obtain the effective domain check results; When all conditions are met, the externally given state is normalized according to the statistics of the training set, the model calculation is performed and then reversed to obtain the model calculation result. Based on the model calculation results, check the power finiteness, non-negativity, range, channel order, and applicable local derivative violation, and obtain the output check results; If successful, output the power estimation result and model version; otherwise, return the corresponding reason code.

10. A multi-coupler RF cavity beam-current-free open-loop power constraint modeling system, characterized in that, It includes a configuration acquisition module, a synchronous filtering module, an event grouping module, a data partitioning module, a constraint training module, a verification and solidification module, and an evaluation output module that are connected in sequence. The configuration acquisition module obtains multi-rate raw measurement data according to the channel description table; the synchronization filtering module generates synchronous acquisition frames and filters valid historical records accordingly. The event grouping module merges source groups based on changes in control settings in valid historical records to form candidate datasets; the data partitioning module partitions candidate datasets according to source groups and uses training set statistics to form normalized datasets. The constraint training module uses the prediction data error and the local physical derivative constraint loss within the non-empty applicable sample set together with the normalized dataset to update the parameters and obtain the physical constraint model. The verification and solidification module checks the physical constraint model and forms a read-only model package; the evaluation output module checks the external given state based on the read-only model package, and outputs the power estimation result if the qualification, version, valid domain and output validity checks are passed, otherwise it returns a reason code.