Overview of Embedded Systems in Medical Applications

Similar documents
MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

EMBEDDED SYSTEM BASICS AND APPLICATION

SECTION -I Q.1 A Define & Explain following Opamp parameters with their measurement techniques.

Freescale s Next Generation 8-bit LCD Solutions

Unlocking the Potential of Your Microcontroller

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

PD215 Mechatronics. Week 3/4 Interfacing Hardware and Communication Systems

EMBEDDED SYSTEMS INTRODUCTION

MB95260H/MB95270H. MB95280H Series. MB95260H Series/MB95270H Series/

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

Basic Components of Digital Computer

Embedded System Design

XBee Based Garbage Pits Monitoring System with Information Updating To the Department

Overview of Microcontroller and Embedded Systems

AC : INFRARED COMMUNICATIONS FOR CONTROLLING A ROBOT

Ch 9 Discrete Control Using PLCs and PCs

EB-51 Low-Cost Emulator

Hello, and welcome to this presentation of the STM32L4 power controller. The STM32L4 s power management functions and all power modes will also be

VALLIAMMAI ENGINEERING COLLEGE

COMPLEX EMBEDDED SYSTEMS

CEIBO FE-W7 Development System

CS-3410 Systems Programming Spring 2013

1 Digital tools. 1.1 Introduction

VINCULUM-BASED TEMPERATURE / HUMIDITY / VOLTAGE DATA LOGGER FEATURES:

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices

EMBEDDED SYSTEMS COURSE CURRICULUM

CHAPTER 3 WIRELESS MEASUREMENT INSTRUMENT

ANTI THEFT CONTROL SYSTEM OF CAR USING ARM7 Gunaganti Ganesh* 1

CEIBO FE-51RD2 Development System

ECE3120: Computer Systems Hardware & Software Development Tools

Introduction to Embedded Systems

HARDWARE OF SUPERVISORY CONTROL & DATA ACQUISITION SYSTEM

A First Look at Microprocessors

1. Embedded System Design Process

BLACK BOX FOR CAR ACCIDENT

PRACTICAL DESIGN TECHNIQUES FOR SENSOR SIGNAL CONDITIONING

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing

The Embedded System Design Process. Wolf Text - Chapter 1.3

Learning Module 9. Managing the Sensor: Embedded Computing. Paul Flikkema. Department of Electrical Engineering Northern Arizona University

I Introduction to Real-time Applications By Prawat Nagvajara

Daintree Light Sensor Demo Application Note

Computer Hardware Requirements for Real-Time Applications

DE5 Thursday, September 09, 2010

Introduction to Embedded Systems

Robotics Training Module ABLab Solutions

Advanced Embedded Systems


Capacitive Touch Based User Interfaces and Hardware-based Solutions

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

The Embedded computing platform. Four-cycle handshake. Bus protocol. Typical bus signals. Four-cycle example. CPU bus.

MEMS & Advanced Analog

Central Processing Unit - CPU

Ultra Low Power Microcontroller - Design Criteria - June 2017

-----other notes This picture was taken from here:

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack

Microcontrollers. Principles and Applications. Ajit Pal +5 V 2K 8. 8 bit dip switch. P2 8 Reset switch Microcontroller AT89S52 100E +5 V. 2.

PXA270 EPIC Computer with Power Over Ethernet & Six Serial Protocols SBC4670

What is Mechatronics

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

F 2 MC-8FX Family. 8-bit Microcontroller. MB95200 Series

Lesson 5 Arduino Prototype Development Platforms. Chapter-8 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Micro:bit - an Educational & Creative Tool for Kids

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

IMC5-1EO. Embedded Operating Systems. Damien MASSON Last modification: November 12, 2013

AN10210 Using the Philips 87LPC76x microcontroller as a remote control transmitter

Embedded Systems. Read pages

ARM Embedded Development Using Oberon-07

Microcontroller Basics

Project Planning. Module 4: Practice Exercises. Academic Services Unit PREPARED BY. August 2012

)8-,768'HY.LW 2YHUYLHZ. )XMLWVX0LNURHOHNWURQLN*PE+ Am Siebenstein Dreieich-Buchschlag, Germany

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

ShortStack 2.1 ARM7 Example Port User s Guide

EE4380 Microprocessor Design Project

Robotic Systems ECE 401RB Fall 2006

PLC Fundamentals. Module 1: Introduction to PLC. Academic Services Unit PREPARED BY. August 2011

1. Attempt any three of the following: 15

MPLAB SIM. MPLAB IDE Software Simulation Engine Microchip Technology Incorporated MPLAB SIM Software Simulation Engine

WIZTECH AUTOMATION SOLUTIONS (P) LTD., An ISO 9001:2000 and IAO certified company

ez430-chronos Wireless Watch Development Tool: Teardown & Getting Started

Introduction to Computer Systems and Operating Systems

PROGRAMMING AND CUSTOMIZING

Project Final Report Internet Ready Refrigerator Inventory Control System

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

MFS605/EE605 Systems for Factory Information and Control

PC Spa Dashboard Control User Guide

INDUSTRIAL TRAINING:6 MONTHS PROGRAM TEVATRON TECHNOLOGIES PVT LTD

EE 390 Lab Manual, EE Department, KFUPM. Experiment #7. Introduction to Flight86 Microprocessor Trainer and Application Board

Lesson 5: Software for embedding in System- Part 2

Nano RK And Zigduino. wnfa ta course hikaru4

2-Oct-13. the world s most energy friendly microcontrollers and radios

TRAINING GUIDE LEVEL 3 MODBUS WRITE IMPORT COMMAND

Introduction to ARM LPC2148 Microcontroller

Module Introduction. This training module provides an overview of Freescale s scalable solutions for low data rate 2.4 GHz connectivity.

REDACTION BASED ATM MONITORING SYSTEM USING MSP 430

APPLICATION NOTE 655 Supervisor ICs Monitor Battery-Powered Equipment

Nuvoton 1T 8051-based Microcontroller NuTiny-SDK-N76E885 User Manual

Lab Course Microcontroller Programming

Talon Communications. Wireless and Video Product Development It s what we do!

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

Transcription:

of Embedded Systems in Medical Applications 1

Embedded Systems Simplistic definition Embedded System Shorthand for Embedded Processor System Embed microprocessor + fixed program in non-computer system Computer Microprocessor Inside Not a Computer 2

Fundamental Architectural Abstractions Digital computer Machine that can be programmed to process symbols Symbols Instruction Data Symbols describing processing of other symbols Machine can interpret instructions in its machine language Symbol with no intrinsic meaning to machine Meaning of data imposed by user Microprocessor (μp) Hardware device Interprets instructions Performs instructions (processes) on data Program Defines sequence of instructions 3

General Purpose Computers and Embedded Systems A basic distinction Microprocessor based Microprocessor performs instructions on data User can access + add + modify data User can access + add + modify programs Examples Share of microprocessors manufactured General Purpose (GP) PC, workstation, file server, mainframe 1% Embedded System Toys, toasters, phones, DVD players, car engines, cameras, medical devices 99% 4

Why Embedded Processors? Example washing machine controller Devices Water heater / pump, level / temperature gauges, motor, indicators Before 1990 Motorized mechanical controller Operates devices in pre-set sequence Gears, cogs, mechanical switches Modify controller for each model Update redesign physical controller After 1990 Microprocessor controller Operates devices in programmed sequence Digital timing and electronic switches Modify controller program for each model Update change program code 5

Economic Considerations Pure hardware products Product cost Cost = NRE + MC N NRE = non-recurring engineering = R&D cost (salaries) MC = manufacturing cost per unit N = number of units manufactured Pure hardware products MC large Entire product is hardware Low product re-use poor economies of scale NRE large Highly specific R&D Slow testing / update turn-around Shortage of electrical and mechanical engineers Higher salaries (since 2000) 6

Economic Considerations Pure software products Product cost Cost = NRE + MC N NRE = non-recurring engineering = R&D cost (salaries) MC = manufacturing cost per unit N = number of units manufactured Pure software products MC 0 NRE Entire product is software R&D is primary cost Complex development techniques to lower cost Object oriented design, middleware platforms, standard libraries Complex design can harm performance and reliability Multiple stages of processing Standard software less well understood 7

Economic Considerations Embedded software products Product cost Cost = NRE + MC N NRE = non-recurring engineering = R&D cost (salaries) MC = manufacturing cost per unit N = number of units manufactured Embedded software products MC significant for large N NRE Embedded software improved hardware re-use + economies of scale Accept higher R&D cost to lower MC Avoid highly complex software models Program in core systems in C and assembly Restrict memory usage 8

Embedded Medical Equipment Familiar examples Glucose Test Set Portable EKG MRI 9

Embedded Medical Equipment Glucose test set Components User interface (UI) Buttons Text-oriented screen Strip connector Battery Controller (system-on-chip) Programming tasks Operate UI Detect buttons Display text Detect strip Control blood test cycle Test battery, temperature, program sanity,... 10

Embedded Medical Equipment Portable EKG Components User interface (UI) Buttons Graphics-oriented screen Electrode connector Battery Controller Programming tasks Operate UI Detect buttons Display text + graphics Control electrode amplifiers + A/D Control digital signal processing (DSP) of input signals Generate graphic display signals Test battery, temperature, program sanity,... 11

Embedded Medical Equipment Magnetic Resonance Imaging (MRI) Components Multiple user interfaces Patient table Magnetic field and RF sources Electromagnetic field detector Power supply Controller Programming tasks Operate UIs Control table Control magnetic field and RF transmission Control electromagnetic field detector Imaging algorithms and graphics processing Test system sanity 12

Embedded Medical Equipment Division of labor Hardware engineering Design of peripheral components Sensors, actuators, displays Characterization of peripherals Design of device drivers Design of generic programmable embedded platforms Goal specify hardware as API abstraction Software engineering Defining system requirements Specifying generic platform High level system software planning Lower level software design Procedure / class coding Driver integration Goal interact with hardware via API 13

Embedded Medical Equipment Example: software technologies used in MRI Programming Languages Persistent Storage Interprocess communication Source Code Size Timing accuracy C, C++/STL, C#, Visual Basic, ASP, JavaScript, Perl, Batch, and other proprietary languages RDBMS, flat files, indexed and sequential files, XML Socket, COM, shared memory, shared files 8 million lines of code in 30,000 files Scanning hardware: nanoseconds Real time software: 1 millisecond User interaction: 0.1 1 second Philips Research, Embedded Systems in Healthcare, 2008 14

Typical System Structure Hardware Microcontroller (μc) Devices Microprocessor (μp) + memory + timers + device controllers Sensors receive signals from physical environment Actuators act on physical environment Displays provide indications to user Specialized controllers very large scale integrated circuits (VLSI) Software Fixed program code (FIRMWARE) not directly accessible to user Initialization / reset routine Main loop Polls devices for events requiring attention Responds to interrupts from devices that require immediate attention Continues at start of loop Handler functions for events 15

Hardware Environment Microcontroller (μc) Microprocessor core (μp) Memory Timers RAM for data + ROM for program (firmware) Time internal / external events Watchdog timeout resets system if code loop fails Controller I/O Interrupt controller external event grabs processor attention Analog digital converters (A/D and D/A) Digital signal processor (DSP) Serial parallel converters (UART) Sensors Position, contact, temperature, pressure, light, Actuators Displays, motors, solenoids, relays, valves, transmitters, 16

I/O in DVD Player Sensors Switches on user interface On/Off, REV, FF, Pause, Open/Close, Play, Stop, Motion detectors Disk inserted, disk ejected, beginning of disk, end of disk, Safety detectors Dew detector, thermostat, over-voltage, no-signal, Actuators Disk drive motor, insert/eject motor Motor turns Direction gear control solenoids Solenoid pushes or pulls 17

Control Theory Interacting with physical environment Open Loop Control desired physical state Controller calculator theory of physical system control signals Physical System physical state physical model measured state ( ) ( ) ( n+1) ( n) ( n) ( ) = G target state( t ) state t = F state t, control t control t n+1 n Closed Loop Control desired physical state Controller calculator theory of physical system sampler control signals Physical System physical state physical model measured state feedback signals ( ) ( ) ( n+1 ) ( n ) ( n ) ( ) ( ) ( ) state t = F state t, control t control t = G target state t, measured state t n+1 n n 18

Simple Example Controller for wireless mouse Mouse contains RF transceiver Transmits to USB adapter on PC Mouse one of several PC devices Identifies itself to PC with device ID Mouse powered by battery Sleeps after 5 seconds idle Maintains state Wakes up on motion or button click 19

Wireless Mouse Hardware Switches Mouse buttons Motion sensors (mechanical or optical) Detect X-Y position Microprocessor Translates switch and sensor outputs to motion data Manages battery usage and mouse status Peripheral Engine (PE) Controls RF link Stores device information, button status, and X,Y-position Radio Transceiver (Transmitter / Receiver) 20

Mouse Routine (1) ; initialization init: request ID from PC ; send stored request string describe hardware to PC ; send stored request string store X-Y position ; in memory buffer enable reset interrupt ; watchdog timer enable wake-up interrupt ; signal from X-Y or button zero 5 second timer ; CX 5 second count ; each loop: SUB CX, loop runtime ; CX == 0 5 second timeout ; main loop L1: read button status cmp button status, stored status ; Peripheral Engine (PE) encodes JE L2 ; status of 3 buttons and CALL button ; sends button status to PC L2: read motion detectors calculate X,Y-position CMP position, stored position ; Peripheral Engine (PE) encodes JE L3 ; X,Y-position and CALL motion ; sends position to PC L3: SUB timer, loop runtime ; decrease timer CMP timer,0 JE sleep ; if 5 seconds passed, sleep JMP L1 ; continue ; end main loop 21

Mouse Routine (2) ; button press handler button: store button status in PE instruct PE to send button status to PC zero 5 second timer RET ; motion handler motion: store position in PE instruct PE to send X,Y -position to PC zero 5 second timer RET ; sleep state sleep: lock PE registers ; store state turn-off battery to PE and transceiver wait: JMP wait ; low power do -nothing loop ; stays here until interrupt ; wake-up ISR WAKE: unlock PE registers ; wake up JMP L1 ; continue ; reset ISR reset: JMP init ; start 22

The Logic Gate Alternative Timer Peripheral Engine X,Y-Position Counter Logic Button Status Logic Reset and Wake-up Logic X,Y-position logic Counts mouse motion clicks Adjusts stored value in PE memory Button status logic Encodes button presses to PE Reset and wake-up logic Initializes and wakes up sleeping mouse Puts idle mouse to sleep String sequence logic Transmits code strings to PC as bits String Sequence UART Gate Implementations Individual ICs Large "footprint" Costly manufacture Custom IC Costly development 23

Goals in Embedded Design Reliability Device operation depends on embedded processor Bug is inconvenient, expensive, possibly life-threatening Device must work 24/7/365 without user reset Performance Real time system Respond in fixed time limits Satisfy real world timing constraints Scheduling Optimized I/O Cost Minimize manufacturing cost for consumer market Fast Time to Market No opportunity for future modification 24

Strict Requirements Programmer's nightmare NASA Photo ID: S84-27017 (February 11, 1984) 25

Multitasking / Concurrency in Embedded Systems Controller handles simultaneous independent events Inputs from external sensors Internal processes Outputs to external actuators Programmable Thermostat Three concurrent tasks /* Monitor Temperature */ do forever { measure temp ; if (temp < setting) start furnace ; else if (temp > setting + delta) stop furnace ; } /* Monitor Time of Day */ do forever { measure time ; if (6:00 am) setting = 72 o F ; else if (11:00 pm) setting = 60 o F ; } /* Monitor Keypad */ do forever { check keypad ; if (raise temp) setting++ ; else if (lower temp) setting ; } Ref: Daniel W. Lewis, Fundamentals of Embedded Software: Where C and Assembly Meet 26

Design Process Method Top-down design process abstraction to physical components Bottom-up design construct system to control existing hardware Requirements Define control problem and hardware abstraction Architectural specification Determine high level modules and information flow Detailed system design Determine functions and information flow within each module Implementation Coding in C and assembly language Debugging Initial debugging in code emulator Testing code on target system Using I/O emulation Using physical platform 27

Debugging No bugs allowed High performance demands No human operator to perform "workaround" No extended beta-testing ("service packs") Hardware/software debugging Hardware configuration time consuming Programmer must understand Hardware behavior (well enough for debugging) Hardware/software interactions All possible external situations Interaction of C code and assembly code Compiler choices Debugging usually involves emulation of target system 28

Development Tools Language tools Program manager Integrated code editor, file manager, device database Assembler, C compiler, linker Assembly / C language to microcontroller machine language Debugger Simulates machine code execution on PC Simulates external I/O Hardware tools Development platform Generic circuit boards with microcontroller and external I/O devices Device programmer Burn code from PC file to microcontroller internal ROM Hardware debugger In-Circuit Emulator (ICE) PC connection acts instead of controller In-Circuit Debugger (ICD) program real controller for debugging 29

Development Platform 30

In Circuit Emulator (ICE) Connection to PC Connection to target platform 31