introduction
A large ship engine simulator contains more than 30 mathematical models of full physical processes, involving more than a thousand real-time parameters, and is usually implemented using a decentralized DCS network. Even so, individual simulation workstations are difficult to meet the requirements of real-time simulation due to complex models and heavy tasks.
For example, the simulation of the power propulsion system is a semi-physical-in-the-loop simulation system, which includes both a virtual power unit, that is, a mathematical model running on a simulation computer, and a real control panel and physical display device. It is a typical system that integrates real-time control and high-speed computing functions.
The SMSC2000 engine simulator developed successfully in the early stage uses an industrial computer as the simulation computer, and all data processing and input and output control are completed through its data acquisition card. The accuracy and real-time performance of propulsion system simulation cannot be achieved at the same time. Recently, while carrying out multi-mode engine room simulation experiments, the Shipping Simulation Center analyzed the ship propulsion system with the most I/O points (more than 200) and the most complex semi-physical environment, and developed a novel simulation platform for embedded microcomputers.
Selection of simulation platform for ship propulsion system
The simulation platform of ship propulsion system needs to have strong control interface (input and output) capabilities and high-speed digital computing and processing capabilities. TI's DSPC2000 series pioneered the application field for real-time control of motors, but it is not suitable for the simulation of complex electromechanical models with many I/Os. Since there are no ready-made simulation devices available on the market, we can only explore the objects of the cabin simulator on our own. In fact, contemporary embedded chips provide both high-speed digital signal processors (DSPs) and microcontrollers (MCUs) with powerful control functions. The use of MCU+DSP architecture can combine the advantages of both.
The 32-bit RISC microcontroller based on the ARM core has very complete functions in monitoring control and human-machine interface, and the digital signal processor (DSP) is very powerful in processing various digital signals or data. Therefore, many embedded real-time application systems use the structural combination of ARM+DSP to give full play to the advantages of the two processors, get the most benefit from each processor, and obtain higher performance. Among them, ARM, as the main processor, is responsible for task management, input and output interfaces, control of external devices, and even running embedded operating systems; while DSP, as a slave processor, is only responsible for fast data calculation and processing. The two processor cores communicate by sharing a part of the memory.
The embedded system with ARM+DSP as the core has strong control interface capability and high-speed digital processing capability. It is used to replace the simulation system with industrial computer as the core. It can achieve the purpose of running the mathematical model of the accurate ship propulsion system in real time and controlling the peripheral physical equipment in real time, thereby realizing an accurate and real-time semi-physical in-the-loop ship propulsion simulation system.
Hardware structure of ARM+DSP embedded ship propulsion system simulation platform
The ARM+DSP embedded simulation platform is mainly composed of functional parts centered on ARM, C5000DSP, and C2000DSP. The ARM core microcontroller of the ARM part is the main processor and the control center of the entire system. The ARM part has its own FLASH, RAM, A/D, D/A converter and other peripherals. It is mainly responsible for completing the bootstrap loading of the entire system and the task allocation of the system after power-on, inputting and outputting signals from and to physical devices, and communicating with the host computer through the CAN bus.
The C5000DSP part mainly runs the mathematical model of the ship propulsion system and transmits the simulated speed and torque data to the motor control unit of the C2000DSP part to express the real-time status of the propulsion system on the motor, that is, using the motor to simulate the propulsion main engine.
The function of the C2000DSP part is to receive the calculation results of the mathematical model of the C5000DSP part, and control the motor to achieve the simulated speed and torque according to the results, and finally use the motor to simulate the propulsion host. These three parts are combined in a certain way to form a whole and jointly complete the task of propulsion system simulation. Its basic organizational structure is shown in Figure 1.
Figure 1 Basic composition of ARM+DSP embedded microcomputer system
In fact, from the perspective of reliability, for the ARM part and the C5000DSP part, a dual-core chip of ARM7+C54x (TI's TMS320VC5470) is used to integrate the cores of the two parts together. The main peripheral devices of these two parts include FLASH, SRAM, SDRAM, keyboard, LCD, CAN bus interface, A/D, D/A converter (for analog input and output), optocoupler circuit (for digital or switch input and output), JTAG interface for programming and debugging, and program space expansion SRAM, data space expansion SRAM, and I/O space FIFO (for transferring data to the C2000DSP part) on the ARM side. The hardware organization structure of these two parts is shown in Figure 2.
Figure 2 Hardware structure of ARM and C5000DSP
The C2000DSP part is optional. If this part is omitted, the simulation results are only displayed on the LCD and LED status indicator. After adding this part, the various dynamic and static speed and torque characteristics of the simulated propulsion system can be reflected on the simulated motor controlled by the C2000DSP part, so as to achieve the purpose of simulating the main engine of the propulsion system with the motor. The C2000DSP subsystem shown in Figure 3 is actually a closed-loop control system of a motor, which consists of four sub-parts: DSP controller, power drive amplifier circuit, motor and speed detection link (photoelectric encoder disk). It can be seen that the hardware resources of the ARM+DSP embedded ship propulsion system simulation platform are rich and have great room for expansion. The system platform has the following characteristics in terms of hardware.
(1) In terms of processor speed, the maximum speed of ARM is 47.5MHz, the maximum speed of C5000DSP is 100MHz, and the maximum speed of C2000DSP is 40MHz, which are relatively high-speed processors.
Figure 3 Hardware structure of C2000DSP
(2) The FLASH capacity is large. The ARM and C5000DSP (TMS320VC5470) parts have 8MB of external FLASH; the C2000DSP ( TMS320LF2407 ) part has 32KW of on-chip FLASH, which can also be expanded externally. In this way, the system can solidify a large amount of program code and is suitable for developing large programs.
(3) The capacity of SRAM is also very large. The ARM part has 16KB of on-chip high-speed SRAM and 2MB of external SRAM; the C5000DSP part has 72KW of high-speed on-chip SRAM and 64KW of external program SRAM and 64KW of external data SRAM; the C2000DSP (TMS320LF2407) part has 2.5KW of on-chip SRAM, and also has 64KW of external program SRAM and 64KW of external data SRAM. In this way, a large amount of SRAM can ensure that the processor reads the program in the SRAM to ensure that the program runs quickly.
(4) The system has rich I/O port resources. It has both digital input and output and analog input and output; it provides both serial and parallel modes. It lays a hardware
foundation for data acquisition, control command output, and communication with the host computer.
(5) The processor TMS320LF2407 of C2000DSP is a chip dedicated to motor control. It is easy to generate PWM signals and capture speed feedback signals, and has a fast computing speed, which can realize various efficient and complex controls on the motor.
(6) Real-time data exchange is required between the various components, and the hardware uses a shared memory approach (ARMPortInterface, API for short, between ARM and C5000DSP, FIFO between C5000DSP and C2000DSP). In this way, the communication speed is very fast, and the real-time requirements are met from the hardware perspective.
(7) Because there are a large number of devices and their speed is relatively high, some chips use advanced BGA (Ball Grid Array) packaging technology, so when designing the printed circuit board, a 6-layer board is used, and the wiring fully considers the high speed of the device and the packaging technology.
(8) The system platform provides many extensible interfaces, and users can expand hardware and add new functions for specific objects. For other workstations that make up the SMSC2000 engine simulator, there is no need to expand any I/O interfaces, which shows that the system is universal.
Software Structure of ARM+DSP Embedded Simulation Platform
Software in the ARM part
The ARM part is the control center of the entire system, and it mainly runs system software, including bootstrap loader, command response program, keyboard scanning program, LCD display driver, A/D and D/A conversion control program, direct digital/switch input and output program, CAN bus communication control program and control program for internal real-time data exchange with the C5000DSP part.
The bootloader is the first task to be implemented after power-on or reset. It first initializes some key registers of ARM (such as clock, interrupt, etc.) (i.e., partial initialization); then loads the main program and various subprograms to be run in the ARM part (such as instruction response program, keyboard scanning, LCD display driver, etc.) from the non-volatile memory FLASH outside the chip to the SRAM inside or outside the chip to increase the running speed of the program; then, it starts to reset and initialize the C5000DSP part, and then loads the mathematical model program into the C5000DSP through API control. In this way, the bootloader completes the bootloading work of two parts.
After the bootstrap loading is completed, the ARM part starts to perform all the initialization of the system, and then enters the main program of the system (the main program is an infinite loop waiting program), and then repeatedly runs the keyboard scanning, LCD display drive, instruction interpretation response, A/D and D/A conversion control, digital quantity/switch input and output, and the program communicating with the C5000DSP part in the main program in an interrupt mode. Among them, the instruction interpretation response program is a core program, similar to the kernel program of the operating system, which accepts the interface data from the input processing subroutine (keyboard scanning, digital quantity/switch input, etc.) and starts the corresponding task according to their values. If the result of the task execution needs to be output as interface data (instruction) to the display or control processing subroutine, it will be processed by each output subroutine. The software organization structure of this part is shown in Figure 4.
Figure 4: Software organization structure of the ARM part
C5000DSP software
The C5000DSP part is mainly used to run the mathematical model of the propulsion system, which can be a traditional diesel main engine propulsion system or a new electric propulsion system. The key is that different propulsion types correspond to different mathematical models.
The C5000DSP program is essentially a program that mainly solves the differential equations in real-time loop iteration. The differential equations are the mathematical model of the propulsion system, and each loop solves it once to determine whether there are instructions and parameter change information transmitted from the ARM part. If there are, change the corresponding state and parameters and solve the differential equations again; if not, still solve according to the last state and parameters. In each loop, the equations are completely solved once, so as to obtain the simulation data of the propulsion system at that moment. At the end of each loop, the simulation data results are transmitted to the ARM part and the C2000DSP part (through FIFO) for display and control. The software program structure of this part is shown in Figure 5.
Figure 5 Software organization structure of C5000DSP
Software structure of C2000DSP
The main task of the C2000DSP part is to read the speed and torque signals received from the simulation results of the C5000DSP part in the FIFO and express them as the corresponding speed and torque of the motor. This part is actually an independent subsystem dedicated to controlling AC motors.
Among them, the C2000DSP processor TMS320LF2407 is the core of the control subsystem. It first uses the query working mode to detect whether the main control instruction bit indicates to open the process and check whether the system and the main circuit are normal. If the main control instruction bit indicates "close", the main circuit is cut off, the input and output are blocked, and then the system is closed; if it is abnormal, the main circuit is cut off, the input and output are blocked, and then the system is closed, and an alarm is issued; if everything is normal and the main control instruction bit indicates "open", the given signal of this subsystem is read (read from the FIFO by the communication interrupt service program and stored in the memory of the corresponding address), that is, the speed and torque simulation result data is received, and then the capture subroutine is called to input the actual speed and torque feedback value from the corresponding interface. After the given value and feedback value are prepared, the system begins to use a certain control algorithm to process the given data and feedback data.
After completing a motor closed-loop constant speed control algorithm, the corresponding PWM signal is generated and output to the motor power drive circuit, and then the drive circuit controls the motor to follow the simulated given speed and torque signal to complete the physical simulation of the speed and torque of the propulsion system. The control algorithm used here can be various algorithms for AC motor control, including constant voltage-frequency ratio and constant electromotive force-frequency ratio algorithms with lower requirements, as well as vector control algorithms and direct torque control algorithms with higher requirements. After completing this step of the control algorithm output PWM signal, it returns to the beginning. This cycle continues until an abnormality occurs or the ARM main control program ends the task process. The main structure of this part of the program is shown in Figure 6.
Figure 6 Software organization structure of C2000DSP
Communication control between chips
The system consists of three parts, and the communication relationship between the parts is shown in Figure 1. ARM and C5000DSP communicate with each other, C5000DSP and C2000DSP communicate with each other, and ARM and C2000DSP also communicate with each other. Among them, the first two are completed by interrupt mode, while the latter is completed by direct transmission.
ARM and C5000DSP send an interrupt signal to C5000 through ARM, informing C5000 that it is ready to receive data. Then ARM puts the data into the API shared by both parties. After receiving the interrupt signal, DSP starts the interrupt service program, takes out the data from the corresponding position of the API, and then sends a reply signal to ARM to indicate that the data
has been taken away, and then continues to prepare to receive new data. ARM receives the reply signal from C5000 and starts to send new data. This is repeated until all data is transmitted. Conversely, C5000DSP sends data to ARM, and the process is the same as above, except that the sender and receiver swap positions.
The communication between C5000DSP and C2000DSP is one-way, that is, C5000 only sends and C2000 only receives. They are buffered by FIFO. C5000 first puts the speed and torque data of the simulation calculation into the FIFO connected to its IO space through the bus, and then sends an interrupt request to C2000. After receiving it, C2000 responds to the interrupt, performs interrupt service, takes out the data from the corresponding position of FIFO and stores it in the memory of a specific address, and then replies to C5000 to inform that the data has been taken out. This cycle repeats continuously, and data is continuously sent and received.
The communication between ARM and C2000DSP is mainly for the ARM master to open or close the C2000 system, using a one-way direct transmission method. They are connected through their own GPIO (general purpose IO port), ARM sends and C2000 receives. When ARM wants to open the C2000 system, it only needs to write 1 to its corresponding GPIO, and when ARM wants to close the C2000 system, it only needs to write 0 to its corresponding GPIO. In the C2000 part, each time the corresponding GPIO port of C2000 is queried in the main loop program, a read of 1 means continuing its process, and a read of 0 means shutting down its process.
Comparison between ARM+DSP embedded simulation platform and simulation platform based on industrial computer
Compared with the simulation platform system with industrial computer as the core, the embedded simulation platform system with ARM+DSP as the core has many advantages in terms of real-time and accuracy of simulation.
(1) Using a dedicated DSP to complete the calculation, the accuracy is higher than that of the general-purpose PC processor 80×86.
(2) ARM and DSP have clear division of labor and perform their respective functions, which can complete simulation tasks much faster than a single PC processor. When SMSC2000 performs host simulation, due to the limitations of the processor, operating system and VB development tools, the time required to solve the mathematical model each time is at the ms level, and its sampling period is also above the ms level; while the embedded simulation platform system with ARM+DSP as the core, due to the use of a powerful dual-core architecture, the time required to solve the mathematical model each time is at the μs level, and the sampling period is also much shorter accordingly, that is, the simulation step size is smaller, which greatly improves the simulation accuracy.
(3) The software system is built on a bare metal basis, and its real-time performance is completely determined by the developer and is not restricted by non-real-time operating systems.
Conclusion
The novel ARM+DSP embedded simulation platform developed for ship propulsion system takes advantage of the characteristics of two embedded processors, ARM and DSP, and integrates rich control interfaces and high-speed computing processing capabilities. The simulation platform has a clear system structure, powerful dedicated functions of each part, clear task allocation, and communication interaction between each other. The system has a large memory capacity, fast speed of each device, and high integration. Software programming starts from the perspective of system and application, closely combined with actual conditions, and the software structure is suitable for embedded system operation. The system's hardware and software have a large expansion space. Using this simulation platform to replace the traditional simulation mode based on industrial control computers truly meets the real-time requirements. Its running mathematical model is more accurate and its ability to control physical equipment is stronger.
The simulation platform can also be used for the simulation of ship power stations, ship auxiliary engines, engine room alarms and other systems, and communicate with the main control station through the CAN bus. It not only strengthens the function of a single workstation, but also makes the entire DCS network evolve into an FCS network, greatly improving the real-time performance of the system.
Previous article:Fingerprint recognition technology access control application solution
Next article:Infineon OmniVia TUS9090 DVB-H/T Solution
Recommended ReadingLatest update time:2024-11-16 17:47
- 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
- Qorvo PAC series highly integrated motor control chips and applications
- How to choose a power supply for automotive camera modules
- Application of machine vision technology in film inspection system
- 2021 Open Source Hardware Summit Calls for Proposals
- If pure fuel vehicles are no longer sold in 2025, is it still necessary to buy high-priced fuel vehicles now?
- Liquid crystal module handling precautions and storage conditions
- Thank you for being here
- Ask a question about the make command
- Get it for free|Play with Espressif's new product ESP32-S3-Korvo-2 worth 400 yuan
- Design of Li-ion Battery Management System