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.
Previous article:Design of a car electric window anti-pinch control system
Next article:Design of a special control chip for fire emergency lighting
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How do I design a circuit with such input and output?
- Board burning problem
- X-NUCLEO-IKS01A3 driver for Arduino
- Nexperia Award-winning Live Broadcast: Introduction and Application of Automotive Power MOSFET and GaN Devices in Electric Vehicles
- Nordic Bluetooth sensor monitors guitar temperature and humidity
- EEWORLD University Hall - Altium Designer 22 Electronic Design Introduction Practice 56 Lectures
- ztool cannot connect
- IEEE Spectrum Top Programming Language Rankings April 2022
- #Idle Market# Exchange Downloader
- ADS1278 data acquisition chip data distortion problem