12.07.2015 Views

3-Phase BLDC Motor Sensorless Control Using MC56F8013

3-Phase BLDC Motor Sensorless Control Using MC56F8013

3-Phase BLDC Motor Sensorless Control Using MC56F8013

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Main Software Flow ChartMain LoopIsrCommutation(used QTIMER 0 interrupt)IsrSpeedCurrent<strong>Control</strong>(used QTIMER_2 interrupt)PE Low Level Initialization Peripheral initialization Interrupt controller initialization FreeMaster initializationInitialize Peripheral initialization Application initialization Loading power stage and motorparametersApplicationStateMachine Proceeding according toapplication mode Case STOP Stopping <strong>BLDC</strong> commutator Case RUN Proceeding of requested speed Proceeding of requesteddirection Proceeding of Speed <strong>Control</strong>lerand Alignment Current controllerinitialization Proceeding of Current Limitingalarm Case FAULT Stopping application Reading actual time andproceeding commutationhandler Performing commutation ifneeded Updating commutation timertimeout, if needed Changing ZC input mask, ifneededIsrADCEndofScan If Speed <strong>Control</strong> is active- Calculating actual speed- Performing speed ramp- Running Speed PI controllerparallel with current limitingcontroller- Calculating PWM->ADCsampling time If Alignment Current <strong>Control</strong> isactive- Proceeding Alignment timerand finishing Alignment, iftimeout- Running Alignment Current PIcontroller parallel with currentlimiting controller- Updating PWM modules dutycycleIsrADCLimit(ZC Detecting and Protections)I N F I N I T E L O O PCommutation<strong>Control</strong> Proceeding according tocommutation status, if running Alignment Starting Running Stop Proceeding if maximum ZC errorexceeded, if running Stopping commutation, if needed Reading and filtering of DC BusVoltage and DC Bus Current Reading Back EMF Voltagesand recording actual Back-EMFphase voltage Calculating of ZC offset andupdating ADC offsets ButtonPrescaler proceeding FreeMaster recorder call, ifenabled If ZC interrupt request Proceeding ZC handler Updating commutation timertimeout according calculationsmade, if needed If ADC Limit interrupt request Evaluating source of limitinterrupt Stopping application andswitching to FAULT stateRunStopSwitch<strong>Control</strong> Reading Run /Stop switch andproceeding application modeIsrPWMReloadIsrPWMFaultUpDownSwitch<strong>Control</strong> Reading Up / Down pushbuttonsand proceeding requestedspeed Updating PWM module dutycycle woth calculated duty cycle,if Running Stopping application and PWM,in case of hardware fault request(used for hardware OverCurrentprotection)Figure 5-1. Main Software Flow Chart3-<strong>Phase</strong> <strong>BLDC</strong> <strong>Motor</strong> <strong>Sensorless</strong> <strong>Control</strong> using <strong>MC56F8013</strong>, Rev. 0Freescale Semiconductor 55

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!