Computer-implemented method for real-time testing of a control unit
10620265 ยท 2020-04-14
Assignee
Inventors
Cpc classification
G06F30/398
PHYSICS
International classification
G06F30/398
PHYSICS
Abstract
A method for real-time testing of a control unit with a simulator is provided. The simulator calculates a load current and a load voltage as electrical load state variables via converter control data and via an electrical load model that does not take into account current discontinuities caused by the converter, and transmits at least a portion of the load state variables to the control unit. A control observer is additionally implemented on the simulator that calculates at least the load current as a load state variable taking into account the converter control data and an observer load model. The observer detects a zero-crossing of the load current and a current discontinuity caused thereby from the calculated load current, and upon detection of a current discontinuity the observer calculates an electrical compensating quantity.
Claims
1. A computer-implemented method for real-time testing of a control unit with a simulator, the simulator having a simulator I/O interface and the control unit having a control unit I/O interface, the control unit and the simulator being connected to one another through their I/O interfaces via at least one data channel, the method comprising: transmitting, via the control unit, converter control data to the simulator through the data channel; calculating by the simulator a load current and a load voltage as electrical load state variables via the converter control data and via an electrical load model that excludes current discontinuities caused by the converter; transmitting by the simulator at least a portion of the load state variables to the control unit; implementing a control observer on the simulator; calculating via the control observer at least the load current as a load state variable, based on the converter control data and an observer load model; detecting, via the control observer, a zero-crossing of the load current and a current discontinuity caused thereby from the calculated load current; and upon detection of a current discontinuity, calculating via the control observer an electrical compensating quantity such that when the compensating quantity is additionally applied to the electrical load in the load model, the calculation of the load current using the load model takes place with reduced error in the presence of current discontinuities.
2. The method according to claim 1, wherein the load modeled by the load model is a commutated machine, an asynchronous machine, or a synchronous machine, and wherein the phase or phases of the machine are mathematically reproduced by at least one RLC network or at least one RL network.
3. The method according to claim 1, wherein the calculation of the observer load model takes place in observer time intervals that are synchronized by external switching events of the converter that are determined by analysis of the converter control data.
4. The method according to claim 1, wherein the observer load model contains at least one explicit function for the load state variable to be calculated.
5. The method according to claim 4, wherein the explicit functions are solution functions for linear differential equations that constitute the observer load model.
6. The method according to claim 1, wherein the observer load model is an average-value model, or wherein the observer load model is calculated numerically.
7. The method according to claim 6, wherein the calculation of the observer load model is driven by load state variables calculated with the load model.
8. The method according to claim 1, wherein the control observer detects a zero-crossing of the load current and a current discontinuity caused thereby by a change in sign of the calculated load current by analyzing values of the load current at a beginning and at an end of observer time intervals during which no element of the converter is switched on by corresponding converter control data.
9. The method according to claim 8, wherein a behavior of the current in observer time intervals with a zero-crossing of the load current is approximated linearly.
10. The method according to claim 1, wherein the control observer calculates the current discontinuity time interval upon detection of a zero-crossing of the load current and of a current discontinuity caused thereby.
11. The method according to claim 10, wherein the control observer calculates a compensating voltage as the compensating quantity, wherein the compensating voltage depends in on a ratio of the current discontinuity time interval to the switching period duration of the converter.
12. The method according to claim 11, wherein the compensating voltage calculated by the control observer is added in the load model to the load voltage switched by the converter, so that the calculation of the load current with the load model takes place based on a summed voltage at the load.
13. The method according to claim 1, wherein the electrical load model is calculated with a processor of the simulator, and wherein the control observer is calculated with a different processor of the simulator or the control observer is calculated with an FPGA of the simulator.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The present invention will become more fully understood from the detailed description given hereinbelow and the accompanying drawings which are given by way of illustration only, and thus, are not limitive of the present invention, and wherein:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
DETAILED DESCRIPTION
(10)
(11) The control unit 1 is a control unit to be tested, on which an algorithm for driving a converter is implemented in the present case. Because of its programming, and if applicable as a function of external data that the control unit 1 obtains through its control unit I/O interface 4, the control unit 1 determines converter control data 6in the form of pulse-width-modulated signals (PWM signals), for exampleand transmits them to the simulator 2. The simulator 2 contains neither an actual converter nor an actual load; instead, both components are recreated in the simulator 2 through a mathematical model, which is referred to here as the electrical load model 7. The structure illustrated in
(12) The load model 7 is a model of a type that does not take into account a current discontinuity caused by the converter; in the case shown, the load model 7 is a dynamic average-value model of an ohmic/inductive load. With the load model 7, a load current i.sub.x and a load voltage u.sub.x are calculated as electrical load state variables. At least a portion of the load state variables are transmitted through the data channel 5 from the simulator 2 back to the control unit 1, so that in total a closed-loop control system is implemented.
(13)
(14) Each phase of the converter 8 consists of two power switches, HSDX, LSDX, through which the relevant load phase is connected to the positive DC supply voltage HSD (High Side Drive) and the negative DC supply voltage LSD (Low Side Drive). The power switches here are labeled HSDA, LSDA; HSDB, LSDB; and HSDC, LSDC for simplicity. The power switches of the converter 8 are switched via converter control data 6, which are present here as pulse-width-modulated signals (PWM signals). The PWM signals are characterized in a known manner by their duty cycle, described in
(15)
(16)
(17) In the equations, T.sub.PWM represents the period of the PWM signal. In continuous mode, which is to say when either at least one power switch HSDX, LSDX is switched on or at least one of the anti-parallel connected diodes is still conductive in one load phase, the load current in each phase is described by the following differential equation (x=a, b, c):
(18)
(19) The two upper partial figures of
(20) The aforementioned property is possessed in common by all load models 7 that are used as a basis here. Typical load models 7, in which the discontinuous mode of converters is not taken into account and, moreover, cannot be taken into account in practice, are the so-called average-value models, in which the behavior of the load state variables to be calculated within, e.g., a PWM interval, is not of interest, and which calculate and use in their calculations the average values of the load state variables.
(21)
(22) Hence, the concept includes leaving the load model 7 unchanged in its simplicity, which is to say not taking into account current discontinuities caused by the converter 8, but calculating a compensating quantity such that when the electrical supply quantity increased or decreased by the compensating quantity u.sub.comp is applied to the electrical load within the existing load model 7, the same result is achieved as if the load model 7 had taken a current discontinuity into accountfor example via a structural change in the equations to be calculated.
(23) The principle of compensating for errors of the load model 7 in the event of current discontinuity by calculating a compensating quantity and additionally applying the calculated compensating quantity u.sub.comp to the electrical load in the load model 7 is completely independent of the load modeled by the load model 7. The modeled load is typically an electric machine, in particular a commutated machine, an asynchronous machine, or a synchronous machine, wherein the phase or phases of the machines are typically reproduced by an RLC network, and are mathematically reproduced to a good approximation by at least one RL network.
(24) In the example embodiment shown in
(25) The observer 9 detects a zero-crossing of the load current i.sub.x by a change in sign of the calculated load current i.sub.x, so that a current discontinuity 11 caused thereby can be inferred and this current discontinuity 11 can be detected. If values of the load current i.sub.x are calculated with the aid of the observer load model 10 only at the end of each observer time interval underlying the calculation, then the detection of a current discontinuity 11 takes place by analyzing the values of the load current i.sub.x at the beginning and at the end of the observer time interval, wherein it is extracted as additional information from the converter control data 6 whether the zero-crossing of the load current i.sub.x has taken place in an interval during which the power switches supplying the load phase were blocking, so that discontinuous mode is actually present.
(26) It is evident from
u.sub.x*=u.sub.x+u.sub.comp,x
(27) applies, whereas in contrast, when there is no zero-crossing of the currentno discontinuous modethe following continues to apply:
u.sub.x*=u.sub.x
(28)
(29) The magnitude of the required compensating voltage u.sub.comp is quite simple to calculate, since an erroneously calculated current through a coil, the dotted curve of the load current i.sub.x in
(30)
(31) there remains only the question of the duration of the discontinuous mode, which is to say the question of the sum of the discontinuous mode time intervals t.sub.zero.
(32)
(33)
(34) If another current discontinuity were to occur in a current discontinuity time interval t.sub.zero2 with the interval boundaries t3 and t4, then the following would apply accordingly:
(35)
(36) Consequently, within the framework of an average-value model as the load model 7, which carries out only one calculation within a PWM period, the compensating voltage would be calculated from
(37)
(38) It is readily evident from the equations that when a compensating voltage u.sub.comp is calculated as a compensating quantity, the compensating voltage u.sub.comp depends in particular on the ratio of the current discontinuity time interval t.sub.zero (or the sum of the current discontinuity time intervals within the calculation interval) to the switching period duration T.sub.PWM of the converter. In multiphase systems, the calculation shown is carried out for each phase, with each phase having its own observer. The load model 7 has applied to it a voltage in which the compensating voltage u.sub.comp,x calculated by the observer 9 is added to the load voltage u.sub.x switched by the converter, so that the calculation of the load current i.sub.x with the load model 7 takes place on the basis of the summed voltage at the load.
(39)
(40) The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are to be included within the scope of the following claims.