© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zExample: model train controller.

Slides:



Advertisements
Similar presentations
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
Advertisements

IR Control Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
EML 2023 – Motor Control Lecture 4 – DAQ and Motor Controller.
CS Fall Final Project Final Project Report and Grading Randy H. Katz Computer Science Division Electrical Engineering and Computer Science.
1-1 ROPES Rapid Object-Oriented Process for Embedded Systems.
Chapter 6 Errors, Error Detection, and Error Control.
Introduction To System Analysis and Design
© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Networks zExample: elevator controller.
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
Chapter 1 Embedded Computing 金仲達教授 清華大學資訊工程學系 (Slides are taken from the textbook slides)
© 2000 Morgan Kaufman Overheads for Computers as Components 2 nd ed. Introduction zExample: model train controller.
© 2000 Morgan Kaufman Overheads for Computers as Components 2nd ed. Introduction Example: model train controller. 1.
SE-565 Software System Requirements More UML Diagrams.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
State Diagrams / System Sequence Diagrams (SSDs)
Servo Motor Control Demonstration.
© 2000 Morgan Kaufman Overheads for Computers as Components Networks zExample: elevator controller.
© 2005 ECNU SEIPrinciples of Embedded Computing System Design1 Introduction zExample: model train controller.
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction  Example: model train controller.
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zWhat are embedded systems? zChallenges in embedded computing system design.
Interaction diagrams Sequence and collaboration diagrams.
Embedded Computer Systems Chapter1: Embedded Computing Eng. Husam Y. Alzaq Islamic University of Gaza 1 © 2010 Husam Alzaq Computers as Components.
Understand Application Lifecycle Management
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 6 Value- Returning Functions and Modules.
Servo Motor Control Demonstration. EML 2023 Department of Mechanical and Aerospace Engineering motor with gear reducer flex coupling incremental optical.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Introduction To System Analysis and Design
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
The variety Of Processors And Computational Engines CS – 355 Chapter- 4 `
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
Embedded System Spring, 2011 Lecture 2: FORMALISMS FOR SYSTEM DESIGN Eng. Wazen M. Shbair.
Chapter 9 Hardware Addressing and Frame Type Identification 1.Delivering and sending packets 2.Hardware addressing: specifying a destination 3. Broadcasting.
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
Requirement Engineering. Recap Elaboration Behavioral Modeling State Diagram Sequence Diagram Negotiation.
Session 3 How to Approach the UML Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 5, 2011 Presented by Kang-Pyo Lee.
Digital Control CSE 421.
Unit 1 Lecture 4.
The Spartan®-3E FPGA Starter Kit board. A computer mouse is designed mainly to detect two-dimensional motion on a surface. Its internal circuit measures.
© 2000 Morgan Kaufman Overheads for Computers as Components 1. Embedded Computing 1.1 Introduction 1.2 Complex system and microprocessors 1.3 Embedded.
IT3002 Computer Architecture
© N. Ganesan, Ph.D., All rights reserved. Chapter Formatting of Data for Transmission.
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zObject-oriented design. zUnified Modeling Language (UML).
Documenting an Architecture 10 pages, half pictures.
Serial Communication RS-232. In order to make two devices communicate, whether they are desktop computers, microcontrollers, or any other form of integrated.
INTERNET OF EVERYTHING SDU 2016 Week 12. Remotely Controlling Devices  interact with almost any device that uses some form of remote control  TVs, audio.
Istituto Tecnico Industriale A.Monaco EURLAB Moving a robot simple example program to control a DC-Motor Next - Press the button (left)
Pulse-Width Modulation: Simulating variable DC output
Lab 3 Specification and Requirements analysis Example: model train controller. Follow a design through several levels of abstraction. Gain experience.
The embedded systems platform
Application Case Study Christmas Lights Controller
Chapter 9: Data Link Control
Digital Control CSE 421.
Overheads for Computers as Components
Overheads for Computers as Components
IR Control Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Communication Protocol
Introduction Example: model train controller..
Documenting an Architecture
Chapter 5: Computer Systems Organization
Introduction to Sequential Circuits
Processes and operating systems
Computer Systems An Introducton.
Chapter 9: Data Link Control
Automotive Technology Principles, Diagnosis, and Service
COE 342: Data & Computer Communications (T042) Dr. Marwan Abu-Amara
Presentation transcript:

© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zExample: model train controller.

© 2000 Morgan Kaufman Overheads for Computers as Components Purposes of example zFollow a design through several levels of abstraction. zGain experience with UML.

© 2000 Morgan Kaufman Overheads for Computers as Components Model train setup Console: Throttle, Inertia, Estop, … power supply rcvrmotor ECC address: train # headercommand: speed, … Speed/acc control

© 2000 Morgan Kaufman Overheads for Computers as Components Requirements zConsole can control 8 trains on 1 track. zThrottle has at least 63 levels.  speed control levels zInertia control adjusts responsiveness with at least 8 levels.  acceleration zEmergency stop button. zError detection scheme on messages.

© 2000 Morgan Kaufman Overheads for Computers as Components Requirements form

© 2000 Morgan Kaufman Overheads for Computers as Components Conceptual specification zBefore we create a detailed specification, we will make an initial, simplified specification. yGives us practice in specification and UML. yGood idea in general to identify potential problems before investing too much effort in detail.

© 2000 Morgan Kaufman Overheads for Computers as Components Typical control sequence :console:train_rcvr set-inertia set-speed estop Time Data packets sent at any time

© 2000 Morgan Kaufman Overheads for Computers as Components Basic system commands

© 2000 Morgan Kaufman Overheads for Computers as Components Message classes set-inertia value: unsigned- integer set-speed value: integer estop Have common features: type, address to send data, # of bits, parity

© 2000 Morgan Kaufman Overheads for Computers as Components Command class command type: 3-bits address: 3-bits parity: 1-bit set-inertia type=001 value: 3-bits set-speed type=010 value: 7-bits estop type=000

© 2000 Morgan Kaufman Overheads for Computers as Components Major subsystem roles zConsole: yread state of front panel; yformat messages; ytransmit messages. zReceiver: yreceive message; yinterpret message; ycontrol the train.

© 2000 Morgan Kaufman Overheads for Computers as Components System structure modeling zSome classes define non-computer components. yDenoted by *name. zChoose important systems at this point to show basic relationships.

© 2000 Morgan Kaufman Overheads for Computers as Components Console system classes panelformattertransmitter knobs*sender* Console 1

© 2000 Morgan Kaufman Overheads for Computers as Components Console class roles zpanel: describes analog knobs and interface hardware. zformatter: turns knob settings into bit streams. ztransmitter: sends data on track.

© 2000 Morgan Kaufman Overheads for Computers as Components Train system classes train set train receiver controller motor interface detector*pulser* 1 1..t

© 2000 Morgan Kaufman Overheads for Computers as Components Train class roles zreceiver: digitizes signal from track. zcontroller: interprets received commands and makes control decisions. zmotor interface: generates signals required by motor, e.g., to control SPEED, ACCELERATION

© 2000 Morgan Kaufman Overheads for Computers as Components Train speed control zMotor controlled by pulse width modulation: zSketching out the spec first helps us understand the basic relationships in the system. V + - duty cycle Fast/slow

© 2000 Morgan Kaufman Overheads for Computers as Components Detailed specification zWe can now fill in the details of the conceptual specification: ymore classes; ybehaviors.

© 2000 Morgan Kaufman Overheads for Computers as Components Console/train physical object classes knobs* train-knob: integer speed-knob inertia-knob emergency-stop: boolean pulser* pulse-width: unsigned- integer direction: boolean sender* send-bit( ) detector* read-bit( ) : integer

© 2000 Morgan Kaufman Overheads for Computers as Components Panel and motor interface classes panel train-number( ) : integer speed( ) : integer inertia( ) : integer estop( ) : boolean new-settings( ) motor-interface speed: integer int speed( ){ int spd; spd= inp(KNOBS_SPEED_PORT); return spd; } send_speed( )

© 2000 Morgan Kaufman Overheads for Computers as Components Transmitter and receiver classes transmitter send-speed(adrs: integer, speed: integer) send-inertia(adrs: integer, val: integer) send-estop(adrs: integer) receiver current: command new: boolean read-cmd() new-cmd() : boolean rcv-type(msg-type: command) rcv-speed(val: integer) rcv-inertia(val:integer) Read, detect, get parameter

© 2000 Morgan Kaufman Overheads for Computers as Components Class descriptions ztransmitter class has one behavior for each type of message sent. zreceiver function provides methods to: ydetect a new message; ydetermine its type; yread its parameters (estop has no parameters).

© 2000 Morgan Kaufman Overheads for Computers as Components Formatter class formatter current-train: integer current-speed[ntrains]: integer current-inertia[ntrains]: unsigned-integer current-estop[ntrains]: boolean send-command( ) panel-active( ) : boolean operate( ) Interfaces with transmitter Basic actions for the object: read, interpret, send msgs

© 2000 Morgan Kaufman Overheads for Computers as Components Formatter class description zFormatter class holds state for each train, setting for current train. zThe operate() operation repeatedly performs the basic formatting task.

© 2000 Morgan Kaufman Overheads for Computers as Components Control input sequence diagram :knobs:panel:formatter:transmitter change in speed/ inertia/estop change in train number change in control settings read panel panel settings panel-active send-command send-speed/ send-inertia/ send-estop read panel panel settings read panel panel settings change in train number operate( ) panel-active send-command

© 2000 Morgan Kaufman Overheads for Computers as Components Formatter operate behavior Idle (cyclic) send-command() panel-active() Yes No

© 2000 Morgan Kaufman Overheads for Computers as Components Panel-active behavior panel*:read-train() current-train = train-knob update-screen changed = true T panel*:read-speed() current-speed = throttle changed = true T F... F

© 2000 Morgan Kaufman Overheads for Computers as Components Controller class controller current-train: integer current-speed[ntrains]: integer current-direction[ntrains]: boolean current-inertia[ntrains]: unsigned-integer operate() issue-command() Called by receiver when it gets a new command: Interprets messages, issues a command

© 2000 Morgan Kaufman Overheads for Computers as Components Setting the speed zDon’t want to change speed instantaneously. zController should change speed gradually by sending several commands.

© 2000 Morgan Kaufman Overheads for Computers as Components Sequence diagram for set- speed command :receiver:controller:motor-interface:pulser* new-cmd cmd-type rcv-speed set-speedset-pulse operate() read_cmd()

© 2000 Morgan Kaufman Overheads for Computers as Components Controller operate behavior issue-command() receive-command() wait for a command from receiver

© 2000 Morgan Kaufman Overheads for Computers as Components Summary zSeparate specification and programming. ySmall mistakes are easier to fix in the spec. yBig mistakes in programming cost a lot of time. zYou can’t completely separate specification and architecture. yMake a few tasteful assumptions.

© 2000 Morgan Kaufman Overheads for Computers as Components Assignment #1 zChapter 1: Q1-3, Q1-4, Q1-5, Q1-9, Q1- 15