19
2 © 2015 The MathWorks, Inc. Designing Mechatronic Systems Jean-Baptiste Lanfrey Technical Manager MathWorks Australia

Designing Mechatronic Systems - MathWorks

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Designing Mechatronic Systems - MathWorks

2© 2015 The MathWorks, Inc.

Designing Mechatronic

Systems

Jean-Baptiste Lanfrey

Technical Manager

MathWorksAustralia

Page 2: Designing Mechatronic Systems - MathWorks

4

Key Points

▪ Create intuitive models that all

teams can share

▪ Simulate system in one

environment to

– Perform tradeoff studies

– Optimise system performance

▪ Test without prototypes

Requirements

1. Mechanical System

Page 3: Designing Mechatronic Systems - MathWorks

5

Agenda

▪ Example: Flight actuation system

– Benefits of Model-Based Design

▪ Actuator design

– Modeling the mechanical system

– Determining actuator requirements

– Testing Electrical and Hydraulic Designs

▪ Optimising System-Level Design

▪ HIL testing

Page 4: Designing Mechatronic Systems - MathWorks

6

▪ System

▪ Simulation goals

1. Determine requirements for actuation system

2. Test actuator designs

3. Optimise system performance

4. Run simulation on real-time hardware for HIL tests

Example: Aileron Actuation System

ControllerDesired Angle

Measured

Angle

Actuator Force

Page 5: Designing Mechatronic Systems - MathWorks

7

DESIGN

Traditional Design Process

INTEGRATION AND TEST

Emb. Code

IMPLEMENTATION

REQUIREMENTSCannot validate design

against requirements

Manual coding is slow,

buggy, and hard to verify

Can only find problems

using hardware prototypes

Control ElectricalMechanical

Cannot test or optimise

fully integrated design

Page 6: Designing Mechatronic Systems - MathWorks

8

DESIGN

Model-Based Design

INTEGRATION AND TESTINTEGRATION AND TEST

IMPLEMENTATION

Emb. Code

IMPLEMENTATION

HIL System

REQUIREMENTSCannot validate design

against requirements

Manual coding is slow,

buggy, and hard to verify

Can only find problems

using hardware prototypes

Save time by automatically

generating embedded code

Detect errors right away

with continuous verification

SYSTEM LEVEL DESIGN

Control ElectricalMechanical

Cannot test or optimize

fully integrated design

Optimise design in a single

simulation environment

TE

ST

& V

ER

IFIC

AT

ION

Lower costs

using HIL tests

Page 7: Designing Mechatronic Systems - MathWorks

9

Agenda

▪ Example: Flight actuation system

– Benefits of Model-Based Design

▪ Actuator design

– Modeling the mechanical system

– Determining actuator requirements

– Testing Electrical and Hydraulic Designs

▪ Optimising System-Level Design

▪ HIL testing

Page 8: Designing Mechatronic Systems - MathWorks

10

Modeling the Mechanical System

Problem: Model the mechanical

system within Simulink

Solution: Import the mechanical model

from CAD into Simscape Multibody

System:

θAileron

CAD

Simscape

Joints

Page 9: Designing Mechatronic Systems - MathWorks

11

Page 10: Designing Mechatronic Systems - MathWorks

12

Determining Actuator Requirements

Problem: Determine the requirements

for an aircraft aileron actuator

Solution: Use Simscape Multibody to

model the aileron and Simscape to model

an ideal actuator

Model:

θAileron

Page 11: Designing Mechatronic Systems - MathWorks

13

Testing Electrical and Hydraulic Designs

Problem: Test different actuator designs

in the system

Solution: Use Simscape Fluids and

Simscape Electronics to model the actuators,

and variant subsystems to test them

Model:

Page 12: Designing Mechatronic Systems - MathWorks

14

Agenda

▪ Example: Flight actuation system

– Benefits of Model-Based Design

▪ Actuator design

– Modeling the mechanical system

– Determining actuator requirements

– Testing Electrical and Hydraulic Designs

▪ Optimising System-Level Design

▪ HIL testing

Page 13: Designing Mechatronic Systems - MathWorks

15

Optimising System Performance

Problem: Optimise the speed

controller to meet system requirements

Solution: Tune controller parameters

with Simulink Design Optimization

Model:

ω

Angle

Current

Current

ControlSpeed

Control

i

ω

Speed

Control

Kp Ki

0.3 0.3

Kp Ki

0.62 0.29

Page 14: Designing Mechatronic Systems - MathWorks

16

Page 15: Designing Mechatronic Systems - MathWorks

17

Agenda

▪ Example: Flight actuation system

– Benefits of Model-Based Design

▪ Actuator design

– Modeling the mechanical system

– Determining actuator requirements

– Testing Electrical and Hydraulic Designs

▪ Optimising System-Level Design

▪ HIL testing

Page 16: Designing Mechatronic Systems - MathWorks

18

Configuring an Electrical Actuator

for HIL Testing

Problem: Configure solvers to

minimize computations and convert

to C code for real-time simulation

Solution: Use Simscape local solvers

on stiff physical networks and

Simulink Coder™ to generate C code

Model:

Tune

Parameter

Real-Time

Hardware

Generate

C Code

Configure

Model

Variable step, implicit solver (Reference)

Numerically

Stiff System

Controller

Page 17: Designing Mechatronic Systems - MathWorks

19

Page 18: Designing Mechatronic Systems - MathWorks

20

Key Points

▪ Create intuitive models that all

teams can share

▪ Simulate system in one

environment to

– Perform tradeoff studies

– Optimise system performance

▪ Test without prototypes

Requirements

1. Mechanical System

Page 19: Designing Mechatronic Systems - MathWorks

21© 2015 The MathWorks, Inc.