Stable control method for optimal preset time decision of rehabilitation robot with safe speed
By adopting the anti-step method and reinforcement learning algorithm in the rehabilitation robot, combined with the safety speed constraints, the optimal predetermined time stable tracking control method is designed, which solves the problem of stable time and safe speed decision-making of the human-machine system and improves the rehabilitation robot's Stability and safety of human-machine system.
Patent Information
- Application Number
- CN202411081736.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-22
AI Technical Summary
The existing rehabilitation robots have shortcomings in the decision-making of the stability time and safety speed of the human-machine system, which has led to the threat of the safety of the trainer and has failed to effectively solve the stable motion problem of the human-machine system.
The tracking controller is designed using the inverse step method based on the dynamic model of the rehabilitation robot, combined with the reinforcement learning decision algorithm and the safety speed constraints, and designed a safe speed control obstacle function to realize the optimal predetermined time stable tracking control of the human-machine system.
It improves the stability and safety of the human-machine system, ensures that the rehabilitation robots stably track the movement trajectory designated by the doctor at a safe speed, and ensures the safety of the trainer.
Smart Images

Figure CN119002532A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the control of a wheeled rehabilitation robot, and in particular to a stable control method for optimal predetermined time decision of a rehabilitation robot with a safe speed. Background Art
[0002] Traffic accidents and the aging of the population have led to an increasing number of patients with walking disorders. With the application of rehabilitation walking robots in rehabilitation centers, nursing homes and other places, the problem of shortage of rehabilitation doctors has been effectively solved. However, in practical applications, the adjustment time that trainees have to endure during the transient motion phase of the human-machine system is limited and different. If the adjustment time is too long, the robot will constantly change the motion trajectory and speed to reduce the tracking error, so that the human-machine system gradually enters the steady-state motion phase. Since the trainees' leg strength is weak, the robot constantly changes the motion trajectory and speed, making it difficult to ensure the coordinated motion of the human-machine system, thus threatening the safety of the trainees. Therefore, studying the time when the human-machine system enters stable motion can provide a basis for rehabilitation doctors to judge whether the trainees can use the robot for walking training, which is of great significance to improving the safety of rehabilitation robots helping trainees to walk.
[0003] In recent years, there have been many research results on the tracking control of rehabilitation walking robots, but none of them consider the stabilization time of the human-machine system tracking movement. In fact, the trainee and the rehabilitation robot can cooperate to complete the training task, and the stabilization time of the human-machine system movement is directly related to the safety of the trainee; at the same time, in order to avoid the robot speed adjustment exceeding the trainee's tolerance, it is also extremely important to solve the problem of the safe speed of human-machine cooperative movement. So far, there are no relevant research results on the tracking control method of the predetermined time decision of the stable movement of the rehabilitation robot at the safe speed. The present invention designs the safe speed of the rehabilitation robot, and proposes a stable tracking control method with the optimal predetermined time decision, which improves the stability and safety of the tracking movement of the human-machine system. Summary of the invention
[0004] The present invention aims to solve the defects of the prior art and provide a stable control method for optimal scheduled time decision of a rehabilitation robot with safe speed, so as to obtain the optimal scheduled time of stable movement of the human-machine system and ensure the safety of the movement speed.
[0005] To achieve the above object, the present invention adopts the following technical solution, including the following steps:
[0006] 1) Based on the dynamic model of the rehabilitation robot, the backstepping method is used to design the tracking controller so that the tracking error of the human-machine system can be stabilized within a predetermined time.
[0007] 2) Propose a reinforcement learning decision-making algorithm for the rehabilitation robot to obtain the optimal scheduled time for stable movement of the human-machine system.
[0008] 3) Establish the safety speed constraint conditions of the human-machine system and design the safety speed control obstacle function, so as to obtain the safety controller with the optimal predetermined time and stable tracking.
[0009] The specific steps are as follows:
[0010] Step 1) Based on the dynamic model of the rehabilitation robot, the tracking controller is designed using the backstepping method to make the human-machine system tracking error reach stability within a predetermined time. It is characterized in that: the dynamic model of the system is described as follows
[0011]
[0012] in
[0013]
[0014] Among them, M represents the mass of the rehabilitation robot, m represents the mass of the rehabilitation user, X(t) represents the actual motion trajectory of the rehabilitation robot, u(t) represents the control input force of the four wheels, r0 represents the distance from the center of gravity to the center, I0 represents the moment of inertia of the rehabilitation robot, θ represents the angle between the horizontal axis and the line connecting the center of the robot and the center of the first wheel, that is, θ = θ1. It can be seen from the structure of the rehabilitation robot that θ3=θ+π, l i represents the distance from the center of gravity of the system to the center of each wheel, φ i Represents the x′ axis and the l corresponding to each wheel i The angle between them, i=1,2,3,4.
[0015] The rehabilitation robot dynamics model (1) is transformed into the following form:
[0016]
[0017] Let x1(t)=X(t), Then model (2) is transformed into the system state equation as follows:
[0018]
[0019] in,
[0020] The doctor specifies the movement trajectory as X d (t) = [x d (t) y d (t) θ d (t)] T , where x d (t),y d (t),θ d(t) represents the specified motion trajectory in the x-axis, y-axis and rotation angle directions, respectively, X(t) = [x(t) y(t) θ(t)] T is the actual motion trajectory, where x(t), y(t), θ(t) represent the actual motion trajectory in the x-axis, y-axis and rotation angle directions respectively, then the trajectory tracking error e1(t) and They are:
[0021] e1(t)=x1(t)-X d (t) (4)
[0022]
[0023] The design dummy variable α(t) and speed tracking error e2(t) are as follows:
[0024]
[0025] e2(t)=x2(t)-α(t) (7)
[0026] in, 0<β<1, μ represents a constant greater than zero, T c Indicates a given scheduled time.
[0027] Combining equation (3), equation (6) and equation (7), we can get:
[0028]
[0029] For the human-machine system (3), the backstepping method is used to design the scheduled time stability controller u of the rehabilitation robot s (t) is:
[0030]
[0031] in is the pseudo-inverse matrix of g0(x(t)), and
[0032] The Lyapunov function of the rehabilitation robot trajectory error is established as follows:
[0033]
[0034] Taking the derivative of equation (10) and substituting equations (5) and (6) into equation (10) yields
[0035]
[0036] The Lyapunov function of the trajectory error and velocity error of the rehabilitation robot is established as follows:
[0037]
[0038] By taking the derivative of formula (12), we can get:
[0039]
[0040] Substituting formula (9) into formula (13), we can obtain:
[0041]
[0042] From Helder's inequality we can get:
[0043]
[0044] Using formula (15) to simplify formula (14), we can get:
[0045]
[0046] Define T * is the actual stabilization time of the rehabilitation robot, when t∈[0,T * ] By integrating both sides of equation (16), we can get the actual stabilization time T * The satisfying relationship is as follows:
[0047]
[0048] Therefore, it can be seen from equations (16) and (17) that the rehabilitation robot can make the trajectory tracking error and speed tracking error within a predetermined time T under the action of controller (9). c Internal stability.
[0049] Step 2) Propose a reinforcement learning decision algorithm for the rehabilitation robot to obtain the optimal predetermined time for stable movement of the human-machine system. It is characterized by:
[0050] The trajectory error of the rehabilitation robot (4) is written as follows:
[0051]
[0052] where e x (t),e y (t),e θ (t) represents the trajectory error in the x-axis, y-axis and rotation angle directions. Define the position error e p (t) are as follows:
[0053]
[0054] In order to determine the actual stabilization time T of the rehabilitation robot * The optimal predetermined value A reinforcement learning decision algorithm is proposed, and the states of the decision algorithm Condition1, Condition2, Condition3, and Condition4 are defined as:
[0055]
[0056] where σ and θ0 represent the specified tracking error bounds.
[0057] The actions D1, D2 of the decision algorithm are:
[0058]
[0059] in represents the initial time of the system, It represents the optimal scheduled time for decision making, and Δt≥0 represents the change in time.
[0060] Design the reward and punishment value function R of the optimal decision-making schedule as follows:
[0061]
[0062] The rehabilitation robot reinforcement learning decision algorithm is as follows:
[0063] Step 1: Initialize the behavior pair (C, D) of the rehabilitation robot, where C is the current state of the rehabilitation robot and D is the current action taken; set the learning rate α for updating the state, the decay coefficient γ, and the probability of selecting the learning action ε, where α∈[0,1], γ∈[0,1], ε∈[0,1];
[0064] Step 2: Compare the current position error and angle error of the rehabilitation robot with the set values σ and θ0, and determine the state of the robot in Condition1, Condition2, Condition3, and Condition4, which is recorded as C. The robot selects any action in D1 and D2 with probability ε, and the selection method is: when p<ε, randomly select D1 or D2; when p≥ε, select D1 or D2 according to maxQ(C,D), and record the selected action as D, thereby determining the robot's current behavior pair (C,D). Among them, p=random() represents a random number, Q(C,D) represents the value obtained under the behavior pair (C,D), and its update process is as follows:
[0065] Q(C,D)←Q(C,D)+α[R+γQ(C * ,D * )-Q(C,D)](23)
[0066] Among them C *Indicates the next state that the robot enters according to the reward and punishment value R, and then uses the probability ε to select a new action D * , thus obtaining a new behavior pair (C * ,D * ), Q(C * ,D * ) indicates that in the behavior (C * ,D * ) and the robot completes a decision at a predetermined time;
[0067] Step 3: Repeat Step 2, the robot continues to make decisions for a predetermined period of time until If the robot still stays in Condition4, Optimal scheduled time as a decision-making tool for rehabilitation robots
[0068] Step 3) Establish the safety speed constraint conditions of the human-machine system and design the safety speed control obstacle function, thereby obtaining the safety controller with the optimal predetermined time stable tracking. It is characterized in that: the safety speed constraint conditions of the rehabilitation robot are designed as follows:
[0069]
[0070] where x 2x ,x 2y ,x 2θ represents the speed of the rehabilitation robot in the x-axis, y-axis and rotation angle directions, v x ,v y ,v θ Indicates the safety speed constraint values in the x-axis, y-axis and rotation angle directions.
[0071] In order to ensure that the rehabilitation robot has a safe movement speed, the speed control obstacle function is designed as follows:
[0072]
[0073] From formula (25), we can get h v (x)≥0, and for h v (x) Taking the partial derivative along x(t) we get:
[0074]
[0075] According to system (3), let the functions f(x(t)) and g(x(t)) be:
[0076]
[0077]
[0078] For h v (x) Taking the Lie derivative along f(x(t)), we get Therefore, the control input set A of the rehabilitation robot's safe speed is designed as:
[0079] A={u(t)∈U|L f h v (x)+L g h v (x)u(t)+kh v (x)≥0} (29)
[0080] Where U represents the set of allowed control inputs, L g h v (x) represents h v (x) Lie derivative along g(x(t)), k>0 represents the adjustment parameter.
[0081] According to the speed control obstacle function of the rehabilitation robot, the speed safety controller design is transformed into solving the following optimization problem:
[0082]
[0083] Where H represents a given positive definite matrix, τ>0 is a penalty factor, and δ is a slack variable. By solving the above optimization problem (30), we can obtain the optimal scheduled time controller u with safe speed: * (t), so that the rehabilitation robot can stably follow the training trajectory X specified by the doctor at a safe speed at the optimal scheduled time of decision making d (t).
[0084] Step 4) Based on the STM32F411 series single-chip microcomputer, the output PWM signal is provided to the motor drive module, so that the rehabilitation robot can stably track the motion trajectory specified by the doctor at the optimal predetermined time of the decision, characterized in that: the STM32F411 series single-chip microcomputer is used as the main controller, the input of the main controller is connected to the motor speed measurement module, and the output is connected to the motor drive module; the motor drive module is connected to the DC motor; the power supply system supplies power to each electrical device. The main controller control method is to read the feedback signal of the motor encoder and the control command signal X given by the main controller d (t) and The error signal is calculated. Based on the error signal, the main controller calculates the control amount of the motor according to the predetermined control algorithm and sends it to the motor drive module. The motor rotates to drive the wheel to maintain its own balance and move in a predetermined manner.
[0085] Compared with the prior art, the present invention has beneficial effects.
[0086] The invention discloses a stable control method for optimal scheduled time decision of a rehabilitation robot with safe speed. The method is characterized in that: the scheduled time controller of the rehabilitation robot is designed by backstepping method, so that the trajectory tracking error and speed tracking error of the human-machine system are stabilized; a reinforcement learning decision algorithm is designed to obtain the optimal scheduled time of stable motion of the human-machine system; a safe speed constraint condition is constructed and a control obstacle function is designed, and a stable tracking control method for the optimal scheduled time of safe speed is proposed. The invention ensures the safety of the rehabilitation robot from a new perspective of safe speed and cooperative motion stabilization time of the human-machine system. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. The protection scope of the present invention is not limited to the following description.
[0088] Figure 1 This is a working block diagram of the controller of the present invention;
[0089] Figure 2 is the coordinate diagram of the system of the present invention;
[0090] Figure 3 It is the minimum system of STM32F411 single-chip microcomputer of the present invention;
[0091] Figure 4 The MPU9250 peripheral circuit of the present invention;
[0092] Figure 5 The peripheral circuit of the motor drive module of the present invention;
[0093] Figure 6 This is the overall principle circuit of the hardware of the present invention. DETAILED DESCRIPTION
[0094] In order to make the purpose, technical scheme and beneficial effects of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0095] like Figure 1-6 As shown, the stable control method for optimal scheduled time decision of a rehabilitation robot with a safe speed comprises the steps of:
[0096] 1) Based on the dynamic model of the rehabilitation robot, the backstepping method is used to design the tracking controller so that the tracking error of the human-machine system can be stabilized within a predetermined time;
[0097] 2) Propose a reinforcement learning decision algorithm for the rehabilitation robot to obtain the optimal predetermined time for stable movement of the human-machine system;
[0098] 3) Establish the safety speed constraint conditions of the human-machine system and design the safety speed control obstacle function, so as to obtain the safety controller with the optimal predetermined time and stable tracking.
[0099] Here are the steps:
[0100] Step 1) Based on the dynamic model of the rehabilitation robot, the tracking controller is designed using the backstepping method to make the human-machine system tracking error reach stability within a predetermined time. It is characterized in that: the dynamic model of the system is described as follows
[0101]
[0102] in
[0103]
[0104] Among them, M represents the mass of the rehabilitation robot, m represents the mass of the rehabilitation user, X(t) represents the actual motion trajectory of the rehabilitation robot, u(t) represents the control input force of the four wheels, r0 represents the distance from the center of gravity to the center, I0 represents the moment of inertia of the rehabilitation robot, θ represents the angle between the horizontal axis and the line connecting the center of the robot and the center of the first wheel, that is, θ = θ1. It can be seen from the structure of the rehabilitation robot that θ3=θ+π, l i represents the distance from the center of gravity of the system to the center of each wheel, φ i Represents the x′ axis and the l corresponding to each wheel i The angle between them, i=1,2,3,4.
[0105] The rehabilitation robot dynamics model (1) is transformed into the following form:
[0106]
[0107] Let x1(t)=X(t), Then model (2) is transformed into the system state equation as follows:
[0108]
[0109] in,
[0110] The doctor specifies the movement trajectory as X d (t) = [x d (t) y d (t) θ d (t)] T , where x d (t),y d (t),θ d(t) represents the specified motion trajectory in the x-axis, y-axis and rotation angle directions, respectively, X(t) = [x(t) y(t) θ(t)] T is the actual motion trajectory, where x(t), y(t), θ(t) represent the actual motion trajectory in the x-axis, y-axis and rotation angle directions respectively, then the trajectory tracking error e1(t) and They are:
[0111] e1(t)=x1(t)-X d (t) (4)
[0112]
[0113] The design dummy variable α(t) and speed tracking error e2(t) are as follows:
[0114]
[0115] e2(t)=x2(t)-α(t) (7)
[0116] in, 0<β<1, μ represents a constant greater than zero, T c Indicates a given scheduled time.
[0117] Combining equation (3), equation (6) and equation (7), we can get:
[0118]
[0119] For the human-machine system (3), the backstepping method is used to design the scheduled time stability controller u of the rehabilitation robot s (t) is:
[0120]
[0121] in is the pseudo-inverse matrix of g0(x(t)), and
[0122] The Lyapunov function of the rehabilitation robot trajectory error is established as follows:
[0123]
[0124] Taking the derivative of equation (10) and substituting equations (5) and (6) into equation (10) yields
[0125]
[0126] The Lyapunov function of the trajectory error and velocity error of the rehabilitation robot is established as follows:
[0127]
[0128] By taking the derivative of formula (12), we can get:
[0129]
[0130] Substituting formula (9) into formula (13), we can obtain:
[0131]
[0132] From Helder's inequality we can get:
[0133]
[0134] Using formula (15) to simplify formula (14), we can get:
[0135]
[0136] Define T * is the actual stabilization time of the rehabilitation robot, when t∈[0,T * ] By integrating both sides of equation (16), we can get the actual stabilization time T * The satisfying relationship is as follows:
[0137]
[0138] Therefore, it can be seen from equations (16) and (17) that the rehabilitation robot can make the trajectory tracking error and speed tracking error within a predetermined time T under the action of controller (9). c Internal stability.
[0139] Step 2) Propose a reinforcement learning decision algorithm for the rehabilitation robot to obtain the optimal predetermined time for stable movement of the human-machine system. It is characterized by:
[0140] The trajectory error of the rehabilitation robot (4) is written as follows:
[0141]
[0142] where e x (t),e y (t),e θ (t) represents the trajectory error in the x-axis, y-axis and rotation angle directions. Define the position error e p (t) are as follows:
[0143]
[0144] In order to determine the actual stabilization time T of the rehabilitation robot * The optimal predetermined value A reinforcement learning decision algorithm is proposed, and the states of the decision algorithm Condition1, Condition2, Condition3, and Condition4 are defined as:
[0145]
[0146] where σ and θ0 represent the specified tracking error bounds.
[0147] The actions D1, D2 of the decision algorithm are:
[0148]
[0149] in represents the initial time of the system, It represents the optimal scheduled time for decision making, and Δt≥0 represents the change in time.
[0150] Design the reward and punishment value function R of the optimal decision-making schedule as follows:
[0151]
[0152] The rehabilitation robot reinforcement learning decision algorithm is as follows:
[0153] Step 1: Initialize the behavior pair (C, D) of the rehabilitation robot, where C is the current state of the rehabilitation robot and D is the current action taken; set the learning rate α for updating the state, the decay coefficient γ, and the probability of selecting the learning action ε, where α∈[0,1], γ∈[0,1], ε∈[0,1];
[0154] Step 2: Compare the current position error and angle error of the rehabilitation robot with the set values σ and θ0, and determine the state of the robot in Condition1, Condition2, Condition3, and Condition4, which is recorded as C. The robot selects any action in D1 and D2 with probability ε, and the selection method is: when p<ε, randomly select D1 or D2; when p≥ε, select D1 or D2 according to maxQ(C,D), and record the selected action as D, thereby determining the robot's current behavior pair (C,D). Among them, p=random() represents a random number, Q(C,D) represents the value obtained under the behavior pair (C,D), and its update process is as follows:
[0155] Q(C,D)←Q(C,D)+α[R+γQ(C * ,D * )-Q(C,D)] (23)
[0156] Among them C *Indicates the next state that the robot enters according to the reward and punishment value R, and then uses the probability ε to select a new action D * , thus obtaining a new behavior pair (C * ,D * ), Q(C * ,D * ) indicates that in the behavior (C * ,D * ) and the robot completes a decision at a predetermined time;
[0157] Step 3: Repeat Step 2, the robot continues to make decisions for a predetermined period of time until If the robot still stays in Condition4, Optimal scheduled time as a decision-making tool for rehabilitation robots
[0158] Step 3) Establish the safety speed constraint conditions of the human-machine system and design the safety speed control obstacle function, thereby obtaining the safety controller with the optimal predetermined time stable tracking. It is characterized in that: the safety speed constraint conditions of the rehabilitation robot are designed as follows:
[0159]
[0160] where x 2x ,x 2y ,x 2θ represents the speed of the rehabilitation robot in the x-axis, y-axis and rotation angle directions, v x ,v y ,v θ Indicates the safety speed constraint values in the x-axis, y-axis and rotation angle directions.
[0161] In order to ensure that the rehabilitation robot has a safe movement speed, the speed control obstacle function is designed as follows:
[0162]
[0163] From formula (25), we can get h v (x)≥0, and for h v (x) Taking the partial derivative along x(t) we get:
[0164]
[0165] According to system (3), let the functions f(x(t)) and g(x(t)) be:
[0166]
[0167] For h v (x) Taking the Lie derivative along f(x(t)), we get Therefore, the control input set A of the rehabilitation robot's safe speed is designed as:
[0168] A={u(t)∈UL f h v (x)+L g h v (x)u(t)+kh v (x)≥0}(29)
[0169] Where U represents the set of allowed control inputs, L g h v (x) represents h v (x) Lie derivative along g(x(t)), k>0 represents the adjustment parameter.
[0170] According to the speed control obstacle function of the rehabilitation robot, the speed safety controller design is transformed into solving the following optimization problem:
[0171]
[0172] Where H represents a given positive definite matrix, τ>0 is a penalty factor, and δ is a slack variable. By solving the above optimization problem (30), we can obtain the optimal scheduled time controller u with safe speed: * (t), so that the rehabilitation robot can stably follow the training trajectory X specified by the doctor at a safe speed at the optimal scheduled time of decision making d (t).
[0173] Step 4) Based on the STM32F411 series single-chip microcomputer, the output PWM signal is provided to the motor drive module, so that the rehabilitation robot can stably track the motion trajectory specified by the doctor at the optimal predetermined time of the decision, that is, the STM32F411 series single-chip microcomputer is used as the main controller, the input of the main controller is connected to the motor speed measurement module, and the output is connected to the motor drive module; the motor drive module is connected to the DC motor; the power supply system supplies power to each electrical device. The main controller control method is to read the feedback signal of the motor encoder and the control command signal X given by the main controller d (t) and The error signal is calculated. Based on the error signal, the main controller calculates the control amount of the motor according to the predetermined control algorithm and sends it to the motor drive module. The motor rotates to drive the wheel to maintain its own balance and move in a predetermined manner.
[0174] In summary, the present invention solves the problem of stable tracking control of optimal scheduled time decision of a rehabilitation robot at a safe speed. Using the dynamic model of the rehabilitation robot, a scheduled time stable tracking controller is designed based on the backstepping method; on this basis, a reinforcement learning decision algorithm is designed using the limit values of position error and angle error, and the optimal scheduled time for stable movement of the human-machine system is obtained; further, a stable tracking control method for the optimal scheduled time of safe speed is proposed, so that the human-machine system can track the training trajectory specified by the doctor at a safe speed at the scheduled time of decision, ensuring the stability and safety of the cooperative movement of the human-machine system.
[0175] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features therein may be replaced by equivalents. Therefore, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A stable control method for optimal scheduled time decision of a rehabilitation robot with safe speed, characterized by: Includes steps: S1. Based on the dynamic model of the rehabilitation robot, the tracking controller is designed using the backstepping method to make the tracking error of the human-machine system stable within a predetermined time; S2. Propose a reinforcement learning decision algorithm for the rehabilitation robot to obtain the optimal scheduled time for stable movement of the human-machine system; S3. Establish the safety speed constraint conditions of the human-machine system and design the safety speed control obstacle function, so as to obtain the safety controller with the optimal predetermined time stable tracking.
2. The stable control method for optimal scheduled time decision of a rehabilitation robot with a safe speed according to claim 1 is characterized in that: Step S1 is specifically divided into: Establish the dynamic model of the rehabilitation robot: in Among them, M represents the mass of the rehabilitation robot, m represents the mass of the rehabilitation user, X(t) represents the actual motion trajectory of the rehabilitation robot, u(t) represents the control input force of the four wheels, r0 represents the distance from the center of gravity to the center, I0 represents the moment of inertia of the rehabilitation robot, θ represents the angle between the horizontal axis and the line connecting the center of the robot and the center of the first wheel, that is, θ = θ1. It can be seen from the structure of the rehabilitation robot that θ3=θ+π, l i represents the distance from the center of gravity of the system to the center of each wheel, φ i Represents the x′ axis and the l corresponding to each wheel i The angle between them, i = 1, 2, 3, 4; The rehabilitation robot dynamics model (1) is transformed into the following form: Let x1(t)=X(t), Then model (2) is transformed into the system state equation as follows: in, The doctor specifies the movement trajectory as X d (t) = [x d (t)y d (t)θ d (t)] T , where x d (t),y d (t),θ d (t) represents the specified motion trajectory in the x-axis, y-axis and rotation angle directions, respectively, X(t) = [x(t)y(t)θ(t)] T is the actual motion trajectory, where x(t), y(t), θ(t) represent the actual motion trajectory in the x-axis, y-axis and rotation angle directions respectively, then the trajectory tracking error e1(t) and They are: e1(t)=x1(t)-X d (t)(4) The design dummy variable α(t) and speed tracking error e2(t) are as follows: e2(t)=x2(t)-α(t)(7) in, 0<β<1, μ represents a constant greater than zero, T c Indicates a given scheduled time; Combining equation (3), equation (6) and equation (7), we can get: For the human-machine system (3), the backstepping method is used to design the scheduled time stability controller u of the rehabilitation robot s (t) is: in is the pseudo-inverse matrix of g0(x(t)), and The Lyapunov function of the rehabilitation robot trajectory error is established as follows: Taking the derivative of equation (10) and substituting equations (5) and (6) into equation (10) yields The Lyapunov function of the trajectory error and velocity error of the rehabilitation robot is established as follows: By taking the derivative of formula (12), we can get: Substituting formula (9) into formula (13), we can obtain: From Helder's inequality we can get: Using formula (15) to simplify formula (14), we can get: Define T * is the actual stabilization time of the rehabilitation robot, when t∈[0,T * ] By integrating both sides of equation (16), we can get the actual stabilization time T * The satisfying relationship is as follows: Therefore, it can be seen from equations (16) and (17) that the rehabilitation robot can make the trajectory tracking error and speed tracking error within a predetermined time T under the action of controller (9). c Internal stability.
3. The stable control method for optimal scheduled time decision of a rehabilitation robot with a safe speed according to claim 2, characterized in that: Step S2 is specifically divided into: The trajectory error of the rehabilitation robot (4) is written as follows: where e x (t),e y (t),e θ (t) represents the trajectory error in the x-axis, y-axis and rotation angle directions; the position error e is defined p (t) are as follows: In order to determine the actual stabilization time T of the rehabilitation robot * The optimal predetermined value A reinforcement learning decision algorithm is proposed, and the states of the decision algorithm Condition1, Condition2, Condition3, and Condition4 are defined as: Where σ and θ0 represent the specified tracking error bounds; The actions D1, D2 of the decision algorithm are: where j = 0, 1, 2, ..., represents the initial time of the system, represents the optimal scheduled time for decision making, and Δt ≥ 0 represents the change in time; Design the reward and punishment value function R of the optimal decision-making schedule as follows: The rehabilitation robot reinforcement learning decision algorithm is as follows: Step 1: Initialize the behavior pair (C, D) of the rehabilitation robot, where C is the current state of the rehabilitation robot and D is the current action taken; set the learning rate α for updating the state, the decay coefficient γ, and the probability of selecting the learning action ε, where α∈[0,1], γ∈[0,1], ε∈[0,1]; Step 2: Compare the current position error and angle error of the rehabilitation robot with the set values σ and θ0, and determine the state of the robot in Condition1, Condition2, Condition3, and Condition4, which is recorded as C; the robot selects any action in D1 and D2 with probability ε, and the selection method is: when p < ε, randomly select D1 or D2; when p ≥ ε, select D1 or D2 according to maxQ (C, D), and record the selected action as D, so as to determine the current behavior pair (C, D) of the robot; where p = random() represents a random number, Q (C, D) represents the value obtained under the behavior pair (C, D), and its update process is as follows: Q(C,D)←Q(C,D)+α[R+γQ(C * ,D * )-Q(C,D)](23) Among them C * Indicates the next state that the robot enters according to the reward and punishment value R, and then uses the probability ε to select a new action D * , thus obtaining a new behavior pair (C * ,D * ), Q(C * ,D * ) indicates that in the behavior (C * ,D * ) and the robot completes a decision at a predetermined time; Step 3: Repeat Step 2, the robot continues to make decisions for a predetermined period of time until If the robot still stays in Condition4, Optimal scheduled time as a decision-making tool for rehabilitation robots 4. The stable control method for optimal scheduled time decision of a rehabilitation robot with a safe speed according to claim 1, characterized in that: Step S3 is specifically divided into: The safety speed constraint conditions of the rehabilitation robot are designed as follows: where x 2x ,x 2y ,x 2θ represents the speed of the rehabilitation robot in the x-axis, y-axis and rotation angle directions, v x ,v y ,v θ Indicates the safety speed constraint values in the x-axis, y-axis and rotation angle directions; In order to ensure that the rehabilitation robot has a safe movement speed, the speed control obstacle function is designed as follows: From formula (25), we can get h v (x)≥0, and for h v (x) Taking the partial derivative along x(t) we get: According to system (3), let the functions f(x(t)) and g(x(t)) be: For h v (x) Taking the Lie derivative along f(x(t)), we get Therefore, the control input set A of the rehabilitation robot's safe speed is designed as: A={u(t)∈UL f h v (x)+L g h v (x)u(t)+kh v (x)≥0}(29) Where U represents the set of allowed control inputs, L g h v (x) represents h v (x) Lie derivative along g(x(t)), k>0 represents the adjustment parameter; According to the speed control obstacle function of the rehabilitation robot, the speed safety controller design is transformed into solving the following optimization problem: Where H represents a given positive definite matrix, τ>0 is a penalty factor, and δ is a slack variable. By solving the above optimization problem (30), we can obtain the optimal scheduled time controller u with safe speed: * (t), so that the rehabilitation robot can stably follow the training trajectory X specified by the doctor at a safe speed at the optimal scheduled time of decision making d (t).
5. The stable control method for optimal scheduled time decision of a rehabilitation robot with a safe speed according to claim 1, characterized in that: The method also includes the following steps: providing the output PWM signal to the motor drive module based on the STM32F411 series single-chip microcomputer, so that the rehabilitation robot can stably track the motion trajectory specified by the doctor at the optimal predetermined time of the decision; specifically, the STM32F411 series single-chip microcomputer is used as the main controller, the input of the main controller is connected to the motor speed measurement module, and the output is connected to the motor drive module; the motor drive module is connected to the DC motor; the power supply system supplies power to each electrical device; the main controller control method is to read the feedback signal of the motor encoder and the control command signal X given by the main controller d (t) and An error signal is calculated. Based on the error signal, the main controller calculates the control quantity of the motor according to the predetermined control algorithm and sends it to the motor drive module. The motor rotates to drive the wheels to maintain their own balance and move in a predetermined manner.
