Method and device of PWM control

Abstract: In a fully digital PWM controller employing a sine-triangle modulating technique, the step of linearizing the dependence of the selected scanning frequency of the memory containing the digital samples of the modulating sinusoid, from the value of the digital selection datum, improves regulation at low speed by improving the resolution of selectable frequency values. The PWM driving signals produced by a fully digital controller implementing the linearization step of the invention show an F.F.T. extremely close to the F.F.T. of comparable PWM driving signals produced through a conventional analog technique.

Description: The present invention relates to a method and device for generating a Pulse Width Modulation (PWM) signal in a fully digital mode. A wide variety of electronic systems call for the capacity of producing a PWM signal, in particular in DC/AC converters, PWM inverters for driving alternating current motors, in control systems comprising phase locked loop (PLL) and similar systems. A widely used modulating technique is the so-called sine-triangle technique. This consists in comparing a first alternating signal which might be a sinusoid (customarily referred to as the modulating signal or the control signal) with a second alternating signal, essentially of a triangular shape (customarily referred to as the carrier signal or the reference signal). In many applications as those cited above, variation of the frequency of the produced modulated signal takes place by varying the frequency of the control signal (for instance sinusoidal) whereas the variation of the generated voltage may be obtained by varying the amplitude of the triangular signal. In this type of systems realized in a fully digital mode, the voltage and frequency variation is actuated via dedicated algorithms for the generation of digital data streams symbolizing the alternating control signals, by employing a microprocessor, often using a pre-established scheme in the form of a look-up table. In these systems, the number of values selectable or digital data are intrinsically limited in terms of available memory space. Furthermore, the control chain includes one or more microprocessors whose cost has a heavy impact on the overall cost of these products. Moreover, in recent years the development of DC/AC converters has made possible to extend the use of the asynchronous motor in many industrial sectors. Prior to the evolution of converters, when such energy conversion was not attainable, the motor could be rigorously used in line with nominal specifications (frequency and voltage) as defined by the manufacturer. indeed, in order to vary speed and torque it is indispensable, to vary both the supply voltage and the frequency. Such a motor could be controlled only by the use of dynamic converters or costly mechanical transmission systems. Nowadays this machine is attracting a renewed interest because of its intrinsic simplicity and sturdiness that make it preferable to DC machines, thanks to cost-effective new electronic technologies capable of providing reliable and compact switching devices. To generate proper driving signals of variable voltage and frequency for an asynchronous motor are indeed necessary modulation techniques and also in this case a sine-triangle PWM technique is used. US 4 666 070 discloses a control unit for DC-TO-AC converters wherein the switching frequency within a period as well as the wave shape of the DC-TO-AC inverter output voltage, are variable. Obviously, for a proposed application as the above mentioned of driving a multiphase, typically a three-phase, AC motor it is necessary to generate three sinusoidal control signals, out of phase by 120° among each other, whose frequency and amplitude are regulated by the control system. Generally, one of the technical problems that are encountered in realizing these systems in a digital form, using a static memory for storing a sequence of a number (m) of digital samples of a sinusoid, each of which is stored in the form of a word composed of a certain number of bits, is due to the way an appropriate scanning frequency of the control sinusoid, in function of the frequency of the PWM to be produced, is established. In a digital control system the approach is that of selecting the scanning frequency using a selection word or datum N, producing then the desired scanning frequency thus selected, by a block that divides a basic scanning dock frequency by the selection datum N, incremented by the unit (to avoid an illicit division by zero). As indicated in Fig. 1, this relationship follows an hyperbolic characteristic. This implies that the resolution becomes more and more difficult for small values of N and this the regulation may become critical. The characteristic depicted in Fig. 1 shows indeed accentuated discontinuities for small values of N. For instance, when setting rather high speeds (corresponding for example to a drive frequency of 50Hz or higher), on the basis of possible binary resolutions in this range (0-25), it becomes difficult to correctly set the desired memory scanning frequency. Evidently, there exists the need and/or usefulness for an improved method of generating digital streams representing modulated PWM signals that can be implemented using a relatively simplified logic circuitry interfaceable to any power driving circuit for a digital DC/AC conversion, capable of handling the control signals for the power switching devices. Basically, the method of the invention comprises a step of pre-dividing the frequency of a basic memory scanning clock signal by a divider n, incremented by one, univocally pointed from a look-up table by the digital selection command N, wherein the pre-computed and stored digital values of the divider n correspond to the values of a function of N, in order to linearize the dependence of the scanning frequency from the value of N. By taking into account that the sequence of digital samples into which is subdivided the alternating control signal, typically a sinusoid, that is the control sinusoid, may include for example a number m of samples, the frequency of the basic memory scanning clock signal may be given by the product of a system clock frequency Clk by the number m of digital samples into which is subdivided the sinusoid to be scanned. Of course, the memory may also contain a number, multiple of m, of digital samples of the sinusoid and therefore be able to support different scanning modes; as for example, from a relatively coarse mode where the number m of scanned samples be relatively small, e.g. 24, to a high resolution scanning mode involving the scanning of for example 92 samples, thus greatly reducing the ripple of an analog signal output by a DC/AC converter. Furthermore, in the event of multiphase systems, a first alternative would be that of storing in the memory a plurality of outphased sequences of the same digital samples in order to permit the reading of the instantaneous sample of each sinusoid, by addressing the memory in a parallel mode. Alternatively, just one sequence of digital samples may be stored in the memory and a reconstruction during of a plurality of digital streams representing as many out-of-phase sinusoidal signals, may be performed during the reading phase by reading and storing the instantaneous sample relative to the different sinusoids in as many registers, at different instants, through a pre-defined sequential addressing, thus obtaining the required phase shift among the different sinusoids being stored in the respective registers. Of course, in the first case, the memory requisite will be greater whereas in the second case there is the need of reading the data in the memory with a scanning frequency multiple of the selected real scanning frequency by a factor that matches the number of phases. Finally, instances may be postulated whereby the control signal is not a pure sinusoid, but any other alternating wave having a purposely pre-defined shape. The different aspects and advantages of the invention as defined in method claim 1 and system claim 3 will become even more evident through the following description of some important embodiments and by referring to the attached drawings, wherein: Figure 1 shows the hyperbolic relationship between a digital selection value N and the selected scanning frequency, according to a common technique as previously described; Figure 2 shows a classical scheme of a three-phase power stage using six power switches, driving the phase windings of a tri-phase AC motor; Figure 3 is a high level block diagram of a digital PWM driving system, realized according to the present invention; Figure 4 shows a functional diagram of the block that generates the scanning frequency; Figure 5 shows the relationship between the parameters n and N; Figure 6 shows pre-scaling characteristics of the frequency of the basic memory scanning clock; Figure 7 shows the discretization of a sequence of 48 digital samples of a sinusoid; Figures 8 and 9 shows for comparison purposes the F.F.T.(s) of a sinusoidal signal produced by a digital DC/AC converter made according to the invention and produced by an analog DC/AC converter. The ensuing description and the attached drawings have a purely illustrative purpose. The invention is not to be perceived as limited to the described embodiments or intended as applicable only to a control system of a PWM inverter for driving a three-phase motor. Fig. 2 shows the classical scheme of a power stage for driving a three-phase motor M. The stage comprises six power switches, which, in the example shown, may be IGBT or MOSFET devices. Fig. 3 shows a high level functional scheme of a control and driving system for a three-phase power stage as that depicted in Fig. 2. According to a digital implementation of the control system, this may comprise a driving block 4 which, for the assumed case, would include three comparators, namely: COMP1, COMP2 and COMP3, to an input of which is fed the same stream of digital data representing a triangular alternating signal, generated by the block 3. Through second inputs of the three comparators are respectively fed streams of digital data representing three distinct control sinusoidal signals, mutually outphased by 120°. PWM signals are generated at the outputs of the three comparators. These signals may directly drive the sourcing power switches of the stage shown in Fig. 2 and after introduction of a certain delay dead time by the respective T_time blocks, also the three sinking switches. The block 2 represents in a generic way a circuit that generates the control sinusoids in digital form mutually outphased by 120°, to be supplied to the inputs of the comparators COMP1, COMP2 and COMP3 respectively. The scheme of block 2 in Fig. 3 is relative to the alternative embodiment according to which a unique sequence of digital samples of a sinusoid is stored in a nonvolatile memory M. The reconstruction of three distinct streams of digital data, representing three sinusoidal signals outphased by 120°, is performed by reading and storing the instantaneous data relative to the three outphased sinusoids to be generated, at different instants, in three different registers R1, R2 and R3 using a pre-established address scheme, leading to a 120° shift. Of course, the scanning frequency used for reading the instantaneous data for the three sinusoids from the memory M must be at least three times higher than that of the output streams. The block 3 generates a stream of digital data representing a reference alternating signal of triangular shape that is fed in common to first inputs of the comparators COMP1, COMP2 and COMP 3. Substantially, block 3 may contain an up-down counter of an appropriate module, for instance of module 1024. Through the delta input of block 3, the user may choose a factor as a coefficient of multiplication, for example a value lower than 1, to adjust the period of the triangular alternating signal. Through the input C of the block may be supplied a clock signal of a frequency that can be pre-established by the user depending on the switching frequency of the power devices required by the system. Usually this pre-arranging of the clock frequency may be implemented by a pre-scaling dock multiplier stage, capable of receiving as input a three bit digital command that using as basic frequency the frequency of a general system's clock. The multiplying stage of the digital samples of the triangular reference signal by a certain coefficient delta (δ) serves to diminish the amplitude of the triangular signal while simultaneously producing a level shift so that the triangular signal remains symmetric in respect to the control sinusoids, according to the expression δ=Ac/Am, where Ac and Am are the amplitudes of the sinusoid and of the triangular signals respectively. The block 1 includes those parts of the system that particularly realize the invention. The function of the block 1 is that of generating a scanning frequency fsm of the memory M in function of a datum or digital selection command N. The block 1 may be realized according to the scheme depicted in Fig. 4. Besides including a (Prescaler) multiplier stage and a divider stage by (N+1) (Divider), the block essentially comprises an additional divider by (n+1), upstream of the divider by (N+1) and a look-up table pre-computed values of n that are pointed by the same digital selection datum of N, which represents the divisor of the relative divider by (N+1). The pre-scaling ratio, that is to say the factor of multiplication of a general clock frequency Clk in function of the number m of digital samples into which is subdivided the sinusoid stored in the memory M, may be pre-set by means of a three bit command. Hence, the output of the Prescaler is a basic scanning clock signal Clkm of the memory M. For instance, upon assuming that a control sinusoid be stored in a nonvolatile memory of 48 words of 8 bits (48 byte), the basic scanning clock frequency Clkm, produced by the pre-scaling block and equivalent to Clk*48, is divided by means of two 8-bit dividers in cascade , that is firstly by a linearization divider (n+1) and subsequently by a selection divider (N+1). Therefore: fsm = Clkm ( N + 1)( n + 1) The linearization factor n is pre-calculated according to the following equation: n = Clkm fsm * 1 ( N + 1) -1 n∈[1;255] and the 8 bit values, thus pre-computed and included in the field 0<n<256, are stored in a dedicated register or look-up table. The 8 bit values pre-computed and stored in the look-up table are addressed (pointed)by the same digital value of selection N, also of 8 bits, which also constitutes the divisor of the second divider by (N+1). The plot of Fig. 5 shows the linearization law of the above relationship. Fig. 6 shows a family of straight lines passing through a fixed point and whose angular coefficient is proportional to the value of the basic memory scanning clock frequency (Cklm) that represents the Prescaler function. The gradient of the straight line may be varied by the user depending upon the operating zone in which the motor is to function. In the considered application of driving a tri-phase AC motor, the digital control system of the driving according to the present invention allows to a microprocessor, eventually used in the control chain, to rapidly perform a correct calculation of the slip. Indeed the estimated slip s would be given by the difference between the speed of the stator rotating field ws and the speed of the rotor wr: s = ws - wr ws = fs - fr fs In the majority of cases, when operating in a fully digital mode, these values would be expressed in 8 bit words, that is, they would be numbers comprised between 0 and 255. Ideally the slip should be null under no-load as well as under full-load conditions. In reality, it is not null (s≠0) when the system is under a load. Therefore, it is important and desirable to keep the slip as close as possible to zero. This means that the value fs that assigns the stator's frequency be very close to the value fr fed to the microprocessor by dedicated sensors or other equivalent means. If, for example, the control system uses a tachometric dynamo for monitoring the motor speed, that will provide a voltage proportional to the speed, and therefore, subsequent to A/D conversion, a corresponding digital value will be input to the microprocessor. In this case the digital value is a linear function of the voltage and of the speed. Therefore, in a system realized in conformity with the present invention, this value may be directly utilized in the above stated slip control relationship, thanks to the linearization offered by the system of the invention. By contrast, in prior art systems the mapping required for performing a correct calculation would be rather cumbersome and time consuming for the microprocessor to carry through. According to the embodiment of the system of the invention disclosed above, the output of the block 2 of Fig. 3 consists of three digital streams of 8 bit data that represent the values of the sinusoids digitized and reciprocally outphased by 120°. Of course, the input of the block consists of the scanning frequency fsm produced by block 1. The storage of the sinusoid in the memory M may be obtained starting from the following expressions: a = round[127xsin(N)+127] b = round[127xsin(N)+2/3π)+127] c = round[127xsin(N)-2/3π)+127] N ∈ [0,1,2, ... h] where is h the number of points by which the sinusoid is to be digitized. In the example considered, h must be a multiple of three in order to determine an exact 120° phase shift. The memory positions containing the respective values of the three sinusoids outphased by 120°, are addressed through a module h counter. Thereafter, the reconstruction of the three digital control signals is carried out by reading and storing the data relative to the three sinusoids in three different registers R1, R2 and R3, at three different instants, using a pre-defined addressing so to obtain a shift of 120°. As stated above, the reconstruction of the three digital signals may be alternatively undertaken in a parallel mode by simultaneously reading three different memories of h bytes. Fig. 7 shows the digitization of a sinusoid with 48 points. By inserting, according to the invention, a linearization block constituted by the additional stage of pre-division by (n+1), a flexible selection of the resolution is also made available. For example, if the driving is to function with a motor supply frequency range from 0 to 200 Hz, the resolution may be chosen in 200/256 corresponding to 0.78 Hz. By contrast, if the operating frequency range is from 0 to 50 Hz, the resolution may chosen to correspond to 0.19 Hz. This added flexibility is decidedly important in optimally managing the control at low speeds. A further important advantage procured by the system of the invention is that of exactly knowing the mapping of the motor's driving frequency in function of the control word or datum N. This is most advantageous when operating in a condition of absolute control. Moreover, the linearization that is implemented by the system of the invention simplifies the execution of the speed control algorithms. By referring again to the above described example of a practical embodiment of the invention as applied to driving of a tri-phase motor, a comparison has been made between the F.F.T. of the driving signals applied to the windings of the motor resulting from a system realized as above described, and the driving signals as generated through a conventional analog technique, starting from a switching frequency of 10 Khz. Fig. 8 shows the F.F.T. diagram starting from a 50 Hz sinusoid digitized on 48 points, obtained by the digital method of the invention, using a modulation factor δ=1, a switching frequency of 10 Khz, and a motor's supply frequency of 50 Hz. For comparison, Fig. 9 shows the F.F.T. obtained by using an analog sinusoid for modulating the PWM signal under identical operating conditions of the motor.

Claims: A method of generating a first stream of digital data representing an alternating control or modulating signal to be compared with a second generated stream of digital data representing a triangular shaped alternating carrier or reference signal to produce a pulse width modulated signal, having a frequency selectable by a digital command datum (N), comprising the scanning of a sequence of a number (m) of digital values of said alternating control or modulating signal stored in a nonvolatile manner in the form of data or words of a certain number of bits, said scanning being effected at a scanning frequency (fsm) resulting from dividing a basic memory scanning clock frequency (Clk), multiplied by said number (m) of digital values into which is digitized said alternating control or modulating signal, by said digital command datum (N) incremented by one (N+1), characterized by the steps of dividing said basic memory scanning clock frequency (Clk), prescaled by multiplying by said number (m) of digital values, by a divisor (n) incremented by one (n+1), chosen from a look up table of digital values using said digital command datum(N) to point the chosen value, and wherein said digital values of said divisor (n) stored in said look-up table correspond to values of a function of said digital command datum (N) that linearizes the dependence of said scanning frequency (fsm) on said digital command datum(N); the digital values of said divisor (n) stored in said look-up table verify the following equation: n = Clk*m fsm * 1 ( N + 1) -1 The method according to claim 1, whereby the values of said divisor (n) stored in said look-up table are within 1 and 255. A pulse width modulation (PWM) system comprising means especially adapted to perform all the method steps, as defined in claim 1. The PWM system according to claim 3, wherein said digital selection command (N) is comprised between 1 and 255. The PWM system according to any of the preceding claims 3 and 4, whereby said nonvolatile memory contains a plurality of sequences digital samples of an alternating signal, mutually outphased, and the system comprises an identical number of comparator producing an identical number of PWM control signals, mutually outphased. The PWM system according to claim 5, characterized in that said alternating signal is a sinusoid. The PWM system according claim 6, characterized in that is a PWM control system driving a tri-phase AC motor. The PWM system according to claim 5, characterized in that is a static DC/AC multiphase converter.

Inventors: D ANGELO GIUSEPPE, DI GUARDO MARIO, LO PRESTI MATTEO, D'ANGELO, GIUSEPPE, DI GUARDO, MARIO, LO PRESTI, MATTEO
Applicants: ST MICROELECTRONICS SRL, STMICROELECTRONICS S.R.L.
Application year: 1996
Main classification: G06F7
IPC codes: H02M7, G06F7, H02P27, H03K7