System

advertisement
David Chen, PhD
Principal Application Engineer
David.chen@mathworks.cn
© 2010 The MathWorks, Inc.
Teaching with MATLAB Tips and Tricks
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 Whale Call
Amplitude modulated: y(t )  A(t ) y 0 (t )
Decaying oscillation
A(t )  A0 e  Bt sin( 2 πf m t )
Sum of harmonics of a
fundamental frequency
y0 (t )   sin( 2πnf0t )
n
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
From MATLAB:
From notebook interface:
Sharing

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 threedimensional 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
x
z
θ1
l
Agenda








Challenges of Teaching
Setup
Visualization
Interactive Coding
Publishing (Handing In Assignments)
Building Simple Models
Motivating with Complex Models
Conclusion
Wind Turbine Model
Operating
Point
Pitch
Wind
Blades
Lift, Drag
Nacelle
Generator
Hub Geartrain
Rotor
Speed
Generator
Speed
Primary Goal
Spin at or near
operating speed
Yaw
Tower
Grid
21
Key Tasks
Control
Mechanical
Hydraulic



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
Electrical
Supervisory
Logic
Aerodynamics
Park
Spin
Drag
Lift
Wind
Inputs
Actuator
(Ideal)
System
(Include)
Actuator
(Realistic)
System
(Ignore)
Automatically documenting
tests can speed up design
iterations and provide necessary
proof of system performance
22
Key Tools

Pitch Actuation and Control
–
–

(SimMechanics)
(SimHydraulics, Simscape)
Yaw Actuation and Control
–

Blades and pitch linkage
Pitch actuation and control
Yaw actuation
(SimDriveline, SimElectronics)
Power Generation

Wind Loads
Supervisory Control

Code Generation
(SimPowerSystems)
(Embedded MATLAB)
(Stateflow)
(Real Time Workshop)

Documenting Results
(Simulink Report Generator)
–

Generator
23

–
–

Build models that reflect structure
of physical system
Leverage MATLAB to create
reusable models
SimHydraulics
SimDriveline
SimMechanics
Extension of Simulink designed
for acausal modeling of multidomain physical systems
Eases process of modeling
physical systems
SimElectronics

SimPowerSystems
Introduction to Simscape
Simscape
MATLAB, Simulink
V+
V-
Used by system engineers and
control engineers to build a
model representing the physical
structure of the system
24
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
Q&A: Teaching with MATLAB - Tips
and Tricks
David Chen
The MathWorks
27
Download