A PLC control method and system for automatic mixing production line
By collecting and analyzing the speed and vibration data of the stirring motor in the automatic mixing production line in real time, the problem of low accuracy in speed sensor fault detection is solved, achieving higher accuracy in fault detection and lower calculation amount.
Patent Information
- Application Number
- CN202411932336.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The PLC control method of the existing automatic mixing production line has low accuracy in fault detection, mainly due to the low accuracy of the data acquisition of the speed sensor and is susceptible to electromagnetic interference and mechanical stress.
By collecting the speed data and vibration data of the stirring motor in real time, analyzing the fluctuations and correlations within the time range, combining the peak change trend and the characteristics of the response period, determining the fluctuations and correlations of the speed data and vibration data, and then detecting the fault condition of the speed sensor.
The accuracy of speed sensor fault detection of PLC during the control of the speed of the stirring motor is improved, the calculation amount is reduced, and the fluctuation amplitude and peak change trend of vibration data and speed data are fully considered.
Smart Images

Figure CN119356207B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of PLC control technology, and in particular to a PLC control method and system for an automatic mixing production line. Background Art
[0002] The automatic mixing production line is a highly automated production system, which is mainly used to mix different raw materials in a specific ratio to produce products that meet the requirements. The mixer is the core equipment of the automatic mixing production line, which is responsible for mixing various raw materials to produce uniform products. In the PLC control of the automatic mixing production line, each stirring motor is usually equipped with a speed sensor. The speed sensor monitors the speed of the motor in real time, and feeds the speed signal back to the PLC for adjustment to ensure the stability and uniformity of the mixing process.
[0003] However, when the speed sensor of the stirring motor fails, the PLC may receive an erroneous speed signal and fail to accurately monitor the stirring speed, resulting in the actual stirring speed not being consistent with the set speed. Existing methods often detect faults in the speed sensor of the stirring motor by monitoring the rate of change of the rotational speed. If the rotational speed changes sharply in a short period of time, it is determined that the speed sensor has failed. However, electromagnetic interference in the working environment of the mixer and impacts such as collision of raw materials during the mixing process will produce instantaneous mechanical stress, which will interfere with the speed sensor, resulting in low accuracy of the speed sensor's collected data, and thus low accuracy of the speed sensor's fault detection. Summary of the invention
[0004] In view of the above, it is necessary to provide a PLC control method and system for an automatic mixing production line. Compared with the traditional PLC control method of an automatic mixing production line, the PLC of the automatic mixing production line improves the accuracy of fault detection of the speed sensor in the process of controlling the speed of the stirring motor:
[0005] In a first aspect, an embodiment of the present application provides a PLC control method for an automatic mixing production line, the method comprising the following steps:
[0006] Real-time collection of the speed and vibration data of the stirring motor of the mixer in the automatic mixing production line;
[0007] Based on the changes in all speed data, a time range for analyzing speed sensor failure is obtained, and based on the fluctuations of all peak values and all valley values in the speed data and vibration data within the time range, and the change trends of all peak values, the degree of fluctuation of the speed data and vibration data within the time range is determined respectively;
[0008] Determine the degree of correlation between the rotational speed data and the vibration data within the time range based on the correlation between the rotational speed data and the vibration data within the time range, and the difference in the degree of fluctuation therebetween, and in combination with the difference in the acquisition time of the corresponding peak values therebetween;
[0009] The time period between two consecutive PLC control instructions is used as the response period of the previous control instruction. Based on the time taken for the speed of the stirring motor to reach the set speed of the instruction after each PLC control instruction is issued, as well as the speed change, the response severity of the response period of each control instruction is determined;
[0010] Based on the time intervals between response periods with similar response severity and the differences in the fluctuations of the vibration data between them, and in combination with the correlation degree, determining the degree of fluctuation regularity of the rotation speed data within the time range;
[0011] Based on the difference between the rotation speed data and the vibration data within the time range, combined with the degree of fluctuation regularity, determining the abnormality degree of the rotation speed data within the time range;
[0012] Based on the abnormality level, the speed sensor failure condition of the automatic mixing production line's PLC during the process of controlling the speed of the stirring motor is detected.
[0013] In one embodiment, the method for acquiring the time range is: performing peak detection on all the collected rotation speed data to acquire the time range corresponding to a preset number of consecutive peak values adjacent to the current moment.
[0014] In one embodiment, the process of determining the degree of fluctuation is as follows:
[0015] Arranging the preset number of consecutive peaks in time sequence to form a peak sequence;
[0016] Arrange all the speed data and all the vibration data within the time range in time sequence to form a speed subsequence and a vibration subsequence respectively;
[0017] The expression for the fluctuation degree of the speed data within the time range is:
[0018] ; Wherein, V represents the fluctuation degree of the speed data within the time range; represents the difference between the i-th peak value and its adjacent valley value in the speed subsequence; N represents the number of peak values in the speed data within the time range; M represents the number of speed data within the time range; h represents the absolute value of the mean of all data in the first-order difference sequence of the peak sequence;
[0019] For the vibration data within the time range, the fluctuation degree of the vibration data within the time range is calculated according to the same calculation method as the fluctuation degree of the rotation speed data within the time range.
[0020] In one embodiment, the process of determining the correlation degree is:
[0021] The correlation between the speed subsequence and the vibration subsequence is recorded as serial correlation;
[0022] Arrange the order of all peak values in the speed subsequence in the speed subsequence and the order of all peak values in the vibration subsequence in the vibration subsequence in time sequence to form a first moment sequence and a second moment sequence, respectively, and record the distance between the first moment sequence and the second moment sequence as the time distance;
[0023] The difference between the fluctuation degree of the rotation speed data and the fluctuation degree of the vibration data within the time range is recorded as the fluctuation difference;
[0024] The degree of correlation is respectively inversely proportional to the fluctuation difference and the time distance, and is directly proportional to the sequence correlation.
[0025] In one embodiment, the expression of the response severity is: ; In the formula, Indicates the severity of the response during the response period of the zth control instruction; Indicates the moment when the speed of the stirring motor reaches the speed set by the zth control instruction of the PLC; Indicates the time when the PLC issued the zth control instruction; Indicates the speed of the stirring motor when the PLC issues the zth control instruction; Indicates the speed set by the PLC's zth control instruction.
[0026] In one embodiment, the process of determining the degree of fluctuation regularity is as follows:
[0027] Acquire clusters of all response periods within the time range based on the severity of the response;
[0028] Based on the time intervals between different response periods in each cluster and the differences in the fluctuations of the vibration data between them, the fluctuation similarity values of each cluster are determined;
[0029] Calculate the product of the fluctuation similarity value and the silhouette coefficient of each cluster;
[0030] The degree of the fluctuation regularity is positively correlated with the product of all clusters, and is also positively correlated with the degree of correlation.
[0031] In one embodiment, the process of determining the fluctuation similarity value is as follows:
[0032] Based on the vibration data in each response period, the degree of fluctuation of the vibration data in each response period is calculated in the same way as the degree of fluctuation of the rotation speed data within the time range;
[0033] The expression of the fluctuation similarity value of each cluster is:
[0034] ; In the formula, represents the fluctuation similarity value of the b-th cluster; represents the number of response periods in the b-th cluster; represents the time interval between the sth response period and the pth response period in the bth cluster; , They represent the fluctuation degree of vibration data in the sth and pth response periods in the bth cluster respectively; represents the number of vibration data in the sth response period in the bth cluster.
[0035] In one embodiment, the process of determining the abnormality degree is:
[0036] A dynamic time warping algorithm is used to obtain similar points of each data point in the speed subsequence and the distance between each data point in the speed subsequence and its similar point in the vibration subsequence, and the normalized values of the distances between all data points in the speed subsequence and their similar points are arranged in time sequence to form a matching distance sequence of the speed subsequence;
[0037] The data in the matching distance sequence that are continuously greater than a preset distance threshold constitute a main interval, thereby obtaining each main interval;
[0038] The expression of the abnormality degree is:
[0039] ; Wherein, Y and G represent the abnormality degree and fluctuation regularity degree of the speed data within the time range respectively; Z represents the number of main intervals in the matching distance sequence of the speed subsequence; N represents the number of data in the longest main interval in the matching distance sequence of the speed subsequence; exp() represents an exponential function with a natural constant as the base.
[0040] In one embodiment, the method for detecting the fault condition of the speed sensor is as follows: when the abnormality degree of the rotational speed data within the time range is greater than or equal to a preset abnormality degree threshold, the speed sensor at the current moment is determined to be faulty; otherwise, the speed sensor at the current moment is determined to be normal.
[0041] In the second aspect, an embodiment of the present application also provides a PLC control system for an automatic mixing production line, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of the PLC control method for an automatic mixing production line described in any one of the above items are implemented.
[0042] This application has at least the following beneficial effects:
[0043] The present application obtains a time range for analyzing a speed sensor fault based on changes in all speed data, and determines the degree of fluctuation of the speed data and vibration data within the time range based on fluctuations of all peak values and all valley values in the speed data and vibration data within the time range, as well as the change trend of all peak values; only speed data and vibration data close to the current moment are analyzed, which reduces the amount of calculation, and fully considers the fluctuation amplitude of vibration data and speed data, as well as the change trend of peak values in vibration data and speed data, thereby improving the accuracy of analyzing the degree of fluctuation of speed data and vibration data;
[0044] Further, based on the correlation between the rotational speed data and the vibration data within the time range, and the difference in the degree of fluctuation therebetween, and in combination with the difference in the acquisition time of the corresponding peak values, the degree of correlation between the rotational speed data and the vibration data within the time range is determined; from the aspects of the correlation between the rotational speed data and the vibration data, the difference in the degree of fluctuation, and the difference in the time when the peak values in the rotational speed data and the vibration data appear, the degree of correlation between the rotational speed data and the vibration data within the time range is comprehensively analyzed, thereby improving the accuracy of analyzing the degree of correlation;
[0045] Further, based on the time taken for the speed of the stirring motor to reach the set speed of the instruction after each control instruction of the PLC is issued, and the size of the speed change, the response intensity of the response time period of each control instruction is determined; based on the time interval between response time periods with similar response intensity, and the difference in the fluctuation of the vibration data between them, and in combination with the correlation degree, the degree of regularity of the fluctuation of the speed data within the time range is determined; on the basis of analyzing the correlation degree between the vibration data and the speed data within a large range of time, the regularity of the speed data fluctuation within the time range is analyzed in combination with the fluctuation of the speed data and the vibration data in the local time period of each control instruction response of the PLC, thereby improving the accuracy of the analysis of the regularity of the speed data fluctuation;
[0046] Furthermore, based on the difference between the rotational speed data and the vibration data within the time range, combined with the degree of fluctuation regularity, the abnormality of the rotational speed data within the time range is determined; and based on the abnormality, fault detection is performed on the speed sensor; taking into account that the speed sensor may be affected by electromagnetic interference and mechanical stress generated by impacts such as collisions during the mixing process, by analyzing the degree of difference between the rotational speed data and the vibration data, as well as the continuous length of the difference, it is avoided to judge the interference of external factors on the speed sensor as a failure of the speed sensor itself, thereby improving the accuracy of fault detection of the speed sensor by the PLC of the automatic mixing production line when controlling the speed of the stirring motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0048] Figure 1 A flowchart of a PLC control method for an automatic mixing production line provided in one embodiment of the present application;
[0049] Figure 2 A schematic diagram of the process for determining the degree of relevance;
[0050] Figure 3 The figure is a flowchart for obtaining the abnormality degree. DETAILED DESCRIPTION
[0051] In the description of the embodiments of the present application, words such as "exemplary", "or", "for example" and the like are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "or", "for example" and the like is intended to present related concepts in a concrete manner.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art in the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. It should be understood that, unless otherwise specified, " / " means or.
[0053] It should also be noted that the terms "first" and "second" in the present application are used to distinguish similar objects rather than to describe a specific order or sequence.
[0054] The following is a detailed description of a specific solution of a PLC control method and system for an automatic mixing production line provided by the present application in conjunction with the accompanying drawings.
[0055] See also Figure 1 , which shows a step flow chart of a PLC control method for an automatic mixing production line provided by an embodiment of the present application, the method comprising the following steps:
[0056] Step 1: collect the speed data and vibration data of the stirring motor of the mixer of the automatic mixing production line in real time.
[0057] In the polyvinyl chloride (PVC) mixing production line, the stirring motor will vibrate during operation, and this vibration will be transmitted to the speed sensor. Long-term vibration may cause the electronic components inside the speed sensor to loosen and be damaged, affecting the measurement accuracy of the speed sensor. When the speed sensor of the stirring motor fails, it may cause the uniformity of the stirring process to decrease, so it is necessary to perform fault detection on the speed sensor of the stirring motor.
[0058] During the operation of the mixer, a speed sensor is used to collect the speed data of the stirring motor in real time. At the same time, a vibration sensor is used to collect the vibration data of the stirring motor in real time. All the collected speed data and vibration data are arranged in time sequence to form a speed sequence and a vibration sequence.
[0059] In this embodiment, when the rotation speed data and vibration data are collected, the collection time interval is 10s. The value of the collection time interval is preset manually and can be set by the implementer. This application does not impose any special restrictions.
[0060] In order to avoid the influence of different dimensions on the subsequent data processing results, the speed series and vibration series are normalized respectively.
[0061] In this embodiment, the Min-Max normalization method is used to normalize the speed sequence and the vibration sequence respectively. As other implementation methods, on the basis of being able to realize the normalization of the speed sequence and the vibration sequence respectively, the implementer may use other existing technologies to normalize the speed sequence and the vibration sequence respectively, such as the Z-Score normalization method, the decimal calibration normalization method, etc., and this application does not make any special restrictions.
[0062] Step 2: Based on the changes in all speed data, obtain the time range for analyzing the speed sensor failure condition; based on the fluctuations of all peak values and all valley values in the speed data and vibration data within the time range, and the change trends of all peak values, respectively determine the degree of fluctuation of the speed data and vibration data within the time range.
[0063] Under normal circumstances, the speed of the mixer's stirring motor changes little over time. The reason is that in the process of mixing polyvinyl chloride, various raw materials need to be fully mixed to obtain uniform product quality. Therefore, the stirring motor usually needs to run at a relatively stable speed to continuously and evenly stir the materials. However, when the speed sensor of the stirring motor fails, the PLC cannot accurately obtain the speed of the stirring motor, resulting in the inability to accurately mix materials according to the formula requirements.
[0064] The peak value of the speed sequence of the stirring motor is detected, and the preset number of consecutive peak values adjacent to the current moment are arranged in time sequence to form a peak sequence, and the time between the minimum acquisition moment and the maximum acquisition moment corresponding to the peak sequence is used as the time range for analyzing the speed sensor failure. All speed data and all vibration data within the time range are arranged in time sequence to form a speed subsequence and a vibration subsequence.
[0065] In this embodiment, MATLAB's findpeaks function is used to perform peak detection on the speed sequence. The minimum distance between peaks in the findpeaks function is set to 100 seconds to reduce the interference of noise on peak extraction and avoid some abnormal values from being identified as peaks; when the speed sequence is subjected to valley detection, the input of the findpeaks function is the negative value of all speed data in the speed sequence, and the output peak value is the negative value of the valley value in the speed sequence; as other implementation methods, on the basis of being able to perform peak and valley detection on the speed sequence, the implementer may use other existing technologies to perform peak and valley detection on the speed sequence, such as peak and valley detection algorithm, extreme point detection algorithm, etc., and this application does not impose any special restrictions.
[0066] In this embodiment, the value of the preset number is 100. The value of the preset number is preset manually and can be set by the implementer. This application does not impose any special restrictions.
[0067] Since the number of peaks in the rotation speed data within the time range is fixed, if the number of rotation speed data within the time range is small, it means that the time interval between the peaks is shorter and the fluctuation degree of the rotation speed data within the time range is more drastic.
[0068] Based on the fluctuation of all peak values and all valley values in the speed data within the time range, the change trend of all peak values, and the amount of speed data within the time range, the fluctuation degree of the speed data within the time range is determined, and the expression is:
[0069] ; Wherein, V represents the fluctuation degree of the speed data within the time range; represents the difference between the i-th peak value and its adjacent valley value in the speed subsequence; N represents the number of peak values in the speed data within the time range; M represents the number of speed data within the time range; h represents the absolute value of the mean of all data in the first-order difference sequence of the peak sequence.
[0070] In this embodiment, the difference between each peak value in the speed subsequence and its adjacent previous valley value is calculated. As another implementation, the implementer may also calculate the difference between each peak value in the speed subsequence and its adjacent next valley value.
[0071] It should be noted that: the greater the difference between the peak value and the adjacent valley value, the greater the fluctuation of the speed data within the time range; the smaller the amount of speed data within the time range, the shorter the time interval between the peak values in the speed data within the time range, and the greater the fluctuation; the larger the absolute value, the more unstable the change of the peak value in the speed data within the time range, the more likely it is that a violent fluctuation or mutation will occur, and the greater the fluctuation.
[0072] For the vibration data within the time range and the peak values and valley values therein, the fluctuation degree of the vibration data within the time range is calculated using the same calculation method as the fluctuation degree of the rotation speed data within the time range.
[0073] Step 3, based on the correlation between the rotational speed data and the vibration data within the time range, and the difference in the degree of fluctuation therebetween, and combined with the difference in the acquisition time of the corresponding peak values, determine the degree of correlation between the rotational speed data and the vibration data within the time range.
[0074] Under normal circumstances, the motor speed runs relatively stably within a certain range. If the speed gradually increases without any change in the control command, it may be that the sensor outputs an erroneous high speed signal. At the same time, the vibration of the stirring motor has a certain correlation with the speed. If there is a problem with the speed sensor, the correlation between the two will decrease.
[0075] Based on the above analysis, based on the correlation between the speed subsequence and the vibration subsequence, and the difference in the degree of fluctuation between them, and combined with the difference in the corresponding acquisition time between the peak value in the speed subsequence and the peak value in the vibration subsequence, the correlation degree between the speed data and the vibration data within the time range is determined, and the expression is:
[0076] ; Wherein, R represents the correlation between the speed data and the vibration data within the time range; r represents the correlation between the speed subsequence and the vibration subsequence; V represents the fluctuation degree of the speed data within the time range; Indicates the degree of fluctuation of the vibration data within the time range; the order of all peak values in the speed subsequence in the speed subsequence and the order of all peak values in the vibration subsequence in the vibration subsequence are arranged in time sequence to form a first moment sequence and a second moment sequence, respectively, and D represents the distance between the first moment sequence and the second moment sequence.
[0077] In this embodiment, the correlation between the speed subsequence and the vibration subsequence is the Pearson correlation coefficient. As other implementation methods, on the basis of being able to measure the correlation between the speed subsequence and the vibration subsequence, the implementer may use other existing technologies to measure the correlation between the speed subsequence and the vibration subsequence, such as the Spearman correlation coefficient, the Kendall rank correlation coefficient, etc., and this application does not impose any special restrictions.
[0078] In this embodiment, the distance between the first moment sequence and the second moment sequence is the DTW distance. As other implementation methods, on the basis of being able to measure the distance between the first moment sequence and the second moment sequence, the implementer may use other existing technologies for measurement, such as Euclidean distance, Manhattan distance, etc., and this application does not impose any special restrictions.
[0079] It should be noted that the smaller the correlation between the speed subsequence and the vibration subsequence, the greater the difference in fluctuation degree. The larger the value is and the larger the distance between the first time sequence and the second time sequence is, the less similar the change trend of the speed data and the change trend of the vibration data in the time range are, and the lower the correlation between the speed data and the vibration data in the time range is. Figure 2 shown.
[0080] Step 4, take the time period between two consecutive PLC control instructions as the response period of the previous control instruction, and determine the severity of the response period of each control instruction based on the time it takes for the stirring motor to reach the set speed of the instruction after each control instruction is issued by the PLC, as well as the change in speed.
[0081] Based on the analysis of vibration data and speed data over a large time range, the characteristics of vibration data and speed data in a local period of each PLC control instruction response are further combined to determine the regularity of the speed data fluctuation within the time range.
[0082] As the core of the control system, PLC is responsible for receiving input signals, executing control logic and outputting control commands. It then receives the control signal of PLC through the frequency converter, adjusts the voltage and frequency output to the mixing motor, and thus controls the motor speed. The control system makes the motor speed regular during normal operation, and the mixing motor, as the power source of the mixer, has a direct impact on the mixing result of the materials.
[0083] During the operation of the mixer, the PLC will adjust the mixer speed by outputting instructions according to the mixing process requirements to ensure that the materials are mixed under optimal conditions. Therefore, within the time range, the PLC will output control instructions multiple times to adjust the speed of the stirring motor to the speed set by the control instruction.
[0084] Each control instruction corresponds to a response period, and the time period between the time when each control instruction is issued and the time when the next control instruction is issued is used as the response period of each control instruction.
[0085] Based on the time it takes for the stirring motor to reach the set speed of the command after each control command is issued by the PLC, as well as the speed change, the intensity of the response period of each control command is determined, and the expression is:
[0086] ; In the formula, Indicates the severity of the response during the response period of the zth control instruction; Indicates the moment when the speed of the stirring motor reaches the speed set by the zth control instruction of the PLC; Indicates the time when the PLC issued the zth control instruction; Indicates the speed of the stirring motor when the PLC issues the zth control instruction; Indicates the speed set by the PLC's zth control instruction.
[0087] It should be noted that: It indicates the response time of the stirring motor after the zth control instruction of the PLC is issued. The shorter the response time and the greater the speed change, the greater the response intensity.
[0088] Step 5: Based on the time intervals between response periods with similar response severity and the differences in vibration data fluctuations between them, and in combination with the correlation degree, determine the degree of fluctuation regularity of the rotation speed data within the time range.
[0089] Step 5.1, obtaining clusters of all response time periods within the time range based on the response severity; determining the fluctuation similarity value of each cluster based on the time intervals between different response time periods in each cluster and the differences in fluctuations of vibration data therebetween.
[0090] Furthermore, based on the intensity of the response, a clustering algorithm is used to cluster all the response periods within the time range to obtain clusters. The intensity of the response of all the response periods in each cluster is relatively close, and the speed fluctuation of the mixer is similar. At the same time, if the fluctuation degree of the vibration data of the stirring motor in all the response periods in the same cluster is also relatively close, it means that the control system of the mixer has high stability. The greater the degree of fluctuation regularity, the less likely the speed sensor is to fail.
[0091] In this embodiment, the K-Means algorithm is used to cluster all response time periods, wherein the clustering distance is the absolute value of the difference in the response severity between the response time periods. As other implementation methods, on the basis of being able to cluster all response time periods, the implementer may use other existing technologies to cluster all response time periods, such as the Density Peak Clustering Algorithm (DPC), the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm, etc., and this application does not impose any special restrictions.
[0092] Based on the time intervals between different response periods in each cluster and the differences in the fluctuations of the vibration data, the fluctuation similarity values of each cluster are determined, and the expression is:
[0093] ; In the formula, represents the fluctuation similarity value of the b-th cluster; represents the number of response periods in the b-th cluster; represents the time interval between the sth response period and the pth response period in the bth cluster; , They represent the fluctuation degree of vibration data in the sth and pth response periods in the bth cluster respectively; represents the number of vibration data in the sth response period in the bth cluster. The method for calculating the fluctuation degree of the vibration data in each response period is as follows: based on the vibration data in each response period and the peak and valley values therein, the fluctuation degree of the vibration data in each response period is calculated in the same way as the fluctuation degree of the speed data within the time range.
[0094] It should be noted that: the shorter the time interval between the sth response period and the pth response period, the more continuous the sth response period and the pth response period are in time, and the higher the data credibility; the more the number of vibration data in the sth response period, the larger the time range it can cover, and the higher the credibility; the fluctuation similarity value of each cluster reflects the similarity of the vibration data in the time period with similar motor speed fluctuation within the time range. The larger the fluctuation similarity value of the cluster, the more similar the fluctuation degree of the vibration data in the response period, and the greater the regularity of the fluctuation of each cluster.
[0095] Step 5.2, based on the correlation degree, the fluctuation similarity value, and the silhouette coefficient of each cluster, obtain the degree of fluctuation regularity of the rotation speed data within the time range.
[0096] The expression for the degree of fluctuation regularity of the speed data within the time range is:
[0097] ; Wherein, G represents the degree of fluctuation regularity of the speed data within the time range; R represents the degree of correlation between the speed data and the vibration data within the time range; f represents the number of clusters within the time range; represents the fluctuation similarity value of the b-th cluster; The silhouette coefficient of the bth cluster is the average of the silhouette coefficients of all elements in the bth cluster. The calculation of the silhouette coefficient of each element in each cluster is a well-known technique and will not be described in detail in this application.
[0098] It should be noted that: the larger the fluctuation similarity value of the b-th cluster, the more similar not only the fluctuation of the motor speed in the response period of the b-th cluster, but also the fluctuation degree of the vibration data is similar, and the higher the degree of fluctuation regularity of all response periods in the b-th cluster. The silhouette coefficient is an important indicator for evaluating clustering quality. The larger it is, the more credible the features of the b-th cluster are.
[0099] Step 6: Based on the difference between the rotation speed data and the vibration data within the time range and in combination with the degree of fluctuation regularity, determine the abnormality degree of the rotation speed data within the time range.
[0100] Electromagnetic interference in the working environment of the mixer and impacts such as collisions during the PVC mixing process will produce instantaneous mechanical stress, which will interfere with the sensor and affect the confidence level of the fluctuation regularity. However, this interference is random and the probability of occurring simultaneously in different types of sensors is low.
[0101] The dynamic time warping algorithm is used to obtain the similarity of each data point in the speed subsequence and the distance between each data point in the speed subsequence and its similar point in the vibration subsequence. The normalized values of the distances between all data points in the speed subsequence and their similar points are arranged in time series to form a matching distance sequence of the speed subsequence.
[0102] In this embodiment, the Min-Max normalization method is used to normalize the distance between the data point and its similar point. As other implementation methods, on the basis of being able to realize the normalization of the distance between the data point and its similar point, the implementer can adopt other existing technologies, such as the Z-Score normalization method, the decimal calibration normalization method, etc., and this application does not make any special restrictions.
[0103] Furthermore, a distance threshold is set, and data in the matching distance sequence of the speed subsequence that is greater than the distance threshold is recorded as a reference distance.
[0104] In this embodiment, the value of the distance threshold is 0.6. The value of the distance threshold is preset manually and can be set by the implementer. This application does not impose any special restrictions.
[0105] Two or more consecutive reference distances in the matching distance sequence of the rotation speed subsequence constitute a main interval, and each main interval in the matching distance sequence of the rotation speed subsequence is obtained.
[0106] Since noise such as electromagnetic interference is random, short-lived and discontinuous, the possibility of the speed data within the time range being interfered by noise is obtained based on the number of main intervals in the matching distance sequence of the speed subsequence and the length of each main interval. Further, based on the possibility of the speed data within the time range being interfered by noise, the degree of fluctuation regularity of the speed data within the time range is adjusted to obtain the abnormality of the speed data within the time range, thereby improving the accuracy of fault detection.
[0107] The expression for the abnormal degree of the speed data within the time range is:
[0108] ; Wherein, Y and G represent the abnormality degree and fluctuation regularity degree of the speed data within the time range respectively; Z represents the number of main intervals in the matching distance sequence of the speed subsequence; N represents the number of data in the longest main interval in the matching distance sequence of the speed subsequence; exp() represents an exponential function with a natural constant as the base.
[0109] It should be noted that the more main intervals there are and the fewer data in each main interval, the more it conforms to the characteristics of noise. is the possibility that the speed data is interfered by noise within the time range. The greater the possibility, the lower the possibility that the speed sensor fails, that is, the smaller the abnormality. The schematic diagram of the abnormality degree acquisition process is as follows: Figure 3 shown.
[0110] Step 7: Based on the abnormality level, detect the fault condition of the speed sensor when the PLC of the automatic mixing production line controls the speed of the stirring motor.
[0111] Different PVC formulas have specific requirements for stirring speed. The normal operation of the speed sensor is the key to achieving accurate batching and mixing. If the sensor fails, the stirring speed may deviate from the set value, affecting the mixing ratio and reaction degree between the ingredients, resulting in the final product failing to meet the formula requirements and quality standards.
[0112] Furthermore, an abnormality threshold is set. When the abnormality of the rotation speed data within the time range is greater than or equal to the abnormality threshold, the speed sensor at the current moment is determined to be faulty. Otherwise, the speed sensor at the current moment is determined to be normal.
[0113] In this embodiment, the value of the abnormality threshold is 0.7. The value of the abnormality threshold is preset manually and can be set by the implementer. This application does not impose any special restrictions.
[0114] After the PLC detects a fault, it activates the safety interlock system to prevent other related equipment from continuing to operate in the fault state. For example, it stops the feeding system to prevent too much raw material from entering the mixer that cannot be stirred normally; it closes the discharge valve to prevent the flow of insufficiently mixed materials. At the same time, the fault information is sent to the operators and maintenance personnel in the control room.
[0115] Based on the same inventive concept as the above method, an embodiment of the present application also provides a PLC control system for an automatic mixing production line, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the steps of any one of the above-mentioned PLC control methods for an automatic mixing production line are implemented.
[0116] In summary, the present application obtains a time range for analyzing a speed sensor fault based on changes in all speed data, and determines the degree of fluctuation of the speed data and vibration data within the time range based on fluctuations of all peak values and all valley values in the speed data and vibration data within the time range, as well as the change trend of all peak values; only speed data and vibration data close to the current moment are analyzed, which reduces the amount of calculation, and fully considers the fluctuation amplitude of vibration data and speed data, as well as the change trend of peak values in vibration data and speed data, thereby improving the accuracy of analyzing the degree of fluctuation of speed data and vibration data;
[0117] Further, based on the correlation between the rotational speed data and the vibration data within the time range, and the difference in the degree of fluctuation therebetween, and in combination with the difference in the acquisition time of the corresponding peak values, the degree of correlation between the rotational speed data and the vibration data within the time range is determined; from the aspects of the correlation between the rotational speed data and the vibration data, the difference in the degree of fluctuation, and the difference in the time when the peak values in the rotational speed data and the vibration data appear, the degree of correlation between the rotational speed data and the vibration data within the time range is comprehensively analyzed, thereby improving the accuracy of analyzing the degree of correlation;
[0118] Further, based on the time taken for the speed of the stirring motor to reach the set speed of the instruction after each control instruction of the PLC is issued, and the size of the speed change, the response intensity of the response time period of each control instruction is determined; based on the time interval between response time periods with similar response intensity, and the difference in the fluctuation of the vibration data between them, and in combination with the correlation degree, the degree of regularity of the fluctuation of the speed data within the time range is determined; on the basis of analyzing the correlation degree between the vibration data and the speed data within a large range of time, the regularity of the speed data fluctuation within the time range is analyzed in combination with the fluctuation of the speed data and the vibration data in the local time period of each control instruction response of the PLC, thereby improving the accuracy of the analysis of the regularity of the speed data fluctuation;
[0119] Furthermore, based on the difference between the rotational speed data and the vibration data within the time range, combined with the degree of fluctuation regularity, the abnormality of the rotational speed data within the time range is determined; and based on the abnormality, fault detection is performed on the speed sensor; taking into account that the speed sensor may be affected by electromagnetic interference and mechanical stress generated by impacts such as collisions during the mixing process, by analyzing the degree of difference between the rotational speed data and the vibration data, as well as the continuous length of the difference, it is avoided to judge the interference of external factors on the speed sensor as a failure of the speed sensor itself, thereby improving the accuracy of fault detection of the speed sensor by the PLC of the automatic mixing production line when controlling the speed of the stirring motor.
[0120] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
[0121] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the basic features of the present application. Therefore, no matter from which point of view, the above embodiments of the present application should be regarded as exemplary and non-restrictive.
Claims
1. A PLC control method for an automatic mixing production line, characterized in that: The method comprises the following steps: Real-time collection of the speed and vibration data of the stirring motor of the mixer in the automatic mixing production line; Based on the changes in all speed data, a time range for analyzing speed sensor failure is obtained, and based on the fluctuations of all peak values and all valley values in the speed data and vibration data within the time range, and the change trends of all peak values, the degree of fluctuation of the speed data and vibration data within the time range is determined respectively; Determine the degree of correlation between the rotational speed data and the vibration data within the time range based on the correlation between the rotational speed data and the vibration data within the time range, and the difference in the degree of fluctuation therebetween, and in combination with the difference in the acquisition time of the corresponding peak values therebetween; The time period between two consecutive PLC control instructions is used as the response period of the previous control instruction. Based on the time taken for the speed of the stirring motor to reach the set speed of the instruction after each PLC control instruction is issued, as well as the speed change, the response severity of the response period of each control instruction is determined; Based on the time intervals between response periods with similar response severity and the differences in the fluctuations of the vibration data between them, and in combination with the correlation degree, determining the degree of fluctuation regularity of the rotation speed data within the time range; Based on the difference between the rotation speed data and the vibration data within the time range, combined with the degree of fluctuation regularity, determining the abnormality degree of the rotation speed data within the time range; Based on the abnormality level, the speed sensor failure condition of the automatic mixing production line's PLC during the process of controlling the speed of the stirring motor is detected.
2. A PLC control method for an automatic mixing production line as claimed in claim 1, characterized in that: The method for acquiring the time range is: performing peak detection on all the collected rotation speed data to acquire the time range corresponding to a preset number of consecutive peak values adjacent to the current moment.
3. A PLC control method for an automatic mixing production line as claimed in claim 2, characterized in that: The process of determining the degree of fluctuation is as follows: Arranging the preset number of consecutive peaks in time sequence to form a peak sequence; Arrange all the speed data and all the vibration data within the time range in time sequence to form a speed subsequence and a vibration subsequence respectively; The expression for the fluctuation degree of the speed data within the time range is: ; Wherein, V represents the fluctuation degree of the speed data within the time range; represents the difference between the i-th peak value and its adjacent valley value in the speed subsequence; N represents the number of peak values in the speed data within the time range; M represents the number of speed data within the time range; h represents the absolute value of the mean of all data in the first-order difference sequence of the peak sequence; For the vibration data within the time range, the fluctuation degree of the vibration data within the time range is calculated using the same calculation method as the fluctuation degree of the rotation speed data within the time range.
4. A PLC control method for an automatic mixing production line as claimed in claim 3, characterized in that: The process of determining the degree of correlation is as follows: The correlation between the speed subsequence and the vibration subsequence is recorded as serial correlation; Arrange the order of all peak values in the speed subsequence in the speed subsequence and the order of all peak values in the vibration subsequence in the vibration subsequence in time sequence to form a first moment sequence and a second moment sequence, respectively, and record the distance between the first moment sequence and the second moment sequence as the time distance; The difference between the fluctuation degree of the rotation speed data and the fluctuation degree of the vibration data within the time range is recorded as the fluctuation difference; The degree of correlation is respectively inversely proportional to the fluctuation difference and the time distance, and is directly proportional to the sequence correlation.
5. The PLC control method for an automatic mixing production line according to claim 1, characterized in that: The expression of the severity of the response is: ; In the formula, Indicates the severity of the response during the response period of the zth control instruction; Indicates the moment when the speed of the stirring motor reaches the speed set by the zth control instruction of the PLC; Indicates the time when the PLC issued the zth control instruction; Indicates the speed of the stirring motor when the PLC issues the zth control instruction; Indicates the speed set by the PLC's zth control instruction.
6. A PLC control method for an automatic mixing production line as claimed in claim 3, characterized in that: The process of determining the degree of the fluctuation regularity is as follows: Acquire clusters of all response periods within the time range based on the severity of the response; Based on the time intervals between different response periods in each cluster and the differences in the fluctuations of the vibration data between them, the fluctuation similarity values of each cluster are determined; Calculate the product of the fluctuation similarity value and the silhouette coefficient of each cluster; The degree of the fluctuation regularity is positively correlated with the product of all clusters, and is also positively correlated with the degree of correlation.
7. A PLC control method for an automatic mixing production line as claimed in claim 6, characterized in that: The process of determining the fluctuation similarity value is as follows: Based on the vibration data in each response period, the degree of fluctuation of the vibration data in each response period is calculated in the same way as the degree of fluctuation of the rotation speed data within the time range; The expression of the fluctuation similarity value of each cluster is: ; In the formula, represents the fluctuation similarity value of the b-th cluster; represents the number of response periods in the b-th cluster; represents the time interval between the sth response period and the pth response period in the bth cluster; , They represent the fluctuation degree of vibration data in the sth and pth response periods in the bth cluster respectively; represents the number of vibration data in the sth response period in the bth cluster.
8. A PLC control method for an automatic mixing production line as claimed in claim 4, characterized in that: The process of determining the abnormality degree is as follows: A dynamic time warping algorithm is used to obtain similar points of each data point in the speed subsequence and the distance between each data point in the speed subsequence and its similar point in the vibration subsequence, and the normalized values of the distances between all data points in the speed subsequence and their similar points are arranged in time sequence to form a matching distance sequence of the speed subsequence; The data in the matching distance sequence that are continuously greater than a preset distance threshold constitute a main interval, thereby obtaining each main interval; The expression of the abnormality degree is: ; Wherein, Y and G represent the abnormality degree and fluctuation regularity degree of the speed data within the time range respectively; Z represents the number of main intervals in the matching distance sequence of the speed subsequence; N represents the number of data in the longest main interval in the matching distance sequence of the speed subsequence; exp() represents an exponential function with a natural constant as the base.
9. The PLC control method for an automatic mixing production line according to claim 1, characterized in that: The method for detecting the fault condition of the speed sensor is as follows: when the abnormality degree of the rotation speed data within the time range is greater than or equal to a preset abnormality degree threshold, the speed sensor at the current moment is determined to be faulty; otherwise, the speed sensor at the current moment is determined to be normal.
10. A PLC control system for an automatic mixing production line, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the PLC control method for an automatic mixing production line as described in any one of claims 1-9 are implemented.
Citation Information
Patent Citations
Online analysis method and system for precision machine tool spindle
CN118559503A
Data analysis method for fault prediction and health management of automobile electronic control system
CN118655882A