Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Model-Based Design For Motor Control Development

3,443 views

Published on

Developing motor control applications using model-based design and automatic code generation. By Paul Crook, Analog Devices, Inc.

Published in: Technology
  • I'd advise you to use this service: ⇒ www.WritePaper.info ⇐ The price of your order will depend on the deadline and type of paper (e.g. bachelor, undergraduate etc). The more time you have before the deadline - the less price of the order you will have. Thus, this service offers high-quality essays at the optimal price.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ❤❤❤ http://bit.ly/36cXjBY ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ❤❤❤ http://bit.ly/36cXjBY ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Model-Based Design For Motor Control Development

  1. 1. The World Leader in High Performance Signal Processing Solutions Model-Based Design For Motor Control Development Paul Crook – Analog Devices
  2. 2. Topics  Developing motor control applications using modelbased design and automatic code generation Hardware platform  Model-Based Design overview  Modeling of motor control systems  Simulation and automatic code generation  Running generic C-code on embedded platform  When to use MBD and when to use “traditional” design methods  2
  3. 3. ADI Demo Platforms Motor Drive hardware  3 phase PM motor  PC with MATLAB®, Simulink®, and IAR Embedded Workbench  3
  4. 4. HW Platform 100V-250V AC input with PFC, 5A  Isolated current, position, voltage and diagnostic feedback  3-phase, 0.55kW, permanent magnet synchronous motor  4
  5. 5. ADSP-CM40x  Embedded Target  Key Points ARM CORTEX M4F  240MHz  Two 16-bit ADCs  380ns conversion time  SINC filter  384kB SRAM  2MB Flash  20 DMA channels  Peripherals for motor control  Communication interfaces  5
  6. 6. MODEL-BASED DESIGN 6
  7. 7. Why Model-Based Design? • • • • 7 Requirements Development System Simulation Automatic Code Generation Continuous Verification
  8. 8. The Traditional Design Process Requirements Phase Design Phase Realization Phase Testing Phase 8
  9. 9. Traditional Design of a Multi-Domain System Research & Requirements Hardware Software Mechanical Requirements Requirements Requirements Design Design Design Realization Realization Realization Testing Testing Testing Integration, Test & Certification 9
  10. 10. The Cost of a Traditional Design Process Source: ROI for IV&V, NASA 10
  11. 11. Model-Based Design RESEARCH • Model multi-domain systems REQUIREMENTS • Explore and optimize system behavior in floating point and fixed point DESIGN Environment Models Algorithms IMPLEMENTATION TEST & VERIFICATION Physical Components • Collaborate across teams and continents • Generate efficient code • Explore and optimize implementation tradeoffs C, C++ ARM • Automate regression testing • Detect design errors • Parameter tuning INTEGRATION 11 • Support certification and standards
  12. 12. Model-Based Design for Embedded System Development Executable models - Unambiguous -“One Truth” Executable Specifications Simulation - Reduces “real” prototypes - Iterative “what-if” analysis Design with Simulation Models Continuous Test and Verification Automatic Code Generation Automatic code generation 12 - Minimizes coding errors Test with Design - Detects errors earlier
  13. 13. Steps in MBD approach 1. Plant modeling - Motor, load, power electronics etc. 2. Interface modeling - Sensors, device drivers 3. Controller modeling - Field oriented control of 3 phase PM motor 4. Analysis and synthesis - The models created in step 1-3 are used to identify dynamic characteristics of the plant model. - Tuning and configuration of system 5. Validation and test - Offline simulation and/or real-time simulation - Time response of the dynamic system is investigated 6. Deployment to embedded target - Automatic code generation - Test and verification 13
  14. 14. Steps in MBD approach System Model Test Signals Controller Model Motor/inverter Model Verify PC Code Generation System Embedded Controller Motor/inverter Target HW Motor Drive System  Simulation of Controller and Plant model  Off-line development of algorithms without access to HW  Code generation and deployment to embedded controller  Comparison between simulation and actual implementation 14
  15. 15. Model complexity  What is a good model?  Represent the states of interest  Supports automatic code generation  Execute fast  Use existing (trusted) libraries  Reusable across platforms Right balance Too little 5 15 ? Too much
  16. 16. Model complexity  Understanding strengths and weaknesses of tools is critical when defining model scope Strength Weakness 16 - Solving differential equation - Time domain modeling - Visualization - Target specific setup - Managing system resources - Time scheduling - Register setup and control - Managing System resources - Time scheduling - Real time control systems - Debugging and test - Visualization
  17. 17. Interfacing to Embedded Target  SW architecture C-code needs to be tied to embedded platform  Utilizing strength of multiple environments  Graphical environment for application code development  “Classic” C-code for target specific control Platform independent  Generic Control Algorithm Platform dependent HW interface layer Embedded Platform 17
  18. 18. Interfacing Embedded Target  Two platforms – one implementation  Common control algorithm for Simulation and Embedded system  Platform specific device drivers or behavioral models  Debug algorithm using simulation and test on embedded platform 18
  19. 19. Drive system feedback and control Feedback 19
  20. 20. Motor Control Application Program Power Inverter and Motor Device Driver Auto code MC Algorithm MC Application Firmware 20 MC „C‟ code CC & Link Device drivers Application code Sensors, interfaces and Device Drivers
  21. 21. AC Motor Algorithm (Field Oriented Control)      21 Shaft position sensor measures rotor magnet (flux) position – velocity is calculated. Two/three motor currents measured (two is enough). Clarke-Park transfer calculate Torque (Iq) and Flux (Id) components of current. Speed loop generates Iq reference; Id reference set to zero for PMSM. Current loops and Field alignment generates a,b,c voltage commands.
  22. 22. Field oriented control 22
  23. 23. Simulation Simulink scopes Code debugging Data analysis in MATLAB Magnitude [dB] 0 -50 -100 -150 -200 -250 0 1000 2000 3000 Frequency [kHz] 4000 5000 0 1000 2000 3000 Frequency [kHz] 4000 5000 Phase [Degrees] 0 -1000 -2000 -3000 23
  24. 24. Generating C-code 24
  25. 25. Building and Linking – IAR EWB 25
  26. 26. Building and Linking ARM Library Motor Control - M3/M4 support - FOC functions Matlab/Simulink Legacy code Device Drivers - Existing code - Functional model C-code Device drivers System resources - SW enablement package - Allocation & setup C-code Workbench Application code - State machines Scheduling Executable CM40x 26 C-code - IRQs/RTOS
  27. 27. Running target  MATLAB GUI + embedded engine  Streaming data back to MATLAB Captured runtime data Duty-cycle 1000 500 0 -500 -1000 Phase current 4 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 Sample number 140 160 180 200 x 10 4 3.5 3 2.5 Rotor angle 8 6 4 2 0 27
  28. 28. Sampling domains 10 kHz 1 kHz 28
  29. 29. Summary  Model-Based Design  System modeling and simulation  Automatic code generation  Modeling of motor control systems  Electronics/mechanical  Interfaces  Control algorithm  Interfacing generic C-code to embedded target  Use of different environments  Device drivers  Debugging  Off-line  In 29 real-time and test
  30. 30. Questions 30

×