Implementation of DSP-based digital controller in general frequency converter

Publisher:Yuexiang888Latest update time:2006-05-30 Source: 电源技术应用Keywords:controller Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  0 Introduction
  The key to the variable frequency speed control system is to design a reasonable frequency converter, and its core is the digital controller of the variable frequency speed control system. The digital controller of the frequency converter includes signal detection, filtering, shaping, real-time completion of the core algorithm and generation of drive signals, system monitoring and protection, and other functions.
  The hardware part of the frequency converter digital control system includes
microprocessors , interface circuits and peripheral equipment. The microprocessor is the control core of the system. It processes the data input from the input interface through the internal control program to complete control calculations. and other work, through the output interface circuit to send various control signals to the peripherals. In addition to detection components and actuators, peripheral equipment also includes various operation, display and communication equipment.
  This article uses TI's TMS320F240 to design a digital controller for high-speed motor speed control systems. The frequency can be given digitally or analogously through the keyboard. At the same time, a brief analysis of its functions and technologies is given, and The output waveform of the controller when the motor is running in a steady state at 18000r/min is shown.

1. Hardware structure block diagram and working principle of the digital controller.
  The hardware of the digital controller uses TMS320F240 fixed-point DSP as the CPU, CY7C199 as the external data and program memory, and the data and program memory are 32K each; there are 16 analog/digital input channels, one of which can Used for analog frequency setting; an 8-bit digital I/O port is used, and the keyboard can be used to perform digital frequency setting through the I/O port; 4 12-bit digital/analog conversion channels are used for motor output signal control ; RS232 and SPI series compatible interfaces, in which SPI is used as an LED display of motor frequency during variable frequency speed regulation, and the SCI port is expanded into an RS232 interface. Its functional layout block diagram is shown in Figure 1.

  The operating frequency of the motor or inverter is given through the keyboard. At the same time, its frequency display is echoed on the LED through the display program inside the DSP. When the run key is pressed, the keyboard design frequency is sent to the SVPWM process that generates the space voltage vector. In the subroutine, the generated SVPWM waveform is protected by the GAL device and then output. At the same time, the real-time running dynamic frequency of the motor or frequency converter is displayed through the LED. The orthogonal encoding pulse can be connected to the photoelectric encoder of the motor to form a speed loop feedback to the system. The A/D module can be connected to the current loop of the motor. As for the protection interrupt source of the frequency conversion speed regulation system, it is mainly provided by the pin PDPINT of the DSP. It is an interruption source such as overvoltage, overcurrent, control voltage undervoltage, and overheating. The speed of the motor or the output frequency of the inverter can be changed via the keypad.

2 Hardware Design
  The digital signal processor is the core part of the digital controller. It is also the core part of the digital controller's functions such as signal detection, filtering, and shaping, real-time completion of the core algorithm, generation of drive signals, and system monitoring and protection. The functional module design of the digital controller is as follows.
2.l Design of data and program memory
  DSP is a high-speed access device and has higher requirements for peripheral interface chips. Although the DSP itself can provide 0~7 wait states in software to meet the speed requirements of off-chip access devices. Matching, but in order not to affect the control and simulation functions of the entire system, memory with relatively high access speed is generally used as the off-chip data and program memory of the DSP. This article uses CY7C199 memory, with an access time of 15ns. There is no need to provide software waiting states or add hardware waiting circuits. Because CY7C199 is a 32K 8-bit memory, 4 pieces of this memory are used to form a 32K 16-bit memory RAM. Data and program are 32K each.
2.2 Design of DSP reset and clock circuit
  In order for the system to be correctly initialized by the reset signal, there must be certain requirements for the pulse width of the reset signal. For TMS320F240, the reset signal must be at least lms. However, after power-on, it takes 20ms or even longer for the system's oscillator to reach a stable working state. Generally speaking, during power-on reset, it is more appropriate to put a low-level pulse on the reset pin for 100~200ms. According to this principle, the integrated microprocessor monitoring reset circuit of MAXIM Company is used to complete. This article uses MAX705. Compared with traditional microcomputer monitoring circuits composed of discrete components, the MAX705 monitoring chip has high reliability, good dynamic response, low power consumption, simple design, and small size. It has been widely used in electronic product design.
  In design, clocks are often not paid enough attention. In fact, clocks are a very important link in circuit design. The DSP clock can be provided externally or by an on-board oscillator. Since DSP and other chips work based on the clock, if the clock quality is not high, it will be difficult to guarantee the reliability and stability of the system. This article uses an external clock input, and an active crystal oscillator generates 10MHz pulses. It suppresses external interference through copper coating and series connection of LC filter circuits to ensure the stable operation of the system.
2.3 Serial port circuit design of RS232
  RS232 is a serial communication interface standard released by the American Electronics Industry Association in 1960. Currently, RS232C and RS232D are widely used. The standard connection of RS232C is DB25. However, in actual applications, non-standard DB9 connections are used, and the defined pins are selected according to needs in actual applications. The biggest feature of the electrical characteristics of RS232C is the use of negative logic. The level of logic 1 is - 3V - 15V, and the level of logic 0 is +3V ~ +15V. Therefore, there is a level conversion interface problem in use. In this article, a self-boosting integrated chip MAX232C is used, which is only powered by a +5V power supply. The ±10V power supply required for level conversion is generated by an on-chip charge pump. After the controller was completed, the computer's serial communication interface (SCI) was tested. The data communication was sent and received normally and could work stably.
2.4 Design of D/A output function block
  In digital control systems, D/A and A/D circuits are indispensable. Depending on various application situations, the system has different speed requirements for D/A and A/D. Same. The parallel input D/A chip DAC7625 is used in this article. It is a D/A converter with 12-bit data parallel input and 4-channel analog output. Its setup time is 10μs and its power consumption is 20mW. The power supply can be powered by single power supply +5V and dual power supply ±5V. It is widely used in motor control and data acquisition. The data input of the digital-to-analog converter DAC comes from the high 12 bits of the DSP and is sent to the data end of the DAC7625 through the 74LS245. It is powered by a single power supply of +5V. The reference voltage VHEFH uses the +2.5V provided by the precision voltage regulator device, and the VHEFL analog ground. The output is amplified by the operational amplifier TLCH2272, and the output range is 0~+5V.
2.5 Keyboard input interface circuit and LED display circuit design
  Keyboard and seven-segment LED display are the most commonly used input and output devices in microcomputer systems. It is the main channel for information exchange between humans and machines. The function of the keyboard is to convert the data and commands that people want to process into binary codes recognized by the computer, that is, symbols that the computer can recognize; the seven-segment LED display converts the computer's operation results, status and other codes into codes that people can recognize. symbol is displayed. The keyboard is the main input device of the computer system, especially in microprocessors, the keyboard design becomes inevitable. This article takes into account the rapid processing speed of DSP when designing, and uses a hardware delay circuit for the keyboard debounce link. The specific circuit is shown in Figure 2.

  The seven-segment LED display has two connection methods: static display and dynamic display. The dynamic scanning method saves hardware. There are two commonly used BCD seven-segment decoding drivers and dynamic scanning driver circuits, such as Intel 8279, Max 7219, etc. The MAX7219 chip is used in the controller. DSP has a serial interface SPl that deals with peripherals, which provides convenience for serial interface display. MAX7219 is a serial common-cathode LED digital display driver with multiple control and data registers. Its working mode can be flexibly designed through programming. It is a serial interface that is small in size, powerful in function, and flexible and convenient to use. The problem that needs to be paid attention to in application is that MAX7219 has poor EMI resistance. Relatively speaking, using MAX7221 is more reliable. Another problem is that although the instructions say that the register can use any number, for example, the high 4 bits in the data format are represented by XXXX, but in practical applications it is best to use non-zero bits. This article uses 1111 to represent it. Can increase anti-interference ability. In addition, an appropriate amount of capacitance must be added to the serial data line and power supply to improve the anti-interference ability. Pay special attention to the power supply. If the fluctuation is relatively large, the MAX7219 will be easily damaged.
2.6 Design of SVPWM pulse output module
  The space voltage vector SVPWM pulse output is a key part of the digital controller. The motor speed regulation or the frequency of the inverter is controlled by the SVPWM waveform. In order to prevent the upper and lower bridge arms of the inverter from flowing through, although dead time can be added in the internal programming of the DSP, the SVPWM pulses generated by the microprocessor may cause control chaos due to program runaway. For safety reasons, GAL devices are used. An interlock protection circuit is installed to prevent direct connection of the upper and lower devices on the same bridge arm of the inverter. The digital controller uses Lattice's GAL16V8.

3 Software Design
  As the frequency converter products continue to mature, its functions are constantly enriched and its reliability is continuously improved, which leads to the complexity and difficulty of its programming. The variable frequency speed control system designed in this article is for laboratory bearingless high-frequency motors. It mainly completes some basic functions, such as frequency setting and display, low-speed torque compensation function, etc. The program is not particularly complicated, and the design program takes nearly 2,000 years. OK, I tested the program and proved that it works well. The entire program in the frequency conversion speed regulation system in this article mainly consists of the main program, keyboard program, display program, PWM program, fault protection interrupt program, etc.
3.l Main program and fault protection interrupt program
  The main program is the most important part of the entire program. It completes the main functions of the frequency converter. Its flow chart is shown in Figure 3(a). The program initialization part mainly includes: initialization of I/O port, initialization of waveform generator, initialization of timing counter, initialization of SPl, initialization of MAX7219, etc. Reading to the internal register means reading commonly used data into the internal register, shortening the DSP processing time and achieving better implementation. Setting frequency processing is to judge the value given by the button and determine which of the set frequencies is the final target frequency. The frequency display part is to display the final target frequency through LED in thousands, hundreds, tens and ones digits as usual. Operation control is to decide whether to start the motor operation according to the RUN key. In terms of hardware design, Fujifilm's third-generation intelligent power module IPM is used. Its internal integrated output alarm functions of factory overvoltage, overcurrent, overheating, control voltage undervoltage, short circuit, etc. are isolated by optocoupler. Then it is sent to the external interrupt source pin PDPINT of the DSP to complete the corresponding protection function. The specific flow chart is shown in Figure 3(b).

3.2 SVPWM interrupt subroutine
  PWM The interrupt subroutine is the key program of the entire controller. The completion of space voltage vector modulation is achieved by it. The specific flow chart is shown in Figure 4. The PWM generation program mainly completes the following functions: dynamic display of the frequency when the motor is running. According to the target frequency given in the main program, the angular velocity ω can be obtained. After ω is integrated, the angle θ of usref can be obtained, and then the angle of usref in the two phases is calculated. The projections usα and usβ on the α and β axes of the stationary coordinate system. With θ, the sector/N where the reference voltage vector is located can be calculated at the same time. According to the known quantity, the action time T1 and T1 of the two adjacent voltage vectors can be calculated from the common value. T2 and T0 are then assigned to the three full comparison registers CMPRx (x=1, 2, 3) inside the DSP to generate the corresponding 5VPWM waveform.

4 Experimental results
  Based on the system hardware circuit and software control algorithm introduced previously, an experimental study was conducted on the produced principle prototype. The experiment tested the no-load steady-state operation of the asynchronous motor to test the feasibility of the principle prototype. The experimental results were recorded in waveforms, including the PWM control waveform and the measured line voltage waveform of the asynchronous motor during steady-state operation at 300 Hz. As shown in Figure 5.


  The parameters of the high-frequency motor used in the experiment are as follows:
  rated voltage Un=220V, rated current In=1.5A, rated frequency f=400Hz, number of pole pairs of the asynchronous motor=1, rated power Pe=800W, and rated no-load current 0.75A.

5 Conclusion
  The digital controller with TMS320F240 digital signal processor as the core is a signal processing system. This system can complete signal detection, filtering, shaping, real-time completion of core algorithms, generation of driving signals, system monitoring and protection, etc. Function, compared with the system composed of general single-chip microcomputer, it has fast processing speed, better real-time performance, and is easy to select and cooperate. At the same time, it integrates measurement, monitoring, and protection, and can communicate with the host computer, so it has high use value. .

Keywords:controller Reference address:Implementation of DSP-based digital controller in general frequency converter

Previous article:ADSP-TSl01 with TigerSHARC structure and its application
Next article:Digital acquisition and detection of radar video signals based on DSP

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号