MXPA97004859A - Apparatus and method for starting aninconnect machines - Google Patents

Apparatus and method for starting aninconnect machines

Info

Publication number
MXPA97004859A
MXPA97004859A MXPA/A/1997/004859A MX9704859A MXPA97004859A MX PA97004859 A MXPA97004859 A MX PA97004859A MX 9704859 A MX9704859 A MX 9704859A MX PA97004859 A MXPA97004859 A MX PA97004859A
Authority
MX
Mexico
Prior art keywords
asm
rotor
phase
currents
windings
Prior art date
Application number
MXPA/A/1997/004859A
Other languages
Spanish (es)
Other versions
MX9704859A (en
Inventor
Couture Pierre
Francoeur Bruno
Original Assignee
Hydroquebec
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US08/365,459 external-priority patent/US5537020A/en
Application filed by Hydroquebec filed Critical Hydroquebec
Publication of MX9704859A publication Critical patent/MX9704859A/en
Publication of MXPA97004859A publication Critical patent/MXPA97004859A/en

Links

Abstract

The present invention relates to a method for starting a synchronous machine having a rotor and a stator provided with windings, the rotor has an initial position with respect to the stator, the method comprises the steps of: (a) starting a starting phase of a first vector sum of successive vector sums of the currents that will be applied to the windings, (b) apply the successive vector sums of the currents to the windings, each of the successive vector sums have a phase, the method is characterized because further comprises the following steps: (c) detecting, for each of the vector sums of the currents applied in step (b), a movement of the rotor and the direction of movement with respect to the stator; (d) compensating for each of the movements and directions of the movements detected in step (c), the PVE phase of the subsequent vector sum of the successive vector sums of the currents applied to the s windings, to return the rotor to its initial position, (e) detect if the rotor has moved with respect to the stator, after applying the successive vector sums of the currents of step (b) and either increase the phase start in a different value from a multiple of 180 electrical degrees, if the rotor has not moved with respect to the stator, and return to step (b) or, proceed to step (f), and (f) store the value phase of the last of the successive vector sums applied to the windings, with which the machine is now ready to operate from the phase value stored in the step (

Description

APPARATUS AND METHOD FOR STARTING A SYNCHRONOUS MACHINE FIELD OF THE INVENTION The present invention relates to a method and an apparatus for starting an AC machine having a rotor and a stator provided with windings.
BACKGROUND OF THE ART In the prior art European Patent Application EP-A-0, 571, 076 is known, which discloses a method and an apparatus for starting a brushless CD machine. The method used is described as follows. First, an electric vector is applied to the motor, the phase of this vector will be increased until a predetermined value is obtained (+? Í). The final position (C; L) of the rotor displacement is indicated. Secondly, an electric vector is applied to the motor, the phase of this vector will be decreased until it reaches a predetermined value (-? Í). The final position (C2) of the rotor displacement is indicated. From these two displacements C and C2 > an average is obtained to determine the value of the starting position that corresponds to the superposition of the vector f of magnetic pole and the magnetic force I of the motor. A major drawback associated with this method for starting an engine is that the rotor must be displaced twice in a random fashion, before it is started. More specifically, this represents a problem when the motor is connected to a heavy load and can not afford a random movement of the rotor before starting it. The prior art also discloses U.S. Patent No. 5,323,094 which discloses a method and apparatus for starting a brushless CD machine, which is not equipped with a position detector. The method described consists of causing the motor rotor to rotate in the desired direction by applying a starting sequence in which at least two of the three phases of the stator are energized to produce a magnetic field. As is the case for the Patent Application European EP-A-0, 571, 076, this method for starting an engine suffers from an important drawback: the rotor must be displaced in a random manner before starting the engine. More specifically, this creates a problem in cases where the motor is connected to a heavy load and can not afford random movement of the rotor before starting it. Also in the prior art, U.S. Patent No. 5,221,881 to Scott W. CAMERON, a circuit for operating a polyphase CD motor is described. In lines 52 to 60 of the first column, it is mentioned, by way of example, that it is commonly achieved to start this motor in a known position and then produce information related to the instantaneous or current position of the motor. One method for obtaining information about the instantaneous position of the motor includes the use of a motor switching process to identify the floating coil and measure its retro-electromotive force, that is, the emf induced in the coil as it moves through the magnetic field. produced by the stator. A drawback associated with this method for starting an engine is that the position of the rotor must be known at the moment of starting. In order to determine the position of the rotor at the moment of starting, the rotor has to move substantially with respect to the stator, so that the emf can be measured. More specifically, this is a problem in cases where the motor is connected to a heavy load and a substantial random movement of the rotor during startup is not allowed. Also in the prior art, it is known from U.S. Patent No. 4,814,677 to Allan B.PLUNKETT which describes a field orientation control circuit of a permanent magnet motor. In lines 22 to 29 of column 7 of this patent, it is mentioned that the magnitude of the current Ia is sufficient to cause the motor to move towards its preferred alignment when the magnetic field of the stator is applied. After the current Ia is applied, for a time sufficient to allow rotor alignment, an inverter 37 is energized to produce a ramp-shaped current conforming to a β-axis, which generates an excitation wave of rotating magnetomotive force in the air gap, which produces a torque that starts the rotation of the rotor. Again, the drawback with this operation is that when the rotor is connected to a heavy load it is not possible to allow a substantial random movement of the rotor during engine start-up. U.S. Patent No. 4,748,387 to Jiro TANUMA et al. Is also known, which discloses a method and apparatus for controlling the starting position of the rotor of a brushless DC motor. In lines 4 to 15 of the third column, it is mentioned that the motor comprises the steps of, at the moment in which the motor is started, to switch the current applied to the coils of the armature to excite them in several different phases, so that in this way locate the rotor in relation to an angular starting position. To take into account the steps in which the rotor is located in the angular starting position, the load action on the rotor is canceled, at least before the last phase is excited and, the rotation pulse is subsequently controlled by counting the output pulses of the speed detecting means to detect the angular position of the rotor. The direction of rotation of the rotor is controlled based on the output pulses from the velocity detection means and the resulting count of these output pulses. Again, the drawback associated with this method for starting an engine is that the load connected to the rotor must be removed before the starting operation. This method does not allow the motor to start when the load is connected to the motor. Also in the prior art the following documents are known: 4,368,411 KIDD 4,409,530 NEEPER et al. 4,429,262 UTENICK 4,546,293 PETERSON et al. 4,712,050 NAGASAWA et al. 5,162,709 OHI 5,194,794 SHAMOTO 5,204,604 RADUN 5,221,880 BARTHOLO et al. None of these patents provides a method for starting the engine in cases where the engine is connected to a heavy load and a substantial random movement of the rotor is not allowed. An object of the present invention is to propose a method and an apparatus for starting an AC machine having a rotor and a stator provided with windings, even in cases where the motor is connected to a heavy load. According to the present invention, there is provided a method for starting a synchronous machine having a rotor and a stator provided with windings, the rotor has an initial position with respect to the stator, the method comprises the steps of: (a) starting a start-up phase that a first vector sum of successive vector sums of the currents that will be applied to the windings; (b) applying the successive vector sums of the currents to the windings, each of the successive vector sums has a phase, the method is also characterized in that it also comprises the following steps: (c) detecting, for each of the vector sums of the currents applied in step (b), a movement of the rotor and a direction of movement with respect to the stator; (d) compensating for each of the movements and directions of the movements detected in step (c), the PVE phase of a subsequent vector sum of the successive vector sums of the currents applied to the windings, to return the rotor to its initial position; (e) detect whether the rotor has moved with respect to the stator after application of the successive vector sums of the currents of step (b) and or increase the starting phase by a value other than a multiple of 180 electrical degrees , if the rotor has not moved with respect to the stator and return to step (b) or, proceed to step (f); and (f) storing the phase value of the last of the successive vector sums applied to the windings, whereby the machine is now ready to operate from the value of the phase stored in step (f). Also, according to the present invention, there is provided an apparatus for starting a synchronous machine having a rotor and a stator provided with winding, the rotor has an initial position with respect to the stator, the apparatus comprises a means for initializing a phase of start of a first vector sum of successive vector sum, of the currents that will be applied to the windings, and a means to apply successive vector sums of the currents to the windings, each of the vector sums has a phase, the apparatus is characterized because it further comprises: a means for detecting, for each one, the applied vector sums of current, a movement of the rotor and the direction of this movement with respect to the stator; a means for compensating, for each of the movements and directions of the movements that have been detected, the phase of a subsequent vector sum of the successive vector sums of currents applied to the windings, to return the rotor to its initial position; means for implementing the starting phase at a different value from a multiple of 180 electric degrees and for the rotor, after application of the successive vector sums of current, not to be moved with respect to the stator; and a means for storing the phase value of the last of the successive vector sums applied to the rotor, whereby the machine is now ready to operate from the phase value stored in the storage medium. The present invention also relates to a method for starting a synchronous machine, having a rotor and a stator equipped with windings, the method comprising the following step of: (a) applying a predetermined sequence of vector sums of the currents to the windings , the sequence of the vector sums have predetermined variable phases, the method is characterized in that it also comprises the following steps: (b) detecting and storing, for each of the vector sums of currents applied in step (a), a movement of the rotor and the direction of movement with respect to the stator; (c) establishing a function Fl in relation to the phase, based on the movements and directions detected in step (b), and establishing a function F2 with respect to the phase, based on the amplitudes of the sequence of the vector sums; and (d) mathematically adjusting an equation F that results from the functions Fl and F2 with a predetermined equation to obtain a phase difference, whereby the machine is now ready to operate from the phase difference. The present invention also relates to an apparatus for starting a synchronous machine, having a rotor and a stator provided with windings and comprising a means for applying a predetermined sequence of vector sums of currents to the windings, the sequence of the vector sums - has predetermined variable phases, the apparatus is characterized in that it further comprises: a means to detect and store, for each of the applied vector sums of the current, a rotor movement and the direction of this movement with respect to the stator; a means to establish a function Fl with respect to the phase, based on the movements and the directions of the movements; a means to establish a function F2 with respect to the phase, based on the amplitudes of the sequence of the vector sums; and a means to mathematically adjust an equation F that results from the functions Fl and F2 with a predetermined equation to obtain a phase difference, whereby the machine is now ready to operate from the phase difference. The objects and advantages as well as other features of the present invention will become more apparent upon reading the following non-restrictive description of the preferred embodiments thereof, given with reference to the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram showing an apparatus for starting a synchronous machine in accordance with the present invention; Figure 2 is another block diagram showing an apparatus for starting a synchronous machine in accordance with the present invention; Figures 3A and 3B show an algorithm illustrating a method for starting a synchronous machine in accordance with the present invention; Figures 4A, 4B and 4C show another algorithm showing a method for starting a synchronous machine in accordance with the present invention; Figures 5A, 5B and 5C show a block diagram showing in more detail an element shown in Figure 1; Figure 6 is a circuit diagram showing in more detail a portion of an element shown in Figure 1; and Figure 7 is a partial cross-sectional view of a synchronous machine.
DETAILED DESCRIPTION OF THE DRAWINGS Referring now to Figure 1, there is shown an apparatus for starting a synchronous machine (2) having a rotor (not shown) and a stator (not shown) provided with windings (not shown). The rotor and stator provided with the windings are shown in Figure 7.
This synchronous machine with a rotor and a stator provided with windings is well known in the art. The rotor has an initial position unknown with respect to the stator. For example, the synchronous machine may be the steering wheel of an electric vehicle engine, as shown in U.S. Patent No. 5,327,034. As can be easily understood, no substantial random movement of the vehicle during start-up can be allowed for safety reasons. The apparatus comprises a means for starting (6) a starting phase of a first vector sum of successive vector sums of currents that will be applied to the windings of the stator by means of the supply lines (4) and a means for applying (6) , 8, 10 and 12) successive vector sums of currents to the windings. Each of the successive vector sums has a given phase. The apparatus also comprises means for detecting (14 and 16), for each of the applied vector sums of the currents, a movement of the rotor of the machine (2) as well as the direction of this movement with respect to the stator; a means to compensate (6), for each movement and for each direction of movement that was detected, the phase of a subsequent vectorial sum of the successive vector sums of the currents applied to the windings of the machine (2), to return to the rotor towards its initial position; and a means for increasing (6) the starting phase in a different value from a multiple of 180 electrical degrees if the rotor of the machine (2), after applying the successive vector sums of the currents, has not moved with respect to to the stator. The apparatus also comprises a means for storing (6) the phase value of the last of the successive vector sums applied to the rotor of the machine (2). In this way, the machine (2) is now ready to be operated from the phase value stored in the storage means (6). The means for detecting (14 and 16) the movement of the rotor of the machine (2) and the direction of this movement with respect to the stator comprises an ascending / descending counter (16) and an increment encoder (14). The increment encoder (14) has an input (18) connected to the rotor of the machine (2) and an output (20) connected to an input (22) of the ascending / descending counter (16) having an output (36) connected to an input (37) of the control unit (6). Preferably, in cases where the machine is a motor vehicle steering wheel and no substantial random movement of the vehicle is allowed, the The resolution of the increment encoder (14) must be selected to be high enough, so that a very small movement of the rotor can be detected and compensated, even if the flywheel of the motor is immobilized by a braking means. The means for starting, the means for increasing, the means for storing and the means for compensating are all part of a control unit (6) which is provided with an input (39) for receiving an order. The control unit (6) is a TM320C30 digital signal processor provided with operating software. The means for applying (6, 8, 10 and 12) comprises a control unit (6) provided with operating software; a current detector (8) has inputs (24) to detect the currents applied to the windings of the machine (2) and a digital output (26) connected to an input (27) of the control unit (6); an inverter (10) has outputs (28) to apply the successive vector sums of the currents to the windings of the machine (2), by means of supply lines (4), an input (11) to receive the supply voltage of energy and an input (30) for receiving the control signals coming from an output (29) of the control unit (6); and a voltage detector (12) having an input (32) for detecting the power supply voltage Vdc applied to the inverter (10) and a digital output (34) connected to an input (35) of the control unit ( 6). Referring now to Figure 3, there is shown a method for starting a synchronous machine (2) having a rotor and a stator provided with windings. The method can be effected by the apparatus described above. The rotor has an initial position with respect to the stator. The method comprises the first step of (a) starting a start phase of a first vector sum of successive vector sums of current leis that will be applied to the winding of the machine (2). Preferably, step (a) comprises the steps of (i) determining an arbitrary position of the rotor and storing it in the variable MEMCNT; (ii) store a zero value in the variable INT that represents the integrated error of the phase; (iii) store a zero value in the variable AVE that represents an amplitude; (iv) increase the variable AVE in an INC value that has, for example, the value of 0.02; (v) determine if the variable AVE is greater than a constant AVEmax having for example a value of 200, of course, this condition is always negative in the step of initiating step (a), (vi) detecting the position again of the rotor and store this position in the variable CNT, which, at this point, has the same value as the variable MEMCNT because the rotor has not moved; (vii) calculate an integrated error by means of the following equation; INT = K * (CNT-MEMCNT) + INT, where K is a constant and has, for example, the value of -0.02, the value of INT remains the same, because, at this point, CNT is equal to MEMCNT; (viii) store the sum of CNT and INT in the variable PVE that represents the phase of the first vectorial sum of the successive vector sums of currents; (ix) detect the voltage supplied to the inverter and store its value in the variable Vdc; (x) detect the three currents applied to the machine (2) and store its value in the variables a, Ib or le, which, at this point in the initiation step, have values of zero; and (xi) calculate the values of PWMa, PWMb and PWMc from the values of PVE, AVE, Vdc, la, Ib or le. The start phase of the first vector sum of the successive vector sums of the currents is now started. The method also comprises the next step of subsection (b), which consists of applying the successive vector sums of the currents to the windings, each of the successive vector sums has a phase. Preferably, this step of part (b) comprises the steps of: (xii) producing a command signal Cmd for the inverter, identified by the number (10) in Figure 1, which results from the PWMa, PWMb and PWMc values , returning to step (iv) and repeating steps (iv) to (xii) until the condition of step of subsection (v) is satisfied. More precisely, step (b) comprises the steps of part (iv), determining, for each of the successive vector sums of the currents applied to the windings, an increased amplitude value of a subsequent vector sum of the sums successive vectors of the currents that will be applied to the windings; and (v) determining whether the increased amplitude value of the subsequent vector sum has reached a predetermined amplitude value and either terminating the application of the successive sums of streams from step (b) and proceeding to step (e), if the increased amplitude value of the subsequent vector sum has reached the predetermined amplitude value, or continue the application of the successive vector sums of step (b). • Preferably, in step (b) each of the successive vector sums of the currents is applied to the windings by means of modulated pulse width signals. The method also comprises the step (c) of detecting, for each of the vector sums of the currents applied in step (b), a movement of the rotor of the machine (2) and the direction of this movement with respect to the stator. . Preferably, this step is cad out by the previous steps of subsections (vi), (vii) and (viii). The method also comprises step (d) of compensating, for each movement and direction detected in step (c), the phase of a subsequent vector sum of the successive vector sums of the currents applied to the windings, to return the rotor to your initial position Preferably, this step is cad out in step (xi) above, where the values of PWMa, PWMb and PWMc were calculated, in such a way that they are taken into account in the last calculated integrated error INT, by means of which the compensation. Preferably, in step (d) the phase of a subsequent vector sum of the successive vector sums of the currents applied to the windings is compensated by means of the following equations PVE = INT + CNT, INT = K * M0V + INT1, in where PVE is the phase of a subsequent vector sum of the successive vector sums of the currents, INT1 is the integrated error of the last calculated integrated error, INT is the integrated error, MOV is equal to (CNT-MEMCNT) which represents the movement and the direction of this movement detected in step (c) with respect to the initial position, CNT is a value representative of the position of the rotor and K is a predetermined constant. The method also comprises the step (e) of detecting whether the rotor has moved with respect to the stator, after application of the successive vector sums of the current, to either increase the start phase to a value different from a multiple. of 180 electric degrees, which preferably is 90 electric degrees, if the rotor has not moved with respect to the stator and then return to step (b), or proceed to step (f). Preferably, this step (e) is cad out after it has been determined that the condition of step (v) is positive and comprises the next step (xiii), which consists of verifying if INT is equal to zero, which indicates that the rotor has not moved, and if this condition is positive, perform the following additional steps: (xiv) store a value of 90 degrees in the variable INT, (xv) store a value of zero in the variable AVE and return to step ( iv). The method also comprises the next step (f) of storing, after determining that the condition of step (e) is negative, the integrated error value INT of the last of the successive vector sums applied to the windings in an MPVE variable, with which the machine (2) is now ready to be operated from the integrated error stored in step (f). Preferably, this step (f) comprises the step (xvi) of storing the value of the variable INT in a variable MPVE, which is the value of the phase error from which the machine is now ready to be operated. The apparatus shown in Figure 1 can also be used to incorporate a second, different apparatus for starting a synchronous machine having a rotor (not shown) and a stator (not shown) provided with windings (not shown). This second apparatus is different from the apparatus described above in that the operating software of the control unit is different. This second apparatus comprises a means for applying (6, 8, 10 and 12) a predetermined sequence of vectorial sums of the currents to the windings of the machine (2), the sequence of the vector sums has predetermined variable phases, means for detecting and storing (6, 14 and 16), for each of the applied vector sums of the currents, a movement of the rotor of the machine (2) and the direction of this movement with respect to the stator; means for establishing (6) a function Fl with respect to the phase, based on the detected movements and directions; means for establishing (6) a function F2 with respect to the phase, based on the amplitudes of the sequence of vector sums, and a means for mathematically adjusting (6) an equation resulting from the functions Fl and F2 with a predetermined equation to obtain a phase difference, with which the machine (2) is ready to be operated from this phase difference. Preferably, the means for detecting and storing the movement of the rotor of the machine (2) and the direction of this movement with respect to the stator comprises a control unit (6) provided with an operating software, an ascending / descending counter (16). ), which has an output (36) connected to an input (37) of the control unit (6) and an increment encoder (14) having an input (18) connected to the rotor of the machine (2) and a signal (20) connected to an input (22) of the ascending / descending counter (16). Preferably, the means for establishing the function Fl, the means for establishing the function F2 and the means for mathematically adjusting the resulting equation of the functions Fl and F2 are all part of the control unit (6) that is provided with the software operative adequate to incorporate these means. Preferably, the application means comprises the control unit (6), which is provided with an appropriate operating software; a current detector (8) having inputs (24) for detecting the currents applied to the windings of the machine (2) by means of the supply lines (4) and a digital output (26) connected to an input (27) ) of the control unit (6); an inverter (10) having outputs (28) for applying the successive vector sums of the currents to the windings, an input (11) for receiving a power supply voltage, and an input (30) for receiving the control signals from an outlet (29) of the control unit (6); and a voltage detector (12) having an input (32) for detecting a power supply voltage Vdc applied to the inverter (10) and a digital output (34) connected to an input (35) of the control unit ( 6). Referring now to Figure 4, a second method for starting a synchronous machine having a rotor and a stator provided with windings is shown, the method can be carried out by means of the apparatus described above. This second method comprises the step (a) of applying a predetermined sequence of vectorial sums of the currents to the windings of the machine (2). The sequence of the vector sums has predetermined variable phases. Preferably, step (a) comprises the steps of (i) determining an arbitrary position of the rotor of the machine (2) and storing this arbitrary position in the variable MEMCNT, (ii) storing a value of zero in the l 1 I V M variable PVE representing one phase; (iii) store the value of Kl in the variable AVE that represents an amplitude, Kl has, for example, the value of 200; (iv) detecting the value of the voltage applied to the inverter (10) and storing this value in the variable Vdc; (v) detect the values of the currents applied to the machine (2) and store them in the variables the, Ib e le, these variables, at this point, have values of zero since no current has been applied to the machine; (vi) calculate the values of PWMa, PWMb and PWMC from the values of PVE, AVE, Vdc, la, Ib e le; (vii) producing for the inverter (10) a control signal C d from the values PWMa, PWMb and PWMc; (x) store the value of PVE + K2 in the variable PVE, where K2 is a constant and has, for example, the value of 10 ~ and store the value of AVE * K3 in the variable AVE, where K3 has a value that alternates between the values of -1 and +1 at intervals of 200 μsec; and (xi) verify if the value of the variable PVE is greater than the value of a constant K4, which has, for example, the value of 360 ° and repeat steps from (iv) to (xi), while the condition of step (xi) is negative. Preferably, in step (a), the predetermined sequence of vector sums of the currents applied to the windings have predetermined variable phases that vary from a first phase value i i. rv • 'tr-: default to a second predetermined phase value. For example, the first predetermined phase value is 0 ° and the second predetermined phase value is 360 °, which is the value of K4. Preferably, in step (a), each vector sum of the sequence of vector sums of the currents is applied to the windings by means of modulated pulse width signals. The method also comprises the step (b) of detecting and storing, for each of the vector sums of the currents applied in step (a), a movement of the rotor and the direction of this movement with respect to the stator. Preferably, step (b) comprises, after step (vii) and before step (xi), step (viii) of detecting the position of the rotor and storing this position in variable CNT. The method also comprises the step (c) of establishing a function Fl that represents the variations of the movements of the rotor and the different directions of these movements, with respect to the phase of the vector sums of the currents, and establish a function F2 that represents the variations of the amplitudes of the vector sums of the currents with respect to the phase of the vector sums of the currents. Preferably, step (c) comprises, after passage 11, (vii) and before step (xi), the step (ix) of storing, for each value of the phase of the vector sums of the currents, the functions Fl and F2, where F1 = CNT-MEMCNT and F2 = AVE. When the condition of step (xi) is positive, this indicates that data collection has ended. Therefore, the machine (2) can be stopped. The stopping of the machine (2) comprises the peisos: (xii) storing a value of zero in the variable AVE; (xiii) detecting the value of the voltage applied to the inverter (10) and storing this data in the variable Vdc; (xiv) detect the values of the currents applied to the machine (2) and store these values in the variables la, Ib e le; (xv) calculate the values of PWMa, PWMb and PWMc from the values PVE, AVE Vdc, la, Ib e le; and (xvi) producing a control signal C d for the inverter (10) from the values PWMa, PWMb and PWMc. The machine stops then. The method also comprises step (d) of mathematically adjusting an equation F that results from the functions Fl and F2 with a predetermined equation to obtain a phase difference that is stored in the variable MPVE. The machine is then ready to be operated from this phase difference. Preferably, step (d) comprises the steps: (xvii) calculating the second derivative Fl '' of the function Fl, in i i, where: ((Fl) l1 '= d? D? Y (xiv) normalize the function Fl' 'by means of the function F2 to obtain the equation F that results from the functions Fl and F2 by means of the following equation: F = F1 '• * F2 Preferably, the adjustment of step (d) is carried out by means of the least squares method. The default equation by which the adjustment of step (d) is made, defines a function that is AMPL * Sen (? + The phase difference), where AMPL is representative of an amplitude y? it is representative of the variable phases. Referring now to Figure 2, it can be seen that the increment encoder (14) has a second output (40) to generate an index signal (42); and that the up / down counter (16) has a load input (44) to receive the index signal. Therefore, the index signal is used as a load signal to confirm the absolute position of the rotor with respect to the stator, when the synchronous motor is running. Referring now to Figure 5, it shows a . 1 preferred mode of the control unit (6) for calculating the values PWMa, PWMb and PWMc, shown in Figures 1 and 2. The values of the control currents lac, Ibc and Ice, are calculated from the values AVE and PVE derived from inputs 37 and 39. The values of the counter electromotive force FEMa, FEMb and FEMc, are calculated from the PVE values,? and? d, where? d is a constant representative of a magnetomotive force. The error values Era, Erb and Ere are calculated from the values of the command currents lac, Ibc and Ice and of the values of the currents la, Ib e le. The values of Rea, Reb and Rec are calculated by means of a PID algorithm (Proportional Integral Differential) that uses the values of FEMa, FEMb, FEMc. The values of PWMa, PWMb and PWMc are calculated from the values Vdc, Rhea, Reb and Rec and applied to the output 29. Referring now to Fig. 6, a preferred embodiment of the inverter (10) shown in Figs. Figures 1 and 2. The power inverter (10) is used to apply the currents to the synchronous machine (shown in Figures 1 and 2) through the outputs 28. Six power switches (80) of the IGBT type are connected to the Vdc power supply through the input (11). The power switches have inputs (81) to receive the control signals of the output of the 11 1 - / - 'P gate units (83). These gate units (83) have inputs (78) for receiving the control signals PWMa, PWMb and PWMc via the input 30. The power capacitor 82 is connected through the input (11) to filter the power supply Vdc . Referring now to Figure 7, a partial cross-sectional view of the synchronous machine is shown. The phase windings A, B and C are shown in the stator (92). The magnets (91) are mounted on the rotor (93). The MPVE value is the value of the angle a between the vector position (94) of the rotor (93) and the vector position (95) of the stator (92). The means for detecting the movement of the rotor (93) and the direction of this movement with respect to the stator (92) comprises a coded ring (97) cooperating with a coded fixed read head (98). As an example, follow a complete list of the software used to start the synchronous machine: Y************************************************* ******** / / * progranime MOT * / y ************************************** ************* / static unsigned int * CONTMIX = (unsigned int *) OxßOOOOOu; /*Mix BusContributor * / static unsigned int * CONTACQ = (unsigned int *) 0x804000u; / * Contr.Carteacq * / static unsigned int * CONTDMA = (unsigned int *) 0x808000u; /DMA static unsigned int * COMTIMl = (unsigned int *) 0x808030u; / * Contr. Ti erl * / jfinclude < v: \ SOURCE \ MOT \ VMOT0V31.H > / * insert vecteur VECT * / #include < v: \ SOURCE \ MOT \ SINUl.H > / * insert vecteur SINUS * / static WV * VECT1; / * define pointeur VECT1 * / static float * SINUS; / * define pointeur SIIIUS * / extern INT_02 (); / * define pointeur inter. * / Y************************************************* ******* / / ******** DEBUT PROGRAM CALCUL 20KHZ *********** **? * * / / *********** ************************************** HIT 02 () * * A A? V I. A k A- • «, -: SET ET DISABLE HIT. -f02 ***? r * * * r * * Ar * * r * *? - / asm ("STI RO, * ARO"); / * enable reset INT MIX 4283 * / / *************** PULSE TIMER # 01 OUT A ON ************* / asm ("LDI 206h, R7"); as ("STI R7, * AR5"); / * TRANSFERT DMAOUT * / #include < v: \ SOURCE \ MOT \ DMAOUT. H > / * ACQUISITION OF THE POSITION * / tfinclude < : \ SOURCE \ MOT \ ACQPOS20. H > / * ACQUISITION OF THE VITESSE ET ACCEL. * / jrinclude < v: \ SOURCE \ KOT \ ACQVIAC2. H > / * AMPL CALCUL - * / #include < v: \ SOURCE \ MOT \ CALAMP.H > / * CALCUL DE lac Ibc ET Ice * / # include < v: \ SOURCE \ MOT \ CALIABC. H > / * ACQUISITION DE labe ET NORMALISATION * / #include < v: \ SOURCE \ MOT \ ABC. H > / * INITIALISATION CALCUL OFFSET * / #include < v: \ SOURCE \ MOT \ INIOFFS. H > / * ORGANE DE REGULATION * / #include < v: \ SOURCE \ MOT \ CALPID. H > '* FEM CALCUL EA, EB, EC * / fíinclude v: \ SOURCE \ MCT \ CALFEM. Il > / * ACQUISITION OF Vdc ET NORMALISATION * / #include < v: \ SOURCE \ MOT \ ACQVDC. H > / * ACQUISITION OF COUPLE ET NORMALISATION * / #include < v: \ SOURCE \ MOT \ ACQCOUP. H > / * VAC CALCUL * / #include < v: \ SOURCE \ MOT \ CALVABC. H > / * CALCUL POUR OUT FPGA * / #include < v: \ SOURCE \ MOT \ OUTFPGA. H > / * transfert DMAIN * / #include < v: \ SOURCE \ MOT \ DMAIN. H > / * PULSE TIMER # 01 OUT TO OFF * / asm ("NDMAIN LDI 202h, R7"); asm ("STI R7, * AR5"); / * ENABLE INTERRUPT MIX ET C30 * / asm ("LDI 0, IF"); asm ("LDI 14, R0"); / * enable INT MIX 4283 * / asm ("STI RO, * AR0p); asm (" OR 2000h, ST "); / * set GIE enable * / } /-TO-********************************************** *** - *** - *** / / ******* FUI PROGRAM CALCUL 20KHz **************** / ********* *********** ****************** - ******* *********** / main () '. { SI.IUS = = INUSl; / * l'dür. de depart de SI.íUS * / VSCT1 - =? VECT; / H'ddr. de depart de VECT * / / ********* INIT. EXPANSION BUS ET VECT. INT. # 02 ********** / * (unsigned int *) 0x808060 = 0x78; / * exp. bus wait state = 3 * / * (unsigned int *) 0x809808 = (int) &amp_02 | 0x60000000; / * set vect.int02 * / / * TRANSFERT VECTEUR DANS DRAM 7 #include < v: \ SOURCE \ MOT \ TRANVEC. H > / * SET L'ADRESSE DES POINTEURS #include < v: \ SOURCE \ MOT \ SETADD. H > / * INIT. CARTE D'ACQUISITION 7 #include < v: \ SOURCE \ MOT \ INIACQ. H > / * DEPART DU SYSTEME INTERRUPT ifinclude < v: \ SOURCE \ MOT \ DEPINT. H > A- k k * * boucle sans fin ****************** asm ('LAB1: NOP'); asm ('NOP'); asm ('NOP "); asm (' BRD LABl") asm ('NOP'); asm ('NOP'); asm ('NOP "); asm (' NOP '); } typedef struct / kkk-k kkk-kkkkkkkk-kk-x-k CONS IGNES ******************* / / * 0 * / unsigned: nt STATUS_VE; / A L rloat Tcons; / "i V rloa Pd sp; / * i * rloa X3; / * 4 * / float Vcons; / * motf.c * / / * 5 * / unsigned int Phase; / * 6 * / float kteta; / * initenc * / / * 7 * / float tinc; / * initenc * / / * 8 * / float tpred; / * initenc * / / * 9 * / float _Inert; / * motfl.c * / / * 10 * / float intW; / * motf.c * / / * 11 * / float KpW; / * motf.c * / / ******************* * CONSTANT ******************* / / * 12 V float KP; / * 13 V float KPTETA; / * INITENC 7 / * 14 * / float KD2; / * 15 V float OFS_X; / * 16 * / float Kll; / * 17 * / Imax float; / * 18 * / füoat Cphase; / * 19 * / float XVdc; / * 20 V float K0UT1; / * 21 * / float K0UT2; / * 22 V float B0RNE_I; / * 23 * / float NO_Iabce; / * 24 * / float NO_Dist; / * 25 V float NO Temps; / * 26 V float NO_Vdce; / * 27 V float PSI; / * 211 V flo AVA_PHASE; k 2'J A7 f loat _15PST; K JO / i loa t LÍO Te; / * 31 * / float NO_Templ; / * motfl.c * / / * 32 * / float N0_Temp2; / * motfl.c * / / * 33 * / unsigned int X33 / * 34 * / unsigned int X34 / * 35 * / unsigned int X35 / * 36 * / unsigned int X36 / * 37 * / unsigned int X37 / * 38 * / unsigned int V_vecom; / * 39 * / unsigned int V_prog; / * 40 * / unsigned int V_vers; / * 41 * / unsigned int X41 / * 42 unsigned int X42 / * 43 * / unsigned int X43 / * 44 * / unsigned int X44 / * 45 * / unsigned int X45 / * 46 * / unsigned int X46 / * 47 * / unsigned int X47 / * 48 * / unsigned int X48 / * 49 * / unsigned int X49 / * 50 * / unsigned int X50 / * 51 * / unsigned int X51 / * 52 V float emboit; / * 53 * / BornelW float; / * motf.c * / / * 54 V float Filtel; / * 55 V float Filte2; / * 56 * / float Period; / * 57 * / float X_INTEG; / * 58 * / unsigned int VECT_DRAM; / "59 * / unsigned int ADR_OSCIL; ¡k 60 * / unsigned int X60; /" ol V unsigned int PROGCARTEACQUIT; / "2 unsigned int LIRECARTEPROT; /"} 3 un = igned mt LIRECARTEACQUIT; * "*" MONTH uRE CALCUL ^ * ^ *** A ^ A • tA • * / * 64 * / unsigned int STATUS MR; / * 65 * / float dPmec; / * 66 * / WMEC float; / * 67 V float Amec; / * 68 * / Treel float; / * 69 * float Tc; / * motf.c * / / * 70 * / float Temp_r; / * 71 V float Temp s; / * 72 V float Vdc; / * 73 * / unsigned int EnerP; * 74 * / unsigned int EnerN; / * 75 * / float iq; / * 76 V float Puis; / * 77 * / float X77; / * 78 V float X78; / * 79 V float TETAF; / * 80 V float Templ; / * motfl.c * / / * 81 V Float Temp2; / * motfl.c * / / * 82 * / float X82; / * 83 V float Tconsl; , -.tr * * * *************** VARIABLES ******************** / / * 84 * / float IA / * 85 V float IB / * 86 * float IC, / * 87 * / unsigned int ETA; / * 88 * EA float; / * 89 V float EB; / * 90 * / float EC; / * 91 V float IAC, / * 92 * / float IBC, / * 93 V float ICC / * 94 V float X94 / k 95 V floa X95 / k 96 V fl? At X9o / "97 k / I iloat VAC; / 98: Loat VDC; / * 99 V float VCC; / * 100 * / IMVA float; / * 101 * / IMVB float; / * 102 * / IMVC float; / * 103 * / float prot dcmax; / * 104 * / float prot dcmin; / * 105 * / float prot; / * 106 * / unsigned int X106; / * 107 * / unsigned int X107; / * 108 * / unsigned int X108; / * 109 V unsigned int X109; / * 110 * / unsigned int TRIG_OSCIL; / * 111 V unsigned int CALVIT; / * 112 * / unsigned int CntEnerg; / * 113 * / unsigned int TETA_I I; / * initenc * / / * 114 V float SomEnerP; / * 115 V float SomEnerN; / * 116 * / DTET float; / * INITENC * / * 117 * / float teta_S0M; / initenc V / * 118 V float tso; / * initenc * / / * 119 * / unsigr ed int DTETAVI; / * 120 V unsigr ed int COMPT_OSC.IL; / * 121 V float SOM_OFSIA; / * 122 V float S0M_0FSIB; / * 123 V float S0M_0FSIC; / * 124 * / unsigrled int CAL_0FS; / * 125 * / float _Vdc; / * 126 * / INTW float; / * motf.c * / / * 127 * / float X127; / * 128 V float ERAD1; / * 129 V float ERBD1; / * 130 V float? RCD1; / * 131 V floa ERAED1 A- 132 Eloat ERBED1 / / A 133 A / float? RCED1 LJ -V / ZI at OES TA / * 135 * / float 0FS_IB, / * 136 * / float OFS_IC / * 137 V float ERAEI1, / * 138 * / float ERBEI1 / * 139 * / float ERCEI1 •} VW; static VW VECT =. { ***** it ************* * CONSIGNES ******************* / / * 0 unsigned int STATUS_ _VE; * / o, / * i float Tcons; * / 0.0, / * 2 float Pdisp; * / 0.0, / * 3 float X3; V 0.0, / * 4 float Vcons; * / 0.0, / * motf.c * / / * 5 unsigned int P ase; * / 182, / * 6 float kteta; * / -6E-3, / init: enc * / / * 7 float tinc; * / 2E-2, / initenc * / / * 8 float tpred; V 300.0, / * initenc * / / * 9 float Inert; * / 18.4E-3, / * 10 IntW float; * / 0.010, / * motf.c * / / * 11 float Kp; * / 30.0, / * motf.c * / ******************** CONSTANT ******************* / / * 12 float KP; V 1.5, / * 13 float KPTETA; V -5.0, / * 14 float KD2; * / 0.0, / * 15 float of s_x; V -0.001, / "16 rloat Kll; V 0.5, 17 Imax float; 350.0, ! : u tloa Cpila; 7 0.0 1, / * 19 float XVdc; * / 0.48, / * 20 float KOUT1; * / 512.0, / * 21 float KOUT2; V 255.5, / * 22 float BORNE_I; * / 40.0, / * 23 float NO_Iabc; * / -0.183, / * 24 float NO Di. * / 1. 53398E-3, / * 25 float NO Te: 100.0, / * 195. , 3125E-9,12msec. * / / * 26 float NO_Vdce; V 0.31279, / * 27 PSI float; * / 2.6089, / * 28 float AVA_PHASE; * / 0.048, / * 29 float _1.5PSI; * / 0.24867, / * 30 float NO Te; * 0.0, / * 31 float NO Templ; * / 0.24425, / * motfl.c * / / • 32 float NO_Temp2; * / 0.24425, / * motfl.c * / / * 33 unsigned int X33; * / o, / k 34 unsigned int X34; * / o, / * 35 unsigned int X35; * / o, / * 36 unsigned int X36; * / o, / * 37 unsigned int X37; * / o, / * 38 unsigned int V_vecom; * / 9410200, / * 39 unsigned int V_prog; * / 31010, / * 40 unsigned int V_vers; * / 31000, / * 41 unsigned int X41, * / o, / * 42 unsigned int X42, * / o, / * 43 unsigned int X43, * / o, / * 44 unsigned int X44 * / o, / * 45 unsigned int X45 * / o, / * 46 unsigned int X46 V or, / * 47 unsigned int X47 • * / o, ¡k 48 unsigned int X48; V o, / "49 unsigned int 9; V o, /" • 50 unuigned Lnt X50; "/ o, / * 51 unsigned int X51; * / 0, / * 52 float emboit; * / 0.04, / * 53 float Bornel; 600.0, / * motf.c * / / * 54 Filtrel float; * / 0.05, / * 55 Filtre2 float; * / 0.95, / * 56 float Period; 7 50.Oe-6, / * 57 float X INTEG; V 0.333333, / * 58 unsigned int DRAMIN * / 0x200002, / * 59 unsigned int ADR. OSCIL, V 0x200100, / * 60 unsigned int X60; * / 0X0, / * 61 unsigned int PROG.CARTE ACQU. * / 0X18000, / * 62 unsigned int LIRE CARTE PROT. * / 0x10000, / * 63 unsigned int LIRE C? RTE ACQU. * / 0x38000, and ******************** MESURE CALCUL **************** / * 64 unsigned int STATUS MR; * or, / * 65 float dP ec; V 0.0, / * 66 float Wmec; * / 0.0, / * 67 float Amec; * / 0.0, / * 68 Treel float; V 0.0, / * 69 float Tcw; 0.0, / * mot,, c * / / * 70 float Temp_; V 0.0, / * 71 Float Temp s; * / 0.0, / * 72 float Vdc; V 0.0, / * 73 unsigrled int EnerP; V o, / * 74 unsigned int EnerN; V o, 75 float -q; * / / * 0.0, / * 76 -float Puis; * / 0.0, / * 77 float X77; V 0.0, / * 78 floan X78; V 0.0, / * 79 float TETAE; 7 0.0, (ÍO "'. Oa T iupl 0.0, / * motf 1.c V / * 81 float Temp 2; * / 0.0, / * motf 1 .c * / / * 82 float X82; V 0.0, / * 83 Tconl float * / 0.0, / ******* ************* VARIABLES ******************** / / * 84 float IA; V 0.0, / * 85 IB float; * / 0.0, / * 86 float IC; * / 0.0, / * 87 unsigned int TETA; * / o, / * 88 float EA; * / 0.0, / * 89 float EB; * / 0.0, / * 90 float EC; * / 0.0, / * 91 float IAC; * / 0.0, / * 92 IBC float; * / 0.0, / * 93 ICC float; V 0.0, / * 94 float X94; * / -4.31, / * 95 X95 float; * / 4.31, / * 96 float X96; * / 0.0, / * 97 float VAC; V 0.0, / * 98 VBC float; * / 0.0, / * 99 float VCC; * / 0.0, / * 100 float I VA; * / 0.0, / * 101 IMVB float; * / 0.0, / * 102 IMVC float; * / 0.0, / * 103 float prot dcmax; V 550.0, * 104 float prot dcmin; V 500.0, / * 105 float prot; * / 490.0, / * 106 unsigned int X106; * / o, / * 107 unsigned int X107; * / o, / * 108 unsigned int X108; * / o, / * 109 unsigned int X109; * / o, / * 110 an igned int TRIG_ OR? CIL; V o, / "111 a ¿í ned i t CALVIT; * o, / k 112 a sigt tid in C tEnerg; "/ o, / i 13 a d ign d int TETA [NI; 7 o, / * 114 float SomEnerP; * / 0.0, / * 115 float SomEnerN; * / 0.0, / * 116 float DTET V 0.0, / * INITENC * / / * 117 float teta_SOM; 7 o.o, / * initenc * / / * 118 float tso; 0.0, / * initenc * / / * 119 unsigned int DTETAVI / * / o, / * 120 unsigned int COMPTJDSC; V o, / * 121 float SOMJDFSIA; * / o, / * 122 float SOM_OFSIB; * / o, / * 123 float SOM_OFSIC; * / o, / * 124 unsigned int CAL_0FS; * / 1001, / * 125 float 1 / Vdc; * / o, / * 126 IntW float; V 0.0, / * motf.c * / / * 127 float X127; * / 0.0, / * 128 float ERAD1; * / 0.0, / * 129 float ERBD1; V 0.0, / * 130 float ERCD1; V 0.0, / * 131 float ERAED1, * / 0.0, / * 132 float ERBED1, * / 0.0, / * 133 float ERCED1, V 0.0, / * 134 float OFS_IA * / 0.0, / * 135 float OFS_IB, * 0.0, * 136 float OFS_IC V 0.0, / * 137 float ERAEI1 * / 0.0, / * 138 float ERBEI1 * / 0.0, / * 139 float ERCEI1 V 0.0}; 0. 0000, 0. 246,) .0493, () .0 / i 9, 0.0984, 0. 1229, 0. 1473, 0. 1716, 0. 1958, 0. 2199, 0. 0. 1595, 0. 1351, 0. 1107, 0. 0861, 0. 0616, 0. 0370, 0. 0123, -0.0123, -0.0370, -0.0616, -0.0861, -0.1107, -0.1351, -0.1595, -0.1837, -0.2079, -0.2319, -0.2558, -0.2796, -0.3032, -0.3265, -0.3497, -0.3727, -0.3955, - .4180, -0. 402, -0.4622, -0.4839 -0.5075 -0.5264 -0.5474 -0.5677 -0.5677 -0.5878 -0.6075 -0.7698 -0.6269 -0.6470 0.8781 -0.8896 -0.9006 -0.9110 -0.9209 -0.9302 -0.9390 -0.9472 -0.9548 -0.9618 • 0.9683 • 0.9741 -0.9794 -0.9841 -0.9882 -0.9916 • 0.9945 -0.9968 -0.9985 -0.9995 -1.0000 -0.9998 -0.9991 -0.9977 -0.9957 - 0.9932 -0.9900 -0.9862 -0.9818 -0.9768 -0.9713 -0.9651 -0.9584 -0.9570 -0.8336 -0.8197 -0.80 4 -0.7905 -0. 0.9932 -0.9900 -0.9862 -0.9858 -0.9768 -0.9713 -0.8521 -0.8598 -0.8470 -0.8336 -0.8197 -0.80 4 -0.7905 -0. / 752 -0.7594 -0.7431 -0.7264 -0.7093 -0.6917 -0.6737 -0.6553 -0.6365 -0.6173 -0.5977 -0.5778 -0.5575 -0.5369 -0.5159 -0.4947 -0.4731 -0.4512 -0.4291 -0.4067 -0.3841 -0.3612 -0.3382 -0.3149 -0.2914 -0.2677 -0.2439 -0.2199 -0.1958 -0.1716 -0.1473 -0.1229 - .0984 - .0739 -0.0493 -0.0246 -0.024o / ****** TRM-ISFERT VECTEUR C30 AU FONCTION VEHICLE ****** / / * prepare transfert vecteur vers fonction vehicule * / asm ("LDI @ _VECT + 58, AR7") / * store ad. DRAM - > AR7 * / asm ("LDI Oh, BK") as ("STI BK, * + AR2 (0)") asm ("ADDI 64, AR7") / * set adr.DESTDMA-200042 * / asm ("STI AR7 , * + AR2 (6) ") / * store DESTDMA - > AR2 (6) * / asm ("LDI AR4, AR7") asm ("ADDI 64, AR7") / * set adr.SRCDMA=@VECT+40h*/ asm ("STI AR7, * + AR2 (4)" ) / * store SRCDMA - > AR2 (4) * / asm ("LDI 40, R7") asm ("STI R7, * + AR2 (8)") / * store n = 40 dans AR2 (8) * / asm ("LDI 0C53h, R7" ) / * verifi si j'ai le droit d'ecrire / asm ("LDI @ _VECT + 58, AR7") / * store ad. DRAM - > AR7 * / asm ("LDI Ofh, R1") asm ("CMPI * -AR7 (2), R1") / * Ofh - mem (20 0000) * / asm ("BN DMAOUT") / * lance le transfert si < 10 * / asm ("STI R7, * + AR2 (0)"); / * store config. DMA AR2 (0) * / / * v / a ch dog laisse une trace * / asm ("LDI 3h, 7"); u iní "STI R7, * -AR7 (2)"); / ****** ACQUISITION OF THE POSITION **** / asm ("DMAOUT LDI * + ARl (0), R1"); / * acguis. of POSI. (FPGA) * / asm ("LDI Rl, IRO"); / * store dans IRO * / / * asm ("ADDI @ _VECT + 5, IRO"); * / asm ("ADDI 172, IR0"); asm ("AND OFFh, IR0"); / * normal, to 8 bits * / / * (INIT ENCODEUR) YES VOIE INDEX, RESET Teta_com. ET BIT_MR (2) = 1 * / asm ("LDF @ _VECT + 118, R2"); / * TSOM - > R2 * / asm ("LDF @ _VECT + 117, R3"); / * TETA_SOM - > R3 * / asm ("LDF R3, R6"); asm ("LDI 0, R4"); / * ST_MR * / / ***** TEST SI INDEX ***** / asm ("LSH -27, R1"); / ***** OUI INDEX ***** / asm ("LDFC 0, R2 M); / * 0 -> TSOM * / asm (" LDFC 0, R3"); / * 0 - > TETA_SOM * / asm ("LDIC 4, R4"); / * BIT_MR (2) = 1 * / / ***** TEST IF INITIALISATION ***** / asrn ("LDI J_VECT (-0, R1"); / A LIAND or 4 - ^ Rl "/ asm (" ANDN @ _VECT + 64, R1"); / * O AND 64 - > Rl * / asm ("LSH -3, R1"); / * SI INIT BRANCHE INITEN * / asm ("BC INITEN"); / ***** NON INITIALISATION ***** / asm ("LDF O, R2"); / * 0 - > TSOM * / asm ("BR NOINIT1"); / * BRANCHE NOINIT1 * / / ***** OUI INITIALISATION ***** / aemC'INITEN LDI @ _VECT + 113, R5"); / * TETA_INIT - > R5 * / as ("CMPF 0, R2"); / * TSOM - 0 * / / ***** IF DEPART INITIALISATION ***** / asm ("'LDIEQ IRO, R5"); / * SITSOM = 0, IRO- > TETA_INIT * / asm ("LDFEQ 0, R3"); / * 0 - > TETA SOM * / / ***** INTEGRAL TETA ET COUPLE ***** / asm ("I UP 3 R5, IR0, R7"); / * TETA-TETA_INIT - > R7 * / / * COMPENSE DELTA TETA * / asm ("LDI 0, R6") asm ("CMPI 7Fh, R7") asm ("• LDIP -lOOh, R6") asm ("CM I -7Fh, R7") asm ("LDI11 LOOh, RD")? (i tí ltt; d 7 / * YES DELTA_TETA> 10, TETA_INIT = TRO * / asm ("ABS I R7, R6"); / * ABSOLU (delta teta) - > R6 * / asm ("WCIP 10, R6"); / * R6 - 10 * / asm (" LDIP IRO, R5"); / * SI POSITIF, TETA_INIT = IRO * / asm (" LDIP 0, R7"); / * SI POSITIF, DELTA_TETA = 0 * / asm ("LDFP 10, R2"); asm ("FLOAT R7, R7"); / * FLOAT (TETA-TETA_INIT) * / asm ("LDF R7, R6"); asmC * STF R7, @ _VECT + 116"); asm (" MPYF @ _VECTf6, R7"); / * KTETA * (TETA-TETA_INIT) * / asm (" ADDF R7, R3"); / * TETA_SOM + KTETA * (TETA-TETA_INIT) * / asm ("MPYF @ _VECT + 13, R6"); / * KTETA * (TETA-TETA_INIT) * / asm ("ADDF R3, R6"); / * TSOM + TINC - > R2 * / asm (M ADDF @ _VECT + 7, R2"); / * TSOM + TINC -> R2 * / / **** TEST IF TERMINATED ***** / asm ("CMPF @ _VECT + 8, R2"); / * TSOM - TPRED * / asm ("BN NOINIT1"); / **** OUI TERMINE ***** / dsm ("LDI 4, R4"); /? IT_HR (2) = 1 * / auiiiC D 0, R2"); /" 0 - SOM asm ("ADDF 64, R6"); / * ADDIT 90 DEGRE * / asm ("LDF R6, R3"); ***** END ***** / asm ("NOINITl STF R3, g_VECT + 117") asm ("STF R2, @ _ VECT + 118") asm ("OR @ _VECT + 64, R4") / * BIT MR (2) = 1 7 asm ("STI R4, @ VECT + 64") / * BIT_MR (2) = 1 V asm ("FIX R6, R6") asm (M ADDI R6, IR0") asm (STI R5, @ VECT + 113") k k (FIN PARTIE 1 DE INIT ENCODEUR) ***** / asm ("AND OFFh, IRO"); / * normal, to 8 bits * / as? n ("STI IRO, @_V? CT + 87"); / * store TETA * / asm ("FLOAT IRO, R7"); asm ("STF R7, @ VECT + 79"); asm ("LDI @ _VECT + 58, AR7 / * store ad DRAM -> AR7 * / LDI * -AR7 (2), .R7") CMPI llh, R7") BNE DTETA H \ CMPI Oh, BK") LDIEQ lh, BK ") DIEQ Oh, RS") d.sm ("DTET? LI Oh, R / * C? LCUL dteta * / dm (" SUB 13 RE, IRO, C asm ("LDI IRO, RE") asm ("CMPI 7Fh, RC") asm (" LDIP -lOOh, R0") asm (" CMPI -7Fh, RC ") asm (" LDIN lOOh, R0") asm (" ADDI RO, RC ") asm (" ADDI RC, RS ") asm ( "" NNDDTETA CMPI 2h, R7") asm (" BEQ LECT ") asm (" FLOAT RS, R7") asm (" MPYF @ _VECT + 24, R7") asm (" STF R7, @ _ VECT + 65" -k -k ic kk? " CALCUL DE LA VITESSE ET ACCEL. ************* / * SOMME DELTATETA * / asm ("LECT LDI @ _VECT + 119, R1"); / * DTETA - > Rl * / asm ("ADDI RC, R1"); / * DTETA1 + DTETA0 - > DTETAl * / asm ("STI Rl, @ VECT + 119"); / * INCREASE N, IF < 10 msec * / asm ("LDI @ _VECT + 111, R7") asm ("ADDI 1, R7") asm ("STI R7, @ _ VECT + 111") asm ("CMPI 200, R7") asm ("BN FINVIT ") asm (" LDI 0, R7") asm (" STI R7, @ _ VECT + 111") asm (" STI R7, @ VECT + 119") / * calcul distance * / asm ("FLOAT Rl, Ri"); / * tloat DTETAl V a m ("MPYF J VEC h, R1"); / iio unid 1. (li (cad / ec) / * calcul (l / temps) * / asm ("LDF @ _VECT + 25, R2"); / * calcul V * / asm ("MPYF R2, R1"); / * Wl = dist * l / temps * / / * calcul Acc. * / asm ("LDF @ _VECT + 66, R6"); / * WO - > R6 * / asm ("SUBF3 R6, R1, R6"); / * Wl - WO - > (R6) * / asm ("MPYF R2, R6"); / * (Wl-WO) * l / temps - > (R6) * / asm ("STF Rl, @ _ VECT + 66"); / * store Rl - > vitesse * / asm ("STF R6, @ _VECT + 67"); / * store R6 - > accelerat. * / asm ("FINVIT LDI @ _VECT + 0, R7") asm ("LSH - 1, R7") asm ("BNC AS_STD") asm ("LDF @ VECT f 4, R1") / ********* ASSERVISSEMENT OF THE VITESSE **************** / asm ("LDF (_VECT + 66, R6"); asm ("SUBF R6, R1"); / * (Wcons-Wmec) - &Rt; Rl * / / * PROPORTIONNEL * / dsm ("LDF i_VECT + ll, R2"); / * KP - > R2 * / / k P (Wcons-Wext) - > R3 * / / * INTEGRE * / asm ("LDF @ _VECT + 10, R3"); / * ki - > R2 * / asm ("MPYF Rl, R3"); / * ki (Wcons-Wext) - > R2 * / asm ("ADDF @ _VECT + 126, R3"); / * ki (Wcons-Wext) + SOMME- > R2 * / / * INTEGRAL TERMINAL * / asm ("LDF @ _VECT + 53, R4"); / * + BORNE_I DANS R4 * / asm ("NEGF R4, R5"); / * -BORNE_I DANS R4 V asm ( "CMPF R5, R3") asm ( "LDFN R5, R3") asm ( "CMPF R4, R3") asm ( "LDFP R4, R3") asm (STF R3, @ VECT +126") / * store (int) * / / * SOMME INTEGRAL + PROPORTIONNEL * / asm ("ADDF R3, R2") asm ("STF R2, @ _ VECT + 69") asm ("LDF R2, R4" ") asm (" BR AS VIT ") / *********** AMPL CALCUL ***************** / a? M (AS_STD LDF @ _VECT + 1, R4"); / * load STRK - > R4 * / asm (" AS_VIT ADDF @ _VECT + 83, R4"); / * R4 + Text - > R4 * / asm (" ADDF é_VECT + 118, R4"); / * R4 + Text - > R4 = -a m ( "--1PYF ¿_VECTt-, R4"); / * R4 X i / PSI - > R4 * / / * AVEC PROTECTION OF HYSTERESIS surtension (103) ( 104) * / asm ("LDF @ _VECT + 72, R7"); / * load Vdc -> R7 * / asm ("CMPF @ _VECT + 105, R7"); / * Vdc - PROT_DC * / asm (" LDFP 0, R4"); / * SI POSITIF 0 - > R4 * / asm (" LDFP @ _VECT + 104, R0"); / * IF POS PROT_DCMIN- > R0 * / asm (". LDFN @ _VECT + 103, R0"); / * YES NEG PROT_DCMAX-> R0 * / asm (" STF RO, @ _VECT + 105"); / * RO -> PROT_DC * / / * LIMIT LE COURANT A Imax * / asm ("LDF @ _VECT + 17, R0"); / * LOAD Imax - > RO V asm ("NEGF RO, R7"); / * LOAD -Imax - > R7 V asm ("CMPF R7, R4"); / * R4 - R7 V asm ("LDFN R7, R4"); / * IF R4 < R7 = > R7- > R4 V asm ("CMPF RO, R4"); / * R4 - RO V asm ("LDFP RO, R4"); / * IF R4 > R0 = > R0- > R7 * / / ****** CALCUL DE lac Ibc ET Ice *********************** / asm ("LDI @ _VECT + 63, R0"); / * set position of carte * / dsm ("STI RO, * + AR0 (2)"); / * store - > PAGEADDR. * / Jbin ("LDF 4, R7"); asm ("MPYF @ _VECT + 18, R7"); / * Cphase * AMPL - > R7 * / asm ("FIX R7, R7"); / * INT (R7) - > R7 * / asm ("ADDI R7, IRO"); / * TETA + COMP. PHASE * / asm ("AND OFFh, IRO"); asm ("MPYF3 R4, * + AR3 (IR0), R1"); / * AMPL X YES (IRO) - > Rl * / asm ("STF Rl, @ _ VECT + 91"); / * store IAC * / asm ("LDI 170, R7"); / * MODIF 10/26/94 * / asm ("CMPI 85, IR0"); asm ("LDIP 171, R7"); asm ("ADDI R7, IR0"); / * PHA + TETA + 4 * pÍ / 3 - > IR0 * / asm ("AND OFFh, IR0"); / * south 8 bits * / asm ("MPYF3 R4, * + AR3 (IR0), R3"); / * AMPL X YES (IRO) - > R3 * / asm ("STF R3, @ _VECT + 93"); / * ICC store * / asm ("ADDF3 R1, R3, R2"); / * IAC + IBC - > R2 * / asm ("NEGF R2, R2"); / * -1 * (IAC + IBC) - > R2 * / asm ("STF R2, @ _ VECT + 92"); / * store IBC * / / ****** ACQUISITION DE labe ET NORMALISATION ** / ds ("LDI A + AR1 (3), R4"); asm ("ASH -20, R4" / * normal, 12 bits signe * / asm ("FLOAT R4, R4" / * convert float * / asm ("LDF @ _VECT + 23, R7" / * NO_Iabce - > R7 * / asm ("MPYF R7, R4" / * normalize valeur of the * / asm ("ADDF @ _VECT + 134, R4" / * additionne OFS_IA * / asm ("STF R4, ¡__VECT + 84" / * store IA * / asm ("LDI * + ARl (3), R5" asm ("ASH -20, R5" / * normal, 12 bits signe * / asm ("FLOAT R5, R5" / * convert float * / asm ("MPYF R7, R5" / * normalize valeur of Ib * / asm ("ADDF @ _VECT + 135, R5" / * additionne OFS_IB * / asm ("STF R5, @ _ VECT + 85" / * store IB * / asm ("LDI * + ARl (3), R6" asm ("ASH -20, R6" / * normal, at 12 bits signe * / asm ("FLOAT R6, R6" / * convert float * / asm ("MPYF R7, R6" / * normalize valeur de le * / asm ("ADDF @ _VECT + 136, R6" / * additionne OFS_IC * / aa ("STF R6, t._VECT? -86" / * store IC * / / ****** INITIALISATION CALCUL OFFSET ********* / asm ("LDI @ _VECT + 124, R0"); / * INCREMENT OF SOMME * / asm ("CMPI 1000, R0"); / * INCREMENT - 1000 * / asm ("BLE INITSEN"); / * YES < = 1000 (INITSEN) * / / * VERIFIE S »IL AND TO EU DEMAND OF CALIBRATION OF SENSEUR * / asm (" LDI @ _VECT + 0, R7"); asm ("LSH -2, R7"); / * COMPARE AVEC BIT1 * / asm ("BNC OFSEND"); / * PAS INIT. - > OFSEND * / asm ("LDI 0, R0"); asm ("STI R0, @ _ VECT + 124"); asm ("LDF 0, R0"); asm ("STF R0, @ _ VECT + 121"); / * RESET SOM_OFSIA * / asm ("STF RO, @ _ VECT + 122"); / * RESET SOM_OFSIB * / asm ("STF RO, @ _ VECT + 123"); / * RESET SOM_OFSIC * / asm ("STF RO, @ _ VECT + 134"); / * RESET OFS_IA * / asm ("STF RO, @ _ VECT + 135"); / * RESET OFS_IB * / asm ("STF RO, @ _ VECT -? - 136"); / * RESET OFS_IC * / asm ("BR OFSEND"); / * FAIRE UNE SOMME SUR 1000 UNITES OF Ia, lb, lc ***** / asm ("INITSEN LDI 121, IR1"); asm ("ADDF3 * + AR4 (IR1), R4, R7"); / * IA (0) ^ IA (-l) + IA (0) * / d m ("STF R7, A't-AR4 (IR1)"); asm ("ADDI 1, IR1"); asm ("ADDF3 * + AR4 (IR1), R5, R7"); / * IB (0) = IB (-l) + IB (O) * / asm ("STF R7, * + AR4 (IRl)"); asm ("ADDI 1, IR1"); asm ("ADDF3 * + AR4 (IR1), R6, R7"); / * IC (0) = IC (-l) + IC (O) * / asm ("STF R7, * + AR4 (IRl)"); asm ("CMPI 1000, R0"); / * somme sur 1000 unite * / asm ("BNED OFSEND") asm ("ADDI 1, R0") asm ("STI RO, @ _ VECT + 124") asm ("LDF @ VECT + 15, R0") / * NORMALISE LORSQUE 1000 ADDITION EST ATTEIND ***** / asm ("MPYF3 * + AR4 (IR1), R0, R7"); / * IC = SIC * -0.001 * / asm ("STF R7, @ _ VECT + 136"); asm ("SUBÍ 1, IR1"); asm ("MPYF3 * + AR4 (IR1), R0, R7"); / * IB = SIB * -0.001 * / asm ("STF R7, @ _ VECT + 1 5"); asm ("SUBÍ 1, IR1"); asm ("MPYF3 * + AR4 (IR1), R0, R7"); / * IA = SIA * -0.001 * / asm ("STF R7, @ VECT + 134"); / * SET BIT 1 POUR CONFIRM THE NORMALISATION TERMINEE ***** '/ asm ("LDI 2, R7") asm ("OR (a_VECT + 64, R7") asm ("STI R7, @_VECT t-64" ) / ******** OF.GANE DE REGULATION ********** / / ***** calcul d'erreur sur la consigne - < **** / dSin ("OFSEUD SU F3 R4, R1, R1"); / * IAC - IA - > ERA * / asm ("SUBF3 R5, R2, R2"); / * IBC - IB - > ERB * / asm ("SUBF3 R6, R3, R3"); / * ICC - IC - > ERC * / / ***** calcul du proportionnel ***** / asm ("LDF @ _VECT + 12, R7"); / * load Kp dans R7 * / asm ("MPYF3 R1, R7, R4"); / * Kp * (IAC - IA) - > R4 * / asm ("MPYF3 R2, R7, R5"); / * Kp * (IBC - IB) - > R5 * / asm ("MPYF3 R3, R7, R6"); / * Kp * (ICC - IC) - > R6 * / / ***** calcul de 1 'integral ***** / asm ("LDF @ _VECT + 16, R7"); / * load Kll dans R7 * / asm ("MPYF R7, R1"); / * KI1 * ERA - > Rl * / asm ("ADDF @ _VECT + 137 , R1"); / * R7 + ERAEI1-> R1 * / asm (" MPYF R7, R2"); / * KI1 * ERB - > R2 * / asm (" ADDF ß_VECT + 138, R2"); * R7 + ERBEI1-> R2 * / asm ("MPYF R7, R3"); / * KI1 * ERC - > R3 * / asm ("ADDF ¿_VECT + 139, R3"); / * R7 + ERCEI1- &Rt; R3 * / / ***** terminal 1 'integral ***** / asm ("LDF / ECT + 22, R0"); dsm ("MEGF Rú, R7"); asm ("CMPF R7, R1"); asm ("LDFN R7, R1"); / * if negatif -XVdc - > VAC * / asm ("CMPF RO, R1"); / * SOMA - (XVdc) * / asm ("LDFP RO, R1"); / * if negatif XVdc - > VAC * / asm ("CMPF R7, R2"); / * SOMB - (-XVdc) * / asm ("LDFN R7, R2"); / * if negatif -XVdc - > VBC * / asm ("CMPF RO, R2"); / * SOMB - (XVdc) * / asm ("LDFP RO, R2"); / * if negatif XVdc - > VBC * / asm ("CMPF R7, R3"); / * SOMC - (-XVdc) * / asm ("LDFN R7, R3"); / * if negatif -XVdc - > VCC * / asm ("CMPF RO, R3"); / * SOMC - (XVdc) * / asm ("LDFP RO, R3"); / * if negatif XVdc - > VCC * / / * faire la somme des trois integral et divise par 3 ***** / asm ("ADDF3 R1, R2, R7"); asm ("ADDF R3, R7"); asm ("MPYF @ _VECT + 57, R7"); asm ("SUBF R7, R1"); /*Int.a-(Int.a+Int.b+Int.c)/3- > Rl * / asm ("STF Rl, @ _ VECT + 137"); / * Store ERAEI - > ERAEI1 * / asm ("ADDF Rl, R4"); / * prop. * -derive + integr- > R4 * / asm ("SUBF R7, R2"); /*- Int.b-( Int. I-int.bt-Int.c) / 3- > R2 * / asm ("STF R2, @ _VECT + 138"); / * store ERBEI - > ERBEI1 * / asm ("ADDF R2, R5"); / * prop. + derive + integr- > R5 * / asm ("SUBF R7, R3"); /* Int.c-(Int.a+Int.b+Int.c)/3- > R3 * / asm ("STF R3, @ _VECT + 139"); / * store ERCEI - > ERCEI1 * / asm ("ADDF R3, R6"); / * prop. + derive + integr- > R6 * / / * calculdelatensi o n F EM selonWmec * sin (TETA + AV_PHASE * Wmec) * / / ***** phase B ***** / asm ("LDF (_VECT + 28, R0"); / * load AV_PHASE - > RO * / asm ("MPYF @ _VECT + 66, R0"); / * AV_PHASE x Wmec -> RO * / asm ("FIX RO, R0"); / * conver. signed int RO * / asm ("ADDI 256, R0"); / * int conver 8 bits RO * / asm ("ADDI RO, IRO"); / * AV_PHASE * Wmec + TETA * 4 * pÍ / 3- > IR0 * / asm ("AND OFFh, IRO"); / * south 8 bits * / asm ("LDF @ _VECT + 66, R2"); / load Wmec dans R2 * / asm ("MPYF3 R2, * + AR3 (IR0), R3"); / * Wmec x sin (IRO) - > R3 * / asm ("MPYF @ _VECT + 27, R3"); / * R3 x PSI - > R3 * / asm ("STF R3, @ _ VECTt-89"); / * store EB * / d m ("ADDF R3, R5"); / prop. t-der t- inte. ^ EB- R5 * / asm ("LDI 85, R0"); / * PATCH ENCODEUR 26/10/94 * / asm ("CMPI 170, IRO"); asm ("LDIP 86, R0"); asm ("ADDI RO, IR0"); / * AV_PHASE * Wmec + TETA- > IRO * / asm ("AND OFFh, IR0"); / * south 8 bits * / asm ("MPYF3 R2, * + AR3 (IRO), R7"); / * W x sin (IRO) - > R7 * / asm ("MPYF @ _VECT + 27, R7"); / * R7 X PSI - > R7 * / asm ("STF R7, @ _VECT + 90"); / * store EC * / asm ("ADDF R7, R6"); / * prop. + der. + inte. + EC- > R6 * / asm ("ADDF R3, R7"); / * EB + EC - > R7 * / asm ("NEGF R7, R7"); / * -1 * (EB + EC) - > R7 * / asm ("STF R7, @ _VECT + 88"); / * store EA * / asm ("ADDF R7, R4"); / * prop. + der. -dye. + EA- > R4 * / / ****** ACQUISITION DE Vdc ET NORMALISATION *********** / asm ("LDI * + ARl (3), R0"); asm ("ASH -20, R0"); / * normal, at 12 bits signe * / asm ("ABS I RO, R0"); / * valeur absolue de VDC * / asm ("CMPI 102, RO"); / * Vdc - 5lxVdc * / asm ("LDIN 102, R0"); / * yes < 5% Vdc- > 5% xVdc * / asm ("FLOAT RO, R0"); / * convert float * / asm ("MPYF @ _VECT + 26, R0"); / * normalize valeur de Vdc * / asm ("STF RO, @ _ VECT + 72"); / * store Vdc * / / * DIVISION (1 / Vdc) * / asm ("PUSHF RO"); / * pushf VDC (float) * / asm ("POP R3"); / * pop VDC (integer) - > R7 * / asm ("ASH -24, R3"); / * chercher exposant - > R7 * / asm ("NEGI R3"); / * exposant = -exposant * / asm ("SUBÍ 1, R3"); / * exposant = exposant - 1 * / asm ("ASH 24, R3"); / * retourne exposant - > R7 * / asm ("PUSH R3"); / * pushf VDC (float) * / asm ("POPF R3"); / * pop VDC (integer) - > R7 * / / * 1 ITERATION * / asm ("MPYF3 R3, R0, R2"); / * R2 = VDC * X [0] * / asm ("SUBRF 2.0, R2"); / * R2 = 2.0 -VDC * X [0] * / asm ("MPYF R2, R3"); / * R3 = X [0] * R2 * / / * 2 ITERATIOM * / d? N ("MPYF3 R3, R0, R2"); / * 2 - VDC * X [0] asm ("SUBRF 2.0, R2"); / * R2 = 2.0 -VDC * X [l] * / asm ("MPYF R2, R3"); / * R3 = X [l] * R2 * / / * 3 ITERATION * / asm ("MPYF3 R3, R0, R2"); / * R2 = VDC * X [0] * / asm ("SUBRF 2.0, R2"); / * R2 = 2.0 -VDC * X [2] * / asm ("MPYF R2, R3"); / * R3 = X [2] * R2 * / / * 4 ITERATION * / asm ("MPYF3 R3, R0, R2"); / * R2 = VDC * X [0] * / asm ("SUBRF 2.0, R2"); / * R2 = 2.0 -VDC * X [3] * / asm ("MPYF R2, R3"); / * R3 = X [3] * R2 * / / * 5 ITERATION * / asm ("RND R3"); / * MINIMISER L'ERREUR * / asm ("MPYF3 R3, R0, R2"); / * R2 = VDC * X [4] * / asm ("SUBRF 1.0, R2"); / * R2 = 1.0 -VDC * X [4] * / asm ("MPYF R3, R2"); / * R2 = X [4] * R2 * / asm ("ADDF R2, R3"); / * R3 = X [4] + R2 * / asm ("RND R3, R3"); / * R3 = X [4] + R2 * / asm ("STF R3, (_ VECT + 125"); / * store 1 / VDC * / / "ACQUISITION DE COUPLE ET NORMALISATION ***********; asm ("LDI * + ARl (3), R2 'asm (" ASH -20, R2' asm ("FLOAT R2, R2 'asm (" MPYF @ _VECT + 30, R2' asm ("STF R2, @ _ VECT + 83 'asm ("LDI * + ARl (3), R2' / * 9/11/94 * / asm (" ASH -20, R2 'asm ("FLOAT R2, R2' asm (" MPYF §_VECT + 30, R2 'asm ("STF R2, (_- VECT + 80' asm (LDI * + ARl (3), R2") / * 9/11/94 * / asm (ASH -20, R2") asm (FLOAT R2, R2") asm (MPYF @ VECT + 30, R2") asm (STF R2, @ VECT + 81") ********* CALCUL DE VAC ****************** asm ("MPYF @ _VECT + 19, R0"); / * XVdc x Vdc - > RO * / asm ("NEGF RO, R1"); / * -XVdc x Vdc - > Rl * / / ***** BORNE VAC ***** / asm ("CMPF Rl, R4"); / * SOMA - (-XVdc) * asm ("LDFN Rl, R4"); / * if negatif -XVdc - > VAC * / asm ("CMPF RO, R4"); / * SOMA - (XVdc) * / asm ("LDFP RO, R4"); / * if negatif XVdc - > VAC * / asm ("STF R4, ¡§_VECT + 97"); / * store VAC * / / ***** BORNE VBC ***** / asm ("CMPF Rl, R5"); / * SOMB - (-XVdc) * / asm ("LDFN Rl, R5"); / * if negatif -XVdc - > VBC * / asm ("CMPF RO, R5"); / * SOMB - (XVdc) * / asm ("LDFP RO, R5"); / * if negatif XVdc - > VBC * / asm ("STF R5, @ _ VECT + 98"); / * store VBC * / / ***** BORNE VCC ***** / asm ("CMPF Rl, R6"); / * SOMC - (-XVdc) * / asm ("LDFN Rl, R6"); / * if negatif -XVdc - > VCC * / asm ("CMPF RO, R6"); / * SOMC - (XVdc) * / asm ("LDFP RO, R6"); / * if negatif XVdc - > VCC * / asm ("STF R6, @ _ VECT + 99"); / * store VCC * / / * convert for FPGA * / asm ("NOENERG LDF @ _VECT + 125, R3"); / * 1 / Vdc - > R3 * / asm ("MPYF @ _VECT + 20, R3"); / * KOUT1 X 1 / Vdc - > R3 * / asm ("MPYF R3, R4"); / * R4 = 1 / Vdc * 256 * VAC * / asm ("MPYF R3, R5"); / * R5 = 1 / Vdc * 256 * VBC * / asm ("MPYF R3, R6"); / * R6 = 1 / Vdc * 256 * VCC * / asm ("LDF ¿_VECTf21, R1"); / * KOUT2 - > Rl * / asm ("ADDF Rl, R4"); / * IMVA = R4 + 255.5 * / asm ("STF R4, @ _ VECT + 100"); / * store IMVA * / asm ("FIX R4, R4"); / * convert R4 into integer * / asm ("ADDF Rl, R5"); / * IMVB = R5 + 255.5 * / asm ("STF R5, @ _ VECT + 101"); / * store IMVB * / asm ("FIX R5, R5"); / * convert R5 into integer * / asm ("ADDF Rl, R6"); / * IMVC = R6 + 255.5 * / asm ("STF R6, @ _ VECT + 102"); / * store IMVC * / asm ("FIX R6, R6"); / * convertie R6 into integer * / asm ("LDI 255, R7"); asm ("LSH 9, R7"); asm ("OR R7, R6"); / * out FPGA * / asm ("LSH 9, R6"); / * shift IMVC of 9 * / asm ("OR R5, R6"); / * IMVC, IMVB - > R6 * / asm ("LSH 9, R6"); / * shift IMVC, IMVB of 9 * / asm ("OR R4, R6"); / * IMVC, IMVB, IMVA - > R6 * / asm ("LDI @ _VÉCT + 62, R1"); / * set position of carte * / asm ("STI Rl, * + AR0 (2)"); / * store - PAGEADDR. * / d me "STI R6, * + A l (3)"); / * out FPGA * / / *** TRANSFERT VECTEUR FONTION VEHICLE AU C30 ******* / / * prepare transfert vecteur vers c30 * / asm ("LDI @ _VECT + 58, AR7"); / * store ad.DRAMIN - > AR7 * / asm ("LDI 0, R7"); asm ("STI R7, * + AR2 (0)"); asm (M STI AR7, * + AR2 (4) "); / * store dans src. -> AR2 (4) * / asm (" STI AR4, * + AR2 (6) "); / * store dans dest .-> AR2 (6) * / asm ("LDI 33, R7"); / * 33 * / asm ("STI R7, * + AR2 (8)"); asm ("LDI 0C53h, R7"); / * verifi si j'ai le droit de lire * / asm ("LDI Ofh, R1"); asm ("CMPI * -AR7 (l), R1"); / * Ofh - mem (20 0001) * / asm ("BN NDMAIN"); / * lance le transfert si < 10 * / asm ("STI R7, * + AR2 (0)"); / * v / atch dog laisse une trace * / asm (". LDI 3h, R7"); asm ("STI R7, * - AR7 (l)"); '******** TRANSFERT VECTEUR DANS DRAM ****************** asm ("LDI 0, IRO asm (" LDI @ _VECT1, ARO asm ("LDI @ _VECT + 58, AR1 asm (" BOUCLE: CMPI 40, IR0 asm ("BLTD BOUCLE s? n (" LDF * + AR0 (IR0 ), R0 a ¡;? ("STF R0, fARl (IR0) ADDI 1, IRO LDI @ _VECT + 58, AR7 / * store ad DRAM -> AR7 * / LDI Oh, R0 STI RO, * - AR7 ( 2) STI RO, * - AR7 (l) LDI @ _VECT + 59, AR7 / * store ad. 0SCIL.-> AR7 * / STI RO, * - AR7 (l) LDI 86, R0 STI RO, * - AR7 (3) STI RO, * - AR7 (4) STI RO, * - AR7 (5) STI RO, * - AR7 (6) / ******** SET L'ADRESSE DES POINTEURS ***************** asm ("LDI @_CONTMIX, AR0" / * control mix bus -> AR0 * / asm ("LDI @_CONTACQ, AR1" / * control acquit. -> AR1 * / asm ("LDI @_CONTDMA, AR2" / * DMA control -> AR2 * / asm ("LDI @_SINUS, AR3" / * adr. vect.SINUS -> AR3 * / asm ("LDI @ _VECT1, AR4" / * adresse sramin -> AR4 * / asm ("LDI (_CONTIMl, AR5" / * control timer # 1-> AR5 * / / ******** INIT CARTE D'ACQUISITION k-kiei kic-kkk-kicie-kic-kici ic asm ("LDI 9_VECT + 61, .R0"); / * select module 0, A27 = 0 * / asm ("STI RO, * + AR0 (2)"); dsm ("LDI aoh,: .o"); / * inver e polarite entree * / asm ("STI RO, * + ARL (l)"); asm ("LDI Oh, Rl"); / * FIFO reset * / asm ("STI Rl, * + ARl (0)"); asm ("NOP"); asm ("NOP"); asm ("LDI lOh, RO"); / initial. channel ram * / asm ("STI RO, * + ARl (0)"); asm ("STI Rl, * + ARl (3)"); / * set channel # 1 * / asm ("LDI 021h, RO"); / * set channel # 2 * / asm ("STI RO, * + ARL (3)"); asm ("LDI 022h, RO"); / * set channel # 3 * / asm ("STI RO, * + ARL (3)"); asm ("LDI 03h, RO"); / * set channel 4 * / asm ("STI RO, * + ARL (3)"); asm ("LDI 30h, RO"); / * set channel # 17 LDI OBOH * / asm ("STI RO, * + ARL (3)"); asm ("LDI llh, RO"); / * 9/11/94 * / asm ("STI RO, * + ARL (3)"); asm ("LDI 92h, RO"); / * 9/11/94 * / asm ("STI RO, * + ARL (3)"); asm ("NOP"); asm ("NOP"); asm ("LDI 0, IR1"); / ******** DEPART DU SYSTEME INTERRUPT *********** ******* asm ("STI Rl, * ARO"); / * reset mtmix 02 * / asm ("LDI OEh, RO"); / enable intinix 02? / dsm ("STI RO, * AR0"); asm ("LDI 5h, IE"); / * enable int02 ET intOO * / asm ("STI Rl, * AR1"); / * reset FIFO carte acqui. * / asm ("LDI 0F4h, RO"); / * start acqui * / asm ("STI RO, * AR1"); asm ("LDI @ _VECT + 62, Rl"); / * select module 2, A27 = l * / asm ("STI Rl, * + AR0 (2)"); asm ("OR 2000h, ST"); / * set GIE enable * / asm ("LDI 255, R7") asm ("LSH 27, R7") asm ("LDI @ _VECT + 62, R1") asm ("STI Rl, * + AR0 (2)" ) asm ("STI R7, * + ARL (3)") Although the present invention has been described above by means of the preferred embodiments, it should be noted that any modifications to these preferred embodiments, within the scope of the appended claims, is considered to be unchanged, does not alter the nature and scope of the present invention.
PI -! 9 < 7M: -:

Claims (24)

  1. NOVELTY OF THE INVENTION Having described the present invention, it is considered as a novelty and, therefore, the content of the following CLAIMS is claimed as property: 1. A method for starting a synchronous machine having a rotor and a stator provided with windings, the rotor has an initial position with respect to the stator, the method comprises the steps of: (a) starting a start phase of a first vector sum of successive vector sums of the currents that will be applied to the windings; (b) applying the successive vector sums of the currents to the windings, each of the successive vector sums have a phase, the method is characterized in that it also comprises the following steps: (c) detect, for each of the vector sums of the currents applied in step (b), a movement of the rotor and the direction of movement with respect to the stator; (d) compensating for each of the movements and directions of the movements detected in step (c), the PVE phase of the subsequent vector sum of the successive vector sums of the currents applied to the windings, to return to the rotor towards its initial position; PI: -I9 / G ''? M? (e) detect whether the rotor has moved with respect to the stator, after application of the successive vector sums of the currents of step (b) and either increase the starting phase by a different value of a multiple of 180 degrees electrical, if the rotor has not moved with respect to the stator, and return to step (b) or, proceed to step (f); and (f) storing the phase value of the last of the successive vector sums applied to the windings, whereby the machine is now ready to operate from the phase value stored in step (F). The method according to claim 1, characterized in that in step (d) the PVE phase is calculated by means of the following equations: INT = K * MOV + INT1 PVE = INT + CNT where INT1 is an error that was calculated and previously integrated, INT is the error that is currently calculating and integrating, MOV is the movement and direction of movement previously detected in step (c) with respect to the initial position, CNT is representative of a position of the rotor and K it is a predetermined constant. 3. The method according to claim 1, characterized in that in step (d) the PVE phase is calculated Pl ^ 1 V ll by means of the following equations: INT = K * MOV + INT1 PVE = Kp * MOV + INT + CNT where INT1 is an error that was previously calculated and integrated, INT is the error that is being calculated and currently integrating, MOV is the movement and direction of the element detected in step (c) with respect to the initial position, CNT is representative of a rotor position and K and Kp are predetermined constants. The method according to claim 1, characterized in that in step (b) comprises the following steps: (i) determining, for each of the successive vector sums of the currents applied to the windings, an increased amplitude value of one subsequent vector sum of the successive vector sums of the currents that will be applied to the windings; and (ii) determine whether the increased amplitude value of the subsequent vector sum has reached a predetermined amplitude value and either terminate the application of the successive sums of the currents of step (b) and proceed to step (e), if the increased amplitude value of the subsequent vector sum has reached the predetermined amplitude value, or continue the [• l-'l'.V '' HX application of the successive vector sums of step (b). The method according to claim 1, characterized in that in step (b), each of the successive vector sums of the currents is applied to the windings, by means of signals with modulated pulse width. The method according to claim 4, characterized in that the first vector sum of the successive vector sums of the currents has an amplitude having a value of zero and a phase having a value of zero. 7. The method according to claim 4, characterized in that the increased amplitude value is determined from the following equation: AV = AVE + I, where AV is the amplitude value increased, AVE is an amplitude value of a previous sum of the successive vector sums of the currents applied to the windings and I is the value of a constant. 8. The method for starting a synchronous machine having a rotor and a stator provided with windings, comprising the following steps: (a) applying a predetermined sequence of vector sums of currents to the windings, the sequence of the vector sums has phases default variables, the P1 < '/ r'7M method is characterized in that it also comprises the following steps: (b) detect and store, for each of the vector sums of the currents applied in step (a), the movement of the rotor and the direction of this movement with respect to the stator; (c) establishing a function Fl with respect to the phase, based on the movements and directions of the movements detected in step (b), and establishing a function F2 with respect to the phase, based on the amplitudes of the sequence of vector sums; and (d) mathematically adjusting an equation F that results from the functions Fl and F2 with a predetermined equation to obtain a phase difference, so that the machine is now ready to operate from the phase difference. The method according to claim 8, characterized in that in step (a) the predetermined sequence of vector sums of the currents applied to the windings has predetermined variable phases ranging from a first predetermined phase value to a second predetermined phase value. . The method according to claim 8, characterized in that step (d) comprises the following steps of: PI2 i ') /' ') H.-; (i) calculate the second derivative Fl • 'of the function Fl; and (ii) normalize function Fl11 by means of a function F2, to obtain function F that results from functions Fl and F2. The method according to claim 8, characterized in that in step (a), each vector sum of the sequence of vector sums of the currents is applied to the windings by means of modulated pulse width signals. The method according to claim 8, characterized in that the adjustment of step (d) is carried out by means of a least squares method and the predetermined equation defines a sine function represented by the equation AMPL * Sen (? + The phase difference ), where AMPL is a given amplitude y? it is representative of the variable phases. The method according to claim 9, characterized in that in step (a) the first predetermined phase value is zero. The method according to claim 1, characterized in that in step (e) the starting phase is increased by a value of 90 electric degrees. 15. The apparatus for starting a synchronous machine has a rotor and a stator provided with p; 9 / 'i7i-? windings, the rotor has an initial position with respect to the stator, the apparatus comprises a means for initiating a starting phase of a first vector sum of the successive vector sums of the currents to be applied to the windings and a means for applying the sums successive vectors of the currents to the windings, each of the successive vector sums have a phase, the apparatus is characterized in that it further comprises: means for detecting, for each of the applied vector sums of the currents, a movement of the rotor and the direction of movement with respect to the stator; a means for compensating, for each of the movements and directions of previously detected movements, the phase of a subsequent vector sum of the successive vector sums of the currents applied to the windings, to return the rotor to its initial position; means for increasing the starting phase by a different value from a multiple of 180 electrical degrees if the rotor, after application of the successive vector sums of current, has not moved with respect to the stator; and a means for storing the phase value of the last of the successive vector sums applied to the rotor, whereby the machine is now ready to operate from the phase value stored in the storage medium. The apparatus according to claim 15, characterized in that the means for detecting the movement of the rotor and the direction of movement with respect to the stator comprises an ascending / descending counter and an increment encoder having an input connected to the rotor and a connected output. at the input of the ascending / descending counter. 17. The apparatus according to claim 15, characterized in that the means for starting, the means for increasing, the means for storing and the means for compensating are all part of a control unit provided with operating software. The apparatus according to claim 16, characterized in that the increment encoder has a second output to generate an index signal; and the up / down counter has a load input to receive the index signal, whereby the index signal is used as a load signal to confirm the absolute position of the rotor with respect to the stator, when the synchronous machine is working. 19. The apparatus according to claim 15, ? .N '! /' I7M? characterized in that the application means comprises: a control unit provided with an operating software; a current detector having inputs to detect the currents applied to the windings and a digital output connected to an input of the control unit; an inverter having outputs for applying the successive vector sums of the currents to the windings and an input for receiving the control signals from the control unit; and a voltage detector having an input for detecting a power supply voltage applied to the inverter and a digital output connected to an input of the control unit. 20. The apparatus for starting a synchronous machine having a rotor and a stator provided with windings, comprises a means for applying a predetermined sequence of vectorial sums of the currents to the windings, the sequence of the vector sums have predetermined variable phases, the Apparatus is characterized in that it further comprises: means for detecting and storing, for each of the applied vector sums of the currents, a movement of the rotor and the direction of the VI 2 I '/' '7MX movement with respect to the stator; a means to establish a function Fl with respect to the phase, based on the movements and the directions of the movements; a means to establish a function F2 with respect to the phase, based on the amplitudes of the sequence of the vector sums; and a means to mathematically adjust an equation F resulting from the functions Fl and F2 with a predetermined equation, to obtain a phase difference, whereby the machine is now ready to operate from the phase difference. The apparatus according to claim 20, characterized in that the means for detecting and storing the movement of the rotor and the direction of movement with respect to the stator comprises: a control unit provided with an operating software, an ascending / descending counter having a output connected to the control unit and an increment encoder having an input connected to the rotor and an output connected to an up / down counter input. 22. The apparatus according to claim 20, characterized in that the means for establishing the function Fl, the means for establishing the function F2 and the means for mathematically adjusting the equation F resulting from the Vl -Z i? '/ IMY. Functions Fl and F2 are all part of a control unit provided with operating software. 23. The apparatus according to claim 20, characterized in that the application means comprises: a control unit provided with an operating software; a current detector having inputs to detect the currents applied to the windings and a digital output connected to an input of the control unit; an inverter having outputs to apply the predetermined sequence of vector sums of the currents to the windings and an input to receive the control signals from the control unit; and a voltage detector having inputs to detect the power supply voltage applied to the inverter and a digital output connected to an input of the control unit. The apparatus according to claim 21, characterized in that: the increment encoder has a second output to generate an index signal; and the up / down counter has a load input to receive the index signal, whereby the index signal is used as a signal of saw ?;? / '' 7M load to confirm the absolute position of the rotor with respect to the stator, when the synchronous machine is running. P1 -19 / 97MX
MXPA/A/1997/004859A 1994-12-28 1997-06-27 Apparatus and method for starting aninconnect machines MXPA97004859A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US08/365,459 US5537020A (en) 1994-12-28 1994-12-28 Method and apparatus for starting up a synchronous machine
US08365459 1994-12-28
PCT/CA1995/000682 WO1996020528A1 (en) 1994-12-28 1995-12-05 Apparatus and method for starting a synchronous machine

Publications (2)

Publication Number Publication Date
MX9704859A MX9704859A (en) 1997-10-31
MXPA97004859A true MXPA97004859A (en) 1998-07-03

Family

ID=

Similar Documents

Publication Publication Date Title
US7239103B2 (en) Synchronous motor startup lock detection circuit and method
US5864217A (en) Switched reluctance machine with toothed-wheel rotor sensor
Haque et al. A sensorless initial rotor position estimation scheme for a direct torque controlled interior permanent magnet synchronous motor drive
JP4027227B2 (en) Encoderless operation method and encoderless operation device for permanent magnet synchronous motor of elevator
CA2208182C (en) Apparatus and method for starting a synchronous machine
Acarnley et al. Review of position-sensorless operation of brushless permanent-magnet machines
Nakashima et al. Sensorless initial rotor position estimation of surface permanent-magnet synchronous motor
US5525886A (en) Low speed position estimator for switched reluctance machine using flux/current model
JP3397007B2 (en) Brushless motor
US6014006A (en) Induction motor control system with speed and flux estimation
US8040095B2 (en) Synchronization of sequential phase switchings in driving stator windings of a multiphase sensorless brushless motor at sub BEMF-detectability speeds
US6184647B1 (en) Method of estimating initial pole position of permanent magnet brushless motor
Schroedl Sensorless control of permanent magnet synchronous motors
KR100665075B1 (en) Brushless machine control
EP0532350A1 (en) Lock detector for switched reluctance machine rotor position estimator
KR102631215B1 (en) How to determine the rotor position of a brushless permanent magnet motor
Consoli et al. Sensorless control of PM synchronous motors at zero speed
JP2018033301A (en) Method for determining orientation of rotor of non-iron pmsm motor in sensor free manner
JP2000514994A (en) Synchronous sampling circuit for sensorless switched reluctance machine system
US20160294314A1 (en) Fractional Delay Adjustment in a Field-Oriented Control Architecture
EP1109308A2 (en) Brushless machine control
MXPA97004859A (en) Apparatus and method for starting aninconnect machines
Reddy et al. A low cost sense coil based position sensing system for SRM implemented in a SoC FPGA
JP4449419B2 (en) Control device for synchronous motor
Wang et al. Identification of load current influences on position estimation errors for sensorless SPMSM drives