26
© 2005 Microchip Technology Inc. DS00955A-page 1 AN955 INTRODUCTION VF control using the Sine PWM algorithm is a popular algorithm for AC induction motor control; however, this algorithm has certain drawbacks which affect the overall system efficiency. A more advanced switching algorithm, like Space Vector Modulation (SVM), over- comes the drawbacks of the Sine PWM algorithm and increases the overall system efficiency. This application note includes the description of the SVM theory and its advantages over the Sine PWM. It also discusses the SVM digital implementation for VF control using Microchip’s PIC18FXX31 8-bit micro- controllers. See the “References” section for more information on AC induction motors and their control. SINE PWM Traditionally, VF control using the Sine PWM algorithm is implemented using a Voltage Source Inverter (VSI) controlled by a programmable device (microcontroller or DSP). Its popularity is mainly due to its easy implementation and minimum online computational requirement. However, this algorithm has the following drawbacks: The Sine PWM algorithm is unable to fully utilize the available DC bus supply voltage (VDC) to the VSI. The generated line-to-line voltage is less than 90% of VDC in the linear operating region. See Appendix B: “Sine PWM” for more information. This algorithm gives more Total Harmonic Distortion (THD). Often, to reduce run-time processing load for slow controllers, three 120° phase-shifted sine tables are created in the controller memory. This is an inefficient usage of the controller memory. There is no degree of freedom in implementation. This algorithm does not facilitate more advanced vector control implementation. SPACE VECTOR MODULATION (SVM) The SVM is a sophisticated, averaging algorithm which gives 15% more voltage output compared to the Sine PWM algorithm, thereby increasing the VDC utilization. It also minimizes the THD as well as switching loss. Like Sine PWM, the SVM is also a scalar control. The direct controlled variables are the motor voltage and the motor frequency. The 3-phase line-to-neutral sine waves required for driving the 3-phase AC induction motor can be represented as 120° phase-shifted vectors (V RN, V YN, and V BN) in space, as shown in Figure 1. FIGURE 1: 3-PHASE VOLTAGE VECTORS AND THE RESULTANT SPACE REFERENCE VECTOR For a balanced 3-phase system, these vectors sum to zero. Therefore, they can be expressed as a single space reference vector (V S). By controlling the amplitude and the frequency of V S, the motor voltage and the motor frequency can be controlled. Hence, this algorithm is known as the SVM. Author: Rakesh Parekh Microchip Technology Inc. 120° V BN V YN 120° V RN 120° V S VF Control of 3-Phase Induction Motor Using Space Vector Modulation

AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

  • Upload
    haliem

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955VF Control of 3-Phase Induction Motor

Using Space Vector Modulation

INTRODUCTION

VF control using the Sine PWM algorithm is a popularalgorithm for AC induction motor control; however, thisalgorithm has certain drawbacks which affect theoverall system efficiency. A more advanced switchingalgorithm, like Space Vector Modulation (SVM), over-comes the drawbacks of the Sine PWM algorithm andincreases the overall system efficiency.

This application note includes the description of theSVM theory and its advantages over the Sine PWM. Italso discusses the SVM digital implementation for VFcontrol using Microchip’s PIC18FXX31 8-bit micro-controllers. See the “References” section for moreinformation on AC induction motors and their control.

SINE PWM

Traditionally, VF control using the Sine PWM algorithmis implemented using a Voltage Source Inverter (VSI)controlled by a programmable device (microcontrolleror DSP). Its popularity is mainly due to its easyimplementation and minimum online computationalrequirement. However, this algorithm has the followingdrawbacks:

• The Sine PWM algorithm is unable to fully utilize the available DC bus supply voltage (VDC) to the VSI. The generated line-to-line voltage is less than 90% of VDC in the linear operating region. See Appendix B: “Sine PWM” for more information.

• This algorithm gives more Total Harmonic Distortion (THD).

• Often, to reduce run-time processing load for slow controllers, three 120° phase-shifted sine tables are created in the controller memory. This is an inefficient usage of the controller memory.

• There is no degree of freedom in implementation.• This algorithm does not facilitate more advanced

vector control implementation.

SPACE VECTOR MODULATION (SVM)

The SVM is a sophisticated, averaging algorithm whichgives 15% more voltage output compared to the SinePWM algorithm, thereby increasing the VDC utilization.It also minimizes the THD as well as switching loss.Like Sine PWM, the SVM is also a scalar control. Thedirect controlled variables are the motor voltage andthe motor frequency.

The 3-phase line-to-neutral sine waves required fordriving the 3-phase AC induction motor can berepresented as 120° phase-shifted vectors (VRN, VYN,and VBN) in space, as shown in Figure 1.

FIGURE 1: 3-PHASE VOLTAGE VECTORS AND THE RESULTANT SPACE REFERENCE VECTOR

For a balanced 3-phase system, these vectors sum tozero. Therefore, they can be expressed as a singlespace reference vector (VS). By controlling theamplitude and the frequency of VS, the motor voltageand the motor frequency can be controlled. Hence, thisalgorithm is known as the SVM.

Author: Rakesh ParekhMicrochip Technology Inc.

120°

VBN

VYN

120°

VRN120°

VS

© 2005 Microchip Technology Inc. DS00955A-page 1

Page 2: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

A typical block diagram of a VSI controlled by thePIC18FXX31, which implements SVM, is shown inFigure 2. Point 0 is the midpoint of VDC (sometimescalled the Virtual Neutral Point). For safe operation ofthe VSI, whenever one switch of a half bridge (Q1) ison, the other switch of the same half bridge (Q0) shouldbe off and vice versa. This gives rise to eight distinctswitching states of the VSI. Table 1 lists all the possibleVSI switching states and respective line-to-neutralvoltages.

States 1 through 6 are called the active states, as theenergy is supplied from the supply to the motor duringthese states. States 0 and 7 are called the inactivestates, as no energy is supplied from the supply to themotor during these states. Each state can berepresented as a voltage vector in space. Figure 3shows the space vector representation of all thepossible switching states.

FIGURE 2: BLOCK DIAGRAM OF PICmicro® MCU-CONTROLLED VSI

TABLE 1: VSI SWITCHING STATES AND RESPECTIVE LINE TO NEUTRAL VOLTAGES

3-Phase ACIM

115/230 VAC

N

BY

R

Q0 Q2 Q4

Q1 Q3 Q5

PIC18FXX31PWM0 (Q0)

PWM1 (Q1)

PWM2 (Q2)

PWM3 (Q3)

PWM4 (Q4)

PWM5 (Q5)Rectifier

O

VDC/2

50/60 HzVDC/2

VDC

Switching State On Switches VRN VYN VBN Space Voltage Vector

0 Q0, Q2, Q4 0 0 0 V0

1 Q1, Q2, Q4 2/3 VDC -1/3 VDC -1/3 VDC V1

2 Q1, Q3, Q4 1/3 VDC 1/3 VDC -2/3 VDC V2

3 Q0, Q3, Q4 -1/3 VDC 2/3 VDC -1/3 VDC V3

4 Q0, Q3, Q5 -2/3 VDC 1/3 VDC 1/3 VDC V4

5 Q0, Q2, Q5 -1/3 VDC -1/3 VDC 2/3 VDC V5

6 Q1, Q2, Q5 1/3 VDC -2/3 VDC 1/3 VDC V6

7 Q1, Q3, Q5 0 0 0 V7

DS00955A-page 2 © 2005 Microchip Technology Inc.

Page 3: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

As seen in Figure 3, the entire space is distinctivelydivided into six equal sized sectors of 60°. Each sectoris bounded by two active vectors. V0 and V7 are thevoltage vectors with zero amplitude and are located atthe hexagon origin.

VS is the resultant output due to the switching states ofthe VSI. For digital implementation of SVM, the VSI isswitched at a very high frequency (FPWM). This fre-quency is high enough (>20 kHz) so as not to generateaudible noise due to switching. FPWM decides thesample time TS for VS, where TS = 1/FPWM. There arevarious switching ways to generate VS from V0, V1...V7.Mathematically, it can be represented as shown inEquation 1. Variables T0, T1…T7 in Equation 1 are ontime for the corresponding VSI states and TS is thesample time.

When the VSI follows the switching state pattern,1-2-3-4-5-6-1-2..., it is called the Six-Step PWM algo-rithm. This algorithm is easier to implement comparedto all the other control algorithms. It can generate theline-to-line fundamental voltage more than the VDC. But

this algorithm generates maximum THD. Also, the line-to-line and the line-to-neutral waveforms are not sinewaves.

SVM Switching Rules

To implement the SVM algorithm, the following switchingrules are implemented:

• The trajectory of VS should be a circle.• Only one switching per state transition.

• Not more than three switchings in one TS.• The final state of one sample must be the initial

state of the next sample.

These rules help in limiting the number of switchingactions and hence, there is a reduction in the switchinglosses. Also, they maintain symmetry in switchingwaveforms at the VSI output to achieve the lower THD.The SVM algorithm implementation, using theseswitching rules, is called Conventional SVM.

FIGURE 3: SPACE VECTOR HEXAGON

EQUATION 1:

0

VS

Ψ

Sector 1Sector 3

Sector 6

Sector 2

Sector 5

Sector 4

(Q0, Q3, Q4) V3

(Q0, Q3, Q5) V4

(Q0, Q2, Q5) V5 V6 (Q1, Q2, Q5)

V1 (Q1, Q2, Q4)

V2 (Q1, Q3, Q4)

TB

TA

V0

V7

VS = + + + + + + + T0

TS× V0

⎛⎜⎝

⎞⎟⎠

T1

TS× V1

⎛⎜⎝

⎞⎟⎠

T2

TS× V2

⎛⎜⎝

⎞⎟⎠

T3

TS× V3

⎛⎜⎝

⎞⎟⎠

T4

TS× V4

⎛⎜⎝

⎞⎟⎠

T5

TS× V5

⎛⎜⎝

⎞⎟⎠

T6

TS× V6

⎛⎜⎝

⎞⎟⎠

T7

TS× V7

⎛⎜⎝

⎞⎟⎠

TS = T0 + T1 + T2 + T3 + T4 + T5 + T6 + T7

© 2005 Microchip Technology Inc. DS00955A-page 3

Page 4: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

Different SVM Algorithms

There are various ways to implement the SVM, such as:

• Conventional SVM

• Basic Bus Clamping SVM• Boundary Sampling SVM• Asymmetric Zero-Changing SVM, etc.

All SVM algorithms have the same on time for active aswell as inactive vectors. They differ mainly in the imple-mentation of the inactive vectors, such as T0 and/or T7

distribution within TS. Discussion of the various otherSVM algorithms is beyond the scope of this applicationnote.

Time Calculation to Generate VS

Let us take an example where VS is in Sector 1 at avector angle (Ψ), as shown in Figure 4.

FIGURE 4: VECTOR VS IN SECTOR 1

It is assumed that during time TS, VS remains steady.For implementing the conventional SVM using SVMswitching rules, VS is split as shown in Equation 2.

EQUATION 2:

Equation 2 means that the VSI is in active state 1 for TA

time and it is in active state 2 for TB time. For theremaining time of TS, no voltage is applied. This can beachieved by applying inactive state 0 (or 7) for theremaining time T0 (or T7).

EQUATION 3:

The time intervals, TA, TB and T0/7, have to be calcu-lated such that the average volt seconds produced bythe vectors, V1, V2 and V0/7 along the X and Y axes, arethe same as those produced by the desired referencespace vector VS.

The modulation index or amplitude ratio is defined as:

where |VS| is the amplitude or the length of VS.

Resolving VS along the X and Y axes, we get:

EQUATION 4:

Solving for TA and TB, we get:

EQUATION 5:

T0/7 can be found from Equation 3. For better THD, T0

(or T7) is split into two and then applied at the beginningand at the end of the TS. The typical VSI switchingwaveforms in Sector 1, as defined by Equation 2,Equation 3 and the switching rules for the conventionalSVM using center aligned PWM, are as given inFigure 5.

X Axis

Y Axis

π/3ψ

V2

V1V0/7

VS

TB

TAVDC

TA

TS× V1

⎛⎜⎝

⎞⎟⎠

VS = + + TB

TS× V2

⎛⎜⎝

⎞⎟⎠

T0/7

TS× V0/7

⎛⎜⎝

⎞⎟⎠

TS = TA + TB + T0/7

⎪VS⎪VDC

m =

(VDC × TA) + (VDC × cosπ/3 × TB) = ⎪VS⎪ × cosψ × TS

and

VDC × sinπ/3 × TB = ⎪VS⎪ × sinψ × TS

TA

TS

π3 – ψ⎛⎜⎝

⎞⎟⎠

2√3

× m × sin=

TB

TS

2√3

× m × sinψ=

DS00955A-page 4 © 2005 Microchip Technology Inc.

Page 5: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE 5: TYPICAL VSI SWITCHING WAVEFORMS IN SECTOR 1

We can observe the different axes of symmetry in allthe waveforms as shown in Figure 5. These symme-tries are mainly responsible for having lower THD inSVM compared to Sine PWM in the linear operatingregion.

From Figure 3, it is clear that in the linear operatingregion, the maximum line-to-line voltage amplitude canbe achieved when VS is rotated along the largestinscribed circle in the space vector hexagon. Inmathematical terms, this is equivalent to:

EQUATION 6:

From Figure 4 and Equation 6, it is also clear that:

EQUATION 7:

By solving Equation 2, Equation 5 and Equation 7, weget:

EQUATION 8:

Equation 8 shows that it is possible to get line-to-linevoltage amplitude as high as VDC using the SVM algo-rithm in the linear operating range. This is the mainadvantage of the SVM algorithm when compared to theSine PWM algorithm. Due to higher line-to-line voltageamplitude, the torque generated by the motor is higher.This results in better dynamic response of the motor.

Q1

TSTSTS

Q0

Q3

Q2

Q5

Q4

Axes of Symmetry

TS

TATBTBTATATBTA TBT0/2 T7/2 T7/2 T0/2 T0/2 T7/2 T7/2 T0/2

mmax =VDC

Radius of Largest Inscribed Circle

mmax =VDC

VDC × cosπ/6 = cosπ/6 = √3

2

= × mmax × VDC2√3

√32

×

Maximum Line-to-Line Voltage

× VDC = VDC= 2√3

© 2005 Microchip Technology Inc. DS00955A-page 5

Page 6: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

The reason for the higher line-to-line voltage in SVMcan be explained with the help of Figure 6. It shows thephase voltage (line-to-virtual neutral point) generatedby Sine PWM and SVM. For clarity, only two phasevoltages (RO and YO) and their resultant line-to-linevoltage (RY) are shown in each figure.

The Sine PWM generated phase voltages are sinewaves. With 120° phase shift between them, the result-ant line-to-line voltage is approximately 86.6% of VDC.But, the SVM generated phase voltages have a third

harmonic component superimposed on the funda-mental component. The addition of this harmoniccomponent is due to the effective usage of inactivestates which is not possible in the Sine PWM. With120° phase shift between them, the third harmoniccomponent is cancelled out in the resultant line-to-linevoltage in such a way that the resultant line-to-linevoltage is boosted to VDC (100%). Thus, SVMgenerates line-to-line voltage with higher amplitude(about 15% more) compared to Sine PWM.

FIGURE 6: GENERATED PHASE VOLTAGES AND CORRESPONDING LINE-TO-LINE VOLTAGE IN (A) SINE PWM AND (B) SVM

A) Sine PWM Generated Waveforms

B) SVM Generated Waveforms

DS00955A-page 6 © 2005 Microchip Technology Inc.

Page 7: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

Advantages of SVM

The advantages of SVM vis-a-vis Sine PWM are asfollows:

• Line-to-line voltage amplitude can be as high as VDC. Thus, 100% VDC utilization is possible in the linear operating region.

• In the linear operating range, modulation index range is 0.0 to 1.0 in the Sine PWM; whereas in the SVM, it is 0 to 0.866. Line-to-line voltage amplitude is 15% more in the SVM with the modulation index = 0.866, compared to the Sine PWM with the modulation index = 1. Hence, it has the better usage of the modulation index depth.

• With the increased output voltage, the user can design the motor control system with reduced current rating, keeping the horsepower rating the same. The reduced current helps to reduce inherent conduction loss of the VSI.

• Only one reference space vector is controlled to generate 3-phase sine waves.

• Implementation of the switching rules gives less THD and less switching loss.

• Flexibility to select inactive states and their distribution in switching time periods gives two degrees of freedom.

• As the reference space vector is a two-dimensional quantity, it is feasible to implement more advanced vector control using SVM.

HARDWARE USED FOR SVM IMPLEMENTATION

A PICDEM™ MC Development Board is used todevelop and test the SVM control firmware. ThePICDEM MC has a single-phase diode bridge rectifier,converting AC input to DC and a power capacitor bankthat keeps the DC bus stable. A 3-phase IGBT-basedinverter bridge is used to control the output voltagefrom the DC bus. See Appendix A: “PICDEM™ MCBoard Technical Information” for schematics of thePICDEM™ MC Development Board.

The control circuit and power circuits are opticallyisolated with respect to each other. An on-board flybackpower supply generates +5 VD, with respect to the dig-ital ground used for powering up the control circuit,including the PICmicro® device. The +5 VA and +15 VAare generated with respect to the power ground(negative of DC bus). The feedback interface circuit ispowered by the +5 VA, while the +15 VA suppliespower to the IGBT drivers located inside the IntegratedPower Module (IPM).

With optical isolation between the power and the controlcircuits, the programming and debugging tools can beplugged into the development board when main poweris connected to the board. The board communicateswith a host PC over a serial port configured with an on-chip Enhanced USART (EUSART). The on-board userinterface has two toggle switches, a potentiometer andfour LEDs for indication.

In this application note, switch SW1 is used to togglebetween the motor Run and Stop and SW2 is used totoggle the motor rotation direction. A potentiometer isused to set the speed reference as well as the modula-tion index. The LEDs are used for indication of differentstates of control.

© 2005 Microchip Technology Inc. DS00955A-page 7

Page 8: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

DIGITAL IMPLEMENTATION

To implement the SVM in the digital domain, the powercontrol PWM module of the PIC18FXX31 is utilized.The module provides up to 8 PWM output channelswith the dedicated PWM timer as its time base. Themodule has the capability to generate center alignedPWM with 14-bit resolution. This is the most importantfeature required for the SVM implementation.

VS needs to be created and rotated in space for SVMimplementation. To approximate the position of VS,Equation 3, Equation 5 and the previously mentionedswitching rules are utilized. Looking at Equation 5, onewill notice that in the same sector, TA and TB areinverted with respect to each other. Hence, only onelook-up table with time entries is needed. A look-uptable with TB entries (TABLE_TB_COUNT<MSB:LSB>)is created. The size of the look-up table is decided bythe angle resolution used. The total sector angle is 60°(π/3 radians). To get a good resolution with an 8-bitmicrocontroller like the PIC18FXX31, the entire sectoris divided into 256 points, giving an angle resolution of0.234°. The center aligned PWM is used for better THD(FPWM = 1/2 * TS).

The required motor speed in Hz is decided by the rateat which the VS is rotated. For this purpose, it isnecessary to find both the vector angle and the vectorupdate step size. To speed up the online calculations,the constant, DEGREE_CONSTANT, is defined; this isthen used to calculate the vector update step size andthe vector angle as shown in Equation 9.

Looking at the definition of DEGREE_CONSTANT, one willnotice that its value, without any multiplication factor, willresult in a fractional number less than unity forFPWM > 1.536 kHz. Almost all motor control applicationshave FPWM much higher than 1.536 kHz. Handling afractional number with any 8-bit microcontroller willrequire more CPU processing time. This requirement isdifficult to meet in the SVM implementation, where VS isupdated at every TPWM (= 1/FPWM) time interval. At thesame time, the multiplication factor value needs to besuch that its post-calculation adjustment requires theleast possible microcontroller processing time.

It is proposed that the multiplication factor be 256. Thiswill result in a 16-bit value for the vector update stepsize and hence, 16-bit vector angle pointer(VECTOR_ANGLE<MSB:LSB>). As an adjustment forthe multiplication factor, VECTOR_ANGLE_LSB isdiscarded. VECTOR_ANGLE_MSB is used as the tablepointer for reading the value of TA and TB from the look-up table. Whenever a carry is generated due to theEquation 9 addition, it physically means that the VS hasadvanced to the next sector and hence, the sectorcount (SECTOR_NO) is incremented by one. The motorvoltage is decided by the amplitude of VS (modulationindex m). To implement the same digitally, values of TA

and TB are multiplied by m. Based on TS, TA and TB, theduty cycle values for all 3 phases (R, Y and B) arecalculated as shown in Table 2.

Equations shown in Table 2 for Sector 1 are evident inFigure 5. Similarly, equations for other sectors arederived with the switching rule constraints.

EQUATION 9:

TABLE 2: DUTY CYCLE VALUES FOR THE THREE MOTOR PHASES BASED ON VS LOCATION

DEGREE_CONSTANT =360 × 256 × Multiplication Factor

60 × FPWM

Vector Update Step Size = DEGREE_CONSTANT × Required Motor Speed (Hz)

Vector Angle = Vector Angle + Vector Update Step Size

Sector No. Phase R Duty Cycle Phase Y Duty Cycle Phase B Duty Cycle

1 T0/2 T0/2 + TA TS – T0/2

2 T0/2 + TB T0/2 TS – T0/2

3 TS – T0/2 T0/2 T0/2 + TA

4 TS – T0/2 T0/2 + TB T0/2

5 T0/2 + TA TS – T0/2 T0/2

6 T0/2 TS – T0/2 T0/2 + TB

DS00955A-page 8 © 2005 Microchip Technology Inc.

Page 9: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

SVM CONTROL FIRMWARE

The firmware is developed using PIC18F4431 and itimplements the VF control using the SVM algorithm.Apart from the basic SVM control, the firmware incor-porates various control and protection routines, suchas overcurrent protection, overvoltage protection, over-temperature protection, acceleration and decelerationroutine and rotation direction reversal.

To implement the VF control, an analog potentiometer(R44) connected to RA1/AN1 is read. Using theCONVERT_MANUAL_COUNT_TO_HZ routine, the potenti-ometer setting is converted to the required motor speedin Hz. The potentiometer setting is also interpreted asthe modulation index, m. To get the required motorspeed, the vector update step size is calculated bycalling the CALCULATE_UPDATE_STEP_SIZE routine.As described in the previous section, TA and TB valuesare scaled with m.

All protection routines (overcurrent, overvoltage andovertemperature) are checked at a fixed time interval(presently, 5 ms set by overflow rate of the Timer1).The acceleration and deceleration routine is called atone-second intervals.

Overcurrent Protection

A shunt resistor (R110) in the negative DC bus gives avoltage corresponding to the current flowing into themotor winding. This voltage is amplified and comparedwith a reference. The current comparison setting allowsa current up to 6.3A. If the current exceeds 6.3A, theFAULTA pin goes low, indicating the overcurrent Fault.The firmware is configured in the Cycle-by-Cycle Faultmode. When the Fault persists for more than a pre-programmed count (MAX_FLTA_COUNT) in the fixedtime interval, then the motor is stopped and the Fault isindicated by the blinking LED1.

Overvoltage Protection

The DC bus voltage is attenuated using potential divid-ers and compared with a fixed reference. If the jumperJP5 is open, the reference is set for 200V on the DCbus. If jumper JP5 is shorted, the reference is set for400V. The FAULTB pin is used to monitor the over-voltage Fault. If the overvoltage Fault persists for morethan a preprogrammed count (MAX_FLTB_COUNT) inthe fixed time interval, then the motor is stopped andthe Fault is indicated by the blinking LED2.

Overtemperature Protection

The power module has an NTC thermal sensor, output-ting 3.3V at 110°C on the junction of IGBTs. The NTCoutput is connected to AN8 through an optocoupler.The temperature is continuously measured and if itexceeds 110°C (MAX_JUNCTION_TEMP) for more than

a preprogrammed count (MAX_TEMP_FILT_COUNT),then the motor is stopped and the overtemperatureFault is indicated by the blinking LED3.

Whenever the motor is stopped due to any of the abovementioned Faults, it can be restarted by removing theFault condition and then by pressing either SW1 orSW2.

Acceleration and Deceleration

The RAMP_SPEED routine is called every 1 second toimplement the acceleration and deceleration feature.Both the acceleration and deceleration rates are user-selectable and are given in the form of Hz/s.Theacceleration and deceleration features are active onlywhen the motor is in run condition.

SOURCE CODE FILES

The entire source code can be downloaded fromMicrochip’s web site, www.microchip.com. It includesthe following files:

• ...\SVM\ACSVM_OL.asm

This file is located in the source code folder (MainRoutine section).

• ...\SVM\ACSVM_OL_routines.asm

This file is located in the source code folder (ControlRoutine section).

• ...\SVM\TIME_TABLE.asm

This file is located in the source code folder (Look-upTable for TB).

• ...\SVM\InterfaceACSVMConstant.inc

This file is located in the source code folder (SystemParameters and User-Defined Constants section).

• ...\SVM\InterfaceACSVMVar.inc

This file is located in the source code folder(User-Defined Variable section).

An Excel file (PARAMETERS.xls) is included in thesource code folder which has two worksheets. TheTB_TABLE worksheet calculates TB entries based onthe main oscillator frequency (FOSC), FPWM, therequired dead time, etc. The LIST worksheet creates atable to be stored in the data EEPROM of thePIC18FXX31 device. This table contains all user-selectable compile-time parameters, such as the motorrated speed in Hz, FPWM in kHz, the required dead timein μs, etc. The user should make sure that the table isentered in the ACSVM_OL.asm file as shown in theworksheet.

An overview of the firmware’s logic flow is provided inFigure 7 and Figure 8. A complete list of systemparameters and user-defined functions is provided inTable 3 through Table 5.

© 2005 Microchip Technology Inc. DS00955A-page 9

Page 10: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE 7: SVM IMPLEMENTATION FLOWCHART (MAIN ROUTINE)

START

Motor Parameters and On-ChipPeripherals Initialization

Blink all LEDs at a Rate Set bythe Potentiometer

No Is SW1/SW2pressed?

Yes

Configure PCPWM Module andSet Default Rotation Direction

Call KEY_CHECK toDetermine Pressed Key

Call PROCESS_KEY_PRESSEDto Act on the Pressed Key

Has TMR1overflowed?

No

Call FAULT_CHECK to Check forFault and Display the same, if any

Call CONVERT_MANUAL_COUNT_TO_HZ to Convert the PotentiometerSetting to the Required Motor Speed in Hz and to Set the Modulation Index

Is 1 sec timeinterval over?

Call RAMP_SPEED to Accelerate/Decelerate the Motor

Call CALCULATE_UPDATE_STEP_SIZE to FindVector Update Step Size based on the Motor Speed

Yes

No

Yes

Main Routine

DS00955A-page 10 © 2005 Microchip Technology Inc.

Page 11: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE 8: SVM IMPLEMENTATION FLOWCHART (INTERRUPT SERVICE ROUTINES)

ISR_HIGH

Is PTIF = 1?

Yes

Increment Sector Number by 1

Is SectorNumber > 5?

No

Calculate TA, TB, T0/2 and(TS – T0/2) using the Vector Angle

High Priority Interrupt Service Routine

Vector Angle = Vector Angle + Vector Update Step Size

Is carrygenerated?

No

Yes

Reset Sector Number to 0

Yes

Load PWM Duty CycleRegisters as per Table 2

RETFIE

ISR_LOW

Is ADIF = 1?

Yes

Reload TMR1 for 5 msec Overflow Rate

Low Priority Interrupt Service Routine

Read Phase Currents, IGBT Junction Temperature

Is TMR1IF = 1?

No

Yes

Increment RAMP_COUNT by 1 (used for giving 1 sec time

Toggle LEDs

RETFIE

and the Potentiometer Setting for the Motor Speed

interval for acceleration/deceleration feature)

IsSW1/SW2 pressed

any time?

No

Yes

No

No

© 2005 Microchip Technology Inc. DS00955A-page 11

Page 12: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

TABLE 3: USER-DEFINED PARAMETERS IN SVM FIRMWARE

TABLE 4: VARIABLES IN SVM FIRMWARE

Name Description

CHANGE_OVER_DELAY Defines rotation direction changeover for the motor. Its value equals the required changeover time in ms per 39 ms.

DIRECTION_AT_POR Defines default rotation direction at start (1 = Forward, 0 = Reverse).

CYCLE_COUNT_MAX Defines blinking rate for Fault indication. Its value equals the required blink time interval in ms per 5 ms.

MAX_FAULT_CHECK_COUNT Defines time window for Fault recognition. If any Fault occurs for more than predefined count in this time window, then the Fault is recognized and appropriate action is taken.

MAX_FLTA_COUNT Defines count for overcurrent Fault recognition.

MAX_FLTB_COUNT Defines count for overvoltage Fault recognition.

MAX_JUNCTION_TEMP Defines limit for overtemperature Fault.

MAX_TEMP_FILT_COUNT Defines count for overtemperature Fault recognition.

TMR1L_COUNT and TMR1H_COUNT Defines overflow rate for Timer1. In the present application, it is set for 5 ms.

PARAMETER_BUFFER_SIZE Defines array size for storing various compile-time parameters as well as run-time parameters. It is set at 0x35 (do not change this value).

Name Description

REQD_SPEED_REF Stores required motor speed set by the potentiometer.

SET_SPEED_HZ Stores actual motor speed (Hz).

RAMP_COUNT Stores count for Timer1 overflow. It is used for generating 1s time interval as required for acceleration/deceleration feature.

CURRENT_R Stores either total DC bus current (when used with DC shunt current measurement) or R phase current (when used with phase current sensor).

CURRENT_Y Stores Y phase current (when used with phase current sensor).

CURRENT_B Stores B phase current (when used with phase current sensor).

JUNCTION_TEMPH Stores junction temperature of the VSI switch.

SECTOR_NO Stores present sector location of VS.

MODULATION_INDEX Stores required amplitude of VS.

VECTOR_ANGLE<MSB:LSB> Stores present vector angle of VS in a sector.

TB_COUNT<MSB:LSB> Stores TB count as pointed by the vector angle.

TA_COUNT<MSB:LSB> Stores TA count as pointed by the vector angle.

HALF_T0_COUNT<MSB:LSB> Stores T0/2 count.

TS_MINUS_HALF_T0<MSB:LSB> Stores TS – T0/2 count.

TABLE_TB_COUNT<MSB:LSB> Stores array base address for TB count.

PARAMETER_BUFFER Stores array base address for compile-time and run-time parameters.

DS00955A-page 12 © 2005 Microchip Technology Inc.

Page 13: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

TABLE 5: FUNCTIONS IN SVM FIRMWARE

Name Description

KEY_CHECK Checks the status of Run/Stop (SW1) and Fwd/Rev (SW2) keys.

PROCESS_KEY_PRESSED Acts on command issued by the last pressed key.

FAULT_CHECK Checks for various Faults (overcurrent, overvoltage, overtemperature) and acts if any Fault is recognized.

CONVERT_MANUAL_COUNT_TO_HZ Converts the potentiometer setting into the required motor speed (Hz) and sets the modulation index (m).

RAMP_SPEED Implements the acceleration/deceleration feature.

CALCULATE_UPDATE_STEP_SIZE Calculates new vector update step size depending on the motor speed.

ISR_PWM Responds to setting of PTIF. This routine rotates by vector angle update step size and calculates new duty cycle values for all phases (R, Y and B).

ISR_ADC Responds to setting of ADIF. This routine reads the potentiometer setting, phase currents and junction temperature of the VSI switch and stores them at appropriate locations.

ISR_TMR1 Responds to setting of TMR1IF. This routine reloads Timer1 for 5 ms overflow rate and increments RAMP_COUNT by 1 for generating a one-second interval (required for the acceleration/deceleration feature). This routine also blinks all LEDs at start when no key is pressed.

© 2005 Microchip Technology Inc. DS00955A-page 13

Page 14: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

RESOURCE USAGE

The SVM control application consumes CPUresources, as shown in Table 6. Substantial CPUresources, especially memory and processing time,are still available to users for the development of theirown applications.

TABLE 6: RESOURCES USED IN THE MOTOR CONTROL DEMO BOARD (USING PIC18F4431)

Resource utilization, as mentioned in Table 6, is for ageneral purpose, relocatable code implementing theVF control using the SVM algorithm on PIC18F4431with 14-bit PWM resolution. A customized solution withonly 8-bit PWM resolution can conceivably result in anadditional 10% savings in CPU processing time.

CONCLUSION

VF control using the SVM in the open loop is moreenergy efficient compared to the Sine PWM. With anon-chip dedicated motor control peripheral like thepower control PWM module and the rich instruction set,the PIC18FXX31 is well suited to give a low-costsolution, implementing the VF control using the SVMalgorithm for the 3-phase AC induction motor control. Inaddition, the on-chip resources, such as the ADC andthe multiple timers, allow users to implement other con-trol (acceleration and deceleration) and protection(overcurrent, overvoltage, overtemperature) features.

REFERENCES

R. Parekh, AN887, “AC Induction Motor Fundamentals”(DS00887). Microchip Technology Inc., 2003.

P. Yedamale, AN843, “Speed Control of 3-PhaseInduction Motor Using PIC18 Microcontrollers”(DS00843). Microchip Technology Inc., 2002.

R. Parekh, AN889, “VF Control of 3-Phase InductionMotors Using PIC16F7X7 Microcontrollers”(DS00889). Microchip Technology Inc., 2004.

“PICDEM™ MC Development Board for PIC18FXX31User’s Guide” (DS51453). Microchip Technology Inc.,2004.

Resource Type UsedAvailable to User when PIC18F4431

is Used

Program Memory 1942 bytes 14442 bytes

Data Memory 93 bytes 675 bytes

EEPROM 44 bytes 212 bytes

PWM Channels 6 2

CCP/Fault Input Channels

2 0

ADC Channels 5 4

EUSART 0 1

QEI Module 0 1

Timers 1 3

External Interrupts 0 3

I/O Lines 20 16

CPU Processing Time (FPWM = 20 kHz, FOSC = 40 MHz)

~27% ~63%

DS00955A-page 14 © 2005 Microchip Technology Inc.

Page 15: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

APPENDIX A: PICDEM™ MC BOARD TECHNICAL INFORMATION

FIGURE A-1: PICDEM™ MC DEVELOPMENT BOARD FUNCTIONAL BLOCK DIAGRAM

PIC18FXX31

Optoisolators

RS-232InterfaceUser

Push Buttons

LEDs

RS-232Connector

Potentiometer

ICDConnector

Gate Driver and

IRAMS10UP60A

VoltageMonitor

Hall SensorConnector

Quad EncoderConnector

IsolatedControlSection

Power

+5 VDC

+5 VAC

Switcher

CurrentMonitor

TemperatureMonitor

Back EMFConditioner

Phase CurrentMonitors

+15 VAC

D GNDA GND

Comparator

VBUS

BridgeRectifier

AC

DC

Power Terminal Block

MotorTerminal Block

3-Phase Inverter

PCPWM

PCPWM

© 2005 Microchip Technology Inc. DS00955A-page 15

Page 16: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE A-2: BOARD SCHEMATIC, PART 1 (PIC18F4X31 MICROCONTROLLER, PCPWM ISOLATORS, CURRENT COMPARATOR AND ASSOCIATED PARTS)

RE

SE

T

SW

2 (F

WD

/RE

V)

SW

1 (O

N/O

FF

)

HIN

3

LIN

3

+5 V

A

R29

R28

1K1K

C22

0.1

μF

PW

M5

R34

R30

300

300

TLP

2630

/S

FH

6326

JP3

+5 V

D

RB

7

RB

6

PW

M5

PW

M3

PW

M2

PW

M0

PW

M1

SW

1

SW

2

RX

TXRD

4

INT1

RD

3

RD

2

INT2

PIC

18F

4431

R40

470

C26

0.1

μF

U3

C25

0.1

μF

MC

LR

R41

10K

2K

+5 V

D

R42

+5 V

D

CF1

IND

X

QE

A

QE

B

RA

5

VR

EF

CF2

CF3 RE

2

OS

C1

OS

C2

FAU

LTB

INT0

RD

0

RD

1

RC

0

RC

1

C27

0.1

μF

S2

R44 2K R43

100

+5 V

D

SW

2

+5 V

D

R97

4.7K

R98

4.7K

S4

+5 V

A

+5 V

A

+5 V

D+5

VD

HIN

2

LIN

2

C23

0.1

μFR

321K

R31

1K

C24

0.1

μFR

371K

R36

1K

TLP

2630

/S

FH

6326

TLP

2630

/S

FH

6326

VC

C

V01

V02

GN

D

AN

1

CA

1

CA

2

AN

2

1 2 3 4

8 7 6 5

U5

1 2 3

40

39

38

37

36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

RB

7/PG

D

RB

6/PG

C

RB5

/PW

M4

RB4

/PW

M5

RB3

/PW

M3

RB2

/PW

M2

RB1

/PW

M1

RB0

/PW

M0

V DD

VSS

RD

7/PW

M7

RD

6/PW

M6

RD

5

RD

4/FL

TA

RC

7/R

X/D

T

RC

6/TX

/CK/

SS

RC

5/IN

T2

RC

4/IN

T1

RD

3/SC

K/SC

L

RD

2/SD

I/SD

A

MC

LR/V

PP

RA0

/AN

0

RA1

/AN

1

RA2

/AN

2/V R

EF-

RA3

/AN

3/V R

EF+

RA4

/CA

P3

RA5

/AN

5/LV

DIN

RE0

/AN

6

RE1

/AN

7

RE2

/AN

8

VD

D

VSS

OSC

1/C

LKI/R

A7

OSC

2/C

LKO

/RA6

RC

0/T1

OSO

/T1C

KI

RC

1/T1

OSI

/CC

P2

RC

2/C

CP1

RC

3/IN

T0

RD

0/T0

CKI

/GPC

KI

RD

1/SD

O

1 2

4 3

PW

M2

PW

M3

R33

300

R35

300

PW

M4

RD5

VC

C

V01

V02

GN

D

AN

1

CA

1

CA

2

AN

2

1 2 3 4

8 7 6 5

U7

VC

C

V01

V02

GN

D

AN

1

CA

1

CA

2

AN

2

1 2 3 4

8 7 6 5

U8

PW

M0

PW

M1

R38

300

R39

300

C18

0.1

μF

C21

220

μF 2

5V

JP1

HIN

1

LIN

1

RD

4

RC

1 1 2 3

+5 V

DC

17

0.1

μFR

241M C

5333

pF

C54

33 p

F

U4:

A

MC

P60

02 8

-DIP

2 3

81

4

R26

4.7K

R25

2.8K

R27

4.7K

C52

33 p

F

C19

0.1

μF

FAU

LTC

SW

1R

96

4.7K

R95

4.7K

1 2

4 3

S3

1 2

4 3

DS00955A-page 16 © 2005 Microchip Technology Inc.

Page 17: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE A-3: BOARD SCHEMATIC, PART 2 (PIC18F2X31 MICROCONTROLLER SOCKET,USART, CLOCK OSCILLATOR NETWORK AND OPTIONAL LIN INTERFACE)

OP

TIO

NA

L

6 7

1 μF

+5 V

D

J14

8 9

1 2 3 4 5

PIN

3

PIN

1

PIN

4

PIN

2

PIN

5

PIN

6

PIN

7

PIN

8

PIN

9

C45

+5 V

D 1 μF

C44

16 14 7 13 8 4 5 15

2 11 10 12 9 1 3 6

V+

T1I

N

T2I

N

A1O

UT

A1O

UT

C1+

C1-

V-

VC

C

A1I

N

A2I

N

C2

+

C2-

GN

D

U18

MA

X23

2 16

-DIP

1 μF

C43

1 μF

C47

1 μF

C46

10 o

hmR

107

+5 V

D

JP5

JP6

RD

0

J13

+5 V

D

U17

+5 V

D

1KR10

1

1N40

07D

22

1N40

07D

21

0.1

μFC

42

50

R10

6

27V

D23

39V

D24

100K

R10

0

MC

P20

1

+5 V

D

+5 V

D

100K

R99

0.1

μFC

41

RX

RD

1

INT

1

TX

TX

INT

2

RX

PW

M0

PW

M5

PW

M4

PW

M3

PW

M2

PW

M1

RB

6

RB

7

U19

PIC

18F

2431

SW

2

SW

1

TX

RX

8 7 6 5

1 2 3 4

FA

ULT

/SLP

S

VB

AT

LIN

VS

S

RX

D

CS

/WA

KE

VD

D

TX

D

1 2 333

pF

C49

33 p

FC

48

OS

C2

OS

C1

HC

– 4

9US

Y1

INT

0

FA

ULT

B

RC

1

RC

0

QE

B

OS

C2

OS

C1

QE

A

VR

EF

CF

3

CF

1

MC

LRIN

DX

JP9

1 2 3

28 27 26 25 24 23 22 21 20 19 18 17 16 15

RB

7

RB

6

PW

M4

PW

M5

PW

M3

PW

M2

PW

M1

PW

M0

VD

D

VS

S

RC

7

RC

6

RC

5/IN

T2

RC

4/IN

T1

MC

LR/R

E3

RA

0/A

N0

RA

1/A

N1

RA

2/V

RE

F-

RA

3/V

RE

F+

RA

4/A

N4

VD

D

VS

S

OS

C1/

RA

7

OS

C2/

RA

6

RC

0

RC

1/C

CP

2

RC

2/C

CP

1

RC

3

1 2 3 4 5 6 7 8 9 10 11 12 13 14

© 2005 Microchip Technology Inc. DS00955A-page 17

Page 18: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE A-4: BOARD SCHEMATIC, PART 3 (SENSOR AND MICROCONTROLLER HEADER CONNECTORS, MONITOR LEDS)

JP4

J12

J11

J10

J9J7

J8 J2J3

D17

D18

D19

D20

CF

2

CF

3R

E2

RD

2R

D3

INT

1IN

T2

TX RX

RD

4

RD

5S

W1

SW

2

RC

0R

C1

FAU

LTB

INT

0

RD

0R

D1

PW

M0

PW

M1

PW

M2

PW

M3

PW

M5

PW

M4

RB

6

RB

7

+5 V

D MC

LR

RB

7

RB

6

CF

1

VR

EF

IND

X

QE

BR

A5

QE

A

+5 V

D+5

VD

+5 V

D+5

VD

+5 V

D+5

VD

INT0

+5 V

D+5

VD

INT1

INT2

IND

X

QEA

QEB

RD

1

RD

2

RD

0

RC

0

R10

2

470

R10

3

470

R10

4

470

R10

5

470

R23

10K

R21

10K

R22

10K

R20

1K

R18

1K

R19

1K

R17

10K

R16

10KR

1510

K

1 2 3 4 5 6

ICD

1

2 3 4 5 6

1 2 3 4 5 6 7 8

1 2 3 4 5 6

1 2 3 4 5 6 7 8 9 10

1 2 3

1 2 3 4 5

1 2 3 4 5

DS00955A-page 18 © 2005 Microchip Technology Inc.

Page 19: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE A-5: BOARD SCHEMATIC, PART 4 (SIGNAL CONDITIONER FOR SENSORLESS BLDC OPERATION)

JP11

TLP

2630

/

+5 V

D C29

0.1

μF

JP10

JP8

+5 V

A+5

VA

+5 V

A

+5 V

A

+5 V

A

+5 V

A

U13

U12

:BM

CP

6544

U12

:CM

CP

6544

U12

:DM

CP

6544

U12

:AM

CP

6544

U14

SF

H63

26

+5 V

D

INT0

INT1

IND

X

QE

A

LEG

1

LEG

2

LEG

3

VBU

S +

INT2

QE

B

FAU

LTB

R47

1K

R46

1K

R59

4.7K

C32

0.1

μF

C33

0.1

μF C34

0.1

μF

C35

0.1

μF

R67

27K

C30

0.1

μFR

531K

R51

1K

R11

31K

TLP

2630

/S

FH

6326

R54

100K

R55

100K

R10

910

0K

R68

30K

R48

300

R49

300

R60

4.7K

R63 1M

C36

0.1

μF

R69

10K

R56

100K

R74

22K

R77

22K

R70

10K

R79

22K

R82

22K

R81

560K

R76

560K

R75

560K

R80

560K

R73

560K

R78

560K R83

560K

R85

560K

R90

560K

R88

560K

R91

560KR86

560K

R87

22K

R92

27K

R84

22K

R72

10K

R71

10K R

89

30K

R65

1M

R66

1M

R62

4.7K

R50

300R52

300

R64

1M

R61

4.7K

C31

0.1

μF

JP2

1 2 3

1 2 3 4

8 7 6 5

VC

C

V01

V02

GN

D

AN

1

CA

1

CA

2

AN

2

1

4 11

2 3

-INA

+IN

A

6 5

-INB

+IN

B

9 10

-INC

+IN

C

13 12

-IND

+IN

D

1487

1 2 3 4

8 7 6 5

VC

C

V01

V02

GN

D

AN

1

CA

1

CA

2

AN

2

1 2 3

1 2 3

© 2005 Microchip Technology Inc. DS00955A-page 19

Page 20: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE A-6: BOARD SCHEMATIC, PART 5 (3-PHASE INVERTER POWER MODULE AND SHUNT CURRENT MEASUREMENT)

R12

047

0

R11

836

0

C58

100

pFR

112

10K

C57

4.7

nFC

5633

pF

C55

0.1

μF

R94 1K

R10

84.

3K

R93

300

R11

5

1K

R11

9

51K

1%

R11

7

51K

1%

R11

6

91K

R11

1

1K

R11

0

0.05

R/3

W

F2

FUS

E 6

.3X

32

C37

10

μF 1

6V

C38

10

μF 1

6V

C39

10

μF 1

6V

JP7

U20

LOC

111

8-D

IPU

4:B

MC

P60

02 8

-DIP

U11

:BM

CP

6002

8-D

IP

U11

:AM

CP

6002

8-D

IP

U15

IRA

MS

10U

P60

A

U16

SFH

618

CF1

ISM

W V U VBU

S+

HIN

1H

IN2

HIN

3

LIN

1LI

N2

LIN

3

+15

VA

DC

-

+5 V

D

+5 V

A

+5 V

A

RE2

1 2 3 4 5 6 7 8 9 10 11 12 13 14

VB

3

VS

3

NC

VB

2

VS

2

NC

VB

1

VS

1

NC V+

NC

DC

-

DC

-

DC

-

H1

H2

H3 L1 L2 L3

I TR

IP

VC

C

VS

S

15 16 17 18 19 20 21 22 23

2 3

8 4

16 5

7

6 5

7

-LE

D

+LE

D

VC

CT

I1

1 2 3 4

N/C

N/C

VC

C2 I2

8 7 6 5

+LE

D

-LE

D

1 2C

OL

EM

T

4 3

DS00955A-page 20 © 2005 Microchip Technology Inc.

Page 21: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE A-7: BOARD SCHEMATIC, PART 6 (MOTOR TERMINAL BLOCK AND OPTIONAL CURRENT TRANSDUCER CIRCUITRY)

OP

TIO

NA

LO

PT

ION

AL

OP

TIO

NA

L

R45

2.6K

LEG

1

LEG

2LE

G3

EAR

TH

FAU

LTC

CF1

+5 V

D

CF2

+5 V

D

CF3

+5 V

D

C28

33 p

F

R12

1

1K

R12

2

1K

C50

33 μ

F 35

V

C51

0.1

μF

R12

3

1K

D14

1N44

48D

131N

4448

D12

1N44

48

R Y B G

J6

U V W

OU

T

0V +5V

7 8 9

IN3IN2IN1

321

IN6IN5IN4

654

LT

S15

-NP

U10

OU

T

0V +5V

7 8 9

IN3IN2IN1

321

IN6IN5IN4

654

LTS

15-N

P

U9

OU

T

0V +5V

7 8 9

IN3IN2IN1

321

IN6IN5IN4

654

LTS

15-N

P

U6

Load

R12

40.

01R

, 1/2

Win

stea

d of

U6

Load

R12

50.

01R

, 1/2

Win

stea

d of

U9

Loa

d R

126

0.01

R, 1

/2W

inst

ead

of U

10

1 2 3 4

© 2005 Microchip Technology Inc. DS00955A-page 21

Page 22: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

FIGURE A-8: BOARD SCHEMATIC, PART 7 (POWER SUPPLY)

LN

GD

C+

DC

-

L2

10 μ

H

L3

10 μ

H

L1

10 μ

H

D3

11D

Q10

R2

1 oh

m 3

W

D1

GB

PC

2506

CR

1N

TC F1 2160

10

RV

1

C16

0.01

μF

270

VA

C

DC

-

C1

470

μF 2

50V

C5

470

μF 2

50V

D8

1N41

48

R5

27 o

hm

D5

11D

Q10

D6

11D

Q10

DC

-

U2

MO

C81

01

C14

0.1

μF

C15

2.2

nFR

347

K40

0V

J1

DC

-

D9

1N41

48

DC

-

R14

10 o

hmD

C-

E7

DC

-

DC

-

DC

-D

C-

D7

1N58

18R

11

750

ohm

D4

1N41

48

C4

47 μ

F 16

V

R6

470

ohm

R7

4.7K

R8

4.7K

C10

47 μ

F 25

VC

1110

0 μF

25V

C8

100

μF 2

5V

C9

47 μ

F 25

V

R9

1K

R13

2.4K

C12

220

pF

R10

4.7KC

633

μF

25V

R4

150K

C13

47 p

F

R12

1.3

ohm

C7

56 p

FU

1

C2

4.7

μF 4

00V

D11

1N49

37

C3

100

μF 2

5V

T1TR

AN

SFO

RM

ER

TS

D-8

77

EAR

TH

VBUS

+

+5 V

A

+15

VA

+5 V

D

E3

E4

E5 E

6 D10

D2

TL4

31

1 3 2 4 5

8 7 6 10 9

SH

OR

TIN

G L

INK

2

1

24

J17

1

3

AC

1A

C2

6

AC

INP

UT

5

4

3

2

1

1 2 3

6 5 4

NC

E C

A

CA 1

5 4 3 2 1

OC

P/F

B

VC

C D

GN

D S

IRIS4009-HORZ

DS00955A-page 22 © 2005 Microchip Technology Inc.

Page 23: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

TABLE A-1: SIGNALS USED IN THE PICDEM™ MC SCHEMATIC

Signal Name Function

+15 VA Non-isolated DC supply voltage for power components.

+5 VD Isolated supply voltage for digital components.

CF1, CF2 or CF3 Current feedback signal from designated motor phase winding. CF can also represent total motor current when current transducer measurement is used.

DC- DC bus return path.

FAULTB PCPWM Fault signal input (overvoltage).

FAULTC Fault signal input from comparator (overcurrent).

HIN1, HIN2 or HIN3 Upper leg input for designated phase to 3-phase inverter (isolated signal).

INDX Index position signal to QEI inputs on microcontroller.

INT0, INT1 or INT2 Hall effect sensor signal to interrupt-on-change inputs on microcontroller.

LEG1, LEG2 or LEG3 Current transducer signal for designated motor winding phase.

LIN1, LIN2 or LIN3 Lower leg input for designated phase to 3-phase inverter (isolated signal).

MCLR Microcontroller hardware Reset.

PWM0 through PWM5 PCPWM waveform outputs from microcontroller.

QEA, QEB Quadrature encoder sensor signals to QEI inputs on microcontroller.

RAn, RBn, RCn, RDn or REn Bit n of the designated port of the microcontroller.

RX and TX RS-232 serial receive and transmit.

SW1, SW2 Push button input from designated switch to microcontroller.

U, V, W Drive level output from inverter power module to motor.

VBUS+ DC high voltage to inverter power module.

VREF External reference voltage for overcurrent detect.

© 2005 Microchip Technology Inc. DS00955A-page 23

Page 24: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

AN955

APPENDIX B: SINE PWM

The Sine PWM is implemented using a VSI as shownin Figure 2.

At any instant, either the top or the bottom switch of ahalf bridge is on. Hence, the resultant phase-to-virtualneutral point ‘O’ (VRO, VYO and VBO) can berepresented as:

EQUATION B-1:

Vif represents the 3-phase waveforms in space with 120°(2π/3) phase shift between them. Each phase waveformcan be represented as shown in Equation B-2:

EQUATION B-2:

Substituting Equation B-2 into Equation B-1, we get:

EQUATION B-3:

The resultant line-to-line output voltage is given as:

EQUATION B-4:

From Equation B-4, it is clear that the maximum line-to-line voltage in the linear operating range is achievedwhen m = 1.

EQUATION B-5:

This clearly shows that in Sine PWM, the VDC

utilization is less than 90% (~86.6%) in the linearoperating range.

APPENDIX C: MOTOR CONTROL MADE EASY

To assist motor control developers, Microchip hasdeveloped the PICDEM™ MC Development Boardbased on the PIC18FXX31. This demo board has allthe necessary hardware for a range of motor control,for example, AC Induction motor, BLDC motor andStepper motor. Various control algorithms have beendeveloped using the demo board to assist users indeveloping motor control application. Also, a PC-basedGUI has been developed for helping users in con-figuring different motor control parameters and givingreal-time capability to monitor the motor speed, the3-phase currents and temperature.

All source code and the motor control GUI are free touse and can be downloaded from the Microchip website at:

www.microchip.com.

Vio =VDC

2× Vif (where i = R, Y, B)

VRf = m × sinθVYf = m × sin(θ + 2π/3)

VBf = m × sin(θ + 4π/3)

VRO =VDC

2(m × sinθ)

VYO =VDC

2(m × sin(θ + 2π/3))

VBO =VDC

2(m × sin(θ + 4π/3))

VRY = VRO – VYO =√3 × VDC

2× m × sin(θ + π/6)

VYB = √3 × VDC

2× m × sin(θ + (5π)/6)

VRB = √3 × VDC

2× m × sin(θ + 3π/2)

Maximum line-to-line voltage = √3 × VDC

2

DS00955A-page 24 © 2005 Microchip Technology Inc.

Page 25: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

Note the following details of the code protection feature on Microchip devices:

• Microchip products meet the specification contained in their particular Microchip Data Sheet.

• Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions.

• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property.

• Microchip is willing to work with the customer who is concerned about the integrity of their code.

• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.”

Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of ourproducts. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such actsallow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.

Information contained in this publication regarding deviceapplications and the like is provided only for your convenienceand may be superseded by updates. It is your responsibility toensure that your application meets with your specifications.MICROCHIP MAKES NO REPRESENTATIONS OR WAR-RANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED,WRITTEN OR ORAL, STATUTORY OR OTHERWISE,RELATED TO THE INFORMATION, INCLUDING BUT NOTLIMITED TO ITS CONDITION, QUALITY, PERFORMANCE,MERCHANTABILITY OR FITNESS FOR PURPOSE.Microchip disclaims all liability arising from this information andits use. Use of Microchip’s products as critical components inlife support systems is not authorized except with expresswritten approval by Microchip. No licenses are conveyed,implicitly or otherwise, under any Microchip intellectual propertyrights.

© 2005 Microchip Technology Inc.

Trademarks

The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC, and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.

AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A.

Analog-for-the-Digital Age, Application Maestro, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance and WiperLock are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.

SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.

All other trademarks mentioned herein are property of their respective companies.

© 2005, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.

Printed on recycled paper.

DS00955A-page 25

Microchip received ISO/TS-16949:2002 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona and Mountain View, California in October 2003. The Company’s quality system processes and procedures are for its PICmicro® 8-bit MCUs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified.

Page 26: AN955, VF Control of 3-Phase Induction Motor Using … · AN955, VF Control of 3-Phase Induction Motor Using Space ... ... an955

DS00955A-page 26 © 2005 Microchip Technology Inc.

AMERICASCorporate Office2355 West Chandler Blvd.Chandler, AZ 85224-6199Tel: 480-792-7200 Fax: 480-792-7277Technical Support: http://support.microchip.comWeb Address: www.microchip.com

AtlantaAlpharetta, GA Tel: 770-640-0034 Fax: 770-640-0307

BostonWestborough, MA Tel: 774-760-0087 Fax: 774-760-0088

ChicagoItasca, IL Tel: 630-285-0071 Fax: 630-285-0075

DallasAddison, TX Tel: 972-818-7423 Fax: 972-818-2924

DetroitFarmington Hills, MI Tel: 248-538-2250Fax: 248-538-2260

KokomoKokomo, IN Tel: 765-864-8360Fax: 765-864-8387

Los AngelesMission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608

San JoseMountain View, CA Tel: 650-215-1444Fax: 650-961-0286

TorontoMississauga, Ontario, CanadaTel: 905-673-0699 Fax: 905-673-6509

ASIA/PACIFICAustralia - SydneyTel: 61-2-9868-6733 Fax: 61-2-9868-6755

China - BeijingTel: 86-10-8528-2100 Fax: 86-10-8528-2104

China - ChengduTel: 86-28-8676-6200 Fax: 86-28-8676-6599

China - FuzhouTel: 86-591-8750-3506 Fax: 86-591-8750-3521

China - Hong Kong SARTel: 852-2401-1200 Fax: 852-2401-3431

China - ShanghaiTel: 86-21-5407-5533 Fax: 86-21-5407-5066China - ShenyangTel: 86-24-2334-2829Fax: 86-24-2334-2393

China - ShenzhenTel: 86-755-8203-2660 Fax: 86-755-8203-1760

China - ShundeTel: 86-757-2839-5507 Fax: 86-757-2839-5571

China - QingdaoTel: 86-532-502-7355 Fax: 86-532-502-7205

ASIA/PACIFICIndia - BangaloreTel: 91-80-2229-0061 Fax: 91-80-2229-0062

India - New DelhiTel: 91-11-5160-8631Fax: 91-11-5160-8632

Japan - KanagawaTel: 81-45-471- 6166 Fax: 81-45-471-6122

Korea - SeoulTel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934

SingaporeTel: 65-6334-8870 Fax: 65-6334-8850

Taiwan - KaohsiungTel: 886-7-536-4818Fax: 886-7-536-4803

Taiwan - TaipeiTel: 886-2-2500-6610 Fax: 886-2-2508-0102

Taiwan - HsinchuTel: 886-3-572-9526Fax: 886-3-572-6459

EUROPEAustria - WeisTel: 43-7242-2244-399Fax: 43-7242-2244-393Denmark - BallerupTel: 45-4450-2828 Fax: 45-4485-2829

France - MassyTel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79

Germany - IsmaningTel: 49-89-627-144-0 Fax: 49-89-627-144-44

Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781

Netherlands - DrunenTel: 31-416-690399 Fax: 31-416-690340

England - BerkshireTel: 44-118-921-5869Fax: 44-118-921-5820

WORLDWIDE SALES AND SERVICE

03/01/05