A hardware-in-the-loop simulation system and control method for a planetary vehicle working mechanism

By employing a power coupling method between the first and second motors in the planetary rover's operating mechanism, combined with feedback control and load feedforward control, the problems of model decoupling and single load simulation in the hardware-in-the-loop simulation of the planetary rover's operating mechanism were solved, achieving a more realistic and real-time simulation effect and reducing experimental costs.

CN123137002APending Publication Date: 2026-11-20DEEP SPACE EXPLORATION TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611584278.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-14
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing planetary rover operating mechanism hardware-in-the-loop simulations suffer from several problems, including decoupling of the digital simulation model from the physical execution hardware, a single method for simulating the load on the planetary surface environment, asynchronous load commands and motor motion states, and difficulty in adapting fixed control parameters to continuous variable loads and sudden disturbances during operation.

Method used

The first motor simulates the driving process of the planetary rover's operating mechanism. The second motor is poweredly coupled to the first motor. The target load is calculated based on the planetary surface environment model and control commands are transmitted through the communication module to achieve closed-loop adjustment. Combined with feedback control and load feedforward control, motor control commands are generated to simulate the operating process under environments such as low gravity, planetary contact, and attitude fluctuations.

Benefits of technology

It improves the realism and real-time performance of hardware-in-the-loop simulation, enhances the reliability of control algorithms, reduces testing costs and the risk of prototype damage, and can more realistically simulate the load changes of the planetary rover's operating mechanism in different celestial surface environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137002A_ABST
    Figure CN123137002A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of ground simulation and motion control of deep space exploration equipment, and discloses a hardware-in-the-loop simulation system and control method suitable for a planetary vehicle working mechanism. The system comprises a first motor, a second motor and a communication module and a control device connected by mechanical transmission. The first motor is used for simulating the driving execution process of the working mechanism, and the second motor is used for applying an actual load. The control device generates corresponding control instructions of the two motors according to the working instruction, the surface environment parameters of the star and the motor running state, and coordinates the collaborative operation of the two motors. The environment model can simulate time-varying load working conditions such as low gravity environment, star soil contact or subsidence effect, vehicle body attitude disturbance, contact impact, and dynamically adjusts the motion control and load control combined with the running feedback information. Relying on the closed-loop linkage of the digital simulation model and the actual motor hardware, the application improves the authenticity and real-time performance of the ground simulation of the planetary vehicle working mechanism and the reliability of the control algorithm verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ground simulation and motion control technology for deep space exploration equipment, specifically to a hardware-in-the-loop simulation system and control method for a planetary rover's operating mechanism. Background Technology

[0002] With the development of deep space exploration missions, in addition to tasks such as surface exploration, environmental perception, and path planning, rovers also need to use robotic arms or other operating mechanisms to grasp, transport, deploy, and arrange scientific payload modules, detection modules, communication modules, and other equipment. This deployment process typically involves the dynamic coupling between the operating mechanism's drive motor, the robotic arm's transmission structure, the modules to be deployed, the rover body, and the celestial surface environment. Its control accuracy and environmental adaptability directly affect the module deployment position, attitude, and operational safety.

[0003] Due to the characteristics of planetary surface environments, such as low gravity, loose surface media, significant terrain undulations, and uncertain external disturbances, it is difficult to rely entirely on actual vehicles or prototypes for repeated verification in a ground environment. Hardware-in-the-loop simulation, by connecting actual controllers, motors, or actuators to a digital simulation model, can test the rover's operating mechanisms and control algorithms while retaining some of the dynamic characteristics of the real hardware. Therefore, it has gradually become an important technical means for ground verification of deep space exploration equipment.

[0004] Existing research on hardware-in-the-loop simulation platforms for planetary rovers primarily focuses on vehicle motion control, path planning, attitude adjustment, and electrical system fault simulation. In scenarios involving robotic arm deployment, some solutions rely solely on software models to approximate the robotic arm and environmental loads. The coordination between the actual motor and vehicle dynamics, robotic arm motion, and the planetary environment model is insufficient, easily leading to a disconnect between the digital simulation model and the executing hardware. Consequently, the obtained motor response characteristics, load fluctuations, and trajectory tracking effects often fail to accurately reproduce the mechanical interactions between the operating mechanism, vehicle body, terrain, and modules in a real deployment environment.

[0005] Current experimental systems simulating the load on operational mechanisms often employ fixed counterweights, constant resistance, preset step loads, or single-cycle disturbance methods. While these loading methods can assess the basic drive performance of the motor, they struggle to continuously reproduce the time-varying dynamic characteristics of loads across multiple operational phases, including module lifting, low-gravity transport, approaching the planetary surface, contact deployment, and release locking. For example, in the low-gravity environment of a planetary surface, this condition alters the gravitational torque balance between the robotic arm and the module to be deployed; loose planetary soil may cause contact subsidence or sudden changes in resistance. Adjustments to the rover's attitude can easily cause fluctuations in the robotic arm's end-effector position, and the module's contact with the ground can generate instantaneous impacts. If constant or single-mode loads are still used for testing, the results are likely to differ significantly from actual operational conditions on a planetary surface.

[0006] In some hardware-in-the-loop simulation systems, the environment model, control algorithm, and motor hardware belong to different devices or operate in different control cycles. Without a unified timing management and feedback correction mechanism, delays or asynchrony can easily occur between model calculation, communication transmission, and motor response. During sudden load changes, the time deviation between the load command and the actual position of the operating motor can further cause trajectory deviation, torque overshoot, or loading distortion, directly reducing the real-time performance and reliability of the simulation results.

[0007] Therefore, it is necessary to build hardware-in-the-loop simulation technology adapted to the planetary rover's operating mechanism to improve the realism and real-time performance of the planetary rover module deployment simulation, as well as the reliability of the control algorithm verification results. Summary of the Invention

[0008] This invention aims to solve the technical problems in existing planetary rover operating mechanism hardware-in-the-loop simulation, such as the decoupling of digital simulation models and physical execution hardware, the single simulation method of planetary surface environment load, the asynchrony between load commands and motor motion states, and the difficulty of fixed control parameters adapting to continuous load changes and sudden disturbances during operation. It provides a dual-motor towing hardware-in-the-loop simulation system and control method for planetary rover operating mechanisms.

[0009] This invention simulates the driving process of a planetary rover's operating mechanism using a first motor. A second motor, mechanically coupled to the first motor, converts the target load calculated from the digital planetary surface environment model into an actual mechanical load acting on the first motor. Based on the operational feedback information from the two motors, the motion control commands and load control commands are adjusted in a closed loop. Thus, without relying on a complete planetary rover prototype, the invention simulates the operating process of a planetary rover's operating mechanism in environments such as low gravity, contact or subsidence with planetary soil, vehicle attitude fluctuations, and contact impacts.

[0010] According to a first aspect of the present invention, a hardware-in-the-loop simulation system for a planetary rover operating mechanism is provided, comprising a first motor, a second motor, a communication module, and a control device; the first motor and the second motor are dynamically coupled, the first motor being used to simulate the drive execution unit of the planetary rover operating mechanism, and the second motor being used to apply a load to the first motor; the communication module being used to transmit control commands and operating status information between the control device and the motor controllers corresponding to the first motor and the second motor respectively; the control device is configured to: acquire the operating commands of the planetary rover operating mechanism and the operating status information of the first motor; generate a first control command for controlling the operation of the first motor according to the operating commands; determine a target load corresponding to the operating process of the planetary rover operating mechanism based on a preset planetary surface environment model and the operating status information, and generate a second control command for controlling the operation of the second motor according to the target load; output the first control command and the second control command respectively through the communication module, causing the first motor to perform a movement corresponding to the operating command, and causing the second motor to apply an actual mechanical load corresponding to the target load to the first motor; and acquire operating feedback information of the first motor and / or the second motor, and adjust the first control command and / or the second control command according to the operating feedback information.

[0011] Preferably, the power coupling connection is a coaxial rigid connection, and the first motor and the second motor are connected by a backlash-free coupling and mounted on the same base plate; both the first motor and the second motor are servo motors and are respectively equipped with encoders, and the operating status information and the operating feedback information include at least one of motor rotation angle, speed, current and output torque.

[0012] Preferably, the planetary rover's operating mechanism is a robotic arm, and the operating instructions are used to control the robotic arm to perform at least one of the following operations: grasping, lifting, transferring, approaching the surface of the planet, contacting the surface of the planet, releasing, and locking the module to be deployed; the control device is also configured to determine the current operating stage based on at least one of the following: target rotation angle, actual rotation angle, actual rotation speed, target load, target load change rate, and preset operating time.

[0013] Preferably, the target load is the target load torque, which includes the base load torque under low gravity conditions, the contact or subsidence disturbance torque of the planetary soil, the attitude disturbance torque of the rover body, and the impact torque when the rover's operating mechanism contacts the surface of the planetary body, and is determined according to the following formula:

[0014]

[0015] in, The target load torque, The base load torque, The contact or subsidence disturbance torque of the star soil. The torque representing the attitude disturbance of the planetary rover is given. The impact torque is [value missing].

[0016] Preferably, when the planetary rover's working mechanism is a robotic arm equivalent to a single rotating joint, the basic load torque is determined according to the following formula:

[0017]

[0018] in, For the quality of the modules to be deployed, The mass of the equivalent link of the robotic arm. Let L be the gravitational acceleration on the surface of the target celestial body, L be the length of the equivalent link of the robotic arm, and θ(t) be the real-time rotation angle of the equivalent link of the robotic arm relative to the preset reference plane.

[0019] Preferably, the contact or subsidence disturbance torque of the star soil is determined based on the star soil disturbance amplitude, the disturbance attenuation coefficient, and the star soil terrain disturbance frequency; the rover body attitude disturbance torque is determined based on the body attitude disturbance amplitude, the body sway characteristic frequency, and the disturbance phase; the impact torque is determined using a piecewise pulse function, which includes at least the impact start time, the impact duration, and the impact torque peak value; the target load torque also includes the friction load torque generated by the friction of the working mechanism joints, star dust friction, or transmission mechanism friction.

[0020] Preferably, the control device generates the first control command using a composite control method that combines feedback control and load feedforward; the control deviation of the feedback control is the difference between the target motion state and the actual operating state of the first motor; the load feedforward is determined based on the calculated value of the target load torque or the observed value of the actual load torque; and the first control command is obtained by superimposing the feedback control output and the load feedforward compensation.

[0021] Preferably, the feedback control is a piecewise adaptive PID control. The control device determines the current operation stage based on at least one of the target position, actual position, actual speed, target load, target load change rate, and preset operation time during the operation process, and adjusts at least one of the proportional coefficient, integral coefficient, and derivative coefficient based on at least one of the current operation stage, the control deviation, and the control deviation change rate. The output of the composite control is determined according to the following formula:

[0022]

[0023] in, This is the control output quantity corresponding to the first control command. The control deviation is mentioned above. , and These are the proportional coefficient, integral coefficient, and derivative coefficient, respectively, which are adjusted according to the current work stage or operating state. For load feedforward gain, This refers to the calculated or observed value of the target load torque.

[0024] Preferably, the control device operates according to a fixed simulation step size, and the current simulation time is determined according to the following formula:

[0025]

[0026] in, This represents the simulation time corresponding to the k-th simulation cycle. The fixed simulation step size;

[0027] The control device is also configured to calculate the timing deviation between the software simulation time and the motor hardware operation time, and to perform timing synchronization correction or trigger safety protection when the timing deviation exceeds a preset maximum timing error threshold.

[0028] Preferably, the control device is further configured to: determine the motion tracking error of the planetary rover operating mechanism and the load tracking error of the second motor based on the operation feedback information; adjust the control parameters of the first motor based on the motion tracking error; and correct at least one of the equivalent stiffness of the planetary soil, friction coefficient, disturbance amplitude, disturbance attenuation coefficient, and peak impact load in the planetary surface environment model based on the load tracking error, so as to form a two-way closed-loop update between the motor control parameters and the planetary surface environment model.

[0029] Preferably, the control device further includes a safety protection module, which comprises a rotation angle limiting unit and a motor overload protection unit; the rotation angle limiting unit is used to determine whether the actual rotation angle of the first motor meets the following requirements:

[0030]

[0031] in, and These are the minimum and maximum allowable turning angles of the planetary rover's operating mechanism, respectively.

[0032] The motor overload protection unit is used to limit motor control commands, reduce motor output, or stop the operation of the first motor and the second motor based on the comparison result between the effective value of the motor current and the preset maximum allowable operating current.

[0033] According to a second aspect of the present invention, a hardware-in-the-loop simulation method for a planetary rover operating mechanism is provided, the method being applied to a hardware-in-the-loop simulation platform including a first motor and a second motor with power coupling connection, and comprising the following steps:

[0034] S1, Obtain the operation instructions of the planetary rover's operating mechanism and the operating status information of the first motor;

[0035] S2, Generate a first control command for controlling the operation of the first motor according to the work instruction;

[0036] S3, based on the preset planetary surface environment model and the operating status information, determine the target load corresponding to the operation process of the planetary rover working mechanism, and generate a second control command for controlling the operation of the second motor according to the target load;

[0037] S4, send the first control command and the second control command to the first motor and the second motor respectively, so that the first motor performs the movement corresponding to the operation command, and the second motor applies the actual mechanical load corresponding to the target load to the first motor;

[0038] S5, obtain the operation feedback information of the first motor and / or the second motor, and adjust the first control command and / or the second control command according to the operation feedback information.

[0039] Preferably, the planetary rover's operating mechanism is a robotic arm, and the operating instructions are used to control the robotic arm to perform at least one of the following operations: grabbing, lifting, transferring, approaching the surface of the planet, contacting the surface of the planet, releasing, and locking the module to be deployed; the current operating stage is determined based on at least one of the following: target rotation angle, actual rotation angle, actual rotation speed, target load, target load change rate, and preset operating time.

[0040] Preferably, step S3 includes: determining a gravity correction coefficient based on the gravitational acceleration of the target celestial body surface and the standard gravitational acceleration of Earth; calculating the basic load torque based on the mass of the module to be deployed, the mass of the robotic arm, the geometric parameters of the robotic arm, and the real-time posture of the robotic arm; calculating the contact or subsidence disturbance torque of the celestial soil based on the celestial soil mechanical parameters and the contact state between the rover's working mechanism and the celestial body surface; calculating the vehicle body attitude disturbance torque based on the rover's attitude angle, attitude angular velocity, or a preset attitude disturbance function; calculating the impact torque based on a preset impact function when the rover's working mechanism or the module to be deployed changes from a non-contact state to a contact state; and superimposing the torque components to obtain the target load.

[0041] Preferably, the first control command is generated by combining piecewise adaptive PID control with load feedforward control; a first set of control parameters is used in the first operation stage when the rover's working mechanism performs rapid movement, a second set of control parameters is used in the second operation stage when performing low-speed positioning, and a third set of control parameters is used in the third operation stage when contacting the surface of the planet or suppressing impact; at least one of the proportional coefficient, integral coefficient, and derivative coefficient in the first set of control parameters, the second set of control parameters, and the third set of control parameters is different.

[0042] Preferably, after outputting the first control command and the second control command, the software simulation time and the motor hardware operation time are obtained, and the timing deviation between the software simulation time and the motor hardware operation time is calculated; when the timing deviation is not greater than a preset maximum timing error threshold, the next simulation cycle is entered; when the timing deviation is greater than the preset maximum timing error threshold, at least one of the following operations is performed: communication resynchronization, control command update pause, or motor safety shutdown; the second control command is a load torque command or a q-axis current command corresponding to the load torque command; the second motor operates in torque control mode; and the first motor operates in position control mode, speed control mode, or position-speed-current multi-closed-loop control mode.

[0043] According to a third aspect of the present invention, an electronic device is provided, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the hardware-in-the-loop simulation method described above.

[0044] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the hardware-in-the-loop simulation method described above.

[0045] Beneficial effects:

[0046] This invention mechanically connects a first motor and a second motor. The second motor converts the target load calculated from the celestial surface environment model into the actual load input to the first motor, enabling closed-loop linkage between the digital simulation model and the physical motor hardware. Compared to simulations using only software load models, fixed counterweights, and constant resistance, this invention dynamically calculates composite time-varying loads, including low-gravity base loads, celestial soil contact or subsidence disturbance loads, vehicle attitude disturbance loads, contact impact loads, and friction parameter variation loads, based on the target celestial body's gravity parameters, soil parameters, terrain parameters, vehicle attitude parameters, and contact state parameters. This more realistically simulates the actual loads experienced by the rover's operating mechanism at different operating stages and in different celestial surface environments, improving the realism of the hardware-in-the-loop simulation and the reliability of the experiments.

[0047] This invention can also adjust the motor control parameters and load model parameters in real time according to the operating conditions and operation stages of the working mechanism. It employs a combination of piecewise adaptive PID control and load feedforward control to improve the accuracy and anti-disturbance performance of the working mechanism's trajectory tracking under conditions of continuous variable load, low-speed positioning, and sudden impacts. Simultaneously, by fixing the simulation cycle, verifying hardware and software timing deviations, implementing angle limits, current overload protection, and communication anomaly protection, it reduces loading errors, trajectory drift, and torque overshoot caused by communication delays and model calculation delays, preventing collisions between test platform mechanisms, motor stalling, and hardware damage. This invention eliminates the need for a complete planetary rover prototype, allowing for the verification and iterative optimization of the working mechanism's performance, environmental adaptability, and control algorithm. This helps reduce the cost of ground testing for deep space exploration equipment and the risk of prototype damage. Attached Figure Description

[0048] Figure 1 This is a schematic diagram of the overall structure of the dual-motor towing hardware-in-the-loop simulation system for the planetary rover's operating mechanism according to the present invention.

[0049] Figure 2 This is a schematic diagram of the structure of the first motor of the present invention.

[0050] Figure 3 This is a schematic diagram of the structure of the dual-motor counter-drive hardware module consisting of the first motor and the second motor of the present invention.

[0051] Figure 4 This is a schematic diagram of the control and signal interaction of the hardware-in-the-loop simulation system of the present invention.

[0052] Figure 5 This is a schematic diagram illustrating the following characteristics of the target rotation angle and the actual rotation angle of the robotic arm of the planetary rover in this invention.

[0053] Figure 6 The target load torque curve generated by the celestial surface environment model of this invention.

[0054] Figure 7 This is a schematic diagram illustrating the following characteristics of the load torque command and the actual output torque of the motor in this invention.

[0055] Among them, 10—first motor, also known as working motor or analog motor; 101—first motor body; 102—first motor encoder; 103—first motor controller; 104—first motor interface; 20—second motor, also known as load motor; 201—second motor body; 202—second motor encoder; 203—second motor controller; 204—second motor interface; 30—CAN communication module; 40—control device, also known as computer terminal or host computer; 50—power supply. Detailed Implementation

[0056] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. It should be understood that the following embodiments are only used to illustrate the present invention and are not intended to limit the scope of protection of the present invention. Any equivalent substitutions or conventional adjustments made to the motor model, communication protocol, robotic arm configuration, parameter values, load model, or controller implementation form based on the concept of the present invention can be included within the scope of implementation of the present invention.

[0057] In this specification, "module" refers to the mission payload transferred from the rover's mounting position to the surface of the target celestial body by the rover's robotic arm, including probes, sensors, communication relay units, sampling containers, calibration devices, or other payloads requiring precise deployment. "Simulated motor 10" refers to the motor used to drive the actuators of the physical simulation robotic arm; it can also be called the working motor. "Load motor 20" refers to the motor coaxially connected to simulated motor 10 and actively applying load torque. The following explanation primarily uses the lunar surface and a single-joint equivalent robotic arm as examples. For multi-degree-of-freedom robotic arms, the end effector load can be converted into the equivalent torque of the corresponding joint, and one or more dual motors can be used to verify the towing unit.

[0058] Example 1: Construction of a Hardware-in-the-Loop Platform for Dual-Motor Counter-Drive

[0059] like Figures 1 to 4 As shown, the hardware-in-the-loop platform of this embodiment includes a simulated motor 10, a load motor 20, a CAN communication module 30, a computer terminal 40, and a power supply 50. The simulated motor 10 includes a simulated motor body 101, a simulated motor encoder 102, a simulated motor controller 103, and a simulated motor interface 104; the load motor 20 includes a load motor body 201, a load motor encoder 202, a load motor controller 203, and a load motor interface 204. The simulated motor body 101 and the load motor body 201 are mounted on the same base plate, and their output shafts are rigidly connected coaxially via a coupling.

[0060] In one specific implementation, both motors are permanent magnet synchronous servo motors, and preferably the two motors are of the same model; when different models are used, the torque range, speed range, control bandwidth and sampling period of the two motors should meet the load reproduction requirements.

[0061] During installation, first fix the two motors to both ends of the base plate, and adjust the shaft axis using a dial indicator or laser alignment instrument; then tighten the mounting bolts and connect the coupling. If a shaft torque sensor is installed, place it between the output shafts of the two motors and connect the sensor output to the computer terminal 40.

[0062] The computer terminal 40 is connected to the analog motor controller 103 and the load motor controller 203 via the CAN communication module 30. The computer terminal 40 sends target rotation angle, target speed, or target torque commands to the analog motor controller 103 and receives the actual rotation angle and actual speed fed back by the analog motor encoder 102. The computer terminal 40 sends target load torque or target q-axis current commands to the load motor controller 203 and receives the rotation angle, speed, current, and alarm status fed back by the load motor encoder 202 and the load motor controller 203.

[0063] The towing system was operated at different constant speeds, and the torque required to maintain each speed was recorded. This was used to identify the system's viscous friction coefficient B and Coulomb friction torque. .

[0064] like Figure 4 As shown, the hardware-in-the-loop simulation system in this embodiment includes a computer, a CAN module, a simulated motor, and a load motor. The simulated motor and the load motor are mechanically connected to form a dual-motor towing hardware platform. The simulated motor is used to simulate the drive execution unit of the planetary rover's operating mechanism, and the load motor is used to apply actual mechanical loads corresponding to the environmental loads on the planetary surface to the simulated motor.

[0065] The simulated motor includes a simulated motor controller, a simulated motor body, and a simulated motor encoder. The load motor includes a load motor controller, a load motor body, and a load motor encoder. The computer communicates with both the simulated motor controller and the load motor controller via a CAN module. The CAN module is used to transmit control commands, configuration parameters, status feedback information, and fault diagnosis data between the computer and the two motor controllers.

[0066] The computer-based system runs a model of the planetary rover's operating mechanism, a model of the planetary surface environment, and a motor control program. The computer generates the target motion trajectory of the operating mechanism based on the input task parameters and generates motion control commands for the simulated motors based on the target motion trajectory. Simultaneously, the computer calculates the target load based on the planetary surface environment parameters, the operating status of the operating mechanism, and a preset environmental load model, and generates load control commands for the load motors based on the target load.

[0067] The computer sends the motion control command and the configuration parameters corresponding to the analog motor to the CAN module, which then forwards the motion control command and configuration parameters to the analog motor controller. The analog motor controller generates drive control signals based on the motion control command and controls the analog motor to operate at the target rotation angle, target speed, or target torque.

[0068] The computer also sends the load control command and the configuration parameters corresponding to the load motor to the CAN module, which then forwards the load control command and configuration parameters to the load motor controller. The load motor controller controls the load motor to output the corresponding load torque according to the load control command. The load control command can be a target torque command or a q-axis current command corresponding to the target torque; the load motor preferably operates in torque control mode.

[0069] The analog motor and the load motor are dynamically coupled via a coupling, drive shaft, or other mechanical transmission structure capable of transmitting torque. When the analog motor operates, it drives the load motor to rotate synchronously. The load motor outputs torque in the opposite direction to the analog motor's motion or in a preset loading direction according to load control commands, thereby applying a simulated drag load to the analog motor. In this way, digital loads calculated on the computer, such as low-gravity loads, soil contact or subsidence disturbance loads, vehicle attitude disturbance loads, and contact impact loads, are converted into actual mechanical loads.

[0070] The analog motor encoder is used to detect at least one of the actual rotation angle, actual speed, and rotation direction of the analog motor body, and sends the detected first state feedback signal to the analog motor controller. The analog motor controller sends the first state feedback signal, along with at least one of the motor current, output torque, operating status, and fault information, to the computer via the CAN module.

[0071] The load motor encoder is used to detect at least one of the actual rotation angle, actual speed, and rotation direction of the load motor body, and sends the detected second state feedback signal to the load motor controller. The load motor controller then sends the second state feedback signal, along with at least one of the load motor current, actual output torque, operating status, and fault information, to the computer via the CAN module.

[0072] The computer calculates the trajectory tracking error of the analog motor and the load tracking error of the load motor based on the operation feedback information of the analog motor and the load tracking error. Based on the trajectory tracking error, the computer adjusts the motion control commands in the subsequent control cycle, and based on the load tracking error, the computer adjusts the load control commands in the subsequent control cycle, thus forming a closed-loop control process of computer model calculation, CAN command transmission, dual motor operation, encoder status acquisition and feedback correction.

[0073] In one implementation, the computer cyclically performs target trajectory updates, environmental load calculations, control command transmissions, and status feedback acquisition according to a preset simulation cycle. Within each simulation cycle, the computer sends corresponding control commands to the simulated motor controller and the load motor controller, and determines whether the two motors are operating normally based on the returned status feedback and diagnostic data. When a communication anomaly, motor overload, excessive rotation angle, or load tracking error exceeding a preset threshold is detected, the computer controls the two motors to perform at least one safety protection operation, including limiting, deceleration, maintaining the current control value, or stopping operation.

[0074] The power supply provides the electrical energy required for the operation of the analog motor controller, the analog motor body, the load motor controller, and the load motor body. In one embodiment, the two motors share the same power supply; in another embodiment, the analog motor and the load motor are powered by independent power supplies to reduce electrical interference between the two motors.

[0075] Example 2: System Timing Initialization and Robotic Arm Motion Model

[0076] After completing the hardware connection, load the target deployment task, robotic arm parameters, and lunar surface environment parameters into the computer (40). The target deployment task should include at least the module grabbing position, transfer path, target deployment position, target rotation angle for each operation stage, and stage switching conditions; the robotic arm parameters should include at least the equivalent arm length L and the robotic arm mass. Module quality The parameters include: center of mass position, deceleration ratio, and moment of inertia; lunar environmental parameters include at least lunar gravitational acceleration, lunar soil disturbance parameters, vehicle attitude disturbance parameters, and lunar impact parameters.

[0077] PC version 40 sets a fixed simulation cycle The discrete simulation timing is defined according to the following formula:

[0078]

[0079] In the formula, For the k-th simulation step, A fixed simulation step size is set for the system, where k is the number of simulation iterations and n is the total number of iterations in one experiment. Within each simulation cycle, feedback data reading, state estimation, load calculation, control quantity calculation, command issuance, and state recording are performed sequentially.

[0080] To correct the ground-based robotic arm gravity load model to lunar surface gravity conditions, the lunar surface gravity correction factor is determined using the following formula:

[0081]

[0082] In the formula, η is the lunar surface gravity correction factor. The gravitational acceleration on the lunar surface. This is the Earth's standard gravitational acceleration. =1.62 m / s² =9.8 m / s², yielding η approximately 0.165. The gravity correction factor is used to calculate the self-weight load of the robotic arm and module, but does not directly scale the motor's moment of inertia and control cycle.

[0083] Taking an equivalent robotic arm with a single rotary joint as an example, the position of the robotic arm's end effector in the two-dimensional working plane is calculated using the following formula:

[0084]

[0085] In the formula, x and y are the two-dimensional working coordinates of the robotic arm end effector, L is the equivalent arm length of the robotic arm, and θ(t) is the real-time output rotation angle of the analog motor 10. When the robotic arm has multiple joints, the computer terminal 40 obtains the end effector position based on the forward kinematics model of the robotic arm, and converts the environmental force at the end effector into the equivalent torque of the joint to be tested through the Jacobian matrix.

[0086] Example 3: Establishment and Parameter Configuration of the Dynamics Model of Two Motors

[0087] In this embodiment, both the analog motor 10 and the load motor 20 are permanent magnet synchronous servo motors. The computer terminal 40 or the corresponding motor controller performs current and torque control based on the dq-axis model of the permanent magnet synchronous motor. The dq-axis voltage balance equation of the motor is:

[0088]

[0089] In the formula, and These are the stator voltages of the motor's d-axis and q-axis, respectively. and These are the stator currents of the motor's d-axis and q-axis, respectively. and These are the equivalent inductances along the d-axis and q-axis, respectively. The resistance of the motor stator winding; The electric angular velocity of the motor; This refers to permanent magnet flux linkage. The above parameters are obtained from motor manufacturer data, automatic driver identification, or offline calibration.

[0090] The real-time electromagnetic output torque of the motor is calculated according to the following formula:

[0091]

[0092] In the formula, The real-time electromagnetic output torque of the motor is given by p, where p is the number of pole pairs. When a surface-mounted permanent magnet synchronous motor is used and... When the value is 0, the electromagnetic torque is mainly determined by the q-axis current; the load motor controller 203 can convert the target load torque into the target q-axis current.

[0093] Considering the two motors, coupling, and corresponding equivalent robotic arm as a coaxial mechanical system, their mechanical motion balance relationship satisfies:

[0094]

[0095] In the formula, This refers to the real-time load torque of the system. The equivalent rotational inertia of the two motors coaxially; B is the mechanical angular velocity of the motor; B is the viscous friction coefficient of the system. This is the system's Coulomb friction torque. Additional joint friction caused by lunar dust intrusion, changes in vacuum lubrication conditions, etc., can be incorporated. Alternatively, it can be represented using independent correction parameters. , and Obtained through motor parameter calculation, no-load test, or offline identification.

[0096] Within a simulation cycle, the computer terminal 40 updates based on the angle and speed feedback from the analog motor encoder 102. The system calculates the electromagnetic torque that the load motor 20 should output based on the estimated angular acceleration and the aforementioned mechanical balance relationship. If the load motor controller 203 directly receives the torque command, it writes the calculated target electromagnetic torque into the driver's target torque field; if it receives the q-axis current command, it converts the target torque into the q-axis current based on the motor torque constant. The sign and direction of the target torque are determined by the direction calibration result during system initialization.

[0097] Example 4: Lunar Composite Dynamic Load Model and Loading Method

[0098] During the simulation, the computer-side 40 calculates the dynamic load on the lunar surface in real time within each simulation cycle based on the current robotic arm rotation angle, module load status, lunar soil disturbance parameters, vehicle attitude, and lunar touchdown event. A total load model is constructed using a multi-perturbation superposition method.

[0099]

[0100] In the formula, This represents the real-time total load torque. Configure the basic static load torque for the module; For lunar soil subsidence disturbance torque; The disturbance torque for vehicle body attitude sway; To set the instantaneous impact torque, the positive and negative directions of each component are determined according to the uniform positive rotation direction of the simulated motor 10.

[0101] Basic static load torque The torque of the robotic arm and module in the lunar gravitational field is calculated using the following formula:

[0102]

[0103] In the formula, For the quality of the modules to be deployed, Let g be the equivalent mass of the robotic arm, L be the lunar gravitational acceleration, θ be the length of the robotic arm, and θ be the angle between the robotic arm and the horizontal plane. This formula assumes the module is located at the end of the arm and the center of mass of the robotic arm is at L / 2. After the module is released, it can... The corresponding value is smoothly reduced from its current value to 0 within 100 ms to simulate module unloading.

[0104] The attenuation disturbance moment caused by lunar soil subsidence is calculated according to the following formula:

[0105]

[0106] In the formula, λ is the amplitude coefficient of the lunar soil disturbance moment, and λ is the disturbance attenuation coefficient. The angular frequency of lunar soil topographic disturbance. , λ and The values ​​can be set based on lunar soil simulation experiments, existing lunar soil mechanical data, or typical working conditions; the actual values ​​are... =30 N·m , =22 rad / s. When the sinking disturbance only occurs after lunar contact, the local timing start point can be taken as the lunar contact moment in the program, but the above-mentioned decay sine form should be maintained.

[0107] The low-frequency swaying disturbance torque of the vehicle body is calculated according to the following formula:

[0108]

[0109] In the formula, This represents the amplitude of the vehicle attitude disturbance. The characteristic angular frequency of the vehicle body sway. This represents the perturbation phase offset. The computer terminal 40 can generate this perturbation based on a preset sine wave signal, or it can convert the rover's attitude record into equivalent joint torques before loading. The actual perturbation data source and... , , The value is =20 N·m =3 rad / s =0 rad.

[0110] The instantaneous impact torque generated when the module touches the lunar surface, locks in, or is deployed is modeled using a piecewise pulse model:

[0111]

[0112] In the formula, This represents the peak value of the impact torque. Δt represents the initial moment of the impact, and Δt represents the duration of the impact. to During the +Δt period, the impact disturbance torque is taken as ; take 0 at other times. (Actual) , and Δt are =120 N·m =4.0 s, Δt=0.1 s. To protect the test bench hardware, the maximum allowable torque can be set to 600 N·m and the maximum rate of change to 2000 N·m / s while maintaining the pulse model.

[0113] 40 Generals on PC Adding ΔT1(t), ΔT2(t), and ΔT3(t) together yields The target load torque or target q-axis current is generated based on the directional coefficient, torque constant, and inertia-friction compensation relationship of the load motor 20. The load command can be processed by a first-order low-pass filter with a cutoff frequency of 30 Hz; for the lunar impact phase, to avoid excessive attenuation of the impact peak, a separate filter parameter with a cutoff frequency of 80 Hz can be used.

[0114] In an alternative implementation, the additional friction caused by lunar dust is not listed separately. Instead of being an additive term, it is incorporated into the mechanical equilibrium equation. It can also be dynamically adjusted based on temperature, monthly dust concentration, or operating time. .

[0115] Example 5: Segmented Adaptive PID and Load Feedforward Composite Control

[0116] The simulated motor 10 moves according to the target rotation trajectory of the robotic arm. The computer terminal 40 acquires the actual rotation angle of the simulated motor in each simulation cycle and calculates the position deviation and the rate of change of deviation.

[0117]

[0118] In the formula, e(t) represents the angular position deviation of the motor. Let θ(t) be the target commanded rotation angle of the system, and θ(t) be the actual feedback rotation angle of the simulated motor. This represents the rate of change of position deviation. The angle unit in the actual program is °; however, the unit should be standardized before calculating the control quantity.

[0119] The basic PID control output is calculated according to the following formula:

[0120]

[0121] In the formula, u(t) is the basic PID control output, Kp is the proportional coefficient, Ki is the integral coefficient, Kd is the derivative coefficient, and τ is the integral time variable. u(t) can represent the target torque, target q-axis current, speed correction, or position correction of the analog motor; the actual output type is the target torque command. The integral term is set to upper and lower limits of ±30% of the rated output torque, and the derivative term uses a filter with a cutoff frequency of 30 Hz to suppress encoder noise.

[0122] The PID parameters are dynamically adjusted based on different deployment conditions, such as grabbing and lifting, transferring, descending and approaching, lunar impact, and release and holding.

[0123]

[0124] In the formula, , and The parameters are the PID baseline parameters, and α(t), β(t), and γ(t) are real-time adaptive correction coefficients. α(t), β(t), and γ(t) can be calibrated based on the current operating stage, the absolute value of the position error, the rate of change of deviation, or the rate of change of load torque.

[0125] To reduce control lag caused by relying solely on error feedback, the computer terminal 40 introduces load feedforward compensation based on real-time load torque:

[0126]

[0127] In the formula, This is the load feedforward compensation amount. This is the feedforward gain coefficient. These are the observed or calculated load torque values ​​obtained from the lunar surface composite dynamic load model. If... and If the physical units are different, conversion should be performed based on the reduction ratio, mechanical efficiency, and motor torque constant. The specific conversion relationships are as follows:

[0128]

[0129] In the formula, Let i be the torque constant of the servo motor, and i be the reduction ratio of the robotic arm joint. The mechanical efficiency of the transmission mechanism.

[0130] The final control output of the simulated motor is:

[0131]

[0132] The control output of the basic PID controller is summed with the load feedforward compensation. (PC version 40) After being converted into control fields that can be received by the analog motor controller 103, the data is sent out. During stage switching, the parameters of the two stages are smoothly changed within 20 simulation cycles to prevent sudden changes in control parameters from causing abrupt changes in control torque; when the output is saturated, the accumulation of integral values ​​is stopped or limited to prevent integral saturation.

[0133] Example 6: Hardware-in-the-loop closed-loop operation, timing verification, and security protection

[0134] After the test begins, the computer executes the test cyclically for 40 seconds at a preset period Ts. Within each cycle, it first reads the encoders, current, and status feedback of the two motors, then updates the position of the robotic arm, the current deployment stage, and the environmental load. Subsequently, it calculates the control commands for the simulated motors and the load commands for the load motors, and sends them out via the CAN communication module within the same cycle. Timestamps can be added to both control and feedback frames to verify the runtime sequence of the software and hardware. The closed-loop transfer function used to evaluate the lunar module deployment position tracking performance is:

[0135]

[0136] In the formula, G(s) is the closed-loop transfer function of the system, and s is the complex frequency domain operator. Let ζ be the system's natural frequency and ζ be the system's damping ratio. ζ can be identified based on the analog motor controller parameters, the equivalent inertia of the two motors, and the measured step response; the actual value is... , This transfer function is used to evaluate the dynamic response from the target angle to the actual angle, and does not restrict the controller to a fixed second-order structure.

[0137] The computer-side 40 monitors the timing deviation between the software simulation time and the hardware feedback time in real time, and satisfies the following:

[0138]

[0139] In the formula, Due to hardware and software timing discrepancies, For software simulation time, For hardware operation time, This is the maximum permissible timing error threshold. (Actual) It takes 8 ms. When If the warning threshold is exceeded by 3 ms but the shutdown threshold is not exceeded by 8 ms, the system maintains the load command from the previous cycle and limits the target speed of the simulated motor; if no effective feedback is received for 5 consecutive cycles, or When the shutdown threshold is exceeded by 8 ms, both motors enter the torque shutdown state.

[0140] The robotic arm's rotation angle was limited throughout the experiment.

[0141]

[0142] In the formula, This is the minimum limit angle for the robotic arm. This is the maximum limit angle for the robotic arm. When the target angle approaches the soft limit in the next cycle, the computer reduces the target speed by 40°; when the actual angle exceeds the hard limit, the output stops immediately.

[0143] Motor overload protection is determined using the effective value of the q-axis current.

[0144]

[0145] In the formula, Here, T represents the effective value of the q-axis current of the motor, and T is the current integration period. This represents the real-time current along the q-axis. This represents the maximum allowable operating current of the motor. The actual integration period T is 10 ms, simulating the operation of motor 10 and load motor 20. They are 18 A and 18 A respectively. If If the continuous current threshold is exceeded and persists for 200 ms, the system reduces the target acceleration and load torque; if the instantaneous current exceeds the peak threshold of 32 A or the driver reports an overcurrent fault, the motor output is stopped immediately.

[0146] Example 7: Hardware-in-the-Loop Test of Complete Lunar Module Deployment

[0147] A complete lunar module deployment test was conducted using the platform and control methods described in Examples 1 to 6. Prior to the test, the dual-motor shaft alignment, encoder zero-position calibration, torque direction confirmation, and J, B, and... The target's turning trajectory and environmental parameters are identified and loaded into the computer terminal 40.

[0148] First, on the computer, the simulated motor 10 is kept stationary at a specified rotation angle, and the no-load curve is recorded. During the lifting phase, the simulated motor 10 rotates along the target trajectory, while the load motor 20 simultaneously applies the static load of the foundation. This static load is generated by... Calculations show that the transfer phase is superimposed on the basic static load torque. Used to simulate vehicle body sway; during the lunar touchdown phase, an additional load is added to the basic static load. and Used to simulate lunar soil sinking and the instantaneous impact of deployment; during the module release phase, the module's own mass... The corresponding static load component decreases.

[0149] During the experiment, the target rotation angle of the simulated motor was measured. And the actual rotation angle θ(t) Figure 5 The curve shown is the rotation angle following curve of the robotic arm.

[0150] The PC version 40 is generated based on the total load formula. Figure 6 The lunar surface time-varying load torque curve is shown; the target torque and actual output force of the load motor form a rectangle. Figure 7 The torque follow-up curve is shown. Figure 6 and Figure 7 The vertical axis unit is N·m, and the actual load torque is estimated from the motor's q-axis current, with a sampling frequency of 1000 Hz. Figure 7 After removing the initial rising transition segment from the target curve and the measured curve, the maximum error, root mean square error and average delay within the steady-state tracking interval are 60.1 N·m, 18.7 N·m and 36 ms, respectively.

[0151] To verify the effectiveness of piecewise adaptive PID and load feedforward, a fixed-parameter PID control experiment was conducted, with both groups maintaining the same target trajectory and load command. Each experiment was repeated five times, comparing the maximum overshoot, root mean square error of position, recovery time, and peak current during the lunar impact phase. The results show that, compared to the fixed-parameter PID control group, the piecewise adaptive PID combined with load feedforward reduced the maximum overshoot by 42.3% during the lunar impact phase, decreased the root mean square error of position tracking by 34.7%, shortened the trajectory recovery time after the impact disturbance by 38.1%, and reduced the motor peak current by 16.2%. This indicates that it has higher tracking accuracy and stronger anti-disturbance capability under lunar impact disturbance conditions.

[0152] Example 8: Alternative Implementation Methods for Multi-Jointed Robotic Arms and Other Target Planets

[0153] For multi-degree-of-freedom robotic arms, dual-motor towing units can be set up for one or more joints that affect the accuracy of module layout. The computer terminal 40 calculates the equivalent load torque of each joint based on the multibody dynamics model of the robotic arm and extracts the torque component corresponding to the joint under test as the load motor command. The remaining joints without physical towing units can be simulated by digital models.

[0154] For Mars, asteroids, or other target celestial bodies, Replace with the gravitational acceleration of the corresponding celestial surface, and... ,λ, The surface medium disturbance parameters are replaced with corresponding environmental parameters. If the target celestial body has a non-negligible atmospheric effect, the wind load equivalent torque can be increased without changing the dual-motor closed-loop architecture.

[0155] In addition to CAN, communication interfaces can also use EtherCAT, RS-485, industrial Ethernet, or real-time control cards; analog motors and load motors can be servo motors, direct-drive torque motors, or other motors capable of achieving position / torque closed loops; in addition to PID, control algorithms can also use model predictive control, sliding mode control, robust control, disturbance observer control, or a combination of them with load feedforward.

[0156] The above implementation method calculates the time-varying load cycle by cycle using a digital lunar environment model. The load motor 20 converts the time-varying load into actual shaft end reaction torque, and the analog motor 10 executes the robotic arm module deployment trajectory. The computer terminal 40 updates the load command and control command for subsequent cycles based on the real-time feedback from the two motors, thereby completing the hardware-in-the-loop verification of the lunar module deployment conditions and motor control algorithm without relying on a complete physical prototype of the lunar rover.

[0157] Electronic device implementation

[0158] In some embodiments, the present invention also provides an electronic device for performing the aforementioned hardware-in-the-loop simulation method. The electronic device may be a host computer, industrial control computer, real-time simulator, server, workstation, embedded controller, or other computing device with data processing and control command output capabilities.

[0159] The electronic device includes a processor and a memory, with the processor communicatively connected to the memory. The memory stores a computer program, which, when called and executed by the processor, causes the processor to perform the aforementioned hardware-in-the-loop simulation method. Specifically, the processor is used to acquire the operation instructions of the rover's operating mechanism, operating mechanism parameters, planetary surface environment parameters, and operating status information of the first motor and / or the second motor; generate a first control instruction for the first motor based on the operation instructions; determine the target load based on the rover's operating mechanism model, the planetary surface environment model, and the operating status information; and generate a second control instruction for the second motor based on the target load. The processor is also used to control the first control instruction and the second control instruction to be sent to the first motor and the second motor respectively, causing the first motor to perform the corresponding operating motion, and causing the second motor to apply an actual mechanical load corresponding to the target load to the first motor; and to adjust subsequent first control instructions and / or second control instructions based on the operating feedback information of the first motor and / or the second motor.

[0160] In one embodiment, the electronic device further includes a communication interface connected to both the processor and the communication module. This communication interface is used to send control commands to the first motor controller and the second motor controller, and to receive feedback data from the first and second motors, including their rotation angle, speed, current, torque, and operating status. The communication interface can be a CAN communication interface, a serial communication interface, an industrial Ethernet interface, a USB interface, or other interfaces capable of enabling data interaction between the electronic device and the motor controller.

[0161] In one embodiment, the electronic device further includes a bus, through which the processor, memory, and communication interface are interconnected. The bus may include one or more of a data bus, address bus, control bus, and power bus. The electronic device may also include an input device and a display device. The input device is used to receive task parameters, celestial surface environment parameters, motor parameters, robotic arm parameters, and safety thresholds. The display device is used to display the robotic arm's target trajectory, actual trajectory, target load, actual load, motor operating status, and alarm information.

[0162] The processor can be a central processing unit, microprocessor, digital signal processor, microcontroller, field-programmable gate array, graphics processor, application-specific integrated circuit, or other processing unit capable of executing computer programs, or it can be composed of multiple processing units working together. The memory can include volatile memory and / or non-volatile memory, such as random access memory, read-only memory, flash memory, solid-state drive, or disk storage.

[0163] In one specific embodiment, the memory stores a work trajectory generation program, a kinematics calculation program for the work mechanism, a planetary surface environmental load calculation program, a motor control program, a hardware and software timing verification program, and a safety protection program. Within a preset simulation cycle, the processor sequentially executes target trajectory updates, target load calculations, control command generation, command transmission, status feedback acquisition, and timing deviation verification, and updates the control commands for the next simulation cycle based on the status feedback, thereby achieving closed-loop linkage between the digital simulation model and the dual-motor towing hardware.

[0164] Computer-readable storage medium implementation

[0165] In some embodiments, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned hardware-in-the-loop simulation method.

[0166] Specifically, when the computer program is executed by the processor, it can perform the following operations: acquire the operation instructions of the planetary rover's operating mechanism and the operating status information of the first motor; generate a first control instruction based on the operation instructions; determine the target load based on the planetary surface environment model and the operating status information, and generate a second control instruction based on the target load; control the first motor to perform the movement corresponding to the operation instructions, and control the second motor to apply the actual mechanical load corresponding to the target load to the first motor; acquire the operating feedback information of the first motor and / or the second motor, and adjust the first control instruction and / or the second control instruction based on the operating feedback information.

[0167] The computer-readable storage medium is a non-transitory computer-readable storage medium, which may be a read-only memory, random access memory, flash memory, solid-state drive, disk, optical disk, memory card, removable storage device, or other tangible medium capable of storing computer programs. The computer program may be stored in the form of one or more program modules, each of which may be used to perform one or more functions including acquiring job parameters, generating target trajectory, calculating target load, generating motor control instructions, processing operation feedback, timing synchronization verification, correcting model parameters, and safety protection.

[0168] The computer program can be deployed entirely within the same electronic device or distributed across multiple interconnected computing devices. For example, the celestial surface environment model and the operating mechanism model can run on the first computing device, while the control instruction generation program for the first and second motors can run on the second computing device. The computing devices exchange data through a communication network or communication bus to jointly implement the aforementioned hardware-in-the-loop simulation method. Regardless of whether the computer program is deployed centrally or distributed, as long as it can implement the hardware-in-the-loop simulation method described in this invention when executed by a processor, it falls within the protection scope of this invention.

Claims

1. A hardware-in-the-loop simulation system for a planetary rover's operating mechanism, characterized in that, Includes a first motor, a second motor, a communication module, and a control device; The first motor and the second motor are connected by power coupling. The first motor is used to simulate the drive execution unit of the planetary rover's working mechanism, and the second motor is used to apply a load to the first motor. The communication module is used to transmit control commands and operating status information between the control device and the motor controllers corresponding to the first motor and the second motor, respectively. The control device is configured to: Obtain the operation instructions of the planetary rover's operating mechanism and the operating status information of the first motor; Generate a first control instruction for controlling the operation of the first motor according to the work instruction; Based on the preset planetary surface environment model and the operating status information, a target load corresponding to the operation process of the planetary rover is determined, and a second control command for controlling the operation of the second motor is generated according to the target load. The communication module outputs the first control command and the second control command respectively, so that the first motor performs the movement corresponding to the operation command, and the second motor applies the actual mechanical load corresponding to the target load to the first motor. as well as Obtain operational feedback information from the first motor and / or the second motor, and adjust the first control command and / or the second control command based on the operational feedback information.

2. The hardware-in-the-loop simulation system according to claim 1, characterized in that, The target load is the target load torque, which includes the base load torque under low gravity conditions, the contact or subsidence disturbance torque of the planetary soil, the attitude disturbance torque of the rover body, and the impact torque when the rover's operating mechanism contacts the surface of the planetary body, and is determined according to the following formula: ; in, The target load torque, The base load torque, The contact or subsidence disturbance torque of the star soil. The torque representing the attitude disturbance of the planetary rover is given. The impact torque is [value missing].

3. The hardware-in-the-loop simulation system according to claim 2, characterized in that, When the planetary rover's working mechanism is a robotic arm equivalent to a single rotating joint, the basic load torque is determined according to the following formula: ; Where m1 is the mass of the module to be deployed, and m2 is the mass of the equivalent link of the robotic arm. Let L be the gravitational acceleration on the surface of the target celestial body, L be the length of the equivalent link of the robotic arm, and θ(t) be the real-time rotation angle of the equivalent link of the robotic arm relative to the preset reference plane.

4. The hardware-in-the-loop simulation system according to claim 2, characterized in that, The contact or subsidence disturbance torque of the star soil is determined based on the star soil disturbance amplitude, the disturbance attenuation coefficient and the star soil topographic disturbance frequency. The rover's attitude disturbance torque is determined based on the rover's attitude disturbance amplitude, the rover's swaying characteristic frequency, and the disturbance phase. The impact torque is determined using a piecewise pulse function, which includes at least the impact start time, the impact duration, and the peak impact torque. The target load torque also includes the frictional load torque generated by friction of the working mechanism joints, stardust friction, or transmission mechanism friction.

5. The hardware-in-the-loop simulation system according to claim 1, characterized in that, The control device generates the first control command using a composite control method that combines feedback control and load feedforward. The control deviation of the feedback control is the difference between the target motion state and the actual operating state of the first motor. The load feedforward is determined based on the calculated value of the target load torque or the observed value of the actual load torque. The first control command is obtained by superimposing the feedback control output and the load feedforward compensation.

6. The hardware-in-the-loop simulation system according to claim 5, characterized in that, The feedback control is a piecewise adaptive PID control. The control device determines the current operation stage based on at least one of the target position, actual position, actual speed, target load, target load change rate and preset operation time during the operation process, and adjusts at least one of the proportional coefficient, integral coefficient and derivative coefficient based on at least one of the current operation stage, the control deviation and the control deviation change rate. The output of the composite control is determined according to the following formula: ; in, This is the control output quantity corresponding to the first control command. The control deviation is mentioned above. , and These are the proportional coefficient, integral coefficient, and derivative coefficient, respectively, which are adjusted according to the current work stage or operating state. For load feedforward gain, This refers to the calculated or observed value of the target load torque.

7. The hardware-in-the-loop simulation system according to claim 1, characterized in that, The control device operates according to a fixed simulation step size, and the current simulation time is determined by the following formula: ; in, This represents the simulation time corresponding to the k-th simulation cycle. The fixed simulation step size; The control device is also configured to calculate the timing deviation between the software simulation time and the motor hardware operation time, and to perform timing synchronization correction or trigger safety protection when the timing deviation exceeds a preset maximum timing error threshold.

8. A hardware-in-the-loop simulation method for a planetary rover's operating mechanism, characterized in that, The method is applied to a hardware-in-the-loop simulation platform including a first motor and a second motor with dynamic coupling connection, and includes the following steps: S1, Obtain the operation instructions of the planetary rover's operating mechanism and the operating status information of the first motor; S2, Generate a first control command for controlling the operation of the first motor according to the work instruction; S3, based on the preset planetary surface environment model and the operating status information, determine the target load corresponding to the operation process of the planetary rover working mechanism, and generate a second control command for controlling the operation of the second motor according to the target load; S4, send the first control command and the second control command to the first motor and the second motor respectively, so that the first motor performs the movement corresponding to the operation command, and the second motor applies the actual mechanical load corresponding to the target load to the first motor; S5, obtain the operation feedback information of the first motor and / or the second motor, and adjust the first control command and / or the second control command according to the operation feedback information.

9. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the hardware-in-the-loop simulation method of claim 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the hardware-in-the-loop simulation method of claim 8.