Computer-implemented method for real-time testing of a control unit

10620265 ยท 2020-04-14

Assignee

Inventors

Cpc classification

International classification

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) FIG. 1 schematically shows a control unit and a simulator for computer-implemented execution of a real-time control unit test;

(3) FIG. 2 schematically shows an electrical schematic diagram of a converter with an electrical load (three-phase);

(4) FIG. 3 shows a behavior of converter control signals for driving power switches of the converter (single-phase);

(5) FIG. 4 schematically shows converter control signals and load currents that arise with and without current discontinuities;

(6) FIG. 5 shows a block diagram of the method according to an exemplary embodiment of the invention with an observer for identifying current discontinuities and calculating compensating quantities;

(7) FIG. 6 schematically shows an effect of a calculated compensating voltage and additional imposition of the compensation voltage on the electrical load;

(8) FIG. 7 shows the approximate calculation of the current zero-crossing under the assumption of a linear behavior of the load current; and

(9) FIG. 8 shows the numerical calculation of a load current in one phase of an asynchronous machine with and without an observer load model.

DETAILED DESCRIPTION

(10) FIG. 1 illustrates, firstly, a technical device arrangement with which a method for real-time testing of a control unit 1 with a simulator 2 can be carried out. The simulator 2 includes a simulator I/O interface 3, and the control unit 1 includes a control unit I/O interface 4. The control unit 1 and the simulator 2 are connected to one another through their I/O interfaces 3, 4 by a data channel 5. The data channel 5 can be implemented through a single serial data line, but it can also be implemented over multiple parallel data lines; this is not important in the present case. What is important is that the control unit 1 and the simulator 2 can exchange data over the data channel 5.

(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 FIG. 1 corresponds to a hardware-in-the-loop test of the control unit 1; hence, the environment of the control unit 1 is reproduced by the simulator 2 and the calculations within the simulator 2.

(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) FIG. 2 shows, in the form of an electrical schematic diagram, the components on which the calculation of the electrical load state variables by the simulator 2 is based. In this case the converter 8 is of three-phase design and the load model 7 accordingly consists of three phases (labeled with the subscripts a, b, c), each of which is composed of ohmic/inductive loads R.sub.s, L.sub.s. The load could be an asynchronous machine with a central neutral point, for example.

(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 FIG. 2 as DutyCycle_HSD, DutyCycle_LSD, and DutyCycle_Zero. These data are transmitted for each phase. The converter control data 6 determine which of the power switches HSDX, LSDX are switched on or block, so it is evident from analysis of the converter control data 6 which phase voltages u.sub.a, u.sub.b, u.sub.c are present at the relevant load phases. In the case of the ohmic/inductive loads shown in FIG. 2, the load model 7 consists of linear differential equations for each phase. For known supply-side voltages u.sub.x, the corresponding load currents i.sub.x (where x=a, b, c) can be calculated.

(15) FIG. 3 shows by way of example possible converter control data 6 for one phase in the form of PWM signals that switch the power switches HSDX, LSDX. The PWM signals as converter control data 6 shown in FIG. 3 result in the following duty cycles for the positive and negative supply voltage (HSD, LSD) and for the zero intervals during which none of the power switches is switched on:

(16) DutyCycle_HSD = t 1 - t 0 T PWM + t 5 - t 4 T PWM DutyCycle_LSD = t 3 - t 2 T PWM DutyCycle_zero = t 2 - t 1 T PWM + t 4 - t 3 T PWM

(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) L S = di x dt = u x - R S i x - u 0

(19) The two upper partial figures of FIG. 4 once again show, for one load phase, converter control data 6 in the form of PWM signals. Possible curves of load currents i.sub.x are shown below these. In the upper curve of the load current i.sub.x the current always remains positive, so that the current flow is still ensured even when both power switches block, which is to say that both HSDX and LSDX block (the associated PWM signals are in the off state). In the lower curve of the load current i.sub.x, however, what is called a current discontinuity arises, in which the load current i.sub.x, which was previously carried by the freewheel diodes, see FIG. 2, becomes zero. In this case the load current i.sub.x must of necessity remain at zero until one of the power switches HSDX, LSDX is switched on again. The current discontinuity time intervals are labeled in FIG. 4 as t.sub.zero1 and t.sub.zero2. The occurrence of this current discontinuity is critical in that the load model 7, which in accordance with its prerequisites does not take into account a current discontinuity caused by the converter 8, permits only an erroneous and imprecise calculation of the load state variables and in particular of the load current i.sub.x.

(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) FIG. 5 shows an enhancement of the method known per se from the prior art and described above that is distinguished in that a control observer 9 is additionally implemented on the simulator 2; the observer 9 calculates at least the load current i.sub.x as a load state variable taking into account the converter control data 6 (here in the form of DutyCycle_HSD/LSD/Zero) and with an observer load model 10; the observer 9 detects a zero-crossing of the load current i.sub.x and a current discontinuity 11 caused thereby based on the calculated load current i.sub.x; and upon detection of a current discontinuity 11, the observer 9 calculates an electrical compensating quantity u.sub.comp such that when the compensating quantity u.sub.comp is additionally applied to the electrical load in the load model 7, the calculation of the load current i.sub.x using the load model 7 takes place with reduced error in the presence of current discontinuities 11. In the example embodiment shown, both the normal phase voltage u.sub.x and the compensating voltage u.sub.comp contribute to the resulting voltage u.sub.x*.

(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 FIG. 5, the electrical load is described in the observer load model 10 by linear differential equations that represent an RL network. The observer load model 10 is calculated by a numerical method, here using the backward Euler method. As is evident from FIG. 5, the calculation of the observer load model 10 is driven by load state variables u.sub.x that come from the load model 7.

(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 FIG. 5 that the load model 7 is calculated without any adaptation whatever in the case where no current discontinuity is detected; the additional calculation of the compensating quantity u.sub.comp is then omitted. The load model 7 then has applied to it the voltage u.sub.x that results in the normal case. However, if a zero-crossing of the load current i.sub.x during the blocked interval of the power switches is detected, a calculation of the compensating quantity u.sub.comp takes place so that the resulting and corrected quantity that is applied to the load model 7 is calculated from the sum of the phase voltage u.sub.x and the compensating quantity u.sub.comp,x. Hence, at a zero-crossing of the current, the equation:
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) FIG. 6 illustrates the principle of operation of the observer 9 with a sketch of the curves of the converter control data in the form of PWM signals 6, the load current i.sub.x, and the compensating quantity in the form of the compensating voltage u.sub.comp. When the load current i.sub.x is calculated with only the simple load model 7, a zero-crossing of the current i.sub.x, and thus the current discontinuity 11, is not detected. The load model 7 continues to calculate with the previously applicable descriptions according to the equations, essentially irrespective of the forced staying of the load current i.sub.x at zero, resulting in the incorrect current curve i.sub.x, which is shown in a dotted line. The idea is to determine a compensating voltage u.sub.comp that, in combination with the converter voltage u.sub.x, affects the calculation of the load current i.sub.x by the simple load model 7 in such a way that the same result is produced for the load current i.sub.x as though the discontinuous mode had already been taken into account in the load model 7. It is evident from FIG. 6 that the curve of the load current i.sub.x is raiseddashed curve of i.sub.xby the additional action of the compensating voltage such that the current at the end of the discontinuity interval has in fact dropped to zero and has not erroneously been calculated as negative.

(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 FIG. 6, corresponds to a voltage-time area, which is to say a voltage that has acted on the coil for a specific time in order to cause the (erroneous) change in current. With the knowledge that in the case of the three-phase load during the discontinuous mode (i.sub.x=0) shown in FIG. 2, the voltage on the converter side at the load is equal to the common phase-to-neutral voltage u.sub.0 of the three phases, and that the phase-to-neutral voltage can easily be calculated from:

(30) u 0 = u a + u b + u c 3

(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) FIG. 7 shows a curve for the load current i.sub.x calculated with the observer load model 10, wherein the values i.sub.x,t1, i.sub.x,t2 for the load current i.sub.x are known at the times t.sub.1, t.sub.2 at the beginning and at the end of the observer time interval because of the calculation. A zero-crossing of the load current i.sub.x can be inferred from the change in sign of the calculated load current i.sub.x, which is then associated with a current discontinuity 11 if all power switches supplying the load are blocking in the observer time interval examined, which is assumed to be the case here. To avoid the necessity for a resource-intensive iterative method for determining the zero point, the curve of the current i.sub.x through the load in observer time intervals with a zero-crossing of the load current i.sub.x is approximated linearly, as is shown in FIG. 7. In this case the current discontinuity time interval t.sub.zero1,x can easily be calculated by the observer 9, since it is only necessary to determine the zero point of a straight line. For the situation shown in FIG. 7, the result for the current discontinuity time interval t.sub.zero1 is:

(33) t zero 1 , x = abs ( i x , t 2 ) abs ( i x , t 1 ) + abs ( i x , t 2 ) ( t 2 - t 1 )

(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) t zero 2 , x = abs ( i x , t 4 ) abs ( i x , t 3 ) + abs ( i x , t 4 ) ( t 4 - t 3 )

(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) u comp , x = t zero 1 , x + t zero 2 , x T PWM u 0

(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) FIG. 8 shows the calculation of the load current i.sub.x in a conventional manner, which is to say on the basis of a load model 7 that does not take the current discontinuity into account (FIG. 8a) and on the basis of the same load model 7, but which is additionally subjected to the compensating voltage u.sub.comp,x calculated by the described observer 9 (FIG. 8b). In both calculations, all power switches block starting from the point in time 50 ms. The uncorrected calculation in FIG. 8a ends in an erroneous continuous oscillation of the load current i.sub.x, while in contrast the calculation corrected by the observer 9 leads to a correct stationary zero load current i.sub.x.

(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.