Electronic Automotive Motor Control System Software Description Viking 32.

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

P3- Represent how data flows around a computer system
Programmable Interval Timer
Mark Schaumburg.  Dash Module for Formula Car  Sample pulse from engine for RPM  Display Information  Control gui  Can network interface  Request.
A New Technology Transmitter Real Time ScadaLynx Model
MotoHawk Training CAN Controller Area Network.
By: Mark Bright and Mike Donaldson.  Project Summary  System Block Diagram  Project Goals  4 Week Progress ◦ Engine side ◦ Thermo side.
How to program robot hardware Sascha Lange Why care about?
Autonomous Sensor and Control Platform Rover Tae Lee Josh Reitsema Scott Zhong Mike Chao Mark Winter.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
Word Processing, Web Browsing, File Access, etc. Windows Operating System (Kernel) Window (GUI) Platform Dependent Code Virtual Memory “Swap” Block Data.
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
ADAM-5000/TCP- Distributed Ethernet I/O
1 SD Recorder OS-TM-V701A for Driving Security Surveillance.
Today’s Agenda: Computer Basics Review Hardware: The physical components of a computer, any internal or external computer part that you can touch. Software:
SOC Consortium Course Material SoC Design Laboratory Lab 8 Real-time OS - 2 Speaker: Yung-Chih Chen Advisor: Prof. Chun-Yao Wang November 17, 2003 Department.
1 Neutron Monitor Workshop 3(B): Next Generation Readout Board Mahidol University January 6, 2010 Paul Evenson University of Delaware Bartol Research Institute.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
Other Chapters From the text by Valvano: Introduction to Embedded Systems: Interfacing to the Freescale 9S12.
LAB 8: Program Design Pattern and Software Architecture
Electronic transmissions Main controls Shift timing is computer controlled Line pressure is computer controlled which controls shift feel Computer can.
Autonomous Helicopter James LydenEE 496Harris Okazaki.
Pulse Width Modulation (PWM). 100% Pulse Width Modulation (PWM) 0% On the chipKIT there are 490 periods per second. Use analogWrite(pin, value) to control.
Chapter 2 Basic Principle of PLC PLC Configuration &Function   Basic Configuration  CPU  Memory  Programming Interface  Communication.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Embedded Systems Design: A Unified Hardware/Software Introduction 1 Chapter 4 Standard Single Purpose Processors: Peripherals.
Michael Broski Jonathan Mulvaine Josh Schortgen Phillip Byers TEAM BOAR.
Appendix B: System Development Example MTT48 V2.1 B - 1 APPENDIX B: SYSTEM DEVELOPMENT.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
Mark Randall & Kevin Claycomb Faculty Advisor: David Mitchell Industrial Sponsor: IEEE.
Turbine Flow Meter Kevin Hooks Senior Design Project.
System Software Design and Documentation Zach Hill Western Washington University.
Digital Handheld Communication and Navigation Device
Vinh Le.  MCU: Freescale Kinetis K60512 ARM Cortex M4  Bus Frequency: 50MHz  Available Memory: ◦ 512KB Flash ◦ 64KB SRAM  Memory Required: ◦ 10KB.
RFID Access Control System Lucius Knight. General System Design  Microcontroller  PSoC CY8C29466  24MHz Bus Frequency  Memory Available  32kB FLASH.
System Software Design Dane Kim May 4 th, 2009 EET 475, WWU.
BICYCLE SECURITY AND TRIP COMPUTER MATTHEW ROTHNIE WESTERN WASHINGTON UNIVERSITY 4/25/12.
ATV INSTRUMENTATION DISPLAY System Design Ed Raezer Senior Project Western Washington University.
System Software Design Engineer: Mac Gainor Western Washington University.
Machine Access System Software Design and Documentation Western Washington University By: Kevin Pogue.
1 J.O. KLEIN Institut Universitaire de Technologie de CACHAN Université PARIS SUD - FRANCE An Introduction to Real Time Operating System.
LED CUBE Preliminary System Software Design Fernando J. Garcia May
System Software Design Dan Sweet May 6 th, 2008 Western Washington University Bicycle Power Meter.
SGDRS Software System Design Justin A. King WWU EET Senior project 2013.
Automatic Pressure Canning System System Software Design By: Michael Drysdale.
Atmospheric Data Measuring Rocket Software Design & Description Matt Buonadonna ADaM Code Presentation.
GPS Enhanced PFD System Software Presentation Eric Grossmann.
Software Design Review Andres Rodriguez. General System Design  MCU: STM32F405  MCU Bus Frequency: 84MHz  Memory Requirements  Flash: ~ 10Kb  RAM:
System Software Design GPS Training System Jason Corbridge May 8, 2008 Western Washington University.
LED CUBE Preliminary System Software Design Fernando J. Garcia May
ATV INSTRUMENTATION DISPLAY System Software Design Ed Raezer.
Wireless Heart Rate Monitor. On-Person Unit MC13213 (HCS08)  16 MHz Bus Frequency  On Chip Resources 60K of Flash 4K of RAM  Require Resources 15K.
Closed Loop Temperature Control Circuit with LCD Display Mike Wooldridge ECE 4330 Embedded Systems.
Serial Communication RS-232. In order to make two devices communicate, whether they are desktop computers, microcontrollers, or any other form of integrated.
HOME CONTROL SYSTEM By: Justin E. Klumpp & Leo L.S. Wan Leo L.S. Wan.
Voice Over IP – Software Western Washington University By: Jonathan R. Peterson.
Electronic Memory Game System Software Design Jack Sullivan May 08, 2007.
Conserve-A-Watt System Software Design Justin Rapozo.
Automated Aquarium Controller System Software Design ETEC 474 Western Washington University By: Gregory Rose.
28 April 2005 Brushless DC Motor Controller Software Design Presentation Western Washington University Patrick Prendergast.
Chip Config & Drivers – Required Drivers:
Intro to USB-6009 DAQ.
Wireless Optical USB Mouse
Microcontroller Applications
AVR Addressing Modes Subject: Microcontoller & Interfacing
TCSP – Software Design.
System Software Design
Automotive Technology Principles, Diagnosis, and Service
Presentation transcript:

Electronic Automotive Motor Control System Software Description Viking 32

Kernel Selection and Task Design Kernel – Micro C/OSII Micro C/OSII was selected for its flexibility and OS services 1.Queues 2.Memory Partitions 3.Mutual exclusions

Task/ISR Description Task and DiscriptionPeriod Type EctInCap0ISR – Measures time in between motor speed sensor pulses, 90 pulses per revolution. Sporadic EctInCap1ISR – Measures time in between axle speed sensor pulses, 66 pulses per revolution. Sporadic EctOverFlowISR – Handles counter wraparound for input captures above.Periodic StartTask – Initializes all tasks listed below, Shifter Port, and Port A I/ORun Once Can0BusTask – Initializes and monitors CAN busPeriodic Can0RxTask – Receives and queues CAN framesPeriodic EctRpmTask – Measures and Calculates motor and axle RPMsPeriodic InputTask – Accumulates all input data from the sensors, then puts them into a queuePeriodic CalcDataTask – Reads from two input queues, calculates data for all outputs, outputs to UITask via three output queues Periodic UITask – Reads from three queues, writes data to SCI port using VT100.Continuous

Task/ISR Specs. #TASK / ISRsPRIORITY Period Type T p-ave T p-pk T ex L ave L pk 1EctInCap0ISRISR 0Sporadic55.56μs27.78μs3.08μs EctInCap1ISRISR 1Sporadic727.26μs363.63μs3.08μs EctOverFlowISRISR 2Periodic2.72ms 6.53μs StartTask4Run Once -- 5Can0BusTask5Periodic100ms 10μs Can0RxTask6Periodic10ms 1.78μs EctRpmTask8Periodic10ms 39.2μs InputTask9Periodic50ms 131.2μs CalcDataTask10Periodic50ms 70μs UITask11Continuous-- Total CPU Load

CAN Bus Load SenderMessage Type T frame period T frame exec L bus UQM InverterElec Drive State Status100ms540μs UQM InverterElec Drive Temp Status1000ms540μs UQM InverterCan Watch Dog Status500ms540μs EAMCSTorque/Speed Command50ms540μs Total Bus Load0.0178

Modules and Descriptions EAMCS – Main program. Integrates all modules listed below into motor control system. AtoD – Initialization and analog to digital conversions. CAN – Initialization, Transmission, and Reception of data over the Controller Area Network. eamcs_display – Formats and updates data for the User Interface. BasicIO – Initializes the SCI port, formats, transmits, and receives ASCII data ECT – Handles input captures and RPM calculations. PWM – Initialization, sets pulse width modulation

EAMCS.c Code Reuse: BasicIO Module Modifications: Baud = Port = SCI1 TASKS: StartTask Can0BusTask Can0RxTask InputTask CalcDataTask UITask

AtoD.c Public Functions: void AtoDInitSingle(void) INT16U AtoDReadSingle(INT8U port) Code Reuse: None

CAN.c Public Functions: INT8U Can0Enable(void); void Can0Timing(void); void Can0Filter(INT8U id_ac_mode, INT8U *filter1, INT8U *filter2) void Can0Mask(INT8U *mask1, INT8U *mask2) INT8U Can0Rx(CAN_DATA *rx_data) INT8U Can0Tx(CAN_DATA *tx_data) void Can0IdFormat(INT8U *can_id) Code Reuse: None

eamcs_display.c Public Functions void DispConditions(void) void DispAccelVolt(INT16U acc_volt) void DispBrakeVolt(INT16U brake_volt) void DispShiftPos(INT8U s_pos) void DispGearPos(INT16U g_pos) void DispMotorRpm(INT16U m_rpm_val) void DispAxleRpm(INT16U a_rpm_val) void DispFaultBit(INT8U fault_bit) void DispEnableBit(INT8U enable_bit) void DispReqGearPos(INT8U req_gear_pos) void DispCanMotorRpmRx(INT16U m_rpm_val) void DispCanTorqueRx(INT8U torque_val) void DispCanBusVoltRx(INT8U bus_volt_val) void DispCanBusCurrentRx(INT8U bus_cur_val) void DispCanInverterTempRx(INT8U temp_val) void DispCanRotorTempRx(INT8U rotor_val) void DispCanStatorTempRx(INT8U stator_val) void DispCanWatchDogRx(INT8U comm_err, INT8U wtch_dg_err) void DispCanReqSpeedTx(INT16U speed) void DispCanReqTorqueTx(INT8U torque) void DispCanPowerReqTx(INT8U power) void DispCanMaxBusCurTx(INT8U max_current) void DispCanMaxBusVoltTx(INT8U max_volt) void DispCanControlBitTx(INT8U control_bit) void DispCls(void) Code Reuse: BasicIO Module Modifications: Baud = Port = SCI1

ECT.c Public Functions extern void EctRpmTaskInit(void) INT8U EctGetRPM0(INT16U *period) INT8U EctGetRPM1(INT16U *period) Tasks EctRpmTask ISRs ISR EctInCap0ISR(void) ISR EctInCap1ISR(void) ISR EctOverFlowISR(void) OS_EVENT *RpmMutex Code Reuse: None

PWM.c Public Functions void PwmInit100kHz(INT8U port, INT8U duty_cycle) void PwmDutyCycle(INT8U duty_cycle) INT8U PwmGetDutyCycle(void) Code Reuse: None

InputTask CalcDataTask 50ms UITask CanRxTask Intertask Communications Partitioned Memory Flow UiCanTxQueue UiCanRxQueue UiSensorDataQ CanRxDataQ SensorDataQ Heap 50ms 10ms Continuous Memory Partition Sensor Data CAN RX Data CAN TX Data

InputTask CalcDataTask 50ms UITask CanRxTask Intertask Communications Partitioned Memory Flow UiCanTxQueue UiCanRxQueue UiSensorDataQ CanRxDataQ SensorDataQ Heap 50ms 10ms Continuous Memory Partition Sensor Data CAN RX Data CAN TX Data OSQPost() OSMemGet() OSMemPut() OSQAccept()

RXCAN0 TXCAN0 CAN0 Controller CAN Module 250kbps TXCAN BUFFERS Can0Enable() Can0Filter() Can0Mask() Can0IdFormat() Can0Tx() Can0Timing() RXCAN BUFFERS Can0Rx() Can0SleepReq() Can0TxRxReq() Can0BusOffReq() Can0BusStatus() Can0BusTask Intertask Communications

InputTask AN0-2 AN00 AN01 AN02 A to D Module 0.5µs ATDDR0 ATDDR1 ATDDR2 AtoDReadSingle() AtoDInitSingle() EctGetRPM1() EctGetRPM0() RpmTask PT00 PT01 ECT Module 10ms Rpm0 Rpm1 EctInCap0ISR EctInCap1ISR EctOverFlowISR OverFlowCnt0 PeriodCnt0 OverFlowCnt1 PeriodCnt1 EctRpmTaskInit() Shifter Port PK0_L PK1_L PK2_L PK3_L PK4_L PK5_L SHIFTER_POSITION() (~(SHIFTER_PORT | 0xc0)) SHIFTER_PORT_INIT() PORT A PA2_L GEAR_SEL_FAULT() Intertask Communications

Can0RxTask RXCAN0 TXCAN0 CAN0 Controller CAN Module 250kbps TXCAN BUFFERS Can0Enable() Can0Filter() Can0Mask() Can0IdFormat() Can0Tx() Can0Timing() RXCAN BUFFERS Can0Rx() CalcDataTask CanRxDataQ PwmInit100kHz() PWM Module PwmGetDutyCycle() PwmDutyCycle() PWM0 PWM 8B8C Duty Cycle PORT A PK0_L PA3_L GEAR_SEL_ENABLE() Intertask Communications

UITask UiCanTxQueue UiCanRxQueue UiSensorDataQ Continuous TXD1 RXD1 BasicIO Module eamcs_display Module DispConditions() DispAccelVolt() DispBrakeVolt() DispShiftPos() DispGearPos() DispMotorRpm() DispAxleRpm() DispFaultBit() DispEnableBit() DispReqGearPos() DispCanMotorRpmRx() DispCanTorqueRx() DispCanBusVoltRx() DispCanBusCurrentRx() DispCanInverterTempRx() DispCanRotorTempRx() DispCanStatorTempRx() DispCanWatchDogRx() DispCanReqSpeedTx() DispCanReqTorqueTx() DispCanPowerReqTx() DispCanMaxBusCurTx() DispCanMaxBusVoltTx() DispCanControlBitTx() DispCls() Intertask Communications