Voltage monitoring method and system and computer readable storage medium
By correcting the gain and offset errors of the analog-to-digital converter, the problem of low measurement accuracy in server voltage monitoring is solved and the security and stability of the system are improved.
Patent Information
- Application Number
- CN202411030561.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-18
AI Technical Summary
In existing server voltage monitoring technology, the analog-to-digital converter (ADC) has low voltage measurement accuracy due to factors such as resistance tolerance and temperature effects, which may cause false triggering of system operations and affect the safety and stability of server operations.
By correcting the actual conversion gain of the analog-to-digital converter, the gain error and offset error are determined for different sampling conditions, and adjustments and compensations are made to improve the accuracy of voltage measurement.
It improves the voltage measurement accuracy of the server system, avoids false triggering of operations, and enhances the safety and stability of the system.
Smart Images

Figure CN118795216A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of servers, and in particular to a voltage monitoring method, system and computer-readable storage medium. Background Art
[0002] As a computer device, the server needs to maintain stable operation because it undertakes key business processing, data storage and transmission tasks. The hardware components in the server, such as the CPU (Central Processing Unit), memory, hard disk, etc., have their normal working voltage range. If the voltage is too high or too low, these components may be damaged or even permanently damaged. By monitoring the output voltage of the PSU (Power Supply Unit) in the server, it can be ensured that the hardware components operate within the appropriate voltage range, thereby protecting the server hardware from damage. At present, the technology for monitoring voltage in the server mainly includes ADC (Analog-to-Digital Converter). ADC has the advantages of high precision, flexibility and fast response. It converts analog voltage signals into digital signals to process and analyze these voltage data and perform corresponding operations. Since there may be influencing factors such as resistance tolerance, ADC accuracy limitation, temperature influence, etc. in the actual circuit, which will interfere with the analog voltage signal and affect the conversion accuracy of ADC, the voltage measurement accuracy is low. Incorrect voltage data may cause false triggering of system operations and affect the operation safety of the server.
[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the invention
[0004] The object of the present invention is to provide a voltage monitoring method, system and computer-readable storage medium, which can correct the actual conversion gain of the analog-to-digital converter, compensate for the non-zero output of the analog-to-digital converter at zero input, improve the accuracy of voltage measurement, and thus improve the safety and stability of server system operation.
[0005] In order to solve the above technical problems, the present invention provides a voltage monitoring method, comprising:
[0006] Determine a current sampling condition of the circuit to be tested in the server, and obtain a current gain error and a current offset error corresponding to the current sampling condition;
[0007] Acquire an actual voltage signal of the circuit under test under the current sampling condition;
[0008] The actual voltage signal is adjusted by the current gain error to obtain an intermediate voltage signal, so as to correct the actual conversion gain of the analog-to-digital converter;
[0009] The intermediate voltage signal and the current offset error are added to obtain a current sampled voltage signal and transmitted to the analog-to-digital converter, so that the analog-to-digital converter performs analog-to-digital conversion on the current sampled voltage signal to obtain a current digital voltage signal.
[0010] Wherein, the voltage monitoring method further includes:
[0011] Predetermine multiple sampling conditions to be selected;
[0012] For each sampling condition to be selected, determining a reference gain error and a reference offset error corresponding to the sampling condition to be selected, wherein the reference gain error and the reference offset error minimize the error between the digital voltage signal and the expected voltage signal of the circuit to be tested under the sampling condition to be selected;
[0013] Establishing a calibration relationship based on each of the selected sampling conditions and its corresponding reference gain error and reference offset error;
[0014] The process of obtaining the current gain error and the current offset error corresponding to the current sampling condition includes:
[0015] The current sampling condition is matched in the calibration relationship, a target selected sampling condition matching the current sampling condition is determined, a reference gain error corresponding to the target selected sampling condition is used as the current gain error, and the reference offset error corresponding to the target selected sampling condition is used as the current offset error.
[0016] Among them, for each sampling condition to be selected, the process of determining the reference gain error and the reference offset error corresponding to the sampling condition to be selected includes:
[0017] For each of the sampling conditions to be selected, determining a first step length factor corresponding to the gain error and a second step length factor corresponding to the offset error;
[0018] Adjusting the actual voltage signal of the circuit under test under the selected sampling condition to obtain a sampled voltage signal based on the gain error and the offset error corresponding to the i-th error optimization operation, and obtaining a digital voltage signal obtained after the analog-to-digital converter performs analog-to-digital conversion on the sampled voltage signal, i=1, 2, ...;
[0019] Acquire an error voltage signal between the digital voltage signal and an expected voltage signal corresponding to the selected sampling condition;
[0020] Determining whether the error voltage signal satisfies a minimum error condition;
[0021] If yes, the gain error corresponding to the i-th error optimization operation is determined as the reference gain error corresponding to the sampling condition to be selected, and the offset error corresponding to the i-th error optimization operation is determined as the reference offset error corresponding to the sampling condition to be selected;
[0022] If not, the gain error corresponding to the i-th error optimization operation is adjusted based on the first step size factor to obtain the gain error corresponding to the i+1-th error optimization operation, and the offset error corresponding to the error optimization operation is adjusted based on the second step size factor to obtain the offset error corresponding to the i+1-th error optimization operation.
[0023] The process of adjusting the gain error corresponding to the i-th error optimization operation based on the first step length factor to obtain the gain error corresponding to the i+1-th error optimization operation includes:
[0024] Establishing a first relationship based on the first step length factor, the gain error corresponding to the i-th error optimization operation, the error voltage signal corresponding to the i-th error optimization operation, and the actual voltage signal corresponding to the i-th error optimization operation;
[0025] The gain error corresponding to the (i+1)th error optimization operation is obtained according to the first relationship.
[0026] Among them, the first relationship is gain(i+1)=gain(i)+ρ1×μ1×e(i)×Vin(i), wherein gain(i+1) is the gain error corresponding to the i+1th error optimization operation, gain(i) is the gain error corresponding to the i-th error optimization operation, ρ1 is the first adjustment coefficient, μ1 is the first step length factor, e(i) is the error voltage signal corresponding to the i-th error optimization operation, and Vin(i) is the actual voltage signal corresponding to the i-th error optimization operation.
[0027] The process of adjusting the offset error corresponding to the error optimization operation based on the second step factor and the offset error corresponding to the (i+1)th error optimization operation includes:
[0028] Establishing a second relationship based on the second step factor, the offset error corresponding to the i-th error optimization operation, the error voltage signal and a preset bias coefficient;
[0029] The offset error corresponding to the (i+1)th error optimization operation is obtained according to the second relationship.
[0030] Among them, the second relationship is offest(i+1)=offest(i)+ρ2×μ2×e(i)×j, wherein offest(i+1) is the offset error corresponding to the i+1th error optimization operation, offest(i) is the offset error corresponding to the i-th error optimization operation, ρ2 is the second adjustment coefficient, μ2 is the second step factor, e(i) is the error voltage signal corresponding to the i-th error optimization operation, and j is the preset bias coefficient.
[0031] Wherein, after the analog-to-digital converter performs analog-to-digital conversion on the current sampled voltage signal to obtain a current digital voltage signal, the voltage monitoring method further includes:
[0032] Acquiring voltage change information based on the current digital voltage signal;
[0033] Determining whether the voltage change information satisfies an adjustment condition;
[0034] If so, adjust the sampling parameters of the analog-to-digital converter, the sampling parameters including resolution and / or resolution.
[0035] In order to solve the above technical problems, the present invention further provides a voltage monitoring system, comprising:
[0036] A sampling component, used to obtain an actual voltage signal of a circuit under test in a server under a current sampling condition;
[0037] A filtering component, used to determine the current sampling condition of the circuit to be tested, obtain a current gain error and a current offset error corresponding to the current sampling condition, adjust the actual voltage signal by the current gain error to obtain an intermediate voltage signal to correct the actual conversion gain of the analog-to-digital converter, add the intermediate voltage signal and the current offset error to obtain a current sampling voltage signal and transmit it to the analog-to-digital converter;
[0038] The analog-to-digital converter is used to perform analog-to-digital conversion on the current sampled voltage signal to obtain a current digital voltage signal.
[0039] To solve the above technical problems, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the voltage monitoring method as described in any one of the above are implemented.
[0040] The present invention provides a voltage monitoring method, which adjusts the actual voltage signal by the current gain error corresponding to the current sampling condition to obtain an intermediate voltage signal, so as to correct the actual conversion gain of the analog-to-digital converter to achieve the ideal conversion gain, and then uses the sum of the current offset error and the intermediate voltage signal as the current sampling signal to compensate for the non-zero output of the analog-to-digital converter at zero input, inputs the current sampling signal into the analog-to-digital converter, and obtains the current digital voltage signal by analog-to-digital conversion by the analog-to-digital converter with higher accuracy, improves the accuracy of voltage measurement, avoids mis-triggering of operations in the server system, and improves the safety and stability of the operation of the server system. The present invention also provides a voltage monitoring system and a computer-readable storage medium, which have the same beneficial effects as the above-mentioned voltage monitoring method. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 A flow chart of the steps of a voltage monitoring method provided by the present invention;
[0043] Figure 2 A flow chart of calculating an error voltage signal provided by the present invention;
[0044] Figure 3 A flow chart for obtaining an iterative gain value provided by the present invention;
[0045] Figure 4 A schematic diagram of the structure of a voltage monitoring device provided by the present invention;
[0046] Figure 5 A schematic diagram of the structure of a voltage monitoring system provided by the present invention;
[0047] Figure 6 A schematic diagram of the structure of an electronic device provided by the present invention;
[0048] Figure 7 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0049] The core of the present invention is to provide a voltage monitoring method, system and computer-readable storage medium, which can correct the actual conversion gain of the analog-to-digital converter, compensate for the non-zero output of the analog-to-digital converter at zero input, improve the accuracy of voltage measurement, and thus improve the safety and stability of the server system operation.
[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] First, please refer to Figure 1 , Figure 1 A flow chart of the steps of a voltage monitoring method provided by the present invention, the voltage monitoring method comprising:
[0052] S101: Determine a current sampling condition of a circuit to be tested in a server, and obtain a current gain error and a current offset error corresponding to the current sampling condition;
[0053] It is understandable that since the ADC voltage monitoring method is easily affected by noise and other interference factors, errors will occur when the ADC converts the analog voltage signal into a digital signal. The error sources of the ADC are analyzed and the error sources mainly include:
[0054] Offset Error: Offset error refers to the situation where the output value of the ADC is not zero when the input is zero. That is, when the analog input signal is zero, the output of the ADC may also be a non-zero value. This is caused by factors such as the asymmetry of the ADC's internal circuit, temperature effects, or power supply voltage fluctuations.
[0055] Gain Error: Gain error refers to the difference between the actual conversion gain of the ADC and the ideal conversion gain. Ideally, the conversion gain of the ADC should be linear, that is, the digital output is proportional to the analog input. However, due to factors such as the manufacturing process, temperature effects, or power supply voltage fluctuations, the actual gain may differ from the ideal value.
[0056] Nonlinearity Error: Nonlinearity error refers to the phenomenon that the conversion characteristics of the ADC are not completely linear. Ideally, the output of the ADC should be a linear function of the analog input. However, due to the nonlinearity of the ADC's internal circuit, temperature effects or other factors, the actual conversion characteristics may deviate from linearity.
[0057] In this embodiment, there are multiple circuits to be tested in the server, and the circuits to be tested are circuits in the server that need to be voltage monitored, including but not limited to the voltage output circuit of the PSU (Power Supply Unit). Due to the environmental factors of the server (such as the wiring, temperature, and resistance of the sampling resistor in the server), or the current sampling requirements, or the influence of factors such as the user on the sampling accuracy, the sampling conditions when sampling the voltage signal of the circuit to be tested are different. Under different sampling conditions, the correction conditions of the actual input signal need to be adaptively adjusted. In order to reduce the error that occurs when the ADC converts the analog voltage signal into a digital signal, this embodiment first obtains the current gain error and the current offset error under different sampling conditions, so as to compensate for the error that occurs when the ADC converts the analog voltage signal into a digital signal through the current gain error and the current offset error.
[0058] S102: Acquire the actual voltage signal of the circuit to be tested under the current sampling condition;
[0059] The actual voltage signal is an analog voltage signal.
[0060] S103: adjusting the actual voltage signal by the current gain error to obtain an intermediate voltage signal, so as to correct the actual conversion gain of the analog-to-digital converter;
[0061] S104: Add the intermediate voltage signal and the current offset error to obtain a current sampled voltage signal and transmit the signal to the analog-to-digital converter, so that the analog-to-digital converter performs analog-to-digital conversion on the current sampled voltage signal to obtain a current digital voltage signal.
[0062] In this embodiment, after determining the current gain error and the current offset error, the actual voltage signal of the circuit to be tested under the current sampling condition is collected. The collection method can be performed by means of a voltage divider resistor to convert the voltage signal on the circuit to be tested into an actual voltage signal. The voltage range of the actual voltage signal meets the sampling requirement range of the ADC.
[0063] The actual voltage signal is adjusted by obtaining the current gain error and the current offset error to obtain a sampled voltage signal. Specifically, the current gain error, the current offset error and the actual voltage signal are input into a pre-established linear error model to obtain a sampled voltage signal, wherein the linear error model is V_out=gain×V_in+offset, V_in is the actual voltage signal, V_out is the ADC reading, that is, the value output after the algorithm calculates, gain is the gain error, which indicates the difference between the ADC gain and the ideal gain, and offset is the offset error, which indicates the non-zero output of the ADC at zero input.
[0064] It can be seen that in this embodiment, the actual voltage signal is adjusted by the current gain error corresponding to the current sampling condition to obtain an intermediate voltage signal, so as to correct the actual conversion gain of the analog-to-digital converter to achieve the ideal conversion gain, and then the sum of the current offset error and the intermediate voltage signal is used as the current sampling signal to compensate for the non-zero output of the analog-to-digital converter at zero input, and the current sampling signal is input into the analog-to-digital converter. The analog-to-digital converter performs analog-to-digital conversion to obtain a current digital voltage signal with higher accuracy, thereby improving the accuracy of voltage measurement, avoiding false triggering of operations in the server system, and improving the safety and stability of the server system operation.
[0065] Based on the above embodiments:
[0066] In an exemplary implementation, the voltage monitoring method further includes:
[0067] Predetermine multiple sampling conditions to be selected;
[0068] For each sampling condition to be selected, determining a reference gain error and a reference offset error corresponding to the sampling condition to be selected, wherein the reference gain error and the reference offset error minimize the error between the digital voltage signal and the expected voltage signal of the circuit to be tested under the sampling condition to be selected;
[0069] Establishing a calibration relationship based on each selected sampling condition and its corresponding reference gain error and reference offset error;
[0070] The process of obtaining the current gain error and the current offset error corresponding to the current sampling condition includes:
[0071] The current sampling condition is matched in the calibration relationship, a target sampling condition matching the current sampling condition is determined, a reference gain error corresponding to the target sampling condition is used as the current gain error, and a reference offset error corresponding to the target sampling condition is used as the current offset error.
[0072] In this embodiment, multiple sampling conditions to be selected can be determined in advance, and the filter training and optimization are performed for each sampling condition to be selected. The reference gain error and the reference offset error minimize the error between the digital voltage signal and the expected voltage signal of the circuit to be tested under the selected sampling condition. The correspondence between each sampling condition and the gain error and the offset error is determined. The correspondence can be expressed in the form of a table or a curve, which can be selected according to the actual engineering needs.
[0073] After the current sampling condition is acquired, a match is directly performed in the calibration relationship to obtain the reference gain and the offset gain, thereby improving the processing efficiency.
[0074] In an exemplary implementation, for each sampling condition to be selected, the process of determining the reference gain error and the reference offset error corresponding to the sampling condition to be selected includes:
[0075] For each sampling condition to be selected, determining a first step length factor corresponding to the gain error and a second step length factor corresponding to the offset error;
[0076] Based on the gain error and offset error corresponding to the i-th error optimization operation, the actual voltage signal of the circuit under test under the selected sampling condition is adjusted to obtain a sampled voltage signal, and a digital voltage signal is obtained after the analog-to-digital converter performs analog-to-digital conversion on the sampled voltage signal, i=1,2,...;
[0077] Acquire an error voltage signal between the digital voltage signal and an expected voltage signal corresponding to the selected sampling condition;
[0078] Determine whether the error voltage signal meets the minimum error condition;
[0079] If yes, the gain error corresponding to the i-th error optimization operation is determined as the reference gain error corresponding to the sampling condition to be selected, and the offset error corresponding to the i-th error optimization operation is determined as the reference offset error corresponding to the sampling condition to be selected;
[0080] If not, the gain error corresponding to the i-th error optimization operation is adjusted based on the first step size factor to obtain the gain error corresponding to the i+1-th error optimization operation, and the offset error corresponding to the error optimization operation is adjusted based on the second step size factor to obtain the offset error corresponding to the i+1-th error optimization operation.
[0081] In this embodiment, the filter coefficients (gain and offset) are updated through iteration to minimize the error signal e(i). The error signal e(i) is defined as the difference between the expected signal d(i) (which is a known true digital representation) and the output V(out): e(i)=d(i)−Vout(i). The step factor (μ) is introduced. In the iteration of the algorithm, the step factor μ is used to control the step size of the filter coefficient update. The values of the first step factor and the second step factor corresponding to the offset error and the gain error can be the same or different. A larger μ value will result in a faster convergence speed, while a smaller μ value can ensure the stability of the algorithm. When updating gain and offset, the first relationship and the second relationship are used to update the offset error and gain error, respectively, where the first relationship is:
[0082] gain(i+1)=gain(i)+ρ1μ1×e(i)×Vin(i);
[0083] Here, i represents the number of iterations, gain(i) is the gain value at the i-th iteration, and gain(i+1) is the updated gain value.
[0084] Similarly, for offset, the second relation is:
[0085] offest(i+1)=offest(i)+ρ2×μ2×e(i)×j;
[0086] Part of the input signal Vin(i) will be replaced by a constant j (such as 1) because offset is a bias term that is independent of the input signal.
[0087] It can be understood that the two factors ρ1μ1 and ρ2×μ2 contain the step size factor μ and are multiplied by the coefficient ρ1 or ρ2. ρ1 or ρ2 can be set to 2, or a larger number can be used for faster step sizes. This factor together with the step size factor determines the magnitude of the gain update at each iteration. e(i)×Vin(i) is the product of the error signal and the input signal. In the algorithm, this product term is used to calculate the gradient estimate, which indicates how to adjust the gain based on the current error and input signal. Specifically, when the error signal and the input signal are of the same sign (that is, they have the same sign), the gain will be adjusted in the direction of reducing the error; when they are of different signs, the gain will be adjusted in the direction of increasing the error. Multiplying ρ1μ1 and e(i)×Vin(i) gives the gain update amount at each iteration. This update amount is added to the current gain value to obtain a new gain value gain(i+1). By continuously iterating the above process, the algorithm will gradually adjust the values of gain and offset to minimize the error signal e(i). The optimal value of e(i) is 0. In each iteration, we will update the gain and offset in an iterative manner according to the current error signal and input signal, so that the reference offset error and reference gain error under the final selected sampling condition can be more accurate, so that the sampled voltage signal is close to the expected voltage signal, thereby reducing the conversion error of the ADC.
[0088] In summary, refer to Figure 2 As shown, Figure 2 A flow chart of calculating an error voltage signal provided by the present invention, Figure 3 The present invention provides a flowchart for obtaining an iterative gain value. The error signal multiplied by the actual measured input signal represents the gain value, which represents the coefficient relationship between the output value and the current real input signal. The optimization process of offes error and Figure 3 Similarly, Vin(i) can be replaced by the preset bias coefficient.
[0089] As an optional embodiment, after obtaining the reference gain error and reference offset error under each sampling condition to be selected, the present invention establishes a linear error model corresponding to each sampling condition to be selected. For example, under the first sampling condition to be selected, the corresponding linear error model is V_out=gain1×V_in+offset1, and under the second sampling condition to be selected, the corresponding linear error model is V_out=gain2×V_in+offset2. After determining the current working condition, the corresponding linear error model is directly called to calculate the sampled voltage signal, thereby further improving the sampling efficiency and accuracy. Furthermore, each of the above linear error models can be deployed in the BMC (Baseboard Management Controller). Each time the voltage of the circuit to be tested is monitored, the corresponding linear error model is used to calibrate the input value, and then the output is the optimized data. In an exemplary implementation, after the current sampling voltage signal is converted into a digital signal by an analog-to-digital converter to obtain the current digital voltage signal, the voltage monitoring method also includes:
[0090] Acquiring voltage change information based on the current digital voltage signal;
[0091] Determine whether the voltage change information meets the adjustment conditions;
[0092] If so, the sampling parameters of the analog-to-digital converter are adjusted, the sampling parameters including resolution and / or resolution.
[0093] It can be understood that when the ADC readings are processed in real time, the performance of the filter under different sampling rates and resolutions can be observed. If it is found that the sampling rate is too high, resulting in excessive consumption of system resources, or the resolution is too high, resulting in increased quantization noise, the sampling rate or resolution is gradually reduced, and the performance changes of the filter are observed. According to the performance changes of the filter, the sampling rate and resolution are gradually adjusted until the optimal setting that meets the requirements is found. Specifically, this embodiment can automatically adjust the sampling parameters of the ADC, such as sampling rate, resolution, etc., according to the current environment and working conditions to optimize the accuracy of voltage measurement. For example, when a large voltage fluctuation is detected, the sampling rate is increased to obtain more detailed voltage change information. When the voltage is stable, the sampling rate can be reduced to reduce power consumption.
[0094] In summary, the present invention has digital signal processing technology to reduce noise and interference in analog signals, thereby improving the conversion accuracy of ADC. The filter parameters can be automatically adjusted according to the characteristics of the signal to achieve the best noise reduction effect, and the linearity error of the ADC can be compensated. By calibrating at different voltage points and establishing corresponding calibration curves or tables, the algorithm can automatically apply these calibration data during the conversion process, thereby improving the accuracy of voltage measurement.
[0095] Second, please refer to Figure 4 The present invention also provides a voltage monitoring device, comprising:
[0096] Determination module 01, used to determine the current sampling working condition of the circuit to be tested in the server, and obtain the current gain error and the current offset error corresponding to the current sampling working condition;
[0097] The acquisition module 02 is used to obtain the actual voltage signal of the circuit under test under the current sampling condition;
[0098] A first calculation module 03, used for adjusting the actual voltage signal by the current gain error to obtain an intermediate voltage signal, so as to correct the actual conversion gain of the analog-to-digital converter;
[0099] The second calculation module 04 is used to add the intermediate voltage signal and the current offset error to obtain a current sampled voltage signal and transmit it to the analog-to-digital converter, so that the analog-to-digital converter performs analog-to-digital conversion on the current sampled voltage signal to obtain a current digital voltage signal.
[0100] In an exemplary implementation, the voltage monitoring system further includes a preprocessing module, configured to:
[0101] Predetermine multiple sampling conditions to be selected;
[0102] For each sampling condition to be selected, determining a reference gain error and a reference offset error corresponding to the sampling condition to be selected, wherein the reference gain error and the reference offset error minimize the error between the digital voltage signal and the expected voltage signal of the circuit to be tested under the sampling condition to be selected;
[0103] Establishing a calibration relationship based on each selected sampling condition and its corresponding reference gain error and reference offset error;
[0104] The process of obtaining the current gain error and the current offset error corresponding to the current sampling condition includes:
[0105] The current sampling condition is matched in the calibration relationship, a target sampling condition matching the current sampling condition is determined, a reference gain error corresponding to the target sampling condition is used as the current gain error, and a reference offset error corresponding to the target sampling condition is used as the current offset error.
[0106] In an exemplary implementation, for each sampling condition to be selected, the process of determining the reference gain error and the reference offset error corresponding to the sampling condition to be selected includes:
[0107] For each sampling condition to be selected, determining a first step length factor corresponding to the gain error and a second step length factor corresponding to the offset error;
[0108] Based on the gain error and offset error corresponding to the i-th error optimization operation, the actual voltage signal of the circuit under test under the selected sampling condition is adjusted to obtain a sampled voltage signal, and a digital voltage signal is obtained after the analog-to-digital converter performs analog-to-digital conversion on the sampled voltage signal, i=1,2,...;
[0109] Acquire an error voltage signal between the digital voltage signal and an expected voltage signal corresponding to the selected sampling condition;
[0110] Determine whether the error voltage signal meets the minimum error condition;
[0111] If yes, the gain error corresponding to the i-th error optimization operation is determined as the reference gain error corresponding to the sampling condition to be selected, and the offset error corresponding to the i-th error optimization operation is determined as the reference offset error corresponding to the sampling condition to be selected;
[0112] If not, the gain error corresponding to the i-th error optimization operation is adjusted based on the first step size factor to obtain the gain error corresponding to the i+1-th error optimization operation, and the offset error corresponding to the error optimization operation is adjusted based on the second step size factor to obtain the offset error corresponding to the i+1-th error optimization operation.
[0113] In an exemplary implementation, the process of adjusting the gain error corresponding to the i-th error optimization operation based on the first step length factor to obtain the gain error corresponding to the (i+1)-th error optimization operation includes:
[0114] Establishing a first relationship based on the first step length factor, the gain error corresponding to the i-th error optimization operation, the error voltage signal corresponding to the i-th error optimization operation, and the actual voltage signal corresponding to the i-th error optimization operation;
[0115] The gain error corresponding to the (i+1)th error optimization operation is obtained according to the first relational expression.
[0116] In an exemplary implementation, the first relationship is gain(i+1)=gain(i)+ρ1×μ1×e(i)×Vin(i), wherein gain(i+1) is the gain error corresponding to the i+1th error optimization operation, gain(i) is the gain error corresponding to the i-th error optimization operation, ρ1 is the first adjustment coefficient, μ1 is the first step length factor, e(i) is the error voltage signal corresponding to the i-th error optimization operation, and Vin(i) is the actual voltage signal corresponding to the i-th error optimization operation.
[0117] In an exemplary implementation, the offset error corresponding to the error optimization operation is adjusted based on the second step size factor, and the process of adjusting the offset error corresponding to the (i+1)th error optimization operation includes:
[0118] Establishing a second relationship based on the second step factor, the offset error corresponding to the i-th error optimization operation, the error voltage signal and the preset bias coefficient;
[0119] The offset error corresponding to the (i+1)th error optimization operation is obtained according to the second relational expression.
[0120] In an exemplary implementation, the second relationship is offest(i+1)=offest(i)+ρ2×μ2×e(i)×j, where offest(i+1) is the offset error corresponding to the i+1th error optimization operation, offest(i) is the offset error corresponding to the ith error optimization operation, ρ2 is the second adjustment coefficient, μ2 is the second step factor, e(i) is the error voltage signal corresponding to the ith error optimization operation, and j is the preset bias coefficient.
[0121] In an exemplary implementation, the voltage monitoring system also includes an adjustment module for obtaining voltage change information based on the current digital voltage signal, determining whether the voltage change information meets the adjustment conditions, and if so, adjusting the sampling parameters of the analog-to-digital converter, the sampling parameters including resolution and / or resolution.
[0122] Third, please refer to Figure 5 The present invention also provides a voltage monitoring system, comprising:
[0123] The sampling component 11 is used to obtain the actual voltage signal of the circuit under test under the current sampling condition;
[0124] The filter component 12 is used to determine the current sampling condition of the circuit to be tested in the server, obtain the current gain error and the current offset error corresponding to the current sampling condition, adjust the actual voltage signal by the current gain error to obtain the intermediate voltage signal to correct the actual conversion gain of the analog-to-digital converter, add the intermediate voltage signal and the current offset error to obtain the current sampling voltage signal and transmit it to the analog-to-digital converter;
[0125] The analog-to-digital converter 13 is used to perform analog-to-digital conversion on the current sampled voltage signal to obtain a current digital voltage signal.
[0126] In this embodiment, the sampling component may be composed of a first resistor R1 and a second resistor R2.
[0127] For an introduction to a voltage monitoring system provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.
[0128] A voltage monitoring system provided by the present invention has the same beneficial effects as the voltage monitoring method described in the above embodiment.
[0129] Fourth, please refer to Figure 6The present invention also provides an electronic device, comprising:
[0130] A memory 21, used for storing computer programs;
[0131] The processor 22 is configured to implement the steps of the voltage monitoring method described in any one of the above embodiments when executing a computer program.
[0132] The electronic device also includes:
[0133] The input interface 23 is connected to the processor 22 via the communication bus 26, and is used to obtain the computer programs, parameters and instructions imported from the outside, and save them in the memory 21 under the control of the processor 22. The input interface can be connected to an input device to receive parameters or instructions manually input by the user. The input device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the terminal housing.
[0134] The display unit 24 is connected to the processor 22 via the communication bus 26 and is used to display the data sent by the processor 22. The display unit can be a liquid crystal display or an electronic ink display.
[0135] The network port 25 is connected to the processor 22 via the communication bus 26, and is used to communicate with various external terminal devices. The communication technology used in the communication connection can be a wired communication technology or a wireless communication technology, such as mobile high-definition link technology, universal serial bus, high-definition multimedia interface, wireless fidelity technology, Bluetooth communication technology, low-power Bluetooth communication technology, communication technology based on IEEE802.11s, etc.
[0136] For an introduction to an electronic device provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.
[0137] The electronic device provided by the present invention has the same beneficial effects as the voltage monitoring method described in the above embodiment.
[0138] Fifth, please refer to Figure 7 The present invention further provides a computer-readable storage medium 30, on which a computer program 31 is stored. When the computer program 31 is executed by a processor, the steps of the voltage monitoring method described in any one of the above embodiments are implemented.
[0139] The computer-readable storage medium 30 may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0140] For an introduction to a computer-readable storage medium provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.
[0141] A computer-readable storage medium provided by the present invention has the same beneficial effects as the voltage monitoring method described in the above embodiment.
[0142] In a sixth aspect, the present invention further provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the voltage monitoring method described in any one of the embodiments above.
[0143] For an introduction to a computer program product provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.
[0144] A computer program product provided by the present invention has the same beneficial effects as the voltage monitoring method described in the above embodiment.
[0145] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0146] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A voltage monitoring method, characterized in that: include: Determine a current sampling condition of the circuit to be tested in the server, and obtain a current gain error and a current offset error corresponding to the current sampling condition; Acquire an actual voltage signal of the circuit under test under the current sampling condition; The actual voltage signal is adjusted by the current gain error to obtain an intermediate voltage signal, so as to correct the actual conversion gain of the analog-to-digital converter; The intermediate voltage signal and the current offset error are added to obtain a current sampled voltage signal and transmitted to the analog-to-digital converter, so that the analog-to-digital converter performs analog-to-digital conversion on the current sampled voltage signal to obtain a current digital voltage signal.
2. The voltage monitoring method according to claim 1, characterized in that: The voltage monitoring method further includes: Predetermine multiple sampling conditions to be selected; For each sampling condition to be selected, determining a reference gain error and a reference offset error corresponding to the sampling condition to be selected, wherein the reference gain error and the reference offset error minimize the error between the digital voltage signal and the expected voltage signal of the circuit to be tested under the sampling condition to be selected; Establishing a calibration relationship based on each of the selected sampling conditions and its corresponding reference gain error and reference offset error; The process of obtaining the current gain error and the current offset error corresponding to the current sampling condition includes: The current sampling condition is matched in the calibration relationship, a target selected sampling condition matching the current sampling condition is determined, a reference gain error corresponding to the target selected sampling condition is used as the current gain error, and the reference offset error corresponding to the target selected sampling condition is used as the current offset error.
3. The voltage monitoring method according to claim 2, characterized in that: For each sampling condition to be selected, the process of determining the reference gain error and the reference offset error corresponding to the sampling condition to be selected includes: For each of the sampling conditions to be selected, determining a first step length factor corresponding to the gain error and a second step length factor corresponding to the offset error; Adjusting the actual voltage signal of the circuit under test under the selected sampling condition to obtain a sampled voltage signal based on the gain error and the offset error corresponding to the i-th error optimization operation, and obtaining a digital voltage signal obtained after the analog-to-digital converter performs analog-to-digital conversion on the sampled voltage signal, i=1, 2, ...; Acquire an error voltage signal between the digital voltage signal and an expected voltage signal corresponding to the selected sampling condition; Determining whether the error voltage signal satisfies a minimum error condition; If yes, the gain error corresponding to the i-th error optimization operation is determined as the reference gain error corresponding to the sampling condition to be selected, and the offset error corresponding to the i-th error optimization operation is determined as the reference offset error corresponding to the sampling condition to be selected; If not, the gain error corresponding to the i-th error optimization operation is adjusted based on the first step size factor to obtain the gain error corresponding to the i+1-th error optimization operation, and the offset error corresponding to the error optimization operation is adjusted based on the second step size factor to obtain the offset error corresponding to the i+1-th error optimization operation.
4. The voltage monitoring method according to claim 3, characterized in that: The process of adjusting the gain error corresponding to the i-th error optimization operation based on the first step length factor to obtain the gain error corresponding to the (i+1)-th error optimization operation includes: Establishing a first relationship based on the first step length factor, the gain error corresponding to the i-th error optimization operation, the error voltage signal corresponding to the i-th error optimization operation, and the actual voltage signal corresponding to the i-th error optimization operation; The gain error corresponding to the (i+1)th error optimization operation is obtained according to the first relationship.
5. The voltage monitoring method according to claim 4, characterized in that: The first relationship is gain(i+1)=gain(i)+ρ1×μ1×e(i)×Vin(i), wherein gain(i+1) is the gain error corresponding to the i+1th error optimization operation, gain(i) is the gain error corresponding to the i-th error optimization operation, ρ1 is the first adjustment coefficient, μ1 is the first step length factor, e(i) is the error voltage signal corresponding to the i-th error optimization operation, and Vin(i) is the actual voltage signal corresponding to the i-th error optimization operation.
6. The voltage monitoring method according to claim 4, characterized in that: The process of adjusting the offset error corresponding to the error optimization operation based on the second step size factor, and the offset error corresponding to the (i+1)th error optimization operation includes: Establishing a second relationship based on the second step factor, the offset error corresponding to the i-th error optimization operation, the error voltage signal and a preset bias coefficient; The offset error corresponding to the (i+1)th error optimization operation is obtained according to the second relationship.
7. The voltage monitoring method according to claim 6, characterized in that: The second relationship is offest(i+1)=offest(i)+ρ2×μ2×e(i)×j, wherein offest(i+1) is the offset error corresponding to the i+1th error optimization operation, offest(i) is the offset error corresponding to the i-th error optimization operation, ρ2 is the second adjustment coefficient, μ2 is the second step factor, e(i) is the error voltage signal corresponding to the i-th error optimization operation, and j is the preset bias coefficient.
8. The voltage monitoring method according to any one of claims 1 to 7, characterized in that: After the analog-to-digital converter performs analog-to-digital conversion on the current sampled voltage signal to obtain a current digital voltage signal, the voltage monitoring method further includes: Acquiring voltage change information based on the current digital voltage signal; Determining whether the voltage change information satisfies an adjustment condition; If so, adjust the sampling parameters of the analog-to-digital converter, the sampling parameters including resolution and / or resolution.
9. A voltage monitoring system, characterized in that: include: A sampling component, used to obtain an actual voltage signal of a circuit under test in a server under a current sampling condition; A filtering component, used to determine the current sampling condition of the circuit to be tested, obtain a current gain error and a current offset error corresponding to the current sampling condition, adjust the actual voltage signal by the current gain error to obtain an intermediate voltage signal to correct the actual conversion gain of the analog-to-digital converter, add the intermediate voltage signal and the current offset error to obtain a current sampling voltage signal and transmit it to the analog-to-digital converter; The analog-to-digital converter is used to perform analog-to-digital conversion on the current sampled voltage signal to obtain a current digital voltage signal.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the voltage monitoring method according to any one of claims 1 to 8 are implemented.
