Share this

Comprehensive Guide to Frequency Inverters: Control Section

2026-04-06 06:39:19 · · #1

Control

DSP-based digital controller implementation in general-purpose frequency converters

introduction

The key to a variable frequency speed control system is designing a suitable frequency converter, and its core is the digital controller of the variable frequency speed control system. The digital controller of the frequency converter includes functions such as signal detection, filtering, shaping, real-time execution of core algorithms, generation of drive signals, system monitoring, and protection.

The hardware of a frequency converter digital control system includes a microprocessor, interface circuits, and peripheral devices. The microprocessor is the control core of the system. It processes the data input from the input interface through its internal control program, performs control calculations, and sends various control signals to the external system through the output interface circuit. In addition to detection elements and actuators, the peripheral devices also include various operation, display, and communication devices.

This paper presents a digital controller for a high-speed motor speed control system designed using TI's TMS320F240. The frequency can be set digitally via keyboard or analog. The paper also provides a brief analysis of its functions and technology, and presents the controller's output waveform when the motor is running at a steady state of 18000 r/min.

1. Hardware structure block diagram and working principle of digital controller

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

Figure 1: Schematic diagram of the hardware structure of the digital controller.

The operating frequency of the motor or inverter is specified via the keyboard, and its frequency is simultaneously displayed on LEDs by the DSP's internal display program. When the run button is pressed, the keyboard-designed frequency is sent to the SVPWM processing subroutine that generates the space voltage vector. The generated SVPWM waveform is output after protection by the GAL device. At the same time, the real-time dynamic operating frequency of the motor or inverter is displayed on LEDs. Quadrature coded pulses can be connected to the motor's photoelectric encoder to form a speed loop feedback for the system. The A/D module can be connected to the motor's current loop. The protection interrupt sources for the variable frequency speed control system are provided by the DSP's PDPINT pin, mainly for overvoltage, overcurrent, undervoltage control voltage, and overheating interrupts. The motor speed or the inverter's output frequency can be changed via the keyboard.

2 Hardware Design

The digital signal processor (DSP) is the core component of a digital controller. It is essential for the controller's functions, including signal detection, filtering, shaping, real-time execution of core algorithms, generation of drive signals, system monitoring, and protection. The functional modules of the digital controller are designed as follows.

2.1 Design of Data and Program Memory

DSPs are high-speed memory devices that place high demands on peripheral interface chips. Although DSPs can provide 0-7 wait states in software to match the speed of external memory devices, to avoid affecting the control and simulation functions of the entire system, high-speed memory is generally used as the external data and program memory for the DSP. This paper uses the CY7C199 memory, with an access time of 15ns. It requires no software wait states or additional hardware wait circuits because the CY7C199 is a 32K 8-bit memory. Therefore, four of these memory chips were used to form a 32K 16-bit RAM, with 32K for data and 32K for program.

2. Design of DSP Reset and Clock Circuit

To ensure the system is correctly initialized by the reset signal, the pulse width of the reset signal must meet certain requirements. For the TMS320F240, the reset signal should be at least 1ms. However, after power-on, the system oscillator takes 20ms or even longer to reach a stable operating state. Generally, a low-level pulse of 100-200ms on the reset pin is appropriate for power-on reset. Based on this principle, an integrated microprocessor monitoring and reset circuit from MAXIM is used, specifically the MAX705. Compared to traditional microcomputer monitoring circuits composed of discrete components, the MAX705 monitoring chip offers higher reliability, better dynamic response, lower power consumption, simpler design, and smaller size, and has been widely used in electronic product design.

In circuit design, the clock is often overlooked, yet it is a crucial element. The DSP clock can be provided externally or by an onboard oscillator. Since the DSP and other chips operate based on a clock, poor clock quality compromises system reliability and stability. This paper employs an external clock input, generating a 10MHz pulse from an active crystal oscillator. Copper plating and a series LC filter circuit suppress external interference, ensuring stable system operation.

2. Serial Port Circuit Design of RS232

RS232 is a serial communication interface standard released by the Electronic Industries Association (EIA) in 1960. Currently, RS232C and RS232D are widely used.

The standard connection for RS232C is DB25. However, in practical applications, a non-standard DB9 connection is used, and the defined pins are selected according to the needs. The most significant characteristic of RS232C's electrical characteristics is its use of negative logic; logic 1 has a level of -3V to -15V, and logic 0 has a level of +3V to +15V. Therefore, a level conversion interface is required in use. This paper uses the self-boosting integrated chip MAX232C, powered only by a +5V power supply. The ±10V power 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, and data communication transmission and reception were normal, demonstrating stable operation.

2. Design of the 4D/A Output Function Block

In digital control systems, D/A and A/D circuits are indispensable. Depending on the application, the speed requirements for D/A and A/D circuits vary. This paper uses the parallel input D/A chip DAC7625, a 12-bit parallel input, 4-channel analog output D/A converter. Its settling time is 10μs, power consumption is 20mW, and it can be powered by a single +5V supply or dual ±5V supplies. It is widely used in motor control and data acquisition. The data input to the DAC comes from the high 12 bits of the DSP, which are sent to the data terminal of the DAC7625 via a 74LS245. It uses a single +5V supply, with the reference voltage VHEFH provided by a precision voltage regulator at + 2.5V , and VHEFL as analog ground. Its output...

The voltage 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

Keyboards and seven-segment LED displays are the most commonly used input and output devices in microcomputer systems. They are the main channels 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 code that the computer can recognize, that is, symbols that the computer can understand; the seven-segment LED display converts the computer's calculation results, status, and other codes into symbols that humans can recognize and display them. The keyboard is the main input device of a computer system, especially in microprocessors, where keyboard design is essential. In this design, considering the high processing speed of DSP, a hardware delay circuit is used for keyboard debouncing, as shown in Figure 2.

Figure 2: DSP keyboard input interface circuit in digital controller.

Seven-segment LED displays have two connection methods: static display and dynamic display. Dynamic scanning saves hardware. Commonly used BCD seven-segment decoder drivers and dynamic scanning driver circuits include the Intel 8279 and Max7219, with the MAX7219 chip used in the controller. The DSP has a serial interface SPl for interacting with peripherals, which facilitates serial connection to displays. The MAX7219 is a serial common-cathode LED digital display driver with multiple control and data registers. Its operation can be flexibly designed through programming. It is a small, powerful, and easy-to-use serial interface. One issue to note in application is that the MAX7219 has relatively poor EMI resistance; the MAX7221 is relatively more reliable. Another issue is that although the manual states that registers can use arbitrary numbers, such as using XXXX to represent the high 4 bits in the data format, it is best to use non-zero bits in practical applications. This article uses 1111 to increase anti-interference capability. In addition, appropriate capacitors must be added to the serial data line and power supply to improve anti-interference capability. Special attention should be paid to the power supply, as the MAX7219 is more prone to damage if the fluctuation is large.

2. Design of 6SVPWM Pulse Output Module

The Space Vector Pulse Width Modulation (SVPWM) pulse output is a crucial component of the digital controller, as motor speed regulation and inverter frequency are controlled by the SVPWM waveform. To prevent shoot-through between the upper and lower bridge arms of the inverter, although a dead time can be added during DSP programming, the SVPWM pulses generated by the microprocessor might cause control chaos due to program malfunction. Therefore, for safety, an interlock protection circuit using GAL devices is employed to prevent shoot-through between devices on the same bridge arm of the inverter. The digital controller used is the Lattice GAL16V8.

3 Software Design

As frequency converters become increasingly sophisticated, their functions are becoming richer and their reliability is constantly improving, leading to increased complexity and difficulty in programming. This paper designs a variable frequency speed control system for a laboratory bearingless high-frequency motor, primarily implementing basic functions such as frequency setting and display, and torque compensation at low speeds. The program is not particularly complex, consisting of approximately 2000 lines of code, and has been tested, demonstrating its smooth operation. The entire program of this variable frequency speed control system mainly consists of a main program, a keyboard program, a display program, a PWM program, and a fault protection interrupt program.

3.1 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, and its flowchart is shown in Figure 3(a). The program initialization part mainly includes: I/O port initialization, waveform generator initialization, timer/counter initialization, SPl initialization, MAX7219 initialization, etc. Reading data into internal registers means reading frequently used data into internal registers to shorten DSP processing time and better realize the actual operation. The frequency display part 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 in the thousands, hundreds, tens, and units digits using LEDs. The operation control is to determine whether to start the motor based on the RUN button. In terms of hardware design, the third-generation intelligent power module IPM of Fuji Electric is used. It integrates output alarm functions such as overvoltage, overcurrent, overheat, undervoltage control voltage, and short circuit. After being isolated by optocouplers, the alarms are sent to the external interrupt source pin PDPINT of the DSP to complete the corresponding protection functions. The specific flowchart is shown in Figure 3(b).

Figure 3: Flowchart of main program and protection program.

3. 2SVPWM interrupt subroutine

The PWM interrupt subroutine is the key program for the entire controller operation. It is responsible for the completion of space vector modulation. The specific flowchart is shown in Figure 4. The PWM generation program mainly performs the following functions: dynamic display of the motor running frequency. Based on the target frequency given in the main program, the angular velocity ω can be obtained. After integrating ω, the angle θ of usref can be obtained. Then, the projections usα and usβ of usref on the α and β axes of the two-phase stationary coordinate system can be calculated. With θ, the sector /N where the reference voltage vector is located can be calculated at the same time. Based on the known quantities, the action times T1, T2, and T0 of two adjacent voltage vectors are obtained from the common values. Then, values ​​are assigned to the three full comparator registers CMPRx (x=1, 2, 3) inside the DSP to generate the corresponding 5V PWM waveform.

4 Experimental Results

Based on the system hardware circuit and software control algorithm described above, experimental research was conducted on the fabricated prototype. The experiment tested the no-load steady-state operation of the asynchronous motor to verify the feasibility of the prototype. The waveforms of the experiment were recorded. Figure 5 shows the PWM control waveform and the measured line voltage waveform of the asynchronous motor during steady-state operation at 300Hz.

Figure 5: Control waveform output by the controller and measured motor line voltage waveform at 300Hz.

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 asynchronous motor=1, rated power Pe=800W, rated no-load current 0.75A .

5 Conclusion

The digital controller based on the TMS320F240 digital signal processor is a signal processing system. This system can perform signal detection, filtering, shaping, real-time execution of core algorithms, generation of drive signals, system monitoring, protection and other functions. Compared with a typical single-chip microcomputer system, it has a faster processing speed, better real-time performance, and is easier to select and integrate. It also integrates measurement, monitoring and protection, can communicate with a host computer, and has high application value.

Figure 4: Flowchart of the SVPWN interrupt subroutine.

Read next

CATDOLL 136CM Tami (Customer Photos)

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22