153882492-nx-motion-matlab-simulink.pdf

17
Page 1 Copyright © Siemens PLM Software Inc. 2008. All rights reserved. Siemens PLM Software NX 6 Motion Control Simulation Co-Simulation with MATLAB®, Simulink® Using advanced software with simulation capabilities like NX Motion, the number of iterations can be decreased by building virtual prototypes and performing a complete dynamic analysis on a virtual machine. Any 3D CAD model can be used as a basis for a mechatronic analysis with NX. Starting with NX6 it is possible to execute a controller integrated simulation in the Motion environment, which actually is the key feature for a comprehensive Mechatronic analysis. The virtual machine is now not only mechanics but is equipped with the motion intelligence, drives and controllers just like the real system. This brings up the possibility to do a deep analysis on a virtual machine and see what performance can be reached and how much a control system can improve this performance. The controller can be tuned for the virtual machine which in itself decreases the time to setup the real machine later. Through integrated simulation using NX6 and Matlab/Simulink, it is also possible to perform a system identification and a modal analysis (first steps of any Mechatronic analysis). This procedure is very common in controller tuning theory and can be used in Matlab to perform controller analysis.

Upload: pedro

Post on 09-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 1

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

NX 6 Motion Control SimulationCo-Simulation with MATLAB®, Simulink®

Using advanced software with simulation capabilities like NX Motion, the number of iterations can

be decreased by building virtual prototypes and performing a complete dynamic analysis on a virtual

machine. Any 3D CAD model can be used as a basis for a mechatronic analysis with NX.

Starting with NX6 it is possible to execute a controller integrated simulation in the Motion

environment, which actually is the key feature for a comprehensive Mechatronic analysis. The virtual

machine is now not only mechanics but is equipped with the motion intelligence, drives and controllers just

like the real system. This brings up the possibility to do a deep analysis on a virtual machine and see what

performance can be reached and how much a control system can improve this performance. The controller

can be tuned for the virtual machine which in itself decreases the time to setup the real machine later.

Through integrated simulation using NX6 and Matlab/Simulink, it is also possible to perform a

system identification and a modal analysis (first steps of any Mechatronic analysis). This procedure is very

common in controller tuning theory and can be used in Matlab to perform controller analysis.

Page 2: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 2

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

NX Motion Control Simulation

Mechanism simulation allowing closed-loop control using Simulink(cosimulation)

Highlights:Cosimulation of control systems coupled with multibody dynamics

Embedded electric motor models

CAD and PLM integrated solution ensuring faster product development

Works with NX Advanced Simulation for follow-on structural analysis

Particularly suited for collaboration between mechanical and control engineers

Platforms: Windows

SIEMENS products required : NX6 with Motion SimulationMathWorks products required: MATLAB, Simulink

Page 3: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 3

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

Industries and Tasks:

� Aerospace and Defense � Automotive � Control Design � Data Modeling, Analysis, Visualization � Electronics � Industrial Automation and Machinery � Mechanics and Compression Systems � Simulation

Page 4: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 4

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

Description

SIEMENS leading global provider of product lifecycle management (PLM) software

and services. It enables cosimulation of controller designs based on Simulink that have

multibody dynamics models in NX. Using this capability, mechanical engineers and

designers can collaborate more effectively with their counterparts developing controller

designs to find and fix integration issues and to optimize product performance. With NX,

users leverage a common environment for performing design, motion simulation, and

advanced structural analysis, enabling data and model sharing for greater team productivity.

In a typical workflow, a mechanical engineer or designer models the mechanical plant

in NX Motion while a controls engineer builds a model of the controller in Simulink. Control

signals provide force, torque, or velocity inputs, and NX Motion outputs are fed back to the

controller. You then specify plant input functions and sensor-based plant outputs within the

NX environment. To integrate the two models together, you can drag and drop a plant

representation into a Simulink block diagram. Once a simulation is complete, you can review

the results using powerful postprocessing and animation capabilities within NX.

Page 5: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 5

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

NX 6 Motion Control SimulationCo-Simulation with MATLAB®, Simulink®

Page 6: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 6

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

About the Simulink control system file

You create your control system block diagram in a Simulink .mdl file. This file represents the actions of the control system and should contain an empty

space for the Motion Plant block (which represents the mechanical system).

In the following example control system, represents the space left in the diagram for the Motion Plant block.

As shown in the following animation, during the Control System Integration step, the software generates the Motion Plant. You drag it into the empty

space in your diagram, connecting it between the inputs and outputs of the control system.

Page 7: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 7

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

Continued…

Motion Plant block

The Motion Plant block contains the mechanism output data from NX Motion Simulation and packages the controls output from Simulink. The RecurDyn

solver creates the plant block automatically from your plant input and plant output objects. You can see the plant block structure when you run the control

system integration by double-clicking the Motion Plant block (shown in the previous animation). The pieces of the plant block are described below.

Motion Plant block structure

• — Plant Inputs (containers for the mechanism state data, such as displacements, velocities, and accelerations, defined in NX)

• — Mux object (combines multiple input signals into vector signals)

• — Information for writing data from RecurDyn to MATLAB

• — Timestep/sampling time information

• — Information for writing data from MATLAB to RecurDyn

• — Demux object (extracts and outputs vector signals to scalar)

• — Plant Outputs (containers for the inputs to the mechanism from the control system, defined in NX)

Page 8: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 8

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

Continued…

Typically, there is no need to modify anything in the Motion Plant block. However, if you have multiple plant inputs and/or plant outputs, you may need to

open the Motion Plant block to determine which input and output arrows to connect to the control system signals—the input and output arrows are not

labeled, as shown in the following picture.

In NX, you define the contents of the Motion Plant by creating the Plant Output and Plant Input motion objects in a Control/Dynamics solution.

Template fileThe template file is the .mdl file you specify in the Template Simulink Model File box in the Solution dialog box. When you run the Control System Integration step, the software makes a copy of your template Simulink control system file and places it in the folder where your Motion Simulation file

resides. The name of the simulation is appended to the copy of the control system file name and the copy is saved in the folder that contains your Motion

Simulation file. This copy is then overwritten on subsequent runs of the Control System Integration step.

When you make changes to your control system block diagram, always change the template file and not the copy.

Page 9: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 9

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

NX Motion Control SimulationReleased at NX 6.0

Objectives

� Interaction between control devices

and mechanical systems

� Motion simulation will embed signal

logic and electronic components

Users Benefits

� Electro-mechanical products simulation:

� Optimize control system design a.k.a.

sensor settings, input gain, along with

mechanical mass/Inertia...

� Unified environment:

� Same user interface thus better team

work

� Share data, revise, configure

Mech

atro

nic

s&

Co

ntro

ls

Page 10: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 10

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

Co-Simulation w/ Simulink® (from MathWorks)

Control with the most popular Math Software

� Control loop system in Simulink

� Mechanical Plant in NX Motion

� Controls Torque, Force, Velocity…

� Monitors any Motion output

� Sampling time

� Post-Process in NX

PMDC motor and voltage signal

Mechatronics and Mechanical Design

� Fully integrated modeling

� Open or closed loop signal

� Customizable and re-usable

� Post-Process current, torque, velocity…

Mech

atro

nic

s&

Co

ntro

ls

NX 6 Motion Control SimulationMechatronics & & Control Systems

PMDC: Permanent Magnetic Direct Current

Page 11: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 11

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

NX 6 Motion Control SimulationCo-Simulation with MATLAB®, Simulink®

Mech

atro

nic

s&

Co

ntro

ls

Control SystemSimulink

Mechanical system“Plant” model in NX

Torque Input

Target

Mouse

Sensor

Page 12: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 12

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

NX 6 Motion Control SimulationCo-Simulation with MATLAB®, Simulink®

Mech

atro

nic

s&

Co

ntro

ls

Page 13: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 13

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

NX 6 Motion Control SimulationCo-Simulation with MATLAB®, Simulink®

NX 6 MotionControl Solution

NX 6 MotionControl Solution

Plant Output: SensorsPlant Output: Sensors

Plant Input: Load, DriverPlant Input: Load, Driver

MATLAB, SimulinkControl system

MATLAB, SimulinkControl system

Control Solution type

� Control system file

� Control sampling time

Mechanical system control input

� Load control: torque, force

� Driver control: velocity, acceleration

Mechanical system control output

� Sensors - absolute or relative

� Functions - complex operations

NX Interface with Simulink

� Integration within the control system

� Run co-simulation

Solve and Post-Process

Compare different control systems

and validate using Animation, XY Plot,

Clearance, Trace…

Mech

atro

nic

s&

Co

ntro

ls

Page 14: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 14

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

NX 6 Motion - Control SystemsIntegrated PMDC motors and signal input

Mech

atro

nic

s&

Co

ntro

ls

Page 15: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 15

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

NX 6 Motion Control Simulation Integrated PMDC motors and signal input

Electrical Motor Object

� Input parameters as electrical properties

� Re-usable via PLMXML

� Input voltage as a signal

Signal Chart

� Input for motor as ratio of nominal voltage

(more likely to be 0, +1 or -1)

� Open loop – time dependant only

� Uses Function Manager: afu, preview…

� Closed loop

� Sequence of events following sensor

triggers

� Allow timer (countdown)

� Includes time dependant (absolute)

PMDC: Permanent Magnetic Direct Current

Mech

atro

nic

s&

Co

ntro

ls

Page 16: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 16

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

Digital Lifecycle Simulation

Thanks

Further Enquiry contact : [email protected]: 65-94522615

Page 17: 153882492-NX-Motion-Matlab-Simulink.pdf

Page 17

Copyright © Siemens PLM Software Inc. 2008. All rights reserved.

Siemens PLM Software

Our vision – Setting the pace

A world of proven talent,

delivering breakthrough innovations,

giving our customers a unique competitive edge,

enabling societies to master their most vital challenges

and creating sustainable value.