Stacked bottle filling control method and system integrating image and photoelectric sensors

Through the multi-source data acquisition and data fusion technology of integrated image and photoelectric sensors, all-round monitoring and status evaluation of tablets and bottling equipment is achieved, solving the problem of insufficient control accuracy of lamination bottling in the existing technology, and significantly improving production Efficiency and product quality.

CN119271976BActive Publication Date: 2025-02-25NANJING BISUNMIT INTELLIGENT TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411817782.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-02-25
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

The prior art lacks control accuracy during the lamination bottling process, making it difficult to adapt to ambient light interference and equipment vibration changes, resulting in unstable tablet stacking, separation and low bottling efficiency.

Method used

Using an integrated image and photoelectric sensor method, the comprehensive monitoring and status evaluation of tablets and bottling equipment is achieved through multi-source data acquisition, visual feature extraction and data fusion. This method includes signal processing, state evaluation and control strategy optimization to ensure coordinated optimization and real-time adjustment of control instructions.

Benefits of technology

It significantly improves the control accuracy and reliability of the laminated bottling system, improves production efficiency and product quality, and maintains a stable control effect especially under high-speed production conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271976B_ABST
    Figure CN119271976B_ABST
Patent Text Reader

Abstract

The present invention provides a stacking bottling control method and system integrating image and photoelectric sensors, including: obtaining signals collected by photoelectric sensor array, pressure sensor and vibration sensor, filtering and time alignment processing, and obtaining a multi-source synchronous data matrix; preprocessing and feature extraction of images collected by visual cameras to obtain visual reference data; based on the multi-source synchronous data matrix and visual reference data, evaluating the vibration, track and speed state of the equipment to obtain a mechanism state vector; analyzing the separation, posture and stacking state of tablets to obtain a tablet state vector; generating and optimizing speed control, timing control and synchronization control instructions according to the mechanism state vector and the tablet state vector; and evaluating the control effect in real time and performing parameter optimization. Through multi-sensor data fusion and multi-level control strategy optimization, the control accuracy and stability of the bottling process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an industrial control system and method, in particular to a stacking bottle control method and system integrating an image and a photoelectric sensor. Background Art

[0002] In today's pharmaceutical industry, automation level and control accuracy directly affect product quality and production efficiency. With the rapid development of the pharmaceutical industry, the market has put forward higher requirements for drug packaging quality and production efficiency, especially for fragile and easy-to-stick thin tablets, which need to be transported at high speed and stability while ensuring the integrity of the tablets. For example, it is very difficult to stack them into bottles. Therefore, the development of a high-precision and high-reliability stacking bottling control system has important engineering value and economic significance. The traditional manual bottling method is not only inefficient, but also prone to tablet contamination and damage, and can no longer meet the development needs of the modern pharmaceutical industry.

[0003] At present, the industry has developed a variety of automatic control systems. Early control systems mainly relied on a single sensor for tablet detection, such as using a photoelectric sensor to detect the status of tablets, or using a visual system to identify the position of tablets. With the development of technology, simple multi-sensor combination solutions have begun to be used, such as the use of photoelectric sensors and pressure sensors, but there is a lack of effective data fusion mechanism between sensors. In terms of control strategy, PID control based on fixed parameters or simple fuzzy control methods are mainly used. The controller parameters often require manual debugging and are difficult to adapt to changes in working conditions. State assessment mainly relies on threshold judgment methods, which cannot accurately identify complex changes in tablet states.

[0004] After research, the following problems still exist: at the signal processing level, the existing high-pass filtering method uses a fixed cutoff frequency and cannot adapt to the dynamic changes of ambient light interference; in the wavelet denoising process of vibration signals, the threshold selection lacks an adaptive mechanism, which easily causes the loss of useful signals. In terms of state evaluation, the separation state judgment only considers instantaneous characteristics and ignores the timing relationship of state transfer; the stacking state evaluation lacks a comprehensive analysis of dynamic characteristics such as pressure change rate and acceleration. In terms of control strategy, speed control, timing control and synchronous control are independent of each other and lack a collaborative optimization mechanism; the coupling relationship between multiple objectives is not considered during the optimization of control parameters, making it difficult to achieve global optimal control. The existing technology still has problems in the control of the stacking bottling process and cannot meet the needs. The system is prone to problems such as missed detection, false detection, and insufficient control accuracy under high-speed operation conditions, which affects the bottling efficiency and product quality. Summary of the invention

[0005] The purpose of the invention is to provide a stacking bottle control method and system integrating image and photoelectric sensors, in order to solve at least one technical problem existing in the prior art.

[0006] The technical solution provides a stacking bottling control method integrating image and photoelectric sensors, comprising the following steps:

[0007] Step S1, obtaining signals collected by a photoelectric sensor, a pressure sensor and a vibration sensor, performing filtering and time alignment processing, and obtaining a multi-source synchronous data matrix;

[0008] Step S2, obtaining the original image data collected by the visual camera; performing preprocessing, edge feature extraction and posture parameter calculation to obtain visual feature data; fusing the visual feature data with the multi-source synchronous data matrix to obtain visual reference data;

[0009] Step S3, based on the multi-source synchronous data matrix and the visual reference data; analyzing the vibration characteristics, track state and running speed of the equipment to obtain the evaluation results of the vibration state, track state and speed state; combining the evaluation results of each state to obtain the mechanism state vector;

[0010] Step S4, based on the multi-source synchronous data matrix and the visual reference data; analyzing the separation state, posture state and stacking state of the tablets to obtain corresponding state indicators; comprehensively evaluating each state indicator and the mechanism state vector to obtain the tablet state vector;

[0011] Step S5, according to the mechanism state vector and the tablet state vector; calculate the feeding speed compensation value, trigger time and synchronization parameters, obtain the speed control instruction, timing control instruction and synchronization control instruction; coordinately optimize each control instruction to obtain the control instruction vector.

[0012] According to one aspect of the present application, step S1 specifically comprises:

[0013] Step S11, obtaining a first signal matrix collected by the photoelectric sensor array, performing a convolution operation on each signal value of the first signal matrix and a preset high-pass filter function to obtain a second signal matrix;

[0014] Step S12, obtaining first pressure data collected by the pressure sensor, filtering the first pressure data through a low-pass filter to obtain second pressure data;

[0015] Step S13, acquiring first vibration data collected by the vibration sensor, performing wavelet decomposition and reconstruction on the first vibration data, and obtaining second vibration data;

[0016] Step S14: synchronously process the second signal matrix, the second pressure data and the second vibration data according to a preset time alignment algorithm to obtain a multi-source synchronous data matrix.

[0017] According to one aspect of the present application, step S2 is specifically:

[0018] Step S21, obtaining the original image data and the multi-source synchronous data matrix collected by the visual camera; graying the original image data and performing Gaussian filtering with a preset convolution kernel to obtain a preprocessed image;

[0019] Step S22, applying an adaptive threshold segmentation algorithm to the preprocessed image to perform edge extraction to obtain an edge feature matrix;

[0020] Step S23, calculating the position and posture parameters of the tablet according to the edge feature matrix to obtain a position and posture feature vector;

[0021] Step S24: perform data fusion operation on the edge feature matrix and the posture feature vector with the multi-source synchronous data matrix to obtain visual reference data.

[0022] According to one aspect of the present application, step S3 is specifically:

[0023] Step S31, obtaining a multi-source synchronous data matrix and visual reference data; extracting second vibration data and a spectrum feature vector from the multi-source synchronous data matrix, performing mechanism vibration analysis, and obtaining a vibration state index;

[0024] Step S32, extracting a binary matrix from the multi-source synchronous data matrix, and performing track state assessment in combination with visual reference data to obtain a track state index;

[0025] Step S33, calculating the speed parameter based on the binarization matrix to obtain a speed state index;

[0026] Step S34, combining the vibration state index, the track state index and the speed state index to obtain a mechanism state vector.

[0027] According to one aspect of the present application, step S4 is specifically:

[0028] Step S41, obtaining a multi-source synchronous data matrix and visual reference data; extracting edge feature parameters from the multi-source synchronous data matrix and the visual reference data, applying a Markov model to perform edge separation state analysis, and obtaining a separation state index;

[0029] Step S42, performing posture feature extraction and dynamic estimation based on the binary data in the multi-source synchronous data matrix to obtain a posture state index;

[0030] Step S43, evaluating the stacking state according to the pressure characteristic data in the multi-source synchronous data matrix to obtain a stacking state index;

[0031] Step S44, the separation state index, the posture state index and the stacking state index are combined with the mechanism state vector for comprehensive evaluation to obtain the tablet state vector. In some embodiments, the mechanism state vector may also be added or referenced.

[0032] According to one aspect of the present application, step S5 is specifically:

[0033] Step S51, obtaining a mechanism state vector and a tablet state vector; calculating a feeding speed compensation value based on a speed state index in the mechanism state vector and a posture state index in the tablet state vector, and obtaining a speed control instruction;

[0034] Step S52, calculating the optimal triggering time according to the separation state index in the tablet state vector to obtain a timing control instruction;

[0035] Step S53, calculating synchronization parameters based on the stacking state index in the tablet state vector and the track state index in the mechanism state vector to obtain synchronization control instructions;

[0036] Step S54: Coordinately optimize the speed control instruction, the timing control instruction and the synchronization control instruction to obtain a control instruction vector.

[0037] According to one aspect of the present application, a stacked bottle filling control system integrating an image and a photoelectric sensor is also provided, comprising:

[0038] at least one processor; and

[0039] a memory communicatively connected to at least one of the processors; wherein,

[0040] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the stacking bottling control method integrating image and photoelectric sensors as described in any of the above technical solutions.

[0041] Beneficial effect: through multi-source data collection, visual feature extraction, mechanism status evaluation and tablet status evaluation, control instructions are generated. The control accuracy and reliability are significantly improved, and the production efficiency and product quality of the stacking filling system are greatly improved. Especially under high-speed production conditions, the system can still maintain a stable control effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of the present invention.

[0043] Figure 2 It is a flow chart of step S1 of the present invention.

[0044] Figure 3 It is a flow chart of step S2 of the present invention.

[0045] Figure 4 It is a flow chart of step S3 of the present invention.

[0046] Figure 5 It is a flow chart of step S4 of the present invention.

[0047] Figure 6 It is a flow chart of step S4 of the present invention. DETAILED DESCRIPTION

[0048] like Figure 1 As shown, the stacking bottle control method integrating image and photoelectric sensors includes the following steps:

[0049] Step S1, obtaining a first signal matrix collected by a photoelectric sensor array, first pressure data collected by a pressure sensor, and first vibration data collected by a vibration sensor; performing a convolution operation on each signal value of the first signal matrix with a preset high-pass filter function to obtain a second signal matrix; filtering the first pressure data through a low-pass filter to obtain second pressure data; performing wavelet decomposition and reconstruction on the first vibration data to obtain second vibration data; synchronizing the second signal matrix, the second pressure data, and the second vibration data according to a preset time alignment algorithm to obtain a multi-source synchronous data matrix.

[0050] Step S2, obtaining the original image data and the multi-source synchronous data matrix collected by the visual camera; graying the original image data and performing Gaussian filtering with a preset convolution kernel to obtain a preprocessed image; applying an adaptive threshold segmentation algorithm to the preprocessed image to perform edge extraction to obtain an edge feature matrix; calculating the position and posture parameters of the tablet according to the edge feature matrix to obtain a posture feature vector; performing data fusion operation on the edge feature matrix and the posture feature vector with the multi-source synchronous data matrix to obtain visual reference data.

[0051] Step S3, obtaining a multi-source synchronous data matrix and visual reference data; extracting the second vibration data and the spectrum feature vector from the multi-source synchronous data matrix, performing mechanism vibration analysis, and obtaining a vibration state index; extracting a binary matrix from the multi-source synchronous data matrix, and performing track state evaluation in combination with the visual reference data to obtain a track state index; calculating a speed parameter based on the binary matrix to obtain a speed state index; and combining the vibration state index, the track state index, and the speed state index to obtain a mechanism state vector.

[0052] Step S4, obtaining a multi-source synchronous data matrix and visual reference data; extracting edge feature parameters from the multi-source synchronous data matrix and the visual reference data, applying the Markov model to perform edge separation state analysis, and obtaining a separation state index; performing posture feature extraction and dynamic estimation based on the binary data in the multi-source synchronous data matrix to obtain a posture state index; evaluating the stacking state according to the pressure feature data in the multi-source synchronous data matrix to obtain a stacking state index; and comprehensively evaluating the separation state index, the posture state index, and the stacking state index in combination with the mechanism state vector to obtain a tablet state vector. In some embodiments, the mechanism state vector may also be added or referenced.

[0053] Step S5, obtaining the mechanism state vector and the tablet state vector; calculating the feeding speed compensation value based on the speed state index in the mechanism state vector and the posture state index in the tablet state vector to obtain the speed control instruction; calculating the optimal trigger time according to the separation state index in the tablet state vector to obtain the timing control instruction; calculating the synchronization parameter based on the stacking state index in the tablet state vector and the track state index in the mechanism state vector to obtain the synchronization control instruction; collaboratively optimizing the speed control instruction, the timing control instruction and the synchronization control instruction to obtain the control instruction vector.

[0054] Through multi-sensor data fusion technology, all-round monitoring of the tablet conveying process is achieved; the adaptive signal processing algorithm is adopted to improve the system's adaptability to environmental changes; based on the multi-level state evaluation mechanism, accurate perception of the equipment and tablet status is achieved; through multi-objective collaborative optimization control, the accuracy and coordination of the execution action are guaranteed. The overall solution forms a closed-loop intelligent control system with close coordination between each step, smooth data flow, and clear processing logic. In practical applications, this solution can effectively solve the problems of tablet stacking, unstable separation, and low bottling efficiency in traditional bottling systems, and significantly improve the automation level of the production line and the stability of product quality. Especially under high-speed production conditions, the system can still maintain a stable and reliable control effect, greatly improving production efficiency and reducing the need for manual intervention.

[0055] like Figure 2 As shown, according to one aspect of the present application, step S1 is specifically:

[0056] Step S11, obtaining a first signal matrix collected by a photoelectric sensor array; performing a convolution operation on each signal value in the first signal matrix and a preset high-pass filter function to obtain a second signal matrix; calculating a signal variance based on the signal values ​​in the second signal matrix, and dynamically updating upper and lower threshold parameters according to the signal variance; performing a comparison operation on each signal value in the second signal matrix and the upper and lower threshold parameters to obtain a binarized matrix.

[0057] Step S12, obtaining first pressure data collected by the pressure sensor; performing a convolution operation on the first pressure data and a preset low-pass filter coefficient to obtain second pressure data; calculating a difference based on the second pressure data at adjacent sampling moments to obtain pressure change rate data; combining the second pressure data with the pressure change rate data to form a pressure feature vector.

[0058] Step S13, obtaining first vibration data collected by the vibration sensor; performing wavelet transform on the first vibration data according to a preset decomposition scale to obtain wavelet coefficients of different frequency bands; calculating an adaptive threshold according to the signal energy distribution of each frequency band, performing denoising on the wavelet coefficients to obtain denoised wavelet coefficients; performing inverse wavelet transform on the denoised wavelet coefficients to reconstruct the second vibration data; performing Fourier transform on the second vibration data to extract characteristic frequency components to obtain a frequency spectrum feature vector.

[0059] Step S14, extracting the timestamp information of each data based on the binarization matrix, the pressure eigenvector, the second vibration data and the spectrum eigenvector, and establishing a unified time base; performing cubic spline interpolation calculation on all data according to the time base to obtain aligned data at a unified sampling time; reorganizing the aligned data according to a preset format to obtain a multi-source synchronous data matrix.

[0060] By using high-pass filtering to perform convolution operations on the photoelectric sensor array data, the ambient light interference and low-frequency drift can be effectively removed, and the accuracy of tablet edge detection can be improved; low-pass filtering of pressure data can eliminate the influence of high-frequency vibration and impact noise, and retain the true pressure change trend; wavelet decomposition and reconstruction are used to process vibration data to achieve multi-scale signal analysis, which not only retains the mutation characteristics of the high-frequency band but also extracts the trend information of the low-frequency band; the synchronization of multi-source data is achieved through the preset time alignment algorithm, which solves the problem of inconsistent sampling frequency and response time of different sensors, so that subsequent data fusion analysis is based on time consistency. This multi-source data preprocessing and synchronization mechanism provides a high-quality data foundation for subsequent state evaluation, significantly improves the system's perception accuracy of the tablet's motion state, and enables the control system to respond to various dynamic changes in the tablet delivery process in a timely and accurate manner.

[0061] like Figure 3 As shown, according to one aspect of the present application, step S2 is specifically:

[0062] Step S21, obtaining the original image data collected by the visual camera; calculating the grayscale histogram of the original image data, and adaptively adjusting the image enhancement parameters according to the histogram distribution characteristics; performing contrast adjustment and brightness compensation on the original image data according to the image enhancement parameters to obtain an enhanced image; performing a convolution operation on the enhanced image and a preset Gaussian convolution kernel to obtain a preprocessed image.

[0063] Step S22, obtaining a preprocessed image; calculating the image gradient amplitude and direction of the preprocessed image to obtain a gradient feature matrix; using the OTSU algorithm to calculate an adaptive segmentation threshold according to the statistical characteristics of the gradient feature matrix; performing an edge extraction operation on the preprocessed image according to the adaptive segmentation threshold to obtain an edge feature matrix.

[0064] Step S23, obtaining an edge feature matrix; performing connected domain analysis on the edge feature matrix to extract geometric feature parameters of the tablet contour; calculating the center coordinates, direction angle and area parameters of the tablet based on the geometric feature parameters to obtain a posture feature vector; combining the edge feature matrix and the posture feature vector in a preset format to obtain visual feature data.

[0065] Step S24, obtaining visual feature data and the multi-source synchronous data matrix obtained in step S1; constructing a data fusion evaluation index according to a preset feature weight parameter; performing weighted fusion calculation on the visual feature data and the corresponding features in the multi-source synchronous data matrix to obtain visual reference data.

[0066] In response to the needs of visual inspection of tablets, an adaptive image enhancement algorithm is used to dynamically adjust the contrast and brightness of the image, effectively overcoming the impact of changes in lighting in the production environment; through the combination of Gaussian filter preprocessing and adaptive threshold segmentation, the clear features of the tablet edge are retained, and the interference of image noise can be effectively suppressed; the geometric features of the tablet contour are extracted based on connected domain analysis, and data fusion is performed in combination with preset feature weight parameters to achieve accurate recognition of the tablet position and posture. This processing method based on visual features and multi-source data fusion significantly improves the system's measurement accuracy of the tablet's spatial position and posture, especially in complex situations such as tablet overlap and occlusion, it can still maintain stable recognition performance, providing reliable visual reference information for subsequent control decisions.

[0067] like Figure 4 As shown, according to one aspect of the present application, step S3 is specifically:

[0068] Step S31, obtaining second vibration data and a spectrum feature vector; performing Hilbert transform on the second vibration data to obtain vibration envelope data; calculating statistical characteristic parameters of the vibration envelope data to obtain a vibration intensity index; extracting the amplitude ratio of characteristic frequency components according to the spectrum feature vector to obtain a spectrum feature index; performing weighted fusion on the vibration intensity index and the spectrum feature index according to preset weights to obtain a vibration state index.

[0069] Step S32, obtain the binarized matrix and visual reference data; calculate the light intensity distribution curve of the binarized matrix along the track direction to obtain the light intensity distribution data; perform segmented statistical analysis on the light intensity distribution data, calculate the variance and mean of each segment, and obtain the light intensity characteristic index; match the light intensity characteristic index with the track area characteristics in the visual reference data to obtain the track state index.

[0070] Step S33, obtain a binarized matrix; calculate the instantaneous speed according to the change of the tablet position in the binarized matrix at adjacent sampling moments to obtain the original speed data; apply the Kalman filter algorithm to smooth the original speed data to obtain filtered speed data; calculate the fluctuation range and mean deviation of the filtered speed data to obtain the speed state index.

[0071] Step S34, obtaining vibration state index, track state index and speed state index; constructing an evaluation matrix according to a preset state evaluation criterion; substituting the vibration state index, track state index and speed state index into the evaluation matrix for comprehensive calculation to obtain a mechanism state vector.

[0072] By performing Hilbert transform and envelope analysis on vibration data, combined with spectrum feature extraction, the abnormal vibration state of the equipment can be effectively identified; based on the segmented statistical analysis method of light intensity distribution data, real-time monitoring of the track operation state is realized; the improved Kalman filter algorithm is used to process the speed data, which effectively suppresses the random fluctuations of speed measurement. This multi-dimensional mechanism status evaluation mechanism enables the system to timely detect and warn of mechanical failures that may cause abnormal tablet delivery, significantly improving the stability and reliability of the bottling process. Through comprehensive analysis of the three key states of vibration, track and speed, the system can adaptively adjust the control parameters to prevent abnormal tablet stacking or separation caused by mechanical failures, thereby ensuring the continuity of the production process and product quality.

[0073] like Figure 5 As shown, according to one aspect of the present application, step S4 is specifically:

[0074] Step S41, obtain a multi-source synchronous data matrix and visual reference data; extract a binarization matrix from the multi-source synchronous data matrix, and extract an edge feature matrix from the visual reference data; construct a three-state Markov chain model according to preset state feature parameters; calculate the state transition probability of the binarization matrix and the edge feature matrix to obtain a transition probability matrix; calculate the current state probability distribution based on the transition probability matrix to obtain a separation state index.

[0075] Step S42, obtaining a binarized matrix in a multi-source synchronous data matrix; calculating the geometric moment features of the tablet pattern in the binarized matrix to obtain posture feature data; constructing a state space equation and an observation equation based on the posture feature data; applying an improved Kalman filter algorithm to iteratively calculate the state space equation to obtain posture prediction data; obtaining a posture state index based on the deviation between the posture prediction data and the actual observation value.

[0076] Step S43, obtaining the pressure characteristic vector in the multi-source synchronous data matrix; performing fuzzy quantization on the pressure data and the pressure change rate data in the pressure characteristic vector; calculating the membership of the stacking degree according to the preset fuzzy rule library to obtain fuzzy evaluation data; performing centroid method defuzzification processing on the fuzzy evaluation data to obtain a stacking state index.

[0077] Step S44, obtain the separation state index, posture state index and stacking state index; construct a state evaluation matrix according to the preset evaluation weights; substitute all state indicators into the state evaluation matrix for weighted fusion calculation to obtain a state comprehensive index; compare and judge the state comprehensive index with the preset state threshold to obtain a tablet state vector.

[0078] The tablet separation state is analyzed based on the three-state Markov chain model, and the accurate modeling of the tablet separation process is achieved by dynamically calculating the state transition probability; the improved Kalman filter algorithm is used to dynamically track the posture characteristics, which improves the accuracy of posture prediction; the stacking state is evaluated in combination with fuzzy rules to achieve a quantitative description of the stacking degree. This multi-level state evaluation strategy enables the system to accurately grasp the dynamic characteristics of tablets during the conveying process, especially under high-speed operation conditions, and can still maintain accurate judgment of the tablet state, effectively preventing the occurrence of abnormal situations such as tablet stacking and collision, and significantly improving the quality stability of the bottling process.

[0079] like Figure 6 As shown, according to one aspect of the present application, step S5 is specifically:

[0080] Step S51, obtain the speed state index in the mechanism state vector and the posture state index in the pill state vector; perform fuzzy quantization processing on the speed state index and the posture state index to obtain fuzzy state data; calculate the speed adjustment amount according to the preset fuzzy control rules to obtain fuzzy output data; perform defuzzification calculation on the fuzzy output data to obtain a speed control instruction.

[0081] Step S52, obtaining the separation state index in the tablet state vector; constructing a timing optimization objective function based on the separation state index; applying the particle swarm algorithm to iteratively solve the timing optimization objective function to obtain optimized timing data; converting the optimized timing data into an actuator triggering moment to obtain a timing control instruction.

[0082] Step S53, obtaining the stacking state index in the tablet state vector and the track state index in the mechanism state vector; calculating the expected conveying speed according to the stacking state index to obtain the expected speed value; constructing a synchronous optimization equation based on the track state index and the expected speed value; solving the synchronous optimization equation to obtain a synchronous control instruction.

[0083] Step S54, obtain speed control instructions, timing control instructions and synchronization control instructions; construct a multi-objective collaborative optimization model; substitute the speed control instructions, timing control instructions and synchronization control instructions into the multi-objective collaborative optimization model for solving to obtain optimized control data; decompose and format the optimized control data to obtain a control instruction vector.

[0084] The fuzzy control method is used to adaptively calculate the speed compensation value to achieve smooth adjustment of the feeding speed; the trigger timing is optimized based on the particle swarm algorithm to ensure the optimal timing of the actuator action; and the coordinated control of multiple actuators is achieved by solving the synchronous optimization equation. This multi-objective collaborative optimization control strategy not only ensures the precise coordination of the actions of each actuator, but also dynamically adjusts the control parameters according to the real-time changes in the tablet status and the mechanism status, thereby achieving the optimal configuration of the control instructions. Especially under high-speed production conditions, this control strategy can effectively balance the requirements of speed, accuracy and stability, and significantly improve the bottling efficiency and quality.

[0085] In another embodiment of the present application, it also includes:

[0086] Step S6, obtaining the mechanism state vector obtained in step S3, the tablet state vector obtained in step S4 and the control instruction vector obtained in step S5; performing real-time evaluation and calculation on the mechanism state vector, the tablet state vector and the control instruction vector to obtain real-time scoring data; performing rapid instruction optimization based on the real-time scoring data to obtain real-time optimization instructions; obtaining the state history data within a cycle at every preset optimization cycle, performing overall parameter optimization to obtain cycle optimization parameters; updating the control strategy according to the cycle optimization parameters to obtain an optimized control strategy.

[0087] According to one aspect of the present application, step S6 is specifically:

[0088] Step S61, obtain the mechanism state vector, the pill state vector and the control instruction vector; calculate the real-time state score according to the preset rapid evaluation criteria to obtain real-time scoring data; compare the real-time scoring data with the preset threshold value to obtain the scoring deviation value; calculate the optimization compensation amount according to the scoring deviation value to obtain the real-time optimization instruction.

[0089] Step S62: every preset optimization cycle, obtain the accumulated state history data in the cycle; perform statistical analysis on the state history data to obtain statistical characteristic values; construct performance evaluation indicators according to the statistical characteristic values ​​to obtain performance evaluation values.

[0090] Step S63, obtaining a performance evaluation value; constructing a parameter optimization equation based on the performance evaluation value; solving the parameter optimization equation to obtain a parameter optimization solution; generating a new parameter configuration according to the parameter optimization solution to obtain a period optimization parameter.

[0091] Step S64, obtaining periodic optimization parameters; updating relevant parameter values ​​in the control strategy to obtain an updated parameter set; reconstructing the control strategy model according to the updated parameter set to obtain an optimized control strategy.

[0092] According to one aspect of the present application, step S11 is specifically:

[0093] Step S111, obtain the first signal matrix collected by the photoelectric sensor array; calculate the local mean and standard deviation of each signal value in the first signal matrix, and construct a local statistical eigenvector; according to the local statistical eigenvector, use the least squares method to calculate the signal baseline drift trend to obtain the baseline drift function; subtract the corresponding baseline drift function value from each signal value in the first signal matrix to obtain a baseline correction matrix.

[0094] Step S112, obtain a baseline correction matrix; calculate the power spectral density distribution of the baseline correction matrix to obtain a spectrum distribution vector; estimate the signal bandwidth using the maximum entropy method based on the spectrum distribution vector to obtain a bandwidth parameter vector; construct an adaptive high-pass filter transfer function based on the bandwidth parameter vector to obtain a filter coefficient matrix; perform a convolution operation on the baseline correction matrix and the filter coefficient matrix to obtain a second signal matrix.

[0095] The maximum entropy bandwidth estimation algorithm is specifically: signal power spectrum density Pxx(f) = ∑|X(f)| 2 / N; Shannon entropy H(f) = -∑P(f)·log2P(f); optimal bandwidth f_opt = argmax{H(f)}·[1 + α·var(Pxx) / mean(Pxx)]; adaptive high-pass filter transfer function H(z) = (1 - z^(-1)) / (1 - β·z^(-1)); β = cos(2π·f_opt / fs); where: X(f) is the Fourier transform of the signal; N is the number of sampling points; P(f) is the normalized power spectrum; α is the adaptive coefficient; var(Pxx) is the power spectrum variance; mean(Pxx) is the power spectrum mean; fs is the sampling frequency.

[0096] Step S113, obtaining a second signal matrix; applying a sliding window algorithm to the second signal matrix to calculate the local variance to obtain a variance sequence vector; inputting the variance sequence vector into a kernel density estimation model, calculating the probability density function of the variance distribution, and obtaining a variance distribution vector; and calculating the optimal segmentation point using the OTSU algorithm based on the variance distribution vector to obtain a variance threshold vector.

[0097] Step S114, obtain the variance threshold vector and the second signal matrix; construct an adaptive threshold function based on the variance threshold vector to obtain a threshold function matrix; calculate the ratio of the second signal matrix to the threshold function matrix to obtain a normalized matrix; apply the sigmoid function to the normalized matrix for nonlinear transformation to obtain an activation value matrix; binarize the activation value matrix according to a preset decision threshold to obtain a binarized matrix.

[0098] By constructing local statistical feature vectors and using the least squares method to calculate the baseline drift trend, accurate compensation for the baseline drift of the photoelectric signal is achieved; based on the power spectrum density analysis and the maximum entropy method, the signal bandwidth is adaptively estimated, so that the cutoff frequency of the high-pass filter can be dynamically adjusted according to the signal characteristics, avoiding the signal distortion caused by the fixed cutoff frequency; the kernel density estimation and OTSU algorithm are used to calculate the optimal variance threshold, combined with the sigmoid function for nonlinear transformation, which not only ensures the continuity of the signal but also improves the robustness of the binarization. This multi-level signal preprocessing strategy can effectively overcome problems such as ambient light interference and sensor drift, and significantly improve the signal-to-noise ratio and detection accuracy of the photoelectric signal. Especially in harsh industrial environments, this processing method can still maintain stable signal quality, providing a reliable data basis for subsequent state recognition.

[0099] According to one aspect of the present application, step S13 is specifically:

[0100] Step S131, obtaining first vibration data collected by a vibration sensor; performing segmented processing on the first vibration data, subtracting a local mean from each segment of data, and obtaining a de-meaned sequence; calculating an autocorrelation function of the de-meaned sequence, and obtaining a correlation function vector; determining a periodic feature of a signal according to the correlation function vector, and obtaining a periodic feature vector.

[0101] Step S132, obtaining a de-meaned sequence and a periodic eigenvector; selecting an optimal wavelet basis function according to the periodic eigenvector to obtain wavelet basis parameters; constructing a wavelet decomposition filter group based on the wavelet basis parameters to obtain a filter coefficient set; performing a convolution operation on the de-meaned sequence and the filter coefficient set to obtain wavelet coefficient matrices of different scales.

[0102] Step S133, obtain the wavelet coefficient matrix; calculate the energy distribution of the wavelet coefficient matrix at each scale to obtain the energy spectrum vector; use the information entropy criterion to evaluate the importance of the coefficients of each scale to obtain the importance vector; calculate the adaptive threshold according to the importance vector and the energy spectrum vector to obtain the threshold vector; set the coefficients in the wavelet coefficient matrix that are lower than the corresponding value of the threshold vector to zero to obtain the denoised wavelet coefficients.

[0103] The information entropy wavelet threshold algorithm is specifically: wavelet coefficient entropy E_j = -∑|W_j(k)| 2 ·log(|W_j(k)| 2 );Scale importance R_j = E_j / ∑E_i;Adaptive threshold λ_j = σ·(log2N / N)^0.5·[1 + γ·(1-R_j)];W_j(k) is the wavelet coefficient at scale j; σ is the noise standard deviation; N is the signal length; γ is the adjustment coefficient; E_j is the information entropy of scale j; R_j is the relative importance of scale j.

[0104] Step S134, obtaining denoising wavelet coefficients and wavelet basis parameters; constructing a wavelet reconstruction filter group to obtain a reconstruction filter group; performing a convolution operation on the denoising wavelet coefficients and the reconstruction filter group to obtain reconstructed signals of each scale to form a reconstructed signal set; performing weighted superposition on the reconstructed signal set, with the weights based on the importance vector, to obtain second vibration data.

[0105] Step S135, obtaining the second vibration data; applying a Hamming window function to the second vibration data to perform windowing processing to obtain windowed data; performing fast Fourier transform on the windowed data to obtain a spectral coefficient matrix; calculating the amplitude spectrum and phase spectrum of the spectral coefficient matrix to obtain a spectral component vector; performing feature extraction on the spectral component vector according to a preset frequency band division criterion to obtain a spectral feature vector.

[0106] The periodic characteristics of the signal are determined through segmented processing and autocorrelation analysis, and the adaptive selection of the optimal wavelet basis function is achieved; the importance of each scale coefficient is evaluated based on the information entropy criterion, and the threshold is adaptively determined in combination with the energy spectrum distribution, so that the wavelet denoising process can retain the useful signal to the greatest extent while effectively suppressing the noise; the weighted reconstruction method is adopted, and the weight is dynamically adjusted based on the importance vector to ensure the accuracy of the reconstructed signal; the method of combining Hamming window function windowing and fast Fourier transform is used to effectively reduce spectrum leakage and improve the accuracy of spectrum analysis. This vibration signal processing method based on multi-scale analysis can accurately capture various vibration characteristics during the operation of the equipment, providing reliable technical support for early fault diagnosis and predictive maintenance.

[0107] According to one aspect of the present application, step S22 is specifically:

[0108] Step S221, obtain a preprocessed image; construct Sobel operators in the horizontal and vertical directions to obtain a directional operator matrix; perform two-dimensional convolution operations on the preprocessed image and the directional operator matrix respectively to obtain a horizontal gradient matrix and a vertical gradient matrix; combine the horizontal gradient matrix and the vertical gradient matrix to obtain a gradient feature matrix.

[0109] Step S222, obtaining a gradient feature matrix; calculating a distribution histogram of non-zero gradient values ​​in the gradient feature matrix to obtain a gradient distribution vector; performing Gaussian smoothing on the gradient distribution vector to obtain a smoothed distribution vector; calculating inter-class variance and intra-class variance based on the smoothed distribution vector to obtain a variance feature vector.

[0110] Step S223, obtaining the variance eigenvector; iteratively calculating the maximum value of the inter-class variance using the OTSU algorithm according to the variance eigenvector to obtain an iterative optimization vector; selecting the grayscale value corresponding to the maximum value from the iterative optimization vector to obtain an adaptive segmentation threshold; substituting the adaptive segmentation threshold into the sigmoid function for scale transformation to obtain a correction threshold parameter.

[0111] The OTSU algorithm is specifically: gradient variance σ_B 2 (t) = ω0(t)·ω1(t)·[μ0(t) - μ1(t)] 2 ; Adaptive weight ω(t) = 1 - exp(-η·|G(t) - G_mean| 2 ); Improved objective function J(t) = σ_B 2 (t)·[1 +ω(t)·S(t)]; local entropy S(t) = -∑p(i)·log(p(i)), i∈[t-Δt, t+Δt]; where: ω0(t), ω1(t) are the inter-class probabilities; μ0(t), μ1(t) are the inter-class means; G(t) is the gradient value; G_mean is the average gradient; η is the scale parameter; S(t) is the local entropy; Δt is the local window size.

[0112] Step S224, obtaining a preprocessed image and correction threshold parameters; performing adaptive threshold segmentation on the preprocessed image according to the correction threshold parameters to obtain a binary edge map; performing connected domain analysis and morphological processing on the binary edge map to obtain a connected edge map; performing edge tracking and connection on the connected edge map according to a preset edge connection rule to obtain an edge feature matrix.

[0113] The image gradient features are extracted by Sobel operators in the horizontal and vertical directions, and combined with Gaussian smoothing, the influence of noise on edge detection is effectively suppressed; the OTSU algorithm based on inter-class variance and intra-class variance calculates the optimal segmentation threshold, and the sigmoid function is used for scale transformation to achieve adaptive segmentation of images under different lighting conditions; the method of combining connected domain analysis and morphological processing can effectively deal with edge breakage and noise interference problems, ensuring the integrity and continuity of edge features. This improved edge detection method is particularly suitable for tablet image processing in industrial environments, and can accurately extract tablet contour features even under complex backgrounds and uneven lighting conditions.

[0114] According to one aspect of the present application, step S31 is specifically:

[0115] Step S311, obtaining the second vibration data; performing windowing processing on the second vibration data using a Hanning window function to obtain a windowed sequence; calculating an analytical signal for the windowed sequence, constructing a Hilbert transform integral kernel, and obtaining a transform kernel matrix; performing a convolution operation on the windowed sequence and the transform kernel matrix to obtain a complex analytical signal; calculating the amplitude envelope of the complex analytical signal to obtain vibration envelope data.

[0116] Step S312, obtaining vibration envelope data; calculating the peak value, root mean square value, waveform factor and peak factor of the vibration envelope data to obtain the time domain eigenvector; using the empirical mode decomposition method to extract components of the vibration envelope data to obtain the intrinsic mode function; calculating the energy distribution of the intrinsic mode function to obtain the energy distribution vector; constructing a vibration intensity evaluation model based on the time domain eigenvector and the energy distribution vector to obtain the vibration intensity index.

[0117] Step S313, obtain the spectrum feature vector; divide the spectrum feature vector into frequency bands, calculate the energy proportion of each frequency band, and obtain the frequency band energy vector; use the power spectrum density estimation method to analyze the frequency band energy vector, extract the amplitude information of the characteristic frequency, and obtain the characteristic amplitude matrix; calculate the relative amplitude ratio of each characteristic frequency component according to the characteristic amplitude matrix to obtain the spectrum feature index.

[0118] Step S314, obtaining the vibration intensity index and the spectrum feature index; constructing a feature fusion model based on support vector regression, training the mapping relationship between the vibration intensity index and the spectrum feature index, and obtaining the regression model parameters; using the adaptive weight method to calculate the fusion coefficient and obtain the weight coefficient vector; performing weighted combination of the feature indicators according to the regression model parameters and the weight coefficient vector to obtain the vibration state index.

[0119] The vibration data is windowed by the Hanning window function, which effectively suppresses the spectrum leakage phenomenon; the Hilbert transform is used to construct the analytical signal, and the envelope characteristics of the vibration signal are accurately extracted by combining the amplitude envelope calculation of the complex analytical signal; the vibration envelope data is decomposed into intrinsic mode functions with different frequency characteristics based on the empirical mode decomposition method, which realizes the effective separation of different frequency components; the energy distribution characteristics of the vibration signal are fully described by calculating the time domain characteristic parameters such as peak value, root mean square value, waveform factor and peak factor; the amplitude information of the characteristic frequency is extracted by combining the frequency band energy analysis and power spectrum density estimation method, and a complete vibration feature description system is established; the support vector regression is used to realize the mapping relationship between the vibration intensity index and the spectrum feature index, and the feature fusion is performed by the adaptive weight method, which effectively solves the comprehensive evaluation problem of multi-source vibration characteristics. This multi-dimensional vibration analysis method can accurately identify various vibration states of the equipment during operation, including normal operation vibration, mechanical looseness, bearing failure and other typical vibration modes, providing reliable technical support for equipment status monitoring and fault warning. Especially under high-speed operation conditions, this method can still maintain a high level of analysis accuracy, effectively prevent tablet delivery failures caused by abnormal vibration, and significantly improve the operational reliability and maintenance efficiency of the bottling system. Through the feature fusion mechanism of adaptive weights, the system can automatically adjust the importance of each feature index according to different working conditions, avoiding the misjudgment that may be caused by a single feature, and providing a more comprehensive and reliable basis for state evaluation for the control system.

[0120] According to one aspect of the present application, step S41 is specifically:

[0121] Step S411, obtain the binarization matrix in the multi-source synchronous data matrix and the edge feature matrix in the visual reference data; perform connected domain labeling analysis on the binarization matrix to obtain a labeling matrix; calculate the centroid coordinates and area features of each connected domain in the labeling matrix to obtain a feature parameter vector; perform morphological classification on the connected domain according to the feature parameter vector to obtain a classification result matrix.

[0122] Step S412, obtaining a classification result matrix; constructing a state space including three states of "separation", "contact" and "overlap" to obtain a state space vector; calculating the transition frequency between states at adjacent moments according to the classification result matrix to obtain a transition frequency matrix; normalizing the transition frequency matrix to obtain an initial transition probability matrix.

[0123] Step S413, obtain the initial transfer probability matrix and the edge feature matrix; calculate the contour curvature distribution in the edge feature matrix to obtain the curvature feature vector; construct the state observation probability distribution according to the curvature feature vector to obtain the observation probability matrix; substitute the initial transfer probability matrix and the observation probability matrix into the forward-backward algorithm to obtain the optimized transfer probability matrix.

[0124] The above Markov model is specifically: state transfer function P(s_t|s_(t-1)) = exp(-δ·D_s) / Z_s;

[0125] Observation probability P(o_t|s_t)=exp(-θ·D_o) / Z_o;

[0126] Improved forward variable α_t(i) = [∑α_(t-1)(j)·P(s_t|s_(t-1))]·P(o_t|s_t)·ψ(t);

[0127] State importance ψ(t) = 1 + μ·|κ(t)|; where: D_s is the state distance; D_o is the observation distance; δ and θ are smoothing parameters; Z_s and Z_o are normalization factors; κ(t) is the profile curvature; and μ is the weight coefficient.

[0128] Step S414, obtain the optimized probability transfer matrix; construct a Viterbi decoding network according to the optimized transfer probability matrix to obtain a state path matrix; calculate the duration distribution of each state in the state path matrix to obtain a time distribution vector; perform exponential smoothing on the time distribution vector to obtain a state probability vector; calculate the most likely state and its probability value according to the state probability vector to obtain a separation state indicator.

[0129] Through connected domain analysis and morphological classification, the separation state of the tablets can be accurately identified; the state transition process is described based on the three-state Markov chain model, and the observation probability matrix is ​​constructed in combination with the contour curvature feature to improve the accuracy of state recognition; the forward-backward algorithm is used to optimize the transition probability matrix, and the Viterbi decoding algorithm is combined to achieve the optimal estimation of the separation state of the tablets; the random fluctuation of the state probability is eliminated through exponential smoothing, which improves the stability of state judgment. This separation state analysis method based on the probability model can accurately identify various state changes of tablets during the transportation process, and provides a reliable decision-making basis for timely adjustment of the control system.

[0130] According to one aspect of the present application, step S42 is specifically:

[0131] Step S421, obtain the binarized matrix in the multi-source synchronous data matrix; extract the central moment, principal axis of inertia and eccentricity of the pill pattern in the binarized matrix through image moment calculation to obtain the moment feature vector; calculate the minimum circumscribed rectangle and filling ratio of the pill pattern in the binarized matrix to obtain the shape feature vector; combine the moment feature vector and the shape feature vector to obtain the posture feature data.

[0132] Step S422, obtain posture feature data; construct a state vector including position, posture angle and angular velocity to obtain a state variable vector; establish a state transfer matrix according to the tablet kinematic model to obtain a transfer matrix; calculate the covariance matrix of the observation noise to obtain an observation noise matrix; combine the state variable vector, transfer matrix and observation noise matrix to construct the state space equation and observation equation to obtain a state space model.

[0133] Step S423, obtain the state space model; use the adaptive factor method to dynamically adjust the process noise covariance matrix to obtain an adaptive noise matrix; construct the calculation equation of the gain matrix based on the minimum mean square error criterion to obtain the gain calculation model; improve the Kalman filter algorithm according to the adaptive noise matrix and the gain calculation model to obtain an improved filter model; use the improved filter model to iteratively calculate the state space model to obtain posture prediction data.

[0134] The Kalman filter algorithm is as follows: state prediction equation X(k|k-1) = F(k)·X(k-1) + B(k)·u(k); measurement prediction equation Z(k|k-1) = H(k)·X(k|k-1); innovation sequence v(k) = Z(k) - Z(k|k-1); adaptive factor λ(k) = tr[C_v(k)] / tr[H(k)·P(k|k-1)·H(k)^T + R(k)]; modified prediction error covariance Q(k) = λ(k)·Q(k-1); improved state estimation equation X(k) = X(k|k-1) + K(k)·[Z(k) - H(k)·X(k|k-1)]; where: X(k) is the state vector at time k, including the tablet position, attitude angle and angular velocity; F(k) is the state transfer matrix; B(k) is the control input matrix; u(k) is the control input; H(k) is the observation matrix; Z(k) is the observation vector; C_v(k) is the innovation sequence covariance; P(k|k-1) is the prediction error covariance; R(k) is the measurement noise covariance; K(k) is the Kalman gain matrix; tr[·] represents the trace operation of the matrix.

[0135] Step S424, obtain the posture prediction data and the posture feature data at the current moment; calculate the Euclidean distance between the posture prediction data and the posture feature data to obtain a distance error vector; use the exponentially weighted moving average method to smooth the distance error vector to obtain a smoothed error vector; compare and calculate the smoothed error vector with a preset evaluation standard to obtain a posture state index.

[0136] The central moment, principal axis of inertia and eccentricity of the tablet pattern are extracted by image moment calculation. Combined with shape features such as the minimum circumscribed rectangle and filling ratio, a complete posture feature description system is constructed. The state space equation is established based on the tablet kinematic model, and the adaptive factor method is used to dynamically adjust the process noise covariance matrix, which effectively solves the performance degradation problem of the traditional Kalman filter in nonlinear systems. The gain matrix calculation equation is constructed by the minimum mean square error criterion, and the adaptive adjustment of the filter gain is realized, which significantly improves the accuracy of state estimation. The Euclidean distance error is combined with the exponentially weighted moving average method for prediction error analysis, and a reliability evaluation mechanism for the prediction results is established. This improved posture estimation method is particularly suitable for state tracking of high-speed moving tablets, and can accurately predict the position and posture change trend of tablets, providing strong support for the precise control of actuators. In the case of a sharp posture change or partial occlusion of the tablet, this method can still maintain stable estimation performance. Through the dynamic adjustment mechanism of the adaptive noise matrix, the system can quickly adapt to changes in measurement conditions and avoid divergence of state estimation. Especially in complex scenarios where multiple tablets are conveyed simultaneously, this method can effectively handle multi-target tracking problems, accurately predict the motion trajectory of each tablet, and provide reliable early warning information to prevent tablet collision and stacking. At the same time, the evaluation mechanism based on Euclidean distance can timely detect prediction deviations, eliminate the influence of random fluctuations through smoothing, and enable the system to dynamically adjust the control strategy according to the prediction reliability, further improving the stability and reliability of the bottling process.

[0137] According to one aspect of the present application, step S43 is specifically:

[0138] Step S431, obtain the pressure characteristic vector in the multi-source synchronous data matrix; use the standard deviation normalization method to standardize the pressure data in the pressure characteristic vector to obtain the standard pressure vector; use the central difference method to calculate the first and second order derivatives of the standard pressure vector to obtain the pressure change rate vector and the pressure acceleration vector; combine the standard pressure vector, the pressure change rate vector and the pressure acceleration vector to obtain the pressure characteristic matrix.

[0139] Step S432, obtain the pressure feature matrix; construct a triangular membership function set of pressure value, change rate and acceleration to obtain a membership function group; perform fuzzy quantization operation on each feature in the pressure feature matrix according to the membership function group to obtain a pressure membership matrix; use expert experience to construct a fuzzy rule base, map the relationship between pressure characteristics and stacking status, and obtain a fuzzy rule matrix.

[0140] The fuzzy inference algorithm is as follows: pressure fuzzy membership μ_p(x) = 1 / [1 + ((xc) / a)^(2b)]; change rate membership μ_v(x) = exp[-(xm) 2 / (2σ 2 )]·cos(πx / ω); rule activation strength τ_i = T[μ_p(x), μ_v(y)]·exp(ρ·E_i); rule importance E_i = ∑w_k·|r_k(i)|; where: a, b, c are pressure membership parameters; m, σ, ω are change rate membership parameters; T[·] is the T-norm operation; ρ is the experience factor; w_k is the feature weight; r_k(i) is the rule relevance.

[0141] Step S433, obtain the pressure membership matrix and the fuzzy rule matrix; use the Mamdani reasoning method to calculate the activation strength of each rule to obtain the rule activation vector; use the minimum-maximum synthesis operator to perform fuzzy reasoning operation on the rule activation vector to obtain the synthetic membership vector; perform synthesis operation on the synthetic membership vector and the output fuzzy set to obtain fuzzy evaluation data.

[0142] Step S434, obtaining fuzzy evaluation data; constructing a defuzzification calculation model based on the centroid method to obtain a centroid calculation matrix; applying an adaptive weighted centroid method to the fuzzy evaluation data to perform defuzzification calculation to obtain a state evaluation value; normalizing the state evaluation value through a sigmoid function to obtain a stacking state index.

[0143] The multi-dimensional features of the pressure signal are extracted by standard deviation normalization and central difference method, and a complete pressure feature description system is constructed; the fuzzy rule base constructed by triangle membership function and expert experience is used to realize the qualitative to quantitative conversion of stacking state; fuzzy reasoning is performed based on Mamdani reasoning method and minimum-maximum synthesis operator to improve the robustness of state evaluation; the adaptive weighted centroid method is used for defuzzification, and the evaluation results are normalized by sigmoid function. This fuzzy evaluation method combined with expert experience can effectively deal with the uncertainty and ambiguity in the stacking state evaluation process, and provide a reliable basis for state judgment for real-time control decision-making.

[0144] According to one aspect of the present application, step S44 is specifically:

[0145] Step S441, obtain the separation state index, posture state index, stacking state index and mechanism state vector; use the sliding window method to calculate the local statistical characteristics of each state index to obtain a statistical feature matrix; use the principal component analysis method to extract features from the statistical feature matrix to obtain a principal component vector; determine the initial weight of each state indicator according to the contribution rate of the principal component vector to obtain an initial weight vector.

[0146] Step S442, obtain the initial weight vector and the statistical feature matrix; construct a hierarchical analysis model to calculate the relative importance between each state indicator to obtain the importance matrix; use the consistency test method to verify the rationality of the importance matrix to obtain the consistency index; combine the importance matrix with the preset evaluation index to construct the state evaluation matrix.

[0147] Step S443, obtain the state evaluation matrix and each state index; substitute each state index into the state evaluation matrix for weighted fusion calculation to obtain a fusion evaluation vector; use the TOPSIS method to calculate the distance between the fusion evaluation vector and the ideal solution and the negative ideal solution to obtain a distance vector set; calculate the relative proximity of each state according to the distance vector set to obtain a comprehensive state index.

[0148] The TOPSIS algorithm is specifically: weighted normalization matrix R = [r_ij], r_ij = w_j·x_ij / √(∑x_ij 2 ); dynamic weight w_j(t) = exp(λ·H_j) / ∑exp(λ·H_i); entropy value H_j = -∑p_ij·ln(p_ij); improved proximity C_i = d_i^(-) / [d_i^(-) + φ(t)·d_i^(+)]; time-varying adjustment factor φ(t) = 1 +ε·sin(2πt / T); where: x_ij is the value of the jth indicator of the ith evaluation object; λ is the sensitivity coefficient; p_ij is the feature proportion; d_i^(+) and d_i^(-) are the distances from the positive and negative ideal solutions respectively; ε is the periodic adjustment parameter; T is the evaluation period.

[0149] Step S444, obtain the comprehensive state index; use the fuzzy c-means clustering method to perform cluster analysis on the comprehensive state index to obtain the cluster center vector; construct the state judgment rule based on the cluster center vector to obtain the judgment rule set; substitute the comprehensive state index into the judgment rule set to perform state judgment and obtain the state judgment result; generate the corresponding state description vector according to the state judgment result to obtain the tablet state vector.

[0150] The local statistical characteristics of separation state index, posture state index and stacking state index are calculated by sliding window method, and the principal component analysis method is used for feature dimension reduction and weight initialization, which effectively solves the redundancy problem of multi-source state indexes; the relative importance between state indicators is calculated based on the hierarchical analysis model, and the rationality of the evaluation weight is ensured by combining consistency test; the distance between the state evaluation result and the ideal solution is calculated by TOPSIS method, and the degree of system state is quantified by relative proximity; the fuzzy c-means clustering method is used to dynamically classify the state comprehensive index, and the accurate judgment of the tablet state is realized. This multi-level state evaluation method has significant adaptability and robustness, and can accurately reflect the state changes of tablets during the transportation process. Especially under complex working conditions, such as simultaneous transportation of multiple tablets and frequent changes in tablet posture, this method can still maintain stable evaluation performance through comprehensive analysis of multi-dimensional features. The statistical analysis mechanism of sliding window effectively suppresses the influence of random fluctuations, the principal component analysis dimension reduction not only retains key state information but also reduces the computational complexity, the hierarchical analysis and consistency test ensure the credibility of the evaluation results, and the TOPSIS rule provides a quantitative basis for state evaluation. Through the adaptive classification mechanism of fuzzy clustering, the system can dynamically adjust the state judgment standard according to the actual working conditions, avoiding the misjudgment caused by the fixed threshold, providing accurate state feedback information for the control system, and significantly improving the accuracy and reliability of bottling control. In addition, the method has high computational efficiency and can meet the needs of real-time control, which is particularly suitable for online state monitoring and control optimization of high-speed bottling production lines.

[0151] According to one aspect of the present application, step S51 is specifically:

[0152] Step S511, obtain the speed state index in the mechanism state vector and the posture state index in the pill state vector; use the Z-score standardization method to normalize the speed state index and the posture state index to obtain a normalized speed index and a normalized posture index; construct a speed state membership function based on a Gaussian function and a posture state membership function based on a bell-shaped function to obtain a membership function set; map and transform the normalized speed index and the normalized posture index through the membership function set to obtain fuzzy state data.

[0153] Step S512, obtaining fuzzy state data; constructing a fuzzy rule base for speed adjustment based on control experience, including reasoning rules in the form of "IF-THEN", and obtaining a rule base matrix; using an adaptive neural network to optimize and adjust the rules in the rule base matrix to obtain an optimized rule set; substituting the fuzzy state data into the optimized rule set for fuzzy reasoning operations to obtain a rule output vector.

[0154] Step S513, obtain the rule output vector; calculate the trigger strength of each rule in the rule output vector to obtain the strength coefficient vector; use the weighted average method to weightedly combine each component of the rule output vector with the corresponding strength coefficient vector to obtain the weighted output vector; normalize the weighted output vector to obtain fuzzy output data.

[0155] The specific neuro-fuzzy control algorithm is: fuzzy neuron output y_i = ∑w_ij·exp[-(x-c_i) 2 / (2σ_i 2 )]; adaptive learning rate η(t) = η0·exp(-ξ·E(t)); weight update amount Δw_ij = η(t)·δ_i·o_j +α·Δw_ij(t-1); center update rule Δc_i = β·(x-c_i)·μ_i(x); fuzzy rule strength S_i = μ_i(x)·exp(τ·|dy / dt|); where: w_ij is the connection weight; c_i is the membership function center; σ_i is the membership function width; E(t) is the control error; ξ is the attenuation coefficient; δ_i is the error signal; o_j is the node output; α is the momentum factor; β is the learning step size; τ is the time-varying coefficient.

[0156] Step S514, obtaining fuzzy output data; constructing a defuzzification calculation model based on the center of gravity method to obtain a center of gravity calculation matrix; substituting the fuzzy output data into the center of gravity calculation matrix for integral operation to obtain a defuzzification result; limiting and quantizing the defuzzification result according to a preset speed adjustment range to obtain a speed control instruction.

[0157] Through Z-score standardization and membership conversion based on Gaussian function and bell-shaped function, the unified quantitative expression of speed state and posture state is realized; the adaptive neural network is used to optimize the fuzzy rule base to improve the adaptability and accuracy of fuzzy control rules; the weighted average method based on rule trigger strength is used for fuzzy reasoning to effectively balance the influence of each control rule; the center of gravity method is used for defuzzification and speed limit quantization to ensure the rationality and executability of control instructions. This improved fuzzy control method combines expert experience with adaptive optimization, and can flexibly adjust the control strategy according to the real-time changes of speed state and posture state, effectively improving the control accuracy and stability of the system.

[0158] According to one aspect of the present application, step S52 is specifically:

[0159] Step S521, obtain the separation state index in the tablet state vector; use the exponential smoothing method to perform time series processing on the separation state index to obtain a smooth state sequence; calculate the autocorrelation function and partial autocorrelation function of the smooth state sequence to obtain a related feature vector; construct a timing optimization objective function based on the related feature vector, including two optimization objectives of timing stability and response time, to obtain an optimization objective function.

[0160] Step S522, obtain the optimization objective function; initialize the position and velocity parameters of the particle swarm, generate a uniformly distributed initial particle swarm, and obtain an initial particle matrix; calculate the fitness value of each particle in the initial particle matrix to obtain a fitness vector; select the optimal value from the fitness vector, determine the initial global optimal position and individual optimal position, and obtain an optimal position matrix.

[0161] Step S523, obtain the initial particle matrix and the optimal position matrix; use the adaptive inertia weight strategy to update the speed and position of the particles to obtain the updated particle matrix; constrain the particles in the updated particle matrix to ensure that the position and speed are within the effective range to obtain the constrained particle matrix; calculate the new fitness value of each particle in the constrained particle matrix, update the individual optimal position and the global optimal position, and obtain the iterative optimization matrix.

[0162] The particle swarm algorithm is as follows: velocity update v_i(t+1) = χ·[w(t)·v_i(t) + c1·r1·(p_i-x_i) + c2·r2·(p_g-x_i)]; adaptive inertia weight w(t) = w_max - (w_max-w_min)·exp(-k·f_i / f_avg); contraction factor χ = 2 / |2-φ-√(φ 2 -4φ)|, φ=c1+c2; local search operator L_i = x_i + ψ·(p_g-x_i)·N(0,1); population diversity D(t) = ∑√∑(x_ij-x_j_avg) 2 / N; where: p_i is the individual optimal position; p_g is the global optimal position; fi is the current fitness; f_avg is the average fitness; k is the adjustment coefficient; ψ is the local search intensity; N(0,1) is a standard normal distribution random number.

[0163] Step S524, obtain the iterative optimization matrix; determine the iteration termination condition, and when the maximum number of iterations or the convergence threshold is met, extract the global optimal position as the final solution to obtain the optimized timing data; convert the optimized timing data into the actual triggering moment of the actuator through linear mapping to obtain the timing parameter vector; generate the triggering sequence of the actuator according to the timing parameter vector to obtain the timing control instruction.

[0164] Through exponential smoothing and time series analysis, the separation state index is processed to accurately capture the state change trend; based on the time series stability and response time, a dual-objective optimization function is constructed to achieve global optimization of the triggering time series; the particle swarm algorithm with adaptive inertia weight is used for optimization and solution, effectively avoiding local optimality; constraint processing and linear mapping are used to ensure the practicality of the optimization results. This time series control method based on intelligent optimization can maximize the system response speed while ensuring control stability, significantly improving the efficiency of the bottling process.

[0165] According to one aspect of the present application, step S53 is specifically:

[0166] Step S531, obtain the stacking state index in the tablet state vector and the track state index in the mechanism state vector; perform time window analysis on the stacking state index, calculate the sliding mean and standard deviation, and obtain the stacking statistical vector; establish a speed mapping function according to the stacking statistical vector, use piecewise linear interpolation to calculate the corresponding speed value, and obtain the initial speed vector; modify the initial speed vector in combination with the preset speed constraint condition to obtain the expected speed value.

[0167] Step S532, obtain the track state index and the expected speed value; calculate the spatial distribution characteristics of the track state index, use polynomial fitting to obtain the track state curve, and obtain the track characteristic vector; construct a track state compensation model based on the track characteristic vector, calculate the speed compensation coefficient, and obtain the compensation coefficient matrix; combine the expected speed value and the compensation coefficient matrix to construct a synchronous optimization equation to obtain the optimization equation parameters.

[0168] Step S533, obtain the optimization equation parameters; use the Lagrange multiplier method to construct a constrained optimization model, transform the synchronization control problem into a constrained optimization problem, and obtain a constrained optimization matrix; use the sequential quadratic programming method to numerically solve the constrained optimization matrix to obtain an optimization solution vector; calculate the synchronization control parameters of each execution unit according to the optimization solution vector to obtain a control parameter vector.

[0169] The synchronization optimization algorithm is as follows: synchronization error e_ij(t) = x_i(t) - x_j(t) - d_ij; coupling strength c_ij(t) = c0·exp(-γ·|e_ij|); dynamic compensation u_i(t) = ∑c_ij(t)·[ x* _j(t) - x* _i(t)] + k_p·e_i(t) + k_d· e* _i(t); adaptive gain k_p(t) = k0·[1 + μ·tanh(σ·|e_i|)]; optimization objective function J = ∑∑[q_ij·e_ij 2+ r_ij·u_i 2 ]; where: d_ij is the expected synchronization distance; c0 is the basic coupling coefficient; γ is the attenuation rate; k_p and k_d are PID parameters; μ is the gain adjustment coefficient; σ is the sensitivity parameter; q_ij and r_ij are weight coefficients.

[0170] Step S534, obtain the control parameter vector; construct a PID-based synchronous controller model, calculate the parameters of each PID controller according to the control parameter vector, and obtain a controller parameter matrix; use an adaptive fuzzy PID algorithm to adjust the controller parameter matrix online to obtain an adjustment parameter vector; generate a collaborative control instruction of the execution unit according to the adjustment parameter vector to obtain a synchronous control instruction.

[0171] By analyzing the statistical characteristics of the stacking state indicators through a sliding time window and combining piecewise linear interpolation to establish a speed mapping relationship, the desired speed can be accurately calculated; based on the polynomial fitting and compensation model of the track state, the influence of track state changes on synchronous control can be effectively overcome; the Lagrange multiplier method and sequential quadratic programming are used to solve the synchronous optimization problem, ensuring the global optimality of the optimization results; the controller parameters are adjusted online through the adaptive fuzzy PID algorithm, which improves the dynamic response performance of the system. This multi-level synchronous control strategy can accurately coordinate the actions of multiple execution units and effectively solve the synchronous control problem under high-speed operation conditions.

[0172] According to one aspect of the present application, step S54 is specifically:

[0173] Step S541, obtain speed control instructions, timing control instructions and synchronization control instructions; perform time synchronization alignment on the three types of control instructions, use cubic spline interpolation to supplement missing data points, and obtain a synchronization instruction matrix; calculate the correlation coefficient and conflict degree between each instruction in the synchronization instruction matrix to obtain a correlation vector; construct a weighted multi-objective optimization function based on the correlation vector to obtain an objective function matrix.

[0174] Step S542, obtaining the objective function matrix; using NSGA-II (non-dominated sorting genetic algorithm II) to generate the initial population of the objective function matrix to obtain the initial population matrix; performing fast non-dominated sorting and crowding calculation on the initial population matrix to obtain a hierarchical sorting vector; selecting high-quality individuals according to the hierarchical sorting vector to perform crossover and mutation operations to obtain an evolved population matrix.

[0175] Step S543, obtaining an evolutionary population matrix; calculating the fitness value of each individual in the evolutionary population matrix under different objectives to obtain a fitness matrix; using the Pareto dominance relationship to evaluate the fitness matrix to obtain a dominance relationship vector; screening a non-dominated solution set from the dominance relationship vector to obtain optimized control data.

[0176] Step S544: Obtain the optimized control data; perform dimensionality reduction processing on the optimized control data by using the principal component analysis method, extract the main control components, and obtain the dimensionality-reduced control vector; perform scale conversion and quantization processing on the dimensionality-reduced control vector according to the response characteristics of the actuator to obtain the quantization instruction matrix; encode and reorganize the quantization instruction matrix according to the preset communication protocol format to obtain the control instruction vector.

[0177] The control instruction optimization algorithm is specifically as follows: Instruction correlation degree \(R_{ij}=\sum(x_i - \mu_i)(x_j - \mu_j) / (\sigma_i\cdot\sigma_j)\); Conflict degree \(C_{ij}=1 - \exp(-\rho\cdot|dx_i / dt - dx_j / dt|)\); Multi-objective optimization function \(F = [f1(x), f2(x),..., f_m(x)]\); Pareto dominance relationship \(p>q\), for any \(i: f_i(p)\leq f_i(q)\land\) there exists \(j: f_j(p)<f_j(q)\); Crowding distance \(D_i=\sum(f_i^{j + 1}-f_i^{j - 1}) / f_i^{max}\); where: \(\mu_i\), \(\sigma_i\) are the mean and standard deviation of the instruction; \(\rho\) is the sensitivity parameter; \(f_i(x)\) is the \(i\)-th optimization objective; \(f_i^{max}\) is the maximum value of objective \(i\); \(j\) represents the sorting index. \(d\) is the partial derivative symbol.

[0178] Realize the time synchronization alignment of the control instructions through cubic spline interpolation, accurately evaluate the correlation and conflict degree between the instructions; use the NSGA-II algorithm for multi-objective optimization to obtain a set of Pareto optimal solutions; perform instruction quantization based on principal component analysis dimensionality reduction and actuator characteristics to ensure the executability of the control instructions. This collaborative optimization method effectively balances the multiple objectives of speed control, timing control, and synchronization control, and significantly improves the overall control performance of the system.

[0179] According to one aspect of the present application, step S61 is specifically as follows:

[0180] Step S611: Obtain the mechanism state vector, the tablet state vector, and the control instruction vector; perform segmented processing on the three vectors by using the sliding time window method to obtain the time series segmented matrix; calculate the time series correlation of each state and instruction in the time series segmented matrix to obtain the correlation matrix; construct a fast evaluation model based on fuzzy comprehensive evaluation, map the correlation matrix to the state score, and obtain the state score vector.

[0181] Step S612, obtain the state score vector; use wavelet transform to perform multi-scale decomposition on the state score vector, extract the state fluctuation characteristics of different frequency bands, and obtain the characteristic coefficient matrix; perform threshold processing on the characteristic coefficient matrix, filter out high-frequency noise components, and obtain the noise reduction coefficient matrix; use the wavelet reconstruction algorithm to reconstruct the signal of the noise reduction coefficient matrix to obtain real-time scoring data.

[0182] Step S613, obtain real-time scoring data; construct an adaptive threshold model, dynamically adjust the threshold parameters according to the statistical characteristics of historical data, and obtain a threshold parameter vector; compare the real-time scoring data with the threshold parameter vector to obtain a deviation labeling matrix; apply exponential smoothing method to the deviation labeling matrix for trend analysis to obtain a scoring deviation value.

[0183] Step S614, obtain the score deviation value; use the recursive least squares method to establish a mapping relationship between the score deviation value and the control compensation amount to obtain the compensation model parameters; calculate the real-time compensation control amount according to the compensation model parameters to obtain the compensation control vector; coordinate and integrate the compensation control vector with the current control instruction to generate a new control instruction to obtain the real-time optimization instruction.

[0184] The specific real-time evaluation algorithm is as follows: state score S(t) = ∑w_i·exp(-λ·|x_i-x_i^|); fluctuation feature B_j = ∑|d_j(k)| 2 ·log(scale_j); scoring bias E(t) = S(t) - S^(t); compensation model ΔU(t) = K(t)·E(t) + ∫K(τ)·E(t-τ)dτ; adaptive gain K(t) = K0·[1 + ν·sigmoid(ω·|E|)]; where: w_i is the state weight; x_i^ is the expected state; λ is the penalty factor; d_j(k) is the wavelet coefficient; scale_j is the scale parameter; S^(t) is the target score; ν is the gain adjustment coefficient; ω is the nonlinear factor.

[0185] The timing correlation between the state and the instruction is analyzed through the sliding time window, and the state is quickly scored in combination with fuzzy comprehensive evaluation; wavelet transform is used for multi-scale analysis to effectively extract the state fluctuation characteristics; trend analysis is performed based on the adaptive threshold model and exponential smoothing method to accurately identify system performance deviations; a compensation model is established through the recursive least squares method to achieve real-time optimization of control instructions. This optimization mechanism based on real-time evaluation can timely discover and correct various deviations in the control process, ensuring the long-term stable operation of the system.

[0186] In another embodiment of the present application, step S6 may also be:

[0187] Step S6, obtaining the mechanism state vector obtained in step S3, the tablet state vector obtained in step S4, and the control instruction vector obtained in step S5; calculating the mechanism operation state score, the tablet state score, and the control effect score according to preset evaluation criteria to obtain state score data; constructing a system performance evaluation index based on the state score data to obtain a performance evaluation value; adjusting the control strategy parameters according to the performance evaluation value to obtain parameter configuration data; optimizing the parameter configuration data and the control instruction vector to obtain an optimized control instruction.

[0188] Step S61, obtain the mechanism state vector, the pill state vector and the control instruction vector; calculate the mechanism operation state score according to the preset mechanism state evaluation criteria to obtain the mechanism scoring data; calculate the pill state score according to the preset pill state evaluation criteria to obtain the pill scoring data; calculate the control effect score according to the preset control effect evaluation criteria to obtain the control scoring data; combine the mechanism scoring data, the pill scoring data and the control scoring data to form the state scoring data.

[0189] Step S62, obtaining state scoring data; constructing a performance evaluation model based on a fuzzy neural network; inputting the state scoring data into the performance evaluation model for calculation to obtain an initial performance value; normalizing the initial performance value to obtain a performance evaluation value.

[0190] Step S63, obtaining a performance evaluation value; constructing a parameter optimization objective function according to a preset performance optimization criterion; applying a genetic algorithm to solve the parameter optimization objective function to obtain an optimized parameter set; and reorganizing the optimized parameter set according to a preset format to obtain parameter configuration data.

[0191] Step S64, obtaining parameter configuration data and a control instruction vector; performing correction calculation on the control instruction vector according to the parameter value in the parameter configuration data to obtain corrected instruction data; converting the format of the corrected instruction data according to the actuator control requirements to obtain an optimized control instruction.

[0192] According to one aspect of the present application, a stacked bottle filling control system integrating an image and a photoelectric sensor is also provided, comprising:

[0193] at least one processor; and

[0194] a memory communicatively connected to at least one of the processors; wherein,

[0195] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the stacking bottling control method integrating image and photoelectric sensors as described in any of the above technical solutions.

[0196] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.

Claims

1. A stacking bottling control method integrating image and photoelectric sensors, characterized in that: The steps include: Step S1, obtaining signals collected by a photoelectric sensor, a pressure sensor and a vibration sensor, performing filtering and time alignment processing, and obtaining a multi-source synchronous data matrix; Step S2, obtaining the original image data collected by the visual camera; performing preprocessing, edge feature extraction and posture parameter calculation to obtain visual feature data; fusing the visual feature data with the multi-source synchronous data matrix to obtain visual reference data; Step S3, based on the multi-source synchronous data matrix and the visual reference data; analyzing the vibration characteristics, track state and running speed of the equipment to obtain the evaluation results of the vibration state, track state and speed state; combining the evaluation results of each state to obtain the mechanism state vector; Step S4, based on the multi-source synchronous data matrix and the visual reference data; analyzing the separation state, posture state and stacking state of the tablets to obtain corresponding state indicators; comprehensively evaluating each state indicator and the mechanism state vector to obtain the tablet state vector; Step S5, according to the mechanism state vector and the tablet state vector; calculate the feeding speed compensation value, trigger time and synchronization parameters, obtain the speed control instruction, timing control instruction and synchronization control instruction; coordinately optimize each control instruction to obtain the control instruction vector; Step S3 is specifically as follows: Step S31, obtaining second vibration data and a spectrum feature vector; performing Hilbert transform on the second vibration data to obtain vibration envelope data; calculating statistical characteristic parameters of the vibration envelope data to obtain a vibration intensity index; extracting the amplitude ratio of characteristic frequency components according to the spectrum feature vector to obtain a spectrum feature index; weightedly fusing the vibration intensity index and the spectrum feature index according to preset weights to obtain a vibration state index; Step S32, obtaining a binarization matrix and visual reference data; Calculate the light intensity distribution curve of the binary matrix along the track direction to obtain the light intensity distribution data; perform segmented statistical analysis on the light intensity distribution data, calculate the variance and mean of each segment, and obtain the light intensity characteristic index; match the light intensity characteristic index with the track area characteristics in the visual reference data to obtain the track state index; Step S33, obtaining a binary matrix; calculating the instantaneous speed according to the change of the tablet position in the binary matrix at adjacent sampling moments to obtain the original speed data; applying the Kalman filter algorithm to smooth the original speed data to obtain filtered speed data; Calculate the fluctuation range and mean deviation of the filtered speed data to obtain the speed status index; Step S34, obtaining a vibration state index, a track state index and a speed state index; constructing an evaluation matrix according to a preset state evaluation criterion; substituting the vibration state index, the track state index and the speed state index into the evaluation matrix for comprehensive calculation to obtain a mechanism state vector; Step S4 is specifically as follows: Step S41, obtaining a multi-source synchronous data matrix and visual reference data; extracting a binarization matrix from the multi-source synchronous data matrix, and extracting an edge feature matrix from the visual reference data; Construct a three-state Markov chain model according to preset state characteristic parameters; calculate the state transition probability of the binary matrix and the edge characteristic matrix to obtain a transition probability matrix; Calculate the current state probability distribution based on the transition probability matrix and obtain the separation state index; Step S42, obtaining a binary matrix in the multi-source synchronous data matrix; Calculate the geometric moment features of the tablet pattern in the binary matrix to obtain posture feature data; Construct state space equations and observation equations based on attitude feature data; apply the improved Kalman filter algorithm to iteratively calculate the state space equation to obtain attitude prediction data; obtain attitude state indicators based on the deviation between attitude prediction data and actual observation values; Step S43, obtaining the pressure feature vector in the multi-source synchronous data matrix; performing fuzzy quantization on the pressure data and the pressure change rate data in the pressure feature vector; The membership degree of the stacking degree is calculated according to the preset fuzzy rule base to obtain fuzzy evaluation data; the fuzzy evaluation data is defuzzified by the centroid method to obtain the stacking state index; Step S44, obtaining a separation state index, a posture state index and a stacking state index; constructing a state evaluation matrix according to a preset evaluation weight; substituting all state indicators into the state evaluation matrix for weighted fusion calculation to obtain a state comprehensive index; comparing and judging the state comprehensive index with a preset state threshold to obtain a tablet state vector; Step S5 is specifically as follows: Step S51, obtaining the speed state index in the mechanism state vector and the posture state index in the pill state vector; performing fuzzy quantization processing on the speed state index and the posture state index to obtain fuzzy state data; calculating the speed adjustment amount according to the preset fuzzy control rule to obtain fuzzy output data; performing defuzzification calculation on the fuzzy output data to obtain a speed control instruction; Step S52, obtaining the separation state index in the tablet state vector; constructing a timing optimization objective function based on the separation state index; applying a particle swarm algorithm to iteratively solve the timing optimization objective function to obtain optimized timing data; converting the optimized timing data into an actuator triggering moment to obtain a timing control instruction; Step S53, obtaining the stacking state index in the tablet state vector and the track state index in the mechanism state vector; calculating the expected conveying speed according to the stacking state index to obtain the expected speed value; constructing a synchronous optimization equation based on the track state index and the expected speed value; solving the synchronous optimization equation to obtain a synchronous control instruction; Step S54, obtain speed control instructions, timing control instructions and synchronization control instructions; construct a multi-objective collaborative optimization model; substitute the speed control instructions, timing control instructions and synchronization control instructions into the multi-objective collaborative optimization model for solving to obtain optimized control data; decompose and format the optimized control data to obtain a control instruction vector.

2. The stacking bottle control method integrating image and photoelectric sensors according to claim 1 is characterized in that: Step S1 is specifically as follows: Step S11, obtaining a first signal matrix collected by the photoelectric sensor array; performing a convolution operation on each signal value in the first signal matrix and a preset high-pass filter function to obtain a second signal matrix; calculating a signal variance based on the signal values ​​in the second signal matrix, and dynamically updating upper and lower threshold parameters according to the signal variance; performing a comparison operation on each signal value in the second signal matrix and the upper and lower threshold parameters to obtain a binarization matrix; Step S12, obtaining first pressure data collected by the pressure sensor; Performing a convolution operation on the first pressure data and a preset low-pass filter coefficient to obtain second pressure data; calculating a difference value based on the second pressure data at adjacent sampling moments to obtain pressure change rate data; and combining the second pressure data and the pressure change rate data to form a pressure feature vector; Step S13, obtaining first vibration data collected by the vibration sensor; performing wavelet transform on the first vibration data according to a preset decomposition scale to obtain wavelet coefficients of different frequency bands; calculating an adaptive threshold according to the signal energy distribution of each frequency band, performing denoising on the wavelet coefficients to obtain denoised wavelet coefficients; performing inverse wavelet transform reconstruction on the denoised wavelet coefficients to obtain second vibration data; performing Fourier transform on the second vibration data to extract characteristic frequency components to obtain a frequency spectrum feature vector; Step S14, extracting the timestamp information of each data based on the binarization matrix, the pressure eigenvector, the second vibration data and the spectrum eigenvector, and establishing a unified time base; performing cubic spline interpolation calculation on all data according to the time base to obtain aligned data at a unified sampling time; reorganizing the aligned data according to a preset format to obtain a multi-source synchronous data matrix.

3. The stacking bottle control method integrating image and photoelectric sensors according to claim 2 is characterized in that: Step S2 is specifically as follows: Step S21, obtaining the original image data collected by the visual camera; calculating the grayscale histogram of the original image data, and adaptively adjusting the image enhancement parameters according to the histogram distribution characteristics; performing contrast adjustment and brightness compensation on the original image data according to the image enhancement parameters to obtain an enhanced image; performing a convolution operation on the enhanced image and a preset Gaussian convolution kernel to obtain a preprocessed image; Step S22, obtaining a preprocessed image; calculating the image gradient amplitude and direction of the preprocessed image to obtain a gradient feature matrix; calculating an adaptive segmentation threshold using the OTSU algorithm according to the statistical characteristics of the gradient feature matrix; performing edge extraction operation on the preprocessed image according to the adaptive segmentation threshold to obtain an edge feature matrix; Step S23, obtaining an edge feature matrix; performing connected domain analysis on the edge feature matrix to extract geometric feature parameters of the tablet contour; calculating the center coordinates, direction angle and area parameters of the tablet according to the geometric feature parameters to obtain a posture feature vector; combining the edge feature matrix and the posture feature vector in a preset format to obtain visual feature data; Step S24, obtaining visual feature data and the multi-source synchronous data matrix obtained in step S1; constructing a data fusion evaluation index according to a preset feature weight parameter; performing weighted fusion calculation on the visual feature data and the corresponding features in the multi-source synchronous data matrix to obtain visual reference data.

4. The stacking bottling control method integrating image and photoelectric sensors according to claim 3 is characterized in that: Step S22 is specifically as follows: Step S221, obtaining a preprocessed image; constructing Sobel operators in the horizontal and vertical directions to obtain a direction operator matrix; performing a two-dimensional convolution operation on the preprocessed image and the direction operator matrix respectively to obtain a horizontal gradient matrix and a vertical gradient matrix; combining the horizontal gradient matrix and the vertical gradient matrix to obtain a gradient feature matrix; Step S222, obtaining a gradient feature matrix; calculating a distribution histogram of non-zero gradient values ​​in the gradient feature matrix to obtain a gradient distribution vector; performing Gaussian smoothing on the gradient distribution vector to obtain a smoothed distribution vector; calculating inter-class variance and intra-class variance based on the smoothed distribution vector to obtain a variance feature vector; Step S223, obtain the variance feature vector; according to The variance feature vector uses the OTSU algorithm to iteratively calculate the maximum value of the inter-class variance to obtain an iterative optimization vector; the grayscale value corresponding to the maximum value is selected from the iterative optimization vector to obtain an adaptive segmentation threshold; the adaptive segmentation threshold is substituted into the sigmoid function for scale transformation to obtain a correction threshold parameter; Step S224, obtaining a preprocessed image and correction threshold parameters; performing adaptive threshold segmentation on the preprocessed image according to the correction threshold parameters to obtain a binary edge map; performing connected domain analysis and morphological processing on the binary edge map to obtain a connected edge map; performing edge tracking and connection on the connected edge map according to a preset edge connection rule to obtain an edge feature matrix.

5. The stacking bottle control method integrating image and photoelectric sensors according to claim 3 is characterized in that: Step S31 is specifically as follows: Step S311, obtaining second vibration data; performing windowing processing on the second vibration data using a Hanning window function to obtain a windowed sequence; calculating an analytical signal for the windowed sequence, constructing a Hilbert transform integral kernel, and obtaining a transform kernel matrix; performing a convolution operation on the windowed sequence and the transform kernel matrix to obtain a complex analytical signal; calculating an amplitude envelope of the complex analytical signal to obtain vibration envelope data; Step S312, obtaining vibration envelope data; Calculate the peak value, root mean square value, waveform factor and peak factor of the vibration envelope data to obtain the time domain eigenvector; use the empirical mode decomposition method to extract the components of the vibration envelope data to obtain the intrinsic mode function; calculate the energy distribution of the intrinsic mode function to obtain the energy distribution vector; construct a vibration intensity evaluation model based on the time domain eigenvector and energy distribution vector to obtain the vibration intensity index; Step S313, obtaining a frequency spectrum feature vector; dividing the frequency spectrum feature vector into frequency bands, calculating the energy proportion of each frequency band, and obtaining a frequency band energy vector; using a power spectrum density estimation method to analyze the frequency band energy vector, extracting the amplitude information of the characteristic frequency, and obtaining a characteristic amplitude matrix; The relative amplitude ratio of each characteristic frequency component is calculated according to the characteristic amplitude matrix to obtain the spectrum characteristic index; Step S314, obtaining the vibration intensity index and the spectrum feature index; constructing a feature fusion model based on support vector regression, training the mapping relationship between the vibration intensity index and the spectrum feature index, and obtaining the regression model parameters; using the adaptive weight method to calculate the fusion coefficient and obtain the weight coefficient vector; performing weighted combination of the feature indicators according to the regression model parameters and the weight coefficient vector to obtain the vibration state index.

6. The stacking bottle control method integrating image and photoelectric sensors according to claim 3 is characterized in that: Step S42 is specifically as follows: Step S421, obtaining a binarized matrix in the multi-source synchronous data matrix; extracting the central moment, principal axis of inertia and eccentricity of the pill pattern in the binarized matrix by image moment calculation to obtain a moment feature vector; calculating the minimum circumscribed rectangle and fill ratio of the pill pattern in the binarized matrix to obtain a shape feature vector; combining the moment feature vector and the shape feature vector to obtain posture feature data; Step S422, acquiring posture feature data; constructing a state vector including position, posture angle and angular velocity to obtain a state variable vector; establishing a state transfer matrix according to a tablet kinematic model to obtain a transfer matrix; Calculate the covariance matrix of the observation noise to obtain the observation noise matrix; The state variable vector, the transfer matrix and the observation noise matrix are combined to construct the state space equation and the observation equation to obtain the state space model; Step S423, obtaining a state space model; Adaptive factor method is used to dynamically adjust the process noise covariance matrix to obtain an adaptive noise matrix; the calculation equation of the gain matrix is ​​constructed based on the minimum mean square error criterion to obtain a gain calculation model; The Kalman filter algorithm is improved according to the adaptive noise matrix and gain calculation model to obtain an improved filter model; Use the improved filter model to iteratively calculate the state space model to obtain the posture prediction data; Step S424, obtain the posture prediction data and the posture feature data at the current moment; calculate the Euclidean distance between the posture prediction data and the posture feature data to obtain a distance error vector; use the exponentially weighted moving average method to smooth the distance error vector to obtain a smoothed error vector; compare and calculate the smoothed error vector with a preset evaluation standard to obtain a posture state index.

7. A stacking bottle control system integrating image and photoelectric sensors, characterized in that: include: at least one processor; as well as a memory communicatively connected to at least one of the processors; wherein, The memory stores instructions executable by the processor, and the instructions are used to be executed by the processor to implement the stacked bottle filling control method integrating image and photoelectric sensors according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Tablet bottling control system

    CN117141858A

  • Residual piece detecting and removing device and method

    CN118527377A