Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller)...

10
1 © 2014 The MathWorks, Inc. Introduction to Simulink and Stateflow By Nic Ross

Transcript of Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller)...

Page 1: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

1© 2014 The MathWorks, Inc.

Introduction to Simulink and Stateflow

By Nic Ross

Page 2: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

2

Key message

Simulink and Stateflow provide:

A flexible environment for modelling real systems...

in a modular fashion...

that allows rapid development.

Page 3: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

3

Agenda

Model a DC motor

Design a PID controller

Add supervisory logic

Page 4: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

4

R

L

K

J,b

ω

i

V

dt

diLRiKV

dt

dJbiKT

dtRiKVL

i )(1

dtbiKTJ

)(1

Control of a DC Motor

Page 5: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

5

What Have We Seen?

R

L

K

J,b

ω

i

V

dtRiKVL

i )(1

dtbiKTJ

)(1

Page 6: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

6

What Have We Seen?

Rapid prototyping

Modular architecture

Page 7: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

7

What Have We Seen?

Page 8: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

8

Key messages

1 Flexible modelling environment

Modular, hierarchical design2

3 Allows rapid development

Page 9: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

9

Where to from here?

Automatic code generationPhysical modelling

Verification and validation

Page 10: Introduction to Simulink and Stateflow - MathWorks Tuner (dc motor control/Discrete PID Controller) - Step Plot. Slower Reference tracking U pdate Block PID TUNER Plant: Plant Inspect

10

Any Questions?

?