Summary of the invention
The technical problem that the present invention mainly solves is to provide multiple asynchronous motors control system and the control method that a kind of single FPGA is realized, realized the control that realizes multiple asynchronous motors with few hardware resource by a fpga chip, and the light current of whole system and forceful electric power can be realized electrical isolation, ensure that control system can reliably working, be not subject to the impact of strong power part circuit.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: the multiple asynchronous motors control system that provides a kind of single FPGA to realize, comprise: FPGA IP kernel and multiple electric motors, be all in series with the electric current and voltage detecting unit of light-coupled isolation unit, inversion unit and multi-path serial in the path of described IP kernel and every described motor;
Described FPGA IP kernel, output PWM driving pulse, every corresponding six road PWM driving pulses of motor;
Described light-coupled isolation unit, the PWM that receiving described FPGA IP kernel provides drives signal, forceful electric power and light current is isolated simultaneously, drives signal to export to described inversion unit PWM;
Described inversion unit, receives by the PWM driving pulse after isolation in described light-coupled isolation unit, drive motors running, and produce a voltage signal;
Described electric current and voltage detecting unit, converts the voltage signal producing in described inversion unit to digital signal, then after isolating by serial ports, inputs described FPGA IP kernel.
In a preferred embodiment of the present invention, described FPGA IP kernel comprises separate unit motor SVPWM algoritic module, and described separate unit motor SVPWM algoritic module comprises:
According to given frequency, traffic direction with whether turn round, obtain the position alpha of space vector and the rotating vector generation module of modulation ratio m;
Receive position alpha and the modulation ratio m data of space vector, according to the predetermined formula computer memory vector computing module of action time;
Obtain the PWM block of state of 6 road pwm pulses action time according to space vector;
6 road pwm pulses are converted to the dead band module of 6 road pwm pulses of last three-phase inversion unit;
Described rotating vector generation module, computing module, PWM block of state are carried out to the timing management module of timing management.
In a preferred embodiment of the present invention, described computing module comprises sine and cosine module and multiplier module, described sine and cosine module and described multiplier module respectively with described timing management module, receive the clock signal of described timing management module assignment.
The present invention also provides a kind of control method of multiple asynchronous motors control system of single FPGA realization, and concrete steps are as follows:
(100) whether distribute corresponding command signal to every motor will controlling, described command signal comprises: frequency, direction of rotation and move;
(200) by the VVVF control algolithm module of three command signal input separate unit motors of n platform motor, adopt SVPWM algorithm to obtain pwm pulse the latch output of n platform motor, and got off in the position at the space vector place of n platform motor and sector latch, complete the control of n platform motor;
(300) three command signals of n=n+1 platform motor are sent in the VVVF control algolithm module of above-mentioned separate unit motor to repeating step (200).
In a preferred embodiment of the present invention, in described step (200), the step of SVPWM algorithm is as follows:
(210), first according to given frequency, traffic direction with whether turn round, obtain the sector sector at position alpha, modulation ratio m and the space vector place of space vector;
(220), calculate α angle corresponding sine and cosine value sin α and cos α by the position alpha of above-mentioned space vector;
(230), calculate two of space voltage by resolution of vectors again and decompose T1 action time, the T2 of vector and T0 action time of zero vector;
(240), then by relatively obtaining 3 road pwm pulse signal cycle T C1, TC2, TC3;
(250), then by above-mentioned 3 road pwm pulse signal cycle negates, obtain 6 road pwm pulse signals.
In a preferred embodiment of the present invention, in step (230), two of described space voltage T1 action time, T2 that decompose vectors and zero vector action time T0 computing formula be respectively:
(1)
(2)
(3)
Wherein, Tpwm is the cycle of a pwm pulse signal;
In a preferred embodiment of the present invention, in step (240), the table of comparisons in described 3 road pwm pulse signal cycles is as follows:
Wherein, the computing formula of Tcm1, Tcm2, Tcm3 is as follows:
(4)
(Sector=1/3/5) or
(Sector=2/4/6) (5)
(6)
The invention has the beneficial effects as follows:
1, single FPGA of the present invention is realized multiple asynchronous motors control system and control method, adopt monolithic fpga chip, realize spatial vector pulse width modulation algorithm and the VVVF control algolithm of multiple asynchronous motors, thereby reached the control that adopts few hardware resource to realize multiple asynchronous motors.
2, single FPGA of the present invention is realized multiple asynchronous motors control system and control method, the control thought that adopts time-sharing multiplex to combine with parallel and serial, the control algolithm of the multiple electric motors of realizing, improve the renewal speed of PWM, and the hardware resource needing is few, can utilize the FPGA that scale is less to realize.
3, whole system has adopted the measure of forceful electric power and light current isolation, and the system that ensured is not subject to the interference of strong power part, has improved the reliability of system.
Embodiment
The present invention is described in detail, thereby so that advantages and features of the invention can be easier to be it will be appreciated by those skilled in the art that, protection scope of the present invention is made to more explicit defining.
The multiple asynchronous motors control system that a kind of single FPGA of the present invention is realized, entire system block diagram is as Fig. 1, figure comprises: IP kernel and motor 1, motor 2 ... motor n, its IP kernel and described motor 1, motor 2 ... in the direct each path of motor n, correspondence is in series with light-coupled isolation unit 1, light-coupled isolation unit 2 ... light-coupled isolation unit n and inversion unit 1 inversion unit 2 ... inversion unit n, and there is an electric current and voltage detecting unit in each path serial, described electric current and voltage detecting unit and described IP kernel are isolated by serial ports, obtain motor 1 by the IP kernel in FPGA, motor 2 ... motor n Zhong six road driving pulses, through light-coupled isolation unit 1, light-coupled isolation unit 2 ... after light-coupled isolation unit n, send into inversion unit 1, inversion unit 2 ... inversion unit n, described inversion unit 1, inversion unit 2 ... inversion unit n is all directly by corresponding light-coupled isolation unit 1, light-coupled isolation unit 2 ... driving signal after light-coupled isolation unit n isolation is controlled, and all correspondence produces a voltage signal, in circuit, multi-path serial has electric current and voltage detecting unit simultaneously, described voltage signal enters electric current and voltage detecting unit and carries out digitlization, isolate by serial ports, be input in IP kernel, thereby learn system voltage and current of electric.Whole system has adopted the measure of forceful electric power and light current isolation, and the system that ensured is not subject to the interference of strong power part, has improved the reliability of system.
As shown in Figure 2, for the schematic diagram of Zhong Yi of the present invention road inversion unit, HA in figure, HB, HC and LA, LB, LC is respectively three-phase inverter Liu road pwm pulse signal, described three-phase inverter adopts PS21997 module, this module is by fast diode D1, D2, D3 gives respectively capacitor C 1, C2, C3 charging, realize bootstrapping function, thereby make whole drive circuit only need 1 road 15V Power supply, this unit receives by the PWM driving pulse after isolation in described light-coupled isolation unit, drive motors running, and produce a voltage signal, described inversion unit is also by R1 and C14 capacitance-resistance filter, then signal is sent into the over-current detection pin of PS21997 module, thereby realize the overcurrent protection function of inversion unit.
As shown in Figure 3, for the light-coupled isolation unit in the present invention, Figure 3 shows that the buffer circuit of 1 road pwm pulse, in figure, HA_FPGA is connected with the IP kernel in described fpga chip, the HA pin of HA and described inversion unit is connected, for forceful electric power and the light current of buffer circuit, it is the buffer circuit of pwm pulse.
As shown in Figure 4, for the potential circuit testing circuit in the present invention, in figure, TLC3544 one has the chip of SPI Serial Communication Function, the voltage signal obtaining from inversion unit is carried out digitlization conversion by it, isolate by serial ports, be input in IP kernel, thereby learn system voltage and current of electric, can realize the current sample of 4 asynchronous motors.As needs, control exceedes 4 motors, can select TLC3548 chip, can realize the sampling of 8 tunnel analog quantitys.SPI communication interface is isolated by optocoupler ISO7231, then connects with fpga chip, has realized the strong and weak electric signal isolation of analog signal sampling.
The present invention has also disclosed multiple asynchronous motors control system and the control method that a kind of single FPGA is realized, the present invention adopts fpga chip, the VVVF (variable voltage variable frequency) that realizes multiple asynchronous motors controls, the control of concrete separate unit motor realizes, main frequency modulation and the Regulation Control that adopts space vector modulation (SVPWM) algorithm to realize asynchronous machine three-phase voltage, as shown in Figure 5, for the control flow chart of multiple asynchronous motors, first in the IP kernel of FPGA, distribute corresponding control command resource to every motor will controlling, be respectively frequency f req(16 position), direction of rotation dir(1 position) and whether move run(1 position) three instructions, if control 4 motors, need 4 groups of such orders, next first three command signals of motor 1 are sent into separate unit motor VVVF algoritic module, finally obtain the pwm pulse of motor 1, and latch output, next and position and the sector latch at the space vector place when front motor get off, complete like this control of a motor, next step starts the control of motor 2, in the control of motor 2, only control command need to be sent in the VVVF algoritic module of the separate unit motor identical with motor 1, just can realize the control of motor 2, do not need like this to realize identical VVVF algorithm to every motor, only need 1 VVVF algoritic module just can realize, thereby reached the control that realizes multiple asynchronous motors with less hardware resource.In the present invention, a VVVF algoritic module needs 140 clocks, be 40M crystal oscillator as the present invention adopts chip fpga chip, that is to say, the realization of a VVVF algorithm need to about 3.5us, the switch periods of general asynchronous machine is 10K left and right, it is the cycle of 0.1ms, therefore, because the FPGA implementation algorithm speed of service is fast, in the cycle of 0.1ms, can realize 28 VVVF algorithms nearly, that is to say, adopt control method of the present invention, when nearly can realizing 28 asynchronous motors, control, the control of the hardware resource simultaneously needing and 1 motor is more or less the same.
Shown in Fig. 6, Fig. 7, the instantaneous voltage in arbitrary moment of threephase asynchronous machine can indicate with the vector in a space, as the three-phase voltage of a certain moment motor is respectively u
a, u
b, u
c, space vector can be expressed as:
For three-phase inverter, there are 8 on off states, wherein 6 is effective on off state, can form 6 switching vector selectors of Fig. 6, totally six sectors, the voltage of a certain moment three phase electric machine can be expressed as a vector in Fig. 7, according to weber equilibrium principle, can be the space voltage vector in arbitrary moment the action effect at a switch periods Tpwm, be equivalent to two switching vector selectors that are adjacent and act on respectively T1 and T2 sum, its space vector decomposes isoboles as shown in Figure 7.
As shown in Figure 9, for the present invention is the block diagram of realizing of separate unit motor I P core, first the order of inputting given frequency, traffic direction and whether turning round in first rotating vector generation module in IP kernel, obtain the sector sector at angle [alpha], modulation ratio m and the space vector place of space vector, then calculate sine and cosine value corresponding to α angle by sine and cosine module, calculate two of space voltage by resolution of vectors again and decompose T1 action time, the T2 of vector and T0 action time of zero vector, its concrete formula is:
(1)
(2)
(3)
Wherein, Tpwm is the cycle of a pwm pulse signal;
Then be delivered to comparison module again and obtain 3 road pwm pulse signal cycle T C1, TC2, TC3, the table of comparisons of described 3 road pwm pulse signal cycle T C1, TC2, TC3 is specific as follows:
Wherein, the computing formula of Tcm1, Tcm2, Tcm3 is as follows:
(4)
(Sector=1/3/5) or
(Sector=2/4/6) (5)
(6)
As described in Figure 8, for PWM status signal generation method figure in the present invention, obtain after TC1, TC2, TC3, negate is conveyed into PWM block of state together, generate 6 road pwm pulse signals according to Fig. 8, obtain 6 road pwm pulse signals of last three-phase inversion unit finally by mistake dead band module.In whole process, described rotating vector generation module, computing module and PWM block of state are all connected with timing management module, and this is the process of a serial, for carrying out the timing management of each module.
As shown in figure 10, for spatial vector pulse width modulation algorithm SVPWM algoritic module specific implementation flow chart in the present invention, arrow in figure represents to realize the needed fpga chip clock number of each module, m*Tpwm module in figure and T1 calculate and T2 computing module, three modules adopt same multiplier, carry out the calculating of modulation ratio m and Tpwm at clock 1-20, carry out T1 calculating at clock 77-96, carry out T2 calculating at 97-116, and sinusoidal calculations module and cosine computing module in figure all adopts sine and cosine arithmetic unit, adopt the principle of time-sharing multiplex only to adopt 1 multiplier and sine and cosine arithmetic unit to realize the computing of whole SVPWM algoritic module, can effectively economize on resources, and these two modules are parallel mutually with major cycle, do not take the time of whole circulation, improve the renewal speed of PWM.
As Figure 11, shown in Figure 13, be respectively described multiplier module output interface and described sine and cosine output interface, in figure, Counter is entire system counter, Rmtpwm is the product of modulation ratio m and PWM cycle T pwm, its specific implementation flow chart is respectively as Figure 12, shown in Figure 14, be between 1-20 time at clock number, output valve is Rmtpwm, be between 21-48 time at clock number, output valve is cos(60-α), be between 49-76 time at clock number, output valve is sin α, be between 76-97 time at clock number, output valve is Rmtpwm and cos(60-α) product, be T1, be between 96-117 time at clock number, output valve is the product of Rmtpwm and sin α, be T2.
Be different from prior art, in the present invention, FPGA IP kernel is the system core, be responsible for realizing space vector modulation (SVPWM) and the VVVF control algolithm of multiple electric motors, and because FPGA is generally equipped with more IO mouth, therefore can easily obtain every motor Liu road PWM driving pulse by FPGA.FPAG core is the control centre of whole system, is the key component of whole system.What obtained by FPGA does not have a platform motor Liu road driving pulse, through light-coupled isolation 1 ~ light-coupled isolation N, then delivers to inverter circuit 1-inverter circuit N part, and inverter circuit adopts IPM module to realize, and can directly be controlled by the driving signal after light-coupled isolation.The inspection of current of electric and busbar voltage directly realizes by multi-path serial AD; the result obtaining is by after isolating by serial ports; be sent to fpga chip; in FPGA, realize and have corresponding serial ports read-write capability module; thereby can obtain busbar voltage and the current of electric of system, provide protection inverter circuit for realizing overcurrent-overvoltage etc.Between whole system light current and forceful electric power, all realize electrical isolation, thereby ensured that control system can reliably working, be not subject to the impact of strong power part circuit.
The present invention adopts monolithic fpga chip, realize spatial vector pulse width modulation algorithm and the VVVF control algolithm of multiple asynchronous motors, thereby reach the control that adopts few hardware resource to realize multiple asynchronous motors, the control thought that simultaneously adopts time-sharing multiplex to combine with parallel and serial, the control algolithm of the multiple electric motors of realizing, improved the renewal speed of PWM, and the hardware resource needing is few, can utilizes the FPGA that scale is less to realize; And whole system has adopted the measure of forceful electric power and light current isolation, and the system that ensured is not subject to the interference of strong power part, has improved the reliability of system.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes specification of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.