A method and system for detecting the effective value of bus current
By calculating the target voltage vector angle and duty cycle of the motor controller, and determining that the current waveform is a square wave period for integration, the accuracy and cost issues of DC bus current effective value detection of the motor controller are solved, and high-precision bus current effective value detection is achieved.
Patent Information
- Application Number
- CN202611466567.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-11-27
AI Technical Summary
In the existing technology, the effective value of the DC bus current of the motor controller cannot be directly measured, resulting in insufficient accuracy of input power calculation. Furthermore, the existing methods increase the cost of the controller or make engineering implementation difficult.
By acquiring the target voltage vector angle and amplitude of the motor controller, the target included angle is calculated, the pulse width modulation period of the current is determined to be the equivalent square wave current, and integration is performed within this period. The effective value of the bus current is then calculated in combination with the duty cycle.
It achieves high-precision and low-cost detection of the effective value of bus current, reduces the requirements for sampling rate, avoids the error of average value equivalence, and improves the energy consumption management accuracy of motor system.
Smart Images

Figure CN123184559A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of motor control technology, specifically relating to a method and system for detecting the effective value of bus current. Background Technology
[0002] In motor control systems, the effective value (RMS) of the DC bus current of the motor controller is a key parameter for input power calculation, energy management, overcurrent protection, and system efficiency evaluation. The accurate measurement of the RMS bus current directly affects the accuracy of the motor input power calculation, and thus the energy consumption control of the system.
[0003] In existing technologies, the DC bus current of a motor controller exhibits a pulsed waveform, and its effective value cannot be directly equivalent to the average value. Using a dedicated true RMS chip would significantly increase the cost of the controller. Estimation methods based on phase current or power are affected by parasitic parameters of power devices and pulse width modulation dead zones, resulting in insufficient accuracy. Methods based on bus current waveform reconstruction require extremely high analog-to-digital conversion sampling rates, making engineering implementation difficult and compromising the accuracy of DC bus current RMS detection. Summary of the Invention
[0004] The purpose of this application is to provide a method and system for detecting the effective value of bus current, which is achieved as follows: In a first aspect, embodiments of this application provide a method for detecting the effective value of bus current, wherein the motor controller is powered via a DC bus, and the method includes: The target voltage vector, pre-generated by the motor controller for the current pulse width modulation cycle, is obtained; the target voltage vector includes the voltage vector angle and the voltage vector amplitude. Based on the voltage vector angle, the target angle between the target voltage vector and several preset base voltage vectors is determined respectively; If any of the target angles is less than a preset angle threshold, then the current of the DC bus in the current pulse width modulation period is determined to be an equivalent square wave current, and the current pulse width modulation period is taken as the target pulse width modulation period. The equivalent square wave current is sampled and integrated at the beginning of the target pulse width modulation period, and integration is stopped at the end of the target pulse width modulation period to obtain the current integral value. The duty cycle of the target pulse width modulation period is determined based on the voltage vector amplitude; The effective value of the bus current of the DC bus is determined based on the current integral value and the duty cycle.
[0005] Optionally, the plurality of preset base voltage vectors are located in the same voltage vector plane, and each of the base voltage vectors has a corresponding direction angle; the plurality of preset base voltage vectors divide the voltage vector plane into multiple voltage sectors; The steps for determining the target angle between the target voltage vector and several preset base voltage vectors based on the voltage vector angle include: Based on the voltage vector angle, determine the target voltage sector where the target voltage vector is located among the plurality of voltage sectors; From the plurality of preset base voltage vectors, determine the first base voltage vector and the second base voltage vector as the boundary of the target voltage sector; Based on the voltage vector angle and the direction angle of the first base voltage vector, a first target angle is determined between the target voltage vector and the first base voltage vector; Based on the voltage vector angle and the direction angle of the second base voltage vector, a second target angle is determined between the target voltage vector and the second base voltage vector.
[0006] Optionally, if any of the target angles is less than a preset angle threshold, the step of determining that the current of the DC bus in the current pulse width modulation period is an equivalent square wave current and using the current pulse width modulation period as the target pulse width modulation period includes: If the first target angle is less than the preset angle threshold, the target voltage vector is biased toward the first base voltage vector, and the current of the DC bus in the current pulse width modulation period is the equivalent square wave current under the action of the first base voltage vector. If the second target angle is less than the preset angle threshold, the target voltage vector is biased toward the second base voltage vector, and the current of the DC bus in the current pulse width modulation period is the equivalent square wave current under the action of the second base voltage vector; Use the current pulse width modulation period as the target pulse width modulation period.
[0007] Optionally, the step of determining the duty cycle of the target pulse width modulation period based on the voltage vector amplitude includes: Obtain the bus voltage value of the DC bus and the period duration of the target pulse width modulation period; The ratio of the voltage vector amplitude to the bus voltage value is used as the modulation ratio; The first duration of action corresponding to the first base voltage vector is determined based on the period duration, the modulation ratio, and the second target angle. The second action duration corresponding to the second base voltage vector is determined based on the period duration, the modulation ratio, and the first target angle. The sum of the first action duration and the second action duration is taken as the effective duration of the voltage vector; The ratio of the effective duration of the voltage vector to the duration of the period is used as the duty cycle of the target pulse width modulation period.
[0008] Optionally, the step of determining the effective value of the bus current of the DC bus based on the current integral value and the duty cycle includes: The current amplitude of the equivalent square wave current is determined based on the current integral value, the duty cycle, and the period duration. The effective value of the equivalent square wave current within the target pulse width modulation period is determined based on the current amplitude and the duty cycle, and is used as the effective value of the bus current of the DC bus corresponding to the target pulse width modulation period.
[0009] Optionally, the method further includes: The effective value of the bus current of the DC bus corresponding to each of the target pulse width modulation cycles of a consecutive preset number is smoothed, and the smoothing result is used as the effective value of the bus current of the DC bus.
[0010] Optionally, the preset angle threshold is determined using the following method: A preset time threshold is obtained, which represents the upper limit of the duration of action of the base voltage vector that has a large angle with the target voltage vector within the target pulse width modulation period; The preset angle threshold is determined based on the preset time threshold, the modulation ratio, and the period duration.
[0011] Secondly, embodiments of this application provide a bus current effective value detection system, the system being used to execute the bus current effective value determination method as described above; the motor controller is powered via a DC bus, and the system includes a processor and a sampling integration circuit; The processor is used to obtain the target voltage vector pre-generated by the motor controller for the current pulse width modulation period; the target voltage vector includes voltage vector angle and voltage vector amplitude; The processor is used to determine the target angle between the target voltage vector and several preset base voltage vectors based on the voltage vector angle; The processor is configured to determine that the current of the DC bus in the current pulse width modulation period is an equivalent square wave current if any of the target angles is less than a preset angle threshold, and to use the current pulse width modulation period as the target pulse width modulation period. The sampling and integration circuit is used to sample and integrate the equivalent square wave current at the beginning of the target pulse width modulation period, and stop integration at the end of the target pulse width modulation period to obtain the current integral value. The processor is used to determine the duty cycle of the target pulse width modulation period based on the voltage vector amplitude; The processor is used to determine the effective value of the bus current of the DC bus based on the current integral value and the duty cycle.
[0012] Optionally, the sampling integration circuit includes a current sampling unit, an analog integration unit, and a sample-and-hold circuit; The current sampling unit is connected in series in the DC bus to collect the equivalent square wave current and convert the equivalent square wave current into a current signal before sending it to the analog integration unit. The input terminal of the analog integration unit is connected to the output terminal of the current sampling unit, and is used to receive the current signal and integrate the current signal to obtain the current integral value. The sample-and-hold circuit is connected between the output of the analog integrator and the processor, and is used to hold the current integral value when the analog integrator stops integrating, and send the current integral value to the processor.
[0013] Optionally, the analog integration unit includes an operational amplifier, an input resistor, and an integration capacitor; The inverting input terminal of the operational amplifier is connected to the output terminal of the current sampling unit through the input resistor to receive the current signal; the non-inverting input terminal of the operational amplifier is grounded. The integrating capacitor is connected between the inverting input terminal and the output terminal of the operational amplifier, and is used to accumulate the charge formed by the current signal during the integration process; The output terminal of the operational amplifier serves as the output terminal of the analog integrator unit and is connected to the sample-and-hold circuit to output the current integral value corresponding to the integration result of the current signal.
[0014] Optionally, the sampling integration circuit further includes an integration control switch; The integral control switch is connected in parallel across the integral capacitor, and the control terminal of the integral control switch is connected to the processor. The integral control switch is used to open at the beginning of the target pulse width modulation period, so that the analog integral unit starts to integrate, and remains open during the target pulse width modulation period, so that the analog integral unit continues to integrate.
[0015] Optionally, the integral control switch is also used to close after the current integral value is acquired, thereby resetting the analog integral unit to zero.
[0016] The embodiments of this application have the following advantages: This application obtains the target voltage vector pre-generated by the motor controller for the current pulse width modulation cycle. The target voltage vector includes the voltage vector angle and the voltage vector amplitude. The target voltage vector can be obtained by the motor controller without the need for additional sensors or measurement circuits.
[0017] This application determines the target angle between the target voltage vector and several preset base voltage vectors based on the voltage vector angle. If any target angle is less than a preset angle threshold, the current of the DC bus in the current pulse width modulation period is determined to be an equivalent square wave current, and the current pulse width modulation period is taken as the target pulse width modulation period. By calculating the angle to determine the current waveform shape, the pulse width modulation period in which the bus current can be equivalent to a square wave can be accurately identified without high-speed sampling of the bus current.
[0018] This application samples and integrates the equivalent square wave current at the beginning of the target pulse width modulation period and stops the integration at the end of the target pulse width modulation period to obtain the current integral value. The integration window is synchronized with the pulse width modulation period, and only one integration result needs to be collected at the end of each period, which reduces the requirement for the sampling rate.
[0019] This application determines the duty cycle of the target pulse width modulation period based on the voltage vector amplitude, and determines the effective value of the DC bus current based on the current integral value and the duty cycle. The duty cycle is calculated from the voltage vector amplitude without additional measurement, and the effective value is accurately calculated by combining the integral value, avoiding the error of using the average value to equip the effective value, achieving high-precision measurement, and ensuring the accuracy of the effective value detection of the DC bus current. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0021] Figure 1 This is a flowchart of the steps of a method for detecting the effective value of bus current according to an embodiment of this application; Figure 2 This is a schematic diagram of a voltage vector plane structure provided in an embodiment of this application; Figure 3 This is a waveform diagram of a pulse width modulation period provided in an embodiment of this application; Figure 4 This is a logic diagram of a method for detecting the effective value of bus current according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a bus current effective value detection system provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an analog integrator and an integrator control switch provided in an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been presented in the various embodiments of this application to enable readers to better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and updates based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.
[0023] In existing technologies, the main methods for obtaining the effective value of the motor controller bus current are as follows: The bus current sampling results are directly subjected to RC filtering, and the filtered value is used as the effective value. RC filtering essentially calculates the average value of the input waveform, but the average value of the pulsed bus current is not equal to the effective value, resulting in poor measurement accuracy in this method.
[0024] True RMS (TRMS) converter chips are used, such as the AD637 and AD8436. These chips integrate analog square operation circuits and continuous-time averaging filter circuits, enabling accurate calculation of the waveform's RMS value. However, this method requires an additional dedicated converter chip, significantly increasing the controller cost.
[0025] Bus current is estimated using software reconstruction. This method acquires three-phase current and pulse width modulation duty cycle, and indirectly calculates the bus current using a formula. Since the bus current is not directly measured, correction coefficients introduced by the parasitic parameters of power devices and the switching dead zone need to be manually set, and the accuracy is limited by the accuracy of these coefficients.
[0026] The input power is estimated by calculating the output power and power device losses, and then the effective value of the bus current is calculated by combining the bus voltage. This method is an indirect estimation and has many sources of error.
[0027] A high-resolution analog-to-digital converter is used to sample the bus current at high frequency, and the effective value is calculated by software after the current waveform is restored. However, the bus current waveform is a DC pulse, and the pulse frequency is equal to the pulse width modulation frequency or its multiples. The pulse width modulation frequency in motor control is relatively high. To restore the bus current waveform without distortion, an extremely high sampling rate is required, which is difficult to implement in engineering and is rarely seen in practical applications.
[0028] To address the above issues, this application proposes a method and system for detecting the RMS value of the DC bus current. Utilizing the existing SVPWM (Space Vector Pulse Width Modulation) information from the motor controller, an integrator consisting of an operational amplifier and a switch is used to measure and calculate the true RMS value of the DC bus current. This eliminates the need to increase the sampling capability requirements of the ADC (Analog-to-Digital Converter), and allows for the measurement and calculation of the true RMS value of the DC bus current using the waveform characteristics of SVPWM modulation, while minimizing device costs. This improves the accuracy of power control and energy management in the equipment containing the motor.
[0029] Reference Figure 1 The diagram shows a flowchart of a method for detecting the effective value of bus current according to an embodiment of this application.
[0030] In this embodiment, the motor controller is powered by a DC bus. That is, the electrical energy required for the operation of the motor controller comes from the DC bus. The DC bus is a power transmission line connecting the DC power supply and the motor controller, used to transmit DC power from the power supply side to the motor controller.
[0031] This method may specifically include the following steps: S101, obtain the target voltage vector pre-generated by the motor controller for the current pulse width modulation cycle. The target voltage vector includes the voltage vector angle and the voltage vector amplitude.
[0032] In this embodiment, during space vector pulse width modulation (SVM), the motor controller pre-calculates a target voltage vector for controlling motor operation for each SVM cycle. The target voltage vector pre-generated by the motor controller for the current SVM cycle can be obtained.
[0033] The target voltage vector refers to the voltage command calculated by the motor controller according to the control algorithm in each pulse width modulation cycle. It includes two attributes: direction and magnitude, and is used to determine the conduction sequence of the inverter's switching devices. The voltage vector angle represents the direction of the target voltage vector in voltage space. The voltage vector magnitude represents the size of the target voltage vector. The pulse width modulation cycle is the time interval between repeated inverter switching actions.
[0034] In practical implementation, space vector pulse width modulation (SVM) is a motor control technique that correlates the inverter's switching states with fundamental voltage vectors in the voltage space. By controlling the duration of different fundamental voltage vectors within each pulse width modulation cycle, the desired output voltage is synthesized. In this technique, a target voltage vector needs to be pre-calculated for each pulse width modulation cycle. This vector is used to determine the duration distribution of each fundamental voltage vector within that cycle, thereby controlling the on / off state of the inverter's switching devices and achieving motor drive control.
[0035] S102, based on the voltage vector angle, determine the target angle between the target voltage vector and several preset base voltage vectors respectively.
[0036] In this embodiment, multiple base voltage vectors are pre-set in the voltage vector plane, and these base voltage vectors have fixed directional angles. After obtaining the voltage vector angle of the target voltage vector, this angle can be compared with the directional angles of each base voltage vector, and the angle difference between the target voltage vector and each base voltage vector can be calculated. These angle differences are the target included angle.
[0037] The target angle refers to the angular difference between the direction of the target voltage vector and the direction of a certain base voltage vector. The base voltage vector is the fixed voltage vector corresponding to the inverter's switching state in space vector pulse width modulation (SVM). This modulation method uses multiple preset base voltage vectors to divide the voltage space and synthesize the output voltage. When using seven-segment SVM, six non-zero base voltage vectors evenly divide the voltage vector plane into six voltage sectors, each base voltage vector having a fixed directional angle. When using five-segment SVM, the voltage space is also divided and voltage synthesized based on the aforementioned six non-zero base voltage vectors, differing only in the allocation of the zero vector compared to the seven-segment method.
[0038] In its implementation, the motor controller synthesizes a target voltage vector by controlling the duration of action of two adjacent vectors among six non-zero base voltage vectors during space vector pulse width modulation. When the target voltage vector approaches the direction of a certain base voltage vector, the angle between the target voltage vector and that base voltage vector decreases, and the duration of action of the other adjacent base voltage vector decreases accordingly. Therefore, by calculating the target angle between the target voltage vector and each preset base voltage vector, it can be used to subsequently determine whether the target voltage vector is approaching the direction of a certain base voltage vector.
[0039] S103, if any target angle is less than a preset angle threshold, then the current of the DC bus in the current pulse width modulation period is determined to be the equivalent square wave current, and the current pulse width modulation period is taken as the target pulse width modulation period.
[0040] In this embodiment, space vector pulse width modulation synthesizes a target voltage vector by controlling the ratio of the action time of two adjacent base voltage vectors, and the action time allocation of the two base vectors determines the direction of the synthesized vector.
[0041] When the target angle between the target voltage vector and a base voltage vector is less than a preset angle threshold, it indicates that the target voltage vector has approached the direction of that base voltage vector. At this time, the duration of action of the base voltage vector that is close to the target voltage vector dominates within this cycle, and the duration of action of the other adjacent base voltage vector is correspondingly shortened and approaches zero.
[0042] In space vector pulse width modulation (SVM), the bus current waveform is synthesized from the current pulses generated by two effective base voltage vectors. When the target voltage vector approaches one of the base voltage vectors, the amplitude of one of the two pulses approaches zero, and the bus current waveform exhibits only one main conduction pulse during the effective vector period. This waveform can be equivalent to a square wave current in terms of RMS value calculation. Therefore, when the angle between any target and the target is less than a preset angle threshold, the DC bus current within the current pulse width modulation period is determined to be an equivalent square wave current.
[0043] The preset angle threshold is a pre-defined angle judgment value used to determine whether the target voltage vector is sufficiently close to the direction of a certain base voltage vector. The equivalent square wave current refers to the square wave current obtained by converting the bus current waveform, which has degenerated into a single pulse, into an equivalent form within the required accuracy range for RMS value calculation.
[0044] In this embodiment of the application, taking the current pulse width modulation period as the target pulse width modulation period means marking the period as the period that needs to be integrated and sampled. Subsequent steps only perform the integration sampling operation for the marked target pulse width modulation period, rather than performing integration sampling for every pulse width modulation period.
[0045] In the specific implementation, the preset angle threshold corresponds to the preset time threshold. The preset time threshold represents the upper limit of the duration of action of the base voltage vector that the target voltage vector has not approached within the current pulse width modulation cycle. By substituting this preset time threshold into the formula for calculating the duration of space vector pulse width modulation, the corresponding preset angle threshold can be calculated. This preset angle threshold can be pre-calculated and fixed during motor controller initialization, or it can be dynamically updated when the modulation ratio changes.
[0046] S104: Sample and integrate the equivalent square wave current at the beginning of the target pulse width modulation period, and stop integrating at the end of the target pulse width modulation period to obtain the current integral value.
[0047] In this embodiment, after determining the current pulse width modulation period as the target pulse width modulation period, at the beginning of the target pulse width modulation period, sampling and integration of the DC bus current are initiated to collect the cumulative amount of the equivalent square wave current within a complete pulse width modulation period. The integration operation continues throughout the entire target pulse width modulation period until the end of the target pulse width modulation period, at which point integration stops, and the integral result of the equivalent square wave current within that period is obtained, i.e., the current integral value.
[0048] Sampling refers to acquiring the instantaneous value signal of the DC bus current. Integration refers to accumulating the sampled current signal over a time period to obtain the cumulative current over time.
[0049] The current integral value refers to the integral result of the equivalent square wave current over a complete pulse width modulation cycle, that is, the area enclosed by the current waveform and the time axis.
[0050] In the specific implementation, the start time of the integration operation is synchronized with the start time of the target pulse width modulation period, and the stop time of the integration operation is synchronized with the end time of the target pulse width modulation period. The integration window is aligned with the boundary of the pulse width modulation period. Only one current integral value is output for one pulse width modulation period, and there is no need to perform high-frequency sampling and reconstruction of the bus current waveform.
[0051] S105 determines the duty cycle of the target pulse width modulation period based on the voltage vector amplitude.
[0052] In this embodiment, after obtaining the voltage vector amplitude of the target voltage vector, the duty cycle of the DC bus current within the target pulse width modulation period is determined based on the amplitude. This duty cycle is used to subsequently calculate the effective value of the bus current by combining the current integral value.
[0053] Duty cycle refers to the ratio of the total effective voltage vector duration within the target pulse width modulation period to the duration of the entire pulse width modulation period.
[0054] In the specific implementation, the bus voltage value of the DC bus is first obtained, and the ratio of the voltage vector amplitude to the bus voltage value is used as the modulation ratio. Then, based on the modulation ratio and the target angles corresponding to the two adjacent base voltage vectors, the duration of action of each of the two adjacent base voltage vectors is calculated. The two durations are added together to obtain the total effective voltage vector duration. Finally, the total effective voltage vector duration is divided by the period of the pulse width modulation period to obtain the duty cycle of the target pulse width modulation period. The larger the voltage vector amplitude, the larger the duty cycle, and the larger the current integral value, the more fixed the ratio of the three is. This ratio is used to reconstruct the effective value of the bus current from the current integral value.
[0055] S106, determine the effective value of the bus current of the DC bus based on the current integral value and the duty cycle.
[0056] In this embodiment of the application, after obtaining the current integral value and duty cycle, the effective value of the DC bus current is calculated by using the waveform characteristics of the equivalent square wave current through the current integral value and duty cycle.
[0057] Under the equivalent square wave current condition, the bus current exhibits a single-amplitude square wave shape within one pulse width modulation period. The amplitude of this square wave is equal to the current integral value divided by the product of the duty cycle and the period duration. After obtaining the square wave amplitude, multiplying the square wave amplitude by the square root of the duty cycle yields the effective value of the bus current corresponding to that pulse width modulation period.
[0058] In practical implementation, the current integral value is the cumulative amount of the equivalent square wave current within a complete pulse width modulation cycle, and the duty cycle reflects the proportion of time the current flows within that cycle. Since the effective value of the square wave current is equal to the square root of the amplitude multiplied by the duty cycle, and the integral value is equal to the amplitude multiplied by the duty cycle and then by the cycle duration, solving these two equations simultaneously eliminates the duplicate terms in amplitude and duty cycle, and the effective value is directly obtained by dividing the integral value by the product of the cycle duration and the square root of the duty cycle. This calculation method utilizes the waveform characteristics and duty cycle information of the square wave current, and can obtain the true effective value without obtaining the instantaneous current waveform.
[0059] This application obtains the target voltage vector pre-generated by the motor controller for the current pulse width modulation cycle. The target voltage vector includes the voltage vector angle and the voltage vector amplitude. The target voltage vector can be obtained by the motor controller without the need for additional sensors or measurement circuits.
[0060] This application determines the target angle between the target voltage vector and several preset base voltage vectors based on the voltage vector angle. If any target angle is less than a preset angle threshold, the current of the DC bus in the current pulse width modulation period is determined to be an equivalent square wave current, and the current pulse width modulation period is taken as the target pulse width modulation period. By calculating the angle to determine the current waveform shape, the pulse width modulation period in which the bus current can be equivalent to a square wave can be accurately identified without high-speed sampling of the bus current.
[0061] This application samples and integrates the equivalent square wave current at the beginning of the target pulse width modulation period and stops the integration at the end of the target pulse width modulation period to obtain the current integral value. The integration window is synchronized with the pulse width modulation period, and only one integration result needs to be collected at the end of each period, which reduces the requirement for the sampling rate.
[0062] This application determines the duty cycle of the target pulse width modulation period based on the voltage vector amplitude, and determines the effective value of the DC bus current based on the current integral value and the duty cycle. The duty cycle is calculated from the voltage vector amplitude without additional measurement, and the effective value is accurately calculated by combining the integral value, avoiding the error of using an average value to equip the effective value, thus achieving high-precision measurement at low cost. This ensures the accuracy of the effective value detection of the DC bus current.
[0063] Optionally, several preset base voltage vectors are located in the same voltage vector plane, and each base voltage vector has a corresponding direction angle; the several preset base voltage vectors divide the voltage vector plane into multiple voltage sectors.
[0064] In this embodiment, space vector pulse width modulation (SVM) performs voltage synthesis based on a voltage vector plane, in which multiple base voltage vectors are pre-defined. Each base voltage vector has a fixed directional angle, and the region between two adjacent base voltage vectors constitutes a voltage sector. All base voltage vectors divide the voltage vector plane into multiple voltage sectors.
[0065] Reference Figure 2 The diagram shows a schematic representation of a voltage vector plane according to an embodiment of this application.
[0066] like Figure 2 The six non-zero base voltage vectors are base voltage vector V1, base voltage vector V2, base voltage vector V3, base voltage vector V4, base voltage vector V5 and base voltage vector V6, and each base voltage vector corresponds to a switching state of the inverter.
[0067] The basic voltage vector V1 corresponds to the inverter's switching state 001, that is, the lower bridge arm of phase A is on, the lower bridge arm of phase B is on, and the upper bridge arm of phase C is on. The basic voltage vector V2 corresponds to the inverter's switching state of 010, that is, the lower bridge arm of phase A is on, the upper bridge arm of phase B is on, and the lower bridge arm of phase C is on. The basic voltage vector V3 corresponds to the inverter's switching state 011, that is, the lower bridge arm of phase A is on, the upper bridge arm of phase B is on, and the upper bridge arm of phase C is on. The basic voltage vector V4 corresponds to the inverter's switching state of 100, that is, the upper bridge arm of phase A is on, the lower bridge arm of phase B is on, and the lower bridge arm of phase C is on. The basic voltage vector V5 corresponds to the inverter's switching state 101, that is, the upper bridge arm of phase A is on, the lower bridge arm of phase B is on, and the upper bridge arm of phase C is on. The base voltage vector V6 corresponds to the inverter's switching state 110, which means that the upper bridge arm of phase A is on, the upper bridge arm of phase B is on, and the lower bridge arm of phase C is on.
[0068] The voltage vector plane is evenly divided into six voltage sectors according to their respective directional angles: sector I, sector II, sector III, sector IV, sector V, and sector VI. The angle range of each sector is 60 degrees.
[0069] The target voltage vector Vref must fall within one of the six voltage sectors based on its voltage vector angle. After determining the target voltage sector where the target voltage vector is located, two base voltage vectors are selected from the six non-zero base voltage vectors to serve as the boundaries of the target voltage sector. These two base voltage vectors are the two adjacent base voltage vectors used in space vector pulse width modulation to synthesize the target voltage vector.
[0070] Figure 2 The diagram also shows zero vectors V0 and V7. The zero vector is located at the origin of the voltage vector plane and corresponds to the switching states of all upper bridge arms of the inverter being either completely off or completely on. It does not change the direction of the target voltage vector during voltage synthesis. Specifically, zero vector V0 corresponds to an inverter switching state of 000, i.e., the lower bridge arm of phase A is on, the lower bridge arm of phase B is on, and the lower bridge arm of phase C is on; zero vector V7 corresponds to an inverter switching state of 111, i.e., the upper bridge arm of phase A is on, the upper bridge arm of phase B is on, and the upper bridge arm of phase C is on.
[0071] The steps for determining the target angle between the target voltage vector and several preset base voltage vectors based on the voltage vector angle include: S11, Based on the voltage vector angle, determine the target voltage sector where the target voltage vector is located among multiple voltage sectors; S12, determine the first base voltage vector and the second base voltage vector as the boundary of the target voltage sector from a number of preset base voltage vectors; S13, determine the first target angle between the target voltage vector and the first base voltage vector based on the voltage vector angle and the direction angle of the first base voltage vector; S14, determine the second target angle between the target voltage vector and the second base voltage vector based on the voltage vector angle and the direction angle of the second base voltage vector.
[0072] In this embodiment of the application, after obtaining the voltage vector angle of the target voltage vector, the voltage sector in which the target voltage vector currently falls is determined from a plurality of preset voltage sectors based on the directional position of the angle in the voltage vector plane, and the sector is the target voltage sector.
[0073] In the specific implementation, the voltage vector plane is divided into multiple voltage sectors by multiple base voltage vectors according to their respective directional angles, and each sector corresponds to a certain angular range. The voltage sector corresponding to the angular range in which the voltage vector angle of the target voltage vector falls is the target voltage sector.
[0074] In this embodiment, after determining the target voltage sector, the base voltage vector constituting the sector boundary is identified from all preset base voltage vectors. The boundary of each voltage sector is composed of two adjacent base voltage vectors, which are respectively denoted as the first base voltage vector and the second base voltage vector.
[0075] Among them, the first base voltage vector and the second base voltage vector are the two boundary base voltage vectors of the target voltage sector, and also the two adjacent base voltage vectors used in the synthesis of the target voltage vector in space vector pulse width modulation.
[0076] In this embodiment of the application, the voltage vector angle of the target voltage vector is compared with the direction angle of the first base voltage vector, and the difference between the two angles is calculated. This difference is the first target angle between the target voltage vector and the first base voltage vector.
[0077] In this embodiment of the application, the voltage vector angle of the target voltage vector is compared with the direction angle of the second base voltage vector, and the difference between the two angles is calculated. This difference is the second target angle between the target voltage vector and the second base voltage vector.
[0078] In the specific implementation, Figure 2 Taking the target voltage vector V as an example, ref The voltage sector currently being entered is sector I, which is the target voltage sector.
[0079] After determining that the target voltage sector is sector I, the basic voltage vectors constituting the boundary of this sector are basic voltage vector V4 and basic voltage vector V6. Basic voltage vector V4 is denoted as the first basic voltage vector, and basic voltage vector V6 is denoted as the second basic voltage vector.
[0080] The first target angle is the angle between the target voltage vector Vref and the base voltage vector V4.
[0081] The second target angle is the angle between the target voltage vector Vref and the base voltage vector V6.
[0082] This application determines the target voltage sector by obtaining the angle of the target voltage vector in the voltage vector plane, and then determines the two adjacent base voltage vectors of the sector boundary. The target angle between the target voltage vector and these two base voltage vectors is calculated respectively. This solves the problem of how to accurately obtain the basis for determining the bus current waveform from the voltage domain. No additional detection means are required. The angle parameters used to determine the equivalent square wave current can be obtained by using the space vector pulse width modulation information already in the motor controller.
[0083] Optionally, if any target angle is less than a preset angle threshold, the step of determining the current of the DC bus in the current pulse width modulation period as an equivalent square wave current and using the current pulse width modulation period as the target pulse width modulation period includes: S21, if the first target angle is less than the preset angle threshold, the target voltage vector is biased towards the first base voltage vector, and the current of the DC bus in the current pulse width modulation period is the equivalent square wave current under the action of the first base voltage vector. S22, if the angle between the second target and the second target is less than the preset angle threshold, the target voltage vector is biased toward the second base voltage vector, and the current of the DC bus in the current pulse width modulation period is the equivalent square wave current under the action of the second base voltage vector. S23, take the current pulse width modulation period as the target pulse width modulation period.
[0084] In this embodiment, the first target angle is compared with a preset angle threshold. When the first target angle is less than the preset angle threshold, it indicates that the target voltage vector has approached the direction of the first base voltage vector. Since the target voltage vector is close to the first base voltage vector, when the target voltage vector is synthesized in space vector pulse width modulation, the action time of the first base voltage vector dominates, the action time of the second base voltage vector approaches zero, and the bus current waveform degenerates into a single pulse shape generated by the action of the first base voltage vector. Therefore, the current of the DC bus in the current pulse width modulation period is the equivalent square wave current under the action of the first base voltage vector.
[0085] In this embodiment, the second target angle is compared with a preset angle threshold. When the second target angle is less than the preset angle threshold, it indicates that the target voltage vector has approached the direction of the second base voltage vector. Since the target voltage vector is close to the second base voltage vector, when the target voltage vector is synthesized in space vector pulse width modulation, the action time of the second base voltage vector dominates, the action time of the first base voltage vector approaches zero, and the bus current waveform degenerates into a single pulse shape generated by the action of the second base voltage vector. Therefore, the current of the DC bus in the current pulse width modulation period is the equivalent square wave current under the action of the second base voltage vector.
[0086] Reference Figure 3 The diagram shows a waveform of a pulse width modulation period according to an embodiment of this application.
[0087] Figure 3 The diagram illustrates the correspondence between the PWM count value, the three-phase PWM waveform, and the DC bus current waveform for a complete pulse width modulation cycle within sector I.
[0088] The first row in the diagram represents the PWM count values, which exhibit a triangular pattern and are used to compare with the comparison values of each phase to generate switching signals.
[0089] The second line shows the three-phase PWM waveforms, corresponding to the conduction logic of the upper bridge arms of phases A, B, and C, respectively. Within a complete pulse width modulation cycle, the three-phase PWM waveforms switch sequentially according to the seven-segment SVPWM switching sequence. The duration of each segment corresponds to half of the zero vector action duration T0, half of the first base voltage vector action duration T4, half of the second base voltage vector action duration T6, the zero vector action duration T7, half of the second base voltage vector action duration T6, half of the first base voltage vector action duration T4, and half of the zero vector action duration T0.
[0090] The third line shows the DC bus current waveform. During the effective base voltage vector action period, the DC bus current is on, and its amplitude is equal to the instantaneous value of the corresponding phase current; during the zero vector action period, all upper bridge arms of the inverter are off, and the DC bus current is zero. Therefore, the DC bus current waveform appears as a pulse.
[0091] Figure 3 The I marked in the middle p4 and I p6 These correspond to the bus current amplitudes during the periods of action of the first base voltage vector V4 and the second base voltage vector V6, respectively. Where, I p4 This indicates the current flowing through the DC bus during the operation of V4, which is equal to the phase current conducted during that time period; I p6 This indicates the current value flowing through the DC bus during the operation of V6, which is equal to the phase current conducted during that time period.
[0092] In sector I, when the target voltage vector approaches the boundary of V4, T6 approaches zero, and I... p6 The corresponding pulse width approaches zero, and only I is retained in the bus current waveform. p4 The corresponding pulse degenerates into a single-amplitude square wave pulse. When the target voltage vector approaches the V6 boundary, T4 approaches zero, and I... p4 The corresponding pulse width approaches zero, and only I is retained in the bus current waveform. p6 The corresponding pulse degenerates into a single-amplitude square wave pulse.
[0093] When the target voltage vector approaches the sector boundary, the duration of one of the two effective base voltage vectors approaches zero, and the amplitude of its corresponding current pulse approaches zero. The bus current waveform degenerates into a single amplitude square wave pulse, which can be equivalent to a square wave current in the effective value calculation.
[0094] In this embodiment of the application, after the judgment in S21 and S22, if either of the target angles corresponding to the two base voltage vectors is less than a preset angle threshold, it is determined that the current pulse width modulation period meets the equivalent square wave current condition, and the period is marked as the target pulse width modulation period so that an integral sampling operation can be performed on the period in subsequent steps.
[0095] This application compares the target angle between the target voltage vector and two adjacent base voltage vectors with a preset angle threshold. When any target angle is less than the preset angle threshold, the bus current is determined to be an equivalent square wave current. This solves the problem that it is difficult to directly identify the waveform range that can be used to calculate the effective value when the bus current waveform is pulsed. Without the need for real-time detection or high-speed sampling of the bus current waveform, the pulse width modulation period that meets the equivalent square wave condition can be accurately identified simply by angle comparison, providing an accurate execution window for subsequent integral sampling.
[0096] Optionally, the step of determining the duty cycle of the target pulse width modulation period based on the voltage vector amplitude includes: S31, obtain the bus voltage value of the DC bus and the period duration of the target pulse width modulation period; S32, the ratio of the voltage vector amplitude to the bus voltage value is used as the modulation ratio; S33, determine the first action duration corresponding to the first base voltage vector based on the period duration, modulation ratio, and the angle between the first and second targets; S34, determine the second action duration corresponding to the second base voltage vector based on the period duration, modulation ratio and the first target angle; S35, the sum of the first action duration and the second action duration is taken as the effective duration of the voltage vector; S36 uses the ratio of the effective duration of the voltage vector to the duration of the period as the duty cycle of the target pulse width modulation period.
[0097] In this embodiment, the real-time voltage value of the DC bus is obtained, which is a fundamental parameter for calculating the modulation ratio in space vector pulse width modulation. Simultaneously, the period duration of the target pulse width modulation period is obtained, which serves as the time reference for subsequent calculations of the duration of action of each base voltage vector and the duty cycle.
[0098] In this embodiment, the modulation ratio is obtained by dividing the amplitude of the target voltage vector by the voltage value of the DC bus. The modulation ratio reflects the relative magnitude relationship between the amplitude of the target voltage vector and the DC bus voltage, and is an intermediate variable for determining the duration of action of each base voltage vector in space vector pulse width modulation.
[0099] In practical implementation, the modulation ratio can be calculated as follows:
[0100] Where m is the modulation ratio, V ref V is the magnitude of the voltage vector. dc This is the bus voltage value of the DC bus.
[0101] In this embodiment, the period length of the target pulse width modulation period, the modulation ratio, and the first target angle are substituted into the formula for calculating the action time of the space vector pulse width modulation to calculate the action time of the first base voltage vector within the current target pulse width modulation period, which is denoted as the first action time.
[0102] by Figure 2 The target voltage sector is sector I, and the basic voltage vectors constituting the boundary of this sector are basic voltage vector V4 and basic voltage vector V6. Let's take the example of denoteing basic voltage vector V4 as the first basic voltage vector and basic voltage vector V6 as the second basic voltage vector.
[0103] In practical implementation, the duration of the first action can be determined according to the following formula:
[0104] in, This indicates the first duration of action of the first base voltage vector. This indicates the duration of the target pulse width modulation period. Indicates the included angle of the second target. The first target angle is represented by m, where m is the modulation ratio.
[0105] In this embodiment, the period duration of the target pulse width modulation period, the modulation ratio, and the second target angle are substituted into the formula for calculating the action time of the space vector pulse width modulation to calculate the action time of the second base voltage vector within the current target pulse width modulation period, which is denoted as the second action time.
[0106] In practical implementation, the duration of the second action can be determined according to the following formula:
[0107] in, This indicates the second duration of action of the second base voltage vector. This indicates the duration of the target pulse width modulation period. The first target angle is represented by m, where m is the modulation ratio.
[0108] In this embodiment, the first action duration and the second action duration are added together to obtain the total duration of the two effective base voltage vectors within the current target pulse width modulation period. This total duration is the effective duration of the voltage vector. In space vector pulse width modulation, the effective duration of the voltage vector corresponds to the total time that the upper bridge arm of the inverter is in the on state.
[0109] In this embodiment, the ratio obtained by dividing the effective duration of the voltage vector by the duration of the target pulse width modulation period is the duty cycle of the target pulse width modulation period. This duty cycle reflects the proportion of the inverter upper arm conduction time within the target pulse width modulation period to the entire period, and also corresponds to the proportion of the DC bus current conduction time within the period.
[0110] In practical implementation, within one pulse width modulation cycle of space vector pulse width modulation, the inverter sequentially outputs two effective base voltage vectors and a zero vector. The bus current flows through the DC bus only during the periods of the two effective base voltage vectors; during the period of the zero vector, the bus current is zero. Therefore, the conduction time of the bus current is equal to the sum of the first and second action durations. The duty cycle is the ratio of this conduction time to the pulse width modulation cycle duration, i.e., the duty cycle D equals the first action duration. Add a second duration The sum, divided by the period duration of the target pulse width modulation period. .
[0111] When the target voltage vector approaches the direction of a certain base voltage vector, the duration of the other base voltage vector approaches zero. At this time, the conduction time of the bus current degenerates to be determined only by the duration of the dominant base voltage vector, and the duty cycle correspondingly degenerates to the ratio of the duration of the dominant base voltage vector to the duration of the pulse width modulation period.
[0112] That is, when the target voltage vector approaches the first base voltage vector, the duty cycle D is equal to the first duration of action. Divide by the period duration of the target pulse width modulation period When the target voltage vector approaches the second base voltage vector, the duty cycle D equals the second duration. Divide by the period duration of the target pulse width modulation period It depends on which base voltage vector dominates.
[0113] This application solves the problem of accurately obtaining the bus current duty cycle from the target voltage vector in space vector pulse width modulation by obtaining the bus voltage value of the DC bus and the period duration of the target pulse width modulation period. The ratio of the voltage vector amplitude to the bus voltage value is used as the modulation ratio. The effective duration of each of the two adjacent base voltage vectors is determined according to the period duration, the modulation ratio, and the included angle between the two targets. The ratio of the sum of the two effective durations to the period duration is used as the duty cycle. This solves the problem of how to accurately obtain the bus current duty cycle from the target voltage vector in space vector pulse width modulation, realizes the accurate quantitative calculation of the duty cycle, and provides accurate calculation parameters for the subsequent determination of the effective value of the bus current.
[0114] Optionally, the step of determining the effective value of the bus current of the DC bus based on the current integral value and the duty cycle includes: S41, determine the current amplitude of the equivalent square wave current based on the current integral value, duty cycle and period duration; S42, determine the effective value of the equivalent square wave current within the target pulse width modulation period based on the current amplitude and duty cycle, and use it as the effective value of the bus current of the DC bus corresponding to the target pulse width modulation period.
[0115] In this embodiment of the application, after obtaining the current integral value, duty cycle and period duration, the current integral value is divided by the product of the duty cycle and the period duration to obtain the current amplitude of the equivalent square wave current.
[0116] The current integral value is the cumulative amount of the equivalent square wave current over a complete pulse width modulation cycle, which is equal to the current amplitude multiplied by the duty cycle and the cycle duration. Given the current integral value, duty cycle, and cycle duration, the current amplitude of the equivalent square wave current can be deduced.
[0117] In the specific implementation, firstly, the integral value of the bus current within a single PWM cycle is denoted as A.
[0118]
[0119] Where A represents the integral value of the current, The period represents the duration of the target pulse width modulation period, I represents the bus current, and t represents time.
[0120] When the angle between the target voltage vector and a certain base voltage vector is less than a preset angle threshold, this state indicates that the bus current is in single-pulse dominant mode. Therefore, the current of the DC bus in the current pulse width modulation cycle is an equivalent square wave current.
[0121] Under the equivalent square wave current condition, the bus current waveform exhibits a single-amplitude square wave shape within a complete pulse width modulation cycle. This square wave consists of a main conduction pulse during the period of the dominant base voltage vector and a zero-current interval during the period of the zero vector. At this time, the duty cycle of the bus current is equal to the ratio of the duration of the dominant base voltage vector to the duration of the pulse width modulation cycle, and the integral value of the current is equal to the current amplitude multiplied by the duty cycle and then multiplied by the period duration.
[0122] Where A represents the integral value of the current, This indicates the current amplitude, and D represents the duty cycle. This indicates the duration of the target pulse width modulation period.
[0123] The current amplitude of the equivalent square wave current can be calculated as follows:
[0124] in, A represents the current amplitude, A represents the integral value of the current, and D represents the duty cycle. This indicates the duration of the target pulse width modulation period.
[0125] In this embodiment, after obtaining the current amplitude of the equivalent square wave current, the current amplitude is multiplied by the square root of the duty cycle to obtain the effective value of the square wave current within the target pulse width modulation period. This effective value of the square wave current is the effective value of the DC bus current corresponding to the target pulse width modulation period.
[0126] The effective value of the DC bus current corresponding to the target pulse width modulation period can be calculated as follows:
[0127] in, This represents the effective value of the DC bus current. The current amplitude is represented by I, the bus current is represented by t, the time is represented by D, and the duty cycle is represented by D. This indicates the duration of the target pulse width modulation period.
[0128] Combining the above formulas and eliminating the current amplitude term, we get:
[0129] in, The value represents the effective value of the DC bus current, where A represents the integral value of the current and D represents the duty cycle. This indicates the duration of the target pulse width modulation period.
[0130] After eliminating the current amplitude term by combining the two equations, the effective value is determined only by three parameters: the integral value, the duty cycle, and the period duration. The effective value can be calculated without obtaining the instantaneous waveform of the current.
[0131] This application obtains the integral value of the current by integrating and sampling the equivalent square wave current, and then inversely calculates the current amplitude by combining the duty cycle and period duration, thereby calculating the effective value of the bus current. This solves the problem that it is difficult to accurately obtain the effective value directly from the average value or instantaneous value when the bus current is a pulse waveform. It realizes that the true effective value can be calculated with only the integral value and the duty cycle, without the need to obtain the instantaneous current waveform or a dedicated true effective value conversion chip. This reduces hardware costs while ensuring the accuracy of the effective value calculation.
[0132] Optionally, the method further includes the following steps: S51, smooth the effective value of the bus current of the DC bus corresponding to each of the consecutive preset number of target pulse width modulation periods, and use the smoothing result as the effective value of the bus current of the DC bus.
[0133] In this embodiment of the application, the effective value of the bus current corresponding to each of a consecutive preset number of target pulse width modulation cycles can be obtained. Each target pulse width modulation cycle is calculated to obtain a corresponding effective value of the bus current through the aforementioned steps.
[0134] This set of effective values is used as input data and smoothed to eliminate fluctuations between periods caused by sampling noise, switching action disturbances, or calculation errors. The smoothed result is then output as the effective value of the DC bus current.
[0135] In practical implementation, smoothing can be achieved using methods such as arithmetic averaging, moving average, or filtering. Taking arithmetic averaging as an example, the effective values of the bus current corresponding to a preset number of target pulse width modulation cycles are added together, and then divided by the preset number. The resulting average value is the smoothing result. This result serves as the final output of the effective value of the DC bus current, used for power calculation and energy consumption management in the motor control system. The preset number can be set according to actual conditions, for example, 20.
[0136] This application smooths the effective values of the bus current corresponding to each of a consecutive preset number of target pulse width modulation cycles, eliminating fluctuations between cycles caused by sampling noise, switching action disturbances, or calculation errors. It solves the problem of output instability caused by random disturbances in the effective value of a single cycle, realizes smooth and stable output of the effective value of the bus current, improves the stability and reliability of the measurement results, and provides reliable input data for power calculation and energy consumption management of the motor control system.
[0137] Optionally, the preset angle threshold is determined using the following method: S61, obtain a preset time threshold. The preset time threshold is used to represent the upper limit of the action time of the base voltage vector with a large angle with the target voltage vector within the target pulse width modulation period. S62, determine the preset angle threshold based on the preset time threshold, modulation ratio and period duration.
[0138] In this embodiment, a preset time threshold is first obtained. This time threshold is used to limit the upper limit of the duration of the base voltage vector with a larger angle to the target voltage vector within the target pulse width modulation period. When the duration of the base voltage vector is less than this upper limit, it indicates that the difference in duration between the two base voltage vectors is sufficiently large, and the bus current can be equivalent to a square wave current.
[0139] The preset time threshold is a pre-defined time value used to determine whether the duration of the base voltage vector is sufficiently short. The preset time threshold can be set according to actual conditions, for example, to 0.05 times the cycle length.
[0140] In practical applications of motor controllers, the selection of the pulse width modulation (PWM) period is related to the power level of the equipment and the application scenario. There are significant differences in the PWM period used for equipment of different power levels and for different application scenarios, with the range covering 25 microseconds to 1000 microseconds. Taking industrial general-purpose frequency converters as an example, the typical PWM period value is 125 microseconds to 250 microseconds.
[0141] In this embodiment of the application, after obtaining the preset time threshold, the modulation ratio and period duration of the current target pulse width modulation period, the preset time threshold is substituted into the above-mentioned formula for calculating the duration of spatial vector pulse width modulation, and the angle value corresponding to the preset time threshold is calculated in reverse. This angle value is the preset angle threshold.
[0142] Specifically, when the target voltage vector approaches the direction of the first base voltage vector, the duration of the second base voltage vector increases as the angle between the first and second targets increases. By substituting a preset time threshold as the upper limit of the duration of the second base voltage vector into the formula for calculating the second duration, the angle value of the corresponding angle between the first and second targets can be calculated. This angle value is the preset angle threshold.
[0143] Similarly, when the target voltage vector approaches the direction of the second base voltage vector, substituting the preset time threshold into the calculation formula for the first action duration, the corresponding preset angle threshold can also be calculated. The preset angle thresholds calculated for the two boundary cases can be the same, or they can be set separately according to actual needs.
[0144] This application solves the problem of how to convert quantifiable time conditions in engineering into angle determination conditions by obtaining a preset time threshold and using it as the upper limit of the action time of the base voltage vector when the target voltage vector is not close. It substitutes the target voltage vector into the action time calculation formula of space vector pulse width modulation to calculate the preset angle threshold. This achieves an accurate correspondence between the angle threshold and the time threshold, so that the angle determination can reflect the actual switching action timing constraints and ensures the operability and rationality of the angle determination in engineering.
[0145] Reference Figure 4 The diagram shows a logical schematic of a method for detecting the effective value of bus current according to an embodiment of this application.
[0146] like Figure 4 As shown, this method is continuously executed after the motor controller is powered on.
[0147] First, the target voltage vector generated by the motor controller for the current pulse width modulation period is obtained. Based on the angle of the target voltage vector, the target angle between the target voltage vector and each preset base voltage vector is determined, and it is determined whether the target angle is less than the preset angle threshold.
[0148] If the target angle is greater than or equal to the preset angle threshold, skip the current pulse width modulation cycle, continue to obtain the target voltage vector corresponding to the next pulse width modulation cycle, and re-evaluate.
[0149] If the target angle is less than the preset angle threshold, the current of the DC bus in the current pulse width modulation period is determined to be the equivalent square wave current, and the current pulse width modulation period is taken as the target pulse width modulation period.
[0150] At the beginning of the target pulse width modulation period, the control integral switch is turned off, causing the analog integrator to begin integrating the equivalent square wave current.
[0151] The integration continues throughout the entire target pulse width modulation cycle. At the end of the target pulse width modulation cycle, the analog-to-digital converter is triggered to sample and obtain the integral current value. Subsequently, the integration control switch is closed to reset the analog integration unit.
[0152] After obtaining the current integral value, the effective value of the DC bus current corresponding to the target pulse width modulation period is determined based on the current integral value and the duty cycle.
[0153] Continue performing the above integral sampling and RMS value determination steps for the next target pulse width modulation cycle, and smooth the RMS values of the DC bus current corresponding to each of the multiple consecutive target pulse width modulation cycles. When the number of processed target pulse width modulation cycles reaches a preset number, the smoothing result is output as the RMS value of the DC bus current.
[0154] Optionally, one embodiment of this application provides a bus current effective value detection system, which is used to perform the bus current effective value determination method as described above. The motor controller is powered by a DC bus, and the system includes a processor and a sampling integration circuit.
[0155] In this embodiment, the system for determining the effective value of the bus current consists of two core parts: a processor and a sampling integration circuit.
[0156] The processor is used to execute the steps involved in the method claims, such as judging, calculating, and generating control signals, including acquiring the target voltage vector, determining the target angle, determining the equivalent square wave current, determining the duty cycle, and calculating the effective value of the bus current.
[0157] The sampling integration circuit is used to perform the steps of analog signal processing involved in the method claims, including sampling the DC bus current, integrating the sampled signal within the target pulse width modulation period, and holding the integration result at the end of the period.
[0158] The processor and the sampling integrator circuit are connected via control and data signals. The processor sends integration start, integration stop, and reset signals to the sampling integrator circuit to control its timing. The sampling integrator circuit sends the integrated current value to the processor as input data for calculating the effective value of the bus current.
[0159] The processor and the sampling and integration circuit work together to determine the effective value of the bus current. The processor is responsible for logic control and numerical calculation, while the sampling and integration circuit is responsible for the acquisition and integration of analog signals. The two work together to achieve complete measurement functions through signal interaction.
[0160] The system specifically includes the following components: The processor is used to obtain the target voltage vector pre-generated by the motor controller for the current pulse width modulation cycle; the target voltage vector includes the voltage vector angle and the voltage vector amplitude; The processor is used to determine the target angle between the target voltage vector and several preset base voltage vectors based on the voltage vector angle; The processor is used to determine that the current of the DC bus in the current pulse width modulation period is the equivalent square wave current if any target angle is less than a preset angle threshold, and to take the current pulse width modulation period as the target pulse width modulation period. The sampling and integration circuit is used to sample and integrate the equivalent square wave current at the beginning of the target pulse width modulation period and stop integration at the end of the target pulse width modulation period to obtain the current integral value. The processor is used to determine the duty cycle of the target pulse width modulation period based on the voltage vector magnitude; The processor is used to determine the effective value of the bus current of the DC bus based on the current integral value and the duty cycle.
[0161] In this embodiment, the processor acquires a target voltage vector pre-generated by the motor controller during space vector pulse width modulation (SVM). This target voltage vector includes two parameters: voltage vector angle and voltage vector amplitude. After acquiring the voltage vector angle, the processor calculates the angle difference between the target voltage vector and each preset base voltage vector; this angle difference is the target angle. The processor compares each target angle with a preset angle threshold. When any target angle is less than the preset angle threshold, the processor determines that the current of the DC bus in the current SVM cycle is an equivalent square wave current and marks this cycle as the target SVM cycle.
[0162] After the processor determines the target pulse width modulation period, the sampling and integration circuit starts working at the beginning of the target pulse width modulation period to sample and integrate the equivalent square wave current of the DC bus. The sampling and integration circuit continues to integrate throughout the entire target pulse width modulation period until it stops integrating at the end of the target pulse width modulation period, obtaining the current integral value within that period, and then sending the current integral value to the processor.
[0163] After obtaining the integrated current value, the processor calculates the duty cycle of the target pulse width modulation period based on the voltage vector amplitude. Finally, the processor calculates the effective value of the DC bus current based on the integrated current value and the duty cycle. The processor and the sampling integrator circuit work together to determine the effective value of the bus current through the interaction of control and data signals. The processor is responsible for logical judgment and numerical calculation, while the sampling integrator circuit is responsible for the acquisition and integration of analog signals. Together, they achieve complete measurement functionality.
[0164] This application solves the problems of high cost or complex implementation in bus current effective value measurement by using a processor to perform angle determination and effective value calculation, and using a sampling integration circuit to complete current integration. It achieves low-cost, easy-to-implement and high-precision effective value measurement.
[0165] Optionally, refer to Figure 5 The diagram shows a schematic of the structure of a bus current effective value detection system provided in an embodiment of this application.
[0166] like Figure 5 As shown, the sampling and integration circuit includes a current sampling unit, an analog integration unit, and a sample-and-hold circuit.
[0167] The current sampling unit is connected in series in the DC bus to collect the equivalent square wave current and convert the equivalent square wave current into a current signal before sending it to the analog integrator unit; The input terminal of the analog integrator is connected to the output terminal of the current sampling unit to receive the current signal and integrate the current signal to obtain the current integral value. The sample-and-hold circuit is connected between the output of the analog integrator and the processor. It is used to hold the current integral value when the analog integrator stops integrating and to send the current integral value to the processor.
[0168] In this embodiment, the current sampling unit is connected in series in the DC bus. The current sampling unit is used to collect the equivalent square wave current of the DC bus and convert the equivalent square wave current into a current signal and send it to the analog integration unit.
[0169] The current sampling unit is connected in series in the DC bus circuit. All the DC bus current flows through the current sampling unit, thus enabling it to completely acquire the equivalent square wave current of the DC bus. The current sampling unit converts the acquired equivalent square wave current into a current signal form that can be processed by the analog integrator unit and sends it to the analog integrator unit.
[0170] The input of the analog integrator is connected to the output of the current sampling unit to receive the current signal and integrate it to obtain the integrated current value. The analog integrator continuously accumulates the current signal within the target pulse width modulation period, converting the accumulated current signal over time into the integrated current value.
[0171] The sample-and-hold circuit is connected between the output of the analog integrator and the processor. It holds the integral current value when the analog integrator stops integrating and then sends the integral current value to the processor. The sample-and-hold circuit latches the integration result when the analog integrator stops integrating, keeping the integral current value stable during analog-to-digital conversion and preventing changes in the integral value during subsequent processing.
[0172] In a practical implementation, the current sampling unit can be implemented using a current sampling circuit or a current sensor, connected in series with the DC bus to collect the current of the DC bus, and then output the current to the analog integration unit after converting the current into a voltage signal.
[0173] The analog integration unit can be implemented using an in-phase integration circuit consisting of an inverting integrator connected in series with an inverting proportional amplifier, or using a forward integration circuit. It is used to perform analog integration of the voltage signal output by the current sampling unit. The integration result is acquired by the sample-and-hold circuit and the analog-to-digital converter, and then sent to the processor for calculation.
[0174] This application acquires the equivalent square wave current of the DC bus through a current sampling unit and converts it into a current signal. The current signal is integrated through an analog integrator to obtain the current integral value. The integration result is latched and sent to the processor when integration stops through a sample-and-hold circuit. This solves the problem of signal link integrity from acquisition to integration to stable output of the bus current signal, and realizes a complete signal link of analog signal acquisition, integration and latching, enabling the processor to obtain a stable current integral value for subsequent effective value calculation.
[0175] Optionally, refer to Figure 6 The diagram shows a schematic representation of an analog integrator and an integrator control switch according to an embodiment of this application.
[0176] like Figure 6 As shown, the analog integrator unit includes an operational amplifier, an input resistor, and an integrating capacitor; The inverting input of the operational amplifier is connected to the output of the current sampling unit through an input resistor to receive the current signal; the non-inverting input of the operational amplifier is grounded. The integrating capacitor is connected between the inverting input terminal and the output terminal of the operational amplifier to accumulate the charge formed by the current signal during the integration process. The output of the operational amplifier serves as the output of the analog integrator unit, connected to the sample-and-hold circuit, and is used to output the integral value of the current corresponding to the integration result of the current signal.
[0177] In this embodiment, the operational amplifier, input resistor, and integrating capacitor together constitute the core structure of the integrating circuit. The input resistor is connected between the output of the current sampling unit and the inverting input of the operational amplifier to limit the input current, protect the operational amplifier, and control the integration time constant. The integrating capacitor is connected between the inverting input and output of the operational amplifier, continuously accumulating the charge injected by the current signal during integration; the accumulated charge increases with time. The non-inverting input of the operational amplifier is grounded, providing a reference ground potential for the integrating circuit. The output of the operational amplifier serves as the integration result output, outputting a voltage value corresponding to the accumulated charge; this voltage value is the integrated current value.
[0178] In its implementation, the current sampling unit converts the DC bus current into a voltage signal and outputs it to the analog integrator. The analog integrator integrates the voltage signal, and this integration result is physically equivalent to integrating the current signal. The integrator output voltage value is proportional to the time accumulation of the input current signal; this ratio is determined by the integrating resistor, integrating capacitor, and operational amplifier gain. The processor converts the integrator output voltage value into the corresponding integrated current value according to a pre-calibrated scaling factor. Therefore, although the analog integrator physically processes a voltage signal, the integration result physically represents the time accumulation of the DC bus current, i.e., the integral of the current over time.
[0179] This application constructs an inverting integrator structure using an operational amplifier, an input resistor, and an integrating capacitor. It performs analog integration on the current signal output from the current sampling unit, converting the time accumulation of the current signal into the corresponding voltage value output. This solves the problem of time accumulation of the bus current signal in the analog domain, and realizes accurate measurement of the accumulated amount of the equivalent square wave current within the complete pulse width modulation period, providing accurate integration result input for subsequent RMS value calculation.
[0180] Optionally, such as Figure 6 As shown, the sampling integration circuit also includes an integration control switch.
[0181] In practical implementation, the integral control switch can be implemented using switching devices such as insulated gate bipolar transistors (IGBTs) or low-voltage metal-oxide-semiconductor field-effect transistors (MOSFETs), and is connected in parallel across the integrating capacitor to short-circuit the integrating capacitor to achieve integration zeroing. Its switching state is controlled by the processor.
[0182] The integral control switch is connected in parallel across the integral capacitor, and the control terminal of the integral control switch is connected to the processor. The integral control switch is used to open at the beginning of the target pulse width modulation period to enable the analog integrator to start integrating, and to remain open during the target pulse width modulation period to enable the analog integrator to continue integrating.
[0183] In this embodiment, the integral control switch and the integral capacitor are connected in parallel. When the integral control switch is open, the discharge circuit across the integral capacitor is cut off, and the integral capacitor accumulates charge normally, simulating the integral unit in the integral operation state. When the integral control switch is closed, the charge across the integral capacitor is rapidly released through the low-resistance path formed by the switch, the integral capacitor resets to a zero-charge state, and the output of the analog integral unit returns to zero.
[0184] In the specific implementation, the processor sends a disconnect control signal to the integral control switch at the beginning of the target pulse width modulation period, and the integral control switch disconnects in response to the signal. After the integral control switch is disconnected, the integral capacitor begins to accumulate the charge injected by the current signal, and the analog integral unit begins integration. The integral control switch remains in the disconnected state throughout the entire target pulse width modulation period, ensuring that the analog integral unit can continuously integrate the entire target pulse width modulation period until integration stops at the end of the period.
[0185] Optionally, such as Figure 6 As shown, the integral control switch is also used to close after the current integral value is acquired, thereby clearing and resetting the analog integral unit.
[0186] In the specific implementation, at the end of the target pulse width modulation period, the processor triggers the analog-to-digital converter to acquire the integral current value. After the integral current value is latched by the sample-and-hold circuit, the processor sends a closing control signal to the integral control switch. The integral control switch closes in response to this signal, and the charge across the integral capacitor is rapidly released through the integral control switch, resetting the integral capacitor to a zero-charge state, and the output of the analog integrator unit returns to zero. After the zeroing and reset is completed, the integral control switch remains closed until it opens again at the start of the next target pulse width modulation period.
[0187] In the specific implementation, when the target angle between the target voltage vector and the base voltage vector is less than a preset angle threshold, the integral control switch is opened at the beginning of the pulse width modulation cycle, and the analog integrator performs linear accumulation and integration of the current signal. At the end of the pulse width modulation cycle, the analog-to-digital converter sample-and-hold circuit is triggered to latch the integration result, obtaining the current integral value. After sampling, the integral control switch is closed, and the integrating capacitor is discharged to zero, completing the control timing of the analog integrator within one pulse width modulation cycle. Here, the target voltage vector is the target voltage vector output by the field-oriented control algorithm in space vector pulse width modulation, and the base voltage vector is the preset base voltage vector in space vector pulse width modulation.
[0188] This application solves the problem of how to quickly reset the analog integrator unit after integration to prepare for the next integration by controlling the charge accumulation and release process of the integrator by connecting an integrator control switch in parallel across the integrator capacitor. This achieves precise timing control of the integration process, ensuring that the integration of each target pulse width modulation cycle starts from zero, and avoiding the cumulative effect of residual charge on the integration result.
[0189] The above provides a detailed description of the method and system for detecting the effective value of bus current. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for detecting the effective value of bus current, characterized in that, The motor controller is powered via a DC bus, and the method includes: The target voltage vector, pre-generated by the motor controller for the current pulse width modulation cycle, is obtained; the target voltage vector includes the voltage vector angle and the voltage vector amplitude. Based on the voltage vector angle, the target angle between the target voltage vector and several preset base voltage vectors is determined respectively; If any of the target angles is less than a preset angle threshold, then the current of the DC bus in the current pulse width modulation period is determined to be an equivalent square wave current, and the current pulse width modulation period is taken as the target pulse width modulation period. The equivalent square wave current is sampled and integrated at the beginning of the target pulse width modulation period, and integration is stopped at the end of the target pulse width modulation period to obtain the current integral value. The duty cycle of the target pulse width modulation period is determined based on the voltage vector amplitude; The effective value of the bus current of the DC bus is determined based on the current integral value and the duty cycle.
2. The method according to claim 1, characterized in that, The plurality of preset base voltage vectors are located in the same voltage vector plane, and each of the base voltage vectors has a corresponding directional angle; the plurality of preset base voltage vectors divide the voltage vector plane into multiple voltage sectors; The steps for determining the target angle between the target voltage vector and several preset base voltage vectors based on the voltage vector angle include: Based on the voltage vector angle, determine the target voltage sector where the target voltage vector is located among the plurality of voltage sectors; From the plurality of preset base voltage vectors, determine the first base voltage vector and the second base voltage vector as the boundary of the target voltage sector; Based on the voltage vector angle and the direction angle of the first base voltage vector, a first target angle is determined between the target voltage vector and the first base voltage vector; Based on the voltage vector angle and the direction angle of the second base voltage vector, a second target angle is determined between the target voltage vector and the second base voltage vector.
3. The method according to claim 2, characterized in that, If any of the target angles is less than a preset angle threshold, the step of determining that the current of the DC bus in the current pulse width modulation period is an equivalent square wave current and using the current pulse width modulation period as the target pulse width modulation period includes: If the first target angle is less than the preset angle threshold, the target voltage vector is biased toward the first base voltage vector, and the current of the DC bus in the current pulse width modulation period is the equivalent square wave current under the action of the first base voltage vector. If the second target angle is less than the preset angle threshold, the target voltage vector is biased toward the second base voltage vector, and the current of the DC bus in the current pulse width modulation period is the equivalent square wave current under the action of the second base voltage vector; Use the current pulse width modulation period as the target pulse width modulation period.
4. The method according to claim 2, characterized in that, The step of determining the duty cycle of the target pulse width modulation period based on the voltage vector amplitude includes: Obtain the bus voltage value of the DC bus and the period duration of the target pulse width modulation period; The ratio of the voltage vector amplitude to the bus voltage value is used as the modulation ratio; The first duration of action corresponding to the first base voltage vector is determined based on the period duration, the modulation ratio, and the second target angle. The second action duration corresponding to the second base voltage vector is determined based on the period duration, the modulation ratio, and the first target angle. The sum of the first action duration and the second action duration is taken as the effective duration of the voltage vector; The ratio of the effective duration of the voltage vector to the duration of the period is used as the duty cycle of the target pulse width modulation period.
5. The method according to claim 4, characterized in that, The step of determining the effective value of the bus current of the DC bus based on the current integral value and the duty cycle includes: The current amplitude of the equivalent square wave current is determined based on the current integral value, the duty cycle, and the period duration. The effective value of the equivalent square wave current within the target pulse width modulation period is determined based on the current amplitude and the duty cycle, and is used as the effective value of the bus current of the DC bus corresponding to the target pulse width modulation period.
6. The method according to claim 5, characterized in that, The method further includes: The effective value of the bus current of the DC bus corresponding to each of the target pulse width modulation cycles of a consecutive preset number is smoothed, and the smoothing result is used as the effective value of the bus current of the DC bus.
7. The method according to claim 4, characterized in that, The preset angle threshold is determined using the following method: A preset time threshold is obtained, which represents the upper limit of the duration of action of the base voltage vector that has a large angle with the target voltage vector within the target pulse width modulation period; The preset angle threshold is determined based on the preset time threshold, the modulation ratio, and the period duration.
8. A system for detecting the effective value of bus current, characterized in that, The system is used to execute the method for determining the effective value of the bus current as described in claim 1; the motor controller is powered by the DC bus, and the system includes a processor and a sampling integration circuit; The processor is used to obtain the target voltage vector pre-generated by the motor controller for the current pulse width modulation period; the target voltage vector includes voltage vector angle and voltage vector amplitude; The processor is used to determine the target angle between the target voltage vector and several preset base voltage vectors based on the voltage vector angle; The processor is configured to determine that the current of the DC bus in the current pulse width modulation period is an equivalent square wave current if any of the target angles is less than a preset angle threshold, and to use the current pulse width modulation period as the target pulse width modulation period. The sampling and integration circuit is used to sample and integrate the equivalent square wave current at the beginning of the target pulse width modulation period, and stop integration at the end of the target pulse width modulation period to obtain the current integral value. The processor is used to determine the duty cycle of the target pulse width modulation period based on the voltage vector amplitude; The processor is used to determine the effective value of the bus current of the DC bus based on the current integral value and the duty cycle.
9. The system according to claim 8, characterized in that, The sampling integration circuit includes a current sampling unit, an analog integration unit, and a sample-and-hold circuit; The current sampling unit is connected in series in the DC bus to collect the equivalent square wave current and convert the equivalent square wave current into a current signal before sending it to the analog integration unit. The input terminal of the analog integration unit is connected to the output terminal of the current sampling unit, and is used to receive the current signal and integrate the current signal to obtain the current integral value. The sample-and-hold circuit is connected between the output of the analog integrator and the processor, and is used to hold the current integral value when the analog integrator stops integrating, and send the current integral value to the processor.
10. The system according to claim 9, characterized in that, The analog integration unit includes an operational amplifier, an input resistor, and an integration capacitor; The inverting input terminal of the operational amplifier is connected to the output terminal of the current sampling unit through the input resistor to receive the current signal; the non-inverting input terminal of the operational amplifier is grounded. The integrating capacitor is connected between the inverting input terminal and the output terminal of the operational amplifier, and is used to accumulate the charge formed by the current signal during the integration process; The output terminal of the operational amplifier serves as the output terminal of the analog integrator unit and is connected to the sample-and-hold circuit to output the current integral value corresponding to the integration result of the current signal.
11. The system according to claim 10, characterized in that, The sampling integration circuit also includes an integration control switch; The integral control switch is connected in parallel across the integral capacitor, and the control terminal of the integral control switch is connected to the processor. The integral control switch is used to open at the beginning of the target pulse width modulation period, so that the analog integral unit starts to integrate, and remains open during the target pulse width modulation period, so that the analog integral unit continues to integrate.
12. The system according to claim 11, characterized in that, The integral control switch is also used to close after the current integral value is acquired, thereby resetting the analog integral unit to zero.
