Programmable weak charge generating device, generating method and related equipment
Through the cooperation of the FPGA control unit and the programmable current source adjustment unit, the compensation algorithm is used to adjust the current source output in real time, which solves the problems of low accuracy of weak charge output and inflexible compensation in the existing technology, and achieves high-precision, adaptive charge control, improving the ease of use and accuracy of the system.
Patent Information
- Application Number
- CN202410604220.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-15
AI Technical Summary
The existing weak charge output has low accuracy and cannot achieve programmable high-precision pC level charge output, and the compensation method is inflexible and cannot adapt to environmental changes.
The FPGA control unit and the programmable current source adjustment unit are used together with the feedback unit to adjust the current source output in real time through the compensation algorithm to achieve high-precision control and adaptive compensation of weak charges.
It improves the accuracy of weak charge output and the ease of use of the system, achieves flexible, fast, and accurate adaptive compensation, meets the demand for high-precision charge output, and reduces time and cost.
Smart Images

Figure CN118557903A
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-emitting 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 be used as constant current outputs, with relatively small amounts of weak current output and relatively low accuracy, and are unable to achieve programmable high-precision pC (picocoulomb) level charge outputs. At the same time, when using circuit systems to simulate charge generation devices, due to the inherent characteristics of the circuits, factory errors of components and other factors, errors exist between the output signals and the target signals. Conventional compensation methods are to add a fixed compensation circuit that cannot be flexibly adjusted, or to compensate through a large amount of test data, which takes a lot of time, and the accuracy cannot meet the requirements. When the operating environment changes, adaptive compensation is not possible. Summary of the invention
[0004] Based on the above problems, the present application provides a programmable weak charge generating device, generating method and related equipment, which improves the accuracy of weak charge output and meets the output requirements of weak charges. 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, which greatly improves the accuracy of weak signal output through FPGA control circuit and compensation method, and the output accuracy reaches at least 1pC charge. The circuit design analysis is combined with the mathematical model to flexibly, conveniently, quickly and accurately adaptively compensate the error of the signal source to achieve 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, the 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 amount 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-tuning.
[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] Regulating the actual output charge amount of the current source by the programmable current source regulating unit;
[0020] The actual output charge amount of the current source is fed back through the feedback unit, and the error between the actual output charge amount and the preset output charge amount 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 comprises:
[0023] By giving the given 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] Among them, 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, by measuring the actual two sets of current source output charges Q1 and Q2 with any two given pulse widths t1 and t2, k(m) is obtained:
[0037] k(m)=(Q1-Q2) / (f(t1)-f(t2));
[0038] Adjust m=m1 so that k(m1)=1;
[0039] Given another set of pulse width 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 through 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 beneficial effects of the present invention include at least: through the cooperation of the FPGA control unit and the programmable current source adjustment unit, the output of the current source can be accurately adjusted according to the real-time feedback signal of the feedback unit to ensure the accuracy and stability of the output charge. The introduction of the compensation algorithm and the compensation amount adjustment mechanism can further eliminate the error and improve the accuracy of the output charge; the programmable control can be realized by the FPGA control unit, and different output currents and pulse widths can be set according to different application requirements, which has high flexibility and configurability; the programmable current source adjustment unit supports voltage adjustment or resistance adjustment, as well as multi-level fine-tuning, which further enhances its adaptability and flexibility; by real-time monitoring of the output charge and pulse width, and comparing with the theoretical value, potential circuit performance problems or faults can be discovered in time; when there is a significant deviation between the actual output and the theoretical output, the adjustment of the compensation amount can be triggered to ensure the stable operation of the circuit. By establishing a prediction model, the output range of the compensation amount can be predicted, and when necessary, the user or maintenance personnel can be reminded to check and repair, which further improves the reliability and maintenance efficiency of the circuit.
[0048] In summary, the programmable weak charge generating 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 is a schematic diagram of the voltage regulation principle of a 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 a programmable current source adjustment unit according to an embodiment of the present invention;
[0053] Figure 5 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 of obtaining a compensation algorithm according to an embodiment of the present invention;
[0055] Figure 7 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 a variety of forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided to make the present invention more comprehensive and complete and to fully convey the concepts of example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar structures, and thus their repeated description 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 regulating 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 accuracy, sufficiently large output resistance, and output current not affected by the load (it can be implemented by 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 a digital signal processing (DSP) function. 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 the 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 adjustment unit and the feedback unit, responsible for receiving and processing signals from these units, and issuing control signals as needed; the FPGA control unit adjusts the control signal in real time based on the compensation algorithm and feedback signal 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: The feedback unit is used to monitor the actual output charge of the current source in real time and send it as a feedback signal to the FPGA control unit. This feedback signal is an important part of the closed-loop control system, enabling the FPGA control unit to dynamically adjust the control signal according to the actual output charge, thereby achieving precise control of the actual output charge of the current source.
[0068] Compensation algorithm: In order to further improve the accuracy and stability of the output charge, a control program based on the compensation algorithm is run in the FPGA control unit; the program calculates the control signal amount that needs to be adjusted based on the feedback signal of 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 regulation unit, and sends a control signal to the regulation 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, and adjusts the output control signal in real time based on the feedback signal and the compensation algorithm, thereby playing the role of adaptive regulation. At the same time, the FPGA realizes switch 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 size 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, an integration circuit), 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 multiple levels of fine adjustment.
[0076] FPGA adjusts the parameters of the programmable current regulation circuit through a digital interface (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) and voltage (V) and resistance (R) is given by Ohm's law: I = V / R; wherein, 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 the 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 a 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 based on 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 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 the 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 calculates or estimates the fine-tuning level that is closest to the current control signal value through an algorithm; the algorithm includes those based on interpolation, linear or nonlinear mapping, etc.; after determining the fine-tuning level, the control unit sends 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, and after receiving the selection signal, the programmable current source regulation unit adjusts its internal circuits or components (such as digital potentiometers, switches, 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 application embodiment provides a programmable weak charge generation method, which is implemented by any of the generation devices described in the present application embodiment, and 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] Regulating the actual output charge amount of the current source by the programmable current source regulating unit;
[0089] The actual output charge amount of the current source is fed back through the feedback unit, and the error between the actual output charge amount and the preset output charge amount 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, which 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 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 component 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, and 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 (that is, the system considers this difference to be unacceptable), the control system will start a compensation algorithm. This compensation algorithm calculates how to adjust the FPGA control signal according to the size and direction of the error to reduce the error; the adjusted FPGA control signal is sent to the programmable current source adjustment unit again, and the current adjustment unit adjusts its output charge again according to the new control signal; the above process will be repeated until the error between the actual charge and the preset charge is reduced to within the preset error range; through the above method, the generation of weak charge can be accurately controlled to meet the requirements for charge accuracy.
[0093] In some embodiments, the step of obtaining the compensation algorithm includes:
[0094] By using given parameters and actual measured values, an ideal output signal and an actual output signal are obtained through a transfer algorithm; 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, which is usually obtained in real time through the feedback loop; the transfer algorithm (including a mathematical model or physical model) calculates the ideal output amount (ideal output signal) based on the given current pulse width; it involves the prediction or modeling of the change of charge over time; while the programmable current source adjustment unit adjusts the output charge of the current source, 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, environmental changes, etc.). The ideal output signal (predicted charge) is compared with the actual output signal (actual charge) to calculate the error between the two. This error can be expressed in the form of charge difference or time difference (such as delay). According to the comparison results, the parameters in the transfer algorithm are adjusted through certain algorithms or strategies; the adjustment of parameters is intended to reduce the error between the ideal output and the actual output. At the same time, the system will calculate a compensation amount, which is used to add or subtract a correction value in 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 considered. The control signal is 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 collect 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 adjustments to 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 the circuit structure; establish a circuit model based on the ideal transfer function obtained through 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] Among them, 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 representing an ideal model of charge changing with time.
[0109] The actual transfer function takes into account the errors existing in the actual system, which 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 measurement and error analysis, the multiplicative error k(m) and the additive error g(m) can be determined. These errors may come from hardware imperfections, changes in environmental conditions, aging effects, etc. The system calculates these error terms by comparing the ideal output and the actual output; after determining the multiplicative error and the additive error, the system can calculate the compensation amount; the goal of the compensation amount is to adjust the actual transfer function to make it closer to the ideal transfer function; it involves adjusting the adjustable compensation variable m to minimize the difference between the actual output and the ideal output. By adjusting the adjustable compensation variable m, the system can modify the multiplicative error k(m) and the additive error g(m), thereby changing the actual transfer function. When the compensation amount is applied correctly, the actual transfer function will be closer to the ideal transfer function, thereby reducing the difference between the actual output and the ideal output.
[0111] The effect of the above technical solution is: by compensating the multiplicative error k(m) and the additive error g(m), the output charge of the current source can be more accurately controlled to make it closer to the ideal value, thereby improving the output accuracy of the system, especially in applications requiring high-precision charge control. The introduction of the compensation amount can effectively reduce the system output fluctuation caused by factors such as hardware imperfections, environmental changes or aging effects. By adjusting the adjustable compensation variable m, the system can automatically correct the error to maintain stable output performance. The compensation algorithm can adjust the control signal in real time to quickly respond to changes in the system output, which helps to reduce the system response time and improve the dynamic performance of the system. Through the compensation algorithm, the system can automatically detect and correct potential faults or errors, thereby improving the reliability and reliability of the system. Even in the face of complex working environments and operating conditions, the system can maintain stable performance; the compensation algorithm can simplify the process of system debugging. Since the compensation amount is obtained through actual measurement and calculation, it is easier to find and solve the difference between the system output and the expected output. In addition, the compensation algorithm can also reduce the complexity of system maintenance, reduce 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, which can improve the accuracy, stability, dynamic performance and reliability of the system, simplify the system debugging and maintenance process, expand the scope of system application, and realize intelligent control.
[0113] In some embodiments, the method comprises:
[0114] Based on the actual transfer function, by measuring the actual two sets of current source output charges Q1 and Q2 with any two given pulse widths t1 and t2, k(m) is obtained:
[0115] k(m)=(Q1-Q2) / (f(t1)-f(t2));
[0116] Adjust m=m1 so that k(m1)=1;
[0117] Given another set of pulse width 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 through 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 groups of 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 value Q0 at t3:
[0130] Calculate the additive error g(m1): Calculate the compensation amount based on the additive error g(m1). The goal of the compensation amount 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 to the control signal as an adjustment to correct the actual output.
[0132] The compensation amount may be a value equal in magnitude but opposite in sign to g(m1) and is used 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: through the k(m) value obtained by actual measurement and calculation, the output characteristics of the current source can be accurately calibrated to ensure that the charge amounts Q1 and Q2 output by the current source match the actual needs at different times t1 and t2; when a new pulse width t3 is given, by measuring the actual current source output charge Q3 and comparing it 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, and the compensation amount can be obtained; the pulse width t3 is adjusted using this compensation amount so that g(m1) is equal to 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 of compensation amount, corresponding environmental data and usage time of circuit components;
[0139] Establishing a prediction model through 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 are reminded to check and repair the circuit.
[0142] The working principle of the above technical solution is as follows: first, collect historical data of compensation amount, collect environmental data corresponding to these time points, such as temperature, humidity, pressure, etc., which may affect the performance of the circuit. Record the usage time of circuit components, because the aging of components will affect the output and stability of the circuit; using the collected historical data, environmental data and component usage time, the system establishes a prediction model; this model can analyze the correlation and trend between data, and predict the output range of compensation amount at a certain time point or condition in the future; the prediction model may use machine learning algorithms, statistical analysis methods or physical models, etc., depending on the characteristics of the data and the needs of the system.
[0143] Within a preset time period, the adjustment frequency of the compensation amount is counted; this statistical value reflects the degree of circuit dependence on the compensation amount within a period of time, that is, the stability of circuit performance, wherein 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, this 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 is 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 sound alarm, screen display, email or text message, etc.
[0147] After the user or maintenance personnel inspects and repairs the circuit according to 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 have beam-emitting conditions, and to test the function and performance of the dose monitoring system, wherein the dose monitoring system is used to monitor the dose and position of the particle beam.
[0150] An embodiment of the present application also provides a particle therapy system, which includes the aforementioned particle accelerator for providing a particle beam, a dose monitoring system and a rotating frame. The particle accelerator is installed on the rotating frame and can be driven by the rotating frame to rotate relative to the patient, thereby realizing the 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, the steps of any method described in the embodiments of the present application or the functions of the device described in the embodiments of the present application are implemented.
[0152] The embodiments of the present application also provide a computer-readable storage medium, which is used to store 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 recorded in the above method embodiments, and some contents will not be repeated here.
[0153] In the present application, a readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. A program product can adopt 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, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. 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 of the above.
[0154] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium may also be any readable medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or for use in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above. The program code for performing the operation of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as C language or similar programming languages. The program code may be executed entirely on a user computing device, partially on an associated device, as an independent software package, partially on a user computing device, 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 is to be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, substitute 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 should 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 amount of the current source.
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; Regulating the actual output charge amount of the current source by the programmable current source regulating unit; The actual output charge amount of the current source is fed back through the feedback unit, and the error between the actual output charge amount and the preset output charge amount 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 step of obtaining the compensation algorithm comprises: By giving the given parameters and actual measurements, the ideal output signal and the actual output signal are obtained through the transfer algorithm; The corresponding parameters of the transfer algorithm and the compensation amount are obtained through the ideal output signal and the actual output signal.
7. The method according to claim 6, characterized in that: The transfer algorithm includes an ideal transfer function and an actual transfer function, and the method includes: 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; The actual transfer function is converted into an ideal transfer function through the compensation amount.
8. The method according to claim 7, characterized in that: The actual error includes multiplicative error and additive error; the ideal transfer signal is: Q = f(t); The actual transfer function is: Q = k(m)*f(t)+g(m); Among them, 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.
9. The method according to claim 8, characterized in that: The method comprises: Based on the actual transfer function, by measuring the actual two sets of current source output charges Q1 and Q2 with any two given pulse widths t1 and t2, k(m) is obtained: k(m)=(Q1-Q2) / (f(t1)-f(t2)); Adjust m=m1 so that k(m1)=1; Given another set of pulse width 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.
10. An electronic device, characterized in that: The electronic device comprises 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 9 when executing the computer program.
11. A computer-readable storage medium, characterized in that: The storage medium stores computer instructions, and when a computer reads the computer instructions, the computer executes the steps of any one of the methods of claims 5-9.
12. A particle accelerator, characterized in that: The particle accelerator comprises the device according to any one of claims 1-4.
13. A particle therapy system, characterized in that: The particle therapy system comprises the particle accelerator of claim 12.
Citation Information
Patent Citations
Particle beam irradiation system and charged particle beam correction method
CN103083828A
Weak charge correction system
CN108226840A
Medical accelerator dose monitoring method and device, system and equipment
CN110361766A
Multifunctional man-machine interaction type valve control operation method and device
CN116991098A
Self-adaptive power supply micro-control system
CN210431229U
Cited By
Ion source automatic beam adjusting method, radiotherapy system and related equipment
CN121102774A
