Inverter Control System of Alternating Current Motors Based on ARM and μC/OS-II

This paper aims to design the inverter control system of alternating current (AC) motors based on Advanced RISC Machines (ARM) and μC/OS-II. The system's hardware core is the LPC2131 in which processor successfully transplanted the μC/OS-II real-time operating system. In the form of task, each functional module of the system is achieved on the processor LPC2131. Testing and experiments show that the multi-task classify program is feasible on the embedded real-time operating system based on LPC2131 and μC/OS-II, it ensures the system's real-time, has good multi-task operating and transferring characteristics and improves the system stability and reliability.


Introduction
Digital technology is an important strategy to control AC induction motor, and it has become a mainly research and developed direction of high-performance frequency control system.Real-time responding speed and stability are two important factors to determine the performances of AC frequency motor control system.The digital AC frequency control system is a typical embedded system, and the digital characteristics are reflected in two aspects: first, all input and output signals are digital, not analog signals; second, the introduction of real-time multi-tasks operating system [1][2][3].In the system, the responding time of the various switch signals such as switching signal, start and stop signals with short time.The processing speed of all feedback informations such as voltage and current, which require very quickly.There are two ways to improve the responding speed of AC induction motor, one introduced the faster micro-controller, and the other is the embedded multi-task real-time operating system.ARM has rapid running speed and complete peripherals functional, so it is suitable for the digital variable frequency drive system for AC frequency motor.µC/OS-II is an embedded real-time multitasking operating system, which can improve responding time to various field signal and the reliability of control software.

System architecture based on ARM
The AC variable frequency control system can be divided into three part of the main circuit, control part and drive part.The block diagram of system hardware is shown in Fig. 1.
The AC-DC-AC variable voltage variable frequency circuit is introduced to the main circuit of the system, which is composed by rectifier filter module, Insulated Gate Bipolar Transistor (IGBT), inverter module and so on.The three-phase AC outputting current is adjusted for induction motors working.In the core of ARM microcontrollers, full digital control mode is designed to complete algorithm, generate PWM pulse, detect and process related electrical signals and operating conditions and so on.The LPC2131 chip produced by PHILIPS is used in the paper, which is a 32-bit RISC processor and its kernel is ARM7 TDMI, the highest frequency is 60MIPS.LPC2131 has the advantages of both DSP and 8-bit microcontroller, so it has functions of rapid running speed and peripherals functional.A 128-bit wide memory interface and unique accelerator architecture enable the 32-bit code execution at maximum clock rate.It has all the necessary functions of AC variable speed system, including 47 GPIO used for an external LCD monitoring or external keyboard, 10-bit 8-channel ADC used to receive voltage and current feedback signals with the conversion time of 2.44µs, two UART (16C550) and two fast IIC-bus and SPI used for communicate with external devices according to requirement.
The inverter switching elements are derived by the outputting 6-channel Pulse Width Modulation (PWM) pulses of ARM, the PWM signals are past the photoelectric isolation to reduce interference, then into the driving section.the speed, current, voltage information are sent back to the system through conversion and isolation by testing module, the certain duty cycle PWM pulses are output to achieve frequency conversion according to timing relationship after a certain algorithm.Furthermore, some detection functions such as over voltage, over current, over temperature and power failure are supplied to ensure system security.
3 Software design of the system 3.1 master plan of the system uC/OS-II is a complete, portable and cutting of preemptive real-time multitasking kernel, which is introduced to the software design.Based on transplantation uC/OS-II to LPC2131 processor, software extension is implemented by uC/OS-II, and the extensible work has three main parts of compiling device drivers for external devices, the application program interface functions and carrying on task partition.According to the system design requirements, five tasks modules can be established as follows: (1) Information processing task, accepting the information of other modules, and using the information to make an appropriate response.
(2) Communication task, accepting AC motor control parameters (rotational speed) \ motor start or stop control command.
(3) Measurement task, handled by an external interrupt.(4) PWM control output tasks, take the PI controller to control the PWM output.
(5) Man-machine conversation tasks, used to display parameter values of the current working state and rotating speed.

Advanced Engineering Forum Vols. 2-3
Six tasks of the software form above five tasks coupled with idle task of its own, of which the priority of information processing task is the highest and the idle task is the lowest.The information processing tasks is the system's core mission to decide the other tasks running suspend or resume according to current information.The block diagram of software system based on uC/OS-II real-time kernel extension is shown in Fig. 2.

vector control strategy
The purpose of basic idea of vector control is to achieve the control effect of AC induction motor as the DC motor [5,6].Block diagram of vector control theory is shown in Fig. 3.
Fig. 3 Block diagram of vector control theory The concrete steps of the vector control include as following: (1) the output stator current of inverter A i , B i are detected by current detecting circuit，and the C i is calculated by , after Clarke and Park transformation, the current A i , B i and C i are transformed into DC component M i and T i in a rotating coordinate, M i and T i can be used as the negative feedback amount of current loop.V β of phase voltage vector, the PWM control signal to control the inverter by the voltage space vector module.

PI controller
In the PID algorithm, the role of the scale factor P is to accelerate response of the system and to reduce the static error.However, the larger scale factor P is, the larger overshoot of the system is, and the oscillations will generate accordingly, the stability will deteriorate.The role of integral I is "cumulative function" and eliminate the static error.As long as the deviation is not zero, it can correct the control parameters and reduce the bias until to the zero, ensure the stability of system.The role of differential D is to reduce overshoot and to overcome the oscillation, but it very sensitive to disturbance.Transfer function of PID controller is: After Laplace transformation of equation ( 1), the ideal time domain PID control equation can be obtained: In order to achieve PID control to the computer, equation (2) need to be discretized, sum form and increment instead of integration and differentiation respectively.Let T be the sampling period, the discrete form of PID control equation is: Similarly, the control outputting of (k-1) sampling time can be listed: is the integral coefficient, is the differential coefficient.
Where k u ∆ is the controlling increment, equation ( 5

Flow chart of rotate controlling subprogram Experiments
The designed control circuits of AC motor drive systems are measured to obtain outputting waveforms under different duty cycles of ARM, shown in Fig. 5: (1) The duty cycle of 0.1 (2) The duty cycle of 0.8 Fig. 5 PWM waveform with different duty cycle Fig.6 is the measured waveform of same bridge arm output control signals of ARM.The measured value of dead time between control signals in same bridge arm is 5µs, the measured values are consistent to designing requirements of control circuit.In addition, the measured value of PWM signal frequency is 5KHz consistent to the designed requirements of the inverter frequency.

Conclusion
(1).The hardware core of the Designed AC variable frequency motor control system system's is the LPC2131 and the system structure is simple and reliable.
(2).The system uses the development model based on embedded real-time operating system µC/OS-II which has ensured the system's real-time, good multi-tasks running and conversion characteristics, and has improved the system stability and reliability.
(3).Based on µC/OS-II embedded real-time operating system, each functional module of AC frequency motor control can be achieved on the processor LPC2131 according to the form of each task.Tests show that the program design by the form of each task is feasible.

Fig. 1
Fig.1 Block diagram of system hardware

Fig. 2
Fig.2 Block diagram of software 3.2 vector control strategyThe purpose of basic idea of vector control is to achieve the control effect of AC induction motor as the DC motor[5,6].Block diagram of vector control theory is shown in Fig.3.

( 2 )V
speed of motor n are detected by speed detecting circuit, the deviation of the speed n and the given rotating speed ref n is the inputting of PI regulator, the output of speed PI regulator can be used to the current T-axis reference component Tref i for torque control.(3) the DC components of T i , M i and speed n are inputted to the calculation module of rotor flux position, the position of rotor flux can be calculated.(4) the deviation of reference component Tref i of current T-axis and the current feedback T i , M i are respectively sent to the inputting of current PI regulator, phase voltage component of Mref V and Tref V respectively are outputted in M and T rotating coordinate system.β of the stator phase voltage vector respectively in α and β Cartesian coordinate are transformed by the phase voltage components Mref V , Tref V after the Park inverse transformation.(6) According to the components ref s V α and ref s ) called incremental PID formula, equation (3) is known as positional PID formula.Flow chart of rotate controlling sub program is shown in Fig.4.

Fig. 7
Fig.7 Driving waveform Therefore, the experimental results show that IGBT driving circuit is normal, the outputting task program of PWM control is feasible.