100 KW ELECTRIC VEHICLE CONTROLLERINVERTER SOFTWARE DESIGN Tony

  • Slides: 10
Download presentation
100 KW ELECTRIC VEHICLE CONTROLLER/INVERTER SOFTWARE DESIGN Tony Ahmann 5/6/09

100 KW ELECTRIC VEHICLE CONTROLLER/INVERTER SOFTWARE DESIGN Tony Ahmann 5/6/09

GENERAL SYSTEM DESIGN Microchip ds. PIC 30 F 6010 A 7. 37 MHz 12

GENERAL SYSTEM DESIGN Microchip ds. PIC 30 F 6010 A 7. 37 MHz 12 k. B EEPROM 7 k. B RAM

KERNEL CHOICE Continuous loop dependent on PWM Worse case PWM period 10 ms Execution

KERNEL CHOICE Continuous loop dependent on PWM Worse case PWM period 10 ms Execution time 4 ms

TASKS Startup Task Run Motor Task

TASKS Startup Task Run Motor Task

STARTUP TASK Flux angle control reset Clear RPM buffer Initialize CAN bus Get PID

STARTUP TASK Flux angle control reset Clear RPM buffer Initialize CAN bus Get PID Parameters Initialize user parameters

RUN MOTOR TASK Pull button for start/stop motor Update LCD Send RPM, torque and

RUN MOTOR TASK Pull button for start/stop motor Update LCD Send RPM, torque and flux to Lab. VIEW

INTERRUPTS ADC ISR Calculates speed and executes vector update loop ADC sample and conversion

INTERRUPTS ADC ISR Calculates speed and executes vector update loop ADC sample and conversion triggered by the PWM period

MODULE OVERVIEW Module Tasks Public Functions ACIM. c Startup Run. Motro ADCIsr() Setup. Board()

MODULE OVERVIEW Module Tasks Public Functions ACIM. c Startup Run. Motro ADCIsr() Setup. Board() Init. User. Parms Do. Control() Dis_RPM() Diagonstics. Output() init() Get. RPM() Get. Torq() Get. Flux() Getq. PIDParms() BIN 2 DEC. c adc 2 dec() bin 2 dec() CAN 1 Initialize. c CAN 1 Initialize() CAN 1 Is. TXReady. c CAN 1 Is. TXRedy()

MODULE OVERVIEW CONTINUED Module Task Public Functions CAN 1 Receive. Message. c CAN 1

MODULE OVERVIEW CONTINUED Module Task Public Functions CAN 1 Receive. Message. c CAN 1 Receive. Message() CAN 1 Send. Message. c CAN 1 Send. Message() CAN 1 Set. Filter. c CAN 1 Set. Filter() CAN 1 Set. Operation. Mode. c CAN 1 Set. Operation. Mode() CAN 1 Set. RXMode. c CAN 1 Set. RXMode() CAN 1 Set. TXMode. c CAN 1 Set. TXMode() ENCODER. c Init. Encoder. Scaling() Idle. I 2 C. c Idle. I 2 C() INCURMOD. c Init. Cur. Model. Scaling() INIT 6010. c

MODULE OVERVIEW CONTINUED Module Task Public Functions LCD. c Wrt_Int_LCD() Wrt_Signed_Int_LCD() Init. LCD() Home.

MODULE OVERVIEW CONTINUED Module Task Public Functions LCD. c Wrt_Int_LCD() Wrt_Signed_Int_LCD() Init. LCD() Home. Clear. LCD() Chr. Pos() Wrt. Chr. Next() Wrt. LCDInst() Wrt. Lcd. Data() Wrt. Lcd. Byte Open. I 2 C. c Open. I 2 C() Start. I 2 C. c Start. I 2 C()