Method for Measuring the Transient Rotational Speed of a Synchronous Generator This application claims priority to Chinese Patent Application No. 201010278957.4, filed to the Chinese Patent Office on September 13, 2010, entitled "Method for Measuring the Transient Rotational Speed of a Synchronous Generator", which is incorporated herein by reference in its entirety. FIELD OF THE TECHNOLOGY [0001] The present invention relates to the field of measuring technology, and particularly to a method for measuring the transient rotational speed of a synchronous generator. BACKGROUND [0002] The rotational speed of a synchronous generator not only influences output voltage and frequency directly, but also is an important parameter for controlling a prime mover (hydraulic turbine, steam-driven turbine or internal combustion engine), meanwhile, also ensures to accurately achieve four-quadrant rectification control in the wind power generation field, and therefore, it has significant meaning to monitor the rotational speed of a synchronous generator. Currently, there are two main methods for measuring the transient rotational speed of a synchronous generator, one is to adopt a testing system with a rotational speed sensor, such method not only has a complicated structure and a high cost, but also is inconvenient in installation and debugging, meanwhile, an assorted interface circuit is further needed and circuit design is also very troublesome; the other is to calculate the rotational speed of a synchronous generator by detecting the frequency value of a certain phase voltage in the three-phase output voltages of a synchronous generator, however, such method has disadvantages such as long detection period and low detection precision, and is not suitable for a control system which needs to detect the transient rotational speed. SUMMARY [0003] Embodiments of the present invention provide a method for measuring the transient rotational speed of a synchronous generator, aiming to solve the problems of high cost and inconvenient installation and debugging caused by complicated structures in the prior art, the method measures the transient rotational speed of a synchronous generator by executing a 4848160_1 (GHMatters) P92318.AU computer program, and is featured by a simple structure, convenient operation and a reduced cost of the testing system. [0004] According to an aspect of the present invention, the method for measuring the transient rotational speed of a synchronous generator is carried out in turn according to the following steps: a. initializing a program and assigning zero to Ual, Ubl, Ucl and Ua2, wherein Ual, Ubl and Ucl are sampling results of three-phase voltage Ua, Ub and Uc at the last time, respectively, and Ua2 is a sampling result of Ua at the second last time; b. synchronously detecting three-phase transient voltage values UaO, UbO and UcO, wherein Ua0, UbO and UcO are detection results of three-phase voltage Ua, Ub and Uc at this time; c. calculating an integral value Uas of Ual, the integral limit is [2k ir/o,T], T E [2k 7/(, 00), k=0,1,2---; d. calculating a difference value Ubc between Ub I and Uc1; e. judging whether Ual :Ua2 and Ual bUa0, if yes, assigning zero to Uas and then judging whether Uas or Ubc is equal to 0 or not, if not, directly judging whether Uas or Ubc is equal to 0 or not; f. if Uas or Ubc is equal to 0, assigning the value of Ual to Ua2, and then assigning values of UaO, UbO and UcO to Ual, Ubi and Uc1, respectively; if neither Uas nor Ubc is equal to 0, calculating a ratio of Ubc to Uas, i.e., the angular speed o of a synchronous generator, then calculating the motor rotational speed by n=60/2np wherein p is the number of pole pairs of the synchronous generator, displaying the rotational speed on a display or transmitting the rotational speed to the outside via a communication interface, then assigning the value of Ual to Ua2, and assigning the values of Ua0, UbO and UcO to Ual, Ubl and Ucl, respectively; and g. repeating the steps from Step b to Step f. [0005] According to embodiments of the present invention, the transient rotational speed of a synchronous generator can be measured by executing a computer program, and there is no need to arrange a speed sensor, and the testing system according to embodiment of the present invention has a simple structure and convenient operation, which is not only capable of directly reducing the testing cost but also is featured by a quick detection speed and high precision. 2 4848160_1 (GHMatters) P92318.AU BRIEF DESCRIPTION OF THE DRAWINGS [0006] In order to describe the technical solutions in embodiments of the present invention or the prior art more clearly, accompanying drawings for the embodiments of the present invention or for the prior art are introduced briefly hereinafter, by way of example only. Obviously, the accompanying drawings are only some embodiments of the present invention and the persons skilled in the art can obtain other drawings according to the accompanying drawings without any creative work. [0007] FIG. 1 is a flow diagram according to the embodiment of the present invention; [0008] FIG.2 is a schematic diagram of MATLAB simulation result according to the embodiments of the present invention; DETAILED DESCRIPTION [0009] In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, a clear and complete description of the technical solutions in embodiments of the present invention is given with reference to the accompanying drawings in the embodiment. Apparently, the embodiments described herein are only a part rather than all of the embodiments of the present invention, and all other embodiments derived by persons skilled in the art from the embodiments of the present invention without making any creative effort shall fall within the protection scope of the present invention. [0010] In this embodiment, the upper computer of the detection system is a digital signal processor (DSP) TMS320F28335, directly connects the AD7656 16-bit data bus to TMS320F28335 16-bit data bus in parallel connection, and featured by simple and stable operation. TMS320F28335, a DSP chip recently launched by Texas Instruments, has a high-speed processing of 150MHz, and possesses a 32-bit floating point unit (FPU), which not only has a digital signal processing capability, but also a powerful event management capability, and embedded control function and floating point operation capability. AD7656 is a 6-channel 16-bit high precision and simultaneous sampling analog-to-digital (A/D) converter, with a maximum conversion rate of 250M kps and a bipolar analog input range of -5V-5 V or -1 0V +10 V, and provides convenience for transient sampling of output voltages of sine wave. [0011] As shown in FIG.1, an embodiment of the present invention is carried out in turn according to the following steps: a. initializing a program and assigning zero to Ual, Ubl, Ucl and Ua2; 3 4848160_1 (GHMatters) P92318.AU b. synchronously detecting three-phase transient voltage values UaO, UbO and UcO; c. calculating an integral value Uas of Ual; d. calculating a difference value Ubc between Ub1 and Uc1; e. judging whether Ual 3Ua2 and Ual >Ua0, if yes, assigning zero to Uas and then judging whether Uas or Ubc is equal to 0 or not, if not, directly judging whether Uas or Ubc is equal to 0 or not; f. if Uas or Ubc is equal to 0, assigning the value of Ual to Ua2, and then assigning values of UaO, UbO and UcO to Ual, UbI and Ucl respectively; if neither Uas nor Ubc is equal to 0, calculating a ratio of Ubc to Uas, i.e., the rotational speed o of a synchronous generator, then calculating the motor rotational speed by n=60o/27rp, displaying the rotational speed on a displayer or transmitting the rotational speed value to an outside control center via a communication interface, then assigning the value of Ual to Ua2, and assigning the values of UaO, UbO and UcO to Ual, Ubl and Ucl respectively; and g. repeating the steps from Step b to Step f. [0012] The detection of three-phase voltage transient values and calculation of angular speed o and rotational speed n of a synchronous generator are carried out in the EPWM1 interrupt, and set the time period of EPWM1 interrupt as 20us. [0013] Detection principle: An embodiment of the present invention is to calculate the angular speed o of a synchronous generator by simultaneously detecting the three-phase AC output voltage transient values of a synchronous generator, and then obtain the rotational speed n of a synchronous 60w generator, wherein n = (p is the number of pole pairs of the generator), based on the rotational speed formula n = 60f/p of and angular speed formula w = 2nf. The three-phase AC output voltage values of a synchronous generator are expressed as Ua, Ub and Uc, respectively: Ua = UCOSet (1) Ub = Ucos(wt- 27r/3) (2) 4 4848180_1 (GHMatters) P92318.AU Uc = Ucos(wt- 47r/3) (3) Take the integral of Formula (1): U. f Ua dt = f Ucosotdt - sinot + C (4) Regarding Formula (4), if the integral limit is [2k )/w, T), wherein T takes value in the range of [2k w/&d, 00) (k=O,1,2---), and then Formula (4) can be written as: T U f 2 kUa dt - sinoT (5) Subtract Formula (3) from Formula (2), and then obtain: Ub-Uc =U (cos(ct - 2r/3) - cos(cot - 4r/3)) = -2U(sin((t - 7r) 2 = r3U sin ot that is, Ub-Uc = vU sin wt (6) Define the value range of variable tin Formula (6) to be [2kxr/o, oo), (k=0,l,2--), and then obtain: Ub-Uc = N'U sin cT T E [2k /w, 0o), k=O,1,2--- (7) Divide Formula (7) by Formula (5), and then obtain: Ub-Uc V3UsinwT -r- y .rw , that is, Ua dt SmwT Ub-Uc 7 = ' Ua dt T E [2kn/o, o), k=0,1,2--- (8) NF3 2 k In/r a d 5 4848160_1 (GHMatters) P92318.AU Seen from Formula (8), o is equal to the integral of the difference between B phase voltage and C phase voltage divided by V times of A phase voltage, provided that the integral limit is [2km/co, oo) ,wherein TE [2kn/ow, oo), k=0,1,2---. Formula (8) proves to be true by MATLAB simulation. Set w=2w, U=5, and then: Ua =5 cos2nt Ub = 5 cos(2wt- 27r/3) Uc = 5 cos(2nt- 41/3) The simulation result is as shown in FIG.2: Curve 1 is Ub-Uc = 5NF3 sin 21rt; Curve 2 is Ua =5 cos2nt; Curve 3 is f Ua dt, seen from the simulation result, as long as the initial point is 2k w/w, then Curve 3 is a sine wave, having the same phase with Curve 1. Ub-Uc Curve 4 is = -rT -, that is, the quotient of Curve 1 and Curve 3 is equal to fkia c Ua di the constant 27r, which is the same with the set value of o, and thereby proves Formula (8) to be true. [0014] In practical detection system, in the case of fk /Ua dt T E [2k 7r/&), oo), k=0,1,2---, if merely considering that the initial point is 2k ir/(, then due to variable amplitude 6 4848160_1 (GHMatters) P92318.AU value of Ua and discreteness of the system, the integral results will have severe deviations as time goes on. Seen from Curve 3 in the above drawing, within the interval of T E [2kw/&, 2(k + 1)7r/w], the integral curve of Ua varies periodically, and all the integrals at the each beginning of a period are zero. Therefore, allow T E [2k i/w, 2(k + 1)7[/D], and modify the integral results periodically. The method adopted is that: when the maximum value of Ua is detected, modify the integral results of Ua by zero clearing, and start to take the integral of Ua until the maximum value of Ua is detected for the next time. The method for detecting the maximum value of Ua is that: set Ua2 and Ual as the sampling results in the last two time and last time, respectively, UaO is the detection result of this time, if Ual -Ua2 and Ual bUa0, the detection time of Ual is the maximum value point of the Ua. [0015] Finally, it should be noted that the above embodiments are merely provided for describing the technical solutions of the present invention, but not intended to limit the present invention. It should be understood by persons skilled in the art that although the present invention has been described in detail with reference to the foregoing embodiments, modifications can be made to the technical solutions described in the foregoing embodiments, or equivalent replacements can be made to some technical features in the technical solutions; however, such modifications or replacements do not cause the essence of corresponding technical solutions to depart from the spirit and scope of the embodiments of the present invention. 7 4848160_1 (GHMatters) P92318.AU