Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Agenda
• Model Based Design w/ MATLAB and Simulink
– Overcome today’s design challenges
– Numeric computation
– Data analysis and visualization
– The industry-standard,
high-level programming language
for algorithm development
– Toolboxes for signal and image processing,
statistics, optimization, symbolic math, and
other areas
– Foundation of the
MathWorks product family
Core MathWorks Products
Requirements and
Specifications
Design
Environment models
Environment models
System Behavior models
Physical
Components models Implementation
Executable models
- Unambiguous, Algorithms
“one truth”
- Links to textual Algorithms
Test and
requirements Simulation
- Reduces need for
Verification
physical prototypes
- Enables systematic
“what-if” analysis
C, C++ VHDL, Verilog
MCU DSP
Automatic code
generation
- Reduces time, effort
- Enables code reuse
- Minimizes coding errors
Today’s Design Challenges
• Increasing complexity
– Standardization
– Security
• Intensified Competition
– Time-to-market pressure
– Cut product costs
– Preserve product quality
C/ASM
Code Compile
& Link Down
load TI C2000
Texas Instruments
Code Composer Studio™ DSP
Environment Debug
STEP 1 - Simulate controller and electro-mechanical plant
models to verify specification and optimize system
performance.
Models
Algorithm Processor
Specification Specifications
Real-Time
Workshop Target for
Embedded TI C2000
Code Coder
Algorithm
Implementation
Test Algorithm
Verifications
Signals
PIL
Interface
Link
for CCS
CCS Test Bench
Algorithm
Code
Why Verify the Generated Code?
Some sources of unexpected differences between PC simulation
and target executed code
• This approach enables testing of the same object code that will be
used in production.
Models
Algorithm Processor
Specification Specifications
Real-Time
Workshop Target for
Embedded TI C2000
Code – Flash Coder
(Standalone)
Algorithm
Implementation
Models
Algorithm Processor
Specification Specifications
Real-Time
Workshop
Embedded
Code – Flash Coder
(Standalone)
Algorithm
Implementation
Processor-in-the-loop
Hardware-in-the-loop
Software-in-the-loop
Summary and Next Steps
Model-Based Design Benefits
Model-Based Design Innovation
• Executable specification • Rapid design iterations
• “What-if” studies
• Design with simulation • Unique features and differentiators
• Implementation through code
generation Quality
• Reduce design errors
• Continuous test and • Minimize hand coding errors
verification • Improve communication internally and
externally
Cost
• Reduce expensive physical prototypes
• Reduce re-work
• Reduce testing
Time-to-market
• Get it right the first time
Addressing Embedded Programming
Challenges
Challenge Response
Target Function Libraries and
Processor specific code
Legacy Code Tool
Generate code for deployment to
Production Code Deployment
Flash
Ability to assign data and functions
Execution speed from Flash
to be copied from Flash to RAM
Verification of Code Execution Processor-in-the-Loop testing
Capture and act upon hardware
Asynchronous Scheduling
and software interrupts
From Models to Hardware –
Design and Implementation of a Permanent Magnet
Synchronous Motor Controller
F2808
PMSM
eZdsp
Knob
Power
Supply
Summary and Next Steps
Next Steps
1. Get more information
– www.mathworks.com/applications/controldesign/
– Watch a free webinar: www.mathworks.com/webinars
2. Contact your MathWorks Sales rep
– Arrange a customer visit with MathWorks’ engineers to help your
company safe money and time to market
Thank You !
antonin.ancelle@mathworks.com
Tutorial (1) - Installation
• Install Matab/Simulink – R2009A with adhoc
toolbox
• Install Code Composer Studio – CCS 3.3
• Install emulator drivers (check emulator supplier
web site)
• Type F28335\ in the navigator help to review all possible demos, all
using Target Support Package TC2
– Asynchronous Scheduling
– Using the I2C Bus to Access a Connected EEPROM
– SPI-Based Control of PWM Duty Cycle
– HIL Verification of IIR Filter via SCI
– ADC-PWM Synchronization via ADC Interrupt
– Permanent Magnet Synchronous Motor Field-Oriented Control
– CAN-Based Control of PWM Duty Cycle
– Real-Time Data Exchange via RTDX
– CAN Calibration Protocol and External Mode
– Motor Control
Documentation
search result
Demo
description
Demo search result
Tutorial (3) – Model selection
• "ADC-PWM Subsystem“ Demo:
– consists of an ADC driving the duty cycle input port of the PWM.
– PWM is configured to trigger ADC start of conversion (SOC).
• Select one of the available models
– Spectrum Digital F2812 eZdsp c2812adcpwmasynctest.mdl
– Spectrum Digital F2808 eZdsp c2808adcpwmasynctest.mdl
– Spectrum Digital F28335 eZdsp c28335adcpwmasynctest.mdl
Appendix A: