Download Application note - Freescale Semiconductor

Transcript
Software implementation on the MC9S12ZVML128
e_calib_done
state = align;
event = e_align;
EnableOutput();
uDQReq.f16Arg1 = ALIGN_VOLTAGE;
uDQReq.f16Arg2
= FRAC16(0);
thTransform.f16Arg1 = GFLIB_Sin(0);
thTransform.f16Arg2 = GFLIB_Cos(0);
GMCLIB_ParkInv(&uAlBeReq,&thTransform,&uDQReq);
svmSector = GMCLIB_SvmStd(&pwm16),&uAlBeReq);
false
AlignCntr= 0x0
true
ClearVariablesAfterAlign();
Set50%Duty();
SetDutycycle();
e_align_done
Figure 22. Flow chart of state ALIGN
A transition to FAULT state is performed automatically when a fault occurs. Transition to INIT state is
performed by setting the event to event=e_app_off, which is done automatically on falling edge of
switchAppOnOff=false using FreeMASTER.
4.3.3.6
State – RUN
e_align_done
RUN
e_app_off
e_run
Figure 23. RUN state with transitions
In this state, the FOC algorithm is calculated, as described in section PMSM field oriented control.
The control is designed such that the drive might be operated in three modes depending on the source of
the position information:
1. Force mode: The FOC control is based on the generated position (so called open loop position),
also this position is supplied to eBEMF observer in order to initialize its state.
3-phase Sensorless PMSM Motor Control Kit with MagniV MC9S12ZVM Application Note Rev. 0 05/2015
Freescale Semiconductor, Inc.
25