CP voltage detection method and device, electronic equipment and storage medium
By continuously obtaining multiple measured voltage values within a preset time period, calculating the initial voltage value and calculating the reference voltage value in a sliding window, and performing data correction, the accuracy and stability of CP voltage detection in the prior art are solved. A more accurate charging status judgment is achieved.
Patent Information
- Application Number
- CN202510015751.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2045-01-06
AI Technical Summary
When detecting the Control Pilot voltage in the prior art, due to the influence of hardware and environment, the voltage cannot accurately reach the set value, and the software makes an error in judgment and cannot enter the correct state; at the same time, the CP voltage jumps, causing it to enter the wrong state.
The ADC continuously obtains multiple measured voltage values within the preset time period, calculates the initial voltage value, and cyclically calculates the reference voltage value in a sliding window, performs data correction, and determines the CP state corresponding to each voltage value.
By eliminating noise and errors, the accuracy of CP voltage detection is improved, ensuring the accuracy and reliability of charging state judgment.
Smart Images

Figure CN119414079A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data measurement technology, and in particular to a CP voltage detection method, device, electronic device and storage medium. Background Art
[0002] In the European electric vehicle charging standard CCS, it is necessary to determine the charging status by detecting the Control Pilot voltage. When the Control Pilot voltage is different, it represents different charging status. When the CP amplitude is +12V, it means that the charging gun is not connected. When the CP amplitude is +9V, it means that the charging gun is connected, but the charging pile and the vehicle are not ready. When the CP amplitude is +6V and +3V, it means that it can be charged normally. When the CP amplitude is 0V, it means that the CP signal is short-circuited. When the CP amplitude is -12V, it means that the charging pile is unavailable.
[0003] As the guiding signal of the CCS system, the detection of CP voltage is of great importance. Currently, the most common method is to read the pin voltage of the CP signal line through ADC, and compare it with the set value after conversion. If the comparison is successful, the corresponding state is entered.
[0004] Currently, there are two problems with directly reading the CP voltage through ADC and then comparing it. First, due to the influence of hardware and environment, the CP voltage cannot accurately reach the set value, causing the software to make mistakes and fail to enter the correct state. Second, the CP voltage fluctuates. In some cases, the range of the fluctuation will just match the set value of a certain state, resulting in entering the wrong state. Summary of the invention
[0005] The present application provides a CP voltage detection method, device, electronic device and storage medium, which can process the data of ADC measurement values to eliminate noise and errors, and then determine the states corresponding to different voltages, so that the detection of CP voltage is more accurate.
[0006] The present application provides a CP voltage detection method, comprising: Continuously acquiring a plurality of measured voltage values within a preset time period through the ADC to obtain a first voltage value set; calculating an initial voltage value according to the first voltage value set, and moving on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate a plurality of reference voltage values to obtain a second voltage value set; Modifying the second voltage value set according to the maximum value and the minimum value in the first voltage value set and the maximum value and the minimum value in the second voltage value set; A CP state corresponding to each voltage value in the corrected second voltage value set is determined.
[0007] Optionally, calculating the initial voltage value according to the first voltage value set includes: determining a target position in a first set of voltage values; The initial voltage value is calculated according to a preset convolution kernel and a measured voltage value at a target position.
[0008] Optionally, after obtaining the multiple reference voltage values, the method further includes: Calculating a first preset number and a second preset number according to the width of the sliding window and the number of measured voltage values; Adding a first preset number of first filling values before the plurality of reference voltage values; A second preset number of second filling values are added after the plurality of reference voltage values.
[0009] Optionally, the second voltage value set is corrected according to the maximum value and the minimum value in the first voltage value set and the maximum value and the minimum value in the second voltage value set, including: Calculating a first deviation value according to a maximum value in the first voltage value set and a maximum value in the second voltage value set; Calculating a second deviation value according to a minimum value in the first voltage value set and a minimum value in the second voltage value set; If the first deviation value or the second deviation value is greater than a preset value, the maximum value or the minimum value in the first voltage value set is eliminated, and the second voltage value set is updated; The step of updating the second voltage value set is repeatedly performed until the updated first deviation value and the updated second deviation value are both smaller than the preset value, so as to complete the correction of the second voltage value set.
[0010] Optionally, determining a CP state corresponding to each voltage value in the corrected second voltage value set includes: Determine a preset interval corresponding to each voltage value in the corrected second voltage value set; The state parameter corresponding to the preset interval is obtained as the current CP state.
[0011] Optionally, the specific process of calculating the initial voltage value includes: The calculation formula of the preset convolution kernel C is: C=(c1,c2,……,c n )=(1 / n, 1 / n,……, 1 / n), Among them, c1, c2, ..., c n is the element in the convolution kernel, n is the width of the sliding window, and n<m-1, m is the number of measured voltage values; The initial voltage value vb iThe calculation formula is: vb i =C×V n / 2 Where i=n / 2, n / 2 is the starting bit in the first voltage value set V, V n / 2 are n elements extracted from the start bit in the first voltage value set V.
[0012] Optionally, the specific process of calculating multiple reference voltage values includes: Set n / 2+p again as the starting bit in the first voltage value set V, where n / 2<p<mn / 2, to obtain V n / 2+p are n elements extracted from the starting position in the first voltage value set V; The reference voltage value vb i+p The calculation formula is: vb i+p =C×V n / 2+p .
[0013] The present application also provides a CP voltage detection device, comprising: An acquisition module, configured to continuously acquire a plurality of measured voltage values within a preset time period through the ADC to obtain a first voltage value set; a calculation module, configured to calculate an initial voltage value according to the first voltage value set, and to move on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate a plurality of reference voltage values, so as to obtain a second voltage value set; a correction module, configured to correct the second voltage value set according to a maximum value and a minimum value in the first voltage value set and a maximum value and a minimum value in the second voltage value set; The determination module is used to determine the CP state corresponding to each voltage value in the corrected second voltage value set.
[0014] The present application also provides an electronic device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps in any one of the CP voltage detection methods provided in the present application by calling the computer program stored in the memory.
[0015] The present application also provides a storage medium, wherein the storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in any one of the CP voltage detection methods provided in the present application.
[0016] The CP voltage detection method provided by the present application can continuously obtain multiple measured voltage values within a preset time period through ADC to obtain a first voltage value set, calculate an initial voltage value based on the first voltage value set, and move on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate multiple reference voltage values to obtain a second voltage value set, and correct the second voltage value set according to the maximum and minimum values in the first voltage value set and the maximum and minimum values in the second voltage value set, and determine the CP state corresponding to each voltage value in the corrected second voltage value set. The embodiment of the present application can process the data of the ADC measurement value to eliminate noise and error, and then determine the state corresponding to different voltages, so that the detection of the CP voltage is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 It is a flow chart of a CP voltage detection method provided in an embodiment of the present application; Figure 2 is another flow chart of the CP voltage detection method provided in the embodiment of the present application; Figure 3 is a structural schematic diagram of a CP voltage detection device provided in an embodiment of the present application; Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0020] It should be noted that, in this article, the terms "include", "comprises" 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 includes 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 sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0021] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0022] It should be noted that, in this article, step codes such as 101, 102, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute 102 first and then 101, etc., but these should all be within the scope of protection of this application.
[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0024] An embodiment of the present application provides a CP voltage detection method. The executor of the CP voltage detection method may be a CP voltage detection device provided in the embodiment of the present application, or a server integrating the CP voltage detection device, wherein the CP voltage detection device may be implemented in hardware or software.
[0025] like Figure 1 As shown, Figure 1 is a first flow diagram of the CP voltage detection method provided in an embodiment of the present application. The specific flow of the CP voltage detection method may be as follows: 101. Continuously acquire multiple measured voltage values within a preset time period through ADC to obtain a first voltage value set.
[0026] In one embodiment, the above-mentioned CP (Control Pilot) voltage detection method can be applied to the CCS (Combined Charging System) system. Among them, the CCS standard integrates AC and DC charging into a unified system, and realizes multiple charging modes through a combined socket, including single-phase AC charging, three-phase AC charging and DC charging. In the CCS system, the CP interface is used for AC charging control and communication by transmitting PWM signals. The CP interface uses the upper half of the interface during AC charging, and uses the lower DC interface for energy transmission during DC charging, while the upper half of the pins are used for communication. This design enables the CCS system to be compatible with different charging modes and provide more flexible charging options.
[0027] Furthermore, the above-mentioned preset time period can be determined according to the system requirements and the voltage detection accuracy, stability and other factors. During this time period, the ADC (analog-to-digital converter) will continuously sample and measure the CP voltage. Due to the existence of various factors such as the hardware environment and electromagnetic interference, a single measured voltage value may have a large error or fluctuation. Therefore, multiple measured voltage values are obtained through multiple measurements. These measured values together constitute a first voltage value set, which can be defined as V.
[0028] For example, in actual operation, the preset time period may be set to 10 milliseconds. During these 10 milliseconds, the ADC measures at a certain frequency (such as sampling once per microsecond). Assuming that 100 measured voltage values are finally obtained, these 100 values constitute the first voltage value set. The purpose of this is to provide a rich data foundation for subsequent data processing. By performing a series of operations such as sorting, convolution calculation, boundary filling, and outlier removal on these data, the true value of the Control Pilot voltage can be determined more accurately, and then the charging state can be accurately judged.
[0029] 102. Calculate an initial voltage value according to the first voltage value set, and move on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate a plurality of reference voltage values to obtain a second voltage value set.
[0030] In one embodiment, the above-mentioned initial voltage value is first calculated. Specifically, several voltage values starting from a specific position can be selected from the first voltage value set, and the calculation is performed in combination with the set convolution kernel. For example, according to the scheme setting, the first voltage value set is first sorted, and then according to the set sliding window width n and reading window width m, n elements are extracted from n / 2 as the starting position, and then the preset convolution kernel C is used to calculate with these n elements, and the result is the initial voltage value. This initial voltage value is the basis for subsequent calculations. It reflects the comprehensive characteristics of this part of the voltage value to a certain extent, and the local voltage fluctuation can be preliminarily smoothed through convolution calculation.
[0031] Furthermore, based on this initial voltage value, a plurality of reference voltage values are cyclically calculated by moving on the first voltage value set in a sliding window manner. Starting from the starting position, a fixed step length is moved each time (for example, the step length can be 1), and after each movement, the same method as the initial voltage value is used to calculate, that is, the n elements starting from the new position are extracted and calculated with the convolution kernel to obtain a new reference voltage value. This cycle is repeated until the sliding window moves to a position close to the end of the reading window, for example, from n / 2 to mn / 2. In this way, a series of reference voltage values can be obtained, and these reference voltage values together constitute the second voltage value set.
[0032] For example, assuming that the first voltage value set has m=100 voltage values and the sliding window width n=10, after calculating the initial voltage value, 10 elements are extracted from the 10 / 2+1=6th position to calculate the next reference voltage value, and then the process is repeated from the 7th position until the 100-10 / 2=95th position. In this way, multiple reference voltage values are obtained to form the second voltage value set. Compared with the first voltage value set, this second voltage value set has undergone comprehensive processing of convolution smoothing and sliding windows, which can better reflect the actual voltage situation, reduce the impact of noise and outliers, and provide a more reliable data basis for subsequent accurate judgment of the charging status.
[0033] 103. Correct the second voltage value set according to the maximum value and the minimum value in the first voltage value set and the maximum value and the minimum value in the second voltage value set.
[0034] In one embodiment, the maximum value v in the first voltage value set is max and the minimum value v min It reflects the extreme value of the original measurement data. The second voltage value set is a reference voltage value set obtained after a series of processing (such as convolution calculation and sliding window operation), and its maximum value can be expressed as vb max , the minimum value is vb min. Further, the first deviation value can be calculated according to the maximum value in the first voltage value set and the maximum value in the second voltage value set, and the second deviation value can be calculated according to the minimum value in the first voltage value set and the minimum value in the second voltage value set. If the first deviation value or the second deviation value is greater than a preset value, the maximum value or the minimum value in the first voltage value set is eliminated, and the second voltage value set is recalculated. The above steps are repeated until the updated first deviation value and the second deviation value are both less than the preset value, so as to complete the correction of the second voltage value set.
[0035] Specifically, in the above correction process, two deviation values need to be decomposed and calculated, namely the first deviation value w max =v max -vb max , and the second deviation value w min =vb min -v min , these two differences represent the degree of deviation between the extreme value of the original data and the extreme value of the processed data. max >w (w is the preset interference filter value) or w min >w, it means that the second voltage value set may be affected by a large interference or abnormal value. In this case, the second voltage value set needs to be adjusted. For example, if v max and vb max If the difference is too large, it may mean that the maximum value in the original data is an abnormally high value, which may be caused by factors such as instantaneous electromagnetic interference. Then it is necessary to remove the maximum value v in the first voltage value set. max , and then repeat the previous series of calculation steps (including calculating the new first voltage value set, initial voltage value, second voltage value set, etc.) until w max and w min All meet the requirements, that is, are less than the preset value. This embodiment can effectively remove abnormal reference voltage values caused by noise, interference and other factors through the judgment and adjustment mechanism based on the difference between the two sets of extreme values, so that the second voltage value set can more accurately reflect the actual situation of the CP voltage, thereby improving the reliability and accuracy of the entire voltage detection scheme, ensuring that the charging state can be correctly judged in the CCS system, and ensuring the smooth progress of the charging process.
[0036] 104. Determine a CP state corresponding to each voltage value in the corrected second voltage value set.
[0037] In one embodiment, different CP voltage amplitudes in the CCS system correspond to different charging states. After obtaining the corrected second voltage value set, each voltage value needs to be analyzed to determine its corresponding CP state. According to the CCS charging standard, the states represented by different CP amplitudes can be determined. For example, when the CP amplitude is +12V, it means that the charging gun is not connected. When the CP amplitude is +9V, it means that the charging gun is connected but the charging pile and the vehicle are not ready. When the CP amplitude is +6V and +3V, it means that normal charging is possible. When the CP amplitude is 0V, it means that the CP signal is short-circuited. When the CP amplitude is -12V, it means that the charging pile is unavailable.
[0038] In one embodiment, the above step of determining the CP state corresponding to each voltage value in the revised second voltage value set may include: determining the preset interval corresponding to each voltage value in the revised second voltage value set, and obtaining the state parameter corresponding to the preset interval as the current CP state. For example, if a voltage value is between 11V and 13V (taking into account the voltage variation caused by hardware or other interference in the actual environment, the judgment range of the +12V state setting), then it can be determined that the corresponding CP state is that the charging gun is not connected. Similarly, if the voltage value is between 8V and 10V (assuming a reasonable judgment range for the +9V state setting), the corresponding CP state is that the charging gun is connected but the charging pile and the vehicle are not ready. Through such a one-by-one comparison process, the CP state corresponding to each voltage value in the revised second voltage value set can be accurately determined, thereby providing a key basis for the charging control of the entire CCS system, ensuring that the system can perform corresponding operations according to the correct charging state, such as starting charging, suspending charging, prompting errors, etc., to ensure the safety, efficiency and accuracy of the charging process.
[0039] As described above, the CP voltage detection method proposed in the embodiment of the present application can continuously obtain multiple measured voltage values through ADC within a preset time period to obtain a first voltage value set, calculate the initial voltage value according to the first voltage value set, and move on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate multiple reference voltage values to obtain a second voltage value set, and correct the second voltage value set according to the maximum and minimum values in the first voltage value set and the maximum and minimum values in the second voltage value set, and determine the CP state corresponding to each voltage value in the corrected second voltage value set. The embodiment of the present application can process the data of the ADC measurement value to eliminate noise and error, and then determine the state corresponding to different voltages, so that the detection of the CP voltage is more accurate.
[0040] The method described in the above embodiment will be further described below.
[0041] See also Figure 2 , Figure 2 1 is a second flow chart of the CP voltage detection method provided in the embodiment of the present application. The method comprises: 201. Continuously acquire a plurality of measured voltage values within a preset time period through an ADC to obtain a first voltage value set.
[0042] Specifically, within a preset time period, the ADC will continuously sample and measure the Control Pilot voltage. For example, the ADC continuously reads m measured voltage values V=(v1, v2, ..., v m ) is the first voltage value set, where m is the set reading window width, that is, the number of measured voltage values obtained. Then the first voltage value set V can be further sorted to obtain the maximum value v max and the minimum value v min .
[0043] 202. Determine a target position in a first voltage value set.
[0044] 203. Calculate an initial voltage value according to a preset convolution kernel and a measured voltage value at a target position.
[0045] Furthermore, we can set the sliding window width to n, where n < m-1, and then set the convolution kernel C = (c1, c2, ..., c n )=(1 / n, 1 / n,……, 1 / n). Then set n / 2 in V as the starting point and extract n elements as V n / 2 Next, calculate the reference voltage value V BM Elements in vb i (i = n / 2), the calculation formula is vb i =C×V n / 2 This is the first step of the convolution calculation. By multiplying the convolution kernel with the corresponding element of the extracted voltage value sequence and summing them, an initial element of the reference voltage value sequence, that is, the initial voltage value, is obtained.
[0046] 204. Move on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate a plurality of reference voltage values.
[0047] Furthermore, this embodiment can continue to cyclically calculate other elements of the reference voltage value. For example, n / 2+p in V can be used as the starting position (n / 2<p<mn / 2), and the n elements extracted are Vn / 2+p, and then the reference voltage value V can be calculated. BM Each element in vb i+p =C×V n / 2+pIn this cycle, the read voltage value sequence is continuously moved in a sliding window manner, and each movement updates the elements in the reference voltage value sequence according to the same convolution calculation method, thereby gradually constructing a complete reference voltage value V BM .
[0048] 205. Fill before and after the plurality of reference voltage values respectively to obtain a second voltage value set.
[0049] In one embodiment, considering that in the previous calculation process, the reference voltage value is a series of values obtained by sliding window and convolution calculation, but the integrity of the data may be affected at the beginning and end of the window sliding. For example, at the first position and the last few positions, the calculation method is different from the sliding window calculation in the middle. Therefore, the front and back of the multiple reference voltage values can be filled respectively. Specifically, the first preset number and the second preset number can be calculated according to the width of the sliding window and the number of measured voltage values, and the first preset number of first filling values are added before the multiple reference voltage values, and the second preset number of second filling values are added after the multiple reference voltage values.
[0050] The boundary filling operation is to make the data at these boundary positions more reasonable and consistent in subsequent processing. Specifically, each element from 1 to n / 2 can be filled with vb n / 2 This is because there is no complete sliding window to calculate the convolution value before these positions, so the vb calculated at the starting position of the sliding window is used. n / 2 To fill it, so that its data features are consistent with the values calculated based on the complete sliding window. Similarly, each element from mn / 2 to m can be filled with vb m-n / 2 , so that the entire V BM When performing operations such as sorting, the boundary data will not have an unreasonable impact on the results due to differences in calculation methods, thereby ensuring the accuracy and stability of the entire data processing process and further improving the reliability of Control Pilot voltage detection.
[0051] 206. Modify the second voltage value set according to the maximum value and the minimum value in the first voltage value set and the maximum value and the minimum value in the second voltage value set.
[0052] V BM Get the maximum value after sorting vb max and minimum value vb min , calculate the first deviation value w max =v max -vb max , and the second deviation value w min =vbmin -v min , if w max >w (w is the preset interference filter value) or w min >w, it means that the second voltage value set may be affected by a large interference or abnormal value. In this case, the second voltage value set needs to be adjusted. For example, the maximum value v in the first voltage value set V can be removed. max or minimum value v min , and then repeat the previous series of calculation steps (including calculating the new first voltage value set, initial voltage value, second voltage value set, etc.) until w max and w min All meet the requirements, that is, they are less than the preset values.
[0053] 207. Determine a CP state corresponding to each voltage value in the corrected second voltage value set.
[0054] In one embodiment, different CP voltage amplitudes in the CCS system correspond to different charging states. After obtaining the corrected second voltage value set, each voltage value needs to be analyzed to determine its corresponding CP state. For example, after reading the ADC reading, a range is set for each charging state. For example, when the CP amplitude is +12, it is state A, and the judgment range is set to 11V to 13V, so as to eliminate voltage changes caused by hardware or other interference in the actual environment.
[0055] In this embodiment, by calculating the convolution sequence of the ADC values of each channel over a period of time, a smoothed value over this period of time can be calculated, which is more accurate than directly measuring the readings. At the same time, by tracking the maximum and minimum values, outliers or extreme readings can be discarded, which helps reduce errors caused by noise and interference. In addition, the convolution process can smooth abnormally sharp data, thereby facilitating further noise elimination.
[0056] As described above, the CP voltage detection method proposed in the embodiment of the present application can continuously obtain multiple measured voltage values within a preset time period through ADC to obtain a first voltage value set, determine the target position in the first voltage value set, calculate the initial voltage value according to the preset convolution kernel and the measured voltage value of the target position, move on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate multiple reference voltage values, fill the front and back of the multiple reference voltage values respectively to obtain a second voltage value set, correct the second voltage value set according to the maximum and minimum values in the first voltage value set and the maximum and minimum values in the second voltage value set, and determine the CP state corresponding to each voltage value in the corrected second voltage value set. The embodiment of the present application can process the data of the ADC measurement value to eliminate noise and error, and then determine the state corresponding to different voltages, so that the detection of the CP voltage is more accurate.
[0057] In order to implement the above method, an embodiment of the present application further provides a CP voltage detection device, which can be integrated into a terminal device such as a mobile phone, a tablet computer, or the like.
[0058] For example, Figure 3 FIG. 1 is a schematic diagram of a structure of a CP voltage detection device provided in an embodiment of the present application. The CP voltage detection device may include: An acquisition module 301 is used to continuously acquire a plurality of measured voltage values within a preset time period through an ADC to obtain a first voltage value set; A calculation module 302, configured to calculate an initial voltage value according to the first voltage value set, and move on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate a plurality of reference voltage values to obtain a second voltage value set; A correction module 303, configured to correct the second voltage value set according to the maximum value and the minimum value in the first voltage value set and the maximum value and the minimum value in the second voltage value set; The determination module 304 is used to determine the CP state corresponding to each voltage value in the modified second voltage value set.
[0059] As can be seen from the above, the CP voltage detection device proposed in the embodiment of the present application can continuously obtain multiple measured voltage values within a preset time period through ADC to obtain a first voltage value set, calculate the initial voltage value based on the first voltage value set, and move on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate multiple reference voltage values to obtain a second voltage value set, and correct the second voltage value set according to the maximum and minimum values in the first voltage value set and the maximum and minimum values in the second voltage value set, and determine the CP state corresponding to each voltage value in the corrected second voltage value set. The embodiment of the present application can process the data of the ADC measurement value to eliminate noise and error, and then determine the state corresponding to different voltages, so that the detection of the CP voltage is more accurate.
[0060] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.
[0061] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0062] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any CP voltage detection method provided in the embodiment of the present application. For example, the computer program can execute the following steps: Continuously acquiring a plurality of measured voltage values within a preset time period through the ADC to obtain a first voltage value set; calculating an initial voltage value according to the first voltage value set, and moving on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate a plurality of reference voltage values to obtain a second voltage value set; Modifying the second voltage value set according to the maximum value and the minimum value in the first voltage value set and the maximum value and the minimum value in the second voltage value set; A CP state corresponding to each voltage value in the corrected second voltage value set is determined.
[0063] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0064] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0065] Since the computer program stored in the storage medium can execute the steps in any CP voltage detection method provided in the embodiments of the present application, the beneficial effects that can be achieved by any CP voltage detection method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0066] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the device equipped with the chip executes the methods in various possible implementation modes as described above.
[0067] For example, the computer device mentioned above may be a terminal device with corresponding functions such as a mobile phone, a tablet computer, a personal computer, a cloud computer, etc. Figure 4 , Figure 4 A schematic diagram of the structure of a computer provided in an embodiment of the present application.
[0068] The computer device 400 may include components such as a memory 401 and a processor 402. Those skilled in the art will appreciate that Figure 4 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0069] The memory 401 may be used to store applications and data. The applications stored in the memory 401 include executable codes. The applications may be composed of various functional modules. The processor 402 executes various functional applications and data processing by running the applications stored in the memory 401.
[0070] Processor 402 is the control center of the computer device. It uses various interfaces and lines to connect the various parts of the entire computer device. By running or executing applications stored in memory 401 and calling data stored in memory 401, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole.
[0071] In this embodiment, the processor 402 in the computer device will load the executable code corresponding to the process of one or more application programs into the memory 401 according to the following instructions, and the processor 402 will run the application program stored in the memory 401 to execute: Continuously acquiring a plurality of measured voltage values within a preset time period through the ADC to obtain a first voltage value set; calculating an initial voltage value according to the first voltage value set, and moving on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate a plurality of reference voltage values to obtain a second voltage value set; Modifying the second voltage value set according to the maximum value and the minimum value in the first voltage value set and the maximum value and the minimum value in the second voltage value set; A CP state corresponding to each voltage value in the corrected second voltage value set is determined.
[0072] It is understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of the present application. The technical solutions of the present application can also be applied to other scenarios. For example, it is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0073] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The modules in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs.
[0074] In the present application, the same or similar terminology concepts, technical solutions and / or application scenario descriptions are generally described in detail only the first time they appear. When they appear again later, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of the present application, for the same or similar terminology concepts, technical solutions and / or application scenario descriptions that are not described in detail later, reference can be made to the previous related detailed descriptions.
[0075] In the present application, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0076] The various technical features of the technical solution of the present application can be arbitrarily combined. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.
[0077] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by the computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a storage disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state storage disk Solid State Disk), etc.
[0078] The above is a detailed introduction to a CP voltage detection method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A CP voltage detection method, characterized in that: include: Continuously acquiring a plurality of measured voltage values within a preset time period through the ADC to obtain a first voltage value set; calculating an initial voltage value according to the first voltage value set, and moving on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate a plurality of reference voltage values to obtain a second voltage value set; Modifying the second voltage value set according to the maximum value and the minimum value in the first voltage value set and the maximum value and the minimum value in the second voltage value set; A CP state corresponding to each voltage value in the corrected second voltage value set is determined.
2. The CP voltage detection method according to claim 1, characterized in that: Calculating an initial voltage value according to the first voltage value set includes: determining a target position in a first set of voltage values; The initial voltage value is calculated according to a preset convolution kernel and a measured voltage value at a target position.
3. The CP voltage detection method according to claim 2, characterized in that: After obtaining a plurality of reference voltage values, the method further includes: Calculating a first preset number and a second preset number according to the width of the sliding window and the number of measured voltage values; Adding a first preset number of first filling values before the plurality of reference voltage values; A second preset number of second filling values are added after the plurality of reference voltage values.
4. The CP voltage detection method according to claim 1, characterized in that: The second voltage value set is modified according to the maximum value and the minimum value in the first voltage value set and the maximum value and the minimum value in the second voltage value set, including: Calculating a first deviation value according to a maximum value in the first voltage value set and a maximum value in the second voltage value set; Calculating a second deviation value according to a minimum value in the first voltage value set and a minimum value in the second voltage value set; If the first deviation value or the second deviation value is greater than a preset value, the maximum value or the minimum value in the first voltage value set is eliminated, and the second voltage value set is updated; The step of updating the second voltage value set is repeatedly performed until the updated first deviation value and the updated second deviation value are both smaller than the preset value, so as to complete the correction of the second voltage value set.
5. The CP voltage detection method according to claim 1, characterized in that: Determining a CP state corresponding to each voltage value in the corrected second voltage value set includes: Determine a preset interval corresponding to each voltage value in the corrected second voltage value set; The state parameter corresponding to the preset interval is obtained as the current CP state.
6. The CP voltage detection method according to claim 2, characterized in that: The specific process of calculating the initial voltage value includes: The calculation formula of the preset convolution kernel C is: C=(c1,c2,……,c n )=(1 / n, 1 / n,……, 1 / n), Among them, c1, c2, ..., c n is the element in the convolution kernel, n is the width of the sliding window, and n<m-1, m is the number of measured voltage values; The initial voltage value vb i The calculation formula is: vb i =C×V n / 2 Where i=n / 2, n / 2 is the starting bit in the first voltage value set V, V n / 2 are n elements extracted from the start bit in the first voltage value set V.
7. The CP voltage detection method according to claim 6, characterized in that: The specific process of calculating multiple reference voltage values includes: Set n / 2+p again as the starting bit in the first voltage value set V, where n / 2<p<mn / 2, to obtain V n / 2+p are n elements extracted from the starting position in the first voltage value set V; The reference voltage value vb i+p The calculation formula is: vb i+p =C×V n / 2+p 。 8. A CP voltage detection device, characterized in that: include: An acquisition module, configured to continuously acquire a plurality of measured voltage values within a preset time period through the ADC to obtain a first voltage value set; a calculation module, configured to calculate an initial voltage value according to the first voltage value set, and to move on the first voltage value set in a sliding window manner based on the initial voltage value to cyclically calculate a plurality of reference voltage values, so as to obtain a second voltage value set; a correction module, configured to correct the second voltage value set according to a maximum value and a minimum value in the first voltage value set and a maximum value and a minimum value in the second voltage value set; The determination module is used to determine the CP state corresponding to each voltage value in the corrected second voltage value set.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor executes the steps in the CP voltage detection method according to any one of claims 1 to 7 by calling the computer program stored in the memory.
10. A storage medium, characterized in that: The storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the CP voltage detection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Charging pile CP signal voltage detection method and device
CN113655268A
Insulation resistance value detection method during connection of power battery of electric vehicle
CN113655278A
Method for collecting signals of control guide circuit of alternating current charging equipment
CN113879164A
Charging two-way safety control method and system, computer equipment and storage medium
CN114475337A
AC charging pile CP voltage detection method
CN117250400A