Analysis of Balancing of Unbalanced Rotors and Long Shafts using GUI MATLAB

Rotating machinery is commonly used in mechanical and electromechanical systems that include rotors of motors and engines, machining tools, industrial turbomachinery, etc. In case of unbalanced distribution of rotating masses around an axis of rotation the rotor unbalance arises. This presents a serious engineering problem because it is a major cause of excessive vibrations, esp. at higher speeds. Arising large centrifugal unbalanced forces can lead to damage of bearings and finally to destruction of machines. This is the reason why solving of the unbalance is a basic concern in design and operation of the machinery.


Introduction
Rotating machinery is commonly used in mechanical and electromechanical systems that include rotors of motors and engines, machining tools, industrial turbomachinery, etc. In case of unbalanced distribution of rotating masses around an axis of rotation the rotor unbalance arises. This presents a serious engineering problem because it is a major cause of excessive vibrations, esp. at higher speeds. Arising large centrifugal unbalanced forces can lead to damage of bearings and finally to destruction of machines. This is the reason why solving of the unbalance is a basic concern in design and operation of the machinery.
Vibration of the rotating machinery is suppressed by eliminating the root cause of vibrationthe system unbalance. Practically, vibrations cannot reach zero values but usually it is acceptable to decrease them to a value lower than that one prescribed for a certain quality class of the machinery [1]. Balancing of the rotor increases the bearing life, minimizes vibrations, audible noise, power losses, and finally it results in increased quality of products.
The problems arising when dealing with unbalanced rotating bodies have been analyzed in many references. The exceptional positions among them hold two references [1,2]. Due to its importance, numerous references have dealt with vibrations and their eliminations, e.g. [3] - [6] and also serious companies are facing the vibrations, just to mention few of them - [7,8]. If the vibrations are below a normal level, they may indicate only normal wear but when they are increasing, it may signal the need to take an immediate maintenance action. A level of unbalance that is acceptable at low speeds is completely unacceptable at a higher speed. This is because the unbalance condition produces centrifugal force, which increases with square of the speed [9] -if the speed doubles, the force quadruples; etc. For this reason it is important to determine the critical speed at which excessive oscillations present a direct serious danger.

Analysis of forces caused by unbalanced rotating body
Considered in this study are two cases of cylindrical rotating bodies: a rotor and a long shaft. Their drawings and parameters used for later simulation are shown in Fig. 1. Both rotating bodies are similar, what concerns their dynamical properties and calculation of possible vibrations. Fig. 1 also shows parameters of rotating bodies. Here, the rotor is considered to be fixed, resting on massless shaft that is supported on bearings and the shaft is circular and solid.

Analysis of Forces Caused by Unbalanced Rotating Body
2 Considered in this study are two cases of cylindrical rotating bodies: a rotor and a long shaft. 3 Their drawings and parameters used for later simulation are shown in Fig. 1. Both rotating 4 bodies are similar as to their dynamical properties and calculation of possible vibrations. Fig.  5 1 also shows parameter of rotating bodies. Here, the rotor is considered to be fixed, resting 6 on massless shaft that is supported on bearings and the shaft is circular and solid. The unbalanced rotating body can move in radial direction horizontally and vertically and it 9 can also rotate around axes x, y, that are in the plane perpendicular to the axis z of rotation. 10 The unbalanced rotating body can move in radial direction horizontally and vertically and it can also rotate around axes x, y, that are in the plane perpendicular to the axis z of rotation.

Analysis of Balancing of Unbalanced Rotors and Long Shafts using GUI MATLAB 3
Legend:  Analysis of arising radial forces in case of the unbalanced rotor and principle of its balancing by adding a balanced mass follows from the drawing in Fig. 2. Due to the unevenly distributed mass around the axis of rotation, the center of gravity is shifted from its geometric center by the eccentricity (given by the distance ST ). The centrifugal force during rotation causes that the rotor is deviated from its direction, what leads to the increase of the distance between the center of gravity and axis of rotation. It is obvious that to eliminate the eccentricity a small balancing mass must be placed in opposite direction so that its centrifugal force would also act in this direction -against the force . From the Newton's Third Law of Motion it is obvious that at rotation, the centrifugal force caused by the mass on the radius is equal to the centrifugal force activated by mass rotating on the radius : (1) from which we can calculate the eccentricity: (2) Analysis of arising radial forces in case of the unbalanced rotor and principle of its balancing by adding a balanced mass results from the drawing in Fig. 2. Due to the unevenly distributed mass around the axis of rotation, the center of gravity is shifted from its geometric center by the eccentricity e (given by the distance ST). The centrifugal force F c during rotation causes that the rotor is deviated from its direction, what leads to the increase of the distance between the center of gravity and axis of rotation. It is obvious that to eliminate the eccentricity e a small balancing mass must be placed in opposite direction so that its centrifugal force F b would also act in this direction -against the force F c . From the Newton's Third Law of Motion it is obvious that at rotation, the centrifugal force caused by the mass m n on the radius r is equal to the centrifugal force activated by mass m rotating on the radius e: m n r = m e (1) from which we can calculate the eccentricity: For tolerable maximal residual unbalance e in the certain class G one gets: where v is equal to the class of unbalancing G (because the classification is based on circumferential speed v and on the radius e around the rotor center of gravity).
Other possibility to eliminate the unbalance consists in removing a part of material (e.g. by drilling it off) from determined position on the rotor in direction of the centrifugal force F c .
According to position of unevenly distributed mass of the rotating body round and along the axis of rotation we distinguish a static unbalance and the dynamic one (Tab. 2). To activate an unbalance of the rotating body two balancing masses having different value of the mass m 1 and m 2 are placed into two different planes that are mutually placed at farther distance and in radial direction they are shifted by the angle 180 °. The mass activating the static unbalance of the originally uniformly rotating body is given by the difference of both masses: a) Balanced rotating system b) Static unbalanced rotating system c) Torque unbalanced rotating system d) Dynamic unbalanced rotating system In case that two equal balancing masses are placed in two planes, the static unbalance is not activated, but a dynamic unbalance arises. It is graphically displayed in Tab. 2.
Let's consider a console ( Fig. 3) that is supported by two rigid bearings and is loaded by force F. This causes console bending y which is directly proportional to force F. The console reacts by force F D having the same value but opposite orientation. If a mass m is placed on the console, it will behave similarly like being placed on a spiral spring, [12].  rings and is load to force F. The co a mass m is plac g, [12]. member us of elasticity 1 Pa) ertia of a body rcular cross section ings, [12] are necessary (w y the equation, [3] f inertia round th  Calculation of stiffness of a console supported by two rigid bearings, [12] For calculation of the mathematical model several further formulas are necessary (with the nomenclature listed in Fig. 1 and Fig. 3): • The torque stiffness of symmetrical isotropic rotor is given by the equation, [3]: • The transversal moment of inertia, presents the moment of inertia round the axis that is perpendicular to the axis of rotation, [5]: • The polar moment of inertia of the same rotating body presents the main moment of inertia round the main axis of rotation and is given by formula [5]: • The bending rigidity of a console fixed in rigid bearings is [5]: • where for the quadratic moment of inertia of the cross-section it holds that:

Mathematical model of an unbalanced rotor
The most frequently used model of unbalanced rotating body is based on the so called Jeffcott model of an unbalanced rotor (developed by H. H. Jeffcott in 1919, [2]). It presents a linear model and consists of a substantial unbalanced disc that is located in center of unsubstantial elastic shaft bedded in two rigid bearings (Fig. 4a). The Jeffcott model has four degrees of freedom that are described by four differential equations of the second order. Considering a disc with the mass m as a mass point, the rotor has only two degrees of freedom and it can move only in radial direction in horizontal and vertical axes. During rotation, the center of gravity moves along a trajectory called the orbit, [5].
A simplified dynamical model of the rotor from Fig. 4a is shown in Fig. 4b. The model also contains flexural rigidity and damping of the bearing what can be considered as a spring and damper rotating synchronously with the rotor. In this way, the rotor is connected with the ground through linear springs and dampers and the movement in x-and y-directions is actuated by time-variable radial components of the rotating vector of the force. It is a consequence of the rotating unbalanced rotor (Fig. 4b). Motion equations for the described substitute model are derived from the Newton's Second Law: F = ma = mẍ , [11]: where b x , b y -damping in the x-axis and y-axis, respectively k x , k y -stiffness in the x-axis and y-axis, respectively If b x = b y and k x = k y , the model presenting the static unbalance of the rotor is considered to be isotropic one and the equations are mutually independent -i.e. they are decoupled. This means that damping and elasticity in the directions of the x-axis and y-axis are equal and the reference frame can rotate in the plane without any change in the motion equations, [5]. The mathematical model is then described in the coordinates {x, y} by the following motion equations: a. motion equations for the static unbalance: b. motion equations for the dynamic unbalance: where for the centrifugal force F c and torque M , caused by unbalance, we can derive: The value of eccentricity can be determined by inserting equation (4) into equation (2). The value of ( r + z ' ) presents an instantaneous value of the arm of unbalancing and z' is total deviation presenting the amplitude of total vibration of the rotor: Let's just remind that for calculation of longitudinal vibration a similar formula is valid like in the previous case. Total twist angle γ consists of two components, [4]: To eliminate the centrifugal force F c and resulting torque M caused by the rotor unbalance it is necessary to add or remove (e.g. be drilling-off) a certain mass in both planes. We obtain it mathematically by summing or subtracting the centrifugal force from the balancing mass the angle of which is shifted from the force F c by angle φ.
For balancing we can derive the motion equations having the final form:

a. Adding of the balancing mass:
Static balancing: m y by ky m r z t m r z t w w w w f Dynamic balancing: . Removing mass (e.g. by drilling off): Static balancing: Dynamic balancing: where ϕ = 0 °4

. Simulation model of unbalanced rotor
Based on the mathematical model the simulation model was designed in MATLAB/Simulink program. The simulation model corresponding to the mathematical model of unbalanced rotor is shown in Fig. 5. At the input there is a start-up block presenting linear increasing of the rotor speed to the working revolutions n in steady-state (the blocks Ramp, Ramp1 and Subtract). Description of the blocks: • Centrifugal force Fc -the block calculates centrifugal force causing an unbalance and deviation of the rotor in the x-and y-axes.
• Centrifugal force of the balancing mass -the block calculates value of the centrifugal force caused by the added mass (or the removed one) m b across the radius r b . The force is shifted by the angle φ towards to that one causing the unbalance.
• Sum of forces -giving sum of all forces acting in the system. At the output there is a total force acting in the direction of the x-axis and y-axis.
• Stiffness -presents bending rigidity of the shaft according to the equation (8).
• Damping -presents damping of the bearings (set by the user).
• Cartesian to Polar -this block calculates the deviation in the z´-axis that presents radial vibrations of rotating body. The value is re-calculated from Cartesian coordinate system into the polar one.    • Torque from unbalanced masses Mx, My -using the input parameters, the value of the torque that is excited by the rotor dynamic unbalance is calculated here.
• Torque from balancing masses Mx, My -calculates the torque from added or removed balancing masses m b1 and m b1 across radius r b . The balancing masses are placed in the position given by angle φ that is chosen by the user.
• Sum of torques -presents sums all torques acting in the system. At the output it gives total torque acting in the direction of the x-and y-axes.
• Torque stiffness -presents a torque stiffness of the shaft -the equation (5). • Transverse inertia -the block calculates transversal moment of inertia according to equation (6).
• Polar moment -presents the polar moment of the body inertia-equation (7).
• Total torsion angle -it calculates the angle of the rotor torsion that presents longitudinal vibrations of the rotor according to the equation (18).
The subsystem for calculation of the torque acting on the rotor/shaft in the direction of the xand y-axes is shown in Figs. 12 and 13. The constant fi1 presents the angle of the balancing mass placement that is chosen by the user (it is the same angle like at static balancing).  Similarly, in the case of static balancing, the gain equaling to -1 of the signal presents a drillingoff a part of the rotor mass; the gain value+1 corresponds with adding of the balancing mass. Also, the constant fi presents the angle where the balancing mass (or a drilled whole) should be placed (it is the same, like in the case of static balancing).

Parameters of the simulation models
For virtual experimentation of changes at balancing the rotating body we have performed simulation experiments both for the rotor and shaft. Basic mechanical and dimensional parameters of both rotating bodies are listed in Tab. 3.

Parameter of the rotor/shaft Rotor Shaft
Length  To compare the results, in case of balancing of rotor we have used the calculated masses, but in case of the shaft for the balancing masses we used a little smaller mass than recommended. Simulations were performed for unbalanced and balanced rotor and various forms of graphs were obtained, which are analyzed in the following. The basic graph types are: time-dependence, orbital trajectory of the center of gravity and logarithmic Bode frequency characteristics.

Run-up of the rotating body to working revolutions
The unbalancing of the rotating body becomes evident during its rotation. To reach the steadystate speed, the simulation model is actuated from the starting block giving a linear increasing signal during pre-set time (Fig. 16, the rising time of 0.1 s was chosen). The steady-state angular speed for the rotor is equal to 83.78 rad/s and for the shaft 104.72 rad/s.

Simulation results for unbalanced and balanced rotor
The deviations present vibrations that are caused by static unbalance (Fig. 17). Resulting vibrations are permanent-undamped. When comparing outputs from simulations -the vibrations of unbalanced rotor (Fig. 17a) -with the vibrations of the balanced rotor (Fig.  17b), one can see approximately several orders lower amplitude of vibrations after balancing (compare the scaling factor of both graphs in each figure -they are different for the unbalanced and balanced rotor). During start-up, the diameter of trajectory gradually grows and finally its orbit circulates in a certain range (Fig. 18). The analyzed system presents the 4 th order system, which means that the resulting time course consists of mixing two harmonic courses of various frequencies. After balancing (Fig. 18b), the orbital trajectory turns round a considerably lower diameter (note different scales in y-axes in the figures prior and after balancing).  Fig. 19a shows amplitude of the force acting on bearings due to a static unbalance. This is a total force; in case of asymmetrical rotor the force acting on a bearing is equal to one half of the total force. After balancing (Fig. 19b), the force from the unbalance masses is negligible. Fig. 20 shows rotating vectors of the centrifugal force in case of the unbalanced rotor (Fig. 20a) and the balanced one (Fig. 20b). Let's note that in Fig. 20b the scaling factor is much lower in comparison with that one shown in Fig. 20a.

Simulation results for the unbalanced and balanced shaft
Dynamic behavior of an unbalanced and balanced circular solid shaft is very similar to the behavior of the unbalanced and balanced rotors. The deviations have origin in a smaller diameter and larger length of the shaft that leads to higher resonance frequencies and larger angle of twist. The following simulation results show these similarities and differences that are comparable to those in the previous subchapter so we are not going to comment them. Note: let's remark, that the graphs for the balanced shaft are in different scale. From logarithmic characteristics (Fig. 30) it is obvious that the resonance frequency is higher than in case of the rotor of a similar length, material constants and unbalancing masses.

Numerical evaluation of simulation results
The following tables show numerical results obtained from the simulation of the rotor and prior to and after balancing (Tab. 6) and the same for the shaft (Tab. 7).

Parameters of the rotor prior after
Eccentricity Class of quality of balancing G 40 0.4 Table 7. Values of basic mechanical parameters of the shaft prior to and after the balancing When comparing the results in both tables one can see that balancing considerably decreased the rotating body vibration, which is observable esp. in case of the rotor. When balancing the rotor, the weights of balancing masses are much smaller in comparison with the weight of the rotor, so they do not influence value of the critical frequency. On the other hand, in case of the shaft, the weight of balancing masses is comparable with the weight of the shaft, so they considerably influence the critical frequency. By balancing also the class of balancing quality was improved, which means that the balancing rotating bodies fell into the best class -G 0,4.

Virtual model for unbalancing analysis and the balancing procedure
For easier interpretation of results and observation of influence of changeable parameters to unbalanced rotating body behavior a graphic user interface (GUI) in the MATLAB environment has been developed. The GUI has been developed for experimental observing of behavior of rotating unbalanced and balanced bodies -it enables to observe and evaluate influence of changing parameters of the rotor to mechanical oscillations.
The main screen of GUI is shown in Fig. 31. The graphical interface allows to input parameters of the mechanical systems by sliders and numerical values. Both rotating bodies (the rotor and the shaft) differ in their dimensions; further processing is the same. The screen displays the system arrangement (rotor/shaft) where the picture is interchanged with displaying its mathematical model (i.e. the equations). After inputting masses for static/dynamic unbalance and based on given class G of balancing the computer calculates masses for balancing and their placement (radius, mass, plane). Further it is possible to change simulation time, time of starting (increasing the revolutions) possibly time of loading the rotating body and also it is possible to choose a detail form the displayed graph. Based on chosen modes of graphs displaying the user can get the results in a required form.
The described functionalities make the designed GUI enough complex. To have a better overview and easier operating, the controlling buttons and sliders are grouped and the groups are framed. Functions of individual parts are briefly described here: Analyzed rotor/shaft -the picture shows a model of analyzed rotor/shaft. The rotor itself presents a rotating body placed in center of an immaterial shaft. The rotating system is supported by two rigid bearings. Rotor parameters -the panel contains basic parameters of the rotor selected by the user: length of the rotor T , diameter ω n , length F c and diameter M of the immaterial shaft. In case of the shaft that is supported by two stiff bearings, the length and diameters are equal z' and n.
Other parameters -the panel allows to set revolutions l, the original class of balancing G, and a damping d . Adding unbalance mass -two counterbalances with masses l s and d s can be added by the user onto two planes in the distance l s = l and d s = d , respectively, measured from planes of the bearings. The angle for the second counterbalance is not important as the final unbalanced torque consists of the sum of forces acting on bearings.
Recommended balancing parameters -here are the main recommended parameters calculated by the program for the process of rotating body balancing: the radius r b and amount of correcting masses -counterbalances m b1 and m b2 that are necessary for adding or removing the mass (e.g. by drilling). The value of the balancing masses corresponds to the mass that is necessary for total removal of the eccentricity.
Balancing parameters -the user decides whether to add or remove the balancing mass. The parameters are chosen by the user who decides value of radius for adding/removing mass and its amount (the program calculates precise value of balancing mass but the user can decide on using a different mass and radius of its fixing). If he chooses a smaller radius than recommended by the program, he must use a larger mass than recommended, of course. The procedure of adding masses can be repeated several times for various arrangements (push the Recount button).
Balancing -for balancing the unbalanced rotor/shaft the user has to choose parameters of the rotating body on the panel Balancing parameters. The results of balancing can be observed on time responses and/or on the orbits.
Results -the panel displays information before and after balancing. This is valid for critical resonance frequency n for amplitude of eccentricity b and class of quality of balancing G. Also, the resonance frequency m d 1 and the period of vibration m d 2 is displayed. The course can be zoomed. Displayed here is also the value of maximal acceptable unbalancing l 1 that is calculated on the basis of given quality of balancing G and revolutions l 2 . If the value of eccentricity ω n is larger than e, the rotor must be balanced. After balancing, the rotor can reach the better class than it was in before balancing.
Mechanical parameters -here are the buttons to select mode of displaying graphs obtained as results of simulation of unbalanced and balanced rotating body. Pre-set types of the graphs are follows: • Rotor oscillations in radial direction (vibrations of the force in bearings).
• Forces acting on the bearing.
• Rotating vector of the centrifugal force caused by the unbalancing.
• Orbit showing orbital trajectory of the center of the gravity during rotation.
• The torsional angle of rotor around axes x and y.
• Complex angular displacement of the rotor.
• Total torque acting on the rotor.
• Bode logarithmic frequency characteristics. Menu Help -description of classes of balancing, quality of the balancing and a procedure for using the GUI. The File is used in the case the user wants to save the graphical outputs.
Toolbar -it contains the classical MATLAB function for interactive work with graphical output. The user can print the graph, perform graph zooming, offset. Here is a tool for processing the legend and a possibility to show or hide the grid.

Conclusion
A simulation model for analyzing vibrations of both static and dynamic unbalanced rotating bodies has been developed. It is based on principle of a Jeffcott rotor model characterized by 4 dynamic differential equations describing 4 degrees of freedom in two perpendicular axes. The angular velocity ω presents input for the model and movement of the center of gravity in the plane perpendicular to the axis of rotation presents an output from the model. The model has been verified by comparing simulation results with those reported in the references.
All calculations and simulations were performed in the MATLAB/Simulink environment and the simulation model was involved into the GUI. The MATLAB GUIDE (GUI Development Environment) offers a comfortable work with the model: it enables simply to change parameters of the mechanical system, to observe behavior of unbalanced rotating body and finallyto solve its balancing by calculation of balancing masses and finding their proper position for their fixing. The solution is interactive and enables user to perform repetitive experiments and to find optimal balancing of the unbalanced body based on required class G of balancing quality. As the outputs from simulation show, vibrations of the rotating body were considerably decreased by adding the balancing masses on the place determined by the program. For a deeper analysis of the system, the GUI also displays logarithmic frequency characteristics. Further we observed influence of bending stiffness and damping to steady running of the rotating body as dependent on the rotating speed. In case of increasing the speed, the rotations of the rotor reaches instability region and increased vibrations of longitudinal and transverse occurs there. They are caused by the fact the rotor speed approaches to the resonance frequency. The GUI was verified by a series of experiments and comparing the obtained results with those published in the references. A significant advantage of developed GUI dwells in the possibility of detailed studying of rotating body vibration problems. The graphical interface can be used also in case of other shapes of bodies by simple exchange of the simulation model preserving the inputs, outputs and variables notation in the simulation scheme. The GUI is extremely suitable for students in Bc., MSc., and PhD. courses in mechanical and mechatronic engineering studying appropriate subjects dealing with rotating bodies.
Further research will cover investigation of vibration of rotating bodies with other cross section than circular, investigation of influence of non-homogenous rotating magnetic field in case of rotors of electrical motors to vibrations of the rotor as well as practical measurements on the laboratory set-up.