2117 views|1 replies

6587

Posts

0

Resources
The OP
 

Design of three-coordinated distributed control system based on TMS320F2812 DSP [Copy link]

Although the performance of digital signal processors (DSPs) is getting stronger and stronger, and the functions of DSP-based embedded systems are increasing, the processing capacity of a single DSP embedded system is not enough for applications in multi-task signal processing and multi-channel process control that require high real-time, fault tolerance, and reliability. Distributed systems have strong processing capabilities and high reliability. Multiple DSP embedded subsystems are used to form a distributed system, and the concurrency of distributed systems is used to achieve parallel processing of multiple DSPs to meet the requirements of multi-tasking and real-time. At the same time, the reliability of the system is guaranteed through hardware and software redundant design.

  This paper uses TMS320F2812 DSP to implement three isomorphic embedded subsystems A, B, and C with multiple real-time signal processing and multiple process control functions, and uses CAN bus as the communication network to form a distributed system. The system can interact with the external measurement and control center in real time, and simultaneously complete the real-time acquisition/preprocessing of 23 analog signals, 16 digital signal processing, 16 digital signal output, 1 pulse signal processing, real-time calculation of multiple process control parameters, and real-time recording of various states and parameters. The hardware design of the three subsystems is exactly the same. Information is exchanged through the CAN bus and the RS422 serial port. Resources are allocated to each subsystem and tasks are dynamically allocated through software configuration, effectively balancing the load of each processor. The three subsystems share resources and back up each other, which improves the reliability of the entire system.

  In a real-time system, if the operation of the system cannot meet the response time requirements, the entire system will crash. Therefore, the communication and coordination between the components of a distributed system is the key to achieving concurrent processing of system components, sharing system resources, balancing the load of system components, improving the throughput of the entire system, and ensuring reliable operation of the system.

  This paper focuses on the communication methods between subsystems, the system's task allocation and the system's coordination mechanism.

  1. System composition

  1.1 CAN bus

  CAN (Controller Area Network) is a bus-type serial communication network. CAN bus effectively supports safe and reliable distributed real-time control systems, with flexible communication methods, strong anti-interference ability, high reliability, direct communication distance up to 10km (transmission rate below 5kbps), communication rate up to 1Mbps (communication distance within 40m), and the number of online nodes can reach 110. CAN bus is a multi-master working mode, which can easily form a multi-machine backup system.

  1.2 Digital Signal Processor

  TMS320F2812 DSP is a high-end product in the field of industrial control, with the characteristics of fast speed, low power consumption, convenient and flexible interface, easy development, high precision, good compatibility, rich resources, etc. F2812 adopts Harvard bus structure, has a 32-bit high-performance CPU, a clock frequency of 150MHz and supports dynamic change of the frequency of the phase-locked loop, and has a variety of types of memory such as Flash, PIE interrupt module, A/D conversion module, event manager, SCI port, SPI port, eCAN bus and McBSP communication module and other peripherals to meet the needs of various applications.

  1.3 Hardware composition of DSP-based embedded subsystem

  The embedded subsystem based on TMSF2812 DSP (see Figure 1) is designed to meet real-time multi-tasking requirements. The hardware and software can be tailored according to needs, with high reliability, fast response speed and high degree of automation.

  The hardware designs of the three subsystems are exactly the same. In addition to the DSP on-chip resources, each subsystem has expanded auxiliary modules such as non-volatile memory (E2PROM or ferroelectric random access memory), SRAM, four RS422 interfaces (two RS232 optional), and real-time clock.

  1.4 System Architecture

  The system is composed of three embedded subsystems A, B, and C based on F2812 DSP, which form a homogeneous asynchronous distributed system through the CAN bus (see Figure 2). The three subsystems have no master-slave relationship. The functions of each subsystem are configured by software based on the system status through task allocation strategy. The three subsystems back up each other with hardware and software, which improves the reliability of the system.

  The three subsystems mainly exchange information through the CAN bus, and slower changing data can also be exchanged through the UART serial port. Each subsystem can receive signals and output control signals at the same time. Through special hardware design, each subsystem has the function of fault isolation, which can prevent the operation of the entire system from being affected by a subsystem failure.

  2. Collaborative work of distributed systems

  The resources of a distributed system are located in different locations. The system needs to constantly monitor the status of each component and check the usage of resources. When a processor fails, the system should respond immediately, reallocate resources, plan task allocation plans, determine task allocation strategies, restructure the system, and sacrifice some system performance when necessary to ensure the normal operation of the system.

  2.1 System status monitoring

  The system status includes the working status of each module of each subsystem (CPU, UART working status, on-chip memory (SDRAM, FLASH, etc.) and off-chip memory (SRAM), allocation of non-volatile memory), communication status between each subsystem, etc.

  In a distributed system, it is difficult for each subsystem to determine the state of the system. To this end, each subsystem on the network should broadcast to other subsystems at regular intervals to inform other subsystems of their respective states (see Figure 3). If no message is received from a subsystem within the specified time, it is considered that the subsystem has failed, and the system should reconfigure system resources, reallocate tasks, and reconstruct the system.

  In Figure 3: SCAB represents the communication between subsystem A and B. The state of the system is determined through the mutual communication between A, B, and C.

  Without loss of generality, let the set of states of the three subsystems be SA, SB, and SC, then the system state SS is:

  SS = ρ (SA ∪ SB ∪ SC)

  ={Si|0≤i≤N} (1)

  Where: ρ(A) represents the power set of A, N=|SS|

  2.2 Task Allocation Strategy

  In general, the multi-processor task allocation problem is NP-complete. Usually, a feasible and satisfactory task allocation strategy is determined based on specific application requirements. The purpose of task allocation is to reasonably allocate system resources and try to reduce the communication overhead between processors in the system and the overhead required for execution modules. Load balancing is to reasonably allocate the tasks undertaken by the system to the processors in the system to maximize the system throughput. Generally speaking, reducing the amount of communication in the system and balancing the load are contradictory. Therefore, the task allocation strategy is to minimize the amount of communication between subsystems in the system and balance the load of each subsystem to improve the performance of the entire system.

  There are two ways to allocate tasks in the system: automatic and manual. The automatic allocation method determines the task allocation strategy based on the system status and the estimated task volume of each subsystem, and automatically allocates tasks to each subsystem through software. The manual allocation method is that the measurement and control center allocates tasks to subsystems through instructions.

  Let's assume that the system is a distributed system consisting of N components and undertakes T tasks, then:

  In practical applications, task allocation strategies are restricted and influenced by many factors, such as space limitations, signal interference, communication distance, etc. Therefore, task allocation principles such as load balancing and minimum communication volume between tasks can only be maximized under certain conditions.

  In the specific application of this system, considering the requirements of signal interference and data transmission, the tasks undertaken by the system are mainly divided into signal acquisition/preprocessing (SP), signal operation (SC), and process control (SO). The SP task is mainly responsible for the acquisition, AD conversion, signal filtering, etc. of 23 analog signals; the SC task is mainly responsible for the operation of various signals; the SO task is mainly responsible for the parameter calculation of process control, control signal output, and real-time interaction with the measurement and control center. After testing, the CPU load for SP, SC, and SO tasks is basically balanced, and the communication volume between the three subsystems is basically the same. Placing the subsystem that undertakes the SP task as close to the signal source as possible, and placing the subsystem that undertakes the SO task as close to the control component as possible can reduce signal interference and data communication volume. Based on the above factors, according to the system status, determine the task allocation strategy shown in Table 1.

  2.3 System Collaboration

  The system collaboration includes the unified allocation of system resources (CPU, various memories, event managers, GPIO, etc.), determining the task allocation strategy according to actual needs and system status, and assigning tasks to each subsystem. When the system status changes, reconfigure the system resources, determine the task allocation strategy, and reallocate tasks to each subsystem (see Figure 4). When the system works normally, the three subsystems are responsible for signal acquisition/preprocessing, signal operation, and process control tasks respectively; when one or two subsystems fail, the system detects the status of each subsystem through the CAN bus, determines the status of the system, and replaces the tasks of the failed subsystem with the remaining subsystems according to the task allocation strategy. When a line fails, the measurement and control center sends instructions through the serial port and manually assigns tasks to ensure the normal operation of the system.

  2.4 Auxiliary communication and interaction with the measurement and control center

  The system consists of three subsystems, each with four RS422 serial ports, denoted as Ai, Bi, and Ci (i=1, 2, 3, 4). According to the requirements of the task, Ai, Bi, and Ci are connected together to complete the tasks of information collection, auxiliary communication between subsystems, and interaction with the measurement and control center.

  The purpose of real-time interaction with the measurement and control center is: on the one hand, the system status and various parameters are transmitted to the measurement and control center; on the other hand, the measurement and control center can send instructions to complete the specified tasks.

  The measurement and control center monitors the working status of the system in real time. When the CAN bus is working normally, the system automatically completes tasks such as task allocation; when the CAN bus is broken or other line failures occur, the measurement and control center sends instructions to the system and manually allocates tasks to ensure the normal operation of the system.

  According to the task requirements, conflicts will occur when the serial ports Ai, Bi, Ci (i=1, 2, 3, 4) of the three subsystems are connected together to send data. Therefore, the system should determine the line status according to the working status of each serial port, and decide the reading and writing of the serial port according to the line status.

  This paper introduces the software and hardware design of a distributed system based on CAN bus, which is composed of three DSP embedded subsystems, and focuses on the analysis of the collaborative working mode between the subsystems. The system makes full use of the concurrency and reliability characteristics of the distributed system. On the basis of meeting the requirements of real-time processing of multiple signals, multiple process control, and real-time interaction with the measurement and control center, it adopts a combination of automatic task allocation and instruction task allocation to effectively improve the reliability of the system. Experimental simulation and field tests show that the system not only meets the task requirements, but also has high stability and reliability.

This post is from DSP and ARM Processors

Latest reply

Thanks for sharing,   Details Published on 2020-6-4 07:49
 

2618

Posts

0

Resources
2
 

Thanks for sharing,

This post is from DSP and ARM Processors
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list