Linear spring design method, preparation method and related device based on neural network
Through a neural network-based design method and the use of mechanical components to simulate the load-displacement curve, the problem of linear spring design in the existing technology being difficult to achieve an arbitrary stiffness curve was solved, and the low-cost preparation of linear springs without the need for external power supply was achieved.
Patent Information
- Application Number
- CN202510057791.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-01-14
AI Technical Summary
Existing linear spring designs make it difficult to achieve arbitrary stiffness curves, and existing electromechanical device solutions have complex structures, require external power supply, and have high operating costs.
A neural network-based design method is adopted to construct a single-input single-output neural network. The load-displacement curve is simulated through mechanical components. The weight, bias and activation function of the single-input single-output neural network are used for curve fitting. Combined with the force analysis of the linear spring simulation mechanism, the unknown structural parameters are determined, and a linear spring with an arbitrary load-displacement curve is prepared.
A linear spring design with a simple structure, no need for external power supply and low cost is achieved, and a linear spring with an arbitrary load-displacement curve can be prepared.
Smart Images

Figure CN119849324B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of linear spring design, and in particular to a linear spring design method, a preparation method and related devices based on a neural network. Background Art
[0002] The design of linear springs involves many fields such as material mechanics and elastic mechanics. It is necessary to select appropriate spring materials according to the loads that the spring needs to bear and the working environment, and then calculate the spring diameter, length, number of coils, etc. according to the required mechanical properties and design requirements. The stiffness curve (i.e. load-displacement curve, also called load-deformation curve) of conventional linear springs has certain forms, such as linear, increasing stiffness, decreasing stiffness, etc. Figure 1 Due to the limitations of materials, structural forms, and manufacturing processes, it is difficult to design and manufacture a machine with an arbitrary stiffness curve (such as Figure 2 A linear spring (shown).
[0003] To meet the specific demands of mechanical equipment for spring stiffness characteristics, William Tudor Bigge et al., in their paper "The Programmable Spring: Towards physical emulators of mechanical systems," attempted to use an electromechanical device to simulate arbitrary stiffness curves for linear springs. In this electromechanical device, a sensor captures displacement and inputs it into a controller. The controller, based on the proposed stiffness curve, outputs a current corresponding to the displacement to a motor. The motor then generates an output force proportional to the current, thereby achieving a given load relationship at a given displacement. This solution can accommodate arbitrary load-displacement curves and offers high flexibility, but it is complex, requires an external power supply, and is expensive. Summary of the Invention
[0004] The purpose of this application is to provide a linear spring design method, preparation method and related device based on neural network, which can design and prepare linear springs with arbitrary load-displacement curves, with simple structure, no need for external power supply and low cost.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides a linear spring design method based on a neural network, the linear spring design method based on a neural network comprising:
[0007] Constructing a single-input single-output neural network; the single-input single-output neural network includes an input layer, a hidden layer, and an output layer connected in sequence;
[0008] Using displacement as input and load as output, a single-input single-output neural network is used to perform curve fitting on a load-displacement curve of a preset linear spring to obtain a first expression; the first expression uses the weight, bias, and activation function of the single-input single-output neural network to characterize the relationship between load and displacement;
[0009] Constructing a linear spring simulation mechanism; the linear spring simulation mechanism includes an input component, a transmission component, and multiple neuron components, where the number of neuron components is the same as the number of nodes in the hidden layer; the input component is used to move a certain displacement under the action of a load, the transmission component is transmission-connected to the input component, and the neuron component is transmission-connected to the transmission component, and the unknown structural parameters of the transmission component and the unknown structural parameters of the neuron component are used to simulate the weight, bias, and activation function of a single-input single-output neural network;
[0010] Performing a force analysis on the linear spring simulation mechanism to obtain a second expression; the second expression uses unknown structural parameters of the linear spring simulation mechanism to characterize the relationship between load and displacement, where the unknown structural parameters of the linear spring simulation mechanism include unknown structural parameters of the transmission component and unknown structural parameters of the neuron component;
[0011] By making the correlation coefficients of the first expression and the second expression equal, the unknown structural parameters of the linear spring simulation mechanism are determined.
[0012] In a second aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned neural network-based linear spring design method.
[0013] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned neural network-based linear spring design method.
[0014] In a fourth aspect, the present application provides a method for preparing a linear spring based on a neural network, the method comprising:
[0015] Determine the unknown structural parameters of the linear spring simulation mechanism using the above-mentioned neural network-based linear spring design method;
[0016] Based on unknown structural parameters, the input component, transmission component and multiple neuron components of the linear spring simulation mechanism are assembled to prepare a linear spring based on a neural network.
[0017] In a fifth aspect, the present application provides a neural network-based linear spring, which is prepared using the above-mentioned neural network-based linear spring preparation method.
[0018] According to the specific embodiments provided in this application, this application has the following technical effects:
[0019] The present application provides a neural network-based linear spring design method, preparation method, and related apparatus. A single-input, single-output neural network is constructed, using displacement as input and load as output. The single-input, single-output neural network is used to curve fit a preset linear spring's load-displacement curve to obtain a first expression. A linear spring simulation mechanism is constructed, and a force analysis is performed on the linear spring simulation mechanism to obtain a second expression. The correlation coefficients of the first and second expressions are set equal to determine the unknown structural parameters of the linear spring simulation mechanism. Based on the curve fitting principle of a neural network, the present application employs mechanical components to implement the functions of each link in the neural network curve fitting process, achieving the design of a linear spring with a given stiffness curve. A linear spring is subsequently prepared based on the design results, thereby enabling the design and preparation of a linear spring with any load-displacement curve. Since only mechanical components are required, without sensors, controllers, motors, or other equipment, the method has the advantages of a simple structure, no need for external power supply, and low cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a schematic diagram of a typical existing linear spring stiffness curve; wherein, Figure 1 (a) is a linear stiffness curve. Figure 1 (b) in the figure is the stiffness curve with increasing stiffness. Figure 1 (c) in the figure is a stiffness curve with decreasing stiffness.
[0022] Figure 2 is a schematic diagram of the linear spring stiffness curve of the existing demand; Figure 2 (a) is the nonlinear stiffness curve. Figure 2 (b) in the figure is the sinusoidal stiffness curve.
[0023] Figure 3 This is an application environment diagram of a neural network-based linear spring design method provided in Example 1 of the present application.
[0024] Figure 4 A schematic flow chart of a neural network-based linear spring design method provided in Example 1 of the present application.
[0025] Figure 5 Schematic diagram of the neuron model provided in Example 1 of the present application.
[0026] Figure 6 This is a schematic diagram of the activation function provided in Example 1 of the present application; wherein, Figure 6 (a) in the equation is ReLU, Figure 6 (b) in the figure is Sigmoid.
[0027] Figure 7 This is a schematic diagram of the structure of the neural network provided in Example 1 of the present application.
[0028] Figure 8 This is a schematic diagram of the structure of a single-input, single-output, single-hidden layer neural network provided in Example 1 of the present application.
[0029] Figure 9 A schematic diagram comparing the expected curve and the fitting curve provided in Example 1 of the present application; wherein, Figure 9 (a) is the comparison of nonlinear stiffness curves. Figure 9 (b) in the figure shows the comparison of sinusoidal stiffness curves.
[0030] Figure 10 A schematic structural diagram of a linear spring based on a single-input, single-output, single-hidden-layer neural network provided in Example 1 of the present application.
[0031] Figure 11 Provided in Example 1 of this application Figure 10 Schematic diagram of the force analysis of the linear spring in .
[0032] Figure 12 Another structural schematic diagram of a linear spring based on a single-input, single-output, single-hidden-layer neural network provided in Example 1 of the present application.
[0033] Figure 13 A schematic diagram of the structure of a computer device provided in Example 2 of the present application.
[0034] Reference numerals:
[0035] 1-input rod; 2-guide cylinder; 3-hinge; 4-first connecting rod; 5-fixed support; 6-constant torque torsion spring; 7-lever arm; 8-spring; 9-sleeve; 10-piston rod; 11-second connecting rod; 12-drive shaft; 13-input rack; 14-input gear; 15-proportional rack; 16-proportional gear; 17-linear slide rail. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0037] Example 1
[0038] The linear spring design method based on neural network provided in the embodiment of the present application can be applied to Figure 3 In the application environment shown. Among them, the terminal communicates with the server through the network. The data storage system can store the data that the server needs to process. The data storage system can be set up separately, integrated on the server, or placed on the cloud or other servers. The terminal can send the pending design request to the server. After the server receives the pending design request, the server constructs a single-input single-output neural network for the pending design request; using displacement as input and load as output, the single-input single-output neural network is used to perform curve fitting on the load-displacement curve of the preset linear spring to obtain a first expression; a linear spring simulation mechanism is constructed; a force analysis is performed on the linear spring simulation mechanism to obtain a second expression; the correlation coefficient of the first expression and the second expression is made equal, and the unknown structural parameters of the linear spring simulation mechanism are determined. The server can feed back the design results obtained for the design request (i.e., the unknown structural parameters of the linear spring simulation mechanism) to the terminal.
[0039] In addition, in some embodiments, the neural network-based linear spring design method can also be implemented independently by a server or a terminal. For example, the terminal can directly process the pending design request, or the server can obtain the pending design request from the data storage system and process the pending design request.
[0040] The terminals may include, but are not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, and smart car devices. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. The server may be implemented as a standalone server or a server cluster consisting of multiple servers, or as a cloud server.
[0041] In an exemplary embodiment, Figure 4As shown, a linear spring design method based on a neural network is provided. The method is executed by a computer device, specifically a computer device such as a terminal or a server, or a terminal and a server. In the embodiment of the present application, the method is applied to Figure 3 The following steps are used as an example to illustrate the server.
[0042] Step S1, constructing a single-input single-output neural network; the single-input single-output neural network includes an input layer, a hidden layer and an output layer connected in sequence.
[0043] Step S2, using displacement as input and load as output, and using a single-input single-output neural network to perform curve fitting on the load-displacement curve of a preset linear spring to obtain a first expression; the first expression uses the weight, bias and activation function of the single-input single-output neural network to characterize the relationship between load and displacement.
[0044] Step S3, constructing a linear spring simulation mechanism; the linear spring simulation mechanism includes an input component, a transmission component and multiple neuron components, and the number of neuron components is the same as the number of nodes in the hidden layer; the input component is used to move a certain displacement under the action of the load, the transmission component is connected to the input component, and the neuron component is connected to the transmission component, and the unknown structural parameters of the transmission component and the unknown structural parameters of the neuron component are used to simulate the weight, bias and activation function of the single-input single-output neural network.
[0045] Step S4: Perform a force analysis on the linear spring simulation mechanism to obtain a second expression. The second expression uses unknown structural parameters of the linear spring simulation mechanism to characterize the relationship between load and displacement. The unknown structural parameters of the linear spring simulation mechanism include unknown structural parameters of the transmission component and unknown structural parameters of the neuron component.
[0046] Step S5: Make the correlation coefficients of the first expression and the second expression equal to each other, and determine the unknown structural parameters of the linear spring simulation mechanism.
[0047] By implementing the above-mentioned steps S1 to S5, this embodiment is based on the curve fitting principle of a neural network and uses mechanical components (or mechanical structures) to implement the functions of each link in the neural network curve fitting, thereby realizing the design of a linear spring with a given stiffness curve. The linear spring is subsequently prepared based on the design results. It can be applied to the field of mechanical devices. Only mechanical components can be used to design and prepare a linear spring with an arbitrary load-displacement curve. The structure is simple, no external power supply is required, and the cost of use is low.
[0048] A feature of this embodiment is that a load-displacement curve of a linear spring is fitted by using a neural network-like mechanical component. First, the neural network parameters of the fitting curve (i.e., a given load-displacement curve) are obtained according to a neural network algorithm. Then, the form and parameters of the mechanical component are selected through the mapping relationship between the neuron structure and the mechanical component, thereby achieving customizability of the load (force) and displacement relationship.
[0049] This embodiment is mainly used for the design of variable stiffness linear springs. Mechanical components are used to implement the neuron function in a neural network. The parameters of the mechanical components are obtained by drawing on the curve fitting algorithm of a single-input single-output neural network (including forward propagation, loss calculation, backpropagation, etc.), thereby fitting a given load-displacement curve. The specific principles are as follows:
[0050] (1) Curve fitting principle of neural network
[0051] Neural networks are composed of basic neuron units, such as Figure 5 As shown, the neuron model includes multiple links such as input, weight, bias, summation, activation, and output. The input x i (i=1,2,…,m) is the external input signal, which is the independent variable. Each neuron may have multiple input signals, depending on the number of independent variables m and weight w i (i=1,2,…,m) is the weight value of each input signal. The bias b enables the function value of the dependent variable to move up and down along the Y axis. In biology, it is the critical value of the input signal level that makes the neuron cell excited. The sum is the product of all input signals and weights w. i x i (i=1,2,…,m) are added, and activation is used to perform nonlinear transformation on the input of the neuron to obtain the output y. Common activation functions include Sigmoid, ReLU, etc. Figure 6 As shown in the figure, the activation principle of ReLU is: when the input is less than 0, the output is 0, and when the input is greater than 0, the output is equal to the input. The activation principle of Sigmoid is: when the input approaches positive infinity / negative infinity, the output is infinitely close to 1 / 0.
[0052] Neurons are the basic units in a neural network. They receive one or more input signals, perform linear weighted addition on the input signals, compare them with the bias b, and process the result through an activation function to generate an output signal. Among them, y is the output signal, σ is the activation function, commonly used are ReLU and Sigmoid functions, m is the number of input signals, w i is the weight of the i-th input signal, x i is the i-th input signal, and b is the bias.
[0053] Will Figure 5 If multiple neurons shown in the figure are connected together at a certain level, a neural network can be obtained, such as Figure 7 As shown, the neural network includes an input layer, hidden layers, and an output layer connected in sequence. The input layer receives input data, the hidden layer is located between the input and output layers and processes the input data, and the output layer produces the final output. According to current research on neural networks, when the number of hidden layers is 1, any function containing a continuous mapping from one finite space to another can be fitted. When the number of hidden layers is 2, any decision boundary of arbitrary precision can be represented and any smooth mapping of arbitrary precision can be fitted. When the number of hidden layers is greater than 2, descriptions of complex objects can be obtained.
[0054] The load-displacement curve has only one independent variable (displacement) and one dependent variable (load value). A single-input, single-output neural network can handle the simple functional mapping relationship between the input (independent variable) and the output (dependent variable). This embodiment intends to use mechanical components to implement neuron-like units, and connect neuron-like units to form a neural network to fit the load-displacement curve. Taking into account factors such as fitting accuracy, structural complexity, and cost, the following is adopted: Figure 8 It is implemented using the single-input, single-output, single-hidden-layer neural network shown in Figure 2.
[0055] Let σ be the ReLU function, Figure 8 The functional relationship between input and output is:
[0056]
[0057] Among them, y is the output, representing the load; m is the number of nodes in the hidden layer; w 2i is the weight connecting the i-th node in the hidden layer to the node in the output layer; σ is the activation function; w 1i is the weight of the node in the input layer connected to the i-th node in the hidden layer; x is the displacement; b 1i is the bias of the i-th node in the hidden layer; b2 is the bias of the node in the output layer.
[0058] For example Figure 2 The load-displacement curve shown in the figure takes displacement as the independent variable and load as the dependent variable, and adopts Figure 8 The single-input single-output single hidden layer (the number of hidden layer nodes can be 5) neural network shown in the figure is used for curve fitting, and the neural network parameters can be obtained as shown in Table 1. The fitting results are shown in Table 1. Figure 9 shown.
[0059] Table 1 Neural network parameters
[0060]
[0061] observe Figure 9 It can be seen that by changing the weight and bias parameters of the single-input, single-output, single-hidden-layer neural network, the fitting of different load-displacement curves can be achieved in a mathematical sense.
[0062] The number of nodes in the hidden layer can be determined according to user needs.
[0063] At this time, in this embodiment, a single-input single-output neural network is constructed. The single-input single-output neural network includes an input layer, a hidden layer, and an output layer connected in sequence. The displacement is used as the input and the load is used as the output. The single-input single-output neural network is used to perform curve fitting on the load-displacement curve of the preset linear spring to obtain a first expression. The first expression uses the weight, bias, and activation function of the single-input single-output neural network to characterize the relationship between load and displacement.
[0064] Among them, taking displacement as input and load as output, a single-input single-output neural network is used to perform curve fitting on the load-displacement curve of a preset linear spring to obtain a first expression, which specifically includes: determining the functional relationship between input and output based on the structure of the single-input single-output neural network; taking displacement as input and load as output, and using the preset load-displacement curve of the linear spring to determine the unknown parameters in the functional relationship between input and output to obtain the first expression, where the unknown parameters include the weight and bias of each node in the hidden layer and the weight and bias of the nodes in the output layer.
[0065] The first expression is:
[0066]
[0067] Among them, y is the output, representing the load; m is the number of nodes in the hidden layer; w 2i is the weight connecting the i-th node in the hidden layer to the node in the output layer; w 1i is the weight connecting the node in the input layer to the i-th node in the hidden layer; σ is the activation function; x is the displacement; b 1i is the bias of the i-th node in the hidden layer; b2 is the bias of the node in the output layer.
[0068] (2) Linear spring principle based on neural network
[0069] This embodiment is based on a single-input single-output neural network mechanism to achieve the use of mechanical components to fit a given load-displacement curve. The specific implementation process is as follows: According to the principle of neural network curve fitting, a neuron-like mechanical component is designed. The neuron-like mechanical component can realize weight, bias and activation functions. The weight can be realized by a lever device (such as Figure 10 As shown), it can be realized by using gear and rack meshing (as shown Figure 12As shown), it can also be achieved by using springs with different stiffness in different neuron components (according to the second expression, |w 2i w 1i | as the spring stiffness of each neuron component). Activation and biasing functions can be achieved through cylinder-like structures, rigid ropes, and constant torque / constant force structures. Based on the load-displacement curve to be fitted, while meeting fitting accuracy requirements, and to reduce manufacturing costs and cumulative errors, a neural network with a small number of hidden layers and nodes is selected. The neural network parameters (i.e., unknown parameters) are selected using the forward propagation, backpropagation, weight updating, and repeated training methods employed in the neural network algorithm. The parameters of each mechanical component are determined based on the mapping relationship between the neural network parameters and the parameters of the neural network-like mechanical components. This allows for fitting of linear and nonlinear stiffness curves. However, the springs and constant torque torsion springs in the neuron components should be kept within the linear range as much as possible within their deformation range to minimize fitting errors.
[0070] This embodiment constructs a linear spring simulation mechanism, which includes an input component, a transmission component, and multiple neuron components. The number of neuron components is equal to the number of nodes in the hidden layer. The input component is configured to move a certain displacement under the action of a load. The transmission component is in transmission connection with the input component, and the neuron component is in transmission connection with the transmission component. The unknown structural parameters of the transmission component and the unknown structural parameters of the neuron components are used to simulate the weights, biases, and activation functions of a single-input, single-output neural network.
[0071] like Figure 10 Figure 1 illustrates a linear spring principle based on a neural network. In the transmission assembly, a fixed support 5 (i.e., the fulcrum) is fixed, while a lever arm 7 can rotate about the fulcrum. A constant-torque torsion spring 6 has one end fixed and the other end connected to the lever arm 7, exerting a constant torque M0 on the lever arm 7. In the input assembly, an input rod 1 reciprocates within a sliding pair (i.e., a guide cylinder 2) and is connected to a first connecting rod 4 via a hinge 3. The first connecting rod 4 is also connected to the lever arm 7 via a hinge 3. Each neuron component is connected to the lever arm 7 through a spring 8, a bias activation component (i.e., a sleeve 9 and a piston rod 10), a second connecting rod 11, etc. Taking neuron component 1 as an example, the two ends of the spring 8 are fixedly connected to the ground and the sleeve 9 in the bias activation component respectively. The piston rod 10 in the bias activation component is connected to the second connecting rod 11 through a hinge 3, and the second connecting rod 11 is connected to the lever arm 7 through a hinge 3. The piston rod 10 of the bias activation component can make a linear reciprocating motion in the sleeve 9. When the piston rod 10 moves to the right to the extreme position (i.e., it fits with the closed end face of the sleeve 9), it will push the sleeve 9 to continue to move to the right, thereby compressing the spring 8.
[0072] When the user applies force F (i.e., load) on the input rod 1 and moves the input rod 1 a distance x (i.e., displacement) relative to the reference position point R, the lever arm 7 will rotate around the fulcrum and drive the hinges on the lever arm 7 to move in the same direction, thereby causing the various components in each neuron assembly to move. Taking neuron assembly 1 as an example, the movement of the hinge drives the second connecting rod 11 and the bias activation component to move, and when the piston rod 10 reaches the right limit position (i.e., the right side of the piston rod 10 hits the inner end of the sleeve 9), it continues to push the sleeve 9 to compress the spring 8, generating a force, which further acts on the lever arm 7 and is balanced with the torque of other neuron assemblies and the input rod 1 on the lever arm 7 relative to the fulcrum.
[0073] At this time, the input assembly includes an input rod 1, a horizontally arranged guide cylinder 2, and a first connecting rod 4. The transmission assembly includes a fixed support 5, a lever arm 7, and a constant torque torsion spring 6. Each neuron assembly includes a spring 8, a sleeve 9, a piston rod 10, and a second connecting rod 11. The first end of the input rod 1 is used to bear the load and move a certain displacement under the action of the load. The input rod 1 reciprocates horizontally along the guide cylinder 2. The second end of the input rod 1 is hinged to the first end of the first connecting rod 4, and the second end of the first connecting rod 4 is hinged to the lever arm 7. The lever arm 7 is hinged to the fixed support 5. The first end of the constant torque torsion spring 6 is fixed, and the second end of the constant torque torsion spring 6 is connected to the lever arm 7. The constant torque torsion spring 6 is used to simulate the bias of the nodes in the output layer of the single-input single-output neural network. In each neuron component, the first end of the spring 8 is fixed, the second end of the spring 8 is connected to the sleeve 9, the first end of the piston rod 10 extends into the sleeve 9, the second end of the piston rod 10 is hinged to the first end of the second connecting rod 11, and the second end of the second connecting rod 11 is hinged to the lever arm 7. The sleeve 9 and the piston rod 10 are used to simulate the activation function of the single-input single-output neural network.
[0074] At this time, the unknown structural parameters of the transmission component include the constant torque exerted by the constant torque torsion spring 6 on the lever arm 7 and the distance between the hinge point between the second connecting rod 11 and the lever arm 7 in each neuron component and the hinge point between the lever arm 7 and the fixed support 5. The unknown structural parameters of the neuron component include the stiffness of the spring 8 in each neuron component and the stroke of the piston rod 10 moving freely into the sleeve 9.
[0075] like Figure 11As shown, starting from neuron assembly 1, the equilibrium relationship in the above mechanism is analyzed. Input rod 1 moves a distance x under the action of force F, and lever arm 7 rotates an angle θ about point O. To simplify the calculation, the structural parameter x / l0 is selected to be smaller than a preset value, so that when the input rod 1 moves within its range of motion, it has a smaller angle θ. In this case, angle θ is a small value, and the distance l0 between the hinge point A of the first connecting rod 4 and lever arm 7 and the hinge point O of the lever arm 7 and the fixed support 5 is the unit moment arm, i.e., a value of 1. Because angle θ is small, hinge point A moves a distance x in the horizontal direction, and hinge point B of neuron assembly 1 and lever arm 7 moves horizontally. for:
[0076]
[0077] Wherein, l1 is the distance between the hinge point B between the second connecting rod 11 and the lever arm 7 in the neuron component 1 and the hinge point O between the lever arm 7 and the fixed support 5.
[0078] The horizontal displacement s1 of the sleeve 9 in the neuron assembly 1 is:
[0079] s1 = ReLU(l1x-d1);
[0080] Wherein, d1 is the stroke of the piston rod 10 in the neuron assembly 1 that can freely move into the sleeve 9 when the input rod 1 is at the reference position.
[0081] The force F1 generated by the compression on the spring 8 in the neuron assembly 1 is:
[0082] F1=k1s1=k1ReLU(l1x-d1);
[0083] Wherein, k1 is the stiffness of the spring 8 in the neuron component 1.
[0084] The moment M1 generated by F1 on the lever arm 7 around point O is:
[0085]
[0086] Similarly, the horizontal displacement of the hinge points of other neuronal components They are:
[0087]
[0088] Among them, l i is the distance between the hinge point between the second connecting rod 11 and the lever arm 7 and the hinge point between the lever arm 7 and the fixed support 5 in the neuron component i.
[0089] The horizontal displacement s of the sleeve 9 in other neuron assemblies i They are:
[0090] s i =ReLU(l i xd i ) (i=2,…,m);
[0091] Among them, d i It is the stroke that the piston rod 10 in the neuron assembly i can freely move into the sleeve 9 when the input rod 1 is in the reference position.
[0092] The force F generated by the compression on the spring 8 in each other neuron assembly i They are:
[0093] F i =k i s i =k i ReLU(l i xd i ) (i=2,…,m);
[0094] Among them, k i is the stiffness of the spring 8 in the neuron component i.
[0095] F i The moment M generated on the lever arm 7 about point O i for:
[0096]
[0097] Combining the above formulas, we can get:
[0098]
[0099] Since l0=1, we can get:
[0100]
[0101] Right now:
[0102]
[0103] That is, for a given independent variable (displacement x), the relationship between the dependent variable (load F) and the independent variable (displacement x) is as shown in the above formula.
[0104] At this time, in this embodiment, a force analysis is performed on the linear spring simulation mechanism to obtain a second expression. The second expression uses the unknown structural parameters of the linear spring simulation mechanism to characterize the relationship between load and displacement. The unknown structural parameters of the linear spring simulation mechanism include the unknown structural parameters of the transmission component and the unknown structural parameters of the neuron component. The second expression is:
[0105]
[0106] Where F is the load; m is the number of neuron assemblies; ki is the stiffness of the spring in the i-th neuron assembly; li is the distance from the hinge point between the second link and the lever arm in the i-th neuron assembly to the hinge point between the lever arm and the fixed support; σ is the activation function; x is the displacement; di is the stroke of the piston rod in the i-th neuron assembly that is free to move into the sleeve; M0 is the constant torque exerted on the lever arm by the constant torque torsion spring.
[0107] After obtaining the first expression and the second expression, this embodiment sets the correlation coefficients of the first expression and the second expression to be equal, and determines the unknown parameters in the second expression, that is, determines the unknown structural parameters of the linear spring simulation mechanism. Comparing the first expression and the second expression, the relationship between the parameters is as follows:
[0108]
[0109] M0=b2;
[0110] Thus, the relationship between load F and displacement x (load-displacement curve) can be made consistent with the curve fitted by the neural network, that is, based on the neural network fitting algorithm, the fitting of the proposed stiffness curve form is achieved through the mechanical component.
[0111] It should be noted that w 2i w 1i The size of (i.e. |w 2i w 1i |) OK w 2i w 1i The sign of determines the installation position of the neuron component. If w 2i w 1i Is positive, then the neuron component is a neuron component with positive weight. If w 2i w 1i is negative, the neuron component is a neuron component with a negative weight. The installation position of the neuron component needs to ensure that when the displacement is positive, the spring 8 in the neuron component with a positive weight tends to be compressed, that is, the distance between the piston rod 10 and the sleeve 9 is reduced or the spring 8 is in a compressed state, and the spring 8 in the neuron component with a negative weight tends to be stretched, that is, the distance between the piston rod 10 and the sleeve 9 is increased or the spring 8 is in a stretched state. For example, Figure 10 As shown, the input assembly is located on the first side of the lever arm 7 (i.e., the left side in the figure) and is hinged to the first section of the lever arm 7 (i.e., the upper section in the figure). Figure 10 The deformation x direction is positive, so the weight is positive (i.e. w 1i and w 2iThe neuron component with a positive product) is located at the first section of the second side of the lever arm 7 (i.e., the right side in the figure) or the second section of the first side of the lever arm 7 (i.e., the lower section in the figure), at this time, the spring 8 tends to be compressed, and the weight is negative (i.e., w 1i and w 2i The neuron component with a negative product is located at the second section on the second side of the lever arm 7 or the first section on the first side of the lever arm 7, and the spring 8 tends to stretch.
[0112] like Figure 12 As shown, it illustrates another linear spring principle based on a neural network, which changes the structure of the transmission component. At this time, the input rod 1 converts the input linear displacement into angular displacement through the input rack 13 and the input gear 14. The proportional gear 16 is fixedly connected to the input gear 14 axis, that is, the proportional gear 16 rotates coaxially with the input gear 14, and the proportional gear 16 and the input gear 14 have the same angular velocity. By changing the gear ratio of the proportional gear 16 and the input gear 14, the input displacement of each neuron component can be changed. When the input rod 1 moves to the right, the input rack 13 moves accordingly, driving the input gear 14 to rotate, the input gear 14 drives the transmission shaft 12 to rotate, the transmission shaft 12 drives the proportional gear 16 to rotate, and the proportional gear 16 drives the proportional rack 15 to move along the linear slide 17.
[0113] The input assembly comprises an input rod 1 and a horizontally mounted guide cylinder 2. The transmission assembly includes a transmission shaft 12, a constant-torque torsion spring 6, an input rack 13, an input gear 14, multiple proportional racks 15, and multiple proportional gears 16. The proportional racks 15 and gears 16 correspond to the neuron assembly, which includes a spring 8, a sleeve 9, and a piston rod 10. The first end of the input rod 1 is designed to bear a load and move a certain distance under the action of the load. The input rod 1 reciprocates horizontally along the guide cylinder 2. The second end of the input rod 1 is connected to the input rack 13. The input rack 13 and multiple proportional racks 15 are respectively mounted on fixed linear slides 17. The input gear 14 is meshed with the input rack 13. The input gear 14 and multiple proportional gears 16 are both mounted on the transmission shaft 12. The first end of the constant torque torsion spring 6 is fixed, and the second end of the constant torque torsion spring 6 is connected to the transmission shaft 12. The constant torque torsion spring 6 is used to simulate the bias of the nodes in the output layer of the single-input single-output neural network. The proportional rack 15 is meshed with the proportional gear 16. The first end of the spring 8 is fixed, and the second end of the spring 8 is connected to the sleeve 9. The first end of the piston rod 10 extends into the sleeve 9, and the second end of the piston rod 10 is connected to the proportional rack 15. The sleeve 9 and piston rod 10 are used to simulate the activation function of the single-input single-output neural network.
[0114] At this time, the unknown structural parameters of the transmission assembly include the constant torque applied by the constant torque torsion spring 6 on the transmission shaft 12 and the tooth ratio between each proportional gear 16 and the input gear 14. The unknown structural parameters of the neuron assembly include the stiffness of the spring 8 in each neuron assembly and the stroke of the piston rod 10 moving freely into the sleeve 9.
[0115] At this time, during the force analysis, the horizontal displacement s of the sleeve 9 in each neuron assembly is i They are:
[0116]
[0117] Among them, z i is the number of teeth of the proportional gear of neuron component i, and z0 is the number of teeth of the input gear.
[0118] Then follow Figure 10 The formula of the structure shown can be deduced further to obtain the second expression, which will not be repeated here.
[0119] It should be noted that w 2i w 1i The sign of determines the installation position of the neuron component. If w 2i w 1i Is positive, then the neuron component is a neuron component with positive weight. If w 2i w 1i is negative, the neuron assembly is a neuron assembly with a negative weight. The installation position of the neuron assembly needs to ensure that when the displacement is positive, the spring 8 in the neuron assembly with a positive weight tends to be compressed, that is, the distance between the piston rod 10 and the sleeve 9 is reduced or the spring 8 is in a compressed state, and the spring 8 in the neuron assembly with a negative weight tends to be stretched, that is, the distance between the piston rod 10 and the sleeve 9 is increased or the spring 8 is in a stretched state.
[0120] It should be noted that in the above example, the teeth of the ratio gear and the input gear are exactly the same, only the number of teeth is different.
[0121] This application also provides an application scenario that utilizes the aforementioned neural network-based linear spring design method. Specifically, the neural network-based linear spring design method provided in this embodiment can be applied in a linear spring preparation scenario. This linear spring preparation scenario includes a design phase and a preparation phase. The design phase is used to design the unknown structural parameters of a linear spring simulation mechanism, and the preparation phase is used to prepare a linear spring with an arbitrarily given load-displacement curve based on the unknown structural parameters of the linear spring simulation mechanism. The neural network-based linear spring design method provided in this embodiment belongs to the design phase.
[0122] Example 2
[0123] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 13 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a linear spring design method based on a neural network is implemented.
[0124] Those skilled in the art will understand that Figure 13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0125] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the neural network-based linear spring design method in Example 1 when executing the computer program.
[0126] Example 3
[0127] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the neural network-based linear spring design method in Example 1 is implemented.
[0128] Example 4
[0129] This embodiment provides a method for preparing a linear spring based on a neural network, and the method for preparing a linear spring based on a neural network includes:
[0130] (1) The neural network-based linear spring design method described in Example 1 is used to determine the unknown structural parameters of the linear spring simulation mechanism.
[0131] (2) Based on the unknown structural parameters, the input component, transmission component and multiple neuron components of the linear spring simulation mechanism are assembled to prepare a linear spring based on a neural network.
[0132] Example 5
[0133] This embodiment provides a linear spring based on a neural network, and the linear spring based on a neural network is prepared using the method for preparing a linear spring based on a neural network described in Example 4.
[0134] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0135] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0136] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A linear spring design method based on neural network, characterized in that: The linear spring design method based on neural network includes: Constructing a single-input single-output neural network; the single-input single-output neural network includes an input layer, a hidden layer, and an output layer connected in sequence; Using displacement as input and load as output, a single-input single-output neural network is used to perform curve fitting on a load-displacement curve of a preset linear spring to obtain a first expression; the first expression uses the weight, bias, and activation function of the single-input single-output neural network to characterize the relationship between load and displacement; Constructing a linear spring simulation mechanism; the linear spring simulation mechanism includes an input component, a transmission component, and multiple neuron components, where the number of neuron components is the same as the number of nodes in the hidden layer; the input component is used to move a certain displacement under the action of a load, the transmission component is transmission-connected to the input component, and the neuron component is transmission-connected to the transmission component, and the unknown structural parameters of the transmission component and the unknown structural parameters of the neuron component are used to simulate the weight, bias, and activation function of a single-input single-output neural network; Performing a force analysis on the linear spring simulation mechanism to obtain a second expression; the second expression uses unknown structural parameters of the linear spring simulation mechanism to characterize the relationship between load and displacement, where the unknown structural parameters of the linear spring simulation mechanism include unknown structural parameters of the transmission component and unknown structural parameters of the neuron component; By making the correlation coefficients of the first expression and the second expression equal, the unknown structural parameters of the linear spring simulation mechanism are determined.
2. The linear spring design method based on neural network according to claim 1, characterized in that: With displacement as input and load as output, a single-input single-output neural network is used to perform curve fitting on the load-displacement curve of a preset linear spring to obtain a first expression, which specifically includes: Determine the functional relationship between input and output based on the structure of single-input single-output neural network; Taking displacement as input and load as output, a preset load-displacement curve of a linear spring is used to determine unknown parameters in the functional relationship between input and output to obtain a first expression; the unknown parameters include the weight and bias of each node in the hidden layer and the weight and bias of the nodes in the output layer.
3. The linear spring design method based on neural network according to claim 2, characterized in that: The first expression is: Among them, y is the output, representing the load; m is the number of nodes in the hidden layer; w 2i is the weight connecting the i-th node in the hidden layer to the node in the output layer; w 1i is the weight connecting the node in the input layer to the i-th node in the hidden layer; σ is the activation function; x is the displacement; b 1i is the bias of the i-th node in the hidden layer; b2 is the bias of the node in the output layer.
4. The linear spring design method based on neural network according to claim 1, characterized in that: The input assembly includes an input rod, a horizontally arranged guide cylinder and a first connecting rod; the transmission assembly includes a fixed support, a lever arm and a constant torque torsion spring; the neuron assembly includes a spring, a sleeve, a piston rod and a second connecting rod; The first end of the input rod is used to bear the load and move a certain displacement under the action of the load. The input rod reciprocates in the horizontal direction along the guide cylinder. The second end of the input rod is hinged to the first end of the first connecting rod, and the second end of the first connecting rod is hinged to the lever arm. The lever arm is hinged on a fixed support, the first end of the constant torque torsion spring is fixed, and the second end of the constant torque torsion spring is connected to the lever arm; the constant torque torsion spring is used to simulate the bias of the node in the output layer of the single-input single-output neural network; The first end of the spring is fixed, the second end of the spring is connected to the sleeve, the first end of the piston rod extends into the sleeve, the second end of the piston rod is hinged to the first end of the second connecting rod, and the second end of the second connecting rod is hinged to the lever arm; the sleeve and the piston rod are used to simulate the activation function of a single-input single-output neural network; At this time, the unknown structural parameters of the transmission assembly include the constant torque exerted by the constant torque torsion spring on the lever arm and the distance between the hinge point between the second connecting rod and the lever arm in each neuron assembly and the hinge point between the lever arm and the fixed support; the unknown structural parameters of the neuron assembly include the stiffness of the spring in each neuron assembly and the stroke of the piston rod's free movement into the sleeve.
5. The linear spring design method based on neural network according to claim 1, characterized in that: The input assembly includes an input rod and a horizontally arranged guide cylinder; the transmission assembly includes a transmission shaft, a constant torque torsion spring, an input rack, an input gear, multiple proportional racks and multiple proportional gears, and the proportional racks, proportional gears and neuron assemblies correspond one to one; the neuron assemblies include a spring, a sleeve and a piston rod; The first end of the input rod is used to bear the load and move a certain displacement under the action of the load. The input rod reciprocates in the horizontal direction along the guide cylinder. The second end of the input rod is connected to the input rack. The input rack and the plurality of proportional racks are respectively mounted on fixed linear guide rails; the input gear is meshed with the input rack; the input gear and the plurality of proportional gears are mounted on a transmission shaft; the first end of the constant torque torsion spring is fixed, and the second end of the constant torque torsion spring is connected to the transmission shaft; The proportional rack is meshed with the proportional gear; the constant torque torsion spring is used to simulate the bias of the node in the output layer of the single-input single-output neural network; The first end of the spring is fixed, the second end of the spring is connected to the sleeve, the first end of the piston rod extends into the sleeve, and the second end of the piston rod is connected to the proportional rack; the sleeve and the piston rod are used to simulate the activation function of the single-input single-output neural network; At this time, the unknown structural parameters of the transmission assembly include the constant torque exerted by the constant torque torsion spring on the transmission shaft and the tooth ratio of each proportional gear to the input gear; the unknown structural parameters of the neuron assembly include the stiffness of the spring in each neuron assembly and the stroke of the piston rod's free movement into the sleeve.
6. The linear spring design method based on neural network according to claim 4, characterized in that: The second expression is: Among them, F is the load; m is the number of neuron components; k i is the stiffness of the spring in the i-th neuron component; l i is the distance between the hinge point of the second link and the lever arm and the hinge point of the lever arm and the fixed support in the i-th neuron component; σ is the activation function; x is the displacement; d i is the stroke of the piston rod in the i-th neuron assembly moving freely into the sleeve; M0 is the constant torque exerted by the constant torque torsion spring on the lever arm.
7. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the linear spring design method based on a neural network according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the neural network-based linear spring design method according to any one of claims 1 to 6 is implemented.
9. A method for preparing a linear spring based on a neural network, characterized in that: The neural network-based linear spring preparation method includes: Determine unknown structural parameters of a linear spring simulation mechanism using the neural network-based linear spring design method according to any one of claims 1 to 6; Based on unknown structural parameters, the input component, transmission component and multiple neuron components of the linear spring simulation mechanism are assembled to prepare a linear spring based on a neural network.
10. A linear spring based on a neural network, characterized in that: The neural network-based linear spring is prepared using the neural network-based linear spring preparation method described in claim 9.
Citation Information
Patent Citations
Intelligent control method of steering engine electrohydraulic load simulator based on neural network identification
CN109814383A
Information identifying processing method based on nervous network
CN1457021A