Optimization method for PLC control parameters of automatic acoustic device coil winding machine
By constructing a PLC control parameter optimization model for acoustic device coils, and using the CCD vision system to obtain real-time data, the problem of relying on experience in winding machine parameters adjustment is solved, efficient and accurate coil production is achieved, and production quality and efficiency are improved.
Patent Information
- Application Number
- CN202411351547.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the production process of acoustic device coils, the adjustment of PLC control parameters of existing automated winding machines depends on experience, resulting in low efficiency and difficulty in achieving optimal parameters. The production capacity is affected by mechanical fatigue and raw material fluctuations, making it difficult to achieve real-time control.
By constructing an optimization model based on 19 size parameters and 72 PLC control parameters of standard coils, real-time production data is obtained using the CCD vision system, and coils that deviate from normal are analyzed and screened out, the optimal PLC control parameter combination is output, and the winding is adjusted in real time is adjusted. Line machine control parameters.
The production quality and working efficiency of the winding machine are improved, the mass production yield of coils is not less than 95%, and the dimensional accuracy of coils is achieved is ±0.025mm.
Smart Images

Figure CN119225268A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of coil winding machines, and in particular to a method for optimizing PLC control parameters of an automated acoustic device coil winding machine. Background Art
[0002] The coil of an acoustic device is an important component of an acoustic device, and its performance directly affects the sound quality of the acoustic device. The coil winding machine for an acoustic device is a device used to produce coils for acoustic devices. The wire size of a small acoustic device coil is at the micron level, and the PLC control parameters of the automated winding machine have an important influence on the dimensional accuracy of the finished coil. The production of acoustic device coils uses a continuous flow automatic line with a daily output of about 50,000 units. The winding station is the first station of the assembly line. The output stability of the winding station will directly affect the production capacity of the entire automatic line, so winding is a key and difficult process in speaker production. During the production process, due to the influence of factors such as mechanical fatigue and raw materials, the PLC parameters of the winding machine need to be adjusted in real time according to the actual size changes of the coils it produces to reduce the appearance of defective products.
[0003] At present, there are the following problems in the production process of acoustic device coils:
[0004] 1. The debugger conducts debugging based on the on-site detection equipment data and the video captured by the high-definition camera. Due to the relative lack of quantitative data on the tightness of the cylinder and knob of the debugging machine, it is more dependent on the trial and error experience of the front-line personnel. The technology cannot be controlled in real time, and it is easy to cause the capacity of the entire production line to be affected due to the absence of key technical personnel on site.
[0005] 2. The debugger's debugging content includes the equipment PLC parameters, cylinder air pressure, and the tightness of the bending knob on the machine. However, due to the uncontrollable fluctuations in raw materials, the debugger needs to be on standby and constantly confirm the quality status, which results in low work efficiency and a certain impact on product yield.
[0006] The existing automatic winding machine requires a large number of experienced personnel to adjust the winding tension parameters on site repeatedly. This method is not only inefficient but also difficult to obtain the optimal parameters. Summary of the invention
[0007] In order to solve the problems existing in the prior art, the present invention provides a method for optimizing PLC control parameters of an automated acoustic device coil winding machine.
[0008] The technical solution adopted by the present invention to solve the technical problem is: a method for optimizing the PLC control parameters of an automated acoustic device coil winding machine, comprising the following steps:
[0009] S1, build parameter optimization model based on 19 size parameters of standard coil and 72 control parameters of PLC controller;
[0010] S2, using the CCD vision system to obtain the dimension parameter data set of the finished coil produced by the winding machine in real time;
[0011] S3, analyzing the size parameter data set to screen out coils that tend to deviate from normal;
[0012] S4, using the size parameter data set of the coil with a tendency to deviate from the normal state as an input signal of the parameter optimization model, and the parameter optimization model outputs an optimal PLC control parameter combination according to the input signal;
[0013] S5. Sending the optimal PLC control parameter combination to the PLC controller of the winding machine, and the PLC controller adjusts the control of the winding machine according to the optimal PLC control parameter combination.
[0014] Furthermore, step S1 specifically includes:
[0015] S1.1. Align the 19 size parameters and 72 control parameters according to the timestamp and product code to obtain an observation variable matrix, which is used as training data;
[0016] S1.2. Randomly extract four size parameters from the 19 size parameters of the training data to form a classification data set, the number of the classification data sets is m, m=134;
[0017] S1.3. Calculate the classification indices of the four size parameters in the classification data set, select the size parameter with the largest classification index value as the classification node, and divide the classification data set into a first subset and a second subset; calculate the classification indices of the four size parameters in the first subset and the second subset respectively, select the size parameter with the largest classification index value in the first subset as the classification node of the first subset, and divide the first subset into a third subset and a fourth subset; select the size parameter with the largest classification index value in the second subset as the classification node of the second subset, and divide the second subset into a fifth subset and a sixth subset; calculate the classification indices of the four size parameters in the third subset, the fourth subset, the fifth subset, and the sixth subset respectively, and repeat the above division process until the number of subsets is less than the set minimum data amount or the number of divisions reaches the maximum number of times, and then output a PLC control parameter combination corresponding to the classification data set;
[0018] S1.4, performing the process of step S1.3 on the m classified data sets respectively to obtain corresponding m PLC control parameter combinations;
[0019] That is, when 19 dimensional parameters are input into the parameter optimization model, the parameter optimization model can automatically output 72 optimized control parameters.
[0020] Furthermore, step S1 further includes:
[0021] S1.5, suppose the m PLC control parameter combinations are y i , i=1,2,…,m; the final output result is: in,
[0022] g i Represents y i The probability of occurrence in all combinations, ρ(i) represents the logarithmic loss value of the i-th PLC control parameter combination, ρ'(i) represents the value obtained after the maximum and minimum normalization of the logarithmic loss value, and 1-ρ'(i) represents the weight of the output result of the i-th classification data set.
[0023] Furthermore, the observed variable matrix is expressed as follows: the vertical direction represents the timestamp sequence, and the horizontal direction represents 19 size parameters and 72 control parameters corresponding to each timestamp; one product code corresponds to one observed variable matrix.
[0024] Furthermore, step S3 specifically includes:
[0025] Calculate the threshold Q1 and threshold Q3 corresponding to each size parameter according to the size parameter data of the standard coil;
[0026] Compare the collected real-time size parameter data set with thresholds Q1 and Q3;
[0027] If Q1≤the value of the dimension parameter≤Q3, the dimension parameter is judged to be within the standard range;
[0028] If there is a situation where the value of the size parameter is less than Q1 or the value of the size parameter is greater than Q3, it is judged that the size parameter has a tendency to deviate from the normal state;
[0029] When data of at least one dimension parameter among the 19 dimension parameters has a tendency to deviate from the normal state, the finished coil is judged to be a coil having a tendency to deviate from the normal state.
[0030] Furthermore, the CCD vision system includes a plurality of CCD cameras, which are respectively arranged at different positions of the winding machine to perform visual inspection on the finished coils from different angles; the size parameters of the coils can be calculated based on the collected CCD images.
[0031] Furthermore, step S4 specifically includes:
[0032] The dimension parameter data set of the coils that tend to deviate from the normal state is input into the constructed parameter optimization model, and the parameter optimization model performs an internal search based on the input dimension parameter data set to find the optimal PLC control parameter combination.
[0033] Furthermore, the classification indicator is information gain or Gini coefficient.
[0034] The beneficial effect of the present invention is that the optimization method of the PLC control parameters of the automatic acoustic device coil winding machine of the present invention can timely detect whether there is a coil with a tendency to deviate from the normal by performing real-time analysis on the size parameter data set, and can adjust and optimize the PLC control parameters by constructing a parameter optimization model to ensure the automatic production quality of the winding machine, which can not only improve the accuracy of the adjustment, but also improve the work efficiency. After field verification, when the winding machine reaches a coil batch production yield of not less than 95%, the dimensional accuracy of the coil batch production is ±0.025mm. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0036] Figure 1 It is a flow chart of the method for optimizing the PLC control parameters of the automatic acoustic device coil winding machine of the present invention.
[0037] Figure 2 It is a schematic diagram of the change of the dimensional data of the present invention due to mechanical fatigue of the winding machine.
[0038] Figure 3 It is a box plot of the quartiles of the present invention. DETAILED DESCRIPTION
[0039] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0040] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0041] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0042] like Figure 1 As shown, the method for optimizing the PLC control parameters of the automatic acoustic device coil winding machine of the present invention includes the following steps: S1. Constructing a parameter optimization model based on 19 size parameters of the standard coil and 72 control parameters of the PLC controller. S2. Using the CCD visual system to obtain the size parameter data set of the finished coils produced in real time by the winding machine. S3. Analyzing the size parameter data set to screen out coils that tend to deviate from the normal. S4. Using the size parameter data set of the coils that tend to deviate from the normal as the input signal of the parameter optimization model, the parameter optimization model outputs the optimal PLC control parameter combination according to the input signal. S5. Sending the optimal PLC control parameter combination to the PLC controller of the winding machine, the PLC controller adjusts the control of the winding machine according to the optimal PLC control parameter combination.
[0043] The present invention obtains the size parameter data set of the finished coil based on the CCD visual system, and promptly finds out whether there are coils that tend to deviate from the normal state. If so, the size parameter data of the coils that tend to deviate from the normal state are input into the parameter optimization model to optimize the PLC control parameters, and then the data is fed back to the PLC controller of the winding machine in real time to regulate the winding process. In this way, the deviation state can be corrected in time to reduce the occurrence of defective products. The present invention can automatically adjust the PLC control parameters of the winding machine in real time based on data drive, thereby improving the qualified rate of the finished coils. With this method, there is no need for the debugger to be on standby on site all the time, which is conducive to improving the work efficiency and accuracy of debugging.
[0044] It should be noted that the CCD vision system includes multiple CCD cameras, which are respectively set at different positions of the winding machine to perform visual inspection on the finished coil from different angles. The size parameters of the coil can be calculated based on the collected CCD images. The coil image taken by the CCD camera is processed, and the size parameters of the coil can be marked and saved. The winding machine performs winding according to the currently set PLC control parameters. The CCD camera collects the size parameter data set of the finished coil at a certain sampling frequency (for example, 1s), and the sensor collects the PLC control parameter data set at a certain sampling frequency (for example, 4s). Since there are 19 size parameters of the acoustic device coil (for example, coil length, coil width, number of coil turns, etc.), and there are 72 PLC control parameters (for example, height speed, coil transmission speed, rotation speed, etc.), they are complex data relationships. That is, the 72 PLC control parameters must be able to make the 19 size parameters of the finished coil meet the production quality requirements. If manual debugging is adopted, the 72 control parameters need to be debugged one by one during debugging, which is time-consuming and laborious. The present invention constructs a parameter optimization model, takes 19 size parameters as input signals and 72 control parameters as outputs, and can realize automatic optimization and adjustment of PLC control parameters.
[0045] It should be noted that coils that tend to deviate from the normal state are still within the range of qualified products, but there will be a certain deviation from the size parameters of the standard coils. If the deviation from the normal state is left unchecked, the finished coils produced by the winding machine will become unqualified products. Therefore, the optimization method of the present invention is actually to detect the state change of the winding machine in advance and try to avoid the appearance of unqualified products.
[0046] Specifically, construct a parameter optimization model, including:
[0047] S1.1. According to the timestamp and product code, 19 size parameters and 72 control parameters are aligned to obtain the observation variable matrix, which is used as training data.
[0048] It should be noted that the training data is the size parameter data of the standard coil and the corresponding control parameter data. For example, within a period of time, the size parameter data set and the control parameter data set are collected at a certain sampling frequency. Each data has a corresponding timestamp and product code. The data with the same product code are first screened out (including size parameters and control parameters), and then the size parameters and control parameters are aligned according to the timestamp. The obtained observation variable matrix is shown in Table 1. The expression form of the observation variable matrix is: the vertical direction represents the timestamp sequence, and the horizontal direction represents the 19 size parameters and 72 control parameters corresponding to each timestamp; one product code corresponds to one observation variable matrix. In other words, at the same timestamp, there is a corresponding relationship between the 19 size parameter data combinations and the 72 control parameter data combinations. The observation face changing matrix is obtained as the training data of the parameter optimization model, in which 19 size parameters are used as the input of the parameter optimization model, and 72 control parameters are used as the output of the parameter optimization model. 80% of the training data is used as the training set, and 20% is used as the validation set. The output accuracy of the trained parameter optimization model is more than 95%.
[0049] Table 1
[0050]
[0051] S1.2. Randomly select four size parameters from the 19 size parameters of the training data to form a classification data set. The number of classification data sets is m, where m=134.
[0052] In order to improve the stability and generalization ability of the parameter optimization model for data processing, the present invention performs minimum and maximum normalization or standardization on the training data. The present invention selects data of four size parameters randomly to form a classification data set because Each extraction is performed with replacement, and a total of 134 classification data sets are set. That is, there may be completely / partially identical classification data sets in these 134 classification data sets. The extraction method of the present invention helps to reduce the variance of the model, making the parameter optimization model more stable when optimizing new data, and can also reduce the impact of the correlation between size parameters on model performance.
[0053] Since the application scenario data volume of the present invention is large, increasing the number of classification data sets can improve the optimization performance of the model. However, the number of classification data sets cannot be increased blindly, otherwise it will cause the model to run too long and increase the risk of overfitting. Therefore, the present invention sets 134 classification data sets, which is conducive to reducing the risk of overfitting and improving the generalization ability of the model.
[0054] S1.3. Calculate the classification indices of the four size parameters in the classification data set, select the size parameter with the largest classification index value as the classification node, and divide the classification data set into a first subset and a second subset; calculate the classification indices of the four size parameters in the first subset and the second subset respectively, select the size parameter with the largest classification index value in the first subset as the classification node of the first subset, and divide the first subset into a third subset and a fourth subset; select the size parameter with the largest classification index value in the second subset as the classification node of the second subset, and divide the second subset into a fifth subset and a sixth subset; calculate the classification indices of the four size parameters in the third subset, the fourth subset, the fifth subset, and the sixth subset respectively, and repeat the above division process until the number of subsets is less than the set minimum data amount or the number of divisions reaches the maximum number of times, and then output a PLC control parameter combination corresponding to the classification data set.
[0055] It should be noted that the classification data set contains multiple values of four size parameters. The classification indicators of the four size parameters in the classification data set are calculated respectively, and the classification indicators are, for example, information gain or Gini coefficient. Taking information gain as an example, the information entropy is calculated: H(D) = -∑ d∈D p(d)logp(d), D represents the set of control parameter combinations, and p(d) represents the probability that the dth control parameter combination appears in the set D. Calculate the average information entropy: H(DA) = ∑ a∈A p(a)H(D a ), D a represents the sample set whose size parameter A takes the value of a, and p(a) represents the probability that the size parameter takes the value of a. Calculate the information gain: IG(D,A) = H(D) - H(DA).
[0056] That is, the four size parameters can calculate their own information gain values, and the size parameter with the largest information gain value is selected as the classification node. For example, assuming that the four size parameters are C1, C2, C3, and C4, and the size parameters C1, C2, C3, and C4 each contain 100 values, and the information gain value of the size parameter C1 is calculated to be the largest, then the size parameter C1 is used as the classification node. During classification, the data is divided according to the threshold set for the size parameter C1. For example, the value range of the size parameter C1 is 0-1, and the set threshold is 0.5. Then, according to C1<0.5 and C1≥0.5, the data of the four size parameters are divided into two subsets. The number contained in the first subset and the second subset is different, but each subset still contains the data of C1, C2, C3, and C4. The probability of each data appearing will change. Therefore, when the information gain values of the four size parameters in the first subset are recalculated, the information gain values of the size parameters in the subset will change. The information gain values of the four size parameters of the first and second subsets are calculated, and the size parameter with the largest information gain value is still selected as the classification node (this classification node may be changed to C2, C3 or C4, or it may still be C1). Then continue to divide the first and second subsets according to their respective classification nodes, and so on, until the data volume of a subset after classification is less than the set minimum data volume or the number of classifications reaches the maximum value. After the classification is completed, the classified data set outputs a PLC control parameter combination.
[0057] S1.4, respectively perform the process of step S1.3 on the m classified data sets to obtain corresponding m PLC control parameter combinations. That is, one classified data set can obtain one PLC control parameter combination. Some of the m PLC control parameter combinations may be the same.
[0058] S1.5, suppose the m PLC control parameter combinations are y i , i=1,2,…,m; the final output result is: g i Represents y i The probability of occurrence in all combinations, ρ(i) represents the logarithmic loss value of the i-th PLC control parameter combination, ρ'(i) represents the value obtained after the maximum and minimum normalization of the logarithmic loss value, and 1-ρ'(i) represents the weight of the output result of the i-th classification data set.
[0059] It should be noted that, since each classified data set has obtained a PLC control parameter combination, but the parameter optimization model can only output an optimal PLC control parameter combination in the end, it is necessary to integrate and process the m PLC control parameter combinations. The present invention does not simply average all PLC control parameter combinations to obtain the final output PLC control parameter combination, but calculates the logarithmic loss value ρ(i) of each PLC control parameter combination. The smaller the logarithmic loss value, the more accurate the current PLC control parameter combination is. However, since the logarithmic loss value ranges from 0 to +∞, if the logarithmic loss value itself is used directly, it is not conducive to the evaluation result. Therefore, the present invention performs maximum and minimum normalization processing on the logarithmic loss value ρ(i), so that the logarithmic loss value can be transformed into the range of [0, 1], and uses 1-ρ'(i) as the weight of the corresponding PLC control parameter combination, and outputs the final result Y. In this way, the accuracy of the final result can be improved. The larger the result of the logarithmic loss calculation formula is, the worse the result is. Therefore, the present invention first normalizes the loss value to 0-1 by normalization, and then uses the difference of 1-ρ'(i) to represent the reliability of the result output by the current classification data set, thereby improving the reliability of the final output result.
[0060] Furthermore, since each classified data set of the present invention will be classified multiple times, in order to improve the accuracy, the loss assessment of the current classification result can also be performed at each classification, and finally the average value of m results is calculated to obtain the final result. However, since the data of the application scenario of the present invention is very complex, there are 134 classified data sets, and each classified data set needs to be classified multiple times. If the loss assessment is performed at each classification, the amount of calculation is huge. Therefore, the present invention chooses to perform a loss assessment on the output result of each classified data set, and then obtains the final output result, which is conducive to reducing the amount of calculation and improving the operation speed of the parameter optimization model.
[0061] That is, when 19 size parameters are input into the parameter optimization model, the parameter optimization model can automatically output the optimized 72 control parameters. The parameter optimization model of the present invention constructs m classified data sets to output a PLC control parameter combination respectively, which reduces the risk of overfitting and improves the generalization ability of the model compared with using only one data set. Since the data in each classified data set are randomly extracted and independent of each other, the parameter optimization model has good robustness and stability, especially for the multi-dimensional complex data scenario of the present invention.
[0062] It should be noted that when the present invention is applied, the dimensional parameter data collected in real time by the CCD visual system is analyzed, and normal coils and coils with a tendency to deviate from the normal can be distinguished. For example, the reasonable numerical range of a certain dimensional parameter is 0.37-0.4, and most of the data are between 0.375-0.39, which belongs to the standard size range. It is also considered a qualified product outside this standard range but within a reasonable range, but it shows that there is a tendency to deviate from the normal. At this time, the PLC control parameters need to be adjusted. If there are coils that tend to deviate from the normal, it indicates that the control parameters of the current PLC controller are unreasonable and need to be adjusted. For the analysis of coil size parameter data, the method adopted by the present invention is: based on the size parameter data of the standard coil, the threshold Q1 and the threshold Q3 corresponding to each size parameter are calculated; the collected real-time size parameter data set is compared with the threshold Q1 and the threshold Q3; if Q1≤the value of the size parameter≤Q3, it is judged that the size parameter is within the standard range; if there is a situation where the value of the size parameter is <Q1 or the value of the size parameter is >Q3, it is judged that the size parameter has a tendency to deviate from the normal; when the data of at least one size parameter among the 19 size parameters have deviations and are all qualified, the current finished coil is judged to be a normal coil; otherwise, it is a coil with a tendency to deviate from the normal.
[0063] It should be noted that the main factor for the coils to deviate from the normal trend is the mechanical fatigue of the winding machine. That is, with the same control command given to the winding machine, as the running time increases, the actual feedback of the winding machine (such as rotation speed, etc.) may deviate, resulting in changes in the coil size. For example, the size parameter data set collected over a period of time is divided into OK data and NG data. It is found that the changes in the size parameter data are normally distributed (such as Figure 2 As shown in the figure, the NG data are on both sides of the OK data and overlap with the OK data. The NG data on the left and right sides represent that the size parameters measured by the CCD have upper and lower limits, which are unqualified if exceeded. The overlap between the NG data and the OK data indicates that the evolution from the OK data to the NG data is a gradual process rather than a sudden change. Utilizing this feature, the present invention uses the method of combining the upper and lower quartiles of the OK data for judgment. Any data exceeding the upper and lower quartiles is regarded as a deviation of the mechanical characteristics of the winding machine from the normal state, and the PLC control parameters need to be re-optimized. That is, the threshold Q1=n / 4, the threshold Q3=3n / 4, and n represents the total number of data.
[0064] It should be noted that the quartile judgment method used in the present invention is based on the mechanical fatigue characteristics of the winding machine, and is not a judgment method selected at random. For example, if the Grubbs test method is used, this method can only detect one outlier at a time. If the data set is concentrated and there are multiple outliers, Grubbs must remove the outliers one by one and then repeat the test. This approach will consume a lot of computing resources and is easy to lose. In addition, when there are multiple outliers, the first outlier detected may cover up the existence of other outliers, resulting in inaccurate judgment results. For example, if the 3σ principle is used for judgment, the 3σ principle (μ±3σ) is based on the assumption of normal distribution, and uses the mean μ and standard deviation σ to identify outliers. If there are significant outliers or outliers, these values will affect the calculated values of the mean and standard deviation, resulting in constant changes in the judgment principle and inaccurate final judgment results. Therefore, the selection of quartiles in the present invention is based on comprehensive considerations. On the one hand, it can meet the mechanical fatigue characteristics of the winding machine and accurately determine abnormal values; on the other hand, the quartiles only need to be calculated once to determine which are abnormal values (i.e., values that deviate from the standard range), which can improve calculation efficiency.
[0065] After the coils with a tendency to deviate from the normal are identified, the dimension parameter data set of the coils with a tendency to deviate from the normal is input into the parameter optimization model. The parameter optimization model performs an internal search based on the input dimension parameter data set to find the optimal PLC control parameter combination. For example, if a dimension parameter opt1 is within a reasonable range but exceeds the standard range, after the dimension parameter is input into the parameter optimization model, the trained parameter optimization model will adjust the relevant PLC control parameters based on the correlation between the dimension parameter and the PLC control parameter, so that the value of the dimension parameter opt1 is close to the standard value.
[0066] The following example illustrates that the winding machine X is affected by fatigue characteristics, and the PLC control parameters need to be adjusted in real time. The CCD vision system collects 19 dimensional parameters (respectively recorded as ccd_Y1~ccd_Y19) of the finished coils of the winding machine X, and different sensors collect PLC control parameters (V1~V72). The dimensional parameter data and PLC control parameters are aligned according to the timestamp to obtain Table 2. A total of 1120991 PLC data were collected at a sampling frequency of 4s, and a total of 398080 valid data were collected at a sampling frequency of 1s. Exactly the same samples may appear during the collection process and need to be deleted. The processed data is judged by quartiles to screen out dimensional parameters that tend to deviate from the normal. The quartiles calculated for each dimensional parameter are as follows Figure 3 As shown, the values exceeding the upper and lower thresholds are deviation values, for example, the size parameter ccd_Y4 has a deviation value, and the size parameter ccd_Y18 has a deviation value.
[0067] Table 2
[0068] ccd_Y1 ccd_Y2 ccd_Y3 ... ccd_19 V1 V2 V3 ... V72 0.3760 0.3720 0.3610 ... -0.0050 47 -0.0850 10 ... 0 0.3660 0.3850 0.3790 ... -0.0010 47 -0.0850 10 ... 0 0.3770 0.3730 0.3640 ... -0.0060 47 -0.0850 10 ... 0 0.3680 0.3920 0.3690 ... 0.0040 47 -0.0850 10 ... 0 ... ... ... ... ... ... ... ... ... ... 0.3650 0.3980 0.3700 ... 0.0120 47 -0.0850 10 ... 0
[0069] The dimension parameter data of the coils that tend to deviate from the normal state are input into the constructed parameter optimization model. The parameter optimization model outputs the optimized PLC control parameter combination and sends it to the PLC controller to adjust the working state of the winding machine X.
[0070] In summary, the optimization method of the PLC control parameters of the automatic acoustic device coil winding machine of the present invention can timely detect whether there are coils that tend to deviate from the normal state by performing real-time analysis on the size parameter data set, and can adjust and optimize the PLC control parameters by constructing a parameter optimization model, so as to prevent in advance and reduce the occurrence of defective products, thereby ensuring the automatic production quality of the winding machine, and not only improving the accuracy of the adjustment, but also improving the work efficiency. After field verification, when the winding machine reaches a coil batch production yield of not less than 95%, the dimensional accuracy of the coil batch production is ±0.025mm.
[0071] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A method for optimizing the PLC control parameters of an automated acoustic device coil winding machine, characterized in that: The following steps are involved: S1, build parameter optimization model based on 19 size parameters of standard coil and 72 control parameters of PLC controller; S2, using the CCD vision system to obtain the dimension parameter data set of the finished coil produced by the winding machine in real time; S3, analyzing the size parameter data set to screen out coils that tend to deviate from normal; S4, using the size parameter data set of the coil with a tendency to deviate from the normal state as an input signal of the parameter optimization model, and the parameter optimization model outputs an optimal PLC control parameter combination according to the input signal; S5. Sending the optimal PLC control parameter combination to the PLC controller of the winding machine, and the PLC controller adjusts the control of the winding machine according to the optimal PLC control parameter combination.
2. The method for optimizing the PLC control parameters of the automatic acoustic device coil winding machine according to claim 1, characterized in that: Step S1 specifically includes: S1.
1. Align the 19 size parameters and 72 control parameters according to the timestamp and product code to obtain an observation variable matrix, which is used as training data; S1.
2. Randomly extract four size parameters from the 19 size parameters of the training data to form a classification data set, the number of the classification data sets is m, m=134; S1.
3. Calculate the classification indices of the four size parameters in the classification data set, select the size parameter with the largest classification index value as the classification node, and divide the classification data set into a first subset and a second subset; calculate the classification indices of the four size parameters in the first subset and the second subset respectively, select the size parameter with the largest classification index value in the first subset as the classification node of the first subset, and divide the first subset into a third subset and a fourth subset; select the size parameter with the largest classification index value in the second subset as the classification node of the second subset, and divide the second subset into a fifth subset and a sixth subset; calculate the classification indices of the four size parameters in the third subset, the fourth subset, the fifth subset, and the sixth subset respectively, and repeat the above division process until the number of subsets is less than the set minimum data amount or the number of divisions reaches the maximum number of times, and then output a PLC control parameter combination corresponding to the classification data set; S1.4, performing the process of step S1.3 on the m classified data sets respectively to obtain corresponding m PLC control parameter combinations; That is, when 19 dimensional parameters are input into the parameter optimization model, the parameter optimization model can automatically output 72 optimized control parameters.
3. The method for optimizing the PLC control parameters of the automatic acoustic device coil winding machine according to claim 2, characterized in that: Step S1 also includes: S1.5, suppose the m PLC control parameter combinations are y i , i=1,2,…,m; the final output result is: in, g i Represents y i The probability of occurrence in all combinations, ρ(i) represents the logarithmic loss value of the i-th PLC control parameter combination, ρ'(i) represents the value obtained after the maximum and minimum normalization of the logarithmic loss value, and 1-ρ'(i) represents the weight of the output result of the i-th classification data set.
4. The method for optimizing the PLC control parameters of the automatic acoustic device coil winding machine according to claim 2, characterized in that: The observed variable matrix is expressed as follows: the vertical direction represents the timestamp sequence, and the horizontal direction represents the 19 size parameters and 72 control parameters corresponding to each timestamp; one product code corresponds to one observed variable matrix.
5. The method for optimizing the PLC control parameters of the automatic acoustic device coil winding machine according to claim 1, characterized in that: Step S3 specifically includes: Calculate the threshold Q1 and threshold Q3 corresponding to each size parameter according to the size parameter data of the standard coil; Compare the collected real-time size parameter data set with thresholds Q1 and Q3; If Q1≤the value of the dimension parameter≤Q3, the dimension parameter is judged to be within the standard range; If there is a situation where the value of the size parameter is less than Q1 or the value of the size parameter is greater than Q3, it is judged that the size parameter has a tendency to deviate from the normal state; When data of at least one dimension parameter among the 19 dimension parameters has a tendency to deviate from the normal state, the finished coil is judged to be a coil having a tendency to deviate from the normal state.
6. The method for optimizing the PLC control parameters of the automatic acoustic device coil winding machine according to claim 1, characterized in that: The CCD vision system includes a plurality of CCD cameras, which are respectively arranged at different positions of the winding machine to perform visual inspection on the finished coils from different angles; the size parameters of the coils can be calculated based on the collected CCD images.
7. The method for optimizing the PLC control parameters of the automatic acoustic device coil winding machine according to claim 3, characterized in that: Step S4 specifically includes: The dimension parameter data set of the coils that tend to deviate from the normal state is input into the constructed parameter optimization model, and the parameter optimization model performs an internal search based on the input dimension parameter data set to find the optimal PLC control parameter combination.
8. The method for optimizing the PLC control parameters of the automatic acoustic device coil winding machine according to claim 2, characterized in that: The classification indicator is information gain or Gini coefficient.
Citation Information
Patent Citations
Hyper-parameter adjustment method and device, equipment and storage medium
CN111814965A
Start control parameter optimization method and system of direct drive motor
CN117155171A
