Geometric parameter optimization method for weighing sensor based on Taylor expansion formula and gradient descent method

By combining Taylor expansion formulas and gradient descent method with KKT conditions and Lagrange multiplier method to optimize the geometric parameters of the weighing sensor, the problem of low efficiency of traditional enumeration method is solved, and efficient sensor design is achieved.

CN121480137APending Publication Date: 2026-02-06TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511419815.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

In the process of sensor development, traditional enumeration optimization methods are computationally expensive and inefficient, making it difficult to find extreme points in continuous parameter distribution intervals and thus unable to effectively optimize the geometric parameters of the sensor.

Method used

A locally linearized model is constructed using Taylor expansion and gradient descent. The optimization direction is corrected by combining KKT conditions and the Lagrange multiplier method, and the learning rate is dynamically adjusted to optimize the geometric parameters of the weighing sensor.

Benefits of technology

It significantly reduces computational costs, improves sensor resolution and load capacity, and enhances displacement response characteristics while meeting stress constraints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121480137A_ABST
    Figure CN121480137A_ABST
Patent Text Reader

Abstract

The invention discloses a weighing sensor geometric parameter optimization method based on a Taylor expansion formula and a gradient descent method, and relates to the technical field of precision measurement and other related technical fields. According to the optimization design method, on the basis of a Taylor expansion formula, a local linearization model of the relation between a target function value and sensor geometric parameters is established, and on the basis, optimization iteration of the geometric parameters of the elastomer is achieved through a gradient descent method. The method provided by the invention is suitable for the optimization problem that the objective function display expression cannot be directly given, and a feasible method is provided for the optimization problem of the type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of precision measurement technology, and in particular to a method for optimizing the geometric parameters of a weighing sensor based on Taylor expansion formula and gradient descent method. Background Technology

[0002] In sensor development, it is often necessary to optimize the geometric parameters of the sensing unit to meet the required technical performance indicators. For example, in a load cell, the elastic body can convert the mass (gravity) of the measured object into other directly measurable physical quantities. Its mechanical properties are a key factor affecting the performance of the load cell; therefore, the geometric parameters of the elastic body usually need to be optimized to meet the design requirements of the load cell. However, in the aforementioned example, the objective function in optimizing the elastic body's geometric parameters is usually a function of the stress or deformation within the elastic body. Since stress and deformation can only be obtained through finite element simulation, it is impossible to establish an explicit relationship model between the objective function and the elastic body's geometric parameters, thus making traditional optimization methods unsuitable.

[0003] The aforementioned dilemma also exists in the development of force sensors and other sensors. A common approach to this dilemma is enumeration, which involves obtaining the objective function values ​​under different parameters and then selecting the optimal one. However, this method has the following drawbacks: 1) High computational cost and low efficiency: the sample size of the enumeration method increases exponentially with the number of parameters, resulting in high computational costs when the number of parameters is large; 2) Difficulty in finding extreme values: when the distribution range of the optimized parameters is continuous, the enumeration method cannot list all possible cases, making it difficult to obtain the optimal parameter values ​​that maximize the objective function. These drawbacks limit the application of the enumeration method.

[0004] There is currently no more effective solution to the challenges faced in optimizing sensor design. Summary of the Invention

[0005] The present invention aims to at least partially solve one of the technical problems in the related art.

[0006] Therefore, the first objective of this invention is to propose a method for optimizing the geometric parameters of a weighing sensor based on Taylor expansion and gradient descent.

[0007] The second objective of this invention is to propose a weighing sensor geometric parameter optimization device based on Taylor expansion formula and gradient descent method.

[0008] The third objective of this invention is to provide an electronic device.

[0009] The fourth objective of this invention is to provide a computer-readable storage medium.

[0010] The fifth objective of this invention is to provide a computer program product.

[0011] To achieve the above objectives, a first aspect of the present invention proposes a method for optimizing the geometric parameters of a weighing sensor based on Taylor expansion and gradient descent, comprising:

[0012] S1. Set the initial values ​​and distribution range of the geometric parameters according to the design requirements of the weighing sensor, and determine the objective function and optimization constraints.

[0013] S2, based on finite element simulation to calculate the objective function value under the current parameters and its partial derivatives with respect to each geometric parameter, constructs a local linearization model between the objective function and the geometric parameters;

[0014] S3. Based on the local linearization model, the gradient descent method is used to determine the update direction of the geometric parameters, and the optimization direction is corrected by combining the constraints with the KKT conditions and the Lagrange multiplier method.

[0015] S4. Adjust the geometric parameters according to the update direction and learning rate, and repeat S2 to S3 until the objective function reaches a minimum or the preset maximum number of iterations is reached, and output the optimal parameter values ​​and their corresponding displacement values.

[0016] Optionally, the step of setting initial values ​​and distribution ranges of geometric parameters according to the design requirements of the weighing sensor, and determining the objective function and optimization constraints, further includes:

[0017] The geometric parameters include the radii R1 and R2 of the elastomer, and the thickness d of each part. 11 d 12 d 22 d 22 ;

[0018] The objective function includes the displacement value and the maximum stress value of the elastomer under the maximum load, and the optimization constraints include that the maximum stress does not exceed a preset threshold of the material's yield strength, and the displacement value is not less than a preset minimum displacement value.

[0019] Optionally, the step of constructing a locally linearized model between the objective function and the geometric parameters based on finite element simulation calculations of the objective function value under the current parameters and its partial derivatives with respect to each geometric parameter further includes:

[0020] The partial derivatives are calculated using the finite difference method, specifically by increasing and decreasing the preset step size based on the current parameters, calculating the corresponding objective function value and obtaining the gradient by finding the difference.

[0021] The local linearization model adopts a first-order approximation form of Taylor expansion, ignoring higher-order terms to simplify calculations and improve iteration efficiency.

[0022] Optionally, the step of determining the update direction of geometric parameters using gradient descent based on the local linearization model, and correcting the optimization direction using KKT conditions and the Lagrange multiplier method in conjunction with constraints, further includes:

[0023] When the maximum stress value of the elastomer exceeds a preset threshold, the update direction of the geometric parameters is the negative gradient direction of the maximum stress function;

[0024] When the maximum stress value of the elastic body meets the constraint condition but the displacement value does not reach the preset minimum value, the update direction of the geometric parameters is the gradient direction of the displacement function.

[0025] Optional, also includes:

[0026] The learning rate is dynamically adjusted based on the current parameter status. When the rate of decrease of the objective function value is lower than the preset threshold, the learning rate is reduced to improve convergence stability. When the rate of decrease of the objective function value is higher than the preset threshold, the learning rate is increased to accelerate the convergence speed.

[0027] To achieve the above objectives, a second aspect of the present invention provides a weighing sensor geometric parameter optimization device based on Taylor expansion formula and gradient descent method, comprising:

[0028] The parameter setting module is used to set the initial values ​​and distribution range of geometric parameters according to the design requirements of the weighing sensor, and to determine the objective function and optimization constraints.

[0029] The simulation modeling module is used to calculate the objective function value and its partial derivatives with respect to each geometric parameter under the current parameters based on finite element simulation, and to construct a locally linearized model between the objective function and the geometric parameters.

[0030] The direction optimization module is used to determine the update direction of geometric parameters based on the local linearization model using the gradient descent method, and to perform optimization direction correction using KKT conditions and the Lagrange multiplier method in combination with the constraint conditions.

[0031] The parameter update module is used to adjust the geometric parameters according to the update direction and learning rate, and repeatedly execute the functions of the simulation modeling module and the direction optimization module until the objective function reaches a minimum value or reaches the preset maximum number of iterations, and outputs the optimal parameter value and its corresponding displacement value.

[0032] To achieve the above objectives, a third aspect of the present invention provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0033] The memory stores computer-executed instructions;

[0034] The processor executes computer execution instructions stored in the memory to implement the method as described in any one of the first aspects.

[0035] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the method as described in any one of the first aspects.

[0036] To achieve the above objectives, a fifth aspect of the present invention provides a computer program product that, when executed by a processor, implements the method described in any one of the first aspects.

[0037] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0038] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0039] Figure 1 This is a textual flowchart illustrating a method for optimizing the geometric parameters of a weighing sensor based on Taylor expansion and gradient descent, provided as an embodiment of the present invention.

[0040] Figure 2 A schematic diagram of parameters for a method to optimize the geometric parameters of a weighing sensor based on Taylor expansion and gradient descent, provided in an embodiment of the present invention;

[0041] Figure 3 This is a schematic diagram of a weighing sensor design based on capacitive sensor detection of micro-displacement provided in an embodiment of the present invention;

[0042] Figure 4 This is a schematic diagram of the elastic body geometric parameters provided in an embodiment of the present invention;

[0043] Figure 5 This is a schematic diagram of the stress distribution of an elastic body under the initial parameters provided in an embodiment of the present invention;

[0044] Figure 6 This is a flowchart of the elastomer optimization process provided in an embodiment of the present invention;

[0045] Figure 7 This is a schematic diagram of the optimized stress distribution of the elastomer provided in an embodiment of the present invention;

[0046] Figure 8This is a schematic diagram of a weighing sensor geometric parameter optimization device based on Taylor expansion formula and gradient descent method provided in an embodiment of the present invention. Detailed Implementation

[0047] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0048] Figure 1 and Figure 2 These are, respectively, a textual flowchart and a parameter flowchart illustrating a method for optimizing the geometric parameters of a weighing sensor based on Taylor expansion and gradient descent, as provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0049] S1. Set the initial values ​​and distribution range of the geometric parameters according to the design requirements of the weighing sensor, and determine the objective function and optimization constraints.

[0050] S2, based on finite element simulation to calculate the objective function value under the current parameters and its partial derivatives with respect to each geometric parameter, constructs a local linearization model between the objective function and the geometric parameters;

[0051] S3. Based on the local linearization model, the gradient descent method is used to determine the update direction of the geometric parameters, and the optimization direction is corrected by combining the constraints with the KKT conditions and the Lagrange multiplier method.

[0052] S4. Adjust the geometric parameters according to the update direction and learning rate, and repeat S2 to S3 until the objective function reaches a minimum or the preset maximum number of iterations is reached, and output the optimal parameter values ​​and their corresponding displacement values.

[0053] Specifically, in this embodiment of the invention, firstly, based on actual needs, the distribution range and initial values ​​of the geometric parameters of the weighing sensor are determined, and simultaneously, the objective function and optimization parameters are determined. The optimization parameters include the maximum number of iterations and the learning rate. Further, using finite element method or other calculation methods, the objective function value f(x0) under the current parameters, and the partial derivatives of the objective function with respect to the geometric parameters are obtained. Specifically, it is assumed that the current parameters are... When calculating At that time, first order Where step is the step size, the objective function value f(x2) corresponding to parameter x1 is calculated, and then let The objective function value f(x2) corresponding to parameter x2 is calculated. As given by formula (1), that is

[0054]

[0055] Next, based on the Taylor expansion formula and the aforementioned calculation results, a locally linearized model of the objective function under the current parameters is given, namely:

[0056]

[0057] Furthermore, based on the principle of gradient descent, the direction of change of the geometric parameters is determined to reduce the objective function value. If there are no other constraints, the unit vector of the direction of change of the geometric parameters is...

[0058]

[0059] It is worth noting that when other constraints exist, it is necessary to combine other optimization algorithms to determine the direction of change of the geometric parameters, so as to maximize the descent rate of the objective function while satisfying other constraints. Furthermore, the parameter values ​​are changed, let x0 = x0 + λΔx, where λ is the learning rate.

[0060] Finally, repeat the above steps until the minimum value of the objective function is obtained, or the maximum number of iterations is reached.

[0061] Furthermore, in one embodiment of the present invention, the learning rate is dynamically adjusted according to the current parameter state. When the rate of decrease of the objective function value is lower than a preset threshold, the learning rate is reduced to improve convergence stability; when the rate of decrease of the objective function value is higher than the preset threshold, the learning rate is increased to accelerate convergence. This step plays a crucial role in the present invention, and is particularly suitable for complex optimization problems where the objective function cannot be explicitly expressed. By dynamically adjusting the learning rate, optimization efficiency can be improved and the number of simulation calculations reduced while ensuring convergence stability, thereby significantly reducing R&D costs. In the design of weighing sensors, this method can effectively optimize the geometric parameters of the elastic body, enabling it to meet stress constraints while improving displacement response characteristics, thereby improving the resolution and load capacity of the sensor.

[0062] To better illustrate the optimization method provided by this invention, a weighing sensor based on a capacitive sensor for detecting micro-displacement is used as an example below.

[0063] Design scheme of a weighing sensor based on capacitive sensor to detect micro-displacement, such as Figure 3As shown, it mainly consists of an "S"-shaped elastomer, a capacitive sensor, a ground electrode, and a fixed bracket. The "S"-shaped elastomer comprises a loading mechanism and a "parallelogram" mechanism. The capacitive sensor and the ground electrode are fixed to the left and right arms of the "parallelogram" mechanism, respectively. When a load is applied at the loading position, the loading mechanism transfers the weight of the load to the "parallelogram" mechanism, causing relative displacement between its left and right arms. By using the capacitive sensor to detect the relative displacement of the left and right arms, the weight or mass of the load can be detected.

[0064] According to the above design scheme, the maximum load capacity of the weighing sensor module is determined by the mechanical properties of the "S"-shaped elastomer and the range of the capacitive sensor. Specifically, under maximum load conditions, the maximum stress inside the "S"-shaped elastomer cannot exceed the yield strength of the material; simultaneously, the relative displacement of the left and right arms of the "parallelogram" mechanism cannot exceed the range of the capacitive sensor. The weighing resolution of the weighing sensor module is determined by the displacement characteristics of the left and right arms of the "parallelogram" mechanism and the displacement resolution of the capacitive sensor. Specifically, under a certain load, if the relative displacement value of the left and right arms of the "parallelogram" mechanism is equal to the displacement resolution of the capacitive sensor, then this load represents the highest resolution of the weighing sensor module.

[0065] Based on the foregoing analysis, assuming we want to design a weighing sensor with high resolution and a maximum load capacity of not less than m... max Then the optimization problem can be expressed as:

[0066]

[0067] Where, f(x,m) nax This indicates that when the geometric parameter is x and the load is m nax The displacement of the elastic body; F(x,m) nax )) indicates that when the geometric parameter is x and the load is m max The maximum stress value inside the elastic body at that time; F up χ represents the maximum stress that the elastomeric material can withstand; χ characterizes the feasible region of the geometric parameters.

[0068] The optimization method provided by this invention is now used to solve the above optimization problem. The parameter settings for the elastic body of the tachymeter sensor are as follows: Figure 4 As shown, the initial values ​​of the geometric parameters are provided in Table 1.

[0069] Table 1 Geometric parameters of the elastomer

[0070]

[0071]

[0072] The parameters to be optimized are as follows, while the values ​​of other parameters are fixed, with the initial value denoted as x0. In this embodiment, the material used for the elastomer is 17-7PH alloy steel, with a yield strength of approximately 1470 MPa. To ensure the linear elasticity of the elastomer, in this embodiment, the maximum stress value Fup that the elastomer material can withstand is set to 1000 MPa, the maximum stress deviation value is set to 30 MPa, and the maximum load capacity is set to 2500 kg. In this embodiment, the maximum stress value and displacement value of the elastomer are obtained using the finite element method. Under the initial parameters, the relative displacement value of the left and right arms of the "parallelogram" mechanism is 364 μm, and the stress distribution of the elastomer is as follows. Figure 5 As shown, the maximum stress value is 1278 MPa, which exceeds the maximum stress value that the material can withstand.

[0073] The optimization process of elastomers is as follows: Figure 6 As shown in the flowchart, the method for determining the direction of geometric parameter adjustment is as follows:

[0074] Method 1:

[0075] Scope of application: F>F up +F tol Where F is the current parameter, the maximum stress value that the elastic body can withstand under maximum load. tol It is the deviation value of the maximum stress.

[0076] Method Overview: Δx is calculated using the following formula:

[0077]

[0078] That is, Δx takes the negative gradient direction of the maximum stress value function to reduce the maximum stress value, so that the elastic body satisfies the constraint condition of the maximum stress value.

[0079] Method 2:

[0080] Scope of application: ABS (FF) up )≤F tol

[0081] Method Overview: Under this condition, the method for determining Δx follows the following two principles:

[0082] 1) Ensures that the maximum stress value of the elastic body does not increase under maximum load;

[0083] 2) To maximize the displacement increment of the elastic body under maximum load.

[0084] Therefore, this optimization problem can be summarized as follows:

[0085]

[0086] in:

[0087]

[0088] The above is a typical optimization problem under inequality constraints, which can be transformed into equality constraints using the Karush-Kuhn-Tucker (KKT) conditions, and then solved using the Lagrange multiplier method.

[0089] Method 3:

[0090] Scope of application: F <F up -F tol ,

[0091] Method Overview: Δx is calculated using the following formula:

[0092]

[0093] That is, Δx is taken as the gradient direction of the displacement function in order to increase the displacement value under maximum load.

[0094] The optimized geometric parameters are provided in Table 2, and the optimized stress distribution of the elastic body is as follows: Figure 7 As shown.

[0095] Table 2 Optimized elastomer geometric parameters

[0096]

[0097] Simulation results show that the relative displacement of the left and right arms of the "parallelogram" mechanism is reduced to 323 μm, but the maximum stress of the elastomer is reduced to 1029 MPa, which meets the requirements of the yield limit of the elastomer material. At the same time, if this parameter is finely adjusted, the relative displacement of the left and right arms of the "parallelogram" mechanism will decrease, or it will not meet the requirements of the yield limit of the elastomer material. That is, under this parameter, the relative displacement of the left and right arms of the "parallelogram" mechanism can be maximized while meeting the requirements of the yield limit of the elastomer material, which means that the optimization algorithm provided by this invention is feasible.

[0098] To achieve the above embodiments, the present invention also proposes a weighing sensor geometric parameter optimization device based on Taylor expansion formula and gradient descent method. Figure 8 This is a schematic diagram of the structure of an XX device provided in an embodiment of the present invention. For example... Figure 8 As shown, the device includes:

[0099] The parameter setting module 100 is used to set the initial values ​​and distribution range of the geometric parameters according to the design requirements of the weighing sensor, and to determine the objective function and optimization constraints.

[0100] The simulation modeling module 200 is used to calculate the objective function value and its partial derivatives with respect to each geometric parameter under the current parameters based on finite element simulation, and to construct a locally linearized model between the objective function and the geometric parameters.

[0101] The direction optimization module 300 is used to determine the update direction of geometric parameters according to the local linearization model using the gradient descent method, and to perform optimization direction correction using KKT conditions and the Lagrange multiplier method in combination with the constraint conditions.

[0102] The parameter update module 400 is used to adjust the geometric parameters according to the update direction and learning rate, and repeatedly execute the functions of the simulation modeling module and the direction optimization module until the objective function reaches a minimum value or reaches the preset maximum number of iterations, and outputs the optimal parameter value and its corresponding displacement value.

[0103] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0104] To implement the above embodiments, the present invention also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method provided in the foregoing embodiments.

[0105] To implement the above embodiments, the present invention also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.

[0106] To implement the above embodiments, the present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.

[0107] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this invention all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0108] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.

[0109] This invention is intended to provide implementation schemes for users to selectively prevent the use or access to personal information data. That is, this disclosure is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information can be de-identified to protect user privacy.

[0110] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0111] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0112] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.

[0113] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0114] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0115] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0116] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0117] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

[0118] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0119] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for optimizing the geometric parameters of a weighing sensor based on Taylor expansion and gradient descent, characterized in that, include: S1. Set the initial values ​​and distribution range of the geometric parameters according to the design requirements of the weighing sensor, and determine the objective function and optimization constraints. S2, based on finite element simulation to calculate the objective function value under the current parameters and its partial derivatives with respect to each geometric parameter, constructs a local linearization model between the objective function and the geometric parameters; S3. Based on the local linearization model, the gradient descent method is used to determine the update direction of the geometric parameters, and the optimization direction is corrected by combining the constraints with the KKT conditions and the Lagrange multiplier method. S4. Adjust the geometric parameters according to the update direction and learning rate, and repeat S2 to S3 until the objective function reaches a minimum or the preset maximum number of iterations is reached, and output the optimal parameter values ​​and their corresponding displacement values.

2. The method as described in claim 1, characterized in that, The process of setting initial values ​​and distribution ranges of geometric parameters according to the design requirements of the weighing sensor, and determining the objective function and optimization constraints, also includes: The geometric parameters include the radii R1 and R2 of the elastomer, and the thickness d of each part. 11 d 12 d 21 d 22 ; The objective function includes the displacement value and the maximum stress value of the elastomer under the maximum load, and the optimization constraints include that the maximum stress does not exceed a preset threshold of the material's yield strength, and the displacement value is not less than a preset minimum displacement value.

3. The method as described in claim 1, characterized in that, The method of constructing a locally linearized model between the objective function and geometric parameters based on finite element simulation to calculate the objective function value under the current parameters and its partial derivatives with respect to each geometric parameter also includes: The partial derivatives are calculated using the finite difference method, specifically by increasing and decreasing the preset step size based on the current parameters, calculating the corresponding objective function value and obtaining the gradient by finding the difference. The local linearization model adopts a first-order approximation form of Taylor expansion, ignoring higher-order terms to simplify calculations and improve iteration efficiency.

4. The method as described in claim 1, characterized in that, The step of determining the update direction of geometric parameters using gradient descent based on the local linearization model, and then correcting the optimization direction using KKT conditions and the Lagrange multiplier method in conjunction with constraints, further includes: When the maximum stress value of the elastomer exceeds a preset threshold, the update direction of the geometric parameters is the negative gradient direction of the maximum stress function; When the maximum stress value of the elastic body meets the constraint condition but the displacement value does not reach the preset minimum value, the update direction of the geometric parameters is the gradient direction of the displacement function.

5. The method as described in claim 1, characterized in that, Also includes: The learning rate is dynamically adjusted based on the current parameter status. When the rate of decrease of the objective function value is lower than the preset threshold, the learning rate is reduced to improve convergence stability. When the rate of decrease of the objective function value is higher than the preset threshold, the learning rate is increased to accelerate the convergence speed.

6. A device for optimizing the geometric parameters of a weighing sensor based on Taylor expansion and gradient descent, characterized in that, include: The parameter setting module is used to set the initial values ​​and distribution range of geometric parameters according to the design requirements of the weighing sensor, and to determine the objective function and optimization constraints. The simulation modeling module is used to calculate the objective function value and its partial derivatives with respect to each geometric parameter under the current parameters based on finite element simulation, and to construct a locally linearized model between the objective function and the geometric parameters. The direction optimization module is used to determine the update direction of geometric parameters based on the local linearization model using the gradient descent method, and to perform optimization direction correction using KKT conditions and the Lagrange multiplier method in combination with the constraint conditions. The parameter update module is used to adjust the geometric parameters according to the update direction and learning rate, and repeatedly execute the functions of the simulation modeling module and the direction optimization module until the objective function reaches a minimum value or reaches the preset maximum number of iterations, and outputs the optimal parameter value and its corresponding displacement value.

7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-5.

9. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-5.