Control method, device, terminal equipment and storage medium of hip joint exoskeleton
By performing data enhancement processing and model training on the hip joint angle sequence, the problem of poor adaptability of the hip exoskeleton assist strategy in the existing technology is solved, and more accurate torque prediction and effective control of the hip exoskeleton are achieved.
Patent Information
- Application Number
- CN202311294490.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-09-28
AI Technical Summary
The existing hip exoskeleton assist strategy has weak anti-interference ability and poor adaptability in practical applications, and cannot achieve accurate torque prediction.
By collecting the hip joint angle sequence and torque during human movement, perform data enhancement processing, build a training data set, train the initial model, and convert it into an inference model to achieve control of the hip exoskeleton and improve the accuracy of torque prediction.
It improves the adaptability of the target model to data in practical applications, enhances the accuracy of torque prediction, reduces the difference between training data and actual application data, and improves the control effect of the hip exoskeleton.
Smart Images

Figure CN117379284B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of control technology, and in particular relates to a control method, device, terminal equipment and storage medium for a hip joint exoskeleton. Background Art
[0002] With the aging of the population and the increase in the number of patients with movement disorders, the number of people with lower limb motor impairment is increasing, and helping them complete normal life activities has become an urgent problem to be solved. The hip exoskeleton can assist the wearer in moving by applying the correct auxiliary torque through the hip exoskeleton power strategy.
[0003] However, the existing hip exoskeleton assistance strategies have weak anti-interference ability and poor adaptability in practical applications, and cannot achieve accurate torque prediction. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a control method, apparatus, terminal device and storage medium for a hip exoskeleton to solve the problem that the hip exoskeleton assistance strategy in the prior art has poor adaptability to interference in practical applications and cannot achieve accurate torque prediction.
[0005] A first aspect of an embodiment of the present invention provides a method for controlling a hip joint exoskeleton, comprising:
[0006] Collect the first hip joint angle sequence and torque during human motion;
[0007] Performing data enhancement processing on the first hip joint angle sequence to obtain a second hip joint angle sequence, wherein the data enhancement processing includes at least one of adding noise to the first hip joint angle sequence, scaling the amplitude of the first hip joint angle sequence, and randomly resampling the first hip joint angle sequence;
[0008] Aligning the second hip joint angle sequence with the torque to construct a training data set;
[0009] Train an initial model based on the training data set to obtain a target model;
[0010] The target model is transformed into an inference model, and the control of the hip joint exoskeleton is achieved through the underlying control logic.
[0011] This embodiment performs data enhancement processing on the first hip joint angle sequence to obtain the second hip joint angle sequence, which can reduce the difference between the training data set and the data collected during actual application, improve the adaptability of the target model to the hip joint angle collected by the motor encoder in actual application, and improve the accuracy of torque prediction.
[0012] In a possible implementation of the first aspect, collecting a first hip joint angle sequence and torque during human motion includes:
[0013] The first hip joint angle sequence and torque are collected during human motion in a motion capture environment.
[0014] In a possible implementation of the first aspect, performing data enhancement processing on the first hip joint angle sequence to obtain a second hip joint angle sequence includes:
[0015] Performing noise processing on the first hip joint angle sequence to obtain a noisy hip joint angle sequence;
[0016] Performing amplitude scaling processing on the noisy hip joint angle sequence to obtain a scaled hip joint angle sequence;
[0017] The scaled hip joint angle sequence is randomly resampled to obtain a second hip joint angle sequence.
[0018] This embodiment can simulate the data noise that may exist when the motor encoder is used to measure the hip joint angle by adding noise to the hip joint angle sequence, thereby improving the generalization performance of the target model for noisy data; the amplitude of the first hip joint angle sequence is scaled to increase the diversity of hip joint angle changes and reduce the difference between the angle measured by the motor encoder and the angle measured in the motion capture environment; the first hip joint angle sequence is randomly resampled to simulate the sampling frequency of different angles in actual situations. By reducing the difference between the hip joint angle used in training and the hip joint angle collected in actual applications, the adaptability of the target model to the hip joint angle collected in actual applications is improved, and the accuracy of torque prediction is improved.
[0019] In a possible implementation of the first aspect, aligning the second hip joint angle sequence with the torque to construct a training data set includes:
[0020] The hip joint angle at a first moment and the torque at a second moment in the second hip joint angle sequence are aligned to construct a training data set, wherein the time interval between the first moment and the second moment is a first time interval, and the second moment is after the first moment.
[0021] In a possible implementation of the first aspect, randomly resampling the scaled hip joint angle sequence to obtain a second hip joint angle sequence includes:
[0022] The scaled hip joint angle sequence is interpolated and resampled by random upsampling to obtain a second hip joint angle sequence.
[0023] In a possible implementation manner of the first aspect, the step of training an initial model based on the training data set to obtain a target model includes:
[0024] Build an initial model including N convolutional layers and one fully connected layer, with an input length of the first input length, where N belongs to the first set and the first input length belongs to the second set;
[0025] Setting training hyperparameters for the initial model, and setting the upper limit of the number of epochs of training corresponding to the training hyperparameters to m;
[0026] Splitting the training data set into a training set and a validation set;
[0027] Training the initial model based on the training set, obtaining an intermediate model after each training (1 epoch), and using the validation set to validate the performance of the intermediate model, wherein the performance includes prediction accuracy and average single prediction time;
[0028] After completing the training of m epochs, m intermediate models are obtained, and the intermediate model with the highest prediction accuracy is selected from the m intermediate models as the candidate model;
[0029] Repeat the above steps to obtain multiple candidate models;
[0030] The multiple candidate models are screened according to the performance to determine a final target model.
[0031] In a possible implementation of the first aspect, converting the target model into an inference model and implementing control of the hip joint exoskeleton through underlying control logic includes:
[0032] Converting the target model into an inference model, and deploying the inference model on an exoskeleton onboard processor;
[0033] Initialization is performed and the power assist is started when the wearer of the hip joint exoskeleton stands. At this time, the hip joint angles of both legs are defined as 0 degrees and correspond to the initial value of the motor encoder;
[0034] Get the current hip joint angle by subtracting the initial value of the motor encoder from the current value of the motor encoder to get the current hip joint angle;
[0035] The hip joint angle at the current moment is saved in a buffer sequence, wherein the length of the buffer sequence is the first input length of the initial model corresponding to the target model; if the buffer sequence is full, the hip joint angle at the earliest moment in the buffer sequence is deleted, and the hip joint angle at the current moment is added to update the buffer sequence;
[0036] Inputting the buffer sequence into the inference model and predicting the moment at a third moment after a first time interval at the current moment;
[0037] Multiplying the torque by the first coefficient and inputting it into the motor controller to generate assist;
[0038] Repeat all the steps after the initialization to continue generating assistance.
[0039] A second aspect of an embodiment of the present invention provides a data-driven control device for a hip joint exoskeleton, comprising:
[0040] A data acquisition module collects the first hip joint angle sequence and torque during human motion;
[0041] a data processing module, performing data enhancement processing on the first hip joint angle sequence to obtain a second hip joint angle sequence, wherein the data enhancement processing includes at least one of adding noise to the first hip joint angle sequence, scaling the amplitude of the first hip joint angle sequence, and randomly resampling the first hip joint angle sequence;
[0042] A data alignment module, aligning the second hip joint angle sequence with the torque to construct a training data set;
[0043] A model training module, which trains an initial model based on the training data set to obtain a target model;
[0044] The model deployment module converts the target model into an inference model and realizes the control of the hip exoskeleton through the underlying control logic.
[0045] A third aspect of an embodiment of the present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method provided in the first aspect when executing the computer program.
[0046] A fourth aspect of an embodiment of the present invention provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method provided in the first aspect.
[0047] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 is a schematic diagram of the implementation flow of the control method of the hip joint exoskeleton provided by an embodiment of the present invention;
[0050] Figure 2 is a CNN overall model diagram of the hip joint exoskeleton control method provided by an embodiment of the present invention;
[0051] Figure 3 is a specific structural diagram of the Conv layer of the hip joint exoskeleton control method provided by an embodiment of the present invention;
[0052] Figure 4 It is a schematic diagram of the exoskeleton control logic flow of the hip joint exoskeleton control method provided by an embodiment of the present invention;
[0053] Figure 5 is a schematic diagram of a data-driven control device for a hip joint exoskeleton provided by an embodiment of the present invention;
[0054] Figure 6 is a schematic diagram of a control terminal device of a hip joint exoskeleton based on data drive provided by an embodiment of the present invention;
[0055] Figure 7 The present invention provides a hip joint model in human motion. DETAILED DESCRIPTION
[0056] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0057] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0058] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0059] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0060] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0061] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0062] like Figure 1 As shown, the embodiment of the present application provides a control method for a hip joint exoskeleton, the control method comprising the following steps S10 to S50:
[0063] Step S10, collecting the first hip joint angle sequence and torque during human movement.
[0064] In the application, the first hip joint angle sequence and torque of the human body in motion can be collected in a motion capture environment. Specifically, the Helen Hayes point sticking method can be used to stick markers (mark points) on the corresponding positions of the subject's body. Set up a variety of motion environments, such as flat ground, up a slope, down a slope, up stairs, down stairs, etc. In the motion capture environment, let the subject walk in different motion environments at different speeds to collect the motion information of the human body's marker points (mark points) and the force plate data. According to the motion information of the human body's marker points (mark points) and the force plate data collected in the motion capture environment, the first hip joint angle sequence and torque of the human body in motion are calculated and generated.
[0065] It is understandable that the experimenters moving at different speeds in different motion environments can make the collected data richer and more diverse, so that the network model trained based on these data has better generalization performance and can be applied to various complex practical situations.
[0066] Step S20, performing data enhancement processing on the first hip joint angle sequence to obtain a second hip joint angle sequence, wherein the data enhancement processing includes at least one of adding noise to the first hip joint angle sequence, scaling the amplitude of the first hip joint angle sequence, and randomly resampling the first hip joint angle sequence.
[0067] In the application, in the actual hip joint exoskeleton, the actual hip joint angle sequence is measured by the motor encoder, and then the torque is predicted based on the actual hip joint angle sequence as the input of the network model. The first hip joint angle sequence used to train the network model is obtained by the Helen Hayes point method in the motion capture environment. There is a certain difference between the actual hip joint angle sequence measured by the motor encoder and the first hip joint angle sequence, which may cause the network model to predict the torque. Therefore, it is necessary to perform data enhancement processing on the first hip joint angle sequence to obtain a second hip joint angle sequence that is closer to the actual hip joint angle sequence measured by the motor encoder, so as to improve the performance of the network model in practical applications, such as the prediction speed and prediction accuracy of the torque.
[0068] The data enhancement processing may include adding noise to the first hip joint angle sequence and / or scaling the amplitude of the first hip joint angle sequence and / or randomly resampling the first hip joint angle sequence.
[0069] Specifically, the first hip joint angle sequence is subjected to noise processing by adding a random noise n(x) to the first hip joint angle sequence to simulate the data noise that may exist when the motor encoder is actually used to measure the angle. The random noise generation method can be shown in the following formula:
[0070] n(x i )=rand(0,1)*k n
[0071] Among them, rand(0,1) means generating a random number between 0 and 1, k n represents the noise scaling size, given a suitable k n It can improve the generalization performance of the model for noisy data.
[0072] Specifically, the amplitude scaling process of the first hip joint angle sequence can be performed by multiplying the first hip joint angle sequence as a whole by a random scaling factor, thereby increasing the diversity of the first hip joint angle sequence and reducing the difference between the angle measured by the motor encoder and the angle measured in the motion capture environment. The amplitude scaling process can be shown in the following formula:
[0073]
[0074] Among them, X i is the first hip joint angle sequence, K1 is the random scaling factor, is the amplitude-scaled sequence of hip angles.
[0075] Specifically, the first hip joint angle sequence is randomly resampled, which may be random upsampling or downsampling, and the first hip joint angle sequence is interpolated or extracted and then resampled to obtain hip joint angle sequences of different frequencies to simulate different angle sampling frequencies in actual situations. Random resampling avoids the problem that the angle acquisition frequency of the motor encoder is different from the acquisition frequency in the motion capture environment, causing the network model to obtain erroneous feature information, thereby causing inaccurate torque prediction.
[0076] It can be understood that in order to overcome as much as possible the difference between the first hip joint angle sequence obtained by the Helen Hayes point sticking method in the motion capture environment used for network model training and the actual hip joint angle sequence measured by the motor encoder in the actual hip joint exoskeleton for input into the network model for torque prediction, the first hip joint angle sequence can be subjected to multi-faceted data enhancement processing in certain steps to obtain a second hip joint angle sequence.
[0077] Specifically, the data enhancement processing of the first hip joint angle sequence to obtain the second hip joint angle sequence may be: performing noise processing on the first hip joint angle sequence to obtain a noisy hip joint angle sequence; performing amplitude scaling processing on the noisy hip joint angle sequence to obtain a scaled hip joint angle sequence; and performing random resampling processing on the scaled hip joint angle sequence to obtain the second hip joint angle sequence.
[0078] Step S30, aligning the second hip joint angle sequence with the torque to construct a training data set.
[0079] It can be understood that the function that needs to be achieved after the target model is finally deployed on the hip joint exoskeleton is to predict the future joint torque through the actual hip joint angle sequence measured by the motor encoder. Therefore, it is necessary to align the hip joint angle at the first moment and the torque data at the second moment to construct a training data set for network model training. The time interval between the first moment and the second moment is the first time interval, and the second moment is after the first moment.
[0080] Specifically, the first time interval can be obtained by measuring the control delay, and the method is to use the prediction model to perform multiple complete controls through preliminary experiments, and obtain the average time required to calculate the control amount, which is the first time interval. For example, first assume that the first time interval = 0.01s, align the second hip joint angle sequence with the torque, construct a training data set, construct an initial model with a specific network size and a specific input length, add the initial model to the exoskeleton control system and calculate and determine the average time required to generate the final control amount.
[0081] Step S40: training an initial model based on the training data set to obtain a target model.
[0082] In an implementation of this embodiment, the step of training the initial model based on the training data set to obtain the target model includes:
[0083] Build an initial model including N convolutional layers and one fully connected layer, with an input length of the first input length, where N belongs to the first set and the first input length belongs to the second set;
[0084] Setting training hyperparameters for the initial model, and setting the upper limit of the number of epochs of training corresponding to the training hyperparameters to m;
[0085] Splitting the training data set into a training set and a validation set;
[0086] Training the initial model based on the training set, obtaining an intermediate model after each epoch of training, and using the validation set to validate the performance of the intermediate model, the performance including prediction accuracy and average single prediction time;
[0087] After completing the training of m epochs, m intermediate models are obtained, and the intermediate model with the highest prediction accuracy is selected from the m intermediate models as the candidate model;
[0088] Repeat the above steps to obtain multiple candidate models;
[0089] The multiple candidate models are screened according to the performance to determine a final target model.
[0090] The initial model may be a convolutional neural network (CNN) model, which is used to realize the mapping relationship between hip joint angle and hip joint torque τ=f(θ), where θ is the hip joint angle and τ is the hip joint torque. The initial model includes N CNN convolutional layers and a fully connected layer, where N belongs to the first set, and each convolutional layer has 32 output channels and a convolution kernel of size 5×1.
[0091] Specifically, the initial model can be as follows Figure 2 The overall CNN model diagram shown in Figure 1 shows that Input is the input layer, Conve*N is the N convolutional layers, Pooling is the pooling layer, FC is the fully connected layer, and Output is the input layer. The convolutional layer can include a ReLU activation layer and a BN (BatchNormalization) layer to improve network performance.
[0092] Specifically, the specific structure of the convolutional layer can refer to Figure 3 The specific structure of the Conv layer shown in the figure has a kernel size of 5, a stride of 2, and a padding of 2. The convolution layer is followed by a ReLU layer and a BatchNormalization layer.
[0093] It is understandable that the order of each layer in CNN can be adjusted, such as the ReLU layer and the BN layer can be BN layer first and ReLU layer later. The size, stride and padding of the convolution kernel in the convolution layer can also be flexibly adjusted according to actual needs.
[0094] According to the kinetic expression Where I represents the inertia term, which describes the inertia of the robot's links and joints, represents the damping term, g(θ) represents the gravity term, θ is the hip joint angle, τ is the hip joint torque, are the angular velocity and angular acceleration of the hip joint respectively. It can be obtained by differentiating θ(t) with respect to t, so we can get the mapping τ=f(θ) between the hip joint torque and the hip joint angle.
[0095] In the application, the first set can be {1, 2, 3, 4, 5, 6, 7, 8}, the second set can be {40, 60, 100, 200, 300, 400} (corresponding to sampling times of 0.2s, 0.3s, 0.5s, 1.0s, 1.5s, 2.0s at a sampling frequency of 200Hz), and the upper limit of the number of epoch training times m can be 500. Correspondingly, 48 initial models of different sizes and input lengths can be built, and each initial model can obtain 500 intermediate models after 500 epochs of training. For each initial model, the intermediate model with the highest prediction accuracy is selected from its 500 intermediate models as the candidate model corresponding to each initial model, and finally 48 candidate models can be obtained. Then, according to the performance of the candidate model, including the prediction accuracy and the average single prediction time, the final target model is determined from the 48 candidate models. It can be understood that there may be only one final target model or more than one.
[0096] In the application, the training hyperparameters are trained using the Adam optimizer, a dynamic learning rate method is used, the initial value is set to 0.1, the batch size is set to 512, and the maximum number of training epochs is 500. When the initial model is trained based on the training set, the loss function used can be a mean square error loss function (MSE function) or a softmax loss function.
[0097] Step S50, converting the target model into an inference model, and implementing control of the hip joint exoskeleton through underlying control logic.
[0098] In one implementation of this embodiment, the target model is converted into an inference model, and the control of the hip joint exoskeleton is implemented through the underlying control logic, including:
[0099] Converting the target model into an inference model, and deploying the inference model on an exoskeleton onboard processor;
[0100] Initialization is performed and the power assist is started when the wearer of the hip joint exoskeleton stands. At this time, the hip joint angles of both legs are defined as 0 degrees and correspond to the initial value of the motor encoder;
[0101] Get the current hip joint angle by subtracting the initial value of the motor encoder from the current value of the motor encoder to get the current hip joint angle;
[0102] The hip joint angle at the current moment is saved in a buffer sequence, wherein the length of the buffer sequence is the first input length of the initial model corresponding to the target model; if the buffer sequence is full, the hip joint angle at the earliest moment in the buffer sequence is deleted, and the hip joint angle at the current moment is added to update the buffer sequence;
[0103] Inputting the buffer sequence into the inference model and predicting the moment at a third moment after a first time interval at the current moment;
[0104] Multiplying the torque by the first coefficient and inputting it into the motor controller to generate assist;
[0105] Repeat all the steps after the initialization to continue generating assistance.
[0106] Reference Figure 4 Schematic diagram of the exoskeleton control logic flow, initialization is performed under initialization conditions, the encoder initial value is the initial value of the motor encoder during initialization, the encoder current value is the current value of the motor encoder at the current moment, the hip joint angle is the hip joint angle at the current moment calculated based on the initial value and the current value, the hip joint angle at the current moment is saved in a buffer sequence to update the buffer sequence, the updated buffer sequence is input into the inference model deployed on the onboard processor of the hip joint exoskeleton, torque prediction is performed, a torque is predicted, the torque is multiplied by the proportional coefficient K and input into the motor controller to generate power assistance, and the power assistance acts on the hip joint exoskeleton.
[0107] It is understandable that the initialization can be performed when the hip exoskeleton wearer starts the power assistance while standing, or it can be initialized when the hip exoskeleton wearer wants to forcibly restart the hip exoskeleton while standing.
[0108] like Figure 7 Schematic diagram of the hip joint model in human movement, where θ l and θ r Represents the flexion / extension angle of the left and right legs relative to the vertical line of the gravity direction, that is, the hip joint angle. l and the θ r When it is 0, it is standing.
[0109] In the application, converting the target model into an inference model can be converting the trained target model into an onnx model, and using ONNX Runtime as an inference engine to accelerate the inference speed of the model on the exoskeleton onboard processor.
[0110] Figure 6 This is a schematic diagram of the structure of a data-driven hip exoskeleton control terminal device provided in one embodiment of the present application. Figure 6As shown, the control terminal device 2 based on data-driven hip joint exoskeleton of this embodiment includes: at least one processor 20 ( Figure 6 Only one is shown in the figure) a processor, a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, and when the processor 20 executes the computer program 22, the steps of any of the above-mentioned control method embodiments of the hip exoskeleton are implemented.
[0111] The control terminal device 2 of the data-driven hip joint exoskeleton can be a computing device such as a smart phone, a PDA, or a cloud server. The control terminal device of the data-driven hip joint exoskeleton can include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art can understand that Figure 6 It is merely an example of a control terminal device 2 based on a data-driven hip exoskeleton and does not constitute a limitation on the control terminal device 2 based on a data-driven hip exoskeleton. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, communication devices, etc.
[0112] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0113] The memory 21 may be an internal storage unit of the control terminal device 2 of the data-driven hip joint exoskeleton in some embodiments, such as a hard disk or memory of the control terminal device 2 of the data-driven hip joint exoskeleton. The memory 21 may also be an external storage device of the control terminal device 2 of the data-driven hip joint exoskeleton in other embodiments, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the control terminal device 2 of the data-driven hip joint exoskeleton. Further, the memory 21 may also include both the internal storage unit of the control terminal device 2 of the data-driven hip joint exoskeleton and an external storage device. The memory 21 is used to store an operating system, an application program, a boot loader (BootLoader), data and other programs, such as the program code of the computer program. The memory 21 may also be used to temporarily store data that has been output or is to be output.
[0114] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0115] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0116] An embodiment of the present application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.
[0117] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0118] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0119] 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 present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0120] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0121] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0122] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0124] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for controlling a hip joint exoskeleton, characterized in that: include: Collect the first hip joint angle sequence and torque during human motion; Performing data enhancement processing on the first hip joint angle sequence to obtain a second hip joint angle sequence, wherein the data enhancement processing includes at least one of adding noise to the first hip joint angle sequence, scaling the amplitude of the first hip joint angle sequence, and randomly resampling the first hip joint angle sequence; Aligning the second hip joint angle sequence with the torque to construct a training data set; Train an initial model based on the training data set to obtain a target model; The target model is converted into an inference model, and the control of the hip joint exoskeleton is realized through the underlying control logic; The step of converting the target model into an inference model and implementing the control of the hip joint exoskeleton through the underlying control logic includes: Converting the target model into an inference model, and deploying the inference model on an exoskeleton onboard processor; Initialization is performed and the power assist is started when the wearer of the hip joint exoskeleton stands. At this time, the hip joint angles of both legs are defined as 0 degrees and correspond to the initial value of the motor encoder; Get the current hip joint angle by subtracting the initial value of the motor encoder from the current value of the motor encoder to get the current hip joint angle; The hip joint angle at the current moment is saved in a buffer sequence, wherein the length of the buffer sequence is the first input length of the initial model corresponding to the target model; if the buffer sequence is full, the hip joint angle at the earliest moment in the buffer sequence is deleted, and the hip joint angle at the current moment is added to update the buffer sequence; Inputting the buffer sequence into the inference model and predicting the moment at a third moment after a first time interval at the current moment; Multiplying the torque by the first coefficient and inputting it into the motor controller to generate assist; Repeat all the steps after the initialization to continue generating assistance.
2. The hip joint exoskeleton control method according to claim 1, characterized in that: The collecting of the first hip joint angle sequence and torque during human motion includes: The first hip joint angle sequence and torque are collected during human motion in a motion capture environment.
3. The control method of the hip joint exoskeleton according to claim 1, characterized in that: The step of performing data enhancement processing on the first hip joint angle sequence to obtain a second hip joint angle sequence includes: Performing noise processing on the first hip joint angle sequence to obtain a noisy hip joint angle sequence; Performing amplitude scaling processing on the noisy hip joint angle sequence to obtain a scaled hip joint angle sequence; The scaled hip joint angle sequence is randomly resampled to obtain a second hip joint angle sequence.
4. The control method of the hip joint exoskeleton as claimed in claim 3, characterized in that: The step of aligning the second hip joint angle sequence with the torque to construct a training data set includes: Align the hip joint angle at a first moment and the torque at a second moment in the second hip joint angle sequence to construct a training data set, wherein the time interval between the first moment and the second moment is a first time interval, and the second moment is after the first moment.
5. The control method of the hip joint exoskeleton as claimed in claim 3, characterized in that: The scaled hip joint angle sequence is randomly resampled to obtain a second hip joint angle sequence, including: The scaled hip joint angle sequence is interpolated and resampled by random upsampling to obtain a second hip joint angle sequence.
6. The method for controlling a hip joint exoskeleton according to any one of claims 1 to 5, characterized in that: The step of training the initial model based on the training data set to obtain the target model includes: Build an initial model including N convolutional layers and one fully connected layer, with an input length of the first input length, where N belongs to the first set and the first input length belongs to the second set; Setting training hyperparameters for the initial model, and setting the upper limit of the number of epochs of training corresponding to the training hyperparameters to m; Splitting the training data set into a training set and a validation set; Training the initial model based on the training set, obtaining an intermediate model after each epoch of training, and using the validation set to validate the performance of the intermediate model, the performance including prediction accuracy and average single prediction time; After completing the training of m epochs, m intermediate models are obtained, and the intermediate model with the highest prediction accuracy is selected from the m intermediate models as the candidate model; Repeat the above steps to obtain multiple candidate models; The multiple candidate models are screened according to the performance to determine a final target model.
7. A data-driven hip exoskeleton control device, characterized in that: include: A data acquisition module collects the first hip joint angle sequence and torque during human motion; a data processing module, performing data enhancement processing on the first hip joint angle sequence to obtain a second hip joint angle sequence, wherein the data enhancement processing includes at least one of adding noise to the first hip joint angle sequence, scaling the amplitude of the first hip joint angle sequence, and randomly resampling the first hip joint angle sequence; A data alignment module, aligning the second hip joint angle sequence with the torque to construct a training data set; A model training module, which trains an initial model based on the training data set to obtain a target model; A model deployment module converts the target model into an inference model and implements control of the hip exoskeleton through underlying control logic; Wherein, the model deployment module is specifically used for: Converting the target model into an inference model, and deploying the inference model on an exoskeleton onboard processor; Initialization is performed and the power assist is started when the wearer of the hip joint exoskeleton stands. At this time, the hip joint angles of both legs are defined as 0 degrees and correspond to the initial value of the motor encoder; Get the current hip joint angle by subtracting the initial value of the motor encoder from the current value of the motor encoder to get the current hip joint angle; The hip joint angle at the current moment is saved in a buffer sequence, wherein the length of the buffer sequence is the first input length of the initial model corresponding to the target model; if the buffer sequence is full, the hip joint angle at the earliest moment in the buffer sequence is deleted, and the hip joint angle at the current moment is added to update the buffer sequence; Inputting the buffer sequence into the inference model and predicting the moment at a third moment after a first time interval at the current moment; Multiplying the torque by the first coefficient and inputting it into the motor controller to generate assist; Repeat all the steps after the initialization to continue generating assistance.
8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A storage medium, wherein the storage medium is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
