High-precision PWM dead zone effect compensation method and system
Through high-precision differential sampling, FPGA state judgment module and segmented linear compensation coefficient calculation, combined with temperature correction and least squares fit prediction, high-precision PWM dead-band effect compensation is achieved, solving the shortcomings of traditional methods under light load conditions, and improving the adaptability and accuracy of compensation.
Patent Information
- Application Number
- CN202510227030.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional PWM dead-band compensation method is susceptible to sampling noise interference under light load conditions, resulting in failure of current direction judgment and degradation of compensation effect. It does not take into account the temperature characteristics and parasitic parameters of the power device, making it difficult to meet the requirements of high-performance driving.
High-precision differential sampling and signal conditioning circuits are adopted, combined with common mode inductance suppression and parallel capacitance processing of four-terminal chip resistors, which significantly improves the anti-interference ability and accuracy of current sampling. The state judgment module implemented based on FPGA adopts three-bit binary encoding and four-state state machine structure, and is combined with the state holding counter, effectively avoiding misjudgment caused by driving signal jitter. Through the calculation of the current rate of change and the comparison of the double threshold, the current direction change characteristics of the dead time are accurately captured. The compensation coefficient calculation is performed using a segmented linear method, a temperature correction mechanism is introduced, and combined with least squares fit prediction, the accurate calculation and dynamic prediction of the compensation value are realized.
It significantly improves the adaptability and accuracy of compensation, solves the problem of difficulty in judging current direction under light load conditions, realizes more refined compensation control, and meets the requirements of high-performance driving.
Smart Images

Figure CN119727356A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of PWM control technology, and in particular to a high-precision PWM dead-zone effect compensation method and system. Background Art
[0002] PWM technology is widely used in voltage and current modulation control. However, in order to prevent power devices from short-circuiting, dead time must be inserted between the drive signals of the upper and lower bridge arm switches. Although this dead time protects the power devices, it also causes distortion of the output voltage waveform, introduces additional harmonic components, and reduces the output quality of the system. Especially in high-frequency switching applications, the proportion of dead time in the PWM cycle continues to increase, and its negative impact becomes more significant.
[0003] The traditional dead zone compensation method mainly relies on the current direction judgment and uses a fixed compensation value to suppress the dead zone effect. This method performs well under heavy load conditions, but under light load conditions, due to the small current amplitude, it is easily interfered by sampling noise, resulting in failure of current direction judgment and a significant decrease in compensation effect. In addition, the traditional method does not consider the temperature characteristics and parasitic parameters of power devices, and the compensation accuracy is difficult to meet the requirements of high-performance drives. Summary of the invention
[0004] The present invention provides a high-precision PWM dead-zone effect compensation method and system, which realizes accurate calculation and dynamic prediction of compensation values, improves the adaptability of compensation, and realizes more sophisticated compensation control.
[0005] In a first aspect, the present invention provides a high-precision PWM dead-zone effect compensation method, the high-precision PWM dead-zone effect compensation method comprising: Perform differential sampling and signal conditioning on the PWM output current to obtain the current sampling value; The driving signal is input into the FPGA state judgment module for state conversion analysis to obtain the switch state information; Extract the dead zone feature based on the current sampling value and the switch state information to obtain the dead zone effect influencing factor; According to the dead zone effect influencing factor, the compensation coefficient is calculated in a piecewise linear manner to obtain a real-time compensation value and a predicted compensation value, and the real-time compensation value and the predicted compensation value are used to compensate for the voltage drop at the dead zone position in the PWM output voltage waveform. The real-time compensation value is used for current cycle compensation, and the predicted compensation value is used for the next cycle compensation preset, thereby realizing high-precision PWM dead zone effect compensation.
[0006] In a second aspect, the present invention provides a high-precision PWM dead-zone effect compensation system, the high-precision PWM dead-zone effect compensation system comprising: The sampling unit is used to perform differential sampling and signal conditioning on the PWM output current to obtain a current sampling value; A state conversion unit is used to input the driving signal into the FPGA state judgment module for state conversion analysis to obtain switch state information; A feature extraction unit, configured to extract a dead zone feature based on the current sampling value and the switch state information to obtain a dead zone effect influencing factor; The compensation coefficient calculation unit is used to calculate the compensation coefficient in a piecewise linear manner according to the dead zone effect influencing factor to obtain a real-time compensation value and a predicted compensation value, and use the real-time compensation value and the predicted compensation value to compensate for the voltage drop at the dead zone position in the PWM output voltage waveform. The real-time compensation value is used for current cycle compensation, and the predicted compensation value is used for the next cycle compensation preset, so as to realize high-precision PWM dead zone effect compensation.
[0007] In the technical solution provided by the present invention, by adopting high-precision differential sampling and signal conditioning circuits, combined with common-mode inductance suppression and parallel capacitor processing of four-terminal chip resistors, the anti-interference ability and accuracy of current sampling are significantly improved. The state judgment module based on FPGA adopts three-bit binary coding and four-state state machine structure, and cooperates with the state holding counter to effectively avoid the misjudgment caused by the jitter of the driving signal and enhance the reliability of state judgment. A dead zone feature extraction method is proposed. Through the calculation of the current change rate and the comparison of the double threshold value, the current direction change characteristics of the dead zone time are accurately captured, and the problem of difficulty in judging the current direction under light load conditions is solved. The compensation coefficient is calculated by a piecewise linear method, the temperature correction mechanism is introduced, and the least squares fitting prediction is combined to achieve accurate calculation and dynamic prediction of the compensation value, thereby improving the adaptability of compensation. By dividing the PWM cycle into six compensation intervals, using a quadratic function relationship to distribute the compensation value, and combining the load current for dynamic adjustment, more refined compensation control is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0009] Figure 1 A schematic diagram of a flow chart of a high-precision PWM dead-zone effect compensation method provided in an embodiment of the present application; Figure 2 A schematic block diagram of the structure of a high-precision PWM dead-zone effect compensation system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0010] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0011] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change based on actual conditions.
[0012] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0013] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0014] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0015] See also Figure 1 , Figure 1 A flow chart of a high-precision PWM dead zone effect compensation method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the high-precision PWM dead-zone effect compensation method provided by the embodiment of the present application includes steps S100 to S600.
[0016] Step S100, performing differential sampling and signal conditioning on the PWM output current to obtain a current sampling value; It is understandable that the execution subject of the present invention may be a high-precision PWM dead zone effect compensation system, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0017] Specifically, a high-speed ADC in differential input mode is used to sample the PWM output current. The PWM output current contains high-frequency noise and pulse interference caused by switching characteristics. The differential input method can effectively suppress common-mode noise and improve signal quality. The high-speed ADC samples the PWM output current and obtains the original sampling data to ensure that the system can still accurately capture the transient change characteristics of the current under high-frequency operation. The original sampling data is input into the operational amplifier to amplify the signal amplitude and improve the dynamic range of the signal to meet the input requirements of the subsequent signal processing unit. The selection of the operational amplifier needs to consider low distortion, high common mode rejection ratio (CMRR) and low noise characteristics to ensure that the signal will not be affected by additional nonlinear distortion during the amplification process. The amplified sampling signal is band-pass filtered. The design of the band-pass filter needs to take into account the signal frequency band characteristics. A passive RC filter or an active op amp filter structure is selected. Its function is to suppress high-frequency noise and low-frequency drift, retain the signal frequency components that the PWM control system is concerned about, and obtain a more stable current sampling signal. The filtered sampling signal is input into the sample-and-hold circuit for holding. During the high-speed ADC sampling process, transient voltage changes may cause unstable data reading, especially in high-frequency PWM signal applications, where rapid changes in current may cause large transient interference. The use of a sample-and-hold circuit can lock the sampled value, keeping it stable during the ADC reading cycle, and ensuring the reliability of data reading. The common-mode inductor is introduced after the sample-and-hold operation to suppress common-mode interference. The basic principle of the common-mode inductor is to use its high impedance characteristics for common-mode signals to filter out common-mode interference energy while allowing differential signals to pass normally, thereby reducing the impact of external electromagnetic interference on current signals and improving the signal's anti-interference ability. A four-terminal chip resistor is used to perform parallel capacitor processing on the anti-interference sampling signal. The four-terminal chip resistor has a low parasitic inductance characteristic and can accurately measure the current signal. The introduction of parallel capacitors helps to smooth the high-frequency component, making the final sampling signal more stable and reliable.
[0018] Step S200, inputting the driving signal into the FPGA state judgment module for state conversion analysis to obtain switch state information; Specifically, the clock frequency of A times the PWM carrier frequency is used to synchronously sample the drive signal. The switching process of the PWM signal has a certain rise time and fall time. If the sampling rate is insufficient, it will lead to misjudgment or loss of key transient information. The PWM drive signal is synchronously sampled by a high-frequency clock to capture the change details of each drive signal, and the synchronous sampling signal can be obtained in the FPGA state judgment module for subsequent state analysis. A three-bit binary state encoder is constructed to encode the synchronous sampling signal to simplify the complexity of subsequent state analysis and calculation. In the encoding process, the first bit is used to indicate the current state identification, that is, to indicate the on-off status of the current power tube, the second bit is used to indicate the state stability identification, which is used to track whether the current state remains stable or is in the switching transition stage, and the third bit is used to indicate the state switching identification, that is, whether the current state has changed. The introduction of the encoding mechanism effectively reduces the redundant calculation in the state judgment, and can quickly extract key state information to form state encoding data. The state encoding data is mapped to four basic states: upper tube on and lower tube off, lower tube on and upper tube off, upper and lower tubes off, and state switching transition. Based on this, a state machine transition structure is constructed. The core of the design of this structure is to ensure that the system can accurately distinguish different power tube switch states, so as to accurately compensate for the dead zone effect. After the state machine is constructed, the time accumulation analysis of each state is performed. Therefore, a counter is started in each state in the state machine transition structure to accurately calculate its duration, and when the count accumulation value reaches the dead time threshold, the corresponding state transition operation is triggered to generate a complete state transition sequence. The state transition sequence is checked for dead time compliance. The time intervals of adjacent states are compared and checked to see if they meet the dead time requirements, that is, to ensure that the upper and lower bridge arms are not turned on at the same time or switched too early within an unallowed time. Through this comparison process, the final state transition permission signal is obtained, which is used as the final judgment standard for state switching to ensure that the switching state of the entire PWM signal always meets the expected control requirements. A state switching flag is generated according to the state transition permission signal to indicate the specific time and path information of switching from one state to another, forming complete state transition data, which contains key information such as the start time, target state, and switching time of each state. On this basis, the duration of each state in the entire PWM cycle is calculated, and these durations are converted into percentages relative to the PWM cycle to obtain the normalized state duration. The normalized state duration and state transition data are integrated into a unified data format, and are arranged and combined in the order of state code, duration count value, and switching flag bit, finally forming complete switch state information.
[0019] Step S300, extracting dead zone feature quantities based on current sampling values and switch state information to obtain dead zone effect influencing factors; Specifically, the current sampling values of the dead time are averaged to obtain the steady-state current level within the dead zone interval, thereby eliminating the influence of transient noise and obtaining smoother characteristic data. Through calculation, misjudgment caused by high-frequency interference or pulse signals can be effectively avoided, while ensuring that the data can more accurately reflect the actual dead zone influence. The average current value of the dead time is differentiated to calculate the ratio of the current change in the dead time to the dead time, that is, the current change rate. The current change rate is a key indicator to measure the influence of the dead zone effect, reflecting the transient characteristics of the current in the dead time period. Since the essence of the dead zone is the instantaneous current distortion caused by the delay of the bridge arm switch, the dynamic change characteristics of the distortion effect can be captured through differential operation, ensuring that the compensation algorithm can accurately track the dead zone influence. The sampling point of the current change rate is marked, and the timestamp information of each sampling point is aligned with the state switching flag in the switch state information to ensure that the current characteristic data is synchronized with the PWM switch state, so that the change of the current when switching between different states can be accurately analyzed. In the dead zone, in order to improve the accuracy of detection, a dual threshold comparison method is used to detect the change point of the current direction, in which the current rising edge detection threshold is set to the first target value of the rated current, and the falling edge detection threshold is set to the second target value of the rated current. Through this method, it is determined when the current starts to reverse conduction, so as to effectively extract the key features of the dead zone effect, and record the sequence number of the detected direction change point and its corresponding state code to form the direction change characteristic data. According to the direction change characteristic data, the current sign at the start and end of the dead zone is judged to obtain a more stable feature description. According to the direction change characteristic data, the specific value of the current at the boundary of the dead zone is analyzed, and its polarity at the start and end of the dead zone is judged to obtain the boundary current characteristic data. This data can reflect the specific change mode of the current under the action of the dead zone and provide more intuitive boundary conditions for compensation calculation. The boundary current characteristic data is normalized, the current value is converted into a percentage relative to the rated current, and the moment value of the current direction change point is converted into a percentage relative to the switching cycle, so as to eliminate the influence caused by different PWM frequencies, so that the dead zone characteristic data under different working conditions can be uniformly analyzed and calculated. The standardized characteristic data is stored in the data buffer area for correlation analysis. By comparing and calculating a large amount of historical data, the corresponding relationship between the dead zone impact intensity and each influencing factor is established to obtain a high-precision dead zone effect influencing factor, among which the high-precision dead zone effect influencing factor includes: current amplitude (percentage relative to the rated current), current change rate (A / μs), power device junction temperature (℃), and switching frequency (kHz).
[0020] Step S400, according to the dead zone effect influencing factor, the compensation coefficient is calculated in a piecewise linear manner to obtain a real-time compensation value and a predicted compensation value, and the real-time compensation value and the predicted compensation value are used to compensate for the voltage drop at the dead zone position in the PWM output voltage waveform. The real-time compensation value is used for current cycle compensation, and the predicted compensation value is used for the next cycle compensation preset, so as to realize high-precision PWM dead zone effect compensation.
[0021] Specifically, the current amplitude in the dead zone effect influencing factor is divided into five intervals according to the percentage of the rated current. According to different current working ranges, targeted compensation strategies are formulated respectively, so that accurate dead zone compensation can be achieved under both low current and high current working conditions. Combined with the direction change characteristic data in the dead zone effect influencing factor, the compensation coefficient reference value of each interval is corrected, because the influence of the dead zone effect will be different under different current direction changes. When there is a current direction change in the dead zone time, the compensation coefficient reference value of the corresponding interval is dynamically adjusted, and the specific adjustment amount is set as the third target value, so as to obtain a more accurate segmented compensation coefficient, ensuring that the compensation model can accurately reflect the impact of current changes on the dead zone effect. Based on the segmented compensation coefficient, a linear interpolation operation is performed, and the compensation coefficient between the segment points is linearly calculated, so that the final compensation data maintains continuity in the entire current range, avoiding mutations caused by segmentation, and making the PWM control smoother and more stable. The linear interpolation method is used to effectively reduce the discontinuity between data, while ensuring that the transition of compensation data in different intervals is more natural, so as to avoid control abnormalities caused by data mutations. Perform temperature correction on the continuous compensation data, and establish a temperature correction function based on the junction temperature of the power device. The construction of this function needs to comprehensively consider the temperature characteristics of the device and the impact of the dead zone effect on current control. Through experimental testing or simulation analysis, obtain the compensation error data under different temperature conditions, and fit the temperature correction function based on these data, so as to make real-time corrections to the compensation data and obtain more accurate real-time compensation values. Input the real-time compensation value into the least squares fitting module, and perform fitting calculation to obtain the compensation trend function, which describes the variation law of the compensation value under different working conditions, so that the system can calculate the compensation value of the next cycle based on the current compensation trend and obtain the predicted compensation value.
[0022] A PWM cycle is divided into six compensation intervals, namely, the interval before the rising dead zone, the interval in the middle of the rising dead zone, the interval after the rising dead zone, the interval before the falling dead zone, the interval in the middle of the falling dead zone and the interval after the falling dead zone. Through the interval division method, the dead zone effects of different phases can be compensated independently more accurately. At the same time, in order to ensure the validity and calculation efficiency of the compensation data, a compensation value buffer is set for each compensation interval, and a complete interval division structure is established to ensure that the subsequent compensation calculation can be optimized and adjusted based on accurate time division. The on-time statistics of each switch tube in the interval division structure are performed to analyze the working state of different switch tubes in the PWM cycle, and the on-time of each switch tube is accumulated and calculated. By calculating the ratio of the accumulated on-time of each switch tube to the PWM cycle, the on-time ratio data is obtained, which reflects the duty cycle of each switch tube in the entire PWM cycle, and can provide data support for compensation allocation, so that the compensation calculation can be reasonably adjusted for switches with different on-time lengths to ensure that the compensation value is more reasonably allocated. Based on the conduction time ratio data, the real-time compensation value and the predicted compensation value are weightedly allocated, wherein the switch tube with a larger conduction time ratio bears a larger current load, and therefore is allocated a larger compensation value, while the switch tube with a shorter conduction time is allocated a relatively smaller compensation value, thereby ensuring that the compensation strategy matches the actual current operation state and forming the initial compensation allocation data. The initial compensation allocation data is subjected to the dead zone interval compensation value distribution calculation, and the specific distribution mode of the compensation value in the dead zone interval is determined by the quadratic function relationship, wherein the compensation value at the center of the dead zone is set to twice the compensation value at the edge position, ensuring that the compensation intensity in the center of the dead zone is higher, thereby effectively reducing the current distortion problem caused by the dead zone effect, and obtaining the dead zone compensation distribution data. The dead zone compensation distribution data is corrected according to the load current of the switch tube to ensure that the compensation value is dynamically adjusted with the change of the load current, and the load correction compensation data is obtained. After the load correction is completed, in order to ensure the smoothness of the compensation value, the load correction compensation data is smoothed, thereby avoiding the PWM waveform distortion caused by the sudden change of the compensation value, and obtaining the first compensation coefficient of each compensation interval. The smoothing process uses methods such as low-pass filtering or moving average filtering to reduce the mutation components in the compensation data, so that the compensation value can achieve a smooth transition between different intervals. The first compensation coefficient of each compensation interval is reconstructed and the spectrum is analyzed to check whether the compensated PWM waveform still has a large distortion component, and the compensation effect evaluation result is obtained. If the compensation effect does not meet expectations, it is necessary to further optimize the compensation coefficient, and iteratively calculate the compensation coefficient based on the compensation effect evaluation result, that is, by continuously adjusting the compensation strategy, the harmonic component of the compensated PWM waveform is minimized, and finally the second compensation coefficient of each compensation interval is obtained.The iterative optimization process adopts a gradient descent-based optimization algorithm or a least squares fitting method to ensure that the compensation parameters can be adjusted in real time with the dynamic changes of the PWM control system, so that the final dead zone compensation strategy can maintain the best effect under different operating conditions.
[0023] The PWM output voltage model is constructed based on the first compensation coefficient of each compensation interval. The core goal of this model is to simulate the output characteristics of the PWM signal under the dead zone effect and accurately describe the influence of the compensation coefficient on the voltage waveform. Therefore, the deviation between the ideal waveform of the PWM signal and the actual waveform affected by the dead zone needs to be considered during the construction process. In order to achieve accurate modeling of dead zone compensation, the first compensation coefficient is applied to the voltage drop at the dead zone position during the numerical calculation process, that is, the corresponding compensation value is introduced during the dead zone time to simulate the output characteristics of the actual compensated PWM signal, and finally the output voltage reconstruction data is obtained, which can accurately reflect the waveform correction of the PWM signal under the compensation. Fixed-point FFT operation is performed on the output voltage reconstruction data. FFT (Fast Fourier Transform) is a mathematical tool that can efficiently analyze the spectral characteristics of the signal. Its function is to convert the time domain signal to the frequency domain, thereby extracting the harmonic components and fundamental characteristics of the PWM signal. When performing the FFT operation, the fixed-point calculation method is used to improve the calculation accuracy and reduce the consumption of computing resources, and the voltage spectrum analysis data is obtained, which can quantify the degree of distortion of the PWM signal in the frequency domain. The compensation effect evaluation index is calculated based on the voltage spectrum analysis data to quantify the actual effect of the current compensation strategy. The total harmonic distortion (THD) is calculated. THD is a key indicator for measuring the strength of the harmonic components of the PWM output signal. A higher THD value means that the signal is greatly affected by the dead zone effect and the compensation strategy needs to be further optimized. The relative error of the fundamental amplitude is calculated, that is, the deviation between the fundamental amplitude of the current PWM signal and the ideal fundamental amplitude. This indicator is used to measure the correction effect of the compensation on the fundamental component. At the same time, in order to improve the analysis accuracy, the absolute error of the fundamental phase is calculated. This error reflects the fundamental phase drift of the PWM signal. Excessive phase deviation will affect the control accuracy of PWM. Based on these calculation results, the evaluation results of the compensation effect are finally obtained. Iterative optimization parameters are generated based on the evaluation results of the compensation effect to ensure that the compensation strategy can be dynamically adjusted according to the actual situation. Therefore, the corresponding threshold standard is set, that is, when the total harmonic distortion rate THD exceeds the fourth target value, or the relative error of the fundamental amplitude exceeds the fifth target value, or the absolute error of the fundamental phase exceeds the fifth target value, the system calculates the compensation coefficient correction amount of each compensation interval according to the proportion of these errors exceeding the threshold, and obtains the compensation correction data of each compensation interval. The core principle of this correction calculation is based on the error feedback mechanism. The compensation amount is adjusted by analyzing the degree to which different errors exceed the threshold, so that the PWM signal can be closer to the ideal target in the subsequent compensation process. The compensation correction data is cumulatively analyzed, and the dynamic change trend of the dead zone effect is observed through the accumulation of data from multiple PWM cycles, so as to establish a dead zone effect evolution law model.The construction of this model is based on statistical analysis methods, such as sliding window calculation or least squares fitting, to extract the trend of the dead zone effect over time or temperature, and adjust the subsequent compensation strategy based on this model. According to the dead zone effect evolution law model, the first compensation coefficient of each compensation interval is corrected and calculated to obtain a more optimized second compensation coefficient of each compensation interval.
[0024] In the embodiment of the present invention, by adopting high-precision differential sampling and signal conditioning circuit, combined with common-mode inductance suppression and parallel capacitor processing of four-terminal chip resistors, the anti-interference ability and accuracy of current sampling are significantly improved. The state judgment module based on FPGA adopts three-bit binary coding and four-state state machine structure, and cooperates with the state holding counter to effectively avoid the misjudgment caused by the jitter of the driving signal and enhance the reliability of state judgment. A dead zone feature extraction method is proposed. Through the calculation of the current change rate and the comparison of the double threshold value, the current direction change characteristics of the dead zone time are accurately captured, and the problem of difficulty in judging the current direction under light load conditions is solved. The compensation coefficient is calculated by a piecewise linear method, the temperature correction mechanism is introduced, and the least squares fitting prediction is combined to achieve accurate calculation and dynamic prediction of the compensation value, thereby improving the adaptability of compensation. By dividing the PWM cycle into six compensation intervals, using a quadratic function relationship to distribute the compensation value, and combining the load current for dynamic adjustment, a more refined compensation control is achieved.
[0025] In a specific embodiment, the process of executing step S100 may specifically include the following steps: A high-speed ADC in differential input mode is used to sample the PWM output current to obtain the original sampling data; The original sampling data is input into the operational amplifier to amplify the signal amplitude to obtain an amplified sampling signal, and the amplified sampling signal is band-pass filtered to obtain a filtered sampling signal; The filtered sampling signal is input into the sampling and holding circuit for holding to obtain a stable sampling signal, and the common-mode inductor is used to suppress common-mode interference of the stable sampling signal to obtain an anti-interference sampling signal; Through the four-terminal chip resistor, the anti-interference sampling signal is processed in parallel with the capacitor to obtain the current sampling value.
[0026] Specifically, a high-speed ADC (analog-to-digital converter) in differential input mode is used to sample the PWM output current to obtain accurate raw sampling data. Since the PWM signal has a high switching frequency and its output current contains a rapidly changing component, the use of the differential input mode can effectively suppress common-mode noise and improve the signal-to-noise ratio. Assume that the current signal output by the PWM is , the differential signal obtained at the input of the ADC is expressed as: ; in, is the voltage signal at the ADC input, is the differential gain of the ADC; and are the positive and negative voltages of the differential input respectively. Since the dynamic range of the PWM output current is large, and the input range of the ADC is limited, the original sampled data is input to the operational amplifier for signal amplification to ensure that the signal can fully utilize the resolution of the ADC and improve the measurement accuracy. The gain of the operational amplifier is expressed as: ; in, is the amplified sampling signal; is the gain factor of the operational amplifier. For example, assuming the ADC input signal range is , and the voltage range corresponding to the PWM output current is To fully utilize the ADC input range, set the amplifier gain to , ensuring that the signal can cover the full range of the ADC. The amplified sampled signal is bandpass filtered to remove irrelevant frequency components. Assume that the transfer function of the bandpass filter is: in, is the center frequency of the filter, represents the Laplace transform complex variable, which is set near the fundamental frequency of PWM; is the quality factor of the filter, which is used to control the bandwidth. The signal after bandpass filtering is expressed as: ; After filtering is completed, in order to ensure that the ADC can obtain a stable signal at the moment of sampling, the filtered sampled signal is input into the sample-and-hold circuit for holding. The main function of the sample-and-hold circuit is to lock the transient value of the signal so that the signal will not change significantly during the ADC conversion period. The basic working principle of the sample-and-hold circuit is described by the following mathematical model: ; in, It is the stable sampling signal after sampling and holding; Indicates that at the sampling time The collected signal value. Common mode inductors are used to suppress common mode interference for stable sampling signals. The working principle of common mode inductors is expressed as: ; in, It is the signal after common mode interference suppression; is the common mode rejection ratio (CMRR); is the common mode interference component. Through the four-terminal chip resistor, the anti-interference sampling signal is processed by parallel capacitor. The role of the four-terminal chip resistor is to reduce the parasitic inductance of the current detection loop, and the role of the parallel capacitor is to suppress high-frequency noise. Assume that the equivalent filter function of the parallel capacitor is: in, is the resistance value of the four-terminal chip resistor; is the capacitance value of the parallel capacitor. The current sampling value obtained is expressed as: This sampled value serves as the input data for subsequent PWM dead-zone effect compensation.
[0027] In a specific embodiment, the process of executing step S200 may specifically include the following steps: The drive signal is synchronously sampled using a clock frequency that is A times the PWM carrier frequency, and the drive signal is input into the FPGA state judgment module to obtain a synchronous sampling signal; A three-bit binary state encoder is constructed to encode the synchronous sampling signal, wherein the first bit indicates the current state identifier, the second bit indicates the state stability identifier, and the third bit indicates the state switching identifier, thereby obtaining state encoding data; The state encoding data is mapped to four basic states: upper tube is on and lower tube is off, lower tube is on and upper tube is off, both upper and lower tubes are off, and state switching transition, to obtain a state machine conversion structure; Accumulate the time of each state start counter in the state machine transition structure, and trigger the corresponding state transition operation when the accumulated value reaches the dead time to obtain the state transition sequence; Perform dead time compliance check on the state transition sequence, and obtain the state transition permission signal by comparing the time interval between adjacent states with the dead time requirement; Generate a state switching flag according to the state transition permission signal, record the state switching path from the start to the target and the corresponding switching time, and obtain state transition data; The duration of each state in the PWM cycle is calculated according to the state transition data, and the duration is converted into a percentage relative to the PWM cycle to obtain a normalized state duration; The normalized state duration and state transition data are integrated into a unified data format, and are arranged and combined in the order of state code, duration count value, and switching flag to obtain the switch state information.
[0028] Specifically, the PWM drive signal is identified and converted with high precision, and the drive signal is synchronously sampled using a clock frequency A times the PWM carrier frequency to ensure accurate capture of the PWM switch state, and the drive signal is input into the FPGA state judgment module to obtain a synchronous sampling signal. Assume that the basic carrier frequency of PWM is , then the synchronous sampling clock frequency is ,in: represents the period of the synchronous sampling clock. It is usually a large integer, such as 8 or 16, so the FPGA can perform multiple samplings in one PWM cycle and accurately identify the transient characteristics of each switch state. After completing the synchronous sampling of the drive signal, the data is encoded to simplify the subsequent state analysis. Therefore, the system constructs a three-bit binary state encoder to convert the synchronous sampling signal into state encoding data, where the first bit is used for the current state identification. The second digit is used for status stability identification , the third bit is used for state switching identification ,Right now: ; in, A value of 1 indicates that the current drive signal is at a high level (MOSFET is on), and a value of 0 indicates a low level (MOSFET is off). A value of 1 indicates that the current state is stable, and a value of 0 indicates that the state is switching. A value of 1 indicates that a state switch has occurred, and a value of 0 indicates that the state has not changed. After obtaining the state encoding data, these data are mapped to four basic switch states, namely: 1. The upper tube is turned on and the lower tube is turned off (S=100); 2. The lower tube is turned on and the upper tube is turned off (S=010); 3. Both the upper and lower tubes are turned off (S=000); 4. State switching transition (S=110, 011, 101). For example, when S=(1, 0, 0), it means that the upper tube is turned on and the lower tube is turned off. At this time, S 0 =1 means the current level is high, S 1 =0 means the state is in the switching process, S 2 =0 means no new state switching occurs. The state transition rules include: when the drive signal changes and the dead time requirement is met, the state transition from the current value to the target value is triggered. Based on this, a state machine transition structure is constructed. In this structure, each state switch will trigger the corresponding transition rule to ensure that the system can fully track the PWM signal state. In order to accurately control the dead time, each state start counter in the state machine transition structure is accumulated, that is: ; in, Indicates the accumulated time of the current state; is the synchronous sampling clock period; when The accumulated dead time reaches the set dead time , triggers the corresponding state transition operation to form a state transition sequence. The state transition sequence is checked for dead time compliance. By comparing the time interval between adjacent states with the dead time requirement, it is ensured that the state transition always meets the dead time constraint. Mathematically, the compliance check condition is: ; in, It is The time when the next state switch occurs; is the dead time. If the above conditions are not met, the system will prevent the current state switching and delay execution until the compliance time. When the state transition meets the compliance check, the state switching flag is generated according to the state transition permission signal, and the state switching path from the starting state to the target state and the corresponding switching time are recorded to obtain the state transition data. The format of the state transition data is expressed as: ; in, Indicates state transition data. and Respectively represent the states before and after switching; Indicates the time when the switching occurs. After completing the state transition data calculation, analyze the proportion of each state in the entire PWM cycle, calculate the duration of each state in the PWM cycle based on the state transition data, and convert it into a percentage relative to the PWM cycle, that is: ; in, is the duration of a complete PWM cycle; Yes Status Normalized duration within the PWM cycle. The normalized state duration and state transition data are integrated into a unified data format, and arranged and combined in the order of state code, duration count value, and switching flag bit to obtain the switch state information. The final storage format is: in, is the status code; is the normalized duration of the state; is the switching path information of this state, where S k (Status code): is a three-bit binary code in the format of (S 2 ,S 1 ,S 0 ), S0 : Current state identification (1 = on, 0 = off), S 1 : Status stability indicator (1 = stable, 0 = switching), S 2 : State switching flag (1 = switching occurs, 0 = no switching occurs), possible value examples: 100: upper tube is on and lower tube is off, 010: lower tube is on and upper tube is off, 000: both upper and lower tubes are off, 110 / 011 / 101: state switching transition. D k (Normalized state duration): Calculation formula: D k =(T state (k) / T PWM )×100%,T state (k): duration of current state k, T PWM : The duration of a complete PWM cycle, indicating the percentage of this state in the PWM cycle. k (Switch path information): The format is (S prev ,S next ,T switch (k)), S prev : Status code before switching, S next : Status code after switching, T switch (k): The moment when the switch occurs.
[0029] In a specific embodiment, the process of executing step S300 may specifically include the following steps: The current sampling values in the dead zone are averaged to obtain the average current value during the dead zone; Perform differential operation on the average current value during the dead time, calculate the ratio of the current change during the dead time to the dead time, and obtain the current change rate; The sampling points of the current change rate are marked, the moment information of each sampling point is aligned with the state switching flag in the switch state information, and the double threshold comparison method is used to detect the current direction change point within the dead zone interval. The current rising edge detection threshold is set to the first target value of the rated current, and the falling edge detection threshold is set to the second target value of the rated current. The sequence number of the detected direction change point and the corresponding state code are recorded to obtain the direction change characteristic data; The current sign at the start and end of the dead zone is judged according to the direction change characteristic data to obtain the boundary current characteristic data; Normalizing the boundary current characteristic data, converting the current value into a percentage relative to the rated current, and converting the time value of the current direction change point into a percentage relative to the switching cycle to obtain standardized characteristic data; The standardized characteristic data are stored in the data buffer for correlation analysis, and the corresponding relationship between the dead zone influence intensity and each influencing factor is established to obtain the dead zone effect influencing factor.
[0030] Specifically, the current sampling values in the dead zone are averaged to obtain the average current value of the dead zone time. Assuming that the dead zone time Collected within Current sampling points, record these sampling values , then the average current value of the dead time The calculation formula is as follows: in, is the average current value during the dead time, It is The current value of each sampling point; is the number of sampling points within the dead time, Indicates the sampling point number. Analyze the changing characteristics of the current during the dead time, perform differential operation on the average current value during the dead time, calculate the ratio of the current change to the dead time, and obtain the current change rate, that is: in, Indicates the rate of change of current; and are the current values at the start and end of the dead zone respectively; is the dead time. The sampling points of the current change rate are marked, and the timestamp information of each sampling point is aligned with the state switching flag in the switch state information to ensure that the current change data can accurately correspond to the PWM switching moment. In order to identify the change in current direction, a dual threshold comparison method is used within the dead zone to detect the current direction change point, in which the current rising edge detection threshold The first target value is set to the rated current, and the falling edge detection threshold Set to the second target value of the rated current, that is: ; in, is the rated current of the system, and is the threshold ratio set by experience. When the current change rate satisfies When the current sampling point is recorded And the corresponding status code, to obtain the direction change characteristic data. After obtaining the direction change characteristic data, analyze the current polarity at the start and end of the dead zone, judge the current sign at the start and end of the dead zone according to the direction change characteristic data, and obtain the boundary current characteristic data. Among them, the current sign at the start and end of the dead zone is judged according to the sampling value of the current direction change point recorded in the direction change characteristic data. If the sampling value at a certain moment is greater than the rising edge detection threshold, the current sign at that moment is positive; if it is less than the falling edge detection threshold, the current sign is negative, thereby obtaining the boundary current characteristic data. If the current sign is positive at the beginning of the dead zone and becomes negative at the end, it means that reverse flow has occurred; if the sign does not change, it means that the dead zone has little impact. The boundary current characteristic data is expressed as: ; The judgment process of direction change characteristic data to boundary current characteristic data is as follows: firstly, the direction change characteristic data is obtained by threshold comparison: when the current value>I up (rising edge detection threshold), it is recorded as a positive change point. down (falling edge detection threshold), it is recorded as a negative change point. Then the boundary current polarity is determined based on these change characteristics: at the start of the dead zone (S start ): If the most recent change point>I up , then S start =+1, if the most recent change point down , then S start =-1; at the end of the dead zone (S end ): If the most recent change point>I up , then S end =+1; if the most recent change point down , then S end =-1. In order to ensure the comparability of data under different working conditions, the boundary current characteristic data is normalized, the current value is converted into a percentage relative to the rated current, and the moment value of the current direction change point is converted into a percentage relative to the switching cycle to eliminate the influence of different working current amplitudes and PWM frequencies, so that the data can be used for universal analysis. The normalization formula is as follows: in, is the normalized current value; is the boundary current value; is the normalized time value; is a complete PWM cycle. After normalization, the standardized characteristic data is stored in the data buffer, and correlation analysis is performed to study the relationship between the intensity of the dead zone effect and various influencing factors (such as current amplitude, switch state, temperature, etc.), and a mathematical model is established for prediction and optimization. Assume that the influencing factor vector is: ; The dead zone effect factor The multivariate regression model is expressed as: ; in, is the regression coefficient, which indicates the weight of each influencing factor; is the bias term, and the regression coefficient w 1 (Current amplitude weight): The value range is [0.3, 0.5]; Setting basis: Based on the influence of current amplitude on the dead zone effect, the dead zone effect under different current amplitudes is measured experimentally and obtained by least squares fitting. Constraint: It should be the largest weight coefficient. Regression coefficient w 2 (Time Normalization Weight): The value range is [0.2, 0.4]. The setting basis is based on the influence of dead time on output waveform distortion. By measuring the waveform distortion under different dead times, the linear regression method is used to determine it. Constraint: It should be less than w 1 But greater than w 3 and w 4 . Regression coefficient w 3 ,w 4 (Current polarity weight): The value range is [0.1, 0.2]. The setting basis is based on the influence of current direction change on the dead zone effect, and is determined by measuring the waveform characteristics of current commutation and using multivariate regression analysis. Constraints: w 3 Should be approximately equal to w 4 , and are both smaller than w 1 and w 2 Bias term b: The value range is [-0.1, 0.1]. The setting basis is based on the inherent error of the system, determined by the average deviation of multiple experimental measurements, and calculated using the error analysis method. Constraints: The absolute value should be less than all weight coefficients.
[0031] Among them, before obtaining the dead zone effect influence factor and calculating the compensation coefficient in a piecewise linear manner, it also includes: inputting the dead zone effect influence factor into the energy loss calculation module, integrating and calculating the energy loss of the dead zone time based on the product of the switch tube voltage and current waveform, and obtaining the actual energy loss data; segmenting the actual energy loss data, dividing the data into multiple intervals according to the current size of the dead zone time, each interval containing 100 sampling points, and obtaining segmented energy data; constructing an equivalent voltage model of the dead zone time based on the segmented energy data, calculating the equivalent voltage value of each interval by a piecewise linear fitting method, and matching the product of the equivalent voltage value and the dead zone duration with the interval energy to obtain the equivalent voltage characteristics; performing multi-factor mapping analysis on the equivalent voltage characteristics, establishing the functional relationship between the equivalent voltage and the current amplitude, the dead zone time and the switching frequency, and using the least squares method to fit the function parameters. The voltage characteristic function is obtained by fitting. The voltage loss distribution caused by the dead zone effect is calculated according to the voltage characteristic function. The data of 100 PWM cycles are statistically analyzed to establish a probability distribution model of voltage loss and obtain the voltage loss characteristics. A compensation prediction model is established based on the voltage loss characteristics. The polynomial regression method is used to fit the relationship between voltage loss and compensation. The influence of current amplitude and switching frequency is considered to obtain the compensation mapping function. The compensation mapping function is input into the dead zone compensation optimization module, the compensation effect under different working conditions is evaluated, and a multidimensional compensation characteristic model including temperature, load and switching frequency is established to obtain the optimized compensation characteristics. The accuracy of the optimized compensation characteristics is verified, the discrete degree of the compensation results is analyzed through repeatable experiments, the standard deviation is calculated and the error analysis is performed. When the error exceeds the set threshold, the compensation prediction model is returned to adjust the parameters to obtain the final compensation model.
[0032] In a specific embodiment, the process of executing step S400 may specifically include the following steps: The current amplitude in the dead zone effect influencing factor is divided into five intervals according to the percentage of the rated current, and the compensation coefficient reference value of each interval is corrected according to the direction change characteristic data in the dead zone effect influencing factor. When there is a current direction change in the dead zone time, the compensation coefficient reference value of the corresponding interval is increased by a third target value to obtain a segmented compensation coefficient; Based on the segmented compensation coefficients, linear interpolation operation is performed, and the compensation coefficients between segmented points are linearly calculated to obtain continuous compensation data; Perform temperature correction on the continuous compensation data, establish a temperature correction function based on the junction temperature of the power device, and obtain a real-time compensation value; The real-time compensation value is input into the least square fitting module for fitting calculation to obtain a compensation trend function, and the compensation value of the next cycle is calculated according to the compensation trend function to obtain a predicted compensation value; The real-time compensation value and the predicted compensation value are used to compensate for the voltage drop in the dead zone position in the PWM output voltage waveform. The real-time compensation value is used for compensation in the current cycle, and the predicted compensation value is used for compensation preset in the next cycle, thereby realizing high-precision PWM dead zone effect compensation.
[0033] Specifically, the current amplitude is divided into five intervals according to the percentage of the rated current to ensure that the dead zone compensation strategy in different current ranges can be targeted to adapt to the different effects of current size on the dead zone effect. Assuming the rated current of the system is , the current amplitude After normalization, it is divided into five intervals. Then define five intervals: (low current range); (medium and low current range); (Medium current range); (medium to high current range); (High current interval). After the intervals are divided, the compensation coefficient reference value of each interval is adjusted according to the direction change characteristic data in the dead zone effect influencing factor. Because when the current direction changes during the dead zone time, the dead zone effect will have a greater impact on the current distortion, so the compensation amount needs to be increased. Assume that the original compensation coefficient reference value is (in Corresponding to five intervals respectively), when a direction change is detected, an additional compensation amount is added, that is, the third target value , the final segment compensation coefficient is calculated as: ; in, is the adjusted segment compensation coefficient; is the direction change correction factor, which takes 1 when a direction change is detected, otherwise it takes 0; is the third target value, representing the additional compensation amount when the direction changes. After obtaining the segmented compensation coefficient, in order to ensure the smooth transition of the compensation data between different intervals, a linear interpolation operation is performed based on the segmented compensation coefficient, that is, the compensation coefficient is linearly calculated between the segmented points to eliminate the mutation. Assume that in two adjacent intervals and 1, the compensation coefficient Calculated using linear interpolation formula: in, is the current Interpolation compensation coefficient at ; and are the compensation coefficients of adjacent intervals respectively; and is the lower limit of the current in the corresponding interval. This step ensures that the compensation data remains continuous in the entire current range, thereby improving the compensation accuracy. The continuous compensation data is temperature corrected, and a temperature correction function is established based on the junction temperature of the power device to compensate for the influence of temperature on the current dead zone effect. Assume that the junction temperature of the power device is , the reference temperature is , then the temperature correction function adopts a linear correction model: ; in, is the compensation coefficient after temperature correction; is the temperature correction coefficient, which is determined by experiment. Through this step, the real-time compensation value is obtained: ; In order to improve the predictive ability of the compensation strategy, the real-time compensation value is input into the least square fitting module for fitting calculation to obtain the compensation trend function, which predicts the compensation value of the next cycle. The compensation data for a PWM cycle is , the least squares method is used to fit the compensation trend: ; in, is the fitted compensation trend function; is the fitting coefficient; Represents a time series. To predict the compensation value for the next period, calculate: ; in Time for the next cycle.
[0034] In this embodiment, the high-precision PWM dead zone effect compensation method also includes: adaptively grading the real-time compensation value and the predicted compensation value, dividing the compensation interval into high priority, medium priority and low priority according to the phase difference between the PWM output voltage and the given sine wave, and obtaining compensation priority data; constructing a compensation response model based on the compensation priority data, setting different compensation adjustment steps for different priority intervals, the adjustment step of the high priority interval is 1.5 times the reference step, and the adjustment step of the low priority interval is 0.5 times the reference step, to obtain an adaptive adjustment parameter; using a sliding average method to calculate the distortion degree of the PWM output voltage, counting the voltage distortion rate within 100 consecutive switching cycles, and comparing the voltage distortion rate with the sixth target value to obtain a compensation correction trigger signal; and adjusting the compensation of each priority interval according to the compensation correction trigger signal. The compensation response curve is constructed, and the compensation response slope of each interval is determined by a piecewise linear method to obtain an adaptive response curve; the adaptive response curve is input into the state judge, and the corresponding response strategy is selected according to the current PWM output state, and the fast response mode is triggered when the voltage distortion rate exceeds the threshold, and the steady-state response mode is maintained when the voltage distortion rate is lower than the threshold, and a compensation strategy selection signal is obtained; the adaptive adjustment parameters are dynamically updated according to the compensation strategy selection signal, and the compensation adjustment step size of each priority interval is adjusted by a state feedback method to obtain the updated adaptive adjustment parameters; the updated adaptive adjustment parameters are correlated with the PWM output state, and a mapping relationship between the compensation parameters and the output state is established to obtain an adaptive mapping model; the real-time compensation value and the predicted compensation value are corrected based on the adaptive mapping model to obtain an adaptive compensation value. Among them, the adaptive compensation value obtained by correcting the real-time compensation value and the predicted compensation value based on the adaptive mapping model is mainly used to realize the dynamic optimization control of dead zone compensation. The specific application process is as follows: the adaptive compensation value is written into the dead zone compensation register of the PWM controller in real time to adjust the dead zone position in the PWM output waveform; when the PWM output waveform switches, the controller automatically adjusts the compensation amount of the dead zone time according to the current adaptive compensation value to ensure the accuracy of the dead zone compensation. At the same time, the adaptive compensation value will be updated in real time according to load changes and temperature changes, so that the compensation strategy can adapt to the dynamic changes of the system operation state. In each PWM cycle, the adaptive compensation value is allocated to six compensation intervals, and the dead zone voltage drop in each interval is accurately compensated, which effectively improves the quality of the PWM output waveform, reduces the total harmonic distortion rate, and improves the dynamic response capability and stability of the system. By introducing the adaptive compensation value, the closed-loop control of the dead zone effect compensation is realized, so that the compensation effect can be adaptively adjusted with the changes in the system working state, which significantly improves the accuracy and reliability of PWM control.
[0035] In a specific embodiment, the high-precision PWM dead-zone effect compensation method further includes the following steps: A PWM cycle is divided into six compensation intervals, namely, the interval before the rising dead zone, the middle interval of the rising dead zone, the interval after the rising dead zone, the interval before the falling dead zone, the middle interval of the falling dead zone and the interval after the falling dead zone, and a compensation value buffer is set for each compensation interval to obtain an interval division structure; The on-time statistics of each switch tube in the interval division structure are performed, and the ratio of the cumulative on-time of each switch tube to the PWM period is calculated to obtain the on-time ratio data; The real-time compensation value and the predicted compensation value are weightedly allocated according to the on-time ratio data, and the switch tube with a larger on-time ratio is allocated a larger compensation value to obtain initial compensation allocation data; The initial compensation allocation data is used to calculate the distribution of the dead zone interval compensation value, and the compensation value of the dead zone center position and the edge position is determined by using a quadratic function relationship. The compensation value of the dead zone center position is twice the compensation value of the edge position, and the dead zone compensation distribution data is obtained; The dead zone compensation distribution data is corrected according to the load current of the switch tube to obtain load correction compensation data, and the load correction compensation data is smoothed to obtain the first compensation coefficient of each compensation interval; The first compensation coefficient of each compensation interval is subjected to waveform reconstruction and spectrum analysis to obtain a compensation effect evaluation result, and the compensation coefficient is iteratively calculated based on the compensation effect evaluation result to obtain the second compensation coefficient of each compensation interval. The second compensation coefficient of each compensation interval is applied to the PWM output voltage compensation of the corresponding interval. The second compensation coefficient of each compensation interval is used to compensate for the dead zone voltage drop within the interval.
[0036] Specifically, a PWM cycle is divided into six compensation intervals, namely, the interval before the rising dead zone, the interval in the middle of the rising dead zone, the interval after the rising dead zone, the interval before the falling dead zone, the interval in the middle of the falling dead zone, and the interval after the falling dead zone. The dead zone effects of different phases are compensated independently, making the compensation calculation more refined. Assuming that the PWM cycle is , then define the time range of each compensation interval: ; ; in, is the proportional coefficient used to divide the PWM period, which is set by experiment or simulation. Indicates the time length of the interval before the rising dead zone, Indicates the time length of the interval in the rising dead zone, Indicates the time length of the interval after the rising dead zone, Indicates the time length of the interval before the falling dead zone, Indicates the time length of the interval in the falling dead zone, Indicates the time length of the interval after the falling dead zone. In order to store these compensation values in the calculation, a compensation value buffer is set in each compensation interval to store the calculated compensation parameters in different PWM cycles to form a complete interval division structure. After the interval division is completed, the on-time statistics of each switch tube are performed to calculate the on-time proportion of each switch tube in a PWM cycle. Assume that the on-time of the upper tube is , the conduction time of the lower tube is , then the on-time ratio is calculated as: in, and Respectively represent the proportion of the conduction time of the upper tube and the lower tube. Based on these proportion data, the real-time compensation value and the predicted compensation value are weightedly allocated so that the switch tube with a larger proportion of conduction time is allocated a larger compensation value to adapt to the impact of different conduction times on dead zone compensation. The initial compensation allocation data is expressed as: ; in, and Respectively represent the initial compensation values of the upper tube and the lower tube; is the real-time compensation value of the current cycle. PWM dead zone compensation depends not only on the on-time ratio, but also on the influence mode of the dead zone time itself. Therefore, the initial compensation distribution data is used to calculate the distribution of the dead zone interval compensation value. The compensation value of the dead zone center position and edge position is determined by the quadratic function relationship. The compensation value of the dead zone center position is set to twice the compensation value of the edge position, that is: in, Dead time Compensation value of position; is the compensation value at the edge of the dead zone; is the compensation value at the dead zone center; is the dead time. Design principle of item: making difference : Move the time origin to the start of the dead zone so that the calculation starts from 0 and is divided by : Normalize the time to the interval [0,1] so that the calculation is independent of the specific dead time length. The effect of: Create a parabolic compensation distribution, so that the compensation value transitions smoothly from the edge to the center and reaches the maximum value in the center. The effect of the whole formula: At the edge of the dead zone: When t=0, the compensation value = C edge , in the dead zone center: when t=T d / 2, the compensation value reaches the maximum = C center, between the two ends: the compensation value changes smoothly according to the quadratic function curve. The effect of dead zone compensation is also affected by the load current, so the dead zone compensation distribution data is corrected according to the load current of the switch tube. Assuming the current load current is In order to make the compensation value change with the load, a correction factor is introduced: in, is the compensation value after load correction, is the load influence coefficient, which is determined by experiment or simulation. After the load correction, the load correction compensation data is smoothed to avoid sudden changes in the compensation value between PWM cycles. Therefore, moving average filtering is used: in, It is Smoothing compensation value of a period; is the smoothing window size. After the smoothing process is completed, the obtained value is the first compensation coefficient of each compensation interval. At this time, in order to verify the compensation effect, the first compensation coefficient of each compensation interval is reconstructed and the spectrum is analyzed to ensure that the compensation strategy does not introduce additional harmonic distortion. The harmonic content after compensation is calculated using Fourier transform: Calculate the total harmonic distortion (THD). If the THD is too large, it means that the compensation strategy needs to be adjusted. According to the evaluation results of the compensation effect, the compensation coefficient is iteratively calculated. That is, if the THD or fundamental error exceeds the threshold, correction is performed: in, is the compensation value after iterative optimization; is the iterative adjustment coefficient. Finally, the second compensation coefficient of each compensation interval is obtained.
[0037] In a specific embodiment, the execution step performs waveform reconstruction and spectrum analysis on the first compensation coefficient of each compensation interval to obtain a compensation effect evaluation result, and performs iterative calculation of the compensation coefficient according to the compensation effect evaluation result to obtain a second compensation coefficient of each compensation interval, and applies the second compensation coefficient of each compensation interval to the PWM output voltage compensation of the corresponding interval. The second compensation coefficient of each compensation interval is used to compensate for the dead zone voltage drop in the interval. The process can specifically include the following steps: A PWM output voltage model is constructed based on the first compensation coefficient of each compensation interval, and the PWM output voltage model is numerically calculated. During the calculation process, the first compensation coefficient is applied to the voltage drop at the dead zone position to obtain output voltage reconstruction data; Perform fixed-point FFT operation on the output voltage reconstruction data to obtain voltage spectrum analysis data; The compensation effect evaluation index is calculated based on the voltage spectrum analysis data, and the total harmonic distortion rate THD, fundamental wave amplitude relative error and fundamental wave phase absolute error are calculated to obtain the compensation effect evaluation result; Iterative optimization parameters are generated according to the compensation effect evaluation results. When the total harmonic distortion rate THD exceeds the fourth target value, the fundamental amplitude relative error exceeds the fifth target value, or the fundamental phase absolute error exceeds the fifth target value, the compensation coefficient correction amount of each compensation interval is calculated according to the proportion exceeding the threshold value to obtain compensation correction data of each compensation interval; The compensation correction data of each compensation interval are cumulatively analyzed, and a dead zone effect evolution law model is established. The first compensation coefficient of each compensation interval is corrected and calculated according to the dead zone effect evolution law model to obtain the second compensation coefficient of each compensation interval. The second compensation coefficient of each compensation interval is applied to the PWM output voltage compensation of the corresponding interval. The second compensation coefficient of each compensation interval is used to compensate for the dead zone voltage drop within the interval.
[0038] Specifically, a PWM output voltage model is constructed based on the first compensation coefficient of each compensation interval to accurately describe the voltage waveform change of the PWM signal before and after compensation. The ideal model of the PWM output voltage is expressed as: ; in, is the ideal PWM output voltage; is the DC bus voltage; is the base frequency of PWM; sgn(·) is the sign function, which indicates the switching state of PWM. The actual PWM signal is affected by the dead zone effect. The voltage will drop briefly within a certain period of time, so a compensation factor is introduced. Consider the PVWM cycle There are six compensation intervals: the front, middle and rear intervals of the rising dead zone and the front, middle and rear intervals of the falling dead zone. The corrected PWM voltage model is expressed as: in, is the first compensation coefficient of each compensation interval; It is in The indicator function within the interval, the value 1 represents the current time In the compensation interval, otherwise it is 0. In the calculation process, the first compensation coefficient is applied to the voltage drop at the dead zone position to obtain the output voltage reconstruction data, that is, the corrected PWM voltage waveform. This data is obtained by numerical calculation methods, such as point-by-point calculation in the time domain to ensure the accuracy of waveform reconstruction. After obtaining the reconstructed PWM voltage data, in order to analyze the characteristics of the compensated voltage signal, the output voltage reconstruction data is subjected to fixed-point FFT operation, that is, the discrete time signal Perform a Fast Fourier Transform (FFT): in, It is the spectrum data after FFT transformation; is the number of points of FFT; is an imaginary unit. FFT calculates the spectrum components of the PWM signal, thereby extracting the voltage spectrum analysis data, including the fundamental component and each harmonic component. In order to quantify the compensation effect, the compensation effect evaluation index is calculated based on the voltage spectrum analysis data. The three most important indicators are the total harmonic distortion rate THD, the relative error of the fundamental amplitude, and the absolute error of the fundamental phase. The total harmonic distortion rate (THD) is defined as: in, is the fundamental amplitude; It is The amplitude of the subharmonics, represents the qth harmonic frequency, q=2,3,... represents the harmonic order. The relative error of the fundamental amplitude is calculated as: in, is the ideal fundamental amplitude. The fundamental phase absolute error is calculated as: ; in, is the fundamental phase calculated by FFT; is the ideal fundamental phase. After calculating the compensation effect evaluation index, the iterative optimization parameters are generated according to the compensation effect evaluation results, that is, when the total harmonic distortion rate THD exceeds the fourth target value Or the fundamental amplitude error exceeds the fifth target value Or the fundamental phase error exceeds the fifth target value When , the compensation coefficient correction amount of each compensation interval is calculated according to the proportion exceeding the threshold: in, It is After calculating the correction amount, the compensation correction data of each compensation interval is cumulatively analyzed, that is, the correction data within multiple PWM cycles is recorded, and a dead zone effect evolution law model is established based on the data trend. The model is expressed by sliding window average or least squares fitting as follows: ; in, is the compensated trend function, is the fitting parameter. Based on this model, the first compensation coefficient of each compensation interval is corrected and calculated to obtain the second compensation coefficient of each compensation interval: ; Through an iterative calculation process, the PWM dead-zone compensation coefficient is dynamically adjusted to ensure that the spectrum distortion of the PWM output signal is minimized and the fundamental amplitude and phase of the PWM signal are as close to the ideal state as possible, thereby greatly improving the accuracy and stability of the PWM control system.
[0039] See also Figure 2 , Figure 2 A schematic block diagram of the structure of a high-precision PWM dead-zone effect compensation system 200 provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the high-precision PWM dead-zone effect compensation system 200 includes: The sampling unit 210 is used to perform differential sampling and signal conditioning on the PWM output current to obtain a current sampling value; A state conversion unit 220 is used to input the driving signal into the FPGA state judgment module for state conversion analysis to obtain switch state information; A feature extraction unit 230 is used to extract dead zone feature values based on current sampling values and switch state information to obtain a dead zone effect influencing factor; The compensation coefficient calculation unit 240 is used to calculate the compensation coefficient in a piecewise linear manner according to the dead zone effect influencing factor to obtain a real-time compensation value and a predicted compensation value. The real-time compensation value and the predicted compensation value are used to compensate for the voltage drop at the dead zone position in the PWM output voltage waveform. The real-time compensation value is used for current cycle compensation, and the predicted compensation value is used for the next cycle compensation preset, thereby realizing high-precision PWM dead zone effect compensation.
[0040] Through the cooperation of the above components, the anti-interference ability and accuracy of current sampling are significantly improved by adopting high-precision differential sampling and signal conditioning circuits, combined with common-mode inductance suppression and parallel capacitor processing of four-terminal chip resistors. The state judgment module based on FPGA adopts three-bit binary coding and four-state state machine structure, and cooperates with the state holding counter to effectively avoid the misjudgment caused by the jitter of the drive signal and enhance the reliability of state judgment. A dead zone feature extraction method is proposed. Through the calculation of the current change rate and the comparison of double thresholds, the current direction change characteristics of the dead zone time are accurately captured, which solves the problem of difficult current direction judgment under light load conditions. The compensation coefficient is calculated by piecewise linear method, the temperature correction mechanism is introduced, and the least squares fitting prediction is combined to achieve accurate calculation and dynamic prediction of the compensation value, which improves the adaptability of compensation. By dividing the PWM cycle into six compensation intervals, using the quadratic function relationship to distribute the compensation value, and combining the load current for dynamic adjustment, more refined compensation control is achieved.
[0041] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0042] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0043] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A high-precision PWM dead zone effect compensation method, characterized in that: include: Perform differential sampling and signal conditioning on the PWM output current to obtain the current sampling value; The driving signal is input into the FPGA state judgment module for state conversion analysis to obtain the switch state information; Extract the dead zone feature based on the current sampling value and the switch state information to obtain the dead zone effect influencing factor; According to the dead zone effect influencing factor, the compensation coefficient is calculated in a piecewise linear manner to obtain a real-time compensation value and a predicted compensation value, and the real-time compensation value and the predicted compensation value are used to compensate for the voltage drop at the dead zone position in the PWM output voltage waveform. The real-time compensation value is used for current cycle compensation, and the predicted compensation value is used for the next cycle compensation preset, thereby realizing high-precision PWM dead zone effect compensation.
2. The high-precision PWM dead-zone effect compensation method according to claim 1, characterized in that: The differential sampling and signal conditioning of the PWM output current to obtain the current sampling value includes: A high-speed ADC in differential input mode is used to sample the PWM output current to obtain the original sampling data; Inputting the original sampling data into an operational amplifier to amplify the signal amplitude to obtain an amplified sampling signal, and performing bandpass filtering on the amplified sampling signal to obtain a filtered sampling signal; Inputting the filtered sampling signal into a sampling and holding circuit for holding to obtain a stable sampling signal, and using a common-mode inductor to suppress common-mode interference on the stable sampling signal to obtain an anti-interference sampling signal; The anti-interference sampling signal is processed by parallel capacitance through a four-terminal chip resistor to obtain a current sampling value.
3. The high-precision PWM dead-zone effect compensation method according to claim 1, characterized in that: The step of inputting the driving signal into the FPGA state judgment module for state conversion analysis to obtain switch state information includes: The drive signal is synchronously sampled using a clock frequency that is A times the PWM carrier frequency, and the drive signal is input into the FPGA state judgment module to obtain a synchronous sampling signal; Constructing a three-bit binary state encoder to encode the synchronous sampling signal, wherein the first bit indicates a current state identifier, the second bit indicates a state stability identifier, and the third bit indicates a state switching identifier, to obtain state encoding data; Mapping the state encoding data to four basic states, namely, upper tube on and lower tube off, lower tube on and upper tube off, upper and lower tubes off, and state switching transition, to obtain a state machine conversion structure; Accumulate the time of each state start counter in the state machine transition structure, and trigger the corresponding state transition operation when the accumulated value reaches the dead time, so as to obtain a state transition sequence; Performing a dead time compliance check on the state transition sequence, and obtaining a state transition permission signal by comparing the relationship between the time intervals of adjacent states and the dead time requirement; Generate a state switching flag according to the state transition permission signal, record the state switching path from the start to the target and the corresponding switching time, and obtain state transition data; Calculating the duration of each state within the PWM cycle according to the state transition data, and converting the duration into a percentage relative to the PWM cycle to obtain a normalized state duration; The normalized state duration and state transition data are integrated into a unified data format, and are arranged and combined in the order of state code, duration count value, and switching flag bit to obtain switch state information.
4. The high-precision PWM dead-zone effect compensation method according to claim 1, characterized in that: The extracting of dead zone feature quantity based on the current sampling value and the switch state information to obtain the dead zone effect influencing factor includes: The current sampling values in the dead zone are averaged to obtain the average current value during the dead zone; Performing a differential operation on the average current value during the dead time, calculating the ratio of the current change during the dead time to the dead time, and obtaining the current change rate; Marking the sampling points of the current change rate, aligning the moment information of each sampling point with the state switching flag in the switch state information, and detecting the current direction change point by using a double threshold comparison method within the dead zone interval, setting the current rising edge detection threshold to the first target value of the rated current, and setting the falling edge detection threshold to the second target value of the rated current, recording the sequence number of the detected direction change point and the corresponding state code, and obtaining the direction change characteristic data; Judging the current sign at the start and end of the dead zone according to the direction change characteristic data to obtain boundary current characteristic data; Normalizing the boundary current characteristic data, converting the current value into a percentage relative to the rated current, and converting the moment value of the current direction change point into a percentage relative to the switching cycle to obtain standardized characteristic data; The standardized characteristic data is stored in a data buffer area for correlation analysis, a corresponding relationship between the dead zone influence intensity and each influencing factor is established, and the dead zone effect influencing factor is obtained.
5. The high-precision PWM dead-zone effect compensation method according to claim 1, characterized in that: The method calculates the compensation coefficient in a piecewise linear manner according to the dead zone effect influencing factor to obtain a real-time compensation value and a predicted compensation value, and uses the real-time compensation value and the predicted compensation value to compensate for the voltage drop at the dead zone position in the PWM output voltage waveform. The real-time compensation value is used for current cycle compensation, and the predicted compensation value is used for the next cycle compensation preset, so as to realize high-precision PWM dead zone effect compensation, including: The current amplitude in the dead zone effect influencing factor is divided into five intervals according to the percentage of the rated current, and the compensation coefficient reference value of each interval is corrected according to the direction change characteristic data in the dead zone effect influencing factor. When there is a current direction change in the dead zone time, the compensation coefficient reference value of the corresponding interval is increased by a third target value to obtain a segmented compensation coefficient; Performing linear interpolation operation based on the segmented compensation coefficients, linearly calculating the compensation coefficients between segmented points, and obtaining continuous compensation data; Performing temperature correction on the continuous compensation data, establishing a temperature correction function based on the junction temperature of the power device, and obtaining a real-time compensation value; Inputting the real-time compensation value into a least square fitting module for fitting calculation to obtain a compensation trend function, and calculating the compensation value of the next cycle according to the compensation trend function to obtain a predicted compensation value; The real-time compensation value and the predicted compensation value are used to compensate for the voltage drop at the dead zone position in the PWM output voltage waveform. The real-time compensation value is used for current cycle compensation, and the predicted compensation value is used for next cycle compensation preset, thereby realizing high-precision PWM dead zone effect compensation.
6. The high-precision PWM dead-zone effect compensation method according to claim 1, characterized in that: The high-precision PWM dead zone effect compensation method further includes: A PWM cycle is divided into six compensation intervals, namely, the interval before the rising dead zone, the middle interval of the rising dead zone, the interval after the rising dead zone, the interval before the falling dead zone, the middle interval of the falling dead zone and the interval after the falling dead zone, and a compensation value buffer is set for each compensation interval to obtain an interval division structure; Performing on-time statistics on each switch tube in the interval division structure, calculating the ratio of the cumulative on-time of each switch tube to the PWM period, and obtaining on-time ratio data; The real-time compensation value and the predicted compensation value are weightedly allocated according to the conduction time ratio data, and a switch tube with a larger conduction time ratio is allocated a larger compensation value to obtain initial compensation allocation data; Performing dead zone interval compensation value distribution calculation on the initial compensation allocation data, using a quadratic function relationship to determine the compensation value size of the dead zone center position and edge position, the compensation value of the dead zone center position is twice the compensation value of the edge position, and obtaining the dead zone compensation distribution data; The dead zone compensation distribution data is corrected according to the load current of the switch tube to obtain load correction compensation data, and the load correction compensation data is smoothed to obtain a first compensation coefficient of each compensation interval; The first compensation coefficient of each compensation interval is subjected to waveform reconstruction and spectrum analysis to obtain a compensation effect evaluation result, and the compensation coefficient is iteratively calculated based on the compensation effect evaluation result to obtain the second compensation coefficient of each compensation interval, and the second compensation coefficient of each compensation interval is applied to the PWM output voltage compensation of the corresponding interval. The second compensation coefficient of each compensation interval is used to compensate for the dead zone voltage drop within the interval.
7. The high-precision PWM dead-zone effect compensation method according to claim 6, characterized in that: The first compensation coefficient of each compensation interval is subjected to waveform reconstruction and spectrum analysis to obtain a compensation effect evaluation result, and the compensation coefficient is iteratively calculated according to the compensation effect evaluation result to obtain a second compensation coefficient of each compensation interval, and the second compensation coefficient of each compensation interval is applied to the PWM output voltage compensation of the corresponding interval, and the second compensation coefficient of each compensation interval is used to compensate for the dead zone voltage drop in the interval, respectively, including: A PWM output voltage model is constructed based on the first compensation coefficient of each compensation interval, and numerical calculation is performed on the PWM output voltage model. During the calculation process, the first compensation coefficient is applied to the voltage drop at the dead zone position to obtain output voltage reconstruction data; Performing fixed-point FFT operation on the output voltage reconstruction data to obtain voltage spectrum analysis data; Calculating the compensation effect evaluation index according to the voltage spectrum analysis data, calculating the total harmonic distortion THD, the fundamental wave amplitude relative error and the fundamental wave phase absolute error, and obtaining the compensation effect evaluation result; Generate iterative optimization parameters according to the compensation effect evaluation result, when the total harmonic distortion rate THD exceeds the fourth target value, the fundamental amplitude relative error exceeds the fifth target value, or the fundamental phase absolute error exceeds the fifth target value, calculate the compensation coefficient correction amount of each compensation interval according to the proportion exceeding the threshold value, and obtain compensation correction data of each compensation interval; The compensation correction data of each compensation interval are cumulatively analyzed, and a dead zone effect evolution law model is established. The first compensation coefficient of each compensation interval is corrected and calculated according to the dead zone effect evolution law model to obtain the second compensation coefficient of each compensation interval. The second compensation coefficient of each compensation interval is applied to the PWM output voltage compensation of the corresponding interval. The second compensation coefficient of each compensation interval is used to compensate for the dead zone voltage drop within the interval.
8. A high-precision PWM dead-zone effect compensation system, characterized in that: The method for performing the high-precision PWM dead zone effect compensation method according to any one of claims 1 to 7 comprises: The sampling unit is used to perform differential sampling and signal conditioning on the PWM output current to obtain a current sampling value; A state conversion unit is used to input the driving signal into the FPGA state judgment module for state conversion analysis to obtain switch state information; A feature extraction unit, configured to extract a dead zone feature based on the current sampling value and the switch state information to obtain a dead zone effect influencing factor; The compensation coefficient calculation unit is used to calculate the compensation coefficient in a piecewise linear manner according to the dead zone effect influencing factor to obtain a real-time compensation value and a predicted compensation value, and use the real-time compensation value and the predicted compensation value to compensate for the voltage drop at the dead zone position in the PWM output voltage waveform. The real-time compensation value is used for current cycle compensation, and the predicted compensation value is used for the next cycle compensation preset, so as to realize high-precision PWM dead zone effect compensation.
Citation Information
Cited By
Pulse width modulation dead zone nonlinear error suppression method, system and device
CN119945397A
GaN device current collapse suppression method and system
CN120448162A
Mixed signal processing method and system for memory bank
CN121116622A
High-precision dead zone compensation method and system based on FPGA
CN121216959A
Control system real-time monitoring method based on multi-unit cooperation
CN121857532A