Programmable weak charge generating device, generating method and related equipment
Through the combination of the FPGA control unit, the programmable current source regulation unit and the feedback unit, the problems of low output accuracy of weak charge and inflexible compensation methods in the prior art are solved, and high-precision, real-time adaptive charge control is achieved, and the accuracy and reliability of the proton therapy system are improved.
Patent Information
- Application Number
- CN202410604220.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2044-05-15
AI Technical Summary
The existing current sources cannot achieve high-precision weak charge output, and the compensation method cannot be flexibly adjusted, and cannot adapt to environmental changes, resulting in large errors in the output signal and cannot meet the accuracy requirements of the proton therapy dose monitoring system.
The combination of FPGA control unit, programmable current source adjustment unit and feedback unit is adopted to adjust the current source output in real time through the compensation algorithm to achieve high-precision weak charge control, support voltage and resistance adjustment, and compensate errors through multi-stage fine-tuning and real-time monitoring.
It improves the accuracy and stability of weak charge output, realizes a flexible compensation method, simplifies system debugging and maintenance, reduces cost and time, and enhances the ease of use and reliability of the system.
Smart Images

Figure CN118557903B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of particle therapy technology, and in particular to a programmable weak charge generating device, a generating method and related equipment. Background Art
[0002] Particles such as protons and heavy ions have become an important means of treating malignant tumors. Compared with traditional X-ray radiotherapy, their dose deposition has obvious physical advantages. In the dose system of proton therapy, when the beam delivery conditions are not met, it is necessary to simulate the weak charge signal of the detector to test the functional integrity of the dose monitoring system.
[0003] Most of the current sources currently available can only output a constant current, with relatively little weak current output and low accuracy, and are unable to achieve programmable high-precision pC (picocoulomb)-level charge output. Simultaneously, in the use of circuit systems to simulate charge generation devices, due to factors such as the inherent characteristics of the circuit and factory errors of components, errors exist between the output signal and the target signal. Conventional compensation methods involve adding a fixed compensation circuit that cannot be flexibly adjusted, or performing compensation through a large amount of test data, which takes a lot of time and fails to meet accuracy requirements. Furthermore, adaptive compensation is not possible when the operating environment changes. Summary of the Invention
[0004] Based on the above problems, the present application provides a programmable weak charge generating device, generation method and related equipment, which improves the accuracy of weak charge output and meets the output requirements of weak charge. The compensation method is real-time adaptive, flexible and simple, and does not require the measurement of a large amount of data, saving time and cost, greatly improving the compensation accuracy and ease of use of the system.
[0005] The purpose of the present invention is to provide a programmable weak charge generating device, generating method and related equipment. By combining an FPGA control circuit with a compensation method, the accuracy of weak signal output is greatly improved, and the output accuracy reaches at least 1pC of charge. In addition, the circuit design analysis is combined with a mathematical model to flexibly, conveniently, quickly and accurately adaptively compensate for the error of the signal source, thereby achieving precise control of the output charge.
[0006] The purpose of the present invention is achieved by the following technical solutions:
[0007] In a first aspect, the present application proposes a programmable weak charge generating device, comprising:
[0008] FPGA control unit, current source, programmable current source adjustment unit and feedback unit;
[0009] The FPGA control unit is electrically connected to the programmable current source adjustment unit;
[0010] The FPGA control unit is electrically connected to the feedback unit;
[0011] According to the compensation algorithm, the FPGA determines a control signal according to the feedback signal of the feedback unit;
[0012] The programmable current source adjustment unit receives the control signal and adjusts the actual output charge of the current source.
[0013] Optionally, the programmable current source adjustment unit includes voltage adjustment or resistance adjustment.
[0014] Preferably, the programmable current source adjustment unit includes multi-level fine adjustment.
[0015] Preferably, the feedback unit includes a current-to-voltage circuit unit and an ADC circuit unit.
[0016] On the other hand, the present application provides a programmable weak charge generation method, which is implemented by any of the generation devices described in the present application, and the method includes:
[0017] Preset output charge amount;
[0018] The FPGA control unit sends a control signal to the programmable current source adjustment unit;
[0019] Adjusting the actual output charge of the current source by the programmable current source adjustment unit;
[0020] The actual output charge of the current source is fed back through the feedback unit, and the error between the actual output charge and the preset output charge is compared;
[0021] If the error exceeds a preset error range, a compensation amount is obtained according to a compensation algorithm, and the FPGA control signal is adjusted according to the compensation amount.
[0022] Preferably, the step of obtaining the compensation algorithm includes:
[0023] By giving parameters and actual measurements, the ideal output signal and the actual output signal are obtained through the transfer algorithm;
[0024] The corresponding parameters of the transfer algorithm and the compensation amount are obtained through the ideal output signal and the actual output signal.
[0025] Preferably, the transfer algorithm includes an ideal transfer function and an actual transfer function, and the method includes:
[0026] Obtain ideal transfer function through circuit structure;
[0027] Based on the ideal transfer function, the actual transfer function is obtained through the actual error;
[0028] Based on the actual transfer function, the compensation amount is obtained through actual measurement;
[0029] The actual transfer function is converted into an ideal transfer function through the compensation amount.
[0030] Preferably, the actual error includes a multiplicative error and an additive error; the ideal transfer signal is:
[0031] Q = f(t);
[0032] The actual transfer function is:
[0033] Q = k(m)*f(t)+g(m);
[0034] Where k(m) is the multiplicative error, g(m) is the additive error, t is the current source pulse width, Q is the current source output charge, and m is the adjustable compensation variable.
[0035] Preferably, the method comprises:
[0036] Based on the actual transfer function, k(m) is obtained by measuring the actual two sets of current source output charges Q1 and Q2 with any two given pulse widths t1 and t2:
[0037] k(m)=(Q1-Q2) / (f(t1)-f(t2));
[0038] Adjust m=m1 so that k(m1)=1;
[0039] Given another set of pulse widths t3, measure the actual current source output charge Q3 and obtain g(m1):
[0040] g(m1)=Q3-Q0;
[0041] Where Q0 is the theoretical value obtained by the ideal transfer function based on the adjustable variable m1;
[0042] A compensation amount is obtained, and t3 is adjusted by the compensation amount so that g(m1)=0.
[0043] In a third aspect, the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any method described in the present application or the functions of the device described in the present application when executing the computer program.
[0044] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer instructions. When a computer reads the computer instructions, the computer executes the steps of any method described in the present application.
[0045] In a fifth aspect, the present application provides a particle accelerator, comprising the aforementioned programmable weak charge generating device.
[0046] In a sixth aspect, the present application provides a particle therapy system, comprising the aforementioned particle accelerator.
[0047] Compared with the prior art, the present invention has at least the following beneficial effects: through the cooperation of the FPGA control unit and the programmable current source adjustment unit, the output of the current source can be precisely adjusted according to the real-time feedback signal from the feedback unit, ensuring the accuracy and stability of the output charge. The introduction of a compensation algorithm and compensation adjustment mechanism can further eliminate errors and improve the accuracy of the output charge. The FPGA control unit implements programmable control, allowing different output currents and pulse widths to be set according to different application requirements, with high flexibility and configurability. The programmable current source adjustment unit supports voltage or resistance adjustment, as well as multi-level fine-tuning, further enhancing its adaptability and flexibility. By monitoring the output charge and pulse width in real time and comparing them with theoretical values, potential circuit performance issues or faults can be promptly identified. When there is a significant deviation between the actual output and the theoretical output, the compensation adjustment can be triggered to ensure stable circuit operation. By establishing a predictive model, the output range of the compensation can be predicted, and when necessary, the user or maintenance personnel can be notified to conduct inspections and repairs, further improving the reliability and maintenance efficiency of the circuit.
[0048] In summary, the programmable weak charge generation device and method thereof provide a reliable solution for the precise generation of weak charges through high-precision control, flexible programmability, real-time monitoring and early warning, environmental adaptability and durability. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a schematic diagram of a programmable weak charge generating device according to an embodiment of the present invention;
[0050] Figure 2 is a schematic diagram of a programmable current source adjustment unit according to an embodiment of the present invention;
[0051] Figure 3 2. It is a schematic diagram of the voltage regulation principle of the programmable current source regulation unit according to an embodiment of the present invention;
[0052] Figure 4 2 is a schematic diagram of the resistance adjustment principle of the programmable current source adjustment unit according to an embodiment of the present invention;
[0053] Figure 5 This is a schematic diagram of the working process of a programmable weak charge generating device according to an embodiment of the present invention;
[0054] Figure 6 is a schematic diagram of the steps for obtaining a compensation algorithm according to an embodiment of the present invention;
[0055] Figure 7 3 is a schematic diagram of a transfer function model of an embodiment of the present invention. DETAILED DESCRIPTION
[0056] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concepts of the example embodiments to those skilled in the art. Identical reference numerals in the drawings represent identical or similar structures, and thus repeated descriptions thereof will be omitted.
[0057] The present application proposes a programmable weak charge generating device, which includes: an FPGA control unit, a current source, a programmable current source adjustment unit, and a feedback unit.
[0058] The current source is a high-precision current source (the current accuracy is at least 0.1uA); the high-precision current source circuit can be a controlled current source with high precision, sufficiently large output resistance, and output current that is not affected by the load (it can be implemented using but not limited to discrete components to form a mirror current source or an integrated high-precision current source chip); the programmable current source adjustment unit can be a circuit module including a digital-to-analog converter (DAC) and digital signal processing (DSP) functions. The DAC can convert the digital control signal sent by the FPGA into an analog signal and then control the output of the current source. The DSP function can pre-process, filter or enhance the signal to improve the performance of the system.
[0059] The FPGA control unit is electrically connected to the programmable current source adjustment unit.
[0060] The FPGA control unit is electrically connected to the feedback unit.
[0061] According to the compensation algorithm, the FPGA determines a control signal according to the feedback signal of the feedback unit.
[0062] The programmable current source adjustment unit receives the control signal and adjusts the actual output charge amount of the current source, wherein the actual output charge amount of the current source is determined by the actual output current and the pulse width.
[0063] In some embodiments, the feedback unit includes a current-to-voltage circuit unit and an ADC circuit unit.
[0064] The working principle and effect of the above technical solution are: the high-precision current source can provide stable and accurate charge output; it is the basis for ensuring that the entire system can generate weak and precise charges.
[0065] FPGA control unit: The FPGA (field programmable gate array) control unit is the core control component of the entire system. It is electrically connected to the programmable current source regulation unit and the feedback unit, responsible for receiving and processing signals from these units and issuing control signals as needed. Based on the compensation algorithm and feedback signals, the FPGA control unit adjusts the control signals in real time to ensure the stability and accuracy of the charge output.
[0066] Programmable current source regulation unit: Receives control signals from the FPGA control unit and adjusts the output charge of the current source based on these signals; by precisely controlling the output current and pulse width, the programmable current source regulation unit can ensure that the current source outputs a weak current that meets the requirements.
[0067] Feedback unit: This unit monitors the actual charge output of the current source in real time and sends this information as a feedback signal to the FPGA control unit. This feedback signal is a crucial component of the closed-loop control system, enabling the FPGA control unit to dynamically adjust the control signal based on the actual output charge, thereby achieving precise control of the actual output charge of the current source.
[0068] Compensation algorithm: To further improve the accuracy and stability of the output charge, a control program based on a compensation algorithm runs in the FPGA control unit. This program calculates the control signal that needs to be adjusted based on the feedback signal from the feedback unit and sends it to the programmable current source adjustment unit. The compensation algorithm can effectively compensate for various nonlinear factors and environmental interference in the system, thereby ensuring the stability and accuracy of the output current.
[0069] During actual operation, the FPGA control unit is connected to the programmable current source adjustment unit, and sends a control signal to the adjustment unit through a digital signal. At the same time, it is connected to the feedback loop unit to receive the digital signal of the feedback loop. Based on the feedback signal and combined with the compensation algorithm, the output control signal is adjusted in real time to play the role of adaptive adjustment. At the same time, the FPGA realizes the switching control at the us level, controls the output time of the current source circuit unit, and realizes the output of charge.
[0070] The programmable current source regulating circuit changes the voltage or resistance by receiving the control signal of the FPGA, thereby controlling the output current of the high-precision weak current generating circuit.
[0071] The high-precision weak current generating circuit has the function of multiple indifferent outputs, and all are indifferently controlled by the current source regulating circuit, at least one of which is connected to the feedback loop unit.
[0072] The feedback loop unit includes a current-to-voltage circuit (including but not limited to a transimpedance amplifier circuit and an integration circuit) and an ADC (digital-to-analog conversion circuit) circuit unit, and outputs the converted digital signal to the FPGA as feedback.
[0073] Due to the inherent characteristics of the circuit, factory errors of components and other factors, there is an error between the output signal and the target signal, which needs to be eliminated through compensation methods.
[0074] In some embodiments, the programmable current source adjustment unit includes voltage adjustment or resistance adjustment.
[0075] In some embodiments, the programmable current source adjustment unit includes multi-level fine adjustment.
[0076] FPGA adjusts the parameters of the programmable current regulation circuit through digital interfaces (such as IIC, SPI, UART, etc.). The programmable current source regulation unit includes a fixed resistor R, a voltage change (attached Figure 3 ), or fix the voltage U and change the resistance R (attached Figure 4 ) two schemes; at the same time, the current regulation circuit can be composed of multiple stages to achieve multi-stage regulation from coarse adjustment to fine adjustment of the current.
[0077] The working principle of the above technical solution is: when the programmable current source adjustment unit includes a voltage adjustment function, the current can be adjusted by changing the voltage applied to both ends of the current source; the relationship between current (I), voltage (V) and resistance (R) is given by Ohm's law: I = V / R; among them, the resistance (R) may be constant, so adjusting the voltage (V) can change the current (I).
[0078] If the programmable current source adjustment unit includes a resistance adjustment function, it can adjust the current by changing the resistance value in the current source circuit, usually by using a variable resistor (such as a digital potentiometer) or switching multiple fixed resistors.
[0079] The FPGA control unit also calculates the resistance value that needs to be adjusted based on the feedback signal and compensation algorithm, and then sends a control signal to the programmable current source adjustment unit. The current adjustment unit adjusts the resistance value according to the control signal, thereby changing the output charge of the current source.
[0080] The FPGA control unit calculates the voltage value that needs to be adjusted through the compensation algorithm based on the feedback signal of the feedback unit, and then sends a control signal to the programmable current source adjustment unit. The current adjustment unit adjusts the voltage output by the voltage source according to this control signal, thereby changing the output charge of the current source.
[0081] The multi-level trimming function allows the current source adjustment unit to switch between multiple fine steps to achieve more precise current and charge control; this is usually achieved by using a high-resolution digital-to-analog converter (ADC) or a digital potentiometer.
[0082] The FPGA control unit calculates the amount of charge that needs to be adjusted based on the feedback signal and compensation algorithm, and converts it into a corresponding control signal and sends it to the programmable current source adjustment unit; the programmable current source adjustment unit may contain multiple fine-tuning levels, each level corresponding to a different charge output; the programmable current source adjustment unit selects the appropriate fine-tuning level according to the control signal, thereby accurately adjusting the output charge of the current source.
[0083] In order to quickly determine the corresponding fine-tuning level, the programmable current source adjustment unit can use a lookup table (LUT); the correspondence between the control signal value and the fine-tuning level is stored; through the lookup table, the control unit can quickly find the fine-tuning level corresponding to the current control signal value.
[0084] The control unit uses an algorithm to calculate or estimate the fine-tuning level that is closest to the current control signal value; the algorithm includes one based on interpolation, linear or nonlinear mapping, etc.; after determining the fine-tuning level, the control unit will send a selection signal to the current regulation unit; the selection signal instructs the programmable current source regulation unit to switch to the specified fine-tuning level. After receiving the selection signal, the programmable current source regulation unit adjusts its internal circuit or component (such as a digital potentiometer, switch, etc.) to switch to the specified fine-tuning level; this will cause the output charge of the current source to change to match the desired charge.
[0085] The present invention provides a method for generating programmable weak charges, which is implemented by any of the generating devices described in the present invention. The method includes:
[0086] Preset output charge amount;
[0087] The FPGA control unit sends a control signal to the programmable current source adjustment unit;
[0088] Adjusting the actual output charge of the current source by the programmable current source adjustment unit;
[0089] The actual output charge of the current source is fed back through the feedback unit, and the error between the actual output charge and the preset output charge is compared;
[0090] If the error exceeds a preset error range, a compensation amount is obtained according to a compensation algorithm, and the FPGA control signal is adjusted according to the compensation amount.
[0091] The working principle and effect of the above technical solution are as follows: a desired charge output value is set, that is, a preset output charge value. The preset value can be fixed or variable, depending on the application requirements. The FPGA (field programmable gate array) control unit receives the preset output charge value and calculates the control signal that needs to be sent to the programmable current source adjustment unit based on the value. The control signal is usually a digital signal used to indicate how the current adjustment unit should adjust its output current; the programmable current source adjustment unit receives the control signal from the FPGA control unit and adjusts its internal circuit or components according to the signal to generate the required current output. The charge output is usually achieved by controlling a high-precision current source through a digital-to-analog converter (ADC) or other similar circuits. The feedback unit monitors the actual output charge of the high-precision current source and compares it with the preset expected charge.
[0092] The control system (which may be an FPGA control unit or another processing unit) calculates the error between the actual charge and the preset charge. The error value represents the difference between the actual output charge and the expected output charge. If the calculated error exceeds the preset error range (i.e., the system deems the difference unacceptable), the control system initiates a compensation algorithm. This compensation algorithm, based on the magnitude and direction of the error, calculates how to adjust the FPGA control signal to reduce the error. The adjusted FPGA control signal is then sent back to the programmable current source regulation unit, which adjusts its output charge again based on the new control signal. This process repeats until the error between the actual and preset charge is reduced to within the preset error range. This method allows for precise control of weak charge generation, meeting the required charge accuracy.
[0093] In some embodiments, the step of obtaining the compensation algorithm includes:
[0094] Obtaining an ideal output signal and an actual output signal by transferring an algorithm through given parameters and actual measured values; the given parameters include a given current pulse width, and the actual measured values include an actual charge output;
[0095] The corresponding parameters of the transfer algorithm and the compensation amount are obtained through the ideal output signal and the actual output signal.
[0096] The working principle and effect of the above technical solution are: given parameters and actual measured values.
[0097] The actual measured value includes the actual output charge, typically acquired in real time through a feedback loop. The transfer algorithm (including a mathematical or physical model) calculates the ideal output charge (ideal output signal) based on a given current pulse width. This involves predicting or modeling the time-varying charge. While the programmable current source adjustment unit regulates the current source output charge, the system measures the actual charge output in real time through the feedback unit. This actual charge output may differ from the ideal charge output due to various factors (such as hardware errors and environmental changes). The ideal output signal (predicted charge) is compared with the actual output signal (actual charge), and the error between the two is calculated. This error can be expressed as a charge difference or a time difference (such as a delay). Based on the comparison results, the parameters of the transfer algorithm are adjusted through a specific algorithm or strategy. The parameter adjustments are intended to reduce the error between the ideal and actual outputs. At the same time, the system will calculate a compensation amount, which is used to add or subtract a correction value from the subsequent control signal to compensate for the previously existing error. The compensation amount can be calculated based on the size and direction of the error and the dynamic characteristics of the system. In the subsequent system operation, when the FPGA control unit sends a control signal to the programmable current source adjustment unit according to the given parameters, the previously calculated compensation amount will be taken into account. The control signal will be adjusted to reflect this compensation amount, so that the current adjustment unit can control the high-precision current source to output a quantity of electricity closer to the ideal value. As the system continues to run and collects more actual measurement data, the compensation algorithm will be continuously optimized to better adapt to the actual situation and changes of the system, involving further adjustment of the transfer algorithm or recalculation of the compensation amount. Through the above, the compensation algorithm can help the system reduce the power output error caused by various factors and improve the performance and accuracy of the system.
[0098] In some embodiments, the transfer algorithm includes an ideal transfer function and an actual transfer function, and the method includes:
[0099] Obtain an ideal transfer function through circuit structure; establish a circuit model based on the obtained ideal transfer function using circuit simulation software, such as MATLAB / Simulink, LTspice, etc.
[0100] Based on the ideal transfer function, the actual transfer function is obtained through the actual error;
[0101] Based on the actual transfer function, the compensation amount is obtained through actual measurement;
[0102] The actual transfer function is converted into an ideal transfer function through the compensation amount.
[0103] In some embodiments, the actual error includes a multiplicative error and an additive error; the ideal transfer signal is:
[0104] Q = f(t);
[0105] The actual transfer function is:
[0106] Q = k(m)*f(t)+g(m);
[0107] Where k(m) is the multiplicative error, g(m) is the additive error, t is the current source pulse width, Q is the current source output charge, and m is the adjustable compensation variable.
[0108] The working principle of the above technical solution is: the ideal transfer function is the relationship between the current source output charge (Q) and the current source pulse width (t) in the absence of errors and interference. The ideal transfer function is simplified to Q = f(t), where f is a function that represents an ideal model of charge changing with time.
[0109] The actual transfer function takes into account the errors present in the actual system. These errors include multiplicative errors (affecting the system's amplification factor) and additive errors (affecting the system's offset). The actual transfer function is modeled as Q = k(m)*f(t)+g(m), where k(m) is the multiplicative error, g(m) is the additive error, and m is an adjustable compensation variable used to adjust the compensation amount.
[0110] Through actual measurements and error analysis, the multiplicative error k(m) and additive error g(m) can be determined. These errors may arise from hardware imperfections, changes in environmental conditions, aging effects, and other factors. The system calculates these error terms by comparing the ideal output with the actual output. Once the multiplicative and additive errors are determined, the system can calculate the compensation. The goal of the compensation is to adjust the actual transfer function to bring it closer to the ideal transfer function. This involves adjusting the adjustable compensation variable m to minimize the difference between the actual and ideal outputs. By adjusting the adjustable compensation variable m, the system can modify the multiplicative error k(m) and additive error g(m), thereby changing the actual transfer function. When the compensation is applied correctly, the actual transfer function will be closer to the ideal transfer function, thereby reducing the difference between the actual and ideal outputs.
[0111] The above technical solution achieves the following benefits: By compensating for the multiplicative error k(m) and the additive error g(m), the output charge of the current source can be more accurately controlled, bringing it closer to the ideal value. This improves the system's output accuracy, particularly in applications requiring high-precision charge control. The introduction of compensation effectively reduces system output fluctuations caused by factors such as hardware imperfections, environmental changes, and aging effects. By adjusting the adjustable compensation variable m, the system automatically corrects for errors, maintaining stable output performance. The compensation algorithm adjusts the control signal in real time to quickly respond to changes in the system output, helping to reduce system response time and improve dynamic performance. The compensation algorithm automatically detects and corrects potential faults or errors, thereby improving system reliability and dependability. The system maintains stable performance even under complex operating environments and conditions. The compensation algorithm simplifies system debugging. Because the compensation is derived through actual measurements and calculations, discrepancies between the system output and the desired output can be more easily identified and resolved. Furthermore, the compensation algorithm reduces the complexity of system maintenance, reducing maintenance costs and downtime.
[0112] In summary, the method including ideal transfer function, actual transfer function and compensation amount has significant benefits and effects in programmable weak charge generation system. It can improve the accuracy, stability, dynamic performance and reliability of the system, simplify the system debugging and maintenance process, expand the application scope of the system, and realize intelligent control.
[0113] In some embodiments, the method comprises:
[0114] Based on the actual transfer function, k(m) is obtained by measuring the actual two sets of current source output charges Q1 and Q2 with any two given pulse widths t1 and t2:
[0115] k(m)=(Q1-Q2) / (f(t1)-f(t2));
[0116] Adjust m=m1 so that k(m1)=1;
[0117] Given another set of pulse widths t3, measure the actual current source output charge Q3 and obtain g(m1):
[0118] g(m1)=Q3-Q0;
[0119] Where Q0 is the theoretical value obtained by the ideal transfer function based on the adjustable variable m1;
[0120] A compensation amount is obtained, and t3 is adjusted by the compensation amount so that g(m1)=0.
[0121] The working principle of the above technical solution is: select any two given pulse widths t1 and t2 (t1≠t2).
[0122] The charges Q1 and Q2 output by the actual current source are measured respectively by a given pulse width.
[0123] The theoretical charge values f(t1) and f(t2) at t1 and t2 are calculated using the ideal transfer function f(t).
[0124] Calculate the multiplicative error k(m) based on the actual measured value and the theoretical value:
[0125] If k(m) is not equal to 1 (i.e., there is a multiplicative error), the error is corrected by adjusting the adjustable compensation variable m;
[0126] Set m = m1 so that k(m1) = 1. This is usually achieved by iteratively adjusting the value of m until k(m) is close to or equal to 1.
[0127] Given another set of pulse width t3;
[0128] At time t3, the charge Q3 output by the actual current source is measured;
[0129] Using the adjustable variable m1 (i.e., the value of m that has been adjusted to correct for multiplicative errors) and the ideal transfer function f(t), we can calculate the theoretical charge Q0 at t3:
[0130] Calculate the additive error g(m1): Calculate the compensation based on the additive error g(m1). The goal of the compensation is to make g(m1) equal to 0, that is, to eliminate the additive error.
[0131] The exact calculation of the compensation depends on the specific implementation and error characteristics of the system; typically, the compensation is added as an adjustment term to the control signal to correct the actual output.
[0132] The compensation amount may be a value equal in magnitude but opposite in sign to g(m1) to cancel the additive error in the control signal.
[0133] After applying the compensation, measure the actual output again and verify that the additive error has been eliminated.
[0134] The effect of the above technical solution is that the output characteristics of the current source can be accurately calibrated by the value of k(m) obtained through actual measurement and calculation, ensuring that the charges Q1 and Q2 output by the current source match the actual requirements at different times t1 and t2. When a new pulse width t3 is given, the actual current source output charge Q3 is measured and compared with the theoretical value Q0 obtained based on the ideal transfer function of m1. The value of g(m1) is calculated, that is, the difference between the actual output charge Q3 and the theoretical value Q0, to obtain the compensation amount. This compensation amount is used to adjust the pulse width t3 so that g(m1) equals 0, that is, the actual output is completely consistent with the theoretical output. This compensation mechanism effectively eliminates system errors and improves the accuracy and stability of the system.
[0135] In some embodiments, the method comprises:
[0136] The output charge and pulse width are monitored in real time. If a significant deviation is detected between the actual output and the theoretical output, the compensation amount is adjusted.
[0137] In some embodiments, the method comprises:
[0138] Obtain historical data on compensation amounts, corresponding environmental data, and the usage time of circuit components;
[0139] Establishing a prediction model based on the historical data, corresponding environmental data, and the usage time of circuit components to predict the output range of the compensation amount;
[0140] Calculate the frequency of compensation adjustment within a preset time period;
[0141] If the current compensation amount exceeds the preset compensation amount output range or the adjustment frequency exceeds the preset frequency threshold, the user or maintenance personnel will be reminded to check and repair the circuit.
[0142] The working principle of the above technical solution is as follows: First, historical data on compensation values is collected, along with environmental data corresponding to these time points, such as temperature, humidity, and pressure, which may affect circuit performance. The age of circuit components is also recorded, as component aging can affect circuit output and stability. Using the collected historical data, environmental data, and component age, the system builds a predictive model. This model analyzes correlations and trends between the data and predicts the output range of compensation values at a future point in time or under certain conditions. The predictive model may utilize machine learning algorithms, statistical analysis methods, or physical models, depending on the characteristics of the data and the system requirements.
[0143] Within a preset time period, the frequency of adjustment of the compensation amount is counted; this statistical value reflects the degree of dependence of the circuit on the compensation amount within a period of time, that is, the stability of the circuit performance. The preset time period can be one week, half a month, etc., depending on needs, and is not specifically limited here.
[0144] The system monitors the value of the current compensation amount in real time and compares it with the output range predicted by the prediction model. If the current compensation amount exceeds the preset range, it may mean that there is an abnormality in the circuit or performance degradation.
[0145] At the same time, the adjustment frequency of the current compensation amount is compared with a preset frequency threshold; if the adjustment frequency exceeds the threshold, it also indicates that the circuit may need maintenance or adjustment.
[0146] When any of the above conditions are met, the early warning mechanism is triggered to remind the user or maintenance personnel to check and repair the circuit. The early warning can be in the form of an audible alarm, screen display, email or text message.
[0147] After users or maintenance personnel inspect and repair the circuit based on the early warning information, they will provide feedback on the results; the prediction model will be further optimized based on the feedback data to improve the accuracy of the prediction; at the same time, the preset range and frequency threshold will be adjusted based on the feedback data to adapt to changes in circuit performance and changes in user needs.
[0148] Through the above method, real-time monitoring and prediction of circuit performance can be achieved, potential problems can be discovered in time and users or maintenance personnel can be reminded to handle them, thereby improving the reliability and stability of the circuit.
[0149] An embodiment of the present application also provides a particle accelerator, which includes the aforementioned programmable weak charge generating device, which is used to simulate an ionization chamber to cooperate with a dose monitoring system when the accelerator does not meet the beam emission conditions to test the function and performance of the dose monitoring system. The dose monitoring system is used to monitor the dose and position of the particle beam.
[0150] An embodiment of the present application further provides a particle therapy system, comprising the aforementioned particle accelerator for providing a particle beam, a dose monitoring system, and a rotating gantry. The particle accelerator is mounted on the rotating gantry and can be driven by the rotating gantry to rotate relative to the patient, thereby achieving integrated miniaturization of the particle therapy system.
[0151] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps of any method described in the embodiment of the present application or the functions of the device described in the embodiment of the present application.
[0152] The embodiments of the present application also provide a computer-readable storage medium for storing a computer program. When the computer program is executed, the steps of the method in the embodiments of the present application are implemented. The specific implementation method is consistent with the implementation method and the technical effect achieved in the above-mentioned method embodiments, and some contents are not repeated here.
[0153] In the present application, a readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, device, or device. A program product can be any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0154] A computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, or any suitable combination thereof. The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user computing device, partially on an associated device, as a standalone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. Where a remote computing device is involved, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0155] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limiting the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the invention without departing from the principles and purpose of the present invention. All such changes shall fall within the scope of protection of the claims of the present invention.
Claims
1. A programmable weak charge generating device, characterized in that: The device comprises: FPGA control unit, current source, programmable current source adjustment unit and feedback unit; The FPGA control unit is electrically connected to the programmable current source adjustment unit; The FPGA control unit is electrically connected to the feedback unit; According to the compensation algorithm, the FPGA determines a control signal according to the feedback signal of the feedback unit; The programmable current source adjustment unit receives the control signal and adjusts the actual output charge of the current source; The step of obtaining the compensation algorithm includes: By giving parameters and actual measurements, the ideal output signal and the actual output signal are obtained through the transfer algorithm; Obtain the corresponding parameters and compensation amount of the transfer algorithm through the ideal output signal and the actual output signal; The transfer algorithm includes an ideal transfer function and an actual transfer function, specifically including: Obtain ideal transfer function through circuit structure; Based on the ideal transfer function, the actual transfer function is obtained through the actual error; Based on the actual transfer function, the compensation amount is obtained through actual measurement; By using the compensation amount, the actual transfer function is transformed into an ideal transfer function; The actual error includes multiplicative error and additive error; The ideal transmission signal is: Q = f(t); The actual transfer function is: Q=k(m)*f(t)+g(m); Where k(m) is the multiplicative error, g(m) is the additive error, t is the current source pulse width, Q is the current source output charge, and m is the adjustable compensation variable.
2. The device according to claim 1, characterized in that The programmable current source adjustment unit includes voltage adjustment or resistance adjustment.
3. The device according to claim 1, characterized in that The programmable current source adjustment unit includes multiple levels of fine adjustment.
4. The device according to claim 1, characterized in that The feedback unit includes a current-to-voltage circuit unit and an ADC circuit unit.
5. A programmable weak charge generation method, characterized in that: The method is implemented by the generating device according to any one of claims 1 to 4, and the method comprises: Preset output charge amount; The FPGA control unit sends a control signal to the programmable current source adjustment unit; Adjusting the actual output charge of the current source by the programmable current source adjustment unit; The actual output charge of the current source is fed back through the feedback unit, and the error between the actual output charge and the preset output charge is compared; If the error exceeds a preset error range, a compensation amount is obtained according to a compensation algorithm, and the FPGA control signal is adjusted according to the compensation amount.
6. The method according to claim 5, characterized in that: The method comprises: Based on the actual transfer function, k(m) is obtained by measuring the actual two sets of current source output charges Q1 and Q2 through any two given pulse widths t1 and t2: k(m)=(Q1-Q2) / (f(t1)-f(t2)); Adjust m=m1 so that k(m1)=1; Given another set of pulse widths t3, measure the actual current source output charge Q3 and obtain g(m1): g(m1)=Q3-Q0; Where Q0 is the theoretical value obtained through the ideal transfer function based on the adjustable variable m1; A compensation amount is obtained, and t3 is adjusted by the compensation amount so that g(m1)=0.
7. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the functions of the device of any one of claims 1 to 4 or the steps of the method of any one of claims 5 to 6 when executing the computer program.
8. A computer-readable storage medium, characterized in that The storage medium stores computer instructions. When a computer reads the computer instructions, the computer executes the steps of the method according to any one of claims 5 to 6.
9. A particle accelerator, characterized in that: The particle accelerator comprises the device according to any one of claims 1-4.
10. A particle therapy system, characterized in that: The particle therapy system comprises the particle accelerator according to claim 9.
Citation Information
Patent Citations
Particle beam irradiation system and charged particle beam correction method
CN103083828A
Multifunctional man-machine interaction type valve control operation method and device
CN116991098A