Teaching with MATLAB - Tips and Tricks
description
Transcript of Teaching with MATLAB - Tips and Tricks
© 2
010
The
Mat
hWor
ks, I
nc.
Teaching with MATLAB - Tips and Tricks
David Chen, PhDPrincipal Application [email protected]
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 fortechnical 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 tytAty
n
tnfty )π2sin()( 00
e
)2sin()( 0 tfeAtA mBt π
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 dynamicand embedded systems
– Foundation for Model-Based Design, including physical-domain modeling,automatic code generation, andverification and validation
– Open architecture for integrating modelsfrom other tools
– Applications in controls, signal processing,communications, and other systemengineering 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
xz 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
GeneratorSpeed
Tower
Geartrain GeneratorPrimary Goal
Spin at or near operating speed
OperatingPoint
Pitch
RotorSpeed
Blades
Hub
Lift, DragWind
Nacelle
22
Key Tasks
Modeling the entire system at the system level enables students to produce optimized designs
The ability to easily adjustthe level of model fidelityenables efficient development
Automatically documentingtests can speed up designiterations and provide necessaryproof of system performance
Mechanical
Hydraulic
Electrical
Control
SupervisoryLogic
Aero-dynamics
ParkSpin
LiftDrag
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
Sim
Pow
erSystem
sSimscape
Sim
Mechanics
Sim
Driveline
Sim
Hydraulics
Sim
Electronics
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 ChenThe MathWorks