A wide range and high precision current sampling method
By setting multiple current sampling ranges in current sampling and switching the sampling range based on real-time current values, the problem of difficulty in achieving high accuracy and wide range at the same time in the prior art is solved, and current sampling with higher accuracy and data integrity is achieved.
Patent Information
- Application Number
- CN202111449218.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-11-26
AI Technical Summary
The prior art is difficult to achieve high sampling accuracy and wide sampling range at the same time, resulting in distortion of current sampling and affecting control.
Sampling range switching is performed by setting several current sampling ranges starting from zero and performing sampling range switching based on the current value of the current sampled in the sampling range greater than or less than the switching judgment value calculated, ensuring that current sampling is performed on the basis of real-time adjustment of the optimal range.
It improves the current sampling accuracy and data integrity, avoids the loss of sampling results after the current exceeds the upper sampling limit, and is suitable for detection of the rapid numerical change rate of current.
Smart Images

Figure CN114325038B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of sampling, and in particular to a current sampling method with wide range and high precision. Background Art
[0002] Current sampling is a basic content that needs to be involved in the design, production, use and maintenance of electronic circuit products. It usually has a variety of measurement sampling schemes. One is direct detection based on the voltage drop generated when the current passes through the resistor. For example, conventional ammeters and multimeters use this scheme, which requires the sampling device to be connected in series with the circuit being measured. The other is an indirect detection scheme, which usually uses a Hall sensor based on the Hall principle for sampling. The Hall effect is an effect of the interaction between the current and the magnetic field in the conductive material to produce an electromotive force. The principle of measuring current by the Hall effect can be described as a clamp meter as a constant current provided by the drive circuit, which forms a loop through the Hall element. When a DC current flows through the conductor passing through the clamp, a constant magnetic flux will be generated inside the magnetic core. At this time, the Hall element is in the magnetic field, which will generate a voltage difference. After amplification and filtering by the amplifier, a voltage value proportional to the current of the conductor being measured can be formed, and then the corresponding current can be obtained through collection and conversion.
[0003] However, the Hall device has two incompatible sampling parameters for detecting current, namely sampling accuracy and sampling range. It is difficult to achieve high sampling accuracy and wide sampling range at the same time. When the required sampling accuracy is high, the sampling range will be reduced, and when the sampling range is wide, the sampling accuracy will be reduced. The sampling range is the current value range that the Hall device can detect, with at least a minimum value and a maximum value. The sampling accuracy is the minimum current division value that the Hall device can detect, for example, it can be accurate to several decimal places.
[0004] CN103457558B relates to a variable gain small current pickup amplifier circuit, including a small current signal sampling circuit for collecting small current signals, whose output end is connected to the input end of a first-level precision operational amplifier circuit, the output end of the first-level precision operational amplifier circuit and the output end of the gain control circuit are both connected to the input end of a second-level variable gain operational amplifier circuit, and the output end of the second-level variable gain operational amplifier circuit is connected to a PC. The present invention can flexibly change the amplification factor, can be shared within a larger current sampling range, simplifies the analog signal processing of the detector, and has good versatility and stability.
[0005] The above-mentioned prior art can realize current sampling with multiple amplification factors, but when one of the current amplification factors is close to the maximum value of this range, the current amplification factor of a larger range is not adjusted in time, resulting in current sampling distortion and affecting control, that is, a high sampling range and high sampling accuracy are not achieved at the same time.
[0006] In addition, on the one hand, there are differences in understanding among those skilled in the art; on the other hand, the applicant studied a large number of documents and patents when making the present invention, but due to space limitations, not all details and contents are listed in detail. However, this does not mean that the present invention does not have the characteristics of these prior arts. On the contrary, the present invention already has all the characteristics of the prior art, and the applicant reserves the right to add relevant prior art to the background technology. Summary of the invention
[0007] In view of the deficiencies in the prior art, the present invention provides a wide-range, high-precision current sampling method, setting several current sampling ranges starting from zero, the several current sampling ranges having different upper limits, wherein the sampling range with a larger upper limit has a lower sampling accuracy than the sampling range with a smaller upper limit, and when performing current sampling, the sampling range is switched to the next level or maintained in the current sampling range based on whether the current value of the current sample is greater than the calculated value of the switching judgment value or less than the calculated value of the switching judgment value in the sampling range, wherein the switching judgment value is a value between 0 and 1, and the calculated value of the switching judgment value is the product of the switching judgment value and the sampling range.
[0008] Preferably, the switching judgment value is a value between 0.6 and 0.9, and the next level sampling range is the only sampling range among the set current sampling ranges whose upper limit is only greater than the upper limit of the current level sampling range.
[0009] Preferably, the current is amplified by an operational amplifier before detection, the amplification factor of the operational amplifier determines the size of the sampling range, and the amplification factor of the operational amplifier is adjusted by setting feedback resistors of different resistance values in the sampling circuit.
[0010] Preferably, the sampling current is amplified by an operational amplifier and then enters a microcontroller, which obtains a specific value of the sampling current and adjusts the sampling range by controlling the corresponding feedback resistor to access the sampling circuit switch based on whether the sampling current value is greater than or less than the current switching judgment value calculated value.
[0011] Preferably, when performing the initial current sampling, the initial current value is detected with a maximum sampling range, and the initial sampling current range is confirmed based on the sampling range within which the initial current value falls.
[0012] Preferably, a feedback resistor is provided The corresponding current range is , feedback resistor The corresponding current range is , feedback resistor The corresponding current range is , feedback resistor The corresponding current range is , feedback resistor The corresponding current range is , open the maximum current sampling range after power-on The microcontroller determines the initial current m.
[0013] Preferably, according to m falling on Confirm that the initial sampling current range is , where 1≤ n≤N-1.
[0014] Preferably, based on m falling on Range again confirms that the sampling current range is , turn on the control switch (n-1)E to switch the sampling current range to , or based on m falling on Range again confirms that the sampling current range is , turn on the control switch nE to switch the sampling current range to .
[0015] Preferably, the subsequent current is detected based on the switched sampling current range , and based on Falling Range again confirms that the sampling current range is , turn on the control switch (n-1)E to switch the sampling current range to , or based on Falling Range again confirms that the sampling current range is , turn on the control switch nE to switch the sampling current range to .
[0016] Preferably, the switching judgment value is 0.8.
[0017] The advantages of the present invention are: adjusting the most suitable current sampling range online according to the current value sampled in real time; improving the current in the entire range to be in the most suitable current sampling range, and improving the current sampling accuracy. The best current sampling range can be matched at any time according to the changing sampling current, because the sampling range is inversely correlated with the sampling accuracy, that is, the larger the sampling range, the less accurate the sampling result can be. As the current continues to increase, it is possible to increase to exceed the upper limit of a certain sampling range at a certain moment, and most of the existing technologies choose to switch to the next level of sampling range after the current exceeds the sampling upper limit, which undoubtedly loses a part of the sampling results exceeding the upper limit, and the present scheme adopts the method of switching judgment value to make the switching of the sampling range pre-processed, that is, the actual detection current exceeds the switching judgment value calculation value in advance and then switches to the next level of sampling range, so that the value exceeding can still be accurately measured in the sampling range of the previous level, and at the same time, it can also meet the current value of the next time slice can be sampled relatively well in the sampling range of the next level. This design scheme records the current sampling data accuracy corresponding to the new time slice that may be generated in the time delay between the steps of uploading the current data, the microcontroller judging, and the control switch switching the sampling range, without causing data loss due to failure to detect due to exceeding the maximum detection limit. This makes the data integrity, data consistency, and data analyzability of this scheme higher than the existing technology, and can be applied to some current detection situations with a faster current value change rate. Compared with the existing technology, it can still obtain accurate and complete data with the best sampling accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a circuit diagram of a preferred embodiment provided by the present invention;
[0019] Figure 2 It is a control logic diagram of a preferred real-time mode provided by the present invention; DETAILED DESCRIPTION
[0020] The following is combined with Figure 1 and Figure 2 Provide detailed explanation.
[0021] The present invention provides a wide range, high precision current sampling method, which mainly utilizes Figure 1 The sampling circuit shown in the figure includes at least an operational amplifier feedback resistor, that is, an operational amplifier feedback resistor, and the feedback resistors can be connected in series and / or in parallel and / or in series-parallel combination to form different amplification factors, and different amplification factors correspond to different current sampling ranges. Therefore, the method involves the following feedback resistor setting steps.
[0022] The operational amplifier is a component that amplifies the tiny current fluctuations in the circuit to a range of amplitudes that the detector can handle and detect. It is a component with a high magnification factor. It can process the original circuit signal by amplification, reduction, or even differentiation or integration. It is often used in combination with a feedback resistor. The operational amplifier has at least a positive power supply pin, a negative power supply pin, a + input pin, a - input pin, and an output pin. When the operational amplifier is connected to the detection circuit, a resistor is usually connected between its output and the reverse input. Alternatively, the resistor function can also be replaced by a capacitor or an inductor. This varies according to the different detection data objects. For example, the circuit for measuring capacitance chooses to connect a capacitor between the output and the reverse input of the operational amplifier.
[0023] S1, set feedback resistance The corresponding current range is , feedback resistor The corresponding current range is , feedback resistor The corresponding current range is , feedback resistor The corresponding current range is , feedback resistor The corresponding current range is , open the maximum current sampling range after power-on The microcontroller determines the initial current m.
[0024] in is the maximum current value that the feedback resistor R1 can amplify, such as 100A, 200A, etc. In other embodiments, the multi-stage feedback resistor can select more different resistance values, so that the current sampling range is more selected, rather than being limited to the multiple relationship of exponential amplification.
[0025] The Hall device collects the voltage at both ends of the circuit, and sends the voltage data to the + input pin and - input pin of the operational amplifier respectively. The operational amplifier amplifies the voltage signal and outputs the amplified sampling signal to the microcontroller through the output pin. The microcontroller calculates the voltage at both ends as the current value through operation. During initialization, the microcontroller first connects the feedback resistor with the maximum current sampling range through the analog control switch by default. At this time, the amplified sampling signal can accept the largest range, and the current value at this time is subjected to at least one rough sample detection to obtain a relatively rough initial current value m.
[0026] S2, according to m falls on Confirm that the initial sampling current range is , where 1≤ n ≤N-1, a second judgment is made based on whether m falls within Range again confirms that the sampling current range is , turn on the control switch (n-1)E to switch the sampling current range to , or based on m falling on Range again confirms that the sampling current range is , turn on the control switch nE to switch the sampling current range to .
[0027] S3, Detecting subsequent current based on the switched sampling current range , and based on Falling Range again confirms that the sampling current range is , turn on the control switch (n-1)E to switch the sampling current range to , or based on Falling Range again confirms that the sampling current range is , turn on the control switch nE to switch the sampling current range to .
[0028] Avoid The maximum sampling range output is reached within the sampling range, affecting the sampling maximum value, adjusting the current sampling multiple in real time, and realizing the optimal amplification multiple current sampling.
[0029] Where X is the switching judgment value, which is a percentage value. Basically, it is a value greater than 0.5 and less than 1. Preferably, the switching judgment value is set in the range of 0.6-0.9. Preferably, the switching judgment value is set to 0.8, i.e. 80%. The switching judgment value multiplied by the upper limit of the current sampling range is the switching judgment value calculation value, and the current comparison is based on the high switching judgment value calculation value. Since the m value is the current detection result based on the maximum detection range, it is relatively rough in accuracy. When judging which range it falls into, the microcontroller is controlled to only take the coarsest true value that can judge which detection range the m value belongs to. The coarsest true value is related to the preset sampling range division value. For example, the division value is demarcated by rounding, such as 100A, 200A, etc., then the coarsest true value can be taken as an integer value. For example, the measured value of m is 125.143A. When judging, the coarsest true value is 125A. At this time, it can be judged that m falls within the sampling range of 0-200A. Therefore, the corresponding feedback resistor is controlled to control the sampling range within the sampling range of 0-200A. After that, the current sampling is maintained within the sampling range of 0-200A, and the sampling value is , it should be noted that is a value that changes over time. A new , that is, it is not a fixed value, so it needs to be based on the new The above step S3 is performed once for the generation.
[0030] For example, is 100A, then the feedback resistor The corresponding first current range is 0-100A, the feedback resistor The corresponding second current range is 0-200A, the feedback resistor The corresponding third current range is 0-400A. By analogy, current ranges such as 0-800A, 0-1600A, and 0-3200A can be obtained. First, assuming that the initial value of m is rounded to 50A, the initially selected detection range is 0-100A. Subsequent current measurements are performed within this range. At a certain moment, the current changes from the 0-80A range to a current value exceeding 80A. The microcontroller controls the switch to switch the detection range to 0-200A and continues to perform within this range. For detection, at a certain moment, when the current changes from always maintaining in the range of 0-160A to a current value exceeding 160A, the microcontroller controls the switch to switch the detection range to 0-400A, and so on to implement subsequent current detection work. For the convenience of explanation, the two adjacent sampling current ranges can be divided into upper and lower levels according to the size of the sampling upper limit, that is, the sampling range with a smaller sampling upper limit is the previous level, and the sampling range with a larger sampling upper limit is the next level. If any sampling range is used as the observation body, the sampling range with a relatively larger sampling upper limit is its next level, and the sampling range with a relatively smaller sampling upper limit is its previous level. The next-level sampling range is the only sampling range among the several current sampling ranges that are set whose upper limit is only greater than the upper limit of the sampling range of this level.
[0031] The advantage of the above scheme is that it can match the best current sampling range according to the changing sampling current at any time, because the sampling range is inversely correlated with the sampling accuracy, that is, the larger the sampling range, the less accurate the sampling results can be. As the current continues to increase, it is possible that it will increase to exceed the upper limit of a certain sampling range at a certain moment, and most of the existing technologies choose to switch to the next level of sampling range after the current exceeds the sampling upper limit, which undoubtedly loses a part of the sampling results exceeding the upper limit. The present scheme adopts the method of switching judgment value to make the switching of the sampling range pre-processed, that is, the actual detection current exceeds the switching judgment value calculation value in advance and then switches to the next level of sampling range, so that the exceeding value can still be accurately measured in the previous level of sampling range, and at the same time, it can also meet the current value of the next time slice to be sampled relatively well in the next level of sampling range. This design scheme records the current sampling data accuracy corresponding to the new time slice that may be generated in the time delay between the steps of uploading the current data, the microcontroller judging, and the control switch switching the sampling range, without causing data loss due to failure to detect due to exceeding the maximum detection limit. This makes the data integrity, data consistency, and data analyzability of this scheme higher than the existing technology, and can be applied to some current detection situations with a faster current value change rate. Compared with the existing technology, it can still obtain accurate and complete data with the best sampling accuracy.
[0032] In this embodiment, the switching judgment value is most preferably 80%, which is the best value calculated after the game balance between the sampling range and the sampling accuracy. Specifically, as described above, the switching judgment value is the basis for determining whether the detection circuit switches to the next level of sampling range. From the perspective of preventing the growing current from exceeding the upper limit of the current sampling range, the smaller the switching judgment value, the higher the benefit. However, from the perspective of obtaining the best sampling accuracy based on the current current value, the larger the switching judgment value, the higher the benefit. After conducting experiments and game calculations on circuit detection with different current change speeds, this scheme believes that using 80% as the switching judgment value can meet most current detection occasions. Under the effect of this switching judgment value, the overall result of the current detection can simultaneously obtain or approach the maximum benefit of the balance between the sampling accuracy and the sampling range. In other words, the switching judgment value has a relatively wide adaptability, and the requirements of the judgment program are explained, which can significantly reduce the data processing difficulty of the microcontroller program, reduce control delays, and is conducive to timely switching of the detection range and reducing the risk of exceeding the detection range.
[0033] The above embodiment can better adapt the detection range to any changing current, especially for the detection of rising current. For the situation that the current will decrease during actual measurement, although the detection range of the above scheme starts from 0, it can meet the correct sampling requirements of the current reduction, but the demand for accurate sampling is still slightly reduced, because when the current decreases to a certain range, especially when it decreases to below the upper limit of the previous level, the detection range can be switched back to the previous level to obtain a more accurate sampling result. Here, the correct and accurate division of the sampling results in this scheme is distinguished. The correct sampling result means that the sampling result can at least be within the maximum confidence interval, which is related to the degree of belief of the sampler. For example, whether the rounded value of the detection result is consistent with the rounded value of the true value of the current or is close to the same within a certain range is regarded as an acceptable detection result. Then the sampling result that meets the above conditions can be given the correct attribute. After the current exceeds the sampling upper limit, the sampling result will obviously not conform to the true value of the current, so it can be considered that the sampling result at this time is incorrect. The accuracy of the sampling result refers to the degree of closeness of the sampling result to the true value of the current in terms of accuracy. For example, if the sampling result is consistent with the true value in several decimal places, it can be considered that the sampling result has high accuracy. In current collection, correctness should be ensured first, and then accuracy should be pursued as much as possible.
[0034] Therefore, the present invention also provides another embodiment, in which a low-level switching program is further provided. When the microcontroller determines that the current value is lower than the switching judgment value calculated value of the previous sampling range, the sampling circuit is controlled to switch to the previous sampling range.
[0035] Preferably, the above-mentioned low-level switching program has a trigger delay, that is, after executing a low-level switching program, the same low-level switching program cannot be executed within a certain preset time. The preset time is the trigger delay, which can be set manually. The advantage of this solution is that it prevents the current from suddenly decreasing due to a sudden change in a large situation, causing the control program to misjudge that the current will continue to decrease and gradually use the low-level switching program to reduce the sampling range to a very low level, thereby preventing the subsequent current from suddenly returning to a normal high value, causing the sampling range to fail to follow up and amplify in time, causing the current to exceed the detection upper limit and incorrectly.
[0036] Preferably, the low-level switching program also has a pre-judgment step, that is, when it is judged that the current current value is lower than the calculated switching judgment value of the previous sampling range, the operation of switching the previous sampling range is not performed only when the current value that meets the judgment condition appears once, but the operation of switching the previous sampling range is performed only after a preset number of current sampling values that meet the judgment condition appear cumulatively within a preset period of time. This design further prevents the current from suddenly changing to a small value, especially when the current sampling value suddenly becomes very small after one or several time slices, and the current sampling range is mistakenly switched to the previous level and the current suddenly returns to the original large value range, causing incorrect current detection.
[0037] The present invention is directed to the detection of current, but the current may not increase in a geometric increment during the gradual change, but may change in a curve growth manner. Specifically in the field of electric vehicle control, the relationship between the motor output current and the speed is usually not in the form of geometric change, but has a speed current output curve relationship. When the electric vehicle starts from complete rest to start, it is assumed that the driver quickly steps on the accelerator pedal from zero to a certain constant position, that is, a constant power output instruction is quickly given from zero time, and the motor starts to output outward. At this time, the vehicle starts to start slowly, and the relationship between the output current and time is that it suddenly changes to the maximum current in a short time with the power output instruction, and then makes a fast and slow current reduction change in the subsequent time; when the driver continues to step on the accelerator from the current pedal depth to another larger constant pedal depth, the output current is first fast and then slow, and then makes a fast and then slow current reduction change. The above process involves two current increase processes and two current reduction processes. Since the current sampling in the current reduction process can achieve step-by-step and nearly seamless switching, the existing current sampling scheme can be used. However, due to the above reasons, the sampling of the two-stage current increase process requires a balanced design of sampling accuracy and sampling range, and since the current growth rates are different before and after this process, the usual fixed switching judgment value cannot meet this situation well, which easily causes the current to exceed the range or the current is not sampled with the best sampling accuracy. For example, assuming that the current increases at a rate of 20A per second in 0-100A, but increases at a rate of 50A per second after exceeding 100A, and increases at a rate of 200A per second after exceeding 300A, that is, a growth method that is slow at the beginning and fast at the end, if the sampling range is still switched with a fixed switching judgment value, such as 80%, the effect will be poor. Because, assuming that the sampling frequency is once per second, that is, the time slice is divided into 1 second, the initial sampling range is 0-100A, the current collected in the first second is 20A, the current collected in the fourth second is 80A, which is greater than or equal to the switching judgment value calculated value of 80A in this range, and then switch to the next level 0-200A sampling range; the current collected in the fifth second is 100A, the current collected in the sixth second is 150A, and the current collected in the seventh second is 200A, which is greater than the switching judgment value calculated value of 160A in this range, and then switch to the next level 0-400A sampling range; the current collected in the eighth second is 250A, the current collected in the ninth second is 300A, and the actual current in the tenth second has increased to 500A, but since the upper limit of the sampling range is still 400A at this time, the current data collected in the tenth second is no longer correct.On the other hand, for the growth mode that is fast at the beginning and slow at the end, in order to ensure that the fast-growing current in the initial period can be correctly detected, the fixed switching judgment value is set to a smaller value to ensure that the sampling range can be quickly switched to a larger range step by step. For example, the switching judgment value is set to 50%, but the current growth rate slows down in the later stage of current growth. If 50% is still used as the switching judgment at this time, a large number of current samplings will not actually be achieved under the best sampling accuracy, that is, the accuracy of a large number of current sampling results will be lost. The problem can be attributed to the problem that the fixed switching judgment value is applied to the nonlinearly growing current sampling, resulting in incorrect or inaccurate sampling results.
[0038] In view of the above problem, the present invention further proposes an embodiment, in which the switching judgment value can change with the nonlinear change of the current. Specifically, a current-time relationship curve is obtained based on the vehicle operation link information, and the switching judgment value of each sampling range is set based on the relationship curve, wherein the switching judgment values are not equal.
[0039] The vehicle operation link information at least includes situations where the current exhibits nonlinear changes related to time, such as vehicle startup, vehicle acceleration, and vehicle gradual acceleration. The vehicle operation link information can be related to multiple judgment methods, that is, the current vehicle operation link information can be obtained from multiple judgment methods.
[0040] In one embodiment, the vehicle operation link information is obtained by detecting the pedal depth. Specifically, the pedal depth refers to the depth of the accelerator pedal being stepped on, which reflects the vehicle acceleration control desired by the driver. When no operation is performed on the accelerator pedal, the pedal depth has an initial value, which can be set to 0, that is, it means that no accelerator operation is performed at this time, and the vehicle will not perform the acceleration action. When it is determined that the pedal depth is stepped on to a constant pedal depth, a vehicle operation link information related to vehicle acceleration is generated. According to the above content, the corresponding current and time relationship curve is a current growth curve that is fast first and then slow. Preferably, the pedal depth can also be numerically graded, for example, the initial value of the pedal is set to 0, all throttles are set to 100, and the pedal depth is divided into 5 segments according to every 20 values. The acceleration of each segment corresponds to a current and time relationship curve. These curves are all current growth curves that are fast first and then slow, but the derivatives between the curves, that is, their changes are not completely consistent, so multiple vehicle acceleration-related vehicle operation link information can be obtained for each segment. A switching judgment value for each sampling range is set for each corresponding current-time correlation change curve; for a curve whose curve derivative gradually increases, a low sampling range switching judgment value is set to be greater than a high sampling range switching judgment value; and for a curve whose curve derivative gradually decreases, a low sampling range switching judgment value is set to be less than a high sampling range switching judgment value.
[0041] In another embodiment, the vehicle operation link information is obtained by detecting the vehicle acceleration. This method can better reflect the relationship between the vehicle's motion state and the vehicle's motor power output, and can eliminate the difference or delay between the manual operation of the throttle and the vehicle's corresponding feedback. In the vehicle acceleration stage, if the vehicle is controlled to gradually accelerate to an expected speed, the acceleration gradually decreases as the speed increases. Under the condition of constant vehicle torque, the output current also slows down the growth rate accordingly as the acceleration gradually decreases. Therefore, the acceleration is set as the vehicle operation link information, and the switching judgment value of different sampling ranges is pre-set based on the acceleration change in each case, so that the sampling detection result with the best accuracy and correctness can be obtained. Preferably, based on some other conditions that are relatively fixed or can be regarded as constants, the functional relationship between acceleration and current change can be roughly obtained, such as the acceleration process in the ideal vehicle running process. In this case, the switching judgment value of the current or next level sampling range can even be dynamically calculated and adjusted based on the current acceleration and the sampling range where the current is located, so as to achieve a dynamic adjustment effect. For example, assuming that the current vehicle acceleration is a, the current speed is b, the current corresponding to the current speed is c, the sampling range is 0-100c, the acceleration changes at -1 per second, and the sampling interval is 1 second, then the switching judgment value at this time can be set to a larger value greater than 50%, such as 70%, and the switching judgment value at this time can be called k1. When the acceleration changes at -2 per second, under other conditions, the switching judgment value k2 at this time can be set to a value greater than k1 and less than 1, such as 75% or 80%. Because it can be seen from the above example that as the acceleration gradually decreases, it means that the increasing trend of the speed is gradually slowing down. Correspondingly, the current that is positively correlated with the speed can try to maintain it in the current detection range for a longer time to obtain better detection accuracy, so the switching judgment value can be gradually increased as the acceleration decreases.
[0042] It should be noted that the above-mentioned specific embodiments are exemplary, and those skilled in the art can come up with various solutions inspired by the disclosure of the present invention, and these solutions also belong to the disclosure scope of the present invention and fall within the protection scope of the present invention. Those skilled in the art should understand that the present invention specification and its drawings are illustrative and do not constitute a limitation on the claims. The scope of protection of the present invention is defined by the claims and their equivalents. The present invention specification contains multiple inventive concepts, such as "preferably", "according to a preferred embodiment" or "optionally", all of which indicate that the corresponding paragraph discloses an independent concept, and the applicant reserves the right to file a divisional application based on each inventive concept.
Claims
1. A wide range, high precision current sampling method, It is characterized in that A plurality of current sampling ranges starting from zero are set, wherein the plurality of current sampling ranges have different upper limits, wherein a sampling range with a larger upper limit has a lower sampling accuracy than a sampling range with a smaller upper limit, and when current sampling is performed, an operation of switching the sampling range to the next level or maintaining it in the current sampling range is performed based on the current value of the current sample being greater than the switching judgment value calculation value or less than the switching judgment value calculation value in the sampling range, and when the current current value is lower than the switching judgment value calculation value of the previous sampling range, the sampling circuit is controlled to switch to the previous sampling range, wherein the switching judgment value is a value greater than 0.5 and less than 1, and the switching judgment value calculation value is the product of the switching judgment value and the upper limit of the sampling range, The switching judgment value can change with the nonlinear change of the current, and the switching judgment value of each sampling range is set based on the current-time relationship curve, wherein the switching judgment values are not equal.
2. The method according to claim 1, characterized in that The switching judgment value is a value between 0.6 and 0.9, and the next level sampling range is the only sampling range among the set current sampling ranges whose upper limit is only greater than the upper limit of the current level sampling range.
3. The method according to claim 1, characterized in that The current is amplified by an operational amplifier before detection. The amplification factor of the operational amplifier determines the size of the sampling range. The amplification factor of the operational amplifier is adjusted by setting feedback resistors with different resistance values in the sampling circuit.
4. The method according to claim 3, characterized in that The sampling current is amplified by the operational amplifier and then enters the microcontroller, which obtains the specific value of the sampling current and adjusts the sampling range by controlling the corresponding feedback resistor to connect to the sampling circuit switch based on whether the sampling current value is greater than or less than the current switching judgment value calculated value.
5. The method according to claim 1, characterized in that When performing initial current sampling, the initial current value is detected in the maximum sampling range, and the initial sampling current range is confirmed based on the sampling range within which the initial current value falls.
6. The method according to claim 4, characterized in that Setting the Feedback Resistor The corresponding current range is , feedback resistor The corresponding current range is , feedback resistor The corresponding current range is , feedback resistor The corresponding current range is , feedback resistor The corresponding current range is , open the maximum current sampling range after power-on The microcontroller determines the initial current m.
7. The method according to claim 6, characterized in that According to m falls Confirm that the initial sampling current range is , where 1≤n≤N-1.
8. The method according to claim 7, characterized in that Based on m Range again confirms that the sampling current range is , turn on the control switch (n-1)E to switch the sampling current range to , or based on m falling on Range again confirms that the sampling current range is , turn on the control switch nE to switch the sampling current range to , where X is the switching judgment value.
9. The method according to claim 8, characterized in that Detecting subsequent current based on the switched sampling current range , and based on Falling Range again confirms that the sampling current range is , turn on the control switch (n-1)E to switch the sampling current range to , or based on Falling Range again confirms that the sampling current range is , turn on the control switch nE to switch the sampling current range to .
Citation Information
Patent Citations
A variable-gain small-current pickup and amplification circuit
CN103457558B
Variable gain low current picking and amplifying circuit
CN103457558A
Isolated high-precision wide-range voltage measurement system and measurement method
CN112730970A