ECE 390 Independent Study Formula Electric Vehicle John Gehrig Fall 2015
Project Overview ● Fomula Hybrid Vehicle Competition – Full Electric Vehicle – Cooperation Mechanical Engineering Department ● Deliver Tractive System – High Voltage Battery – Low Voltage Battery – System Wiring – Electric Motor
Objectives ● Provide Framework for CAN Communication – PACMAN Computer – Embedded Software/Hardware ● Improve on 2015 Design Efforts ● System Documentation – AMS Boards – PACMAN – Pack Wiring – CAN Bus
Design Requirements ● Formula SAE Hybrid Rules 2016 http://www.formula-hybrid.org/wp-content/uploads/2016-Formula-Hybrid-Rules-Rev-0.pdf – ● Lafayette 2015 Statement of Work http://sites.lafayette.edu/ece492-sp15/files/2015/02/LFEV-Y3-2015-01-20.pdf –
System Overivew MAGNA POWER SUPPLY HUFF DYNOMOMETER REST RACK MOUNTED COMPUTER REMOTE COMPUTER API SCPI USB SCPI RS232 TCP / IP CAN BUS JGB CAN CAN ISOLATO ISOLATOR R BATTERY PACK MOTOR CONTROLLER SYSTEM PACMAN AMS 1 AMS 7
CAN Communication
CAN Communication
PACMAN Hardware ● Pack Mangement Computer System ● Isolated Power ● Control Software – Charge Control – AMS Communication – CAN Communication ● Hardware Watchdog
Past PACMAN Hardware ● No CAN Bus ● Linux Kernel 2.6.36 – SocketCAN (2.6.25) – Complicated ● Power Consumption ● High Cost – $238 Board – $50+ BOB
PACMAN Software ● Atmel AVR Microcontroller – Low Power – Integrated CAN Communication – Open Source Toolchain – Atmel Software Framework ● Real Time Operating System (AtomThreads) ● Focus on Hardware Abstraction Layer
PACMAN Software ● GNU Make ● GCC (Atmel AVR Port) – Arduino Toolchain – Distribution Repositories – Build From Scratch ● Documented with Doxygen ● VirtualBox Build Environment
Software Organization ● Atmel ASF ● Exhuberent Ctags ● AVRDude ● Library Support ● Mercurial Repository – Atlassian BitBucket – Facebook
RTOS Task Control /** * @brief Task Description Structure */ typedef struct { ATOM_TCB *tcb_ptr; uint8_t priority; void (*entry_point)( uint32_t ); void (*init_func)( uint32_t ); uint32_t entry_param; void *stack_top; uint32_t stack_size; } ATOM_TASK; // GUI and user input task {&task_gui_tcb, 16 , task_gui, task_gui_init, 0 , &task_gui_stack[TASK_GUI_SIZE- 1 ], TASK_GUI_SIZE},
GPIO Control /** * @brief GPIO Pin Data Structure */ typedef struct { volatile uint8_t * port; volatile uint8_t * ddr; volatile uint8_t * pin; uint8_t pin_num; } GPIO_PIN; /** * @brief GPIO Pin Digital Output */ static inline void pinWrite (GPIO_PIN pin, uint8_t value) { *pin.port = (*pin.port & ~_BV(pin.pin_num)) | (value << pin.pin_num); }
AMS API // Clear AMS Bypass Mode void ams_reset_bypass ( uint8_t addr) { unsigned char msg[ 2 ] = { (addr << 1 ), // device address (write mode) RESET_BY, // device command }; // take mutex, wait until available atomMutexGet(&i2c_mutex, 0 ); // send data on i2c bus TWI_Start_Transceiver_With_Data(&msg[ 0 ], sizeof (msg)); // release mutex atomMutexPut(&i2c_mutex); }
State of Charge Algorithm ● How can battery SOC be measured? ● Coulomb Counter – Initial Condition must be ACCURATE – Unstable system (measurement error) ● Voltage Model – Noisy, requires low pass filter – Susceptible to transient current spikes
State of Charge Algorithm ● Mixed Mode Charge Estimation Algorithm – Stable System – Requires NO initial condition – Fast transient response – Low Noise ● IEEE Paper (2009) – Control Theory Codeca, F.; Savaresi, S.M.; Manzoni, V., "The mix estimation algorithm for battery State-of-Charge estimator- Analysis of the sensitivity to measurement errors.," in Decision and Control, 2009 held jointly with the 2009 28th Chinese Control Conference. CDC/CCC 2009. Proceedings of the 48th IEEE Conference on , vol., no., pp.8083-8088, 15-18 Dec. 2009
State of Charge Algorithm
State of Charge Algorithm
State of Charge Algorithm Simulink Model (Lookup Table) Simulink Results Sample Model Response LifePO4 Datasheet
AMS ● No, the AMS Firmware wasnt fixed… – Incorrect Bypass Timeout – One Monolithic File ~1000 lines – Power Consumption ● Modularization of Code Base ● Watchdog Sleep – Reduces Power Consumption (< 50 %) – Watchdog Timer Ticks Every ¼ Second
AMS Software ● Changed TIMER1 to WDT – TIMER1 does not run in sleep mode ● All I2C calls are function based ● VirtualBox Build Environment – Repeatable, Consistent – PicKit3 Doesn't work in latest MPLAB Version ● Optimizer Issues?
AMS Software int main ( void ){ // initialize the slave PIC, enable interrupts setup(); // enable global and peripheral interrupts INTCONbits.PEIE = 1 ; INTCONbits.GIE = 1 ; // save power while waiting for interrupts while ( 1 ) { // place PIC in sleep mode SLEEP(); // WDT wakeup occured, handle event_wdt(); } return 0 ; }
AMS Verification ● Automate AMS Testing – 28+ AMS Boards – Time Saving – Machine Shop ● Thorough Verification ● Validate Software ● Arduino Controlled – Easy to Build – Simple, Low Cost
AMS Test Port EV 3.7.10 AMS Test Port A break-out test connector must be provided inside the accumulator enclosure for AMS voltage testing. This port allows testing of the AMS by substituting a test box voltage for a measured cell voltage. Currently Design is Incompliant
Pack Wiring & Cabling ● Reduce Wiring Complexity ● Replace Screw Terminals ● Specify Connector Pinouts ● Buy Proper Wires, Cables ● Simply Wiring Diagram
Deutsch DT Connectors ● Huff Dynomometer ● Waterproof ● Strain Relief ● Ease of Assembly ● Professional ● Industry Standard
LFEV Pack Connectors GLV CONNECTOR 1 – CANH (YELLOW) 6 – CANL (GREEN) 2 - GND(BLACK) 5 - +12V (RED) 3 - RSVD (BROWN) 4 – RSVD (WHITE) SAFETY LOOP CONNECTOR 1 – GND (BLACK) 4 – +24V (RED) 2 – SLOOP_A (WHITE) 3 – SLOOP_B (BROWN) AMS/I2C CONNECTOR 1 – RST_NEG (PACK-) 6 – RST_POS 2 – SDA_HV 5 – SCL_HV 3 – SVDD (+5V) 4 – SVSS (PACK-)
LFEV Pack Connectors 20 Gage Wire
Demonstration System ● 3D CAD Model – Creo Parametric – AutoCAD ● Laser Cut Acrylic – New Laser Cutter ● Battery Pack Model ● Bench Power Supply
Demonstration System
Q UESTIONS & C OMMENTS
Recommend
More recommend