2 Ağustos 2007 Perşembe

Introduction


The applications of VLSI in motor control are getting more and more important and popular. In 1980s and 1990s, microprocessors, such as Intel's 8080, 8031, 8098, 80196 and Motorola's 68000, were mostly used in motor control. Recently, microcontroller are widely used in industry and the application of DSP and FPGA emerged in recent a couple of years. Both microcontrollers and DSPs are presently used in motor control; however, because of the real-time control algorithms that must be processed, the majority of these applications are driven by microcontrollers. This is partially due to engineers' comfort with microcontrollers and lack of familiarity with programming DSPs; however, DSPs are expected to surpass microcontrollers in the precision control of motors by 2003.


Embedded motor control applications are expected to reach 7.3 billion units by 2001 (source: Motion Tech Trends). Motor control is a significant, but often ignored, segment of embedded applications. Motor control applications span everything from washing machines to fans, hand-held power tools, and automotive window lift and traction control systems. In most of these applications there is a move away from analog motor control to precision digital control of motors.Digital control of motors permits a much moreefficient operation of the motor, resulting in longer life, lower power dissipation, and a lower overall system cost.


In motor control area, the applications of DSP and microcontroller is for control of DCmotor, brushless DC motor, brushless permanent magnet servo motor, AC inductionmotor (IM), and switched reluctance motors. In this project, a single phase IM (SPIM) isused for adjustable speed control because it is widely used in our daily life. To controlthis SPIM, two hardware implementation will be done, one is to use micro-controller PIC17C756 by Microchip and another is to use TMS320F240 by Texas Instrument.

SPIM Requirements

SPIM is used for most of the heating, ventilation, air-conditioning (HVAC) applications. Normally, it has two windings: main and auxiliary while auxiliary winding has more turns than main winding has. To do the adjustable speed control, two voltages must be supplied to the main winding and auxiliary winding with variable frequencies and variable amplitudes and they are subjected to the following constraints:
  • Voltage ratio Vaux /Vmain is approximately equal to the effective turns ratio a, Naux /Nmain (»1.37 for the motor used for this project).
  • Current ratio is I aux /I main=1/aVaux leads Vmain by 90º at rated frequency
  • Constant V/Hz (voltage frequency ratio) for adjustable speed control

click to enlarge


Previously, the phase shift of Vaux leading Vmain by 90º was done by putting a capacitor in series with the auxiliary winding and then paralleling with main winding. The adjustable speed is done by putting some inductor in series with thewindings. With the developments in power electronics, power converters can be used for generating the required voltages for SPIM. The typical configuration is shown in Fig. 1. Typically, the voltage for the auxiliary winding is higher than that for main winding so that the voltage output for the rectifier plus inverter is not high enough. If the voltage doubler is used instead of the rectifier, the DC bus voltage can be double of the dc bus voltage. Therefore, it is enough to generate required voltages. The drive system is composed of and voltage doubler and an inverter as shown in Fig. 2.

click to enlarge

Pulse Width Modulation (PWM)

click to enlarge


PWM is widely used in power electronics to "digitalize" the power so that a sequence of voltage pulses can be generated by the on and off of the power transistors. The fundamental component has variable magnitude and variable frequency. The PWM output pulses are shown in Fig. 5 and its frequency spectrum is shown in Fig. 6 Sinusoidal triangle PWM (SPWM) is the mostly used method. Triangle wave is used as carrier and reference signal is sinusoidal wave, whose frequency is the desired frequency and amplitude is determined by desired voltage amplitude, DC voltage and carrier amplitude. The fundamental component is what we want to drive the motor. Because the equivalent circuit of the motor is composed of resistors and inductors, the motor is like inductive impedance so that the effect high frequency components can be neglected.

click to enlarge

DSP Approach

Implementation of advanced motor drive systems requires the following features from a typical motor controller

• Capability of generating multiple high frequency, high-resolution PWM waveforms.
• Fast processing to implement advanced algorithms to minimize torque ripple, on line parameter adaptation, precise speed control etc.
• Implementing multiple features using the same controller (motor control, power factor correction, communication, etc.)
• Making the complete implementation as simple as possible (reduced component count, simple board layout and manufacturing etc.)
• Implementing a flexible solution so that future modi-fication can be realized by changing software instead of redesigning a separate hardware platform.

A new class of DSP controllers has addressed these issues effectively. These controllers provide the computational capability of a DSP core and integrate useful peripherals on chip to reduce the total chip count. The TI's DSP2000 family controller is becoming aviable option for even the most cost sensitive applications like appliances, HVAC systems etc.


In addition to traditional mathematical functions like digital filter, FFT implementations, this new class of DSPs integrates all the important power electronics peripherals to simplify the overall system implementation. This integrationlowers over all part count of the system and reduces the board size. The DSP controller TMS320F240 from Texas Instruments is for motor control applications.


click to enlarge


Fig. 7 shows the overall block diagram of TMS320F240. TMS320F40 has a 20MIPs 16 bit fixed point DSP core. It also integrates the following power electronics peripherals - 12 PWM channels (out of which 9 are independent), three 16 bit multi-mode general purpose timers, 16 channel 10 bit ADC with simultaneous conversion capability, four capture pins, encoder interface capability, SCI, SPI, Watch Dog etc. Six PWM channels (PWM1 through PWM6) control the three phase voltage source inverter. These six PWM channels are grouped in three pairs (PWM 1&2, PWM 3&4, PWM 5&6). Three compare registers, called Full Compare, are associated with each PWM channel pair. The compare register values are updated to obtain the proper PWM output. The on-chip software programmable, dead band module provides sufficient dead time to avoid shoot through fault. There are three more PWM channels left to implement other functions like power factor correction.To put TMS320F240 chip into application for motor control, the gate driver must be used to amplify the logic signals to 15V and powerful enough to turn on and turn off the transistors. Because the transistors have different collectors and gates at different voltage levels as shown in Fig. 2, the gate drivers (amplifiers) cannot use a common ground. Therefore, the dc power supply for those gate drivers should be isolated.


click to enlarge



A DSP card for motor drive is used, as shown in Fig. 8. The card has the following on-card facilities:

• Socket for a 64k x 16 EPROM, accessible as I/O space
• 128k x 16 RAM, accessible as 64k program and 32k external data space
• Serial ROM with non-volatile storage for 256 x 16 bits of data
• Switch-mode power supply to generate all on-card supplies
• On-card DIP switches and status LEDs
• Power-fail circuitry.


The card also supports the following peripheral interfaces:

• RS-232/RS-422/RS-485 serial interface
• High speed clocked serial peripheral interface
• 2 off isolated digital inputs
• 2 off MOSFET switch isolated outputs
• 1 off relay output, c/o contact
• 2 off AC current inputs
• 2 off differential AC voltage inputs,
• 1 off differential DC voltage input
• 1 off flexible temperature sensor input
• 2 off potentiometer analog inputs
• 2 off general purpose analog inputs (± 10V default)
• 8 off complementary isolated gate driver PWM outputs, with common fault interrupt
• +24V isolated field supply
• JTAG port for software development.
• Quadrature Position Encoder input with Index more PWM channels left to implement other functions like power factor correction.

Digital I/O


DSP240 card supports 13 bits of digital I/O, consisting of 8 bits for local I/O and 5 bits interfacing to external isolated circuitry. The local I/O consists of 4 bits driving LED's mounted on-card (LED3, LED4, LED5, LED6) and 4 bits of DIP switch inputs (S2).The isolated I/O consists of 2 off isolated digital inputs, 1 off relay output (changeover contact) and 2 off isolated MOSFET outputs. The isolated digital inputs can be driven using either the on-card generated +24V field supply, or individually isolated to be driven from an off-card supply.

This is achieved by removing a grounding link (LK15, LK18) located next to each input connector. The controller card is supplied with these links installed, to connect the common of the isolated digital outputs to the negative rail of the +24V field supply. A LED indicator is provided on the isolated side of each input as a visual indication of the state of the input. The 1 off relay output has DPST changeover contacts capable of driving 10A 240Vac.A LED indicator is provided on the coil side of the output as a visual indication of the state of the output.

The 2 off MOSFET outputs can be link selected (LK13, LK14) to be powered from either the on-card generated +24V field supply or from an off-card source. Both MOSFETs must be driven from the same supply option. The controller card is supplied with these links present, to connect the positive and negative rail of the +24V field supply to the MOSFET outputs. Both MOSFET outputs have LED indicators on the isolated side to provide a visual indication of the state of the output

Analog Inputs


The DSP chip has two off 10-bit A/D converters with individual built-in Sample and Hold circuits. Eight analog inputs are provided for each ADC through 8 to 1 analog multiplexers. This enables two input channels, one on each ADC, to be simultaneously sampled and converted. The maximum total conversion time for each ADC unit is 6.6ms.

The DSP A/D converters accept input voltages in the range of 0-5V. The analog inputs are interfaced as 2 off AC currents, 2 off AC voltages, 1 off DC voltage, 1 off temperature sensor, 2 off potentiometers and 2 off ±10V general purpose inputs. The AC current inputs require the placement of burden resistors (R17, R18) on the card, selected so that the full-scale voltage developed across each resistor ranges between ±550mV. Standoffs are provided on-card for ease of mounting these resistors. If required, capacitors (C9, C10) can be added in parallel with the sense resistors to reduce unwanted high frequency noise. Separate grounds are provided on each current connector so that each current input can be connected using individual twisted pair wires.

A common overcurrent detection is provided for both AC current inputs, with the trip level determined by resistor R112 (mounted on standoffs). The AC voltage inputs have a default input voltage range of ±750V peak. This can be reduced by mounting gain resistors (R23, R25, R27) onto standoffs on the PCB. The two AC voltage inputs are differential high impedance circuits, allowing the line-line AC voltages to be measured from a three phase system. One input voltage (Vab) supports a zero crossing detect circuit, which drives a DSP capture input. The DC voltage input has a default input voltage range of 928V. This can be reduced by mounting gain resistors (R41, R44) onto standoffs on the PCB. The DC voltage input is a differential high impedance circuit, allowing the DC voltage to be measured between two floating rails.

A DC overvoltage detection circuit is provided for this input, with the trip level determined by resistor R111 (mounted on standoffs). The temperature sense input supports temperature measurement using a RTD or LM35DZ temperature sensing device. A 1.0mA current source can be linked (LK5) to develop the sense voltage across the RTD. The offset and gain of the temperature sense system can be varied by changing resistors R64, R67. The potentiometer inputs can be link selected (LK3, LK4) to use either on-card trimpots, or an external potentiometer located off-card. A 5V reference voltage is available at the potentiometer connector to energize an external potentiometer. The two general purpose analog inputs accept a ±10V input. Each input has a 1 megohm resistor connected to ground to stabilize the DC level.

Gate Drive Interface


The TMS320F240 DSP supports 8 PWM channel outputs, made up of 3 complementary pairs (6 outputs) with programmable deadbands and 2 independent outputs generated by-simple compare functions. The DSP240 board uses the 8 PWM channel outputs to generate the 8 gate signals, and converts these outputs to 8 isolated gate driver outputs through HCPL-316J gate driver chips. Two of the gate drive outputs require dead band compensation to be software-calculated. Isolated supplies are generated on-card for each gate drive circuit. Gate fault signals from the eight HCPL-316J's are linked together and connected to the PDPINT* interrupt. This provides a hardware interrupt to the DSP immediately on detection of a fault, which disables the PWM signals within 200 nanoseconds using internal hardware logic within the DSP.

Communications


The DSP240 controller board supports four communication protocols: RS-232, RS-422, multi-drop RS-485 and a high-speed synchronous serial peripheral interface. The DSP incorporates asingle UART, which is used for RS-232/422/485 communication. A link (LK11) is provided to select between these three communication protocols. These signals are isolated through optocouplers from the main PCB. The high-speed synchronous serial peripheral interface can be used to communicate to other computer systems. The interface can support either master or slave protocol, selected by software

On-card memory


The DSP240 controller board supports 64k x 16bit each of on-card Program RAM and Data RAM. This memory is interleaved with the DSP internal memory using the on-chip memory management hardware. The PCB also supports 64k x 16bit EPROM, mapped to the DSP I/O address space. Programs cannot be executed directly from the EPROM memory, but rather the EPROM can be used to store programs, which can be block moved to Program RAM for execution as required. The DSP240 controller board also supports 256 x 16bits of non-volatile serial ROM, which is programmed from the DSP using I/O signals on Port B.

Power Supply

The standard DSP240 controller board has an on-card switch mode power supply that accepts an input voltage in the range of 240V - 440V AC or 300V - 800V DC. The SMPS generates all necessary on-card supplies as well as an isolated current limited +24V field supply for off-card use. The DSP240 (LV) controller board has an on-card switch mode power supply that accepts an input voltage in the range of 90V - 260V AC or 130 - 370V DC

Programming

click to enlarge


The simple flow chart of the main program is shown in Fig. 9. In the main program the adjustable speed is down by the instructions from keyboard inputs. When doing the adjustable speed, the voltage and frequency ratio is maintained constant.

click to enlarge


The main program determines the voltage amplitude and frequency while PWM ISR (shown in Fig. 10) realizes the PWM by setting the proper compare registers values, dead band timer control register and timer period register, etc. Fig. 11 shows the relationship of the counter, compare register, and PWM output.

Before, dead band is considered (blue color), each pair of PWM output should be just complement. But dead time period should be considered and set to logic zero in order to avoid the conduction of both upper and lower switch in the mean time.

click to enlarge

Microcontroller Approach


Microcontrollers are widely used in industry. They are the first to have those peripherals for the motor control. PIC17C756 by Microchip is used and a control board is designed as shown in Fig. 12.

The problem for this microcontroller is that it has no dead band register and only have three PWM output. Therefore, additional logic analog circuits must be added to generate their complement signals and to generate dead time in order to avoid the overlapping of turn on for both upper and lower switches.

The main program is similar to what discussed in DSP approach. The PWM ISR also has the similar steps as DSP program. The flow chart of the PWM ISR is shown in Fig. 13.

click to enlarge

Hardware Setup

click to enlarge

With the controller ready, hardware setup is done by just connecting the wires in-between those parts, as shown in Fig. 14. A PC is connected to RS232 port on DSP board for uploading the program, running and program and control the speed by keyboard. For the microcontrlloer, the program is written in the EPROM built on the chip.

Experimental Results


Experimental results have been taken and are shown in Fig. 15 and Fig. 16. Fig. 15 shows the pulses with different width captured at different time. These pulses are the output of the gate driver (amplified gate signal for transistors). Fig. 16 shows the currents for auxiliary winding and main winding at rated speed, voltage and load. It is noted that they are sinusoidal except for some high frequency harmonics. The amplitude of the auxiliary winding current is bigger than that of main winding because the impedance of the auxiliary winding is bigger.

Conclusion

In this project, DSP TMS320F240 and microcontroller PIC17C756 have been used for SPIM adjustable speed control. By hardware implementation and program, the two approaches get the same experimental results. The controller board designed can not only used for this project but also for later other research.


Course Project for ECE734 Fall Semester 2000 at UW-Madison

Jianming Yao