Google

7 Ağustos 2007 Salı

Introduction


Single-phase induction motors are extensively used in appliances and industrial controls. The Permanent Split Capacitor (PSC) single-phase induction motor is the simplest and most widely used motor of this type.

By design, PSC motors are unidirectional, which means they are designed to rotate in one direction. By adding either extra windings, and external relays and switches, or by using gear mechanisms, the direction of rotation can be changed. In this application note we will discuss in detail, how to control the speed of a PSC motor in both directions using a PIC16F72 microcontroller and power electronics.

The PIC16F72 microcontroller was chosen because it is one of the simplest and low-cost general purpose microcontrollers Microchip has in its portfolio. Even though it does not have the PWMs in hardware to drive complementary PWM outputs with dead band inserted, all PWMs are generated in firmware using timers and output to general purpose output pins.

Theory Of Operation

A PSC motor is usually a 2-phase asymmetrically wound motor. The main winding is designed to take the load current.The current flowing through the start winding is much less than the main winding. Therefore, the start winding will have a different electrical characteristic compared to the main winding. In order to produce the Magnetomotive Force (MMF) produced by the start winding very near to the main winding, the start winding has additional turns, higher resistance, and reduced current flowing through it. This makes the motor windings asymmetrical.


The motor is energized with a single-phase AC power supply, with a capacitor connected in series with the start winding (also called an auxiliary winding) as shown in Figure 1. The value of the capacitor is chosen so that the total impedance on the auxiliary winding produces sufficient phase shift in current to generate a rotating magnetic field in the air gap. Typically, the current flowing through the start winding leads the current flowing through the main winding by 90 degrees.


By adding a microcontroller-based control circuit to the motor, the voltage across the main winding and start winding can be maintained at 90 degrees to each other. The other advantage is that the starting capacitor can be removed from the circuit, thus reducing the total system cost.

Drive Topology

  1. Using an H-Bridge Inverter
  2. Using a 3-Phase Inverter Bridge

Using an H-Bridge Inverter


The first approach is relatively easy as far as the power circuit and control circuit are concerned. On the input side, a voltage doubler is used and on the output side an H-bridge, or 2-phase inverter, is used as shown in Figure 2. One end of the main and start windings are connected to each half bridge and the other ends are connected together to the neutral point of the AC power supply, which also serves as the center point for the voltage doubler.



The control circuit requires four PWMs with two complementary pairs with sufficient dead band between the complementary outputs. PWM0-PWM1 and PWM2-PWM3 are the PWM pairs with dead band. The PIC16F72 does not have PWMs designed in the hardware to output the way we need. Therefore, the PWMs should be generated in firmware and output to the port pins. Using PWMs, the DC bus is synthesized to give two sine voltages at 90 degrees out of phase with varying amplitude and varying frequency according to the VF profile. If the voltage applied to the main winding lags the start winding by 90 degrees, the motor runs in one (i.e., forward) direction. To reverse the direction of rotation, the voltage supplied to the main winding should lead the voltage supplied to the start winding.

Figure 3 and Figure 4 show the main and start winding voltages in forward and reverse respectively.

click to enlarge Fig.3

click to enlarge Fig.4


Using a 3-Phase Inverter Bridge

The input section is replaced with a standard diode bridge rectifier. The output section has a 3-phase inverter bridge. The main difference from the previous scheme is the way the motor windings are connected to the inverter. One end of the main winding and start windings are connected to one half bridge each. The other ends are tied together and connected to the third half bridge, as shown in Figure 5.

With this drive topology, control becomes more efficient; however, the control algorithm becomes more complex. The voltages V a, V b and V c should be controlled to achieve the phase difference between the effective voltages across the main and start windings to have a 90 degree phase shift to each other. The turn ratio of the start winding to the main winding is defined by:

where a is the turn ratio, and VMAIN and VSTART are the effective voltage across the main winding and the start winding.

In order to have equal voltage stress on all devices, thus improving the device utilization and provide the maximum possible output voltage for a given DC bus voltage, all three inverter phase voltages are kept at the same amplitude as follows: The effective voltage across the main and start winding is given as:

The voltages are shown in the phasor diagram in Figure 6.


As seen in the phasor diagram in Figure 6, the voltages across phase A and phase B are out of phase, and the phase difference between phase A and phase C is q degrees. By applying basic trigonometry, q can be calculated by:
By applying the Pythagorean Theorem, the voltage vector V1 can be calculated as:


Because the turn ratio remains constant for a given motor, a can be a compile time option. With this, q and V1 can be precomputed for a given motor. This simplifies the run time calculation. Based on the phase angle, phase voltages Va, Vb and Vc can be calculated as:


Vdc is the DC bus voltage, and wt is the angular velocity of the electrical cycle. The direction of rotation can be easily controlled by adding or subtracting q in the Vc calculation.

Figure 7 shows the phase voltages V a, V b and V c, and Figure 8 shows the effective voltages across the main winding (VMAIN) and the start winding (VSTART). Figure 8 also shows that the effective phase difference between the voltages is 90 degrees and the effective voltage ratio is a.

click to enlarge Fig.7

click to enlarge Fig.8

Implementation Using The Pic16f72

In order to control a 3-phase inverter bridge, we need three PWM pairs with complementary outputs. In addition, each complementary pair of PWMs needs dead time in between any OFF and ON switch events to avoid a DC bus short circuit.The PIC16F72 does not have these features in the hardware.However, this can be easily implemented using a general purpose timer and six output pins as shown in Figure 9.



Generating Software PWMs

The scheme shown here gives a fixed PWM frequency of approximately 7.9 kHz. Timer1 (1:4 prescale) is counted up from 00 to 634. At the beginning of the cycle (when Timer1 = 00), the PWMs controlling the upper switches (i.e., PWM1, PWM3 and PWM5) are turned ON. Based on the individual PWM duty cycle, the corresponding PWM output is turned OFF.

MAIN LOOP




Interrupt Service Routines (ISR)


Initialization


• PORTC<0:5> are initialized to output PWMs.

• Timer1 is initialized with 8-bit operation and 1:4 prescale.

• A/D channels are initialized to read frequency reference (AN0), motor current (AN1) and heatsink temperature (AN2).
- Frequency reference is read using a potentiometer connected to A/D Channel 0.
- Motor current is read using a shunt resistor in the DC return path. The voltage corresponding to the motor current is amplified and connected to A/D channel 1.

• Timer0 is used for setting the motor frequency based on the potentiometer setting. On every Timer0 overflow, new PWM duty cycles are advanced by 10 electrical degrees on the Sine table.
• The Sine table is loaded into RAM

• Timer0 overflow, Timer1 overflow and INT interrupts are enabled.

Main Routine

These tasks are done in the MAIN_LOOP routine:

• New PWM duty cycle is calculated by the subroutine UPDATE_PWM_DUTYCYCLES Three pointers pointing to three different values on the Sine table corresponding to the phase difference between V a, V and V . The sine table is drawn to maximum duty cycle available when the sine value reaches 90 degrees. Every value is scaled down based on the frequency input to follow a linear VF profile.

• PWM duty cycle sorting is handled by the subroutine PRIORITIZE_PWMS PWM duty cycles calculated earlier are sorted in ascending order, so that the duty cycle with minimum ON time can be addressed first and PWM with maximum duty cycle last.Corresponding Flags are set to indicate which PWM duty cycle corresponds to which PWM output

• Timer0 reload value is calculated by the subroutine TIMER0_OVERFLOW Timer0 is used for setting the motor frequency. The Timer0 reload value is calculated based on three factors: first is the frequency reference input from the potentiometer, second is the number of sine table values, and third is the MCU operating frequency.

• Polling for the ADC result is handled by the subroutine AD_CONV_COMPLETE ADC conversion is poled in the main routine. Alternatively, frequency reference (AN0), motor current (AN1) and heatsink temperature (AN2) are selected and converted.

Interrupt Service Routines (ISRs)

• Timer1 ISR: In the first three Timer1 overflow ISRs, the corresponding Odd PWM output is turned off in each ISR. The complementary output is turned on after a dead time of five cycles (1 ms). In the fourth Timer1 overflow ISR, the PWM cycle is restarted. All PWMs are turned OFF and the timer is loaded with the value corresponding to the lowest duty cycle value. This is repeated for each PWM cycle.

• Timer0 ISR: A flag is set to indicate that the Sine output should advance by 10 degrees on the Sine table. The Timer0 registers are reloaded with the value corresponding to the motor frequency reference.

• INT ISR: The INT pin is used to interface hardware overcurrent fault. Motor current is compared with a fixed voltage reference using an op amp comparator. Each time the motor current exceeds the reference, in INT ISR a count (0C_COUNT) is decremented. If the count reaches zero in one Timer0 cycle, then the motor is stopped and overcurrent is indicated. This count is reset in every Timer0 ISR.

Controlling a 3-Phase Induction Motor

The advantage of the drive topology shown in Figure 5 is the same hardware can be used to control the speed of a 3-phase induction motor. In order to control a 3-phase induction motor with a Variable Frequency (VF) technique, three pairs of complementary PWMs with dead band are required.



The DC bus is modulated with these PWMs to give three Sine voltage outputs with 120 degrees phase shift to each other as shown in Figure 12. This can be done by changing the offset pointers on the Sine table. Firmware needs to be recompiled and the part should be reprogrammed. To reverse the motor direction, the PWM loaded to two of the phases should be interchanged.


Pic16f72 Limitations


Using the PIC16F72 for control has the following limitations:

• MIPS: Generating a software PWM takes significant processing power. This limits any other application that may be required to run on the same MCU.

• PWM Frequency Range: The PWM frequency range is limited and requires firmware changes. The safe PWM frequency range is from 6 kHz to 10 kHz with an operating frequency of 20 MHz. The PWM cycle may have an error up to ±5%. The resolution is also limited between 6 to 8 bits. In addition to this, generating PWM outputs in firmware uses the on-chip Timer, program and data memory.

Control Using A Pic18f2431/4431


The PIC18FXX31 MCUs have a state-of-the-art Power Control PWM (PCPWM) module on-chip. This module can provide three pairs of complementary PWMs with programmable dead band. Programming is greatly simplified using PIC18FXX31 devices, because it reduces the task of generating the software PWMs, which takes most of the processor resource on a PIC16F72.

Conclusion

Microcontroller-based control for a PSC motor makes the system easy to implement and have control over the motor in two directions. Implementing the algorithm using a 3-phase inverter bridge gives flexibility and efficiency of control. In addition, a 3- phase induction motor can be controlled using the same hardware by making minor modifications to the firmware. The PIC16F72 is a popular low cost general purpose microcontroller from Microchip, that can be used to implement the control algorithm. To a great extent, PIC18FXX31 devices can provide flexibility in implementing motor control algorithms.

Pıc ® Interface And Power Supply


Power Sectıons and Motor Current Measurement



Microchip

2005 Microchip Technology Inc.

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.

Padmaraja Yedamale
Microchip Technology Inc.