A method and device for controlling the retraction and extension of a dynamic theater seat pedal

By compensating and calibrating the encoder position change information of the theater dynamic seat pedal servo motor, and using the Haima optimization algorithm to optimize the PID control parameters, the problem of inaccurate speed control of the servo motor is solved, and more accurate pedal retracting and playback control is achieved, improving the viewing experience and safety.

CN119743066AInactive Publication Date: 2025-04-01SUZHOU GUOZHIWEI CULTURE TECH CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510074029.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-04-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the servo motor speed control of the theater dynamic seat pedal is not accurate enough, which affects the pedal's retracting and releasing speed and safety.

Method used

By compensating and calibration of the position change information of the encoder in the servo motor, the first rotation speed of the motor is calculated and compensated and calibrated to obtain the actual rotation speed. Then, the PID control parameters are optimized using the hippocampal optimization algorithm, the actual speed is adjusted to the preset speed through the improved PID controller, and the pedal is driven to retract and retract.

Benefits of technology

It effectively improves the control accuracy of the servo motor speed, ensures the smooth and safe pedal retracting and releasing process, and improves the viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743066A_ABST
    Figure CN119743066A_ABST
Patent Text Reader

Abstract

The invention discloses a control method and device for the retraction and extension of a dynamic theater seat pedal, which belongs to the field of control technology. The invention calculates the first speed of the motor after compensating and calibrating the position change information of an encoder in a servo motor, and then compensates and calibrates the first speed to obtain the actual speed of the servo motor. Finally, through a PID controller whose PID control parameters are optimized by a hippocampus optimization algorithm, the actual speed is adjusted to a preset speed to drive the pedal to retract and extend, thereby effectively improving the control accuracy of the servo motor speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of control technology, in particular to a method and device for controlling the retraction and extension of a dynamic theater seat pedal. Background Art

[0002] The theater dynamic seat pedal is a component installed on a specially designed movie-watching seat. It can provide corresponding physical feedback according to the action scenes in the movie. Therefore, according to the stage of the movie, the pedal will extend and retract from the bottom of the seat. For the audience's viewing experience and safety considerations during the pedal retraction and extension process, the pedal will be smoothly retracted and extended at a predetermined retraction and extension speed. The retraction and extension speed of the pedal depends on the speed of the servo motor. Therefore, how to accurately control the speed of the servo motor has become a problem that needs to be solved urgently. Summary of the invention

[0003] The present invention aims to solve the technical problems existing in the prior art. The present invention provides a method for controlling the retraction and extension of a pedal of a theater dynamic seat, comprising the following steps: S1, determining the required retraction and extension state of the current pedal; S2, the servo motor drives the pedal to retract and extend according to the required retraction and extension state of the current pedal and the real-time retraction and extension state: When the servo motor drives the pedal to extend from the bottom of the seat, the following steps are involved: A21. Obtain the required extension length of the pedal; A22, acquiring position change information of an encoder in the servo motor after compensation and calibration in real time, calculating a first speed of the servo motor according to the position change information, and finally compensating the first speed to obtain an actual speed; A23, analyzing the current extension length of the pedal according to the position change information; A24, adjusting the actual speed to a preset speed to drive the pedal to extend by using a PID controller whose PID control parameters are optimized by the Hippocampus optimization algorithm, until the current extension length reaches the desired extension length; When the servo motor drives the pedal to retract into the bottom of the seat, the PID controller is used to control the servo motor to drive the pedal to retract into the bottom of the seat at a preset speed until the retraction limit is reached, and the actual speed of the servo motor is obtained in the same way as step A22.

[0004] Furthermore, the servo motor drives the pedal to be retracted or extended according to the required retracted or extended state and the real-time retracted or extended state of the current pedal, specifically: If the current required pedal retraction state is a pedal extension state, and the real-time retraction state is a retracted state, the pedal is driven to extend from the bottom of the seat by a servo motor; If the current required pedal retraction state is a pedal retracting state, and the real-time retraction state is an extended state, the pedal is driven to retract to the bottom of the seat by a servo motor.

[0005] Furthermore, the compensation calibration of the encoder position change information is specifically as follows: Inputting the encoder's sine and cosine signals into a pre-trained adaptive neural network to obtain compensated sine and cosine signals; The PLL phase-locked loop is used to decode the compensated sine and cosine signals to obtain position change information.

[0006] Further, the compensating the first speed to obtain the actual speed is specifically: Acquire multiple historical first speeds and corresponding historical actual speeds as training samples to iteratively train the BP neural network; The weights and thresholds of the BP neural network are updated in iterative training by the Grey Wolf Algorithm until the preset number of iterations is reached to obtain a BP improved neural network; The corresponding actual rotation speed is obtained according to the first rotation speed through the BP improved neural network.

[0007] Furthermore, the weights and thresholds of the BP neural network are updated in iterative training by the gray wolf algorithm, specifically: Randomly generate multiple gray wolves as the initial population, each gray wolf represents a weight and threshold combination; For each gray wolf, the root mean square error of the corresponding BP neural network is calculated as the inverse fitness value, and the gray wolf with the smallest inverse fitness value is selected as Wolf; Update the position vector Sit of each gray wolf through the Archimedean buoyancy optimization algorithm; Recalculate the inverse fitness value of each gray wolf and update the position vector until the preset number of iterations is reached; With the final The wolf's weights and thresholds are used as the final weights and thresholds of the BP neural network to obtain the BP improved neural network.

[0008] Furthermore, the PID controller after optimizing the control parameters by the Hippocampus optimization algorithm has the following optimization steps: A number of seahorses at different positions are randomly generated as the initial population, and each position represents a PID control parameter combination; Before each iteration, a random number is generated from [-1,1] as the prey initial energy E0 for each hippocampus, and the corresponding prey escape energy E is calculated: The behavior of the corresponding hippocampus is determined based on E. If E>1, the corresponding hippocampus is moving; if E≤1, the corresponding hippocampus is hunting; The positions W of each hippocampus are updated according to the behavior of the hippocampus until the number of iterations reaches the first preset maximum number of iterations T, the first root mean square error corresponding to each current hippocampus is calculated, and the PID control parameter combination corresponding to the hippocampus position with the smallest first root mean square error is selected as the control parameter of the PID controller.

[0009] Furthermore, the calculation of the corresponding prey escape energy E is specifically: ; ; is the prey escape energy corresponding to the i-th hippocampus, is the initial energy of the prey corresponding to the ith hippocampus, p is the convergence factor, and t represents the tth iteration.

[0010] Furthermore, the updating of each hippocampus position W according to the hippocampus behavior is specifically as follows: If the hippocampus moves and r1>0, then: ; If the hippocampus moves and r1≤0, then: ; If the seahorse is engaged in hunting behavior and r3 < 0.1, then: ; If the seahorse is engaged in hunting behavior and r3 ≥ 0.1, then: ; Where r1 is a random number generated from a standard normal distribution, Levy is the Levy flight random function, is the position of the hippocampus with the smallest first RMS error after the t-th iteration, x, y, and z are all the three-dimensional coordinate components of the current hippocampus relative to the position of the hippocampus with the smallest first RMS error after the t-th iteration, that is, the coordinates of the current hippocampus in the spatial coordinate system constructed with the position of the hippocampus with the smallest first RMS error after the t-th iteration as the origin, r2 is a random number in [0,1], β is the random walk coefficient of Brownian motion that obeys the standard normal distribution, and r4 is a random number in [0,1].

[0011] Further, the determination of the required retracted and extended state of the current pedal is specifically as follows: Get each preset pedal demand period of the movie; Obtain the starting time and ending time of each preset pedal demand period; At the starting moment of each preset pedal requirement time period, the required retraction and extension state of the current pedal is judged to be the pedal-extended state, and in each group of adjacent preset pedal requirement time periods, if the time length between the end moment of the previous preset pedal requirement time period and the starting moment of the next preset pedal requirement time period is greater than the preset time length, then at the end moment of the previous preset pedal requirement time period, the required retraction and extension state of the current pedal is judged to be the pedal-retracted state; if the time length between the end moment of the previous preset pedal requirement time period and the starting moment of the next preset pedal requirement time period is less than or equal to the preset time length, then at the end moment of the previous preset pedal requirement time period, the required retraction and extension state of the current pedal is judged to be the pedal-extended state.

[0012] The present invention also provides a theater dynamic seat pedal retraction and extension control device, comprising: An analysis and judgment module is used to judge the required retraction and extension state of the current pedal and obtain the required extension length of the pedal; A servo motor is used to drive the pedal to be retracted or extended according to the required retracted or extended state and the real-time retracted or extended state of the pedal; The control module is used to control the actual speed of the servo motor, specifically: When the servo motor drives the pedal to extend from the bottom of the seat, the following steps are involved: Acquire position change information of an encoder in a servo motor after compensation and calibration in real time, calculate a first speed of the servo motor according to the position change information, and finally compensate the first speed to obtain an actual speed; Analyzing the current extension length of the pedal according to the position change information; By using a PID controller whose PID control parameters are optimized by an improved particle swarm optimization algorithm, the actual speed is adjusted to a preset speed to drive the pedal to extend until the current extension length reaches the desired extension length; When the servo motor drives the pedal to retract into the bottom of the seat, the PID controller is used to control the servo motor to drive the pedal to retract into the bottom of the seat at a preset speed until the retraction limit is reached, and the actual speed of the servo motor is obtained in the same way as step A22.

[0013] Compared with the prior art, the present invention has the following beneficial effects: The present invention performs compensation calibration on the position change information of the encoder in the servo motor, calculates the first speed of the motor, and then performs compensation calibration on the first speed to obtain the actual speed of the servo motor. Finally, the PID controller after optimizing the PID control parameters by the Hippocampus optimization algorithm adjusts the actual speed to the preset speed to drive the pedal to retract and release, thereby effectively improving the control accuracy of the servo motor speed. The weights and thresholds of the BP neural network are updated through the Gray Wolf Algorithm, so that the obtained BP improved neural network has a strong global search capability and a fast convergence speed, while avoiding falling into the local optimum, reducing the risk of overfitting, and improving the generalization ability of the BP neural network. The BP improved neural network more accurately fits the complex relationship between the motor speed calculated by the encoder and the actual speed of the motor, reduces errors, and improves the accuracy of obtaining the actual speed. The position update of the gray wolf in the Gray Wolf Algorithm is optimized through the Archimedean optimization algorithm, and the concepts of simulated buoyancy and simulated density are introduced, so that the movement of the gray wolf is not only guided by the Alpha wolf, but also affected by its own buoyancy and density, which helps the Gray Wolf Algorithm better balance global search and local refinement and avoid premature convergence. The PID control parameters are optimized through the seahorse optimization algorithm to improve the control accuracy of the servo motor speed. The prey escape energy is introduced into the algorithm to dynamically adjust the movement and hunting behaviors of the seahorse, that is, to dynamically balance the global search and local development, to ensure that a strong global search capability is maintained in the early iterations, to avoid falling into the local optimal solution too early, and to gradually turn to local development in the later iterations, to speed up the convergence speed, enhance the robustness and adaptability of the algorithm, and further improve the control accuracy of the servo motor speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0016] Figure 1 The present invention is a flow chart of a method for controlling the retraction and extension of a theater dynamic seat pedal. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0019] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0020] Embodiment 1 See also Figure 1 As shown, the present invention provides a method for controlling the retraction and extension of a theater dynamic seat pedal, which specifically includes the following steps: S1, determining the required retraction and extension state of the current pedal; S2, the servo motor drives the pedal to retract and extend according to the required retraction and extension state of the current pedal and the real-time retraction and extension state: When the servo motor drives the pedal to extend from the bottom of the seat, the following steps are involved: A21. Obtain the required extension length of the pedal; A22, acquiring position change information of an encoder in the servo motor after compensation and calibration in real time, calculating a first speed of the servo motor according to the position change information, and finally compensating the first speed to obtain an actual speed; A23, analyzing the current extension length of the pedal according to the position change information; A24, adjusting the actual speed to a preset speed to drive the pedal to extend, by using a PID controller whose PID control parameters are optimized by an improved particle swarm optimization algorithm, until the current extension length reaches the desired extension length; When the servo motor drives the pedal to retract into the bottom of the seat, the PID controller is used to control the servo motor to drive the pedal to retract into the bottom of the seat at a preset speed until the retraction limit is reached, and the actual speed of the servo motor is obtained in the same way as step A22.

[0021] The retraction limit is the position when the pedal is completely retracted into the bottom of the seat and cannot be retracted any further. Each time the pedal is extended, it is extended at the retraction limit.

[0022] In step S1, the determination of the required retracted and extended state of the current pedal is specifically as follows: Get each preset pedal demand period of the movie; Obtain the starting time and ending time of each preset pedal demand period; At the starting moment of each preset pedal requirement time period, the required retraction and extension state of the current pedal is judged to be the pedal-extended state, and in each group of adjacent preset pedal requirement time periods, if the time length between the end moment of the previous preset pedal requirement time period and the starting moment of the next preset pedal requirement time period is greater than the preset time length, then at the end moment of the previous preset pedal requirement time period, the required retraction and extension state of the current pedal is judged to be the pedal-retracted state; if the time length between the end moment of the previous preset pedal requirement time period and the starting moment of the next preset pedal requirement time period is less than or equal to the preset time length, then at the end moment of the previous preset pedal requirement time period, the required retraction and extension state of the current pedal is judged to be the pedal-extended state.

[0023] In step S2, the servo motor drives the pedal to be retracted or extended according to the required retracted or extended state and the real-time retracted or extended state of the pedal, specifically: If the current required pedal retraction state is a pedal extension state, and the real-time retraction state is a retracted state, the pedal is driven to extend from the bottom of the seat by a servo motor; If the current required pedal retraction state is a pedal retracting state, and the real-time retraction state is an extended state, the pedal is driven to retract to the bottom of the seat by a servo motor.

[0024] In step A21, the required extension length of the pedal is obtained, specifically: Through infrared ranging, the distance lengths between the two heels of the audience corresponding to the current seat and the seat are obtained respectively, and the average is calculated. The average is used as the required extension length of the pedal of the current seat. If only the distance length between one heel and the seat is obtained, this distance length is used as the required extension length of the pedal of the current seat. If the distance lengths between both heels and the seat cannot be obtained, the preset extension length is used as the required extension length of the pedal of the current seat.

[0025] In step A22, the specific steps of compensating and calibrating the position change information of the encoder are as follows: Inputting the encoder's sine and cosine signals into a pre-trained adaptive neural network to obtain compensated sine and cosine signals; The PLL phase-locked loop is used to decode the compensated sine and cosine signals to obtain position change information.

[0026] The pre-trained adaptive neural network is trained using the sine and cosine signals of multiple encoders and the corresponding compensated sine and cosine signals as training samples.

[0027] The calculation of the first rotation speed of the servo motor according to the position change information belongs to the prior art and will not be described in detail here.

[0028] The actual speed is obtained by compensating the first speed, specifically: Acquire multiple historical first speeds and corresponding historical actual speeds as training samples to iteratively train the BP neural network; The weights and thresholds of the BP neural network are updated in iterative training by the Grey Wolf Algorithm until the preset number of iterations is reached to obtain a BP improved neural network; The corresponding actual rotation speed is obtained according to the first rotation speed through the BP improved neural network.

[0029] The weights and thresholds of the BP neural network are updated in iterative training by the gray wolf algorithm, specifically: Randomly generate multiple gray wolves as the initial population, each gray wolf represents a weight and threshold combination; For each gray wolf, the root mean square error of the corresponding BP neural network is calculated as the inverse fitness value, and the gray wolf with the smallest inverse fitness value is selected as Wolf; Update the position vector Sit of each gray wolf through the Archimedean buoyancy optimization algorithm; Recalculate the inverse fitness value of each gray wolf and update the position vector until the preset number of iterations is reached; With the final The wolf's weights and thresholds are used as the final weights and thresholds of the BP neural network to obtain the BP improved neural network.

[0030] The Archimedean buoyancy optimization algorithm is used to update the position vector Sit of each gray wolf, specifically: , , , , ; Among them, k represents the current number of iterations, B represents the simulated buoyancy of the current gray wolf, and ρ represents the simulated density of the current gray wolf. Indicates the current The current position of the wolf, a represents the simulated acceleration of the current gray wolf, and F represents the fitness value corresponding to the current gray wolf. Indicates the current The fitness value corresponding to the wolf, D represents the current gray wolf and the current The Euclidean distance between wolves, C represents the preset control parameters, and V represents the simulated volume of the current gray wolf.

[0031] The present invention updates the weights and thresholds of the BP neural network through the gray wolf algorithm, so that the obtained BP improved neural network has strong global search capability and fast convergence speed, avoids falling into local optimum, reduces the risk of overfitting, and improves the generalization ability of the BP neural network. The BP improved neural network more accurately fits the complex relationship between the motor speed calculated by the encoder and the actual speed of the motor, reduces errors, and improves the accuracy of obtaining the actual speed. The position update of the gray wolf in the gray wolf algorithm is optimized through the Archimedean optimization algorithm, and the concepts of simulated buoyancy and simulated density are introduced, so that the movement of the gray wolf is not only guided by the Alpha wolf, but also affected by its own buoyancy and density, which helps the gray wolf algorithm to better balance the global search and local refinement and avoid premature convergence.

[0032] In step A23, the current extension length of the pedal is analyzed based on the position change information, which is specifically obtained through the relationship between the encoder position change and the pedal extension and retraction amount established in advance, such as measuring the extended or retracted length of the pedal after the encoder angle rotates N cycles.

[0033] In step A24, the PID controller after optimizing the PID control parameters by the Hippocampus optimization algorithm has the following optimization steps: A number of seahorses at different positions are randomly generated as the initial population, and each position represents a PID control parameter combination; Before each iteration, a random number is generated from [-1,1] as the prey initial energy E0 for each hippocampus, and the corresponding prey escape energy E is calculated: The behavior of the corresponding hippocampus is determined based on E. If E>1, the corresponding hippocampus is moving; if E≤1, the corresponding hippocampus is hunting; The positions W of each hippocampus are updated according to the behavior of the hippocampus until the number of iterations reaches the first preset maximum number of iterations T, the first root mean square error corresponding to each current hippocampus is calculated, and the PID control parameter combination corresponding to the hippocampus position with the smallest first root mean square error is selected as the control parameter of the PID controller.

[0034] The calculation of the corresponding prey escape energy E is specifically: , ; is the prey escape energy corresponding to the i-th hippocampus, is the initial energy of the prey corresponding to the ith hippocampus, p is the convergence factor, and t represents the tth iteration.

[0035] The updating of each hippocampus position W according to the behavior of the hippocampus is specifically as follows: If the hippocampus moves and r1>0, then: ; If the hippocampus moves and r1≤0, then: ; If the seahorse is engaged in hunting behavior and r3 < 0.1, then: ; If the seahorse is engaged in hunting behavior and r3 ≥ 0.1, then: ; Where r1 is a random number generated from a standard normal distribution, Levy is the Levy flight random function, is the position of the hippocampus with the smallest first RMS error after the t-th iteration, x, y, and z are all the three-dimensional coordinate components of the current hippocampus relative to the position of the hippocampus with the smallest first RMS error after the t-th iteration, that is, the coordinates of the current hippocampus in the spatial coordinate system constructed with the position of the hippocampus with the smallest first RMS error after the t-th iteration as the origin, r2 is a random number in [0,1], β is the random walk coefficient of Brownian motion that obeys the standard normal distribution, and r4 is a random number in [0,1].

[0036] The PID control parameters are optimized through the seahorse optimization algorithm to improve the control accuracy of the servo motor speed. The prey escape energy is introduced into the algorithm to dynamically adjust the movement and hunting behaviors of the seahorse, that is, to dynamically balance the global search and local development, to ensure that a strong global search capability is maintained in the early iterations, to avoid falling into the local optimal solution too early, and to gradually turn to local development in the later iterations, to speed up the convergence speed, enhance the robustness and adaptability of the algorithm, and further improve the control accuracy of the servo motor speed.

[0037] Embodiment 2 The present invention also provides a theater dynamic seat pedal retraction and extension control device provided by the present invention, which specifically includes: An analysis and judgment module is used to judge the required retraction and extension state of the current pedal and obtain the required extension length of the pedal; A servo motor is used to drive the pedal to be retracted or extended according to the required retracted or extended state and the real-time retracted or extended state of the pedal; The control module is used to control the actual speed of the servo motor, specifically: When the servo motor drives the pedal to extend from the bottom of the seat, the following steps are involved: Acquire position change information of an encoder in a servo motor after compensation and calibration in real time, calculate a first speed of the servo motor according to the position change information, and finally compensate the first speed to obtain an actual speed; Analyzing the current extension length of the pedal according to the position change information; By using a PID controller whose PID control parameters are optimized by an improved particle swarm optimization algorithm, the actual speed is adjusted to a preset speed to drive the pedal to extend until the current extension length reaches the desired extension length; When the servo motor drives the pedal to retract into the bottom of the seat, the PID controller is used to control the servo motor to drive the pedal to retract into the bottom of the seat at a preset speed until the retraction limit is reached, and the actual speed of the servo motor is obtained in the same way as step A22.

[0038] Embodiment 3 The present invention also provides an electronic device, including: a processor, a sending device, an input device, an output device and a memory. The processor can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in the embodiment of the present application. The memory can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM), and is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes a method as described in any of the above possible implementation methods.

[0039] Embodiment 4 The present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a method as described in any possible implementation manner.

[0040] The beneficial effects of the present invention are: The present invention performs compensation calibration on the position change information of the encoder in the servo motor, calculates the first speed of the motor, and then performs compensation calibration on the first speed to obtain the actual speed of the servo motor. Finally, the PID controller after optimizing the PID control parameters by the Hippocampus optimization algorithm adjusts the actual speed to the preset speed to drive the pedal to retract and release, thereby effectively improving the control accuracy of the servo motor speed. The weights and thresholds of the BP neural network are updated through the Gray Wolf Algorithm, so that the obtained BP improved neural network has a strong global search capability and a fast convergence speed, while avoiding falling into the local optimum, reducing the risk of overfitting, and improving the generalization ability of the BP neural network. The BP improved neural network more accurately fits the complex relationship between the motor speed calculated by the encoder and the actual speed of the motor, reduces errors, and improves the accuracy of obtaining the actual speed. The position update of the gray wolf in the Gray Wolf Algorithm is optimized through the Archimedean optimization algorithm, and the concepts of simulated buoyancy and simulated density are introduced, so that the movement of the gray wolf is not only guided by the Alpha wolf, but also affected by its own buoyancy and density, which helps the Gray Wolf Algorithm better balance global search and local refinement and avoid premature convergence. The PID control parameters are optimized through the seahorse optimization algorithm to improve the control accuracy of the servo motor speed. The prey escape energy is introduced into the algorithm to dynamically adjust the movement and hunting behaviors of the seahorse, that is, to dynamically balance the global search and local development, to ensure that a strong global search capability is maintained in the early iterations, to avoid falling into the local optimal solution too early, and to gradually turn to local development in the later iterations, to speed up the convergence speed, enhance the robustness and adaptability of the algorithm, and further improve the control accuracy of the servo motor speed.

[0041] In the description of the specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0042] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (RandomAccess Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0043] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for controlling the retraction and extension of a dynamic theater seat pedal, characterized in that: The following steps are involved: S1, determining the required retraction and extension state of the current pedal; S2, the servo motor drives the pedal to retract and extend according to the required retraction and extension state of the current pedal and the real-time retraction and extension state: When the servo motor drives the pedal to extend from the bottom of the seat, the following steps are involved: A21. Obtain the required extension length of the pedal; A22, acquiring position change information of an encoder in the servo motor after compensation and calibration in real time, calculating a first speed of the servo motor according to the position change information, and finally compensating the first speed to obtain an actual speed; A23, analyzing the current extension length of the pedal according to the position change information; A24, adjusting the actual speed to a preset speed to drive the pedal to extend by using a PID controller whose PID control parameters are optimized by the Hippocampus optimization algorithm, until the current extension length reaches the desired extension length; When the servo motor drives the pedal to retract into the bottom of the seat, the PID controller is used to control the servo motor to drive the pedal to retract into the bottom of the seat at a preset speed until the retraction limit is reached, and the actual speed of the servo motor is obtained in the same way as step A22.

2. The theater dynamic seat pedal retraction and extension control method according to claim 1 is characterized in that: The servo motor drives the pedal to be retracted or extended according to the required retracted or extended state of the current pedal and the real-time retracted or extended state, specifically: If the current required pedal retraction state is a pedal extension state, and the real-time retraction state is a retracted state, the pedal is driven to extend from the bottom of the seat by a servo motor; If the current required pedal retraction state is a pedal retracting state, and the real-time retraction state is an extended state, the pedal is driven to retract to the bottom of the seat by a servo motor.

3. The theater dynamic seat pedal retraction and extension control method according to claim 1 is characterized in that: The specific steps for compensating and calibrating the encoder's position change information are as follows: Inputting the encoder's sine and cosine signals into a pre-trained adaptive neural network to obtain compensated sine and cosine signals; The PLL phase-locked loop is used to decode the compensated sine and cosine signals to obtain position change information.

4. The theater dynamic seat pedal retraction and extension control method according to claim 1 is characterized in that: The actual speed is obtained by compensating the first speed, specifically: Acquire multiple historical first speeds and corresponding historical actual speeds as training samples to iteratively train the BP neural network; The weights and thresholds of the BP neural network are updated in iterative training by the Grey Wolf Algorithm until the preset number of iterations is reached to obtain a BP improved neural network; The corresponding actual rotation speed is obtained according to the first rotation speed through the BP improved neural network.

5. The theater dynamic seat pedal retraction and extension control method according to claim 4 is characterized in that: The weights and thresholds of the BP neural network are updated in iterative training by the gray wolf algorithm, specifically: Randomly generate multiple gray wolves as the initial population, each gray wolf represents a weight and threshold combination; For each gray wolf, the root mean square error of the corresponding BP neural network is calculated as the inverse fitness value, and the gray wolf with the smallest inverse fitness value is selected as Wolf; Update the position vector Sit of each gray wolf through the Archimedean buoyancy optimization algorithm; Recalculate the inverse fitness value of each gray wolf and update the position vector until the preset number of iterations is reached; With the final The wolf's weights and thresholds are used as the final weights and thresholds of the BP neural network to obtain the BP improved neural network.

6. The theater dynamic seat pedal retraction and extension control method according to claim 1 is characterized in that: The PID controller after optimizing the control parameters by the Hippocampus optimization algorithm has the following optimization steps: A number of seahorses at different positions are randomly generated as the initial population, and each position represents a PID control parameter combination; Before each iteration, a random number is generated from [-1,1] as the prey initial energy E0 for each hippocampus, and the corresponding prey escape energy E is calculated: The behavior of the corresponding hippocampus is determined based on E. If E>1, the corresponding hippocampus is moving; if E≤1, the corresponding hippocampus is hunting; The positions W of each hippocampus are updated according to the behavior of the hippocampus until the number of iterations reaches the first preset maximum number of iterations T, the first root mean square error corresponding to each current hippocampus is calculated, and the PID control parameter combination corresponding to the hippocampus position with the smallest first root mean square error is selected as the control parameter of the PID controller.

7. The theater dynamic seat pedal retraction and extension control method according to claim 6 is characterized in that: The calculation of the corresponding prey escape energy E is specifically: ; ; is the prey escape energy corresponding to the i-th hippocampus, is the initial energy of the prey corresponding to the ith hippocampus, p is the convergence factor, and t represents the tth iteration.

8. The theater dynamic seat pedal retraction and extension control method according to claim 7 is characterized in that: The updating of each hippocampus position W according to the behavior of the hippocampus is specifically as follows: If the hippocampus moves and r1>0, then: ; If the hippocampus moves and r1≤0, then: ; If the seahorse is engaged in hunting behavior and r3 < 0.1, then: ; If the seahorse is engaged in hunting behavior and r3 ≥ 0.1, then: ; Where r1 is a random number generated from a standard normal distribution, Levy is the Levy flight random function, is the position of the hippocampus with the smallest first RMS error after the t-th iteration, x, y, and z are all the three-dimensional coordinate components of the current hippocampus relative to the position of the hippocampus with the smallest first RMS error after the t-th iteration, that is, the coordinates of the current hippocampus in the spatial coordinate system constructed with the position of the hippocampus with the smallest first RMS error after the t-th iteration as the origin, r2 is a random number in [0,1], β is the random walk coefficient of Brownian motion that obeys the standard normal distribution, and r4 is a random number in [0,1].

9. The theater dynamic seat pedal retraction and extension control method according to claim 2, characterized in that: The determination of the required retracted and extended state of the current pedal is specifically as follows: Get each preset pedal demand period of the movie; Obtain the starting time and ending time of each preset pedal demand period; At the starting moment of each preset pedal requirement time period, the required retraction and extension state of the current pedal is judged to be the pedal-extended state, and in each group of adjacent preset pedal requirement time periods, if the time length between the end moment of the previous preset pedal requirement time period and the starting moment of the next preset pedal requirement time period is greater than the preset time length, then at the end moment of the previous preset pedal requirement time period, the required retraction and extension state of the current pedal is judged to be the pedal-retracted state; if the time length between the end moment of the previous preset pedal requirement time period and the starting moment of the next preset pedal requirement time period is less than or equal to the preset time length, then at the end moment of the previous preset pedal requirement time period, the required retraction and extension state of the current pedal is judged to be the pedal-extended state.

10. A theater dynamic seat pedal retraction and extension control device, using the theater dynamic seat pedal retraction and extension control method according to any one of claims 1 to 9, characterized in that: include: An analysis and judgment module is used to judge the required retraction and extension state of the current pedal and obtain the required extension length of the pedal; A servo motor is used to drive the pedal to be retracted or extended according to the required retracted or extended state and the real-time retracted or extended state of the pedal; The control module is used to control the actual speed of the servo motor, specifically: When the servo motor drives the pedal to extend from the bottom of the seat, the following steps are involved: Acquire position change information of an encoder in a servo motor after compensation and calibration in real time, calculate a first speed of the servo motor according to the position change information, and finally compensate the first speed to obtain an actual speed; Analyzing the current extension length of the pedal according to the position change information; By using a PID controller whose PID control parameters are optimized by an improved particle swarm optimization algorithm, the actual speed is adjusted to a preset speed to drive the pedal to extend until the current extension length reaches the desired extension length; When the servo motor drives the pedal to retract into the bottom of the seat, the PID controller is used to control the servo motor to drive the pedal to retract into the bottom of the seat at a preset speed until the retraction limit is reached, and the actual speed of the servo motor is obtained in the same way as step A22.