An automatic calibration method for optical coupler sensors based on nonlinear optimization

Through the nonlinear optimization method, an optocoupler sensor calibration model suitable for different scenarios is constructed, which solves the problems in the existing technology that the optocoupler sensor calibration method cannot effectively describe the nonlinear characteristics and has poor generalization ability, and achieves efficient and accurate optical coupling sensor calibration. Coupling output value calibration.

CN118310571BActive Publication Date: 2024-08-30ZHUHAI XPRINTER ELECTRONICS TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410742853.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-08-30
Estimated Expiration
2044-06-11

AI Technical Summary

Technical Problem

Existing calibration methods for optocoupler sensors cannot effectively describe their nonlinear output characteristics, have poor generalization capabilities, and fail to effectively eliminate abnormal data, resulting in low accuracy of calibration results.

Method used

An automatic calibration method based on nonlinear optimization is used to obtain big data of optocoupler output values ​​of multiple devices, eliminate outliers, calculate the total error from interior points to the nonlinear model, and iteratively optimize to obtain the optimal model parameters and construct Nonlinear calibration model, suitable for calibration in different scenarios.

Benefits of technology

It achieves fast and efficient unified calibration of the optocoupler output value, improves the accuracy and universality of the calibration, enhances the robustness of the model and the efficiency of automated construction, and ensures the unification of the light output value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118310571B
    Figure CN118310571B
Patent Text Reader

Abstract

The invention relates to the technical field of calibration of optical coupler sensors, and specifically discloses an automatic calibration method for optical coupler sensors based on nonlinear optimization, comprising the following steps: acquiring M devices to be calibrated, respectively collecting big data of optical coupler output values, and obtaining a sample set; processing the sample set with an outlier elimination algorithm; obtaining a model optimization signal; calculating a total error from an interior point to a nonlinear model based on the model optimization signal; optimizing the total error from the interior point to the nonlinear model; iteratively calculating to obtain optimal model parameters that can achieve a minimum total error, obtaining a nonlinear calibration model based on the optimal model parameters, that is, obtaining calibration values ​​in other scenarios, and constructing and obtaining a nonlinear calibration model with high accuracy by utilizing multi-scenario big data collection and performing model optimization, so as to quickly and efficiently complete the unified calibration of optical coupler output values; improving the calibration efficiency, and at the same time, a reference scenario can bridge other scenarios to achieve the unification of optical output values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of optical coupling sensor calibration, and in particular to an automatic calibration method for an optical coupling sensor based on nonlinear optimization. Background Art

[0002] Optocoupler sensor: This is a sensor that converts light signals into electrical signals. It consists of a light-emitting diode (LED) and a photosensitive diode (photodiode or phototransistor). When the input end provides current to the LED, the LED will emit light, which is received by the photosensitive diode after passing through the isolation housing and converted into an electrical signal. Optocoupler sensors generally use optical fibers for light conduction to achieve electrical isolation;

[0003] Optocoupler sensor: Mainly used for isolation and protection of electrical equipment, data transmission, and electrical isolation. In industrial control, battery management, and communication equipment, the optocoupler sensor can isolate high voltage or high current signals, thereby protecting low voltage or low current circuits from external influences or damage. It can also be used for applications such as remote data transmission, data isolation, and noise suppression.

[0004] Many devices that use optocouplers as sensors have output values ​​that are related to factors such as luminous intensity and optical path distance, and have certain nonlinear characteristics. Due to production batches, usage environments, and other reasons, the output characteristics of optocouplers on different devices may vary, and calibration is required to obtain consistent output values.

[0005] However, the current calibration method of the optocoupler sensor has the following shortcomings;

[0006] 1) The nonlinear output characteristics of the optocoupler cannot be well described by simple linear model fitting;

[0007] 2) Only using calibration data from a single scenario, the generalization ability is poor and cannot adapt to different usage scenarios;

[0008] 3) The influence of abnormal data cannot be effectively eliminated, and the calibration results are not accurate. Summary of the invention

[0009] The object of the present invention is to provide an automatic calibration method for an optical coupler sensor based on nonlinear optimization, comprising the following steps: obtaining M devices to be calibrated, respectively collecting optical coupler output values m big data to obtain a sample set; process the sample set with an outlier removal algorithm; obtain a model optimization signal; calculate the total error from the interior point to the nonlinear model based on the model optimization signal; optimize the total error from the interior point to the nonlinear model; iteratively calculate to obtain the optimal model parameters that can achieve the minimum total error, and obtain a nonlinear calibration model based on the optimal model parameters, that is, obtain calibration values ​​in other scenarios to solve the problems in the above background.

[0010] The purpose of the present invention can be achieved through the following technical solutions:

[0011] An automatic calibration method for optical coupler sensors based on nonlinear optimization is proposed. M devices to be calibrated are obtained, and the optical coupler output values ​​V are collected for a fixed reference scene 1 and n-1 other scenes (such as n=2, 3, ..., N). 1m and V nm big data, obtain the sample set {(V 1m , V nm )}; Collecting the optocoupler output value data of all devices in all scenarios can improve the accuracy and robustness of model fitting;

[0012] For the sample set {(V 1m , V nm )}Use outlier elimination algorithm to process; obtain model optimization signal;

[0013] Based on the model optimization signal, the total error from the interior point to the nonlinear model is calculated;

[0014] Optimize the total error from the internal point to the nonlinear model; iteratively calculate the optimal model parameters that can achieve the minimum total error and mark them as P1 * , P2 * ,…,P k * ;

[0015] Based on the optimal model parameter P1 * , P2 * ,…,P k * ; Obtain nonlinear calibration model ;

[0016] For any new device, the optocoupler output value obtained in reference scenario 1 is V x , then the calibration values ​​in other scenarios are: .

[0017] As a further solution of the present invention: the step of processing the sample set using an outlier elimination algorithm includes:

[0018] S1: Randomly extract a subset of the sample set and use this subset to build a nonlinear model ; Among them, P1, P2, ..., Pk are model parameters that need to be evaluated;

[0019] S2: Apply the nonlinear model to all samples, calculate the number of sample points in the sample that fit the nonlinear model, that is, the number of internal points, and mark it as Y;

[0020] S3: Compare the number of inliers Y with the inliers threshold Yns.

[0021] As a further solution of the present invention: in S3, if the number of inliers Y is greater than the inliers threshold Yns; a model optimization signal is obtained;

[0022] If the number of internal points Ys is less than or equal to the internal point threshold Yns, a model iteration signal is obtained.

[0023] As a further solution of the present invention: the total error from the interior point to the nonlinear model is calculated as follows:

[0024] H1: Get the inner point light output value and mark it as V nY ; Among them, V nY is the optocoupler output value of the Yth inner point;

[0025] Based on this nonlinear model Get parameter vector ;

[0026] H2: Based on parameter vector ;pass The total error G is calculated.

[0027] As a further solution of the present invention: the optimal model parameters for achieving the minimum total error are calculated as follows:

[0028] R1: Set the starting parameter values, including the starting vector parameters. and the initial tuning parameter λ st ;

[0029] R2: Calculate the error vector of the nonlinear model ;

[0030] pass Calculate the error function W Y ; Further get the error vector for ; W Y is the optocoupler output error value of the Yth inner point;

[0031] R3: Calculate the Yth error W through the Jacobian matrix Y For the Zth parameter P Z The partial derivative J of

[0032] R4: Calculate the update vector ΔP; where ;

[0033] R5: Update the starting vector parameters , calculate the iterative vector parameters ;

[0034] in, ;

[0035] R6: Iteration vector parameter based Calculate the total iterative error G st ;

[0036] Right now: ;

[0037] R7: The iterative total error G st Compare with the total error G; get the optimization completion signal.

[0038] As a further solution of the present invention: the partial derivative J is calculated as follows:

[0039] ; Where Y is the sample index and Z is the parameter index.

[0040] As a further solution of the present invention: the iterative total error G st Compare with the total error G;

[0041] If the total iterative error G st is greater than or equal to the total error G; a rejection update signal is generated;

[0042] If the total iterative error G st Less than the total error G and greater than the total error threshold G y ; then generate an accept update signal;

[0043] If the total iterative error G st Less than or equal to the total error threshold G y ; then an optimization completion signal is generated; at this time, the optimal model parameters are output and marked as P1 * , P2 * ,…,P k * .

[0044] As a further solution of the present invention: based on the rejection update signal, the starting vector parameter is maintained Unchanged, increase the initial adjustment parameter λ st ;

[0045] Based on receiving update signal; maintain iteration vector parameters No change, reduce the initial adjustment parameter λ st ;

[0046] Based on the optimization completion signal; output the optimal model parameters and mark them as P1 * , P2 * ,…,P k * .

[0047] As a further embodiment of the present invention: in said R1, .

[0048] As a further solution of the present invention: In the calculation process of ΔP in R4, λ st =λ.

[0049] Beneficial effects of the present invention:

[0050] In the present invention, by utilizing multi-scenario big data collection and performing model optimization, a nonlinear calibration model with high accuracy is constructed and obtained, and the unified calibration of the output value of the optocoupler can be completed quickly and efficiently;

[0051] Moreover, the calculated nonlinear benchmark model is more universal and can be applied to different calibration requirements. The nonlinear calibration model is constructed using an automated model to improve calibration efficiency. At the same time, the reference scene can bridge other scenes to achieve unified light output values. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The present invention will be further described below in conjunction with the accompanying drawings.

[0053] Figure 1 is a schematic diagram of the calibration method of the present invention;

[0054] Figure 2 It is a schematic diagram of a method for calculating the optimal model parameters in the present invention;

[0055] Figure 3 It is a program flowchart of an electronic device in Embodiment 4 of the present invention. DETAILED DESCRIPTION

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

[0057] See also Figure 1 As shown, the present invention is an automatic calibration method for an optical coupling sensor based on nonlinear optimization, comprising the following steps:

[0058] Obtain M devices to be calibrated, and collect the optocoupler output values ​​V for the fixed reference scene 1 and n-1 other scenes (such as n=2, 3, ..., N) respectively. 1m and V nm big data, obtain the sample set {(V 1m , V nm )};

[0059] For the sample set {(V 1m , V nm )}Use outlier elimination algorithm to process; obtain model optimization signal;

[0060] Based on the model optimization signal, the total error from the interior point to the nonlinear model is calculated;

[0061] Optimize the total error from the internal point to the nonlinear model; iteratively calculate the optimal model parameters that can achieve the minimum total error and mark them as P1 * , P2 * ,…,P k * ;

[0062] Based on the optimal model parameter P1 * , P2 * ,…,P k * ; Obtain nonlinear calibration model ;

[0063] For any new device, the optocoupler output value obtained in reference scenario 1 is V x , then the calibration values ​​in other scenarios are: .

[0064] By utilizing multi-scenario big data collection and performing model optimization, a nonlinear calibration model with high accuracy is constructed and obtained, and the unified calibration of the optocoupler output value can be completed quickly and efficiently; the calculated nonlinear reference model is more universal and can be applied to different calibration requirements. The nonlinear calibration model is constructed using an automated model to improve calibration efficiency. At the same time, the reference scene can bridge other scenes to achieve unified light output values; the calibration accuracy is better. Embodiment 2

[0065] See also Figure 1 As shown, the present invention is an automatic calibration method for an optical coupling sensor based on nonlinear optimization, comprising the following steps:

[0066] Step 1: Obtain M devices to be calibrated, and collect the optocoupler output value V for the fixed reference scene 1 and n-1 other scenes (such as n=2, 3, ..., N) respectively. 1m and V nm big data, obtain the sample set {(V 1m , V nm )}; Collecting the optocoupler output value data of all devices in all scenarios can improve the accuracy and robustness of model fitting;

[0067] It should be noted that the M devices refer to the total number of devices that need to be calibrated; the n scenarios include: 1 fixed reference scenario, i.e., scenario 1, and n-1 other different scenarios, i.e., reference scenarios 2 to 3;

[0068] The optocoupler output value indicates the optocoupler output value generated by the device in each scenario, and these output values ​​are used for subsequent model fitting;

[0069] Step 2: For the sample set {(V 1m , V nm )}Use outlier elimination algorithm for processing;

[0070] Specific:

[0071] S1: Randomly extract a subset of the sample set and use this subset to build a nonlinear model ; Among them, P1, P2, ..., Pk are model parameters that need to be evaluated;

[0072] S2: Apply the nonlinear model to all samples, calculate the number of sample points in the sample that fit the nonlinear model, that is, the number of internal points, and mark it as Y;

[0073] S3: Compare the number of inliers Y with the threshold value of inliers Yns;

[0074] If the number of inliers Y is greater than the threshold value of inliers Yns, a model optimization signal is obtained, and step 3 is executed to calculate the optimal model parameters using all inliers.

[0075] If the number of inliers Ys is less than or equal to the inliers threshold Yns, a model iteration signal is obtained, and step S1 is executed cyclically; that is, steps S1-S3 are repeated until a model parameter whose number of inliers is greater than the inliers threshold is found;

[0076] By removing abnormal data from the sample set, the robustness of the model, namely accuracy and stability, can be effectively improved;

[0077] Step 3: Based on the model optimization signal, calculate the total error from the interior point to the nonlinear model;

[0078] Specifically include:

[0079] H1: Get the inner point light output value and mark it as V nY ; Among them, V nY is the optocoupler output value of the Yth inner point;

[0080] Based on this nonlinear model Get parameter vector ;

[0081] H2: Based on parameter vector ;pass Calculate the total error G;

[0082] Step 4: Optimize the total error from the interior point to the nonlinear model; iteratively calculate the optimal model parameters that can achieve the minimum total error and mark it as P1 * , P2 * ,…,P k * ;

[0083] Reference Figure 2 As shown, specifically:

[0084] R1: Set the starting parameter values, including the starting vector parameters. and the initial tuning parameter λ st ;

[0085] at this time, ;

[0086] R2: Calculate the error vector of the nonlinear model ;

[0087] pass Calculate the error function W Y ; Further get the error vector for ; W Y is the optocoupler output error value of the Yth inner point; it should be noted that the error vector here is the transpose of the error function matrix;

[0088] R3: Calculate the Yth error W through the Jacobian matrix Y For the Zth parameter P Z The partial derivative J of

[0089] Right now ; Where Y is the sample index and Z is the parameter index;

[0090] R4: Calculate the update vector ΔP; where ; During the calculation of ΔP, λ st =λ;

[0091] R5: Update the starting vector parameters , calculate the iterative vector parameters ;

[0092] in, ;

[0093] R6: Iteration vector parameter based Calculate the total iterative error G st ;

[0094] Right now: ;

[0095] R7: The iterative total error G st Compare with the total error G;

[0096] If the total iterative error G st Greater than or equal to the total error G; Generate a rejection update signal; At this time, keep the starting vector parameter Unchanged, increase the initial adjustment parameter λ st ; Loop through step R3;

[0097] If the total iterative error G st Less than the total error G and greater than the total error threshold G y ; then generate an accept update signal; at this time, keep the iteration vector parameter No change, reduce the initial adjustment parameter λ st ; Loop through step R3;

[0098] If the total iterative error G st Less than or equal to the total error threshold G y ; then an optimization completion signal is generated; at this time, the optimal model parameters are output and marked as P1 * , P2 * ,…,P k * ; By adjusting the parameters through cyclic iteration and then calculating the update vector through the Jacobi formula, and then obtaining the iterative vector parameters, the model parameters can be optimized more efficiently and the accuracy of the nonlinear calibration model can be improved;

[0099] Step 5: Based on the optimal model parameter P1 * , P2 * ,…,P k * ; Obtain nonlinear calibration model ;

[0100] Step 6: For any new device, the optocoupler output value obtained under reference scenario 1 is V x , then the calibration values ​​in other scenarios are: .

[0101] In this solution, by utilizing multi-scenario big data collection and performing model optimization, a nonlinear calibration model with high accuracy is constructed and obtained, and the unified calibration of the optocoupler output value can be completed quickly and efficiently;

[0102] In addition, the calculated nonlinear benchmark model is more universal and can be applied to different calibration requirements. The nonlinear calibration model is constructed using an automated model to improve calibration efficiency. At the same time, the reference scene can bridge other scenes to achieve uniform light output values.

[0103] Embodiment 3

[0104] Based on the above embodiment, in step 4, the total error from the interior point to the nonlinear model is optimized, and the optimal model parameters that can achieve the minimum error are obtained through iterative calculation;

[0105] An embodiment is provided here to further illustrate the step; it specifically includes the following steps:

[0106] R1: Set the starting parameter values, including the starting vector parameters. and the initial tuning parameter λ st ;

[0107] at this time, ; In order to ensure the accuracy of calculation and optimization speed, the initial adjustment parameter λ st Usually it starts with a small value. In this embodiment, st Set to 0.1;

[0108] R2: Calculate the error vector of the nonlinear model ;

[0109] pass Calculate the error function W Y ; Further get the error vector for ; W Y is the optocoupler output error value of the Yth inner point; it should be noted that the error vector here is the transpose of the error function matrix;

[0110] R3: Calculate the Jacobian matrix J under the current starting parameter value;

[0111] Specific:

[0112] Calculate the Yth error W through the Jacobian matrix Y For the Zth parameter P Z The partial derivative of

[0113] Right now ; Where Y is the sample index and Z is the parameter index;

[0114] R4: Calculate the update vector ΔP; where ; During the calculation of ΔP, λ st =λ; I is the identity matrix;

[0115] R5: Update the starting vector parameters , calculate the iterative vector parameters ;

[0116] in, ;

[0117] R6: Iteration vector parameter based Calculate the total iterative error G st ;

[0118] Right now: ;

[0119] R7: The iterative total error G st Compare with the total error G;

[0120] If the total iterative error G st Greater than or equal to the total error G; Generate a rejection update signal; At this time, keep the starting vector parameter Unchanged, increase the initial adjustment parameter λ st ; Loop through step R3; then the initial adjustment parameter λ st Adjust from 0.1 to 0.5 or 1, etc., that is, increase by a certain multiple, and the size of the multiple can be selected and set by professionals based on calculation results and actual experience, so as to quickly obtain the optimal model parameters and shorten the optimization time;

[0121] If the total iterative error G st Less than the total error G and greater than the total error threshold G y ; then generate an accept update signal; at this time, keep the iteration vector parameter No change, reduce the initial adjustment parameter λ st ; Loop through step R3; Similarly, the initial adjustment parameter λ st Adjust from 0.1 to 0.05 or 0.01. Similarly, reduce by a certain multiple. This multiple can be set by professionals based on calculation results and actual experience to speed up the optimization time.

[0122] If the total iterative error G st Less than or equal to the total error threshold G y ; then an optimization completion signal is generated; at this time, the optimal model parameters are output and marked as P1 * , P2 * ,…,P k * .

[0123] By utilizing multi-scenario big data collection and performing model optimization, a nonlinear calibration model with high accuracy is constructed and obtained, and the unified calibration of the optocoupler output value can be completed quickly and efficiently; the calculated nonlinear reference model is more universal and can be applied to different calibration requirements. The nonlinear calibration model is constructed using an automated model to improve calibration efficiency. At the same time, the reference scene can bridge other scenes to achieve unified light output values; the calibration accuracy is better. Embodiment 4

[0124] The embodiment of the present invention further provides an electronic device, such as Figure 3 As shown, it includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.

[0125] Memory 303, used for storing computer programs;

[0126] The processor 301 is used to execute the program stored in the memory 303 to implement the following steps:

[0127] Obtain M devices to be calibrated, and collect the optocoupler output values ​​V for the fixed reference scene 1 and n-1 other scenes (such as n=2, 3, ..., N) respectively. 1m and V nm big data, obtain the sample set {(V 1m , V nm )};

[0128] For the sample set {(V 1m , V nm )}Use outlier elimination algorithm to process; obtain model optimization signal;

[0129] Based on the model optimization signal, the total error from the interior point to the nonlinear model is calculated;

[0130] Optimize the total error from the internal point to the nonlinear model; iteratively calculate the optimal model parameters that can achieve the minimum total error and mark them as P1 * , P2 * ,…,P k * ;

[0131] Based on the optimal model parameter P1 * , P2 * ,…,P k * ; Obtain nonlinear calibration model ;

[0132] For any new device, the optocoupler output value obtained in reference scenario 1 is V x , then the calibration values ​​in other scenarios are: .

[0133] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0134] The communication interface is used for communication between the above electronic device and other devices.

[0135] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0136] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0137] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned methods for automatic calibration of optical coupler sensors based on nonlinear optimization is implemented.

[0138] In another embodiment provided by the present invention, a computer program product including instructions is also provided. When the computer program product is run on a computer, the computer is enabled to execute any one of the automatic calibration methods for optical coupler sensors based on nonlinear optimization in the above embodiments.

[0139] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0140] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0141] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0142] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0144] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0145] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

[0146] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. An automatic calibration method for an optical coupler sensor based on nonlinear optimization, characterized in that: Obtain M devices to be calibrated, and collect the optocoupler output values ​​V for the fixed reference scene 1 and n-1 other scenes respectively. 1m and V nm big data, obtain the sample set {(V 1m , V nm )}; Collecting the optocoupler output value data of all devices in all scenarios can improve the accuracy and robustness of model fitting; For the sample set {(V 1m , V nm )}Use outlier elimination algorithm to process; obtain model optimization signal; Based on the model optimization signal, the total error from the interior point to the nonlinear model is calculated; Optimize the total error from the internal point to the nonlinear model; iteratively calculate the optimal model parameters that can achieve the minimum total error and mark them as P1 * , P2 * ,…,P k * ; Based on the optimal model parameter P1 * , P2 * ,…,P k * ; Obtaining a nonlinear calibration model For any new device, the optocoupler output value obtained in reference scenario 1 is V x , then the calibration values ​​in other scenarios are: The steps of processing the sample set using the outlier removal algorithm include: S1: Randomly extract a subset of the sample set and use this subset to build a nonlinear model V nm =f(V 1m ,P1,P2,…,P k ), where P1, P2, ..., Pk are all model parameters that need to be evaluated; S2: Apply the nonlinear model to all samples, calculate the number of sample points in the sample that fit the nonlinear model, that is, the number of internal points, and mark it as Y; S3: Compare the number of inliers Y with the threshold value of inliers Yns; The total error from the interior point to the nonlinear model is calculated as: H1: Get the inner point light output value and mark it as V nY ; Among them, V nY is the optocoupler output value of the Yth inner point; Based on the nonlinear model V nm =f(V 1m ,P1,P2,…,P k ) to get the parameter vector H2: Based on parameter vector pass Calculate the total error G; The optimal model parameters that achieve the minimum total error are calculated as follows: R1: Set the starting parameter values, including the starting vector parameters. and the initial tuning parameter λ st ; R2: Calculate the error vector of the nonlinear model By W Y =V nY -f(V 1Y ,P1,P2,…,P k ) Calculate the error function W Y ; Further get the error vector for W Y is the optocoupler output error value of the Yth inner point; R3: Calculate the Yth error W through the Jacobian matrix Y For the Zth parameter P Z The partial derivative J of R4: Calculate the update vector ΔP; where Where I is the identity matrix; R5: Update the starting vector parameters Calculate the iterative vector parameters in, R6: Iteration vector parameter based Calculate the total iterative error G st ; Right now: R7: The iterative total error G st Compare with the total error G to obtain the optimization completion signal; The R4 is used during the calculation of ΔPλ st =λ; In the R1, 2. The method for automatic calibration of an optical coupler sensor based on nonlinear optimization according to claim 1, characterized in that: In S3, if the number of inliers Y is greater than the inliers threshold Yns, a model optimization signal is obtained; If the number of internal points Ys is less than or equal to the internal point threshold Yns, a model iteration signal is obtained.

3. The method for automatic calibration of an optical coupler sensor based on nonlinear optimization according to claim 1, characterized in that: The partial derivative J is calculated as follows: Among them, Y is the sample index and Z is the parameter index.

4. The method for automatic calibration of an optical coupler sensor based on nonlinear optimization according to claim 1, characterized in that: The iterative total error G st Compare with the total error G; If the total iterative error G st Greater than or equal to the total error G; Generate a signal to reject the update; If the total iterative error G st Less than the total error G and greater than the total error threshold G y ; then generate an accept update signal; If the total iterative error G st Less than or equal to the total error threshold G y ; then an optimization completion signal is generated; at this time, the optimal model parameters are output and marked as P1 * , P2 * ,…,P k * .

5. The method for automatic calibration of optical coupling sensors based on nonlinear optimization according to claim 4, characterized in that: Based on the rejection of the update signal, the starting vector parameters are maintained Unchanged, increase the initial adjustment parameter λ st ; Based on receiving update signal; maintain iteration vector parameters No change, reduce the initial adjustment parameter λ st ; Based on the optimization completion signal; output the optimal model parameters and mark them as P1 * , P2 * ,…,P k * .

Citation Information

Patent Citations

  • Face recognition method and device

    CN110688901A

  • Global optimization coordinate mapping conversion method based on minimization of re-projection error

    CN117314735A