Method for Preventing Locomotive from Wheel Slip and Skid Based on Controlling Rotation Speed FIELD OF THE TECHNOLOGY [0001] The present invention relates to a method for preventing locomotive from wheel slip and skid based on controlling rotation speed of the locomotive. The present invention belongs to the field of railway locomotive. BACKGROUND [0002] Any discussion of the prior art throughout the specification should in no way be considered as an admission that such prior art is widely known or forms part of common general knowledge in the field. [0003] The wheel would be slip or skid when traction force or braking force produced at wheel rim is larger than adhesive force between the wheel and track. The adhesive force is affected by lots of factors, such as conditions of wheeltrack surface (pit, snow, water, oil and frost on the surface), state of the route (ramps, roadbeds, curves, and turnouts) and distribution of axle weight and so on. Additionally, the adhesive force is also affected by the driving mode of the driver and the locomotive speed. The wheel slip or skid of locomotive would make the wheel generate heat and be scratched, and even affects the safe operation of the locomotive, and thus is very harmful. The adhesive between the wheel and the track is a complex time-varying system with uncertainty. At present to fully take advantage of the adhesive force and effectively prevent locomotive from wheel slip and skid has become the development directions in the field of railway locomotive around the world. [0004] As to preventing the locomotive from wheel slip, a general solution is to install 3 differential relays on the main circuit of the locomotive, and each of the differential relays is connected with 2 traction motors. They constitute together a wheel slip signal detection device. When the locomotive works normally, the voltage on both ends of the differential relay connected with 2 traction motors is balanced. When one wheelset slips, potential difference between the traction motor connected with the wheelset and the traction motor connected with the other wheelset will change, charging the differential relay. And then the audible and visual alarm connected in series with normally open contact circuit of the differential relay is switched on and gives out wheel slip alarm. After the driver's discovering the alarm, he would manually 1 activate sanding and decreasing the power. As to this solution that each of differential relays is connected with two traction motors, due to back electromotive force at low speed and that at high speed are very different, the same voltage difference cannot indicate the rate of change of the back electromotive force at different locomotive speed and different voltage class, and thus whether the traction motor is wheel slip and its severity cannot be judged accurately according to voltage difference. When the serious wheel slips are synchronous, the voltage on both ends of differential relay is very near to each other so that the relay will not act. In addition, if the driver places his foot on the pedal of sanding device and simultaneously decreases traction power of the locomotive after he sees the wheel slip indicating light shining, it would take time and also it is very difficult to accurately determine how much power is appropriate to decrease. [0005] An improved solution based on the above is to connect an intermediate relay in series to the normally open contact circuit of the differential relay and control the locomotive sanding and decreasing load automatically by it when the differential relay acts after charging. But as described above, on one hand the wheel slip cannot be judged accurately through the differential relay. On the other hand the intermediate relay controlled by the differential relay cannot automatically reduce the load in the accurate size and the duration time, and thus it is difficult to achieve good control effect, and furthermore the solution cannot prejudge the wheel slip and relief it by sanding, and only can simultaneously control sanding and decreasing load, and therefore the use of the adhesive traction force cannot be fully taken advantage of. [0006] There is another conventional method for preventing the locomotive from wheel slip. In this solution current and rotation speed of each traction motor is checked all the time. Parameters such as speed difference, accelerated speed, accelerated speed differential signal, current difference, and the change rate of current are computed in real time, and specific thresholds are set for these parameters. As long as the values of these parameters are larger or less than their corresponding thresholds, it is identified that the locomotive is wheel slip. According to the value of these parameters, the percentage of the load to be decreased and the duration time of load decrease can be computed and thereby whether to sand and its execution time can be determined. At present, this solution is gradually becoming the prevailing technical solution for preventing the locomotive from wheel slip. But there are following disadvantages in its practical application. At different speed and different current of traction motor, there is a great difference in speed difference, accelerated speed of the wheels, accelerated speed differential signal, current difference, change rate of the current, percentage of the load 2 decreasing and duration time of the load decreasing. Especially, for different stages of the wheel slip, even the feedback parameters are the same, there are still great difference in percentage of the load decreasing, duration time of the load decreasing, and execution time of sanding. So it is almost impossible to get appropriate percentage of the load decreasing, duration time of the load decreasing, and execution time of sanding in real time, either the adhesive traction force cannot be made full use of or the wheel slip cannot be suppressed effectively. The software of the controlling system is very complex, too many controlling units are needed, and the units interact with each other, and generally, the regulation of a certain unit will bring influence on other units. It is difficult to test on site, in the test process that continuously controls the load decreasing and then loads again after ease of wheel slip, if the loading rate is too fast, the output torque of the traction motor would fluctuate, easily causing more serious wheel slip, and if the loading rate is too slow, the velocity of the locomotive will reduce quickly even stop on the ramp-way because of the insufficiencies of the traction force. When the traction motor of the locomotive is wheel slip, it is difficult to determine the time to decrease load, percentage of the load decreasing and duration time of the load decreasing according to rotation speed difference, accelerated speed of the wheels, accelerated speed differential signal, current difference, change rate of the current and so on, and thus it still cannot fully take advantage of the adhesive traction force. [0007] As to the wheel skid of the locomotive in braking, the speed difference, the decelerated speed and the slip ratio are the main parameters to be checked. As long as one parameter exceeds its corresponding threshold, the braking force is to be reduced and to sand immediately. For example, in the case of rheostatic braking, exciting current should be diminished at once, and in the case of gas braking, the braking cylinder should be exhausted greatly. The judgment of the wheel skid depends mostly on the empirical formula and empirical data, which is not suitable for different external conditions such as different conditions of wheeltrack surface, different states of route, different driving modes of the driver, different locomotive speeds. At the same time, it is hard to accurately determine the time when the locomotive begins wheel skid. If the time determined is advanced, braking force loss is too great, and the adhesive force between the wheel and track cannot be utilized sufficiently, and if the time determined is lagged, the wheel skid will occur and cause scratches on the wheel treads, being ineffective for preventing the locomotive from wheel skid. Even if the time determined is perfect, it is still hard to compute the percentage and the duration time of braking force decreasing. It is thus difficult to make the best use of the braking force while preventing the locomotive from wheel skid. 3 [0008] A further method for preventing the locomotive from wheel skid is the combined control via the parameters of the speed difference, the decelerated speed, and the differential of the decelerated speed. Instead of the method that reducing the braking force and sanding as long as one parameter exceeds its corresponding threshold, in this method, several parameters are observed at the same time and the state of the adhesion utilizing is assessed synthetically, and then judge the wheel skid of the locomotive. In this method, although the accuracy of the wheel skid time determined is increased, it is still hard to determine the percentage of braking force decrease and the duration time of braking force decrease and is difficult to obtain a reasonable and quantitative value. It is thus difficult to make the best use of the braking force while preventing the locomotive from wheel skid. [0009] Another solution for preventing the locomotive from wheel skid is to adopt a fuzzy control method. The fuzzy control method does not need to learn the details of the accurate mathematical model of the antiskid system. It sufficiently utilizes human experience, and imitates human thinking mode, and specifically, it formalizes human experience and introduces it into a fuzzy control process. The fuzzy control system is composed of five parts including an input/output interface, a fuzzy controller, an executing mechanism, sensors and controlled objects, wherein the fuzzy controller is the core of the fuzzy control system. Because the design of the fuzzy controller depends mostly on practical experience of personnel, the choice of controlled variables and the design of control rules should largely combine with practices. At the same time, for the rationality of the choice of the controlled variables and the effect of the control rules, a simulation analysis should be conducted by programming, or verification should be carried out by experiments after completing the design of the controller. Obviously the two methods all need to be verified by much time and many efforts, and repeatedly experiment and analyse. That is, they need a complicated process and high workload. SUMMARY [0010] An object of embodiments of the invention is to provide a method for preventing the locomotive from wheel slip and skid based on controlling the rotation speed, to overcome shortcomings of the prior arts above. The method can fully take advantage of the adhesive force between the wheel and the track, and effectively prevent the locomotive from wheel slip in traction or wheel skid in braking. 4 [0011] The object is achieved by a method for preventing a locomotive from wheel slip and skid based on controlling rotation speed, the method includes the following steps: A. generating a traction force (or a braking force) control value VTout according to running state of the locomotive, where VTout is controlled in a range: VTmin VTout < VTmax; B. detecting rotation speed of each axle, computing average rim velocity Vavr, maximum rimvelocity Vmax and minimum rim velocity Vmin; C. computing speed of the locomotive Lspd = Vavr; D. detecting feedback value of the traction force (or the braking force) of the locomotive; E. computing the set value of speed difference VDref and the set value of maximum accelerated speed VAref; F. computing feedback value of the speed difference: VDfdb = Vmax - Vavr in the mode of traction or VDfdb = Vavr-Vmin in the mode of braking; G. computing accelerated speed of rotation of each axle VAfdbl ~ VAfdbn (traction mode) or decelerated speed of rotation of each axle VAfdb 1 -VAfdbn (braking mode); H. computing feedback value VAfdb of the accelerated speed which equals to the maximum among the accelerated speed of rotation of each axle VAfdb 1 VAfdbn (traction mode), or computing feedback value of the decelerated speed VAfdb which equals to the maximum among the decelerated speed of rotation of each axle VAfdbl~VAfdbn (braking mode); I. computing control value of rotation speed difference VDout by inputting VDref and VDfdb into a PID closed-loop controller of speed difference VD, wherein VDout is controlled in a range: Vmin VDout Vmax; J. computing control value of accelerated speed VAout by inputting VAref and VAfdb into an PID closed-loop controller of accelerated speed VA, wherein VAout is controlled in a range: Vmin VAout Vmax; and K. controlling the traction force (or the braking force) of the locomotive according to the minimum among the VAout, VDout and VTout. [0012] The method according to embodiments of the invention can prevent a locomotive from wheel slip and skid all-weather. Because of regulating effect of the PID controller, the system has the characteristics of quick adjustment when the deviation is large, continuous and steady 5 adjustment when the deviation is small, and predictive adjustment when the deviation changes rapidly, not only is which able to fully take advantage of the adhesive force, it can effectively prevent the locomotive from wheel slip in traction or wheel skid in braking. [0013] It is an object of the present invention to overcome or ameliorate at least one of the disadvantages of the prior art, or to provide a useful alternative. [0014] Unless the context clearly requires otherwise, throughout the description and the claims, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is to say, in the sense of "including, but not limited to". BRIEF DESCRIPTION OF THE DRAWINGS [0015] Fig. 1 is a schematic circuit diagram of the traction main circuit of an AC / DC diesel-electric locomotive according to an embodiment of the invention. [0016] Fig. 2 is a schematic circuit diagram of the rheostatic braking main circuit of an AC/DC diesel-electric locomotive according to an embodiment of the invention. [0017] Fig. 3 is a flow chart of an interruption subprogram according to an embodiment of the invention. [0018] Fig. 4 is a flow chart of a traction force control subprogram according to an embodiment of the invention. [0019] Fig. 5 is a flow chart of a braking force control subprogram according to an embodiment of the invention. [0020] Fig. 6 is a flow chart of a subprogram for computing the set value of speed difference VDref and the set value of maximum accelerated speed VAref in the mode of traction. [0021] Fig. 7 is a flow chart of a subprogram for computing the set value of speed difference VDref and the set value of maximum decelerated speed VAref in the mode of braking. DETAILED DESCRIPTION [0022] The technical solutions of the invention will be described below clearly and comprehensively with reference to the accompanying drawings, so as to make objects, technical solutions and advantages of the embodiments of the invention clearer. Obviously, the embodiments are only a part of the embodiments of the invention. All other embodiments made 6 by the skilled in the art without creative work, based on the embodiments presented herein, fall within the scope of the invention. Embodiment 1 [0023] This embodiment illustrates the prevention of an AC/DC diesel-electric locomotive from wheel slip and skid. [0024] Fig.1 shows a traction main circuit of an AC/DC diesel locomotive according to this embodiment, where the exciting current of an exciter of a main-generator is controlled by a micro-computer, so as to control the direct voltage rectified by the main-generator. In Fig. 1, Rlt is exciting resistance, D1 is fly-wheel diode, Q1 is field-effect transistor, EXC is exciting generator, ERC is exciting rectifier, MG is main-generator, MRC is main rectifier, M 1~-M6 are traction motors, and SD1-SD6 are rotation speed transducers of the traction motors. PWM signal outputted from the micro-computer is to control the exciting current flowing through the exciting coil of EXC, by adjusting breakover duty cycle of Q1. Three-phase alternating current generated by EXC and rectified by ERC supplies power for the exciting winding of the main-generator. Three-phase alternating current generated by the main-generator and rectified by MRC main rectifier cubicle supplies power for the M1~M6. The direct voltage of the traction motor can be adjusted by adjusting pulse width of PWM signal and thereby the traction force of the traction motor can be adjusted. So the value of pulse width of PWM signal is equivalent to the control value of the traction force. [0025] Fig. 2 shows a rheostatic braking main circuit of AC/DC diesel-electric locomotive according to an embodiment of the invention. In Fig. 2, traction motors M1~M6 each operates in the mode of generator with load Rz. SD1~SD6 are rotation peed transducers of the traction motors. Three-phase alternating current generated by a main-generator and rectified by MRC main rectifier cubicle supplies power for exciting windings connected in series with the traction motors M1~M6. The exciting current flowing through the exciting windings of the above six traction motors can be adjusted through adjusting pulse width of PWM signal, so as to achieve the adjustment of the braking current of the traction motor and further the adjustment of the braking force. So the value of pulse width of PWM signal is equivalent to the control value of the braking force of the traction motor. [0026] Refer to Fig. 3. This embodiment utilizes a timer 1 interruption to generate a timing interrupt of lOmS. First, in block 1.1, turn off the timer 1 interruption, and in block 1.2, clear the sign of the timer 1 interruption. Then enter block 1.3, judge whether the traction command is 7 true: if it is true, enter block 1.4, execute a traction force control subprogram; otherwise, enter block 1.5. In block 1.5, judge whether the braking command is true: if it is true, enter block 1.6, execute a braking force control subprogram; otherwise, enter block 1.7. In block 1.7, turn on the timer 1 interruption, to get ready for the next interruption. Then the interruption subprogram ends. [0027] Fig. 4 shows a traction force control subprogram. In this subprogram, in Block 2.1, compute the control value Vtout and limit it in the range of VTmin <(VTout <(VTmax. Specifically, under the controlling of a given traction curve formed by the set value of velocity/power, a voltage threshold of traction motor and a current threshold of traction motor, the control value VTout of terminal voltage of the traction motor can be computed through detecting feedback values of the velocity/power, voltage of the traction motor and current of the traction motor and so on in real time. In block 2.2 detect rotation speed of each axle in real time. In block 2.3 compute maximum rim velocity Vmax, and in block 2.4 compute average rim velocity Vavr. In block 2.5 compute Lspd: Lspd=Vavr/300 (in this embodiment, the unit of the speed Lspd is km/h; the theoretical value of rim velocity is 300 times larger than the real rim velocity). In block 2.6 detect the feedback value of controlled object, that is, detect output current Curr of main generator, which output current Curr indicates the state of the traction force. In block 2.7, compute the set value of speed difference VDref and in block 2.8, compute the set value of maximum accelerated speed VAref. In block 2.9 compute feedback value of the speed difference VDfdb =Vmax-Vavr. In block 2.10 compute accelerated speed of rotation of each axle VAfdbl~VAfdbn. In block 2.11 compute feedback value of the accelerated speed VAfdb. In block 2.12 compute VDout and limit it in the range of Vmin VDout Vmax. In block 2.13 compute VAout and limit it in the range of Vmin VAout Vmax. In block 2.14 take the minimum value among the VAout, VDout and VTout. In block 2.15, compute PWM pulse width control value according to the above minimum value. Then the traction force control subprogram ends. [0028] Fig. 5 shows a braking force control subprogram. In this subprogram, in block 3.1 compute control value VTout, and limit it in the range of VTmin VTout VTmax. Specifically, under the controlling of a given brake curve formed by velocity of the locomotive, the set value of braking current and the set value of exciting current, a control value of braking current VTout can be computed through detecting the feedback values of velocity of the locomotive, braking current and exciting current in real time. In block 3.2 detect rotation speed 8 of each axle in real time. In block 3.3 compute minimum rim velocity Vmin, in block 3.4 compute average rim velocity Vavr. In block 3.5 compute locomotive speed Lspd = Vavr/300. In block 3.6 detect feedback value of the controlled object, that is, detect braking current Curr indicating the state of the brake force. In block 3.7 compute the set value of speed difference VDref and in block 3.8 compute the set value of maximum decelerated speed VAref. In block 3.9 compute feedback value of the speed difference VDfdb = Vavr-Vmin. In block 3.10 compute the decelerated speed VAfdbl~VAfdbn of rotation of each axle. In block 3.11 compute feedback value of the decelerated speed VAfdb. In block 3.12 compute VDout and limit it in the range of Vmin VDout Vmax. In block 3.13 compute VAout and limit it in the range of Vmin VAout Vmax. In block 3.14 take the minimum value among the Vtout, Vaout and VDout. In block 3.15, compute PWM pulse width control value according to the above minimum value. Then the braking force control subprogram ends. [0029] Fig. 6 shows the calculation of the set value of speed difference VDref and the set value of maximum accelerated speed VAref in the mode of traction. In block 4.1 judge whether the Lspd is larger than 60: if it is yes, enter block 4.2 to compute VAref = 800+Lspd* 10, then enter block 4.3 to compute VDref=600+Lspd*10, and then the subprogram ends; otherwise, enter block 4.4. In block 4.4, judge whether 60 > Lspd > 20: if it is yes, enter block 4.5; otherwise enter block 4.13. In block 4.5, judge whether Curr > 2000: if it is yes, enter block 4.6 to compute VAref = 800+Lspd*10, then enter block 4.7 to compute VDref=600+Lspd*10, and then the subprogram ends; otherwise enter block 4.8. In block 4.8 judge whether 2000> Curr > 1500: if it is yes, enter block 4.9 to compute VAref = 1000+Lspd* 10, and then enter block 4.10 to compute VDref=800+Lspd* 10, and then the subprogram ends; otherwise, enter block 4.11 to compute VAref=1200+Lspd*10, and then enter block 4.12 to compute VDref=1000+Lspd*10, and then the subprogram ends. In block 4.13 judge whether Curr > 2000, if it is yes, enter block 4.14 to compute VAref = 900+Lspd*5, and then enter block 4.15 to compute VDref=700+Lspd*5, and then the subprogram ends; otherwise enter block 4.16. In block 4.16 judge whether 2000 > Curr > 1500: if it is yes, enter block 4.17 to compute VAref = 900+Lspd*10, and then enter block 4.18 to compute VDref = 700+Lspd*10, and then the subprogram ends; otherwise enter block 4.19. In block 4.19 judge whether 1500 > Curr > 1000: if it is yes, enter block 4.20 to compute VAref = 900+Lspd* 15, and then enter block 4.21 to compute VDref=700+Lspd* 15, and then the subprogram ends; otherwise enter block 4.22. In block 4.22 judge whether 1000 > Curr > 800: if it is yes, enter block 4.23 to compute VAref 9 1000+Lspd*15, and then enter block 4.24 to compute VDref=800+Lspd*15, and then the subprogram ends; otherwise enter block 4.25 to compute VAref = 1100+Lspd*15, and then enter block 4.26 to compute VDref=900+Lspd* 15, and then the subprogram ends. [0030] Fig. 7 shows the calculation of the set value of speed difference VDref and the set value of maximum decelerated speed VAref in the mode of braking. In block 5.1 judge whether Lspd > 60: if it is yes, enter block 5.2 to compute VAref = Lspd*34-600, and then enter block 5.3 to compute VDref= Lspd*34-800, and then the subprogram ends; otherwise enter block 5.4. In block 5.4 judge whether 60 > Lspd > 20: if it is yes, enter block 5.5; otherwise enter block5.13. In block 5.5 judge whether Curr > 500: if it is yes, enter block 5.6 to compute VAref = 500+Lspd*15, and then enter block 5.7 to compute VDref=300+Lspd*15, and then the subprogram ends; otherwise enter block 5.8. In block 5.8 judge whether 500 > Curr > 300: if it is yes, enter block 5.9 to compute VAref = 700+Lspd* 15, and then enter block 5.10 to compute VDref=500+Lspd*15, and then the subprogram ends; otherwise enter block 5.11 to compute VAref = 800+Lspd* 15, and then enter block 5.12 to compute VDref=600+Lspd* 15, and then the subprogram ends. In block 5.13 judge whether Curr > 500: if it is yes, enter block 5.14 to compute VAref = 800, and then enter block 5.15 to compute VDref=600, and then the subprogram ends; otherwise enter block 5.16. In block 5.16 judge whether 500 > Curr > 300: if it is yes, enter block 5.17 to compute VAref = 900, and then enter block 5.18 to compute VDref=700, and then the subprogram ends; otherwise enter block 5.19 to compute VAref 1000, and then enter block 5.20 to compute VDref=800, and then the subprogram ends. [0031] Finally, it will be appreciated that the embodiments described above are only used to illustrate the technical solution of the invention rather than to limit it. Although the invention has been described in detail with reference to the above embodiments, the killed in the art should appreciate that the embodiments of the invention can be modified and the technical features therein can be replaced equivalently without departing from spirit and scope of the invention. 10