ID voltage multistage filtering method and system, storage medium and electric vehicle
By combining an analog-to-digital converter and a median filter with voltage calibration and timing anti-jitter mechanisms, the problem of insufficient filtering or excessive smoothing in existing filtering schemes during MCS charging is solved, achieving accurate detection of the ID voltage signal and stable system operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QIJING INFORMATION TECHNOLOGY (SHANGHAI) CO LTD
- Filing Date
- 2026-04-08
- Publication Date
- 2026-05-05
AI Technical Summary
Existing filtering schemes cannot be optimized and adjusted according to the actual noise level and signal characteristics, resulting in insufficient filtering or excessive smoothing during MCS charging. They cannot achieve a dynamic balance between noise suppression and rapid response to state changes, and lack confirmation of the time dimension of state changes, which affects system stability and reliability.
The ID voltage signal is periodically sampled using an analog-to-digital converter, filtered using a median filter with a fixed window size, and converted into millivolt-level voltage values through voltage calibration and linear conversion. Combined with graded judgment and timed anti-jitter mechanism, the accuracy of state changes is ensured; in abnormal connection state, cumulative counting triggers protection processing to prevent false judgment.
It effectively suppresses the effects of electromagnetic interference and transient noise, maintains a rapid response capability to changes in connection status, and improves the accuracy of charging connection status detection and the reliability of system operation.
Smart Images

Figure CN121978392A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electric vehicle charging technology, specifically to an ID voltage multi-level filtering method, system, storage medium, and electric vehicle. Background Technology
[0002] With the continuous growth of electric vehicle ownership and the rapid evolution of high-power fast charging technology, megawatt-level charging systems (MCS) are gradually becoming an important development direction for electric vehicle charging technology due to their extremely high charging power and significant commercial application prospects. During MCS charging, the system needs to operate under extremely high voltage and high current conditions. Therefore, the accuracy, real-time, and reliable detection of the physical connection status between the charging connector and the vehicle charging interface directly affects the safety, stability, and efficiency of the entire charging process. Deviations in the detection signal can easily lead to poor contact, resulting in electric arcs, localized overheating, and even serious safety hazards such as fires. In MCS charging systems, connection status detection typically relies on monitoring the ID voltage signal, which is generated by the detection circuit within the charging interface. Its voltage value reflects the physical connection status between the connector and the vehicle interface. However, due to the complexity of MCS charging application scenarios, the ID voltage signal is inevitably affected by a variety of external factors during the acquisition process, including strong electromagnetic environment, mechanical vibration and changes in ambient temperature and humidity. These interferences are superimposed on the original detection signal, causing signal fluctuations and noise, which increases the difficulty of accurately judging the actual connection status.
[0003] Currently, ID voltage detection signals typically require filtering to reduce interference and obtain a relatively stable basis for judgment. However, existing filtering schemes have significant drawbacks. First, fixed-parameter filters cannot be optimized and adjusted according to actual noise levels and signal characteristics. During MCS charging, noise characteristics vary significantly across different stages and operating conditions. Strong transient interference exists at the start of charging and during load surges, while continuous random interference exists during the stable charging phase. Fixed-parameter filters cannot differentiate for these different operating conditions, leading to insufficient filtering and residual noise affecting judgment accuracy in some cases, while in others, they may over-smooth the signal and mask the true state changes. Second, there is an inherent contradiction between filtering effectiveness and response speed. A greater filtering depth results in a greater response delay, while a smaller filtering depth results in a faster response but a worse filtering effect. Existing schemes use fixed filtering parameters, making it impossible to achieve a dynamic balance between the need for strong filtering to suppress noise and the need for rapid response to state changes. Especially when connection states change rapidly, this can lead to state detection delays, affecting the system's timely response to abnormal situations. Third, the existing solution lacks a mechanism to confirm the time dimension of state changes. It only smooths the signal from the amplitude dimension, which cannot effectively distinguish between short-term transient fluctuations and real connection state changes. It is easy for a single interference to cause frequent state jumps, affecting the stability and reliability of the system. Summary of the Invention
[0004] This application provides an ID voltage multi-level filtering method, system, storage medium, and electric vehicle, which can effectively suppress the influence of electromagnetic interference and transient noise on the ID voltage signal, while maintaining a fast response capability to changes in connection status, improving the accuracy of charging connection status detection and the reliability of system operation.
[0005] In a first aspect, embodiments of this application provide a multi-level filtering method for ID voltage, including: The ID voltage analog signal is periodically sampled using an analog-to-digital converter to obtain the raw ADC data; The original ADC data is filtered using a median filter with a fixed window size to obtain the filtered output value; The filtered output value is calibrated and linearly converted to a millivolt level voltage value. The current connection status is output by classifying and determining the voltage range within which the millivolt-level voltage value is located. When the current connection status is a normal connection status and the status changes, a timed debouncing mechanism is activated, and the status update is only confirmed after the status change has lasted for a preset time. When the current connection state is an abnormal connection state, the consecutive occurrences of abnormal connection states are cumulatively counted. When the cumulative number reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal.
[0006] In the ID voltage multi-level filtering method provided in this application embodiment, the step of performing voltage calibration and linear conversion on the filtered output value to convert it into a millivolt-level voltage value includes: Based on the characteristics of the hardware circuit, the filtered output value is numerically converted using a fixed calibration coefficient to obtain a millivolt-level voltage value. The conversion relationship is: adc_value_id = (id_filtered / 0.61) + 0.5, where id_filtered is the median filtered output value, 0.61 is the calibration coefficient related to the resistor voltage divider and the ADC reference voltage, +0.5 is used for rounding, and adc_value_id is the output millivolt-level voltage value.
[0007] In the ID voltage multi-level filtering method provided in this application embodiment, the step of performing graded determination based on the preset voltage range in which the millivolt-level voltage value is located, and outputting the corresponding current connection state, includes: The millivolt-level voltage value is compared with multiple preset voltage ranges to determine the current connection status; When the millivolt-level voltage value falls within any of the preset voltage ranges, the corresponding normal connection status is output. When the millivolt-level voltage value exceeds all the preset voltage ranges, an abnormal connection status is output.
[0008] In the ID voltage multi-level filtering method provided in this application embodiment, the preset voltage range and its corresponding normal connection state include: 0–100mV corresponds to the unconnected state ID_STATE_UNMATED; 740–1370mV corresponds to the connected state ID_STATE_MATED; 8.4–32V corresponds to the connected state ID_STATE_MATED_EVAUX, which is powered by the electric vehicle's auxiliary power supply; 21–26.4V corresponds to the connected state ID_STATE_MATED_EVSEAUX, which is powered by the charging pile's auxiliary power supply.
[0009] In the ID voltage multi-level filtering method provided in this application embodiment, when the current connection state is a normal connection state and the state changes, a timed debouncing mechanism is activated, and the state update is confirmed only after the state change has lasted for a preset time, including: When the current connection state is a normal connection state, the current connection state is compared with the historical connection state at the previous moment; When the current connection state is inconsistent with the historical connection state, the debouncing confirmation process is triggered; Start the software timer and set the anti-shake confirmation time; During the anti-shake confirmation time, the current connection status is continuously monitored; If the current connection state remains in the new state after the change during the anti-shake confirmation time, the state change will be confirmed as valid after the timer expires, and the system state will be updated to the new state. If the current connection state bounces back or changes again within the anti-shake confirmation time, the current state change is canceled, the timer is stopped, and the anti-shake process is reset.
[0010] In the ID voltage multi-level filtering method provided in this application embodiment, when the current connection state is an abnormal connection state, the method involves accumulating and counting consecutively occurring abnormal connection states, triggering protection processing when the accumulated count reaches a preset threshold, and resetting the count to zero after the voltage returns to normal. This includes: When the current connection state is an abnormal connection state, increment the abnormality counter by 1; When the current connection state is restored to the normal connection state, the abnormality counter is cleared. After each increment of the exception counter, the current value of the exception counter is compared with a preset threshold. If the current value of the anomaly counter is less than the preset threshold, the monitoring state will continue and the protection process will not be triggered. If the current value of the abnormality counter reaches or exceeds a preset threshold, a protection process is triggered, which includes outputting an alarm signal or performing a stop charging operation. After the protection process is triggered, the current connection status is continuously monitored. Once the current connection status returns to a normal and stable state, the abnormality counter is cleared, allowing the system to resume normal monitoring.
[0011] In the ID voltage multi-level filtering method provided in this application embodiment, the step of using a median filter with a fixed window size to filter the original ADC data to obtain a filtered output value includes: A circular buffer is used to store the raw ADC data obtained from the most recent N samples, where N is a preset fixed window size; Whenever a new raw ADC data is acquired, the new raw ADC data is stored in the circular buffer, overwriting the target raw ADC data within the fixed window; A sorting operation is performed on the N raw ADC data currently stored in the circular buffer to obtain a sorted data sequence; Select the data value located in the middle position from the sorted data sequence as the filter output value.
[0012] Secondly, embodiments of this application provide an ID voltage multi-stage filtering system, including: The signal acquisition module is used to periodically sample the ID voltage analog signal through an analog-to-digital converter to obtain the raw ADC data; The primary filtering module is used to filter the raw ADC data using a median filter with a fixed window size to obtain the filtered output value; The voltage calibration module is used to perform voltage calibration and linear conversion on the filtered output value, converting it into a millivolt-level voltage value. The classification determination module is used to classify and determine the current connection status based on the preset voltage range in which the millivolt voltage value is located. The anti-shake confirmation module is used to activate a timed anti-shake mechanism when the current connection status is a normal connection status and the status changes, and only confirm the status update after the status change has lasted for a preset time. The abnormality protection module is used to accumulate and count the consecutive abnormal connection states when the current connection state is an abnormal connection state. When the accumulated number reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal.
[0013] Thirdly, this application provides a storage medium storing a plurality of instructions adapted for loading by a processor to execute the ID voltage multi-level filtering method described in any of the preceding claims.
[0014] Fourthly, this application provides an electric vehicle, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the ID voltage multi-level filtering method described in any of the preceding claims.
[0015] In summary, the ID voltage multi-level filtering method provided in this application includes periodically sampling the ID voltage analog signal using an analog-to-digital converter to obtain raw ADC data; filtering the raw ADC data using a median filter with a fixed window size to obtain a filtered output value; performing voltage calibration and linear conversion on the filtered output value to convert it into a millivolt-level voltage value; classifying and outputting the corresponding current connection status according to the preset voltage range in which the millivolt-level voltage value is located; when the current connection status is a normal connection status and the status changes, activating a timed anti-jitter mechanism, confirming the status update only after the status change lasts for a preset time; when the current connection status is an abnormal connection status, accumulating and counting consecutively occurring abnormal connection statuses, triggering protection processing when the accumulated number reaches a preset threshold, and resetting the count to zero after the voltage returns to normal. This application embodiment can effectively suppress the influence of electromagnetic interference and transient noise on the ID voltage signal, while maintaining a rapid response capability to changes in connection status, improving the accuracy of charging connection status detection and the reliability of system operation. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram illustrating an application scenario of the ID voltage multi-stage filtering method provided in this application embodiment.
[0018] Figure 2 This is a flowchart illustrating the multi-stage filtering method for ID voltage provided in an embodiment of this application.
[0019] Figure 3 This is a schematic diagram of the ID voltage multi-stage filtering system provided in the embodiments of this application.
[0020] Figure 4 This is a schematic diagram of the structure of an electric vehicle provided in an embodiment of this application. Detailed Implementation
[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of systems and methods consistent with some aspects of this application as detailed in the appended claims.
[0022] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0023] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0024] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0025] In the description of this application, it should be noted that the terms "upper," "lower," "left," "right," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and for simplifying the description, and do not indicate or imply that the system or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. In addition, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0026] Currently, ID voltage detection signals typically require filtering to reduce interference and obtain a relatively stable basis for judgment. However, existing filtering schemes have significant drawbacks. First, fixed-parameter filters cannot be optimized and adjusted according to actual noise levels and signal characteristics. During MCS charging, noise characteristics vary significantly across different stages and operating conditions. Strong transient interference exists at the start of charging and during load surges, while continuous random interference exists during the stable charging phase. Fixed-parameter filters cannot differentiate for these different operating conditions, leading to insufficient filtering and residual noise affecting judgment accuracy in some cases, while in others, they may over-smooth the signal and mask the true state changes. Second, there is an inherent contradiction between filtering effectiveness and response speed. A greater filtering depth results in a greater response delay, while a smaller filtering depth results in a faster response but a worse filtering effect. Existing schemes use fixed filtering parameters, making it impossible to achieve a dynamic balance between the need for strong filtering to suppress noise and the need for rapid response to state changes. Especially when connection states change rapidly, this can lead to state detection delays, affecting the system's timely response to abnormal situations. Third, the existing solution lacks a mechanism to confirm the time dimension of state changes. It only smooths the signal from the amplitude dimension, which cannot effectively distinguish between short-term transient fluctuations and real connection state changes. It is easy for a single interference to cause frequent state jumps, affecting the stability and reliability of the system.
[0027] Based on this, embodiments of this application provide an ID voltage multi-level filtering method, system, storage medium, and electric vehicle. Specifically, the ID voltage multi-level filtering system can be integrated into an electric vehicle.
[0028] For example, such as Figure 1 As shown, an electric vehicle can periodically sample the ID voltage analog signal using an analog-to-digital converter (ADC) to obtain raw ADC data. A median filter with a fixed window size is used to filter the raw ADC data, yielding a filtered output value. The filtered output value is then calibrated and linearly converted to a millivolt-level voltage value. Based on the preset voltage range of the millivolt-level voltage value, a graded judgment is made, and the corresponding current connection status is output. When the current connection status is normal and the status changes, a timed debouncing mechanism is activated, confirming the status update only after the status change has lasted for a preset time. When the current connection status is abnormal, consecutive abnormal connection statuses are cumulatively counted. When the cumulative count reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal.
[0029] The technical solutions shown in this application will be described in detail below through specific embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the priority of the embodiments.
[0030] Please see Figure 2 , Figure 2 This is a flowchart illustrating the multi-stage ID voltage filtering method provided in this application embodiment. This multi-stage ID voltage filtering method can be applied to the charging connection status detection process of a megawatt-level charging system for electric vehicles, and is used to perform multi-stage filtering processing on the ID voltage signal. The specific flow of this multi-stage ID voltage filtering method is as follows: 101. Periodically sample the ID voltage analog signal using an analog-to-digital converter to obtain the raw ADC data.
[0031] In this embodiment, the ID voltage analog signal originates from the detection circuit within the MCS charging interface. This ID voltage analog signal reflects the physical connection status between the charging connector and the vehicle charging interface. To convert this ID voltage analog signal into a digital signal for subsequent processing, it can be periodically sampled via the analog-to-digital converter channel eADC_CH_ID. The sampling period is consistent with the system task scheduling period, for example, set to 10ms, to ensure the real-time performance and determinism of signal processing.
[0032] In the specific implementation process, ADC channel selection, conversion initiation, and result acquisition can be completed by calling the analog-to-digital conversion function. Due to the potential superposition of high-frequency electromagnetic interference, power frequency coupling noise, and contact resistance fluctuations caused by mechanical vibration on the ID voltage signal transmission path, jitter may exist in a single sampling result.
[0033] Therefore, in some embodiments, the sampled raw ADC data can be averaged or subjected to extreme value processing based on the characteristics of the ADC channel. For example, when the ADC channel is mainly affected by white noise interference, multiple sampling and averaging can be used to reduce noise; when it is necessary to capture transient boundary conditions, the maximum or minimum value among multiple samples can be taken. This preprocessing method can preliminarily eliminate obviously abnormal sampling points using the redundant information of the hardware sampling process before the signal enters the digital filtering stage, reducing the computational burden of subsequent filtering processing.
[0034] In a practical application embodiment, when an electric vehicle is plugged into the MCS charging gun, the detection circuit within the charging interface generates an ID voltage analog signal. The system continuously acquires this signal with a period of 10ms, sampling it four times consecutively each time and taking the average value as the raw ADC data for that period, thereby effectively suppressing single-sample fluctuations caused by vibration at the moment of contact.
[0035] 102. Use a median filter with a fixed window size to filter the original ADC data to obtain the filtered output value.
[0036] In this embodiment, a median filter with a fixed window size can be used to perform primary digital filtering on the raw ADC data. As a nonlinear filter, the median filter can effectively suppress impulse noise while preserving the edge features of the signal, which is crucial for a fast response when connection states change abruptly.
[0037] Specifically, a circular buffer can be used to store the raw ADC data obtained from the most recent N samples, where N is a preset fixed window size. For example, N can be 5, 7, or 9. This value is pre-calibrated based on the actual noise characteristics and response requirements of the system and remains unchanged during system operation.
[0038] Then, whenever new raw ADC data is acquired, it is stored in a circular buffer, overwriting the target raw ADC data within the fixed window, thus implementing data updates for the sliding window. It can be understood that the target raw ADC data refers to the oldest raw ADC data within the fixed window.
[0039] Subsequently, a sorting operation is performed on the N raw ADC data currently stored in the circular buffer to obtain a sorted data sequence, and the data value in the middle position is selected from the sorted data sequence as the filtered output value.
[0040] In some embodiments, when the MCS charging system is in a high-power charging state, the high-frequency switching action of the power circuit will generate pulse-like electromagnetic interference on the detection signal line. If an abnormal peak value appears in a certain sample due to electromagnetic interference, since this peak value is an extreme value among the N data points, it will not be in the middle position after sorting, and therefore it will be effectively removed by the median filter. At the same time, since the fixed window size is fixed and appropriate, when the current connection state changes, the filtered output value can quickly follow the changed sample value, avoiding the response delay caused by an excessively large fixed window.
[0041] 103. Perform voltage calibration and linear conversion on the filtered output value to convert it into a millivolt-level voltage value.
[0042] In this embodiment, by performing voltage calibration and linear conversion on the filtered output value, it is converted into a millivolt-level voltage value with physical meaning, which can provide a unified data benchmark for subsequent classification judgment.
[0043] Specifically, the filtered output value can be numerically converted using a fixed calibration coefficient based on the characteristics of the hardware circuit, thereby obtaining a millivolt-level voltage value.
[0044] The conversion relationship is: adc_value_id = (id_filtered / 0.61) + 0.5.
[0045] In the above conversion relationship, id_filtered is the median filtered output value, 0.61 is the calibration coefficient related to the resistor voltage divider and the ADC reference voltage, +0.5 is used to perform rounding, and adc_value_id is the output millivolt-level voltage value.
[0046] The physical meaning of this conversion relationship lies in the fact that a voltage divider resistor network exists in the hardware circuit, and its voltage division ratio, together with the ADC's reference voltage, determines the linear relationship between the ADC's original value and the actual voltage. The calibration coefficient of 0.61 is the result of reverse modeling of this hardware link, ensuring that the converted voltage value accurately reflects the actual ID voltage. Rounding controls the numerical quantization error, ensuring that the final output millivolt-level voltage value maintains sufficient resolution while avoiding frequent state jumps caused by low-bit fluctuations.
[0047] For example, in one embodiment, when the filtered output value is 500, the calculated value using the above conversion relationship is adc_value_id = (500 / 0.61) + 0.5 ≈ 820.2, which, after rounding, becomes 820mV. This value represents the current ID voltage as approximately 820 millivolts. This voltage value is stored in the system's shared data structure for subsequent classification and determination tasks to read.
[0048] 104. Based on the preset voltage range in which the millivolt-level voltage value is located, classify and determine the current connection status accordingly.
[0049] In some embodiments, a millivolt-level voltage value can be compared with multiple preset voltage ranges to determine the current connection status. Specifically, when the millivolt-level voltage value falls within any preset voltage range, a normal connection status is output; when the millivolt-level voltage value exceeds all preset voltage ranges, an abnormal connection status is output.
[0050] In this embodiment, the preset voltage range and its corresponding normal connection state are shown in the following table:
[0051] It should be noted that the correspondence between the above-mentioned preset voltage ranges and normal connection states can be determined based on the hardware specifications of the MCS charging interface. Specifically, 0–100mV corresponds to the unconnected state; 740–1370mV corresponds to the connected state; 8.4–32V corresponds to the connected state with the electric vehicle's auxiliary power supply; and 21–26.4V corresponds to the connected state with the charging pile's auxiliary power supply.
[0052] In some embodiments, when the user inserts the charging gun into the vehicle's charging port, the system calculates a millivolt-level voltage value of 980mV, which falls within the 740–1370mV range. Therefore, the current connection status is output as ID_STATE_MATED, indicating that the charging connector has completed a physical connection with the vehicle interface. When the electric vehicle's auxiliary power supply is activated during charging, the ID voltage rises to 15V, falling within the 8.4–32V range. The current connection status is updated to ID_STATE_MATED_EVAUX, indicating that the connection is established and the electric vehicle's auxiliary power supply has started supplying power. If the ID voltage drops to 5V due to a hardware failure, and this value is not within any preset range, an abnormal connection status is output.
[0053] 105. When the current connection status is normal and the status changes, the timed debounce mechanism is activated, and the status update is only confirmed after the status change has lasted for a preset time.
[0054] In this embodiment, to avoid frequent changes in the filter voltage determination result due to transient interference or short-term fluctuations, a redundant confirmation mechanism in the time dimension is introduced when the graded determination result changes. Specifically, when the current connection state is a normal connection state, the current connection state is compared with the historical connection state at the previous moment; when the current connection state is inconsistent with the historical connection state, the anti-jitter confirmation process is triggered.
[0055] The anti-shake confirmation process is as follows: Start a software timer and set the anti-shake confirmation time; during the anti-shake confirmation time, continuously monitor the current connection status; if the current connection status remains the new status after the change during the anti-shake confirmation time, the status change is confirmed to be valid after the timer expires, and the system status is updated to the new status; if the current connection status bounces back or changes again during the anti-shake confirmation time, the status change is canceled, the timer is stopped, and the anti-shake process is reset.
[0056] It should be noted that the stabilization confirmation time can be set according to the system response requirements, for example, to 1 second.
[0057] For example, in one practical application, when a user unplugs the charging gun, the ID voltage drops rapidly from 980mV to 50mV. The classification judgment module first detects that the current connection state changes from ID_STATE_MATED to ID_STATE_UNMATED, triggering the anti-shake confirmation process. The system starts a 1-second timer and continuously monitors the current connection state for the next second. Since the unplugging action is continuous, the ID voltage stabilizes at 50mV, and the current connection state remains ID_STATE_UNMATED. After 1 second, the timer expires, the system confirms the state change is valid, and updates the system state to an unconnected state. In another scenario, if electromagnetic interference causes the ID voltage to fluctuate instantaneously to 50mV and then quickly recover to 980mV, the current connection state only changes to ID_STATE_UNMATED for a short time before jumping back to ID_STATE_MATED. The state changes during the anti-shake confirmation process, and the system cancels this state change, avoiding misjudgment caused by transient interference.
[0058] 106. When the current connection status is abnormal, the consecutive occurrences of abnormal connection status are counted cumulatively. When the cumulative number reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal.
[0059] In this embodiment, an anomaly statistics and protection mechanism is introduced to distinguish between intermittent anomalies and persistent faults, thereby improving the system's fault tolerance and security. Specifically, when the current connection state is an abnormal connection state, the anomaly counter is incremented by 1; when the current connection state returns to a normal connection state, the anomaly counter is cleared.
[0060] In addition, after each error counter increments by 1, the current value of the error counter is compared with a preset threshold. If the current value of the error counter is less than the preset threshold, the monitoring status is maintained and no protection process is triggered. If the current value of the error counter reaches or exceeds the preset threshold, the protection process is triggered, which includes outputting an alarm signal or performing a stop charging operation.
[0061] It should be noted that this preset threshold is a pre-set upper limit for the number of consecutive abnormalities, such as 3 or 5 times.
[0062] After the protection process is triggered, the current connection status is continuously monitored. Once the current connection status returns to a normal and stable state, the abnormal counter is cleared, allowing the system to resume normal monitoring.
[0063] In one practical application embodiment, when the ID voltage momentarily fluctuates into the abnormal range due to mechanical vibration during charging, the abnormality counter increments by 1. However, if it does not reach the preset threshold of 3 times, the system only records the abnormality without triggering protection, thus avoiding charging interruption due to occasional vibration. If the charging interface experiences a persistent fault, and the ID voltage remains in the abnormal range for 4 consecutive sampling cycles, the abnormality counter accumulates to 4, reaching the preset threshold. In this case, the system triggers protection processing, outputs an alarm signal, and stops charging to prevent safety risks caused by connection abnormalities. After the fault is cleared, the ID voltage returns to normal, the abnormality counter is reset to zero, and the system resumes monitoring.
[0064] The ID voltage multi-level filtering method provided in this application suppresses impulse noise in the amplitude domain through median filtering, filters out transient fluctuations in the time domain through a timing anti-jitter mechanism, and distinguishes between occasional interference and continuous faults through an anomaly statistics mechanism, thus forming a complete processing link from signal acquisition to status output.
[0065] In summary, the ID voltage multi-level filtering method provided in this application includes periodically sampling the ID voltage analog signal through an analog-to-digital converter to obtain raw ADC data; filtering the raw ADC data using a median filter with a fixed window size to obtain a filtered output value; performing voltage calibration and linear conversion on the filtered output value to convert it into a millivolt-level voltage value; classifying and determining the current connection status according to the preset voltage range in which the millivolt-level voltage value is located; when the current connection status is a normal connection status and the status changes, activating a timed debouncing mechanism, confirming the status update only after the status change has lasted for a preset time; when the current connection status is an abnormal connection status, accumulating and counting consecutively occurring abnormal connection statuses, triggering protection processing when the accumulated number reaches a preset threshold, and resetting the count to zero after the voltage returns to normal.
[0066] This application embodiment achieves deep suppression of interference signals in both the amplitude and time domains through the synergistic effect of a multi-level processing architecture. Specifically, median filtering effectively suppresses impulse noise introduced by electromagnetic interference using nonlinear characteristics, while preserving signal edge features; a timing anti-jitter mechanism filters out short-term transient fluctuations in the time dimension, avoiding frequent state jumps; and an anomaly statistics mechanism distinguishes between occasional anomalies and persistent faults through continuous counting, preventing false protection. Simultaneously, by reasonably selecting the fixed window size and anti-jitter time parameters, good response characteristics are maintained, ensuring that real connection state changes can be identified and confirmed in a timely manner. Therefore, this application embodiment can effectively suppress the influence of electromagnetic interference and transient noise on the ID voltage signal, while maintaining a rapid response capability to connection state changes, improving the accuracy of charging connection state detection and the reliability of system operation.
[0067] To facilitate better implementation of the ID voltage multi-stage filtering method provided in this application, this application also provides an ID voltage multi-stage filtering system. The meanings of the terms used are the same as in the aforementioned ID voltage multi-stage filtering method, and specific implementation details can be found in the descriptions within the method embodiments.
[0068] Please see Figure 3 , Figure 3 This is a schematic diagram of the ID voltage multi-stage filtering system provided in an embodiment of this application. The ID voltage multi-stage filtering system may include a signal acquisition module 201, a primary filtering module 202, a voltage calibration module 203, a graded judgment module 204, a jitter confirmation module 205, and an anomaly protection module 206. The signal acquisition module 201 is used to periodically sample the ID voltage analog signal through an analog-to-digital converter to obtain the raw ADC data; The primary filtering module 202 is used to filter the raw ADC data using a median filter with a fixed window size to obtain the filtered output value; The voltage calibration module 203 is used to perform voltage calibration and linear conversion on the filtered output value, converting it into a millivolt-level voltage value. The classification determination module 204 is used to make a classification determination based on the preset voltage range in which the millivolt-level voltage value is located, and output the corresponding current connection status. The anti-shake confirmation module 205 is used to activate the timed anti-shake mechanism when the current connection status is a normal connection status and the status changes, and only confirm the status update after the status change has lasted for a preset time. The abnormal protection module 206 is used to accumulate the count of consecutive abnormal connection states when the current connection state is an abnormal connection state. When the accumulated number reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal.
[0069] For specific implementation methods of each of the above units, please refer to the embodiments of the ID voltage multi-stage filtering method described above, which will not be repeated here.
[0070] In summary, the ID voltage multi-level filtering system provided in this application embodiment can periodically sample the ID voltage analog signal through the signal acquisition module 201 using an analog-to-digital converter to obtain the original ADC data; the primary filtering module 202 uses a median filter with a fixed window size to filter the original ADC data to obtain the filtered output value; the voltage calibration module 203 performs voltage calibration and linear conversion on the filtered output value to convert it into a millivolt-level voltage value; the classification judgment module 204 performs classification judgment according to the preset voltage range in which the millivolt-level voltage value is located and outputs the corresponding current connection status; the anti-jitter confirmation module 205 starts a timed anti-jitter mechanism when the current connection status is a normal connection status and the status changes, and only confirms the status update after the status change lasts for a preset time; the anomaly protection module 206 accumulates the count of consecutively occurring abnormal connection statuses when the current connection status is an abnormal connection status, triggers protection processing when the accumulated number reaches a preset threshold, and resets the count after the voltage returns to normal. The embodiments of this application can effectively suppress the influence of electromagnetic interference and transient noise on the ID voltage signal, while maintaining a fast response capability to changes in connection status, improving the accuracy of charging connection status detection and the reliability of system operation.
[0071] This application also provides an electric vehicle in which the ID voltage multi-stage filtering system of this application can be integrated, such as... Figure 4 As shown, it illustrates a structural schematic diagram of an electric vehicle according to an embodiment of this application. Specifically: The electric vehicle may include components such as a processor 301 with one or more processing cores and a memory 302 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 4 The electric vehicle structure shown does not constitute a limitation on the electric vehicle and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Wherein: The processor 301 is the control center of the electric vehicle. It connects various parts of the electric vehicle via various interfaces and lines. By running or executing software programs stored in the memory 302 and / or this application, and by calling data stored in the memory 302, it performs various functions and processes data of the electric vehicle, thereby providing overall monitoring of the electric vehicle. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operation of the storage medium, user interface, and application programs, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.
[0072] The memory 302 can be used to store software programs and this application. The processor 301 executes various functional applications and data processing by running the software programs and this application stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store applications required for operating the storage medium and at least one function; the data storage area may store data created based on the use of the electric vehicle. In addition, the memory 302 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0073] Although not shown, the electric vehicle may also include a display unit, an input unit, and a power supply, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electric vehicle loads the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302 to realize various functions, as follows: The ID voltage analog signal is periodically sampled using an analog-to-digital converter to obtain the raw ADC data; The original ADC data is filtered using a median filter with a fixed window size to obtain the filtered output value; The filtered output value is calibrated and linearly converted to a millivolt level voltage value. The current connection status is output by classifying and determining the voltage range within which the millivolt-level voltage value falls; When the current connection status is normal and the status changes, a timed debouncing mechanism is activated, and the status update is only confirmed after the status change has lasted for a preset time. When the current connection status is abnormal, the system accumulates a count of consecutive abnormal connection statuses. When the accumulated count reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal.
[0074] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0075] Therefore, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the methods provided in embodiments of this application. For example, the instructions can execute the following steps: The ID voltage analog signal is periodically sampled using an analog-to-digital converter to obtain the raw ADC data; The original ADC data is filtered using a median filter with a fixed window size to obtain the filtered output value; The filtered output value is calibrated and linearly converted to a millivolt level voltage value. The current connection status is output by classifying and determining the voltage range within which the millivolt-level voltage value falls; When the current connection status is normal and the status changes, a timed debouncing mechanism is activated, and the status update is only confirmed after the status change has lasted for a preset time. When the current connection status is abnormal, the system accumulates a count of consecutive abnormal connection statuses. When the accumulated count reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal.
[0076] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0077] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0078] Since the instructions stored in the storage medium can execute the steps of any method provided in the embodiments of this application, the beneficial effects that any method provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0079] The above provides a detailed description of the ID voltage multi-level filtering method, system, storage medium, and electric vehicle provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A multi-stage filtering method for ID voltage, characterized in that, include: The ID voltage analog signal is periodically sampled using an analog-to-digital converter to obtain the raw ADC data; The original ADC data is filtered using a median filter with a fixed window size to obtain the filtered output value; The filtered output value is calibrated and linearly converted to a millivolt level voltage value. The current connection status is output by classifying and determining the voltage range within which the millivolt-level voltage value is located. When the current connection status is a normal connection status and the status changes, a timed debouncing mechanism is activated, and the status update is only confirmed after the status change has lasted for a preset time. When the current connection state is an abnormal connection state, the consecutive occurrences of abnormal connection states are cumulatively counted. When the cumulative number reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal.
2. The ID voltage multi-stage filtering method as described in claim 1, characterized in that, The step of performing voltage calibration and linear conversion on the filtered output value to convert it into a millivolt-level voltage value includes: Based on the characteristics of the hardware circuit, the filtered output value is numerically converted using a fixed calibration coefficient to obtain a millivolt-level voltage value. The conversion relationship is: adc_value_id = (id_filtered / 0.61) + 0.5, where id_filtered is the median filtered output value, 0.61 is the calibration coefficient related to the resistor voltage divider and the ADC reference voltage, +0.5 is used for rounding, and adc_value_id is the output millivolt-level voltage value.
3. The ID voltage multi-stage filtering method as described in claim 1, characterized in that, The step of classifying and determining the current connection status based on the preset voltage range in which the millivolt-level voltage value is located, and outputting the corresponding current connection status, includes: The millivolt-level voltage value is compared with multiple preset voltage ranges to determine the current connection status; When the millivolt-level voltage value falls within any of the preset voltage ranges, the corresponding normal connection status is output. When the millivolt-level voltage value exceeds all the preset voltage ranges, an abnormal connection status is output.
4. The ID voltage multi-stage filtering method as described in claim 3, characterized in that, The preset voltage range and its corresponding normal connection state include: 0–100mV corresponds to the unconnected state ID_STATE_UNMATED; 740–1370mV corresponds to the connected state ID_STATE_MATED; 8.4–32V corresponds to the connected state ID_STATE_MATED_EVAUX, which is powered by the electric vehicle's auxiliary power supply; 21–26.4V corresponds to the connected state ID_STATE_MATED_EVSEAUX, which is powered by the charging pile's auxiliary power supply.
5. The ID voltage multi-stage filtering method as described in claim 1, characterized in that, When the current connection state is a normal connection state and the state changes, a timed debouncing mechanism is activated, and the state update is only confirmed after the state change has lasted for a preset time, including: When the current connection state is a normal connection state, the current connection state is compared with the historical connection state at the previous moment; When the current connection state is inconsistent with the historical connection state, the debouncing confirmation process is triggered; Start the software timer and set the anti-shake confirmation time; During the anti-shake confirmation time, the current connection status is continuously monitored; If the current connection state remains in the new state after the change during the anti-shake confirmation time, the state change will be confirmed as valid after the timer expires, and the system state will be updated to the new state. If the current connection state bounces back or changes again within the anti-shake confirmation time, the current state change is canceled, the timer is stopped, and the anti-shake process is reset.
6. The ID voltage multi-stage filtering method as described in claim 1, characterized in that, When the current connection state is an abnormal connection state, the system accumulates and counts the consecutive occurrences of abnormal connection states. When the accumulated count reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal. This includes: When the current connection state is an abnormal connection state, increment the abnormality counter by 1; When the current connection state is restored to the normal connection state, the abnormality counter is cleared. After each increment of the exception counter, the current value of the exception counter is compared with a preset threshold. If the current value of the anomaly counter is less than the preset threshold, the monitoring state will continue and the protection process will not be triggered. If the current value of the abnormality counter reaches or exceeds a preset threshold, a protection process is triggered, which includes outputting an alarm signal or performing a stop charging operation. After the protection process is triggered, the current connection status is continuously monitored. Once the current connection status returns to a normal and stable state, the abnormality counter is cleared, allowing the system to resume normal monitoring.
7. The ID voltage multi-stage filtering method as described in claim 1, characterized in that, The process of filtering the original ADC data using a median filter with a fixed window size to obtain the filtered output value includes: A circular buffer is used to store the raw ADC data obtained from the most recent N samples, where N is a preset fixed window size; Whenever a new raw ADC data is acquired, the new raw ADC data is stored in the circular buffer, overwriting the target raw ADC data within the fixed window; A sorting operation is performed on the N raw ADC data currently stored in the circular buffer to obtain a sorted data sequence; Select the data value located in the middle position from the sorted data sequence as the filter output value.
8. A multi-stage filtering system for ID voltage, characterized in that, include: The signal acquisition module is used to periodically sample the ID voltage analog signal through an analog-to-digital converter to obtain the raw ADC data; The primary filtering module is used to filter the raw ADC data using a median filter with a fixed window size to obtain the filtered output value; The voltage calibration module is used to perform voltage calibration and linear conversion on the filtered output value, converting it into a millivolt-level voltage value. The classification determination module is used to classify and determine the current connection status based on the preset voltage range in which the millivolt voltage value is located. The anti-shake confirmation module is used to activate a timed anti-shake mechanism when the current connection status is a normal connection status and the status changes, and only confirm the status update after the status change has lasted for a preset time. The abnormality protection module is used to accumulate and count the consecutive abnormal connection states when the current connection state is an abnormal connection state. When the accumulated number reaches a preset threshold, protection processing is triggered, and the count is reset to zero after the voltage returns to normal.
9. A storage medium, characterized in that, The storage medium stores multiple instructions, which are adapted for loading by a processor to execute the ID voltage multi-level filtering method according to any one of claims 1-7.
10. An electric vehicle, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the ID voltage multi-stage filtering method as described in any one of claims 1-7.
Citation Information
Patent Citations
Anti-jitter distinguishing method and device of switching value signal
CN109445423A
Power acquisition terminal state quantity management method and device
CN118381705A
CP voltage detection method and device, electronic equipment and storage medium
CN120507563A
Safe starting control method, device and equipment for bootstrap drive inverter and medium
CN121485455A
Probe power supply overcurrent protection circuit and overcurrent protection method thereof
CN121710113A