Lidar laboratory simulation device based on a real-time operating system

By adopting a real-time operating system architecture in the lidar laboratory simulation device, defining each part as a concurrently executed thread, and using mechanisms such as thread flags and semaphores, the problems of real-time response and multi-module collaborative control of the device are solved, thereby improving the evaluation efficiency of lidar application performance.

CN117872323BActive Publication Date: 2026-06-23SOUTH WEST INST OF TECHN PHYSICS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTH WEST INST OF TECHN PHYSICS
Filing Date
2023-12-11
Publication Date
2026-06-23

Smart Images

  • Figure CN117872323B_ABST
    Figure CN117872323B_ABST
Patent Text Reader

Abstract

The application belongs to the field of laser radar application performance evaluation, and discloses a laser radar laboratory simulation device based on a real-time operating system, which comprises a detector signal acquisition system, a target simulator, an atmospheric transmission environment simulator, a laser and a detector; the detector signal acquisition system is used for controlling the laser to emit laser, the detector is used for receiving the echo of the laser, and data transmission is performed between the detector signal acquisition system and the detector; the target simulator moves under the control of a stepping motor and is used for simulating the detection targets of different heights and different reflectivities in a real scene; and the atmospheric transmission environment simulator is used for simulating the actual application environment of the laser in the laboratory. Compared with the conventional program control system, the application can cooperatively control multiple modules of the laser radar laboratory simulation device, respond to the operation of the user in real time, and is helpful for the evaluation of the relationship between the laboratory test index and the application performance of the laser radar.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of lidar application performance evaluation, and in particular relates to a lidar laboratory simulation device based on a real-time operating system. Background Technology

[0002] To address the application requirements of lidar 3D imaging in complex environments, a laboratory simulation device was built. By simulating the external environment, the relationship between laboratory test indicators and lidar application performance was obtained, thereby enabling the evaluation of lidar application performance.

[0003] The lidar laboratory simulation device comprises a signal acquisition system, a target simulator, and an atmospheric transmission environment simulator, requiring the design of a control system to coordinate the control of each component and respond to user operations. Previous program control systems were typically designed for single modules. For specific instruments and a single communication interface, a microcontroller was used as the controller, and a program based on an infinite loop architecture was written to achieve automatic control according to user needs. However, this design has two drawbacks: (1) it can only perform automatic control according to a fixed process, and cannot process user operations in real time during equipment operation; (2) it can only perform automatic control on a single module at a time, failing to meet the requirement of coordinated control of multiple modules in a lidar laboratory simulation device. Summary of the Invention

[0004] The technical problem this invention aims to solve is that conventional lidar laboratory simulation devices can only be automatically controlled according to a fixed process, and cannot process user operations in real time during equipment operation; they can only automatically control a single module at a time, which cannot meet the needs of coordinated control of multiple modules in lidar laboratory simulation devices.

[0005] To solve the above-mentioned technical problems, the specific technical solution of the present invention is as follows:

[0006] A lidar laboratory simulation device based on a real-time operating system includes a detector signal acquisition system, a target simulator, an atmospheric transmission environment simulator, a laser, and a detector.

[0007] The detector signal acquisition system is used to control the laser to emit laser light, and the detector is used to receive the laser echo. Data is transmitted between the detector signal acquisition system and the detector.

[0008] The target simulator moves under the control of a stepper motor to simulate detection targets of different heights and reflectivities in real-world scenarios.

[0009] The atmospheric transport environment simulator is used to simulate the actual application environment of lasers in the laboratory.

[0010] Furthermore, it also includes a real-time operating system, which includes a user input interface for parsing real-time command parameters input by the user and transmitting the parsed real-time command parameters to the detector signal acquisition system, target simulator, or atmospheric transmission environment simulator.

[0011] The detector signal acquisition system includes a flight measurement module, a detector temperature measurement module, and a detector bias voltage application module. The flight time measurement module is used to receive command parameters such as start time and distance gate. The detector temperature measurement module is used to return the detector temperature. The detector bias voltage application module is used to convert the received command parameters into the bias voltage required for the detector to operate.

[0012] The target simulator includes a stepper motor motion module and a target gating control module. The stepper motor motion module receives parameters such as motion speed and motion distance from the instruction parameters and scans according to the user-defined mode. The target gating control module receives corresponding instruction parameters and selects the target or its pixels according to the user's configuration.

[0013] The atmospheric transport environment simulator includes a water vapor, smoke, rain, and snow control module and a background light control module. The water vapor, smoke, rain, and snow control module is used to change the particle diameter and concentration of relevant substances in the atmosphere according to corresponding instruction parameters. The background light control module is used to change the wavelength and intensity of light according to corresponding instruction parameters.

[0014] This invention also provides a method for constructing a lidar laboratory simulation device based on a real-time operating system, specifically including the following steps:

[0015] S1. Build a lidar laboratory simulation device, which mainly includes a detector signal acquisition system, a target simulator, and an atmospheric transmission environment simulator. Identify the factors that affect the performance of each part of the lidar application.

[0016] S2. Build a hardware architecture based on a microprocessor and a software architecture based on a real-time operating system. For STM32 microcontrollers, use CMSIS-RTOS; for fully programmable SoCs, use FreeRTOS; or use other types of real-time operating systems. Define the specific functions of each component of the lidar laboratory simulation device and the user input interface as threads that can be executed concurrently.

[0017] S3. Design the program for each thread according to the thread operation mechanism, use thread flags to realize the interaction between user operation and device action, and complete the corresponding interface driver design. For product-level instruments and equipment, select USB, SPI, and TCP / IP communication interfaces according to their own supported interface forms and design corresponding drivers. For self-designed modules, write the relevant driver modules in Verilog and use the self-designed driver to control them.

[0018] S4. Use semaphores or mutexes to constrain access to the interface and avoid conflicts caused by different threads accessing the same interface resources.

[0019] The present invention has the following advantages: Compared with traditional program control systems, the present invention can coordinately control multiple modules of the lidar laboratory simulation device, respond to user operations in real time, and help evaluate the relationship between laboratory test indicators and lidar application performance. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the composition of the lidar laboratory simulation device of the present invention;

[0021] Figure 2 For the overall architecture of a real-time operating system;

[0022] Figure 3 Diagram of thread execution mechanism;

[0023] Figure 4 This is a diagram illustrating interface access. Detailed Implementation

[0024] To better understand the purpose, structure, and function of this invention, the invention will be described in further detail below with reference to the accompanying drawings.

[0025] I. LiDAR Laboratory Simulation Device

[0026] The software architecture based on a real-time operating system proposed in this invention defines the specific functions of each component of a lidar laboratory simulation device and the user input module as threads, enabling concurrent execution of various devices. Mechanisms such as thread flags, semaphores, and mutexes are employed to achieve inter-thread communication, real-time response to user operations, and protection of interface access. For lidar laboratory simulation devices, the real-time operating system architecture introduced in this invention enables coordinated control of the various components of the simulation device and provides real-time responses to user operations.

[0027] like Figure 1 As shown, the lidar laboratory simulation device in this embodiment includes a detector signal acquisition system, a target simulator, an atmospheric transmission environment simulator, a laser, and a detector;

[0028] The detector signal acquisition system controls the laser to emit laser light. The laser light, after passing through a transmitting lens and illuminating the target, generates an echo. This echo passes through the receiving optical system and is received by the detector. Data transmission occurs between the detector signal acquisition system and the detector to obtain information about the target's distance and intensity, which is then used for subsequent data processing and 3D image reconstruction. Factors affecting the performance of lidar applications include the optical system's transmittance, the optical system's receiving aperture (D), the optical system's effective receiving area, and the laser emission solid angle (beam divergence).

[0029] The target simulator includes targets of different heights and reflectivities, which move under the control of stepper motors to simulate complex target detection in real-world scenarios. Factors affecting the performance of lidar applications include the target's surface reflectivity ρ, the target's illuminated area perpendicular to the beam, and the beam cross-section at the target.

[0030] Because lidar transmission is affected by factors such as water vapor, smoke, rain, snow, and background light in practical applications, the transmission of laser light is attenuated. Therefore, an atmospheric transmission environment simulator is built in the lidar laboratory simulation device. By introducing corresponding generation devices, the attenuation caused by the above factors is simulated in the laboratory. The wavelength correction factor q is calculated using atmospheric visibility V (km), and the atmospheric attenuation coefficient σ is obtained, as well as the atmospheric transmittance considering atmospheric attenuation. The calculation formula is as follows:

[0031]

[0032]

[0033] In the above formula, λ is the laser wavelength (μm).

[0034] Let the laser power emitted by the lidar be , and considering the influence of the above factors, the laser power received by the lidar is calculated using the following formula:

[0035]

[0036] The lidar laboratory simulation device proposed in this invention uses a real-time operating system to control the above-mentioned factors, thereby realizing the laboratory evaluation of lidar application performance.

[0037] II. Overall Architecture of Real-Time Operating System

[0038] This embodiment employs a real-time operating system to coordinate the control of various components of the lidar laboratory simulation device. A microprocessor-based hardware system is built, and different communication interface chips are used to connect the various components of the control system, taking into account the characteristics of each module. A software architecture based on the real-time operating system is also constructed. The type of real-time operating system used varies: CMSIS-RTOS for STM32 microcontrollers, FreeRTOS for fully programmable SoCs, or other types of real-time operating systems.

[0039] like Figure 2 As shown, based on the components of the lidar laboratory simulation device, threads are defined according to their specific functions. The detector signal acquisition system mainly implements functions such as time-of-flight measurement, detector temperature measurement, and detector bias voltage application. The target simulator mainly implements functions such as stepper motor movement and target gating control. The atmospheric transmission environment simulator mainly implements functions such as water vapor / smoke control, rain / snow control, and background light control. These threads are the device action threads. A corresponding thread flag is set for each thread to monitor user input and generate corresponding actions. The user input interface is defined as a thread. The user inputs control commands through this thread at any time. After the commands are parsed, a corresponding thread flag is generated and sent to the relevant functional modules of the lidar laboratory simulation device to achieve the corresponding function.

[0040] After receiving the thread flag, the device action thread works according to the parameters set by the user or returns the relevant parameters. (1) Detector signal acquisition system: The time-of-flight measurement module receives parameters such as start time and distance gate; the detector temperature measurement module returns the detector temperature; the detector bias voltage application module converts the received parameters into the bias voltage required for the detector to work. (2) Target simulator: The stepper motor receives parameters such as movement speed and movement distance, and scans according to the mode set by the user; the target gating control module selects the target or its pixels according to the user's configuration. (3) Atmospheric transport environment simulator: The water vapor, smoke, rain and snow control module changes the particle diameter and concentration of relevant substances in the atmosphere according to the parameters provided by the user; the background light control module changes the wavelength and light intensity of the light according to the parameters provided by the user.

[0041] The threads of this real-time operating system can execute concurrently on a macroscopic level. During the operation of the lidar laboratory simulation device, it can respond to user input at any time and adjust specific parameters in the simulation and evaluation process in the laboratory in real time.

[0042] III. Thread Execution Mechanism and Driver Design

[0043] The LiDAR laboratory simulation device proposed in this embodiment has two types of threads: a user input interface thread and a device action thread. Each thread uses its own operating mechanism to execute an infinite loop program, and a thread flag is used to enable communication between the two types of threads. All threads execute concurrently on a macroscopic level.

[0044] The thread's execution mechanism is as follows: Figure 3 As shown. After the control system is powered on, the real-time operating system starts and initializes all threads, putting each thread in a ready state. The thread used for the user input interface runs immediately after initialization, constantly monitoring for user input. Upon receiving user input, it parses the input command and sends the corresponding thread flag to the appropriate device action thread to control the operation of related functions in the detector signal acquisition system, target simulator, or atmospheric transmission environment simulator. After sending the thread flag, it continues to wait for subsequent user input. The device action thread waits for thread flags after initialization; at this time, the thread is in a blocked state. When a certain function of a device receives the relevant thread flag, it enters the running state, calls the corresponding driver, completes the device action according to the parameters set by the user, and then returns to the blocked state to continue waiting for subsequent thread flags.

[0045] According to the functional requirements and hardware structure of the lidar laboratory simulation device, driver programs were designed for each thread. (1) Detector signal acquisition system: The time-of-flight measurement module is a self-developed module. Verilog is used to model the FPGA to complete the generation and reception of detector signals. The driver program is designed to enable the corresponding thread to start time-of-flight measurement after receiving the thread flag. The detector temperature measurement and detector bias voltage application modules use chips that transmit data through the SPI protocol. The SPI driver program is designed in the microprocessor to achieve control. (2) Target simulator: The stepper motor is a dedicated device that transmits data through USB or serial port. The USB or serial port driver program is designed in the microprocessor to achieve control. The target gating module controls the general I / O to complete the gating after chip decoding. The decoding program module is designed in the microprocessor to directly call the I / O driver program to achieve control. (3) Atmospheric transmission environment simulator: All related devices use USB, serial port or TCP / IP protocol for data transmission. The USB, serial port or TCP / IP driver program is designed in the microprocessor to achieve control. (4) During the debugging phase of the lidar laboratory simulation device, UART or TCP / IP is used to implement user input and debugging information display, and UART or TCP / IP driver is designed in the microprocessor.

[0046] IV. Resolving API Access Conflicts

[0047] The lidar laboratory simulation device proposed in this embodiment uses interfaces such as USB, SPI, and TCP / IP to realize data transmission between the detector signal acquisition system, the target simulator, and the atmospheric transmission environment simulator. During the debugging phase, UART or TCP / IP is also used for user input and debugging information output. However, different threads will use the same interface for data transmission. Due to the concurrent execution of threads, it is necessary to solve the problem of interface access conflict in order to prevent different threads from occupying the same interface resources at the same time.

[0048] like Figure 4 As shown, semaphores are used to ensure that a single interface can only be accessed by a specified number of threads at any given time. When only a single thread is allowed to access an interface at any given time, the semaphore degenerates into a mutex lock. A semaphore or mutex lock is set for each interface resource. When a thread needs to use an interface resource, it requests the semaphore or mutex lock. The real-time operating system will only allocate the interface resource to the requesting thread if the number of threads accessing the resource does not exceed the specified limit. After using the interface, the thread releases the semaphore or mutex lock, and the interface can be used by other threads. In the case of concurrent thread execution, using semaphores or mutex locks to constrain interface access can avoid conflicts caused by different threads accessing the same interface resource.

[0049] Based on the above principles, such as Figure 1 , Figure 2 , Figure 3 , Figure 4 As shown, this embodiment also provides a method for constructing a lidar laboratory simulation device based on a real-time operating system, including the following steps:

[0050] Design a lidar laboratory simulation device based on a real-time operating system according to steps S1 to S4.

[0051] S1. Build a lidar laboratory simulation device, which mainly includes a detector signal acquisition system, a target simulator, an atmospheric transmission environment simulator, etc., and clarify the influencing factors of each part on the application performance of lidar.

[0052] S2. Build a hardware architecture based on a microprocessor and a software architecture based on a real-time operating system. For STM32 microcontrollers, use CMSIS-RTOS; for fully programmable SoCs, use FreeRTOS; or use other types of real-time operating systems. Define the specific functions of each component of the lidar laboratory simulation device and the user input interface as threads that can be executed concurrently.

[0053] S3. Design the program for each thread according to the thread operation mechanism, use thread flags to realize the interaction between user operation and device action, and complete the corresponding interface driver design. For product-level instruments and equipment, select communication interfaces such as USB, SPI, and TCP / IP according to their own supported interface forms and design corresponding drivers. For self-designed modules, write the relevant driver modules in Verilog and use the self-designed driver to control them.

[0054] S4. Use semaphores or mutexes to constrain access to the interface and avoid conflicts caused by different threads accessing the same interface resources.

[0055] Compared with some past automatic control systems, this invention solves the problems of single controlled object and poor real-time response characteristics of the control process, improves the flexibility and real-time performance of the control system of lidar laboratory simulation device, and provides convenience for lidar application performance evaluation.

[0056] This embodiment of the lidar laboratory simulation device based on a real-time operating system enables a more flexible method for simulation and evaluation within a lidar laboratory. Although embodiments of the invention have been described with reference to the accompanying drawings, those skilled in the art will recognize that various modifications and improvements can be made without departing from the principles of the invention, and these modifications and improvements should also be considered within the scope of protection of this invention.

Claims

1. A method for constructing a lidar laboratory simulation device based on a real-time operating system, characterized in that, Specifically, the steps include the following: S1. Construct a lidar laboratory simulation device, which includes a detector signal acquisition system, a target simulator, an atmospheric transmission environment simulator, a laser, a detector, and a real-time operating system; The detector signal acquisition system is used to control the laser to emit laser light, and the detector is used to receive the laser echo. Data is transmitted between the detector signal acquisition system and the detector. The target simulator moves under the control of a stepper motor to simulate detection targets of different heights and reflectivities in real-world scenarios. The atmospheric transport environment simulator is used to simulate atmospheric transport environments in a laboratory. The real-time operating system includes a user input interface, which is used to parse the real-time command parameters input by the user and transmit the parsed real-time command parameters to the detector signal acquisition system, target simulator or atmospheric transmission environment simulator. The detector signal acquisition system includes a flight measurement module, a detector temperature measurement module, and a detector bias voltage application module; the flight time measurement module is used to receive start time and distance gate command parameters; the detector temperature measurement module is used to return the detector temperature; and the detector bias voltage application module is used to convert the received corresponding command parameters into the bias voltage required for detector operation. S2. Build a hardware architecture based on a microprocessor and a software architecture based on a real-time operating system. Use CMSIS-RTOS for STM32 microcontrollers and FreeRTOS for fully programmable SoCs. Define the specific functions of each component of the lidar laboratory simulation device and the user input interface as threads that can be executed concurrently. S3. Design the program for each thread according to the thread operation mechanism, use thread flags to realize the interaction between user operation and device action, and complete the corresponding interface driver design. For product-level instruments and equipment, select USB, SPI, and TCP / IP communication interfaces according to their own supported interface forms and design corresponding drivers. For self-designed modules, write the relevant driver modules in Verilog and use the self-designed driver to control them. S4. Use semaphores or mutexes to constrain access to the interface and avoid conflicts caused by different threads accessing the same interface resources.

2. The method for constructing a lidar laboratory simulation device based on a real-time operating system according to claim 1, characterized in that, The target simulator includes a stepper motor motion module and a target gating control module; the stepper motor motion module is used to receive motion speed and motion distance parameters in the instruction parameters and scan according to the user-defined mode; The target gating control module is used to receive corresponding instruction parameters and gating the target or its pixels according to the user's configuration.

3. The method for constructing a lidar laboratory simulation device based on a real-time operating system according to claim 2, characterized in that, The atmospheric transport environment simulator includes a water vapor, smoke, rain, and snow control module and a background light control module. The water vapor, smoke, rain, and snow control module is used to change the particle diameter and concentration of relevant substances in the atmosphere according to corresponding instruction parameters. The background light control module is used to change the wavelength and intensity of light according to corresponding instruction parameters.