Defineable high real-time automated testing system and method for electric servo systems

By designing a customizable, high-real-time automated testing system for electric servo systems, the problems of insufficient real-time performance and limited protocol support in existing technologies are solved. It enables support for custom protocols and algorithms, improves the response speed and data processing capabilities of the testing system, and has traceability and high precision.

CN118012011BActive Publication Date: 2026-11-17XIAN MICROELECTRONICS TECH INST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410159342.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-04
Publication Date
2026-11-17
Estimated Expiration
2044-02-04

AI Technical Summary

Technical Problem

Existing automated testing technologies for electric servo systems suffer from problems such as low real-time performance, limited protocol support, lack of definable data processing, lack of rich test content, inability to meet multi-channel requirements, and limited functionality of the interface interaction layer.

Method used

A definable, high real-time automated testing system for electric servo systems was designed, comprising a server and an access control terminal. The system employs a definable service module to provide custom protocols, custom algorithms, and custom test items. Combined with a real-time assurance mechanism module, the system ensures data correctness and integrity through a real-time data processing module. The access control terminal also enables the expansion of functions such as visualization and interactive business modules.

Benefits of technology

It supports custom protocols and algorithms, improving the universality and versatility of automated testing, enhancing the response speed and data processing capabilities of the testing system, providing traceability, and improving testing accuracy and observability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118012011B_ABST
    Figure CN118012011B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of electric servo systems and discloses a definable, high real-time automated testing system and method for electric servo systems, including a server and an access control terminal. The server-side modules include process control and scheduling, test services, definable services, a real-time guarantee mechanism, and real-time data processing. The access control terminal modules include a UI interface, a controller, and interactive services. This invention addresses the problems of non-universal testing equipment, low testing efficiency, and low real-time performance in existing electric servo systems. Through an automated testing scheme, it improves user-friendliness and significantly enhances testing efficiency. The definable service modules ensure better protocol scalability, enabling algorithm modules to support definability and test content customization, thus improving the universality and broad applicability of automated testing. The high real-time technology design improves the system's response speed, data processing capabilities, and the accuracy of automated testing, ensuring the accuracy of test data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electric servo systems and relates to a definable, high real-time automated testing system and method for electric servo systems. Background Technology

[0002] Early research on electric servo systems primarily focused on electro-hydraulic servo loading systems, gradually shifting towards groundbreaking engineering implementations. With continuous research and application of electric servo systems, the research focus in recent years has gradually shifted towards the application of various novel intelligent control methods. Correspondingly, functional and performance testing technologies for electric servo products are also gradually developing. However, due to the complexity of electric servo systems, with numerous dynamic and kinematic indicators such as load, time domain, and frequency domain, key technologies such as dedicated board drivers, dynamic testing algorithms, and servo load simulation used in the past are outdated. Furthermore, technical personnel lack sufficient understanding of the development and practical application of automated testing technologies. Additionally, objective factors such as numerous assembly and testing steps and inconsistent manual operations during actual development and mass production have hindered the development of electric servo systems in related testing fields. Only in recent years have some descriptions of automated testing methods for servo systems emerged, but a highly efficient automated testing system solution has yet to be formed.

[0003] Existing technologies related to automated testing of electric servo systems, such as Chinese patent application CN106292639A, disclose a general servo system performance testing platform, which comprehensively describes the testing methods for servo devices and is representative at the present stage.

[0004] However, overall, existing automated testing technologies for electric servo systems still have the following limitations: Performance testing platforms lack real-time capabilities, which significantly impacts test accuracy, and the obtained data cannot accurately reflect the servo device's state; protocol support is very limited, with testers only able to choose from a few pre-built protocols; post-processing functions are not provided, requiring users to add additional processing steps, increasing inconvenience, and data processing does not support definable algorithm modules, preventing users from performing pre-planned algorithmic calculations on test data, and even rendering the test data completely "black box," unable to be exported, thus failing to achieve the test objective; and test replay functionality is lacking. In actual operation, the test process is often fleeting, making it difficult for the human eye to quickly capture the instantaneous state and complete real-time observation and analysis, therefore... The automation testing method should encompass the ability to reproduce the test scenario. Conventional testing offers too few selectable test items and lacks richness in test content, failing to meet basic testing requirements as electric servo systems increasingly rely on new intelligent control methods. Testing methods often use individual test items as test units, lacking scalability in granularity and reducing the deployability of automated testing. Test process control design is relatively simplistic, with overly large controllable units and a lack of consideration for handling abnormal situations during testing. The devices that can be driven are mostly single-channel servo devices; however, with the development of intelligent applications of new electric servos, the industry is trending towards multi-channel electric servo devices, rendering this testing method inadequate for multi-channel requirements. All methods only address a single communication interface, failing to comprehensively cover various communication methods. The interface interaction layer has limited functionality and lacks intuitive presentation. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing automated testing technologies for electric servo systems, such as low real-time performance and very limited protocol support, and to provide a definable, high real-time automated testing system and method for electric servo systems.

[0006] To achieve the above objectives, the present invention employs the following technical solution:

[0007] In a first aspect, this invention provides a definable, high real-time automated testing system for an electric servo system, comprising a server and an access control terminal. The server includes a server communication module, a process control and scheduling module, a test service module, a definable service module, a real-time assurance mechanism module, and a real-time data processing module. The access control terminal includes an access control terminal communication module, a UI interface module, a controller module, and an interactive service module. The process control and scheduling module acquires control commands and switches the server's operating state according to these commands. The test service module schedules a preset test service model according to test commands, obtains servo control commands, and sends them to the servo device via the server communication module. The definable service module provides custom protocols, custom algorithms, and custom test service models. Real-time... The security mechanism module is used to deploy PREEMPT_RT patches and perform kernel trimming on the server's operating system data, and to process the program's static data based on high-precision timers and rt_mutex semaphores. The real-time data processing module is used to perform correctness and integrity protection processing on the server feedback data using a thread-safe queue mechanism, and then send it to the access control communication module through the server communication module. The UI interface module is used to acquire and visualize test requests and interaction requests. The controller module is used to call the interaction business module according to test requests or interaction requests. The interaction business module is used to respond to the controller module's calls, implement the corresponding interaction business according to the interaction request, generate test instructions according to the test request, and send them to the server communication module through the access control communication module.

[0008] Optionally, the test service module may include one or more of the following test service models: a custom test module, a fixed angle test submodule, a zero-position characteristic test submodule, a hysteresis width test submodule, a linearity test submodule, an asymmetry test submodule, an overshoot test submodule, a half-wave oscillation test submodule, an angular velocity test submodule, an amplitude-phase characteristic test submodule, a cyclic deflection test submodule, a sensitivity test submodule, an inertia screening test submodule, a communication bit error rate test submodule, and a servo self-test test submodule; a fixed angle test submodule, a zero-position characteristic test submodule, a hysteresis width test submodule, etc. The linearity test submodule, asymmetry test submodule, overshoot test submodule, half-wave oscillation test submodule, angular velocity test submodule, amplitude and phase characteristic test submodule, cyclic deflection test submodule, sensitivity test submodule, inertia screening test submodule, communication bit error rate test submodule, and servo self-test submodule are used for fixed angle testing, zero-position characteristic testing, hysteresis width testing, linearity testing, asymmetry testing, overshoot testing, half-wave oscillation testing, angular velocity testing, amplitude and phase characteristic testing, cyclic deflection testing, sensitivity testing, inertia screening testing, communication bit error rate testing, and servo self-test testing, respectively.

[0009] Optionally, the definable service module includes a protocol definable module, an algorithm definable module, and a test project definable module. The protocol definable module is used to instantiate data transmission and parsing based on the protocol adaptation dynamic link library file designed for the servo device, using a generic and reusable protocol adaptation design strategy, to obtain a data transmission and reception process adapted to the servo device protocol. The algorithm definable module is used to perform function entry and exit matching operations based on the input and output characteristics of a custom algorithm, using a non-quantitative parameter strategy, to obtain the target algorithm. The test project definable module is used to generate a custom test service model based on pre-built generalized basic test components, according to the test scenario information and test requirement information of the current test project.

[0010] Optionally, the interactive business module includes a communication interface configuration module, a protocol configuration module, a server-side remote control module, a test process control module, and a data storage module; the communication interface configuration module is used to match different communication interfaces; the protocol configuration module is used to obtain the protocol name, data transmission module name, and data parsing module name required for testing, and transmit them to the server-side communication module through the access control terminal communication module; the server-side remote control module is used to access and switch the server-side status; the test process control module is used to generate and parse test cases according to test requests to obtain test instructions; and the data storage module is used to classify and store server feedback data.

[0011] Optionally, the interactive business module further includes a test case management module and a scripting module; the test case management module is used to create, add, delete, modify, and sort test cases; the scripting module is used to import test scripts and parse the test scripts into test cases using scripting language; and to serialize newly created test cases into test scripts.

[0012] Optionally, the interactive business module further includes a data management module, which includes a data analysis module and a data conversion module. The data analysis module is used to analyze the servo feedback data using a preset algorithm to obtain test analysis results. The data conversion module is used to set the output path of the servo feedback data, convert the binary data of the servo feedback data into data of a preset base, and save it in a preset path.

[0013] Optionally, the interaction module further includes a test replay module; used to replay the test cases that have been executed, and to pause, fast forward, and rewind the test replay.

[0014] Optionally, the interaction module further includes a test report module; the test report module is used to collect test case information and test result information after the test cases are executed, and to generate a test report and test conclusions based on the test case information and test result information.

[0015] Optionally, the interactive business module further includes an account management module, an algorithm import module, a communication testing module, and a self-testing module; the account management module is used for creating new users, user authentication and login, and user logout; the algorithm import module is used for selecting preset native algorithms or importing customized algorithms; the communication testing module is used for communication testing between the server-side communication module and the access control module, as well as between the server-side communication module and the server device; the self-testing module is used for self-testing the status of the server device under test.

[0016] In a second aspect, this invention provides a definable high real-time automated testing method for an electric servo system based on the aforementioned definable high real-time automated testing system. The method includes: deploying PREEMPT_RT patches and kernel trimming on the server-side operating system data through a real-time assurance mechanism module, and performing processing on the program's static data based on high-precision timers and rt_mutex semaphores; providing custom protocols, custom algorithms, and custom test service models required for the current automated testing through a definable service module; receiving test requests and interaction requests through a UI interface module; calling the interaction business module through a controller module based on the test requests and interaction requests, and implementing corresponding interaction business through the interaction business module according to the interaction requests; generating test instructions based on the test requests and sending them to the server-side communication module through an access control terminal communication module; obtaining servo control instructions by scheduling a preset test service model according to the test instructions through the test business module and sending them to the servo device through the server-side communication module; performing correctness and integrity protection processing on the servo feedback data through a thread-safe queue mechanism using a real-time data processing module, and then sending it to the access control terminal communication module through the server-side communication module; and visually displaying the servo feedback data through a UI interface module.

[0017] Compared with the prior art, the present invention has the following beneficial effects:

[0018] This invention relates to a definable, high-real-time automated testing system for electric servo systems. Based on a definable service module strategy, it can generate custom communication protocols, custom algorithms, and custom test items for test project modules according to custom service instructions. By supporting custom communication protocols, it ensures better protocol scalability, effectively reducing the project development resource overhead caused by switching servo devices. It empowers custom algorithms, overcoming current limitations in algorithm data processing, and greatly improves the data computation, deduction, and processing capabilities of automated testing. Supporting custom test items makes the test content customizable, and the definable nature greatly enhances the versatility and broad applicability of automated testing. Simultaneously, the design of the real-time guarantee mechanism module solves the real-time problems existing in current servo device automated testing, greatly improving the test system's response speed, data processing capabilities, and the accuracy of automated testing.

[0019] Furthermore, the interactive business module includes a test replay function that restores the test scene frame by frame, making automated testing traceable and improving the convenience of experimental observation. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the server principle in an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the access control terminal principle in an embodiment of the present invention.

[0022] Figure 3 This is a schematic diagram of the static functional relationship of a definable high real-time automated test system for an electric servo system according to an embodiment of the present invention. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] The present invention will now be described in further detail with reference to the accompanying drawings:

[0026] See Figure 1 and 2 In one embodiment of the present invention, in response to the problems of inconsistent testing methods, non-universal testing equipment, numerous manual operation steps, and low testing efficiency in the mass production and development of electric servo systems, a definable high real-time automated testing system for electric servo systems is provided. Taking the electric servo system as the test object, the system starts by building an automated testing system, takes the construction of an automated testing scheme as a breakthrough, carries out product-wide test design, verifies the testability of indicators, and fully covers technical indicators in stages and levels, thus establishing a definable automated testing system for high real-time electric servo systems.

[0027] The electric servo system's definable high real-time automated testing system includes a server and an access control terminal. The server includes a server communication module, a process control and scheduling module, a test business module, a definable service module, a real-time guarantee mechanism module, and a real-time data processing module. The access control terminal includes an access control terminal communication module, a UI interface module, a controller module, and an interactive business module.

[0028] The process control and scheduling module is used to switch the running state of the server, such as ready, running and terminated, according to the control instructions of the access control terminal, and to schedule the test service model in the test business module corresponding to the control instructions to carry out the test work.

[0029] The testing service module is designed to address common testing scenarios for electric servo systems. It has constructed and implemented the execution flow of more than a dozen test items in the form of models, forming corresponding test service models, such as angular velocity test service model and spirit position characteristic test service model. All test service models provide scheduling interfaces to the outside world.

[0030] Optionally, the test service module may include one or more of the following test service models: fixed angle test submodule, zero-position characteristic test submodule, hysteresis width test submodule, linearity test submodule, asymmetry test submodule, overshoot test submodule, half-wave oscillation test submodule, angular velocity test submodule, amplitude and phase characteristic test submodule, cyclic deflection test submodule, sensitivity test submodule, inertia screening test submodule, communication bit error rate test submodule, and servo self-test submodule, which are respectively used for fixed angle test, zero-position characteristic test, hysteresis width test, linearity test, asymmetry test, overshoot test, half-wave oscillation test, angular velocity test, amplitude and phase characteristic test, cyclic deflection test, sensitivity test, inertia screening test, communication bit error rate test, and servo self-test.

[0031] The server is an embedded, self-starting program running on the Linux operating system. It is service-oriented, interacting with the electric servo system as a proxy, prioritizing high real-time performance, and ultimately facing the access control terminal. The server follows common testing scenarios, constructing access-oriented services using indivisible minimum test units—test items—as the granular unit. Test items include fixed angle, zero-position characteristics, hysteresis width, linearity, asymmetry, overshoot, half-wave oscillation, angular velocity, amplitude and phase characteristics, cyclic deflection, sensitivity, inertia screening, communication error rate, and servo self-test. These test items, as the test service model within the test business module, are scheduled by the access control terminal to execute the corresponding test task.

[0032] The aforementioned test service model encapsulates data related to the business characteristic logic and the methods for processing that data, reducing dependencies on other test service models and decreasing coupling between them. Simultaneously, common business logic is abstracted from each test service model to construct tool-type components, reducing program redundancy.

[0033] The definable service module is used to provide the system with good scalability, universality and openness. Customization includes customizable protocols, definable algorithms and definable test items.

[0034] Optionally, the definable service module includes a protocol definable module, an algorithm definable module, and a test item definable module. The protocol definable module is used to adapt the dynamic link library file to the protocol of the current servo device (i.e., the electric servo system). Based on a generic and reusable protocol adaptation design strategy, it instantiates data transmission and data parsing. After instantiation, it is scheduled by the server-side test business module to ensure support for the diverse communication interface protocols of electric servo products from different manufacturers, models, and specifications. The algorithm definable module is used to match the function entry and exit points based on the input and output characteristics of a custom algorithm, using a non-quantitative parameter strategy. After matching, the custom algorithm is inserted and then scheduled by the data management module to ensure adaptation to diverse test objectives during data post-processing, deduction, and evaluation. The test item definable module is used to generate a test service model for the current test project based on pre-built generalized basic test components, according to the test scenario and test requirements information. After generation, it is scheduled by the test business module.

[0035] Definable service modules provide the system with good external openness and support the following features:

[0036] (1) Definable Protocol. As a universal testing system, it needs to be compatible with servo products from different manufacturers, models, and specifications, resulting in diverse and unpredictable external communication interfaces. Based on generic and highly reusable communication interface design, it supports definable communication protocols, including serial port, 1553B, and CAN. Users can adapt the system according to the protocol requirements of the servo products they are using, import the corresponding dynamic link library files into the server, and use it plug and play without secondary program development, thus reducing the project development resource overhead caused by switching servo devices.

[0037] (2) Definable Test Items. The testing system has built more than a dozen common test items, which can meet basic testing needs. However, there will still be some special application scenarios and related test content, as well as new test scenarios arising from the iterative updates of servo products. New test items, along with their related test methods and test content, can be customized according to new requirements. Customized test item sub-modules can be built based on the above-mentioned common business logic. Definable test items effectively improve the scalability and universality of system services.

[0038] (3) The algorithm is definable. Users can obtain relevant data by conducting automated tests on electric servo equipment. However, for test experimental data, different processing methods are often used due to different test purposes and indicators. Even for the same type of test project, different algorithms may be used. Therefore, it supports importing custom algorithms for target test projects to perform post-processing, calculation and evaluation of data. Users only need to follow the instructions to put the algorithm in with one click, which greatly improves the data inference, calculation and processing capabilities of automated testing.

[0039] The real-time data processing module ensures the correctness and integrity of the test data collected by the electric servo system. It employs a thread-safe queue mechanism to protect the correctness and integrity of the servo feedback data before sending it to the access control terminal.

[0040] The real-time performance guarantee module is used to deploy PREEMPT_RT patches and perform kernel trimming on the server's operating system data, and to process static program data using high-precision timers and rt_mutex semaphores to improve the server's real-time performance. Specifically, the processed system and program data are burned, loaded, and started in memory, significantly improving the overall real-time performance of the server, thereby enhancing the response speed, data processing capabilities, and accuracy of automated testing of the entire test system.

[0041] The real-time performance guarantee mechanism module ensures the high real-time performance of the testing system. This module employs a real-time design, using high-precision timed triggers as the atomic-level transaction driver for automated testing. It utilizes a preemptive kernel, integrates real-time scheduling strategies, optimizes event priority configuration, and features lightweight kernel deployment. Based on a high-precision timer, it designs timed transaction drivers and incorporates real-time semaphores in its programming, thereby further reducing task switching overhead, minimizing synchronization time and interrupt latency, and improving rapid response capabilities. This real-time design significantly enhances the testing system's response speed, data processing capabilities, and the accuracy of automated testing, enabling the collection of data to recreate a more realistic test state. The module supports a maximum testing accuracy of up to 40µs.

[0042] Specifically, the operation process for implementing the real-time guarantee mechanism module is as follows:

[0043] 1. Deployment and Configuration of PREEMPT_RT. This solution deploys the PREEMPT_RT real-time performance optimization patch on the Linux operating system running on the server, and optimizes the configuration based on the actual functional characteristics and performance requirements of this test system. The specific operation process includes: 1. Applying the real-time kernel patch using the patch statement; 2. Configuring the kernel and generating configuration files; 3. Compiling and installing the kernel; 4. Verification.

[0044] The above operations can enable the following real-time features to the application layer software architecture: 1. Interrupt threads; 2. Preemptive kernel; 3. Preemptible critical sections; 4. Real-time scheduler.

[0045] 2. Kernel Trimming. The Linux system has gradually evolved into a large-scale and complex system. Kernel expansion often introduces high memory load and performance costs, significantly impacting real-time performance. Considering the functional positioning of the server's embedded programs, this solution adaptively trims and optimizes the Linux kernel. This reduces unnecessary runtime code in the kernel, further improving overall system performance through kernel lightweighting. Specific trimming steps: 1. Establish trimming schemes for each module group based on the scenario requirements of this test system. Table 1 below illustrates the kernel trimming scheme in General Setup. 2. Execute the `make menuconfig` command to display the kernel configuration human-machine interface. 3. Configure the features of multiple kernel module groups, including General Setup, Loadablemodule support, System Type, Kernel Features, and Library routines, according to the scheme established in step 1. 4. Execute the `make` command to complete the compilation. 5. Start the trimmed lightweight kernel.

[0046] Table 1

[0047] Kernel features (Y: Enable N: Trim) Prompt for development and / or incomplete code / drivers Y Cross-compiler tool prefix N Local version-append to kernel release N Automatically append version information to the version string N Kernel compression mode(Gzip) Y Support for paging of anonymous memory(swap) N System V IPC Y POSIX Message Queues Y open by fhandle syscalls N Enable system-call auditing support N Make audit loginuid immutable N Automatic process group scheduling N Enable full-sized data structures for core(BASE_FULL) N Kernel->user space relay support(formerly relayfs) N Optimize for size Y Optimize very unlikely / likely branches(JUMP_LABEL) Y Enable ELF core N Perform full reference count validation at the expense of speed N GCOV-based kernel profiling N Embedded system Y

[0048] 3. A high-precision timer is used to design the timed transaction driver. When the server controls the electric servo system to perform periodic movements, it involves timed transaction driver triggering output logic. However, the kernel currently uses a low-precision, general-purpose timer framework by default, which uses a clock wheel mechanism to manage the clock. This mechanism's timing unit is based on clock interrupt counting, and its precision is only 1 / Hz (Hz maximum value is 1000, i.e., millisecond level), making it unsuitable for high-performance timed task development. All timed transaction driver logic in this test system is designed and run based on the high-precision timer framework hrtimer. The core organizational structure of hrtimer uses an improved red-black tree. This data structure has stable and fast search capabilities, and its time complexity can be controlled at O(logN), far exceeding the O(N) complexity of cascaded clock wheels. This structure further saves the query time for traversing timers and avoids the overhead of frequently waking up threads. Specifically, the design and implementation process of this system based on the hrtimer strategy involves the following steps: 1. Enable the compilation option CONFIG_HIGH_RES_TIMER to obtain kernel-level support; 2. Define an hrtimer structure instance; 3. Set the timeout period; 4. Write the clock callback function logic; 5. Design the timer recycling function and determine the recycling timing; 6. Initialize the clock, including selecting the clock type and precision mode, and initializing the base field of the hrtimer and the node field of the red-black tree node; 7. Mount the clock callback; 8. Start the timer.

[0049] 4. Program Design Based on rt_mutex Semaphores. Even though this test system adopts a preemptive scheduling strategy, common semaphore synchronization methods cannot avoid priority inversion when accessing shared protected resources, which greatly affects the system's real-time performance. In the program design of this test system, all scenarios involving resource mutual exclusion and synchronization are implemented based on rt_mutex real-time semaphores. rt_mutex adopts a semaphore priority inheritance strategy, which, based on the priority inheritance chain, grants transitivity to inheritance actions, ensuring that higher-priority threads can quickly acquire CPU resources and shorten response processing latency. Specifically, the method designed and implemented based on rt_mutex includes the following operations: 1. Create a dynamic real-time mutex instance using the rt_mutex_create() statement; 2. All threads involving the same shared resource point their private real-time mutex pointers to the above instance; 3. Add the rt_mutex_take() statement before the resource mutual exclusion code segment, i.e., the critical section, to acquire the real-time mutex lock; 4. Write the critical section program; 5. Release the real-time mutex lock rt_mutex using rt_mutex_release() after resource use is complete.

[0050] The server-side communication module implements application-layer data transmission and reception functions for various communication bus standards, including RS422 / RS485, 1MHz / 4MHz1553B, CAN digital communication, and Ethernet communication. Specifically, it facilitates communication between the server, servo devices, and access control terminals. Specifically, it encapsulates servo control commands and corresponding data into frames, calls the instantiated send function to send data to the servo device, or calls the instantiated receive function to receive servo feedback data from the servo device and forwards the data to the real-time data processing module.

[0051] Optionally, the access control terminal can be an application running on the Windows system of the backend test computer. This application is user-facing, and its design aims to reflect the completeness, rationality, reliability, flexibility, and user-friendliness of the testing method. The access control terminal is based on the MVC design pattern combined with the classic three-tier architecture, divided into a UI interface module, a controller module, and an interactive business module.

[0052] The UI module provides users with interactive entry points for various business models through a graphical interface, receives interaction commands and forwards them to the controller module, and visualizes test data. Specifically, it combines and draws menus, input boxes, buttons, and charts to create specific graphical areas that can be presented to users as entry points to trigger interactive business processes or as exit points for displaying servo feedback data. Interface displays include real-time waveforms, angular velocities, and test results generated during servo device testing; and visualization of internally visible data, such as test case information, test item configuration information, and protocol configuration information.

[0053] The controller module maps the UI module to the interactive business modules, acting as an organizer between different layers. It calls the corresponding interactive business modules based on interaction commands and returns the execution results to the UI module for display, thereby scheduling and controlling the application's execution flow. The controller module is responsible for controlling the application's flow, acting as a model dispatcher. Distribution includes: 1. Accepting requests and redirecting them to the business model of the interactive business module for processing. 2. After the business model completes processing, it returns the result to the request point in the UI module through the controller module. Simultaneously, the controller module associates externally visible data objects within the business model with numerical controls in the UI, such as test case information and test project configuration information. After association, these data objects are displayed intuitively on the interface, ensuring users are promptly aware of the current test status and preparing flow control information before initiating automated tests.

[0054] The interactive business module is the specific executor of the user's interaction with the UI interface module, and it controls the server program to perform complex test control tasks.

[0055] The interactive business module is used to implement corresponding interactive functions according to interactive instructions. Specifically, the interactive business module is oriented towards all functions of the access control terminal. Therefore, the division of the business model is closely related to the functional characteristics. In this embodiment, based on the different characteristics and combined with the coupling correlation within each business logic, the interactive business module is divided and visualized into multiple business models, including a communication interface configuration module, a protocol configuration module, a server remote control module, a test case management module, a test process control module, a test replay module, and a data storage module, etc., which are then scheduled by the controller module.

[0056] The communication interface configuration module is used to match different communication interfaces. Specifically, the access control terminal obtains the parameter information selected by the user from the UI interface module, such as the baud rate (including non-standard values), parity bit, check bit, start bit, and frame header and trailer for COM; the rate, transmitter RT address, receiver RT address, number of BC-RT data words, and number of RT-BC data words for 1553B; and the loopback mode, enable extension ID, rate, filter acceptance code, and filter mask code for CAN. After encapsulating and framing the above parameter information, it sends it to the server. After receiving the above communication interface configuration command, the server parses the data frame to obtain the corresponding configuration information and executes the initialization actions for COM, 1553B, and CAN to complete the communication configuration.

[0057] The protocol configuration module is used to obtain the protocol name, data transmission module name, and data parsing module name required for the test, and transmits them to the server communication module through the access control terminal communication module. Specifically, users can import pre-defined protocol dynamic link libraries into the server, and input the protocol name, data transmission module name, and data parsing module name required for this test into the access control terminal. The access control terminal transmits the above protocol information to the server. After receiving the instruction, the server first locates the corresponding library file in the directory where the dynamic link library is located based on the protocol name, then locates the corresponding function handle based on the data transmission module name and parsing module name, and finally instantiates the generic send and receive functions using the handles. After instantiation, the functions are handed over to the server communication module for scheduling.

[0058] The server-side remote control module is used to access and switch server states. The server acts as a service proxy, interacting with the server device; ensuring the proxy is under control is crucial for accurate control of the server device. Specifically, users trigger control commands at the access control terminal, such as establishing communication connections, starting the service, controlling test processes, terminating the service, and restarting the service. Upon receiving the command, the server parses and processes the data stream to obtain the target state. After obtaining the target state, the server performs a state switch and returns the latest state information to the access control terminal.

[0059] The test flow control module parses test cases and generates test instructions, and performs global control over the test case lifecycle, including features such as start, pause, termination, one-click restart, and test exception handling. Specifically, it parses the information of the test cases to be tested and generates the control flow for that test case, which is used to refine the test cases into multiple test steps, generating a test flow. The access control terminal schedules the server to perform all test actions on the server device according to the test flow.

[0060] The data storage module is used to categorize and store servo feedback data. Specifically, during testing, the server transmits data back at a high frequency. The access control terminal processes the received servo feedback data using a thread-safe queue to ensure data correctness, and then immediately performs localized ordered storage, classifying and saving the raw data stream hierarchically according to test cases and test items.

[0061] The access control terminal communication module is used to implement communication with the server. Specifically, it encapsulates and frames control commands and parameters, and then sends the processed data to the server via Ethernet. It also receives control command responses and servo feedback data transmitted back from the server via Ethernet, parses them, and sends them to the UI interface module.

[0062] In one possible implementation, the interactive business module further includes a test case management module, which is used to create, add, delete, modify, and sort test cases. Specifically, test cases can be created, and the test case information includes the test case ID, test case name, and the total number of test items (i.e., the test round). Each test case can contain one or more test items (fixed angle, zero-position characteristic, hysteresis width, linearity, asymmetry, overshoot, half-wave oscillation, angular velocity, amplitude and phase characteristics, cyclic deflection, sensitivity, inertia screening, communication error rate, and custom test items). The module allows for adding, deleting, modifying, and sorting test items, and configuring parameters including test item ID, test type, channel selection, amplitude, phase, period, and frequency. It also supports customizable test items, allowing users to customize new personalized test items according to actual needs. Furthermore, it supports test case serialization, allowing users to export frequently used test cases as test scripts after initial creation, reducing manual operations and improving testing efficiency.

[0063] In one possible implementation, the interactive business module further includes a scripting module. This scripting module is used for importing test scripts and parsing the scripting language, generating test cases, and serializing newly created test cases into test scripts. Specifically, it supports importing test scripts, parsing the scripting language, and generating test cases and test items. The scripting language in this design is easy to read and write, and the script format is an INI file. Simultaneously, it supports serializing newly created test cases into script files, facilitating later reuse and simplifying the operation process.

[0064] In one possible implementation, the interactive business module further includes a data management module, which includes a data analysis module and a data conversion module.

[0065] The data analysis module is used to analyze the test results, i.e., the servo feedback data, using a preset algorithm to obtain test analysis results; the data conversion module is used to set the output path of the test results and convert the binary data of the test results into data in a preset base, and then save it in the preset path.

[0066] Specifically, the data analysis module analyzes the test data of each test item in the test case after execution. It calculates performance metrics such as zero-return accuracy, linearity, and angular velocity using appropriate algorithms, and assesses whether the test meets the standards based on threshold values. Based on the data conversion module, the operator can select the source data file in the data storage directory and specify the output path to convert the raw binary data into intuitive numerical values ​​for easy observation of the test data.

[0067] In one possible implementation, the interaction module further includes a test replay module. Considering the fast cycle and high sampling frequency of real-time testing, users generally cannot perform immediate and ideal observation and data analysis of the instantaneous test situation. The test replay module is used to replay completed test cases and supports features such as pause, fast forward, and rewind to assist users in performing test analysis according to actual needs. Specifically, the access control terminal finds the storage path of the test data according to the test case ID, reads the binary file of the corresponding path byte by byte, performs base conversion processing on the obtained data stream, and submits the new values ​​to the UI interface module for display in the real-time data area of ​​the UI interface module, and completes the drawing operation in the waveform graph.

[0068] In one possible implementation, the interaction module further includes a test report module. This module collects test case information and obtains test result information for all test items after the test cases have been executed, and generates a test report and test conclusions based on this data. Specifically, after the test cases have been executed, the system scheduling data management module collects test case data, traverses key feedback data and test result information for all test items, and generates a test report file by summarizing and structuring the above data.

[0069] In one possible implementation, the interactive business module further includes an account management module, an algorithm import module, a communication testing module, and a self-testing function module.

[0070] The account management module is used for creating new users, authenticating user logins, and logging out users. Specifically, it includes functions for creating new users, authenticating logins, and logging out. In common testing scenarios, it ensures a one-to-one correspondence between operations and operators. Users are divided into administrators and regular operators. Regular operators only have testing permissions, while administrators can add or delete operator accounts within a group and view test operation logs.

[0071] The algorithm import module is used to select preset native algorithms or import customized algorithms. Specifically, native algorithms are built into the system and can be selected from the option list, while customized algorithms need to be loaded as dynamic link libraries after initialization in the access control terminal.

[0072] The communication testing module is used for TCP testing between the server and the access control terminal, as well as communication testing between the server and the electric servo system. Specifically, it includes access control-server TCP testing, and server-loaded servo COM, 1553B, and CAN testing.

[0073] The self-test module is used to detect the status of the electric servo system under test. Specifically, it detects the current status of the electric servo device, and the self-test result will serve as the basis for determining whether automated testing can be performed, and as a prerequisite for automated testing.

[0074] See Figure 3 The present invention provides a definable, high real-time automated testing system for electric servo systems, which offers the following interactive features for users: account management, remote server control, communication testing, servo self-test, protocol definition, communication interface configuration, test case management, scripting, test process control, customized test items, data acquisition and storage, data management, test reports, test playback, algorithm definition, and interface display.

[0075] In summary, the present invention, a definable high real-time automated testing system for electric servo systems, is based on a definable service module strategy. It can generate custom communication protocols, custom algorithms, and / or custom test items for test project modules according to custom service instructions. By supporting custom communication protocols, it ensures better protocol scalability, effectively reduces project development resource overhead caused by switching servo devices, empowers custom algorithms, overcomes the limitations of existing technologies in data processing, and greatly improves the data computation, deduction, and processing capabilities of automated testing. Supporting custom test items makes the test content customizable, and the definable nature greatly enhances the universality and applicability of automated testing. Simultaneously, the design of the real-time guarantee mechanism module solves the real-time problems existing in existing technologies for servo device automated testing, greatly improving the test system's response speed, data processing capabilities, and automated testing accuracy. The collected data can reproduce a more realistic test state.

[0076] Meanwhile, the definable high real-time automated testing system for electric servo systems of this invention also possesses test playback capabilities, reconstructing the test scene frame by frame, making automated testing traceable and improving the convenience of experimental observation. By constructing a service-oriented test model and implementing composable and configurable test cases, the granular scalability and envelope capability of test cases are improved. It supports multiple communication interfaces, comprehensively covering RS422 / RS485, 1MHz / 4MHz1553B, and CAN digital communication. It supports the ability to serialize test cases, thereby simplifying subsequent operation processes and improving testing efficiency. It has an operation log function to ensure the traceability of all operational behaviors. Combining a flat design style, using programmable and extensible controls as basic elements, it builds a "menu-style" UI page scheduling structure, providing users with a user-friendly operating experience. It has complete test assistance and interactive functions, providing more complete test process recording and flow control capabilities.

[0077] In another embodiment of the present invention, a definable high real-time automated testing method for electric servo systems is provided, which can be implemented based on the aforementioned definable high real-time automated testing system for electric servo systems, and includes the following main steps:

[0078] The access control terminal triggers a customizable protocol service request, generating a first service instruction and sending it along with protocol data to the server. Upon receiving the service instruction, the server invokes the customizable protocol service and deploys the underlying communication protocol based on the protocol data. The access control terminal triggers a customizable test project service request, generating a second service instruction and sending it along with custom project data to the server. Upon receiving the second service instruction, the server invokes the customizable test project service and configures a customized test project based on the custom project data. The access control terminal generates corresponding test content data based on the user-created test cases and temporarily stores it in the access terminal's memory. The access control terminal triggers a test start request, generating a third service instruction and sending it along with test content data to the server. Upon receiving this, the server switches its state machine to the running state and converts the test content data into basic information for this test. The access terminal triggers a test project execution request, generating a test instruction and sending it along with the test project data to the server. Upon receiving this, the server responds. The test command initializes the test items based on the test item data, calls the corresponding test service model to generate servo control data, and sends the servo control data to the electric servo system once or periodically. The server receives the servo feedback data from the electric servo system, processes it in real time, and sends it to the access control terminal. The access control terminal receives the servo feedback data, displays it in real time, performs calculations on the servo feedback data based on a preset algorithm, generates test results based on the calculated values ​​of the servo feedback data, and displays the test results. The access control terminal triggers a test report request, collects test case information, schedules the data management module to obtain the servo test result information of all test items, and generates a test report file from the above data. The access control terminal triggers a test replay request, attaching replay item information, locates the storage path of the test report file of the test item to be replayed based on the replay item information, serializes the servo feedback data of the test report file at that path into memory, and then reads and displays it frame by frame.

[0079] The main functions of the definable high real-time automated testing system for electric servo systems of this invention are as follows:

[0080] The process involves: logging into the access control terminal; establishing a connection between the access control terminal and the server; deploying protocols on the server and importing a custom protocol compatible with the target servo system; configuring the communication interface on the server to adapt to the communication bus interface requirements of the servo device; performing communication tests to ensure normal communication between the access control terminal, server, and servo device; starting the system server's test service after configuration; performing a status self-check on the electric servo system to ensure the device meets testing requirements; creating a test case and configuring its attributes, such as test case ID, number of test items, and number of loop tests; creating test items under this test case, selecting the test item category, configuring the test item parameters, and adding test items in the order of testing until all test items are added. The UI module will display the user-created test items in real time in a tree diagram format. For example, the process of creating test cases described above can also be achieved by importing test scripts and generating them with one click. Test cases can be inspected, test items can be reordered to adjust the test order, configuration information of test items can be modified, and test items can be added or deleted. Importing a custom algorithm to start the test will execute the test items in the test cases sequentially and cycle through the set test rounds. The UI module will display real-time waveforms and data generated during the test. After each individual test item is completed, the system will post-process and calculate the data according to the default algorithm or a custom algorithm, and display the test results in the UI module. During the test, if any abnormal situation occurs, the automated test can be paused (resumed) or terminated. After the test, a test report can be generated by the system. After the test, the test process can be observed and analyzed again through test replay.

[0081] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A definable, high real-time automated testing system for an electric servo system, characterized in that, It includes a server-side and an access control side; the server-side includes a server-side communication module, a process control and scheduling module, a test business module, a definable service module, a real-time guarantee mechanism module, and a real-time data processing module; The access control terminal includes an access control terminal communication module, a UI interface module, a controller module, and an interactive business module. The process control and scheduling module is used to obtain control commands and switch the server running state according to the control commands; The test service module is used to schedule a preset test service model according to the test instructions, obtain servo control instructions, and send them to the servo device through the server communication module; Defineable service modules are used to provide custom protocols, custom algorithms, and custom test service models; The real-time performance guarantee mechanism module is used to perform PREEMPT_RT patching and kernel trimming on the server's operating system data, and to perform processing on the program's static data based on high-precision timers and rt_mutex semaphores. The real-time data processing module is used to process the servo feedback data for correctness and integrity protection using a thread-safe queue mechanism, and then send it to the access control communication module through the server communication module. The UI module is used to acquire and visualize test requests and interactive requests; The controller module is used to invoke the interactive business module based on test requests or interaction requests; The interactive business module is used to respond to the calls of the controller module, implement the corresponding interactive business according to the interactive request, generate test instructions according to the test request, and send them to the server communication module through the access control terminal communication module.

2. The definable high real-time automated testing system for electric servo systems according to claim 1, characterized in that, The testing service module is configured with one or more of the following testing service models: The system includes a custom test module, a fixed angle test submodule, a zero-position characteristic test submodule, a hysteresis width test submodule, a linearity test submodule, an asymmetry test submodule, an overshoot test submodule, a half-wave oscillation test submodule, an angular velocity test submodule, an amplitude and phase characteristic test submodule, a cyclic deflection test submodule, a sensitivity test submodule, an inertia screening test submodule, a communication bit error rate test submodule, and a servo self-test test submodule. The fixed angle test submodule, zero-position characteristic test submodule, hysteresis width test submodule, linearity test submodule, asymmetry test submodule, overshoot test submodule, half-wave oscillation test submodule, angular velocity test submodule, amplitude and phase characteristic test submodule, cyclic deflection test submodule, sensitivity test submodule, inertia screening test submodule, communication bit error rate test submodule, and servo self-test submodule are used for fixed angle testing, zero-position characteristic testing, hysteresis width testing, linearity testing, asymmetry testing, overshoot testing, half-wave oscillation testing, angular velocity testing, amplitude and phase characteristic testing, cyclic deflection testing, sensitivity testing, inertia screening testing, communication bit error rate testing, and servo self-test testing, respectively.

3. The definable high real-time automated testing system for electric servo systems according to claim 1, characterized in that, The definable service module includes a protocol definable module, an algorithm definable module, and a test project definable module. The protocol definable module is used to instantiate data transmission and parsing based on the protocol adaptation dynamic link library file designed for the servo device, using a generic and reusable protocol adaptation design strategy, to obtain a data transmission and reception process adapted to the servo device protocol. The algorithm definable module is used to match the function entry and exit points based on the input and output characteristics of a custom algorithm, using a non-quantitative parameter strategy, to obtain the target algorithm. The test project definable module is used to generate a custom test service model based on pre-built generalized basic test components, according to the test scenario information and test requirement information of the current test project.

4. The definable high real-time automated testing system for electric servo systems according to claim 1, characterized in that, The interactive business module includes a communication interface configuration module, a protocol configuration module, a server-side remote control module, a test process control module, and a data storage module. The communication interface configuration module is used to match different communication interfaces; The protocol configuration module is used to obtain the protocol name, data transmission module name, and data parsing module name required for the test, and transmits them to the server communication module through the access control terminal communication module. The server-side remote control module is used to access and switch server status; The test process control module is used to generate and parse test cases based on test requests to obtain test instructions; The data storage module is used to categorize and store servo feedback data.

5. The definable high real-time automated testing system for electric servo systems according to claim 4, characterized in that, The interactive business module also includes a test case management module and a scripting module; The test case management module is used to create, add, delete, modify, and sort test cases; The scripting module is used to import test scripts and parse them into scripting languages ​​to obtain test cases; And serialize newly created test cases into test scripts.

6. The definable high real-time automated testing system for electric servo systems according to claim 4, characterized in that, The interactive business module also includes a data management module, which includes a data analysis module and a data conversion module. The data analysis module is used to analyze the servo feedback data using a preset algorithm to obtain test analysis results. The data conversion module is used to set the output path of the servo feedback data, convert the binary data of the servo feedback data into data of a preset base, and save it in a preset path.

7. The definable high real-time automated testing system for electric servo systems according to claim 4, characterized in that, The interactive service module also includes a test replay module; Used to replay completed test cases, and to pause, fast forward, and rewind the test replay.

8. The definable high real-time automated testing system for electric servo systems according to claim 4, characterized in that, The interactive business module also includes a test report module; the test report module is used to collect test case information and test result information after the test case is executed, and to generate a test report and test conclusion based on the test case information and test result information.

9. The definable high real-time automated testing system for electric servo systems according to claim 4, characterized in that, The interactive business module also includes an account management module, an algorithm import module, a communication testing module, and a self-testing function module; The account management module is used for creating new users, authenticating user logins, and logging out users; the algorithm import module is used to select preset native algorithms or import customized algorithms; the communication testing module is used for communication testing between the server-side communication module and the access control module, as well as between the server-side communication module and the server device; the self-testing function module is used to perform self-testing on the status of the server device under test.

10. A definable high real-time automated testing method for an electric servo system based on the definable high real-time automated testing system for an electric servo system as described in claim 1, characterized in that, include: The real-time performance guarantee mechanism module performs PREEMPT_RT patching and kernel trimming on the server-side operating system data, and performs processing on the program's static data based on high-precision timers and rt_mutex semaphores. Customizable service modules provide the custom protocols, custom algorithms, and custom test service models required for current automated testing. Receive test requests and interaction requests through the UI interface module; Based on the test request and interaction request, the controller module calls the interaction business module, and the interaction business module implements the corresponding interaction business according to the interaction request. The test command is generated according to the test request and sent to the server communication module through the access control terminal communication module. The test service module schedules a preset test service model according to the test instructions, obtains servo control instructions, and sends them to the servo device through the server communication module. The real-time data processing module uses a thread-safe queue mechanism to protect the correctness and integrity of the servo feedback data before sending it to the access control communication module via the server-side communication module. The UI module then visualizes the servo feedback data.

Citation Information

Patent Citations

  • Universal servo system property testing platform

    CN106292639A

  • Universal automatic test system for rail transit signaling equipment

    CN109062777A

  • Servo automatic test method and device

    CN114138645A