Research on motor control system experimental platform based on dSPACE

Publisher:幸福的家园Latest update time:2011-04-14 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction
In the experimental development process of motor control systems, which usually use microcontrollers such as DSP as the control core, a lot of programming time is required because a large amount of program code needs to be written, and if the control system algorithm needs to be changed or added, it takes more time to change the software. Therefore, the experimental development cycle is long, which is not conducive to the research and practical application of control algorithms.
dSPACE is a set of control system development and testing equipment based on Matlab/Simulink developed by the German dSPACE company. It realizes a completely seamless connection with Matlab/Simulink, can well complete the design, testing and implementation of control algorithms, and effectively overcomes the above problems existing in traditional control system development. It has the advantages of fast computing speed, easy use and friendly interface. The dSPACE real-time system is powerful. It can be connected to the actual control object (called rapid control prototyping), in which case it plays the role of the main controller; it can also be connected to the actual controller (called hardware in the loop simulation), in which case it plays the role of the controlled object. Therefore, the use of control systems based on dSPACE can shorten the development cycle and reduce development costs.

1 Structure of the motor control system experimental platform based on dSPACE The
hardware structure of dSPACE is divided into two categories: one is to integrate the processor and I/O into a circuit board to form a complete single-board system for real-time control (such as DS1103 controller board); the other is to completely separate the processor and user interface (such as DS1005PPC controller board) to achieve the upgrade and expansion of the processor and I/O capabilities. The communication between the processor and I/O is realized by the PHS (Peripheral High-speed Bus) bus.
This paper takes the DS1005PPC controller board as the core, equipped with DS2001AD acquisition board, DS2002/2003 multi-channel A/D acquisition board, CP4002 multi-I/O board, DS2102DA output board, and DS3002 incremental encoder interface board, forming the hardware part of dSPACE's standard component system DS1005. The structural block diagram of the motor control system experimental platform based on dSPACE is shown in Figure 1.

As can be seen from Figure 1, the motor control system experimental platform based on dSPACE takes dSPACE as the control core, and some related circuits need to be expanded in the periphery, such as isolation circuit, signal processing circuit, drive and power bridge circuit, protection circuit, etc., thus forming a complete motor control system experimental platform.
1.1 dSPACE hardware part
The hardware part that dSPACE has integrated itself includes DS1005PPC control board, DS4002 multi-I/O board, DS2001AD acquisition board and DS3002 rotary encoder interface board, etc. Through the CP4002 multi-I/O board, 6-channel PWM motor control signals can be output to control the opening and closing of power devices; through the DS2001AD acquisition board, analog quantities such as motor voltage and current can be collected. Especially when more analog quantities need to be collected at the same time, the DS2002/2003 with 32-channel A/D acquisition can be used; in addition, through the DS3002 rotary encoder interface board, the encoder signal at the rear of the motor can be directly input to the DS1005PPC for speed detection; in addition, there is a DS2102DA output board, which can be used to output some signals for easy debugging.
1.2 Peripheral expansion circuit part The
peripheral expansion circuit part mainly includes PWM signal inversion and dead zone generation circuit, analog and digital isolation circuit, voltage and current acquisition and signal processing circuit, drive and power bridge circuit and protection circuit.
Due to space limitations, only the PWM signal inversion and dead zone generation circuit is given here, as shown in Figure 2.


In view of the characteristics of the inversion of the control waveforms of the upper and lower power devices of the same bridge arm of the inverter during the control process, the control software only needs to output three PWM control signals and the hardware will perform the inversion processing. In addition, since the PWM pulse width modulation when controlling the motor adopts the 180° PWM conduction mode, in order to avoid the power devices of the upper and lower bridge arms of the inverter bridge being turned on at the same time and burning the power devices, it is necessary to add a signal delay of several microseconds between the PWM control signals of the upper and lower bridge arms, which is called the dead time. This paper adopts the hardware circuit to invert the PWM control signal and generate the dead time. The advantage of doing so is that it can reduce the software operation time and save storage space, and the reliability is higher. In this way, after the three PWM control signals are input into the PWM signal inversion and dead zone generation circuit, they are output as six PWM motor control signals with several microseconds of dead time, which can be conveniently used for motor control. Figure 2 shows the PWM signal inversion and dead zone generation circuit of one of the three channels. The circuit mainly uses the inverter 74HC04 to invert the PWM signal, and also uses the capacitor charging and discharging process and the shaping circuit to generate the dead time, in which the size of the dead time can be set by selecting the capacitor or resistor parameters.

2 Matlab/Simulink experimental model and RTI interface module
Based on the completion of the control system hardware platform structure, the software design of the control system based on dSPACE is very simple compared to the conventional method of using DSP, which can save a lot of programming time. Since the control system algorithm is implemented in Matlab/Simulink offline simulation in advance, the software design only needs to replace all the input/output interface modules in Matlab/Simulink simulation with dSPACE's RTI module (as shown in Figure 3) and perform simple operations such as unit conversion, because all input or output signals at this time are for actual physical quantities, so the units of these input or output signals participating in the operation in the software should be consistent with the units of actual physical quantities.


For example, when collecting the motor current iA, the hardware has used sensors and signal processing circuits to collect the current signal and convert it into a ±10 V voltage signal and input it into the ADC#1 channel of the DS2001AD acquisition board. At this time, the current feedback signal obtained from the motor simulation model in the original offline simulation model is replaced by the RTI interface module of DS2001_B1 (see Figure 3) in the software, and a simple unit conversion is performed to ensure that the final current value involved in the calculation is consistent with the actual current value. After the offline simulation model is replaced by the RTI module of dSPACE, the motor in the simulation model is replaced by the actual motor to obtain the Matlab/Simulink experimental model. Figure 3 shows several commonly used RTI interface modules for establishing Matlab/Simulink experimental models: PWM interface RTI module (DS4002PWM3 OUT), encoder interface RTI module (DS3002HW INDEX B1 C1/DS3002POS_B1_C1), A/D interface RTI module (DS2001_B1/DS2002_B1/DS2003_B1) and D/A interface RTI module (DS2102_B1).

3 Steps for experimental development of motor control system based on dSPACE
After the hardware experimental platform is built, the experimental development steps of motor control system based on dSPACE include the following points:
(1) Matlab/Simulink model establishment and offline simulation. Use Matlab/Simillink to establish the mathematical model of the simulation object, design the control scheme, and simulate the system offline.
(2) Input/output interface (I/O) access to generate experimental model. In Matlab/Simulink, keep the modules that need to be downloaded to dSPACE, select the I/O modules required for real-time control from the RTI library, replace the original logical connection relationship with the hardware interface relationship, and configure the I/O parameters. In some special cases, it is also necessary to set the software and hardware interrupt priorities.


(3) Automatically generate and download code using tools provided by RTW and dSPACE. Due to the seamless connection between Matlab and dSPACE, the generation, compilation, linking and downloading of real-time C code for the target system can be completed with simple operations, and the model can be downloaded as a program that can be run on the target board DS1005PPC.
(4) dSPACE comprehensive experiment and debugging. Use the ControlDesk software provided by dSPACE to acquire real-time operation data, change parameters and perform real-time control. Figure 4 shows the experimental development process of the motor control system based on dSPACE.



4 Application Examples
Figure 5(a) shows the waveform of a PWM control signal of a three-phase power device. Figure 5(b) shows the PWM switch signal of the upper and lower power devices of the same phase after the PWM control signal is processed by the hardware circuit of the PWM signal inversion and dead zone generation. It can be clearly seen that a dead zone time of about 4μs is added between the two PWM switch signals of the upper and lower power devices of the same phase to prevent the DC bus from passing through. Figure 6 shows the commonly used space vector pulse width modulation SVPWM waveform and the line voltage waveform after high-frequency signal filtering when the bus voltage Udc is 30 V.



5 Conclusion
This paper introduces the detailed process of building a motor control system experimental platform based on dSPACE and the experimental development steps by taking the advanced fast algorithm verification experimental equipment dSPACE as the control core, designing and expanding the relevant peripheral hardware circuits, and gives an application example of the above platform. Using this platform can greatly shorten the experimental development cycle, which is conducive to the research of control algorithms and effective verification before practical application.

Reference address:Research on motor control system experimental platform based on dSPACE

Previous article:Design of a car electric window anti-pinch control system
Next article:Design of a special control chip for fire emergency lighting

Latest Industrial Control 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号