Summary of the invention
The present invention provides a kind of method, apparatus of loss calculation and computer readable storage mediums, to solve existing skill
The problem of the real-time difference of loss calculation in art with electric and electronic power switching device pwm circuit.
The embodiment of the invention provides a kind of methods of loss calculation, applied to electric and electronic power switching device
Pwm circuit, the method comprise the steps that
According to the switch periods of device for power switching in pwm circuit, the sampling period is determined;
Within the sampling period, sampled data relevant to the power loss of the pwm circuit is obtained;
According to the sampled data, power loss of the pwm circuit within the sampling period is calculated.
Preferably, the switch periods according to device for power switching in pwm circuit, the step of determining the sampling period, packet
It includes:
Determine that N number of switch periods are the sampling period, wherein N is positive integer.
Preferably, described within the sampling period, obtain sampled data relevant to the power loss of the pwm circuit
The step of, comprising:
Within the sampling period, the target junction temperature of the device for power switching, the targeted loads of the pwm circuit are obtained
When electric current, the target duty ratio of driving signal for driving the device for power switching and the device for power switching turn off
Target blocking voltage.
Preferably, described within the sampling period, obtain target junction temperature, the PWM electricity of the device for power switching
The targeted loads electric current on road, the target duty ratio of driving signal for driving the device for power switching and the power are opened
The step of closing in target blocking voltage when device turns off, obtaining the target junction temperature of the device for power switching, comprising:
It obtains described in the first junction temperature and correspondence of the initial time in the correspondence sampling period of the device for power switching
The second junction temperature of the finish time in sampling period;
The arithmetic average for calculating first junction temperature and second junction temperature, the target as the device for power switching
Junction temperature.
Preferably, the sampling period is the M switch periods, and wherein M is the positive integer greater than 1;
It is described within the sampling period, obtain the target junction temperature of the device for power switching, the target of the pwm circuit
Load current, the target duty ratio of driving signal for driving the device for power switching and the device for power switching close
In the step of target blocking voltage when disconnected, the target duty ratio for driving the driving signal of the device for power switching is obtained
The step of, comprising:
Obtain in the correspondence sampling period of the driving signal the first duty ratio of first switch periods and last
Second duty ratio of one switch periods;
The arithmetic average for calculating first duty ratio and second duty ratio, as driving the power to open
Close the target duty ratio of the driving signal of device.
Preferably, described within the sampling period, obtain target junction temperature, the PWM electricity of the device for power switching
The targeted loads electric current on road, the target duty ratio of driving signal for driving the device for power switching and the power are opened
In the step of closing target blocking voltage when device shutdown, the step of obtaining the targeted loads electric current of the pwm circuit, comprising:
The first load current for obtaining the initial time in the correspondence sampling period of the pwm circuit is adopted with described in correspondence
The second load current of the finish time in sample period;
The arithmetic average for calculating first load current and second load current, as the pwm circuit
Targeted loads electric current.
Preferably, described within the sampling period, obtain target junction temperature, the PWM electricity of the device for power switching
The targeted loads electric current on road, the target duty ratio of driving signal for driving the device for power switching and the power are opened
In the step of closing target blocking voltage when device shutdown, target blocking voltage when device for power switching shutdown is obtained
Step, comprising:
Obtain the first blocking voltage and most that the device for power switching turns off the moment for the first time within the sampling period
Second blocking voltage at moment is once turned off afterwards;
The arithmetic average for calculating first blocking voltage and second blocking voltage, as the power switch device
Target blocking voltage when part turns off.
Preferably, described according to the sampled data, calculate power loss of the pwm circuit within the sampling period
The step of, comprising:
According to the sampled data, the conduction loss and switching loss of the device for power switching are calculated separately;
According to the conduction loss and switching loss of the device for power switching, determine the pwm circuit in the sampling week
Power loss in phase.
The embodiment of the invention also provides a kind of devices of loss calculation, applied to the PWM electricity with device for power switching
Road, wherein described device include:
Period determination module determines the sampling period for the switch periods according to device for power switching in pwm circuit;
Data acquisition module, for obtaining adopt relevant to the power loss of the pwm circuit within the sampling period
Sample data;
Loss calculation module, for calculating function of the pwm circuit within the sampling period according to the sampled data
Rate loss.
Preferably, the period determination module includes:
Period determination unit, for determining that N number of switch periods are the sampling period, wherein N is positive integer.
Preferably, the data acquisition module includes:
Data capture unit obtains the target junction temperature, described of the device for power switching within the sampling period
The target duty ratio and power of the targeted loads electric current of pwm circuit, driving signal for driving the device for power switching
Target blocking voltage when switching device turns off.
Preferably, the data capture unit includes:
First obtains subelement, the initial time in the correspondence sampling period for obtaining the device for power switching
The second junction temperature of the finish time in the first junction temperature and the corresponding sampling period;
First computation subunit, for calculating the arithmetic average of first junction temperature and second junction temperature, as institute
State the target junction temperature of device for power switching.
Preferably, the sampling period is M switch periods, and wherein M is the positive integer greater than 1;
The data capture unit includes:
Second obtains subelement, first switch periods in the correspondence sampling period for obtaining the driving signal
The first duty ratio and the last one switch periods the second duty ratio;
Second computation subunit is made for calculating the arithmetic average of first duty ratio and second duty ratio
For the target duty ratio for driving the driving signal of the device for power switching.
Preferably, the data capture unit includes:
Third acquisition subelement, the first of the initial time in the correspondence sampling period for obtaining the pwm circuit
The second load current of the finish time in load current and the corresponding sampling period;
Second computation subunit, for calculating the arithmetic mean of first load current and second load current
Value, the targeted loads electric current as the pwm circuit.
Preferably, the data capture unit includes:
4th obtains subelement, turns off the moment for the first time within the sampling period for obtaining the device for power switching
The first blocking voltage and last time turn off the moment the second blocking voltage;
4th computation subunit, for calculating the arithmetic mean of first blocking voltage and second blocking voltage
Value, target blocking voltage when as device for power switching shutdown.
Preferably, the loss calculation module includes:
Computing unit, for calculating separately the conduction loss of the device for power switching and opening according to the sampled data
Close loss;
Determination unit is lost and determines the PWM for the conduction loss and switching loss according to the device for power switching
Power loss of the circuit within the sampling period.
The embodiment of the invention also provides a kind of computer readable storage medium, deposited on the computer readable storage medium
Computer program is contained, the computer program realizes the step of the method for loss calculation as described above when being executed by processor
Suddenly.
The beneficial effect of the embodiment of the present invention is:
In above scheme, the loss calculation in pwm circuit is carried out by sampling algorithm, actually can measure in pwm circuit
Sampling algorithm based on data can accurately calculate the loss of device for power switching, and method calculates simple, spirit
It is living, suitable for the pwm circuit with device for power switching;And the different sample frequency bring loss errors under different operating conditions
Also there is correlation;It, can be according to different works in view of the requirement in Practical Project to the real-time of loss calculation and accuracy
Different phase selects different sample frequencys under condition or identical operating condition, the double optimizations of the speed and precision to reach loss calculation.
Specific embodiment
The exemplary embodiment that the present invention will be described in more detail below with reference to accompanying drawings.Although showing the present invention in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here
It is limited.It is to be able to thoroughly understand the present invention on the contrary, providing these embodiments, and can be by the scope of the present invention
It is fully disclosed to those skilled in the art.
Referring to Fig. 1, the embodiment of the invention provides a kind of methods of loss calculation, applied to device for power switching
Pwm circuit, which comprises
Step 11, according to the switch periods of device for power switching in pwm circuit, the sampling period is determined.
In the embodiment, determine that N number of switch periods are the sampling period, wherein N is positive integer, N 1,2,3 ... example
Such as: within a primitive period, if the number of setting sampled point is smaller, and considering the requirement of real-time of loss calculation, neglecting
Slightly under the premise of the precision of part, sampling calculating can be carried out with 3 switch periods;If the number of sampling points of setting is relatively more,
And the accuracy in view of calculating, it can be calculated using 1 switch periods.
What needs to be explained here is that the value of N can be determined according to the number of sampled point in the primitive period, N in the present invention
Value be not limited to examples presented above.
Step 12, within the sampling period, sampled data relevant to the power loss of the pwm circuit is obtained.
Specifically, within the sampling period, the target junction temperature of the device for power switching, the pwm circuit are obtained
The target duty ratio and the power switch device of targeted loads electric current, driving signal for driving the device for power switching
Target blocking voltage when part turns off.Wherein, the step of obtaining the target junction temperature of the device for power switching, comprising: obtain institute
State the first junction temperature and the end in the corresponding sampling period of the initial time in the correspondence sampling period of device for power switching
Second junction temperature at moment;The arithmetic average for calculating first junction temperature and second junction temperature, as the power switch device
The target junction temperature of part enables to calculate easy while guaranteeing to calculate precision.
Wherein, it is the M switch periods in the sampling period, when wherein M is the positive integer greater than 1, obtains for driving
The step of target duty ratio of the driving signal of the device for power switching, comprising: it is corresponding described to obtain the driving signal
Second duty ratio of the first duty ratio of first switch periods and the last one switch periods in sampling period;Calculate described
The arithmetic average of one duty ratio and second duty ratio, as the driving signal for driving the device for power switching
Target duty ratio enables to calculate easy while guaranteeing to calculate precision.
Such as: the value of M takes 3, i.e. the sampling period is 3 switch periods, for driving the driving of the device for power switching
The duty ratio of signal is the arithmetic mean of the second duty ratio of the first duty ratio of the 1st switch periods and the 3rd switch periods
Value.
Wherein, the step of obtaining the targeted loads electric current of the pwm circuit, comprising: obtain the correspondence institute of the pwm circuit
State the first load current and the second load current of the finish time in the corresponding sampling period of the initial time in sampling period;
The arithmetic average for calculating first load current and second load current, the targeted loads as the pwm circuit
Electric current enables to calculate easy while guaranteeing to calculate precision.
Wherein, the step of obtaining target blocking voltage when device for power switching shutdown, comprising: obtain the power
Switching device turns off first blocking voltage at moment for the first time within the sampling period and last time turns off the second of the moment
Blocking voltage;The arithmetic average for calculating first blocking voltage and second blocking voltage, as the power
Target blocking voltage when switching device turns off enables to calculate easy while guaranteeing to calculate precision.
Step 13, according to the sampled data, power loss of the pwm circuit within the sampling period is calculated.
Specifically, calculating separately the conduction loss and switching loss of the device for power switching according to the sampled data;
According to the conduction loss and switching loss of the device for power switching, function of the pwm circuit within the sampling period is determined
Rate loss.Wherein, the power loss of pwm circuit during the sampling period is the sum of conduction loss and switching loss.
In above scheme, the loss calculation in pwm circuit is carried out by sampling algorithm, actually can measure in pwm circuit
Sampling algorithm based on data can accurately calculate the loss of device for power switching, and method calculates simple, spirit
It is living, suitable for device for power switching pwm circuit and;And the different sample frequency brings under different operating conditions, which are lost, to be missed
Difference also has correlation;It, can be according to different in view of the requirement in Practical Project to the real-time of loss calculation and accuracy
Different phase selects different sample frequencys under operating condition or identical operating condition, and the speed and precision to reach loss calculation is double excellent
Change.
Application scenarios one: the loss computing method of the embodiment of the present invention can be applied to silicon carbide metal-oxide and partly lead
Body field effect transistor (Metal-Oxide-Semiconductor Field-Effect Transistor, abbreviation MOSFET)
Three-phase inverting circuit, the method specifically includes:
Step 21, the switch periods of the MOSFET according to the three-phase inverting circuit, determine the sampling period.
Referring to Fig. 3, the topology diagram of three-phase inverting circuit is shown.The three-phase inverting circuit includes: DC power supply 31
(Vdc), dc-link capacitance 32 (C), three phase inverter bridge 33 and motor 34.Specifically, three phase inverter bridge 33 is by six bridge arm structure of three-phase
At, by control 6 device for power switching turn-on and turn-off, stable three-phase current can be exported.
In the embodiment, with reference to the number of sampled point in a primitive period, determine that the sampling period includes N number of switch periods
The specific value of middle N, wherein N is positive integer.
Specifically, the corresponding primitive period is 0.02s if fundamental frequency is 50Hz.Such as: in primitive period 0.02s,
The number of sampled point is 1~50, it is contemplated that the requirement of real-time of loss calculation can be under the premise of ignoring part precision
Sampling calculating is carried out with 3 switch periods;If the number of sampled point is 50~180, it is contemplated that counting accuracy, using 1
Switch periods are calculated;If number of sampling points is 180~200, can be calculated using 3 switch periods.
What needs to be explained here is that the value of N can be determined according to the number of sampled point in the primitive period, N in the present invention
Value be not limited to examples presented above.
Step 22, within the sampling period, hits relevant to the power loss of the three-phase inverting circuit is obtained
According to.
Specifically, sampled data includes: the junction temperature of MOSFET, the load current of three-phase inverting circuit, for driving
The duty ratio of the driving signal of MOSFET and the DC bus-bar voltage of three-phase inverting circuit.
Wherein, the junction temperature of MOSFET is the arithmetic average of the first junction temperature Yu the second junction temperature, and specific first junction temperature is pair
The junction temperature of the MOSFET of the initial time in sampling period is answered, the second junction temperature is the MOSFET of the finish time in corresponding sampling period
Junction temperature.The mode of this junction temperature for calculating MOSFET enables to calculate easy while guaranteeing to calculate precision.
Load current is the average current of the first load current and the second load current, and specific first load current is pair
The load current of the initial time in sampling period is answered, the second load current is the load electricity of the finish time in corresponding sampling period
Stream.The mode of this computational load electric current enables to calculate easy while guaranteeing to calculate precision.
If the sampling period is M switch periods, wherein M is the positive integer greater than 1;Then the duty ratio in sampled data is,
The arithmetic average of the duty ratio of the duty ratio and the last one switch periods of first switch periods in sampling period, is being protected
While card calculates precision, enable to calculate easy.
The DC bus-bar voltage of three-phase inverting circuit is counting for the first DC bus-bar voltage and the second DC bus-bar voltage
Average value, specific first DC bus-bar voltage are the DC bus of the three-phase inverting circuit of the initial time in corresponding sampling period
Voltage, the second DC bus-bar voltage are the DC bus-bar voltages of the three-phase inverting circuit of the finish time in corresponding sampling period,
While guaranteeing to calculate precision, enable to calculate easy.
Step 23, according to the sampled data, power damage of the three-phase inverting circuit within the sampling period is calculated
Consumption.
Wherein, above-mentioned steps 13 specifically include: according to sampled data is stated, calculating separately two poles in the three-phase inverting circuit
The conduction loss and switching loss of the loss of pipe and the MOSFET;According to the loss of the diode and described
The conduction loss and switching loss of MOSFET determines power loss of the three-phase inverting circuit within the sampling period.Tool
Body, the loss of three-phase inverting circuit is the sum of the loss of diode, the conduction loss of MOSFET and switching loss.
Specifically, the loss of three-phase inverting circuit in switching device and reversed freewheeling diode in parallel mainly by generating.
Wherein, it is contemplated that body diode recovery characteristics are poor, in circuit design, body diode allowed to be not involved in reversed afterflow as far as possible
Journey.
Specifically, according to sampled data, the step of calculating the conduction loss of MOSFET, comprising:
According to the on state characteristic of the MOSFET and the junction temperature, the conducting resistance of the MOSFET is determined.
According to the load current, the electric current that the MOSFET is flowed through in the sampling period is determined.
According to the conducting resistance of the MOSFET, the electric current of the MOSFET is flowed through in the sampling period and described is accounted for
Empty ratio, is calculated the conduction loss of the MOSFET in the sampling period.
Wherein, the calculation formula of the conduction loss of MOSFET are as follows:
Pcond=I (t)2RonD
Wherein, PcondIndicate the conduction loss of the MOSFET;I (t) indicates the electric current of MOSFET in the sampling period
Arithmetic average;RonIndicate the conducting resistance of the MOSFET;D indicates the arithmetic average of duty ratio in the sampling period.
Wherein, in the sampling period electric current arithmetic average of MOSFET calculation formula are as follows:
Wherein, I1(t) electric current for corresponding to the MOSFET of the initial time in the sampling period is indicated;I2(t+N*Ts) table
Show the electric current of the MOSFET of the finish time corresponding to the sampling period;N indicates that the sampling period includes switch periods
Quantity;TsIndicate the switch periods.
Wherein, in the sampling period arithmetic average of duty ratio calculation formula are as follows:
Wherein, D1Indicate the duty ratio of first switch periods in the sampling period;DNIndicate the sampling period most
The duty ratio of the latter switch periods.
Specifically, according to sampled data, the step of calculating the switching loss of MOSFET, comprising:
According to the junction temperature, the electric current and the DC bus-bar voltage of the MOSFET are flowed through in the sampling period,
Determine the conducts energy value of the MOSFET.
According to the conducts energy value, the switching loss of the MOSFET in the sampling week is determined.
Wherein, the calculation formula for sampling the switching loss of the MOSFET in week are as follows:
Wherein, PSWIndicate the switching loss of the MOSFET in the sampling week;EonIndicate the conducting energy of the MOSFET
Magnitude;EoFF(n) the shutdown energy value of the MOSFET is indicated.
It should be noted that switching loss is that transient voltage and curent change draw when being opened, being turned off by device for power switching
It rises.MOSFET needed for calculating the switching loss of MOSFET turns on and off energy value, can also be determined by look-up table.
Specifically, according to sampled data, in calculating three-phase inverting circuit the step of the loss of diode, comprising:
According to the working characteristics of the load current and the diode in the three-phase inverting circuit, determine described in
The electric current of the diode is flowed through in sampling period.
According to the electric current of the diode, push over before diode is calculated to conducting voltage.
According to, to conducting voltage, being calculated in the sampling week before the electric current of the diode and the diode
The loss of diode.
Therefore in t1To t2Diode current flow is lost in time are as follows:
Wherein, Pcond-diodeIndicate the loss of the diode;Vdiode(t) to conducting voltage before expression diode;Idiode
(t) electric current of the diode is indicated;t1Indicate the initial time in the sampling period;t2Indicate the end in the sampling period
Moment.
In above scheme, the loss calculation in three-phase inverting circuit is carried out by sampling algorithm, can actually survey in circuit
The sampling algorithm of three-phase inverter loss based on amount data can accurately calculate the loss of device for power switching, and
And method calculates simply, flexibly, suitable for the silicon carbide MOSFET switching device of various models, invertor operation condition and tune
System strategy;And the different sample frequency bring loss errors under different operating conditions also have correlation;In view of in Practical Project
Requirement to the real-time and accuracy of loss calculation can be selected according to different phase under different operating condition or identical operating condition
Different sample frequencys, the double optimizations of speed and precision to reach loss calculation.
Application scenarios two: the method for the loss calculation of the embodiment of the present invention can also be applied to device for power switching
Chopper circuit.Such as Fig. 4, a kind of topology diagram of chopper circuit is given.
The method of the loss calculation includes: to determine the sampling period according to the switch periods of device for power switching 41.Specifically
, the step of determining the sampling period, can be no longer superfluous herein according to realization the step of the method for loss calculation in above-described embodiment
It states.
During the sampling period, sampled data relevant to the power loss of the chopper circuit is obtained.
According to the sampled data, loss of the chopper circuit within the sampling period is calculated.
Specifically, obtaining the sampling arithmetic average of 41 junction temperature of device for power switching, respective devices handbook output characteristics is bent
Line obtains 41 conduction resistance value of device for power switching under the junction temperature;Arithmetic average acquisition is sampled according to load current to flow through
Device for power switching current value;The driving signal for driving the device for power switching is obtained, determines the duty of driving signal
Than.According to the junction temperature of device for power switching 41, conduction resistance value, current value and duty ratio, calculates device for power switching 41 and lead
Logical loss.
The sampling arithmetic average for obtaining the DC bus-bar voltage of chopper circuit, further according to the device for power switching 41 of acquisition
Junction temperature and current value, switching loss is obtained by switching loss figure.
According to the sum of 41 conduction loss of device for power switching and switching loss, the loss in chopper circuit is determined.
It should be noted that the loss computing method of the embodiment of the present invention is in addition to being applied to inverter circuit and chopper circuit,
It can also be applied to other circuits with device for power switching, invention is not limited thereto.
It should also be noted that, the method for the loss calculation of the embodiment of the present invention, which is removed, is applied to the circuit with MOSFET,
Can also using with insulated gate bipolar transistor (Insulated Gate Bipolar Transistor, referred to as
IGBT circuit) or the circuit for specifically having other device for power switching, invention is not limited thereto.
Referring to Fig. 5, the embodiment of the invention also provides a kind of device of loss calculation, it is applied to that there is device for power switching
Pwm circuit, wherein described device include:
Period determination module 510 determines the sampling period for the switch periods according to device for power switching in pwm circuit.
Data acquisition module 520, for obtaining related to the power loss of the pwm circuit within the sampling period
Sampled data.
Loss calculation module 530, for calculating the pwm circuit within the sampling period according to the sampled data
Power loss.
Preferably, the period determination module 510 includes:
Period determination unit, for determining that N number of switch periods are the sampling period, wherein N is positive integer.
Preferably, the data acquisition module 520 includes:
Data capture unit obtains the target junction temperature, described of the device for power switching within the sampling period
The target duty ratio and power of the targeted loads electric current of pwm circuit, driving signal for driving the device for power switching
Target blocking voltage when switching device turns off.
Preferably, the data capture unit includes:
First obtains subelement, the initial time in the correspondence sampling period for obtaining the device for power switching
The second junction temperature of the finish time in the first junction temperature and the corresponding sampling period.
First computation subunit, for calculating the arithmetic average of first junction temperature and second junction temperature, as institute
State the target junction temperature of device for power switching.
Preferably, the sampling period is M switch periods, and wherein M is the positive integer greater than 1;
The data capture unit includes:
Second obtains subelement, first switch periods in the correspondence sampling period for obtaining the driving signal
The first duty ratio and the last one switch periods the second duty ratio.
Second computation subunit is made for calculating the arithmetic average of first duty ratio and second duty ratio
For the target duty ratio for driving the driving signal of the device for power switching.
Preferably, the data capture unit includes:
Third acquisition subelement, the first of the initial time in the correspondence sampling period for obtaining the pwm circuit
The second load current of the finish time in load current and the corresponding sampling period.
Second computation subunit, for calculating the arithmetic mean of first load current and second load current
Value, the targeted loads electric current as the pwm circuit.
Preferably, the data capture unit includes:
4th obtains subelement, turns off the moment for the first time within the sampling period for obtaining the device for power switching
The first blocking voltage and last time turn off the moment the second blocking voltage.
4th computation subunit, for calculating the arithmetic mean of first blocking voltage and second blocking voltage
Value, target blocking voltage when as device for power switching shutdown.
Preferably, the loss calculation module 530 includes:
Computing unit, for calculating separately the conduction loss of the device for power switching and opening according to the sampled data
Close loss;
Determination unit is lost and determines the PWM for the conduction loss and switching loss according to the device for power switching
Power loss of the circuit within the sampling period.
In above scheme, the loss calculation in pwm circuit is carried out by sampling algorithm, actually can measure in pwm circuit
Sampling algorithm based on data can accurately calculate the loss of device for power switching, and method calculates simple, spirit
It is living, suitable for the pwm circuit with device for power switching;And the different sample frequency bring loss errors under different operating conditions
Also there is correlation;It, can be according to different works in view of the requirement in Practical Project to the real-time of loss calculation and accuracy
Different phase selects different sample frequencys under condition or identical operating condition, the double optimizations of the speed and precision to reach loss calculation.
In order to preferably realize above-mentioned purpose, the embodiment of the invention also provides a kind of computer readable storage medium, institutes
It states and is stored with computer program on computer readable storage medium, the computer program realizes institute as above when being executed by processor
The step of method for the loss calculation stated.
Above-described is the preferred embodiment of the present invention, it should be pointed out that the ordinary person of the art is come
It says, can also make several improvements and retouch under the premise of not departing from principle of the present invention, these improvements and modifications also exist
In protection scope of the present invention.