Teaching with MATLAB -

chemistoddIA et Robotique

6 nov. 2013 (il y a 4 années et 1 mois)

67 vue(s)

©
20
10

The MathWorks, Inc.

Teaching with MATLAB
-

Tips and Tricks

David Chen, PhD

Principal Application Engineer

David.chen@mathworks.cn

Agenda


Challenges of Teaching


Setup


Visualization


Interactive Coding


Publishing (Handing In Assignments)


Building Simple Models


Motivating with Complex Models


Conclusion



Challenges of Teaching

What We Mean by “MATLAB for Teaching”


Educators use MATLAB
®

to


Illustrate lectures


Design homework problems


Set up laboratory exercises


Cleve Moler


MATLAB
®

inventor

Students use MATLAB to


Explore and understand principles


Practice exercises, projects


Acquire skills for the job market

Introduction to MATLAB


The leading environment for

technical computing



The
de facto
industry
-
standard,

high
-
level programming language

for algorithm development


Numeric computation


Data analysis and visualization


Toolboxes for control design, signal

and image processing, statistics,

optimization, symbolic math, and

other areas

Agenda


Challenges of Teaching


Setup


Visualization


Interactive Coding


Publishing (Handing In Assignments)


Building Simple Models


Motivating with Complex Models


Conclusion



Agenda


Challenges of Teaching


Setup


Visualization


Interactive Coding


Publishing (Handing In Assignments)


Building Simple Models


Motivating with Complex Models


Conclusion



Chalkboard Art


http://www.chemistryland.com/ChemEdArticle/PowerPoint.html

Projector Art


http://fourier.eng.hmc.edu/e101/lectures/Bode/node8.html

Interactive Visualization


Interactive Visualization


Agenda


Challenges of Teaching


Setup


Visualization


Interactive Coding


Publishing (Handing In Assignments)


Building Simple Models


Motivating with Complex Models


Conclusion



Modeling a Whal Call

Sum of harmonics of a
fundamental frequency

Amplitude modulated:

)
(
)
(
)
(
0
t
y
t
A
t
y



n
t
nf
t
y
)
π
2
sin(
)
(
0
0
e

)
2
sin(
)
(
0
t
f
e
A
t
A
m
Bt
π


Decaying oscillation

Agenda


Challenges of Teaching


Setup


Visualization


Interactive Coding


Publishing (Handing In Assignments)


Building Simple Models


Motivating with Complex Models


Conclusion


Agenda


Challenges of Teaching


Setup


Visualization


Interactive Coding


Publishing (Handing In Assignments)


Building Simple Models


Motivating with Complex Models


Conclusion



Mass


Spring


Damping System


Introduction to Symbolic
Math Toolbox

Sharing

From MATLAB:

From notebook interface:


Perform symbolic computations using
familiar MATLAB syntax


Conveniently manage & document symbolic
computations


Math notation, embedded text & graphics


Access complete MuPAD language


15+ libraries of symbolic math functions

Introduction to
Simulink


The leading environment for modeling,

simulating, and implementing dynamic

and embedded systems



Foundation for Model
-
Based Design,

including physical
-
domain modeling,

automatic code generation, and

verification and validation


Open architecture for integrating models

from other tools


Applications in controls, signal processing,

communications, and other system

engineering areas

Introduction to
SimMechanics


Extension of Simscape for

acausal modeling of three
-
dimensional mechanical systems


Eases process of modeling
mechanical systems


Does not require deriving and
programming the equations of

motion for the system


Used by mechanical engineers,
system engineers, and control
engineers to develop plant
models and test control systems

y

θ

1

x

z

l

Agenda


Challenges of Teaching


Setup


Visualization


Interactive Coding


Publishing (Handing In Assignments)


Building Simple Models


Motivating with Complex Models


Conclusion



21

Grid

Wind Turbine Model


Yaw

Generator

Speed

Tower

Geartrain

Generator

Primary Goal

Spin at or near

operating speed

Operating

Point

Pitch

Rotor

Speed

Blades

Hub

Lift, Drag

Wind

Nacelle

22

Key
Tasks


Modeling the entire system at

the system level enables students

to produce optimized designs



The ability to easily adjust

the level of model fidelity

enables efficient development




Automatically documenting

tests can speed up design

iterations and provide necessary

proof of system performance


Mechanical


Hydraulic


Electrical

Control


Supervisory

Logic


Aero
-

dynamics

Park

Spin

Lift

Drag

Wind

Actuator

(
Ideal
)

Inputs

System

(
Include
)

Actuator

(
Realistic
)

System

(
Ignore
)

23

Key Tools


Pitch Actuation and Control


Blades and pitch linkage


(SimMechanics)


Pitch actuation and control (SimHydraulics, Simscape)


Yaw Actuation and Control


Yaw actuation



(
SimDriveline
, SimElectronics)


Power Generation


Generator



(SimPowerSystems)


Wind Loads




(Embedded MATLAB)


Supervisory Control



(
Stateflow
)


Code Generation



(Real Time Workshop)


Documenting Results



(
Simulink

Report Generator)



24

Introduction to Simscape


Extension of Simulink designed

for
acausal

modeling of multi
-
domain physical systems


Eases process of modeling
physical systems


Build models that reflect structure

of physical system


Leverage MATLAB to create
reusable models


Used by system engineers and
control engineers to build a
model representing the physical
structure of the system

V+

V
-

MATLAB, Simulink

SimPowerSystems

Simscape

SimMechanics

SimDriveline

SimHydraulics

SimElectronics

Agenda


Challenges of Teaching


Setup


Visualization


Interactive Coding


Publishing (Handing In Assignments)


Building Simple Models


Motivating with Complex Models


Conclusion



Solving Some Challenges of Teaching


Visualization


Interactivity


Publishing


Simulation


System Modeling


Project
-
Based Learning


27

Q&A:
Teaching with MATLAB
-

Tips
and Tricks


David Chen

The MathWorks