Design of embedded control systems

embedded control system for lpg leak detection and prevention and embedded control system software
LeonBrown Profile Pic
Published Date:14-07-2017
Your Website URL(Optional)
Embedded Control Systems ETH – Institute for Dynamic Systems and Control September 12 to 16 and 19 to 13, 2016 Jim Freudenberg Christoph Skrabel Simone Guscetti Stijn van Dooren Marianne Schmid Schedule •  Lecture 8:00 – 10:00 –  Sampling and aliasing, signal processing, dynamic systems, integration techniques, etc. •  Assisted Pre-lab: 10:00 – 12:00 –  Material specific to the lab exercise: pulsewidth modulation, quadrature decoding, A/D conversion, etc. –  I’ll present required information in the lecture room, then we’ll move to the lab Important Points •  No textbook – embedded-control-systems.html –  Lecture notes, microprocessor reference material, laboratory exercises, and other important information –  Day to day list of reference materials on website •  No required homework problems –  Matlab, Simulink, Stateflow Important Points •  Laboratory exercises –  8 laboratory exercises in 10 days using the Freescale MPC5553 microprocessor •  Most labs are “1-day” •  First lab will be Monday and Tuesday •  Schedule posted –  33 registered students –  11 lab stations with 3 students (“self organize”) Important Points •  Laboratory exercises have 3 parts: –  Assisted Pre-lab (10AM-12PM): questions that require you to read the microprocessor reference material and gather the information required to complete the lab exercise –  Assisted In-lab (1-4PM): the experiment –  Post-lab (4-5PM) : questions that should reinforce what you learned in the lab exercise (due 10AM the next day) •  You must attend 8 lab sessions and hand in all 8 lab assignments (pre-, in- and post-lab) to receive credit for the course Everyday Time Schedule Prof. R. Schedule Embedded Control Systems (Fall 2016) Prof. C. Onder 151-0593-00 D'Andrea Lectures Week 1 in Room ML F 40 (8 to 10 a.m.) Lab in Room ML E 55 10 a.m. 11 12 a.m. 1 p.m. 2 3 4 5 p.m. No. Date Topic No. Topic Course introduction. Start on A/D conversion, sampling and aliasing; simple anti- Familiarization and Digital I/O. Reading in 1 2016-09-12 1 aliasing filter design MPC5553 Referense Manual, introduction Introduction Pre-Lab In-Lab to hardware (oscilloscope, signal generator, etc.) Finish A/D conversion, sampling and aliasing; simple anti-aliasing filter design; Continue with Lab 1 2 2016-09-13 1 introduction to Matlab and Simulink; demonstrate Simulink by doing "Problem In-Lab In-Lab Post-Lab set 1" filter design. Introduction to Stateflow, in particular, demonstrate problem set 2, building a Quadrature Decoding using the enhanced 3 2016-09-14 2 Stateflow quadrature decode model. Introduction to DC motors; derive steady- Time Processing Unit (eTPU) Pre-Lab In-Lab Post-Lab state motor equations. Present lecture material on optical encoders, quadrature decoding, over/underflow and typecasting. Discuss motor control (speed control, torque control, power amplifiers); Pulse Queued Analog-To-Digital Conversion 4 2016-09-15 3 width modulation; virtual worlds, wall "chatter" and the virtual wall. (QADC) Pre-Lab In-Lab Post-Lab Dynamic systems and transient specifications (review); develop dynamic motor Pulse Width Modulation (PWM) and Virtual 5 2016-09-16 4 model block diagram and implement in Simulink (domonstrate problem set 3). Worlds without Time Pre-Lab In-Lab Post-Lab Develop motor frequency response and demonstrate input PWM attenuation. Lectures Week 2 in Room ML H 43 (8 to 10 a.m.) Lab in Room ML E 55 10 a.m. 11 12 a.m. 1 p.m. 2 3 4 5 p.m. No. Date Topic No. Topic Develop Stateflow model of the virtual wall (demonstrate problem set 5). Interrupts, Timing, and Frequency Analysis 6 2016-09-19 5 Develop virtual spring-mass system dynamics (harmonic oscillator). Introduce of PWM Signals Pre-Lab In-Lab Post-Lab Euler Integration and pseudo-code for the spring-mass system. Introduction to z-transforms and numerical instability. Develop the virtual spring- Virtual Worlds with Time 7 2016-09-20 6 mass-damper (calculate how much damping is required to create a discrete Pre-Lab In-Lab Post-Lab harmonic oscillator using Forward Euler). Introduce state-space notation. Discuss other numerical integration methods; discuss how Matlab does numerical integration Software architecture, real-time operating systems and scheduling algorithms. Code Generation with SIMULINK (RAppID 8 2016-09-21 7 Rapid prototyping and automatic code generation. Toolbox) Mathwork Pre-, In- & Post-Lab Pre-, In- & Post-Lab (location TBA) Software architecture; presentation of MathWorks on Autocode generation with Continue with Lab 7, catch up with other 9 2016-09-22 7 SIMULINK labs Pre-, In- & Post-Lab Pre-, In- & Post-Lab Introduction to CAN networks. Controller Area Network 10 2016-09-23 8 Pre-Lab In-Lab Post-Lab IMPORTANT: You must attend 8 lab sessions and hand in all 8 assignments (pre-, in- and post-lab) to receive credit for the course. Pre-labs are due at the start of the In-labs, Post-labs are due at 5 p.m.What is an Embedded System? •  Technology containing a microprocessor as a component –  cell phone –  digital camera •  Constraints not found in desktop applications –  cost –  power –  memory –  user interface ⇒ Embedded processor is often the performance and cost limiting component What is an Embedded Control System? •  Technology containing a microprocessor as a component used for control: –  automobiles –  hospital beds –  laser printers –  aircraft – civil structures   –  household appliances – manufacturing   –  copy machines – ener  gy harvesters –  wind turbines –  medical devices Characteristics of Embedded Control Systems •  Interface with external environment –  sensors and actuators •  Real time critical –  performance and safety –  embedded software must execute in synchrony with physical system •  Hybrid behavior –  continuous dynamics –  state machines •  Distributed control –  networks of embedded microprocessors Prime Example: today’s automobile The Automobile in 1977 16 electrical systems •  spark timing •  air/fuel 1976 Chrysler •  analog control 1977 GM Olds Toronado 1978 Ford Lincoln Versailles •  microprocessor control IEEE Spectrum special issue on the Automobile, Nov 1977 The Future in 1977 Gas turbine engines 100 proposed electrical systems High end automobiles: as many as 8 microprocessors, one per cylinder (Aston Martin) 10K ROM: plenty unused capacity to control other engine functions Obstacles: high cost of sensors and actuators “the inability of the electrical engineer to characterize the mechanical system for microprocessor programmers” IEEE Spectrum special issue on the Automobile, Nov 1977 The Automobile in 2016 •  Drivetrain -  Variable geometry turbochargers -  Variable cam timing (intake, exhaust, dual-equal, dual independent) -  Variable valve timing -  Variable compression ratio -  Automatic transmission, continuously variable tranmission •  Chassis control -  antilock brakes -  traction control -  stability control •  Body control -  seats -  windows -  wipers -  locks •  Infotainment/GPS systems •  Driver assistance & active safety systems  è Cars today are safer, less polluting, more fuel efficient, and more convenient than in 1977 The Automobile in 2010 Harvard Business Review, 2010 Industry Hiring Needs   •  “The auto industry is … hiring a different breed of engineer to invent the next generation of complex software for m.p.g., clean emissions and crash avoidance technologies.” •  “GM's biggest engineering recruiting challenges are software and controls engineering” •  Ford: greatest hiring need is for software and electronics skills •  2012 SAE salary survey: EEs working in automotive sector earn 10K/year more than MEs •  Ford: “Across the auto-engineering spectrum right now, there is a war for talent” Detroit Free Press, October 2012 USA Today, July 2013 “Detroit Battles for the Soul of Self Driving Machines”, June 2016 Wall Street Journal An Industry Request: 1998 Dr.  Ken  Bus:   • Ford  Research  (currently  Toyota)   • Founding  member,  MATHWORKS  AutomoEve  Advisory  Board  (1998)   “Why  can’t  I  hire  students  trained  to  do  embedded  control  so6ware  development?”      “And  why  don’t  the  students  I  hire  know  how  to  talk  to  one  another?”       Skills  required:   • Control  algorithms   • Computer  soNware   • Computer  hardware   • Electronics   • Mechanical  engineering        Outcome: Two Courses •  UofMichigan: EECS 461, Embedded Control Systems th –  17 year –  200 students/year –  Jeff Cook, formerly Ford Research –  Student body: •  EE and CE, seniors and masters •  Space permitting, grad students from other departments •  ETH Zurich: 151-0593-00, Embedded Control Systems th –  9 year as two week block course –  33 students/year –  Mechanical Engineering Graduate Students Embedded  Control  Enrollment:  UM  and  ETH   220   200   180   160   140   Fall  (ETH)   120   Spring  (EECS  461)   100   Winter  (EECS461)   Fall  (EECS  461)     80   Fall  (EECS  498)   60   40   20   0    00-­‐01    01-­‐02    02-­‐03    03-­‐04    04-­‐05    05-­‐06    06-­‐07    07-­‐08    08-­‐09    09-­‐10    10-­‐11    11-­‐12    12-­‐13  13-­‐14  14-­‐15  15-­‐16  16-­‐17   Academic  Year   Total Enrollment: 1949 students  Laboratory Overview •  MPC5553 Microcontroller (Freescale) •  Development Environment –  Debugger (P&E Micro) –  Codewarrior C compiler (Freescale) •  Haptic Interface –  Force feedback system for human/computer interaction •  Rapid Prototyping Tools –  Matlab/Simulink/Stateflow, Embedded Coder (The Mathworks) –  RAppID Toolbox (Freescale) Freescale MPC5553 Microcontroller •  32 bit PPC core –  floating point –  132 MHz –  -40 to +125 °C temperature range •  Programmable Time Processing Unit (eTPU) –  Additional, special purpose processor handles I/O that would otherwise require CPU interrupt service (or separate chip) –  Quadrature decoding –  Pulse Width Modulation •  Control Area Networking (CAN) modules nd •  2 member of the MPC55xx family –  real time control requiring computationally complex algorithms –  MPC5554 replaces MPC555 for powertrain control –  MPC5553 has on-chip Ethernet for manufacturing applications MPC5553 EVB •Evaluation board (Freescale)   - 32 bit PPC core - floating point -128 MHz   • Interface board (UofM)   – buf  fering – dipswitches   –  LEDs –  rotary potentiometer