Beruflich Dokumente
Kultur Dokumente
White Paper
Companies today face a growing need for mechatronics i.e., integration of mechanical, electrical and software components as well as systems into a product. Mechatronic simulation can reveal potential problems that may arise when these systems are integrated, allowing multiple iterations on design alternatives and a faster, more efficient development process. This paper describes how NX Motion software can be used to perform controller integrated simulations for complete mechatronic machine analysis.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
Contents
Introduction........................................................................................ 3
Highlights of NX 6 Motion simulation ................................................. 4
Modeling of mechanics in NX Motion ................................................. 5
Co-simulation in NX 6 Motion ............................................................. 7
Controller integrated simulation......................................................... 8
Modal analysis and system identification procedure .......................... 9
Tuning a speed and position controller ............................................. 11
Mechanical design optimization ....................................................... 13
Material change ............................................................................13
Dimension change.........................................................................14
Conclusion and perspective .............................................................. 15
References ........................................................................................ 16
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
Introduction
There are many unknowns during the design phase of a machine development cycle. Will the machine meet the requirements? Will it achieve the productivity and precision expected by the end-user? Unfortunately many of the questions can be first answered only when the prototype of the new machine is built. The efforts to develop a prototype which needs changes and design iterations are tremendous compared with the time needed to build a simulation. The question is how accurately can you predict the dynamic behavior of the product using only a simulation model? Is simulation less costly than building and fixing afterwards? What is the probability that, once the machine is optimized, the first prototype will be the final machine? There is no universally true answer. One thing is sure though: simulation can decrease the time-to-market enormously as well as save money in the development phase. Today software companies offer tools which make it easy to build realistic simulations of a motion-based product. One of these tools is NX Motion software, part of the NX suite of Siemens PLM Software. NX Motion simulation has the ability to offer fast and realistic results for the dynamic behavior of a machine modeled in almost any 3D CAD software. With the release of NX 6 the user can integrate the mechanical simulations with the controls and drives by using any Matlab/Simulink control structure in a co-simulation environment. Matlab and Simulink are developed by The Mathworks, a leading provider of software for technical computing and model-based design. Thus, the complete machine dynamics is considered for dynamic analysis and, with that, the machine performance can be easily predicted and analyzed. To reach the maximum performance with a machine, the control system has to be designed and tuned specifically for this machine.
Figure 1: The major cost is defined in the development phase. The highest gain for savings in the final machine costs is during the development phase. Simulations can help to identify the best machine concept faster.
In order to use control optimization theory, the plant dynamics should be first analyzed and converted into a useful model for further solving complex differential equations. The analysis requires the extraction of all important modes and mode-shapes of the mechanical system. This permits a state-space formulation of the system between a vector of torque/force inputs (one for each actuator) and a vector of several speed/position outputs, measured at different points in the system. Once the input-output dynamic representation of the mechanics is completed, it becomes the plant element to be used further for controller optimization in the next steps of the mechatronic design process. A good mechatronic simulation reveals issues in the product early in the development process, allows multiple iterations on design alternatives and helps bring a product faster to the market with less development cost, higher precision and increased productivity. The purpose of this paper is to describe how NX Motion can perform controller integrated simulations for complete mechatronic machine analysis.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
controller system
With NX, only one software for modeling, multi-
To prevent a development disaster, a mechatronic design approach must be used to verify implementation concepts very early in the design phase.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
For a reliable simulation result spanning the bandwidth of the motion profile, the low stiffness values responsible for producing the lower mechanical resonances are more important than the high stiffness connections.
To illustrate the mechatronic design and simulation process, a real machine example is further presented. This machine is a mechatronic demo unit (Figure 2), which was built by our group for demonstration purposes. It mainly represents a two-mass oscillator built around two motors (one which acts as a pure inertial load) connected axially with a flexible aluminum rod. CAD models are pure geometry. They show an unconnected, surfaces-and-lines representation of an assembly. For a dynamic simulation, elements of the design must become bodies with a precise mass and/or inertia, a certain degree of flexibility (when necessary) and connected by elements that permit movement along the rigid-body designed direction of motion and suppress the appropriate degrees of freedom with the correct rigidity and damping. In dynamic simulations, a successful matching of the simulation to reality is the result of how accurately the following three sets of parameters are defined:
Mass/inertia of links (bodies) Stiffness/damping/friction of the connections
Define links (bodies) of the motion mechanism. Define joints (bearings, mountings, etc.) of the motion mechanisms and degrees of freedom. Set up connections between the links with generalized stiffness objects called bushings. Identify flexibilities (flexible bodies) and split them into smaller rigid bodies to be connected through a bushing element. Include parts (bodies) which are not coming with the 3D model, but may be important for the simulation (e.g. the encoder system which is connected to the motor implicitly).
3.
4.
5.
between bodies
Flexibility of the bodies that cannot be
considered rigid The mass and/or inertia of bodies are inherited from the 3D model. If the correct material properties are set by designers, mass information is transmitted to
Figure 3: Simulation model of the mechatronic demo unit.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
The process is illustrated in the following model. The only degree of freedom (rotation) is handled by two revolute joints which are connected between the rotor and stator on both motors. The suppressed degrees of freedom are made of bushing elements with a defined rotational and Cartesian stiffness. Obviously, only the rotational stiffness matters most. If the geometry of the model is correct and the right material is chosen, NX will calculate the mass and inertias by itself. However, in NX Motion the user can define for each link the mass and inertia, overwriting the calculated data from the geometry. The electric motor presents a special case. Due to its complex construction with multiple materials, the rotor inertia cannot be calculated automatically, using material density data. Therefore, the motor inertia must be entered manually, using the values offered by the manufacturer in its catalogue. In Figure 4, the inertia and stiffness values for the bodies considered in our model are presented. Our observations showed that the first approximation of the system with an automatic calculation of inertias and entering rough stiffness values yields very good results for the low eigenfrequencies of the system, which are critical for our system dynamic analysis. Hence a conclusion can be drawn: the original CAD data, containing just the geometry, would give good results in a complete mechatronic analysis as a first approximation model. This first approximation takes a minimal time, thus the system optimization can be run shortly after finishing the 3D model draft.
The original CAD data, containing just the geometry, would give good results in a complete mechatronic analysis as a first approximation model.
Inertia [106kgm2] 30 820 5100 12 12 5400 850
Figure 4: Inertia and stiffness values for the mechatronic demo setup (w/o shaft flexibility).
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
Co-simulation in NX 6 Motion
The co-simulation function of NX 6 Motion makes it possible to combine the mechanical plant model with the drive and controller model in a mechatronic simulation. With the ability to integrate the controllers into the mechanical NX model, you can optimize the dynamics of the system. To run a controller integrated simulation the following steps are required:
1.
Define the mechanical model as described in the section above. Define the controller scheme file (Simulink file .mdl) in the NX solver parameter dialog box. Define sampling time for the controller in NX. Run the control integration: Drag-and-drop the NX Motion plant block in Simulink into the controller scheme, connect the inputs and outputs and save the file (Figure 5). Solve the co-simulation.
2.
3. 4.
5.
The results of the simulation can be displayed in NX 6 or can be saved during the co-simulation to a Matlab file (.mat) as well. To save the signals for Matlab is a great benefit for the user, because all Matlab functions for controller tuning or signal analysis can be used later, outside the co-simulation environment, without constantly switching between Matlab and NX. This functionality also allows a total modal analysis of the mechanical NX simulation model as described in the next section.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
To simulate a system, an input-output model must be identified and implemented in a mathematical form. Some identification methods use the time domain input and output data of the system; other methods use the frequency domain input and output data to generate frequency response function representations of the system. The latter process is also known as modal analysis and offers a representation of the dynamic characteristics of a system, its eigenfrequencies and eigenshapes. Modal analysis is generally associated with modal testing. Modal testing is a process to determine the dynamic characteristics of an existing structure/system via measuring its frequency response function (FRF). To produce an FRF the system must be excited with an input signal that encompasses a sufficiently large frequency spectrum and measure the output for further correlation. There are many signal types which can be used for modal analysis, e.g. impulse, noise, chirp, sinus, PRBS, etc. A PRBS (Pseudo Random Binary Signal) is a random sequence of impulse functions and has a white noise-like characteristic which excites all frequencies. PRBS is
Integrate the NX Motion plant block into the Simulink template for system estimation. (Figure 6) Define an input signal and save it in the input1.mat file. Solve the co-simulation in NX Motion; the output.mat file will be created automatically. Estimate a state-space system from the frequency response function of the plant using the input and output data, where: MotorSpeed TFPlant = MotorTorque
2.
3.
4.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
10
The frequency response can be obtained also from the real system, using the embedded capabilities of Siemens drive systems. Figure 7 shows the real system FRF (blue) versus the simulation model (which is shown in Figure 3) FRF (green). As the simulation model matches very well the characteristics of the real machine, we conclude that it can be used for all further calculation. From the calculated FRF, using simple identification procedures available in Matlab, the system matrices (A, B, C and D) can be obtained for a complete state-space representation.
Figure 7: Bode diagram of the simulation model (green) and the real machine measurement (blue).
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
11
Figure 9: Simple position and speed control system in Simulink with the NX Motion plant block.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
12
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
13
Through the higher eigenfrequency we can increase the Kv gain of the controller and hence increase the performance of the system. New Kv = 48 S
-1
Material change
A material change will affect the both the inertia and stiffness of the rod. NX does the inertia calculation automatically. The rod stiffness, however, with the new material conditions needs to be recalculated and manually updated. The stiffness of a cylindrical rod is proportional to the shear modulus of the material. Between the shear modulus of aluminum and iron is a factor of 2.987 which we can use to recalculate the stiffness. Now we can look at the influence of the material to the first eigenfrequency. Thus the eigenfrequency will increase by 46 percent.
Figure 17: Effect of the rod material to the ramp response performance.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
14
Dimension change
A change in dimensions will also affect the inertia and the stiffness of the rod. The inertia and the stiffness of a cylindrical rod are proportional to d4, where d is the diameter of the rod. This means that a rod with a double diameter will be 16 times stiffer than the original rod and having 16 times the inertia of the original rod. Now we can recalculate the stiffness and inertia for the rod and investigate the influence to the first eigenfrequency. We can also remodel the rod and let the calculation of the inertia be done by NX. With the diameter change the first eigenfrequency will double.
Figure 19: Effect of the double rod diameter to the ramp response performance.
Figure 18: Effect of the diameter of the rod to the first eigenfrequency.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
15
Figure 20: Functions and the derived capabilities of NX 6 in co-simulation with Matlab.
controller design and tuning. This gives the ability to perform the whole tuning process exclusively in Simulink, use Matlab functions for controller tuning and reduce dramatically simulation times, compared to the intrinsic co-simulation feature
Validation and visualization of the controlled
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
W h ite Pap er
2 8 Ju n e 2 0 1 0
16
References
1. H.Gro, J. Hamann, W. Wiegrtner: Elektrische Vorschubantriebe in der Automatisierungstechnik, Siemens AG, 2006 2. J. He, Z.-F. Fu: Modal Analysis, Butterworth-Heinemann, 2001 3. Lunze, Jan: Regelungstechnik 1, Springer-Lehrbuch, 6. Auflage 2007 4. Katayama, Tohru: Subspace Methods for System Identification, Springer-Verlag London, 2005 5. Matlab/Simulink R2007b documentation 6. NX 6.0 documentation
Authors Razvan Panaitescu and Mathias Oppelt, from Siemens Energy & Automation, work in the area of Mechatronic Support. Mechatronic Support is a technical consulting service which is offered to Siemens customers to optimize machine performance using controllers and drives from Siemens.
Issued by: Siemens PLM Software. 2010. Siemens Product Lifecycle Management Software Inc. All rights reserved.
www.siemens.com/plm
2010 Siemens Product Lifecycle Management Software Inc. All rights reserved. Siemens and the Siemens logo are registered trademarks of Siemens AG. D-Cubed, Femap, Geolus, GO PLM, I-deas, Insight, Jack, JT, NX, Parasolid, Solid Edge, Teamcenter, Tecnomatix and Velocity Series are trademarks or registered trademarks of Siemens Product Lifecycle Management Software Inc. or its subsidiaries in the United States and in other countries. All other logos, trademarks, registered trademarks or service marks used herein are the property of their respective holders. X3 14753 6/10 C