Adaptive Program and Control Method for Drying and Roasting Nuts with Skin Based on Real-Time Monitoring
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-08-14
AI Technical Summary
[0002]目前,带皮坚果的烘干烘熟操作在食品加工行业中十分普遍,其成品口感与货架期直接受烘干过程控制精度的影响;传统的烘干方法以人工经验为主,操作人员依靠定时查看、手摸感知或简单温度计读数来判断烘干进度并手动调节加热档位;这种方式对人的依赖较大,不同班次、不同人员之间容易产生操作差异,导致批次间品质波动明显
[0011]1、通过捕捉坚果跌落碰撞的脉冲间隔和幅度衰减序列,直接反映物料内部物性的变化趋势;这种做法的依据来自物料本身,相比单纯依赖环境温湿度的方式,更能贴近真实的烘干进程。
Smart Images

Figure CN122569003A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of adaptive drying control technology, and more specifically, to an adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring. Background Technology
[0002] Currently, the drying and roasting of nuts with skin is very common in the food processing industry. The taste and shelf life of the finished product are directly affected by the precision of the drying process control. Traditional drying methods rely mainly on manual experience. Operators judge the drying progress and manually adjust the heating level by checking regularly, feeling by touch, or reading simple thermometers. This method is highly dependent on people, and differences in operation between different shifts and different personnel can easily occur, resulting in significant batch-to-batch quality fluctuations.
[0003] However, in practical use, it still has some shortcomings, such as: most control methods mainly focus on parameters such as ambient temperature and humidity, lacking a direct and effective way to perceive how the internal physical properties of the nuts change during the drying process; even if some solutions introduce acoustic or vibration signals, they mostly compress the raw data into statistical values such as mean and variance, discarding the structural information arranged in chronological order in the original signal, and reducing the distinguishability between different stages; many systems still rely on technicians to pre-set fixed process curves to run, and since the moisture content of raw materials fluctuates between batches, or if the variety is changed midway, the parameters have to be retested and adjusted, which does not improve efficiency; when different varieties are produced on mixed production lines, it is also common to use control parameters interchangeably, making it difficult to achieve such precise management. Summary of the Invention
[0004] In order to overcome the above-mentioned defects of the prior art, the present invention provides an adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring, which solves the problems mentioned in the background art through the following scheme.
[0005] To achieve the above objectives, the present invention provides the following technical solution: an adaptive program and control method for drying and ripening nuts with skin based on real-time monitoring, comprising:
[0006] S1. Signal Acquisition and Pulse Feature Extraction: Simultaneously acquire three signals: acoustic, temperature, and motor current signals from the drying drum. Jointly identify the drum phase to divide the acoustic event window, extract acoustic event segments to construct an event stream, and extract the total number of pulses, pulse interval sequence, and amplitude attenuation sequence within the event segment to generate a variable-length original feature vector.
[0007] S2. Topology network construction and baking status determination: Based on the variable length original features, a dual-scale sliding window segmentation process is adopted to construct a dual-channel DTW embedding vector, and an elastic state bias is introduced to calculate the comprehensive similarity of nodes. A weighted topology graph is built to extract a four-dimensional topology feature vector. This feature vector is input into a hidden Markov model to decode and determine the baking stage. Combined with confidence verification, a stage transition event is generated.
[0008] S3, State Machine Drive Control: Based on stage transition events, drive the five-state finite state machine to migrate unidirectionally in sequence, retrieve the preset heating power and damper opening corresponding to the current baking stage, and send them to the actuator to adjust the drying operation conditions in real time and count the actual dwell time of each stage.
[0009] S4. Batch-to-batch self-optimization: After each batch ends, the topological features, stage results and quality data are archived for weighted updates of HMM observation parameters; control parameters are corrected according to the deviation of actual residence time and ideal value in each stage; parameters of different varieties are stored independently and saved according to preset conditions; when the quality score meets the trigger conditions, the recalibration of the entire set of parameters is initiated.
[0010] The technical effects and advantages of this invention are as follows:
[0011] 1. By capturing the pulse interval and amplitude decay sequence of falling nuts, the changing trend of the internal properties of the material can be directly reflected. This approach is based on the material itself and is closer to the actual drying process than simply relying on ambient temperature and humidity.
[0012] 2. The variable-length acoustic event sequence is first embedded using DTW, then subjected to graph topology analysis, and finally transformed into fixed-dimensional features. In this process, the temporal structure is not lost, and the ability to distinguish stages is better than the conventional approach of simply calculating the mean and variance.
[0013] 3. Before the state machine takes action, it checks two conditions: whether the confidence level is met and whether the stage has changed. The transition is only executed when both conditions are met. Therefore, even if the topology features fluctuate briefly due to signal fluctuations, it will not easily trigger control actions, and the entire operation can maintain a relatively stable state.
[0014] 4. Parameters for each product are stored independently; when adjusting damper and power settings, the system will select the batches with the highest quality and use the residence time data of these batches as the basis for correction; when the quality continues to decline, the recalibration process can be automatically started, reducing the workload of technicians to manually adjust parameters repeatedly. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the overall structure of the present invention.
[0016] Figure 2This is a schematic diagram of the S1 signal acquisition and pulse feature extraction process of the present invention.
[0017] Figure 3 This is a schematic diagram of the S2 topology network construction and baking status determination process of the present invention.
[0018] Figure 4 This is a schematic diagram of the S3 state machine driven control process of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] refer to Figure 1 - Figure 4 The adaptive program and control method for drying and roasting nuts with skin, based on real-time monitoring, shown includes:
[0021] S1: Signal Acquisition and Pulse Feature Extraction
[0022] S101: Synchronous acquisition of multi-source signals:
[0023] A waterproof, high-sensitivity microphone is installed on the inner wall of the drum of the nut drying equipment to collect acoustic signals. A thermal resistance temperature sensor is installed inside the drum to collect ambient temperature signals. A current transformer is installed on the power supply line of the drum drive motor to collect the real-time current signal of the motor.
[0024] The three signal sources are sampled synchronously at a sampling frequency of 44,100 Hz and share a high-precision clock source as the sampling trigger reference to ensure the precise alignment of the three signals on the time axis.
[0025] S102: Drum Phase Recognition and Event Window Division:
[0026] The motor current signal is bandpass filtered (passband 0.5Hz-5Hz) to extract the low-frequency envelope and identify the periodic changes in the load torque to obtain the drum rotation period;
[0027] Simultaneously, short-time energy envelopes are extracted from acoustic signals to locate the time intervals where energy peaks are concentrated, and joint phase determination is performed by combining the peak-to-valley ratio of the current envelope and the acoustic envelope.
[0028] The calibration method for the peak-to-valley ratio threshold ξ (dimensionless, ranging from 2 to 5) is as follows: Iterate through ξ from 2 to 5 (step size 0.5) on the calibration dataset, calculating the phase recognition accuracy using the manually labeled start and end times of the release zone as the true values, and selecting the ξ value with the highest accuracy. If the optimal value in the coarse search is located at the interval boundary, expand outward by one step and search again; if it is located inside, perform a fine search within the range of the optimal value ± 0.5 with a step size of 0.1. The first batch runs with ξ=3. If the change in ξ after iteration is greater than 10... -3 The calibration process is iterated a maximum of 5 times; if the limit is exceeded, an alarm is recorded. Recalibration is recommended after 10 batches of stable closed-loop operation. This includes recalibrating batches where there is no open-loop protection and the subsequently defined quality score Q is used. score A value of 80% or more of the historical average is considered to be in stable operation.
[0029] The release zone where the nuts fall from a height during each rotation cycle is defined as the acoustic event window, with the start point of the release zone as the start point of the window and the end point as the end point of the window. If the release zone cannot be effectively identified for three consecutive rotation cycles, the system issues a sensor cleaning prompt and pauses baking.
[0030] S103: Acoustic event segment extraction and event flow construction:
[0031] Based on the event window defined in S102, the corresponding signal segment is extracted from the continuous acoustic signal and defined as acoustic event segment E. n Where n is the event number; all event segments are arranged in chronological order to form an acoustic event stream, and a timestamp t is added to each event segment. n (Unit: seconds) and current ambient temperature T n (Unit: degrees Celsius, average of temperature sensor readings within the event window).
[0032] S104: Sub-collision pulse detection and localization:
[0033] Envelope extraction is performed on the waveform signal of each acoustic event segment. Using three times the root mean square value of the background noise as an adaptive threshold, all peak points exceeding the threshold in the envelope are located, and the total number of pulses K detected within that event segment is recorded. n (dimensionless integer), and the kth pulse (k=1,...,K) n The arrival time τ n,k (Unit: seconds) and peak amplitude A n,k (Units are related to sound pressure, dimensionless relative values).
[0034] S105: Extraction of inter-pulse time interval sequence:
[0035] For the k-th and (k+1)-th pulses (k=1,...,K) n -1), calculate the time difference D between adjacent pulses. n,k=τ n,k+1 -τ n,k The unit is seconds, forming the time interval sequence DT for this event segment. n =[D n,1 D n,2 , ..., D n,Kn-1 This sequence completely records the time interval information between all adjacent pulses within the event segment, and its length varies with K. n change.
[0036] S106: Pulse amplitude decay sequence extraction:
[0037] For the k-th and (k+1)-th pulses, calculate the amplitude attenuation ratio R. n,k =A n,k+1 / A n,k assemble them into an amplitude decay sequence RA n =[R n,1 R n,2 , ..., R n,Kn-1 This sequence fully records the energy loss ratio information between all adjacent pulses within the event segment; similarly, its length varies with K. n change.
[0038] The drum speed is controlled by vector control via frequency converter, keeping the speed constant at ω0=12 rpm, with fluctuations suppressed within ±1%, eliminating the need for speed normalization.
[0039] S107: Construction of original features for event segments:
[0040] The original feature vector for each event segment is X. n ={K n DT n RA n}. Due to the different event segments K n Different, DT n and RA n The length of X also changes accordingly, therefore n The dimensions are not fixed.
[0041] S2: Topology network construction and baking status determination:
[0042] S201: Dual-scale sliding window capture:
[0043] A dual-scale sliding window strategy is adopted:
[0044] The large-scale training window has a step size of 120 event segments, corresponding to 10 minutes. Assuming a drum rotation speed of ω0 = 12 revolutions per minute, each event segment is 5 seconds long, synchronized with subsequent manual sampling intervals. The window width M is calibrated as follows: Starting from the first segment of the event stream on the calibration dataset, different lengths M (20 to 50, step size 5) are truncated in a sliding pattern of 5 segments, and the global clustering coefficient C within the window is calculated. m The coefficient of variation is calculated, and the value of M that minimizes the coefficient of variation is selected; M is a dimensionless integer representing the number of event segments contained in each window.
[0045] The small-scale online inference step size is fixed at 30 event segments (2.5 minutes) and decoupled from the calibration value of M. If M is not equal to 30 after calibration, overlap or gaps are allowed between inference windows, but each inference window extracts topological features independently.
[0046] The training window starts at point n (M, M+120, M+240, ...), with its center at nM / 2. The inference window starts at point m (M, M+30, M+60, ...), with its center at mM / 2. The time difference between the training window label (at the time of manual sampling) and the window center does not exceed 2.5 minutes. When updating the training window, the feature vector Y of the inference window closest to its center is used. m .
[0047] If there is a valid event segment (i.e., K) in the window n If the segment with a value greater than 0 and a normal waveform is less than 0.8M, then skip this window; the stage determination result Φ of the skipped inference window. m (Dimensionless integers 1-5, corresponding to 5 baking stages) are set as the judgment result of the previous valid window, with a confidence level Γ. m (Dimensionless, range 0-1) Set to 0.
[0048] S202: Dual-channel DTW embedding and flexible state coding:
[0049] The first step is to convert the total number of pulses into an elastic state value between 0 and 1, denoted as z. n The conversion formula is: z n =min(K n / 4,1); It should be further explained that z n Dimensionless, reflecting the elasticity of nuts; the closer the value is to 1, the better the elasticity, and the closer it is to 0, the worse the elasticity.
[0050] The second step is to construct a dual-channel base pattern library; the number of clusters, D0, is calculated as min(5 + ⌊N). batch / 10⌋,20), where N batch The number of batches completed for the current variety; each base pattern is defined as the dynamic time-normalized centroid of all samples in that class;
[0051] Each time D0 increases, the new class is re-clustered using at least the most recent 10 batches of data accumulated since the last expansion, ensuring that each base pattern is based on the statistical basis of no less than 5 samples; the expansion of the base pattern library is decoupled from the subsequent cold restart of HMM parameters, with an interval of one batch.
[0052] The time interval base pattern library is denoted as {BP1} DT , ..., BP D0 DT The amplitude attenuation base mode library is denoted as {BP1}. RA , ..., BP D0 RA}
[0053] The third step is to set event segment E. i DT i and RA i The distance sequence dist is obtained by performing DTW alignment with two base patterns respectively. i,d DT and dist i,d RA (d=1, ..., D0, with units consistent with the dimensions of the corresponding sequence).
[0054] The fourth step is to generate the dual-channel response intensity;
[0055] The formula for calculating the response intensity is:
[0056] h i,d DT =exp(-dist i,d DT / σ DT );h i,d RA =exp(-dist i,d RA / σ RA );
[0057] Where σ DT and σ RA Each of the dist in the training set DT and dist RA The standard deviation of the distance (with the same dimension as the corresponding distance) ensures that distances with different dimensions are comparable after being normalized by their respective standard deviations. The two sets of response intensities are concatenated into an embedding vector H. i =[h i,1 DT , ..., h i,D0 DT h i,1 RA , ..., h i,D0RA (Dimensionless, dimension 2D0). If ||H i ||<10 -6 This node is marked as an isolated node and does not participate in the subsequent k-nearest neighbor selection, but its local clustering coefficient and weighting degree are set to 0 in the topological feature calculation.
[0058] Fifth, add a flexible state consistency reward bias, with the formula: δ i,j =0.1*(1-|z i -z j |); If the elastic states of the two event segments are exactly the same, the reward value is 0.1; when the difference reaches its maximum, the reward value is still 0.025.
[0059] S203: k-nearest neighbor graph construction:
[0060] For any two non-isolated nodes within the current inference window, the comprehensive similarity calculation method is as follows:
[0061] The choice of primary similarity depends on the operational phase. In the initial stage of system startup, within the first 5 closed-loop effective batches, or when the base pattern library size D0 is less than 10, Spearman's rank correlation coefficient is used; when neither of these conditions is met, i.e., when there are more than 5 closed-loop effective batches and D0 reaches 10 or above, cosine similarity is used instead; a closed-loop effective batch refers to a normal batch that has not generated alarms under closed-loop control.
[0062] Time regularization term R i,j time =exp(-|ij| / τ), is used to add weights to nodes that are temporally adjacent, where τ is the temporal decay scale, which controls the decay rate of temporal proximity. Its calibration method is as follows: calculate the decay curve of the autocorrelation coefficient of each topological feature dimension with the number of lag steps on the calibration dataset, and find the number of lag steps when each dimension first drops to 1 / e; if the standard deviation of the number of steps given by each dimension exceeds 50% of the mean, then take the median; otherwise, take the average.
[0063] Overall similarity S i,j =sim(i,j)*R i,j time +δ i,j (Dimensionless) and simultaneously considers acoustic morphological similarity (primary similarity), temporal proximity (temporal regularization term) and elastic state consistency (reward bias).
[0064] Press S on each node i,j Select the first k nodes from largest to smallest to construct an undirected edge, with edge weight W. i,j =S i,j(Dimensionless). The method for determining the nearest neighbor number k is as follows: Using a permutation test, while keeping the temporal order unchanged on the calibration dataset, the correspondence between event segments and feature vectors is randomly shuffled to generate a random graph. The graph is traversed from k=3 to 8, and the k value with the largest difference in modularity between the real graph and the random graph is selected.
[0065] Constructing a weighted sparse graph G m =(V m inf W m ), where V m inf W represents the set of nodes in the current inference window. m Let be the edge weight matrix.
[0066] S204: Network Topology Feature Extraction
[0067] Extract four global topological features:
[0068] Feature 1: Weighted global clustering coefficient C m (Dimensionless, range 0-1); The Barrat weighted clustering coefficient is used to calculate the local clustering coefficient of each node and then take the global average to measure the tendency of nodes in the network to form clusters.
[0069] Feature 2: Network modularity Q m (Dimensionless, range -0.5-1); The Newman modularity formula is used, and the Louvain algorithm is used for community partitioning to measure the degree to which the network is divided into several subgroups of nodes with tight internal connections and sparse external connections.
[0070] Feature 3: Average Weighting ,in is the weighted degree (dimensionless) of node i, which measures the average level of connection strength among all nodes in the network.
[0071] Feature 4: Global edge weight variance ,in Let be the set of edges of the graph. The average edge weight measures the dispersion of the difference between event segments.
[0072] Calculate the effective node rate η valid =N valid / M, where N valid η is the number of non-isolated nodes within the window; if η valid If the value is less than 0.8, the current window feature is invalid, and the system maintains the previous state — Φ m Set as the result of the previous valid window, Γ m =0. If all 6 consecutive inference windows are η validIf the value is less than 0.8, it is determined to be a persistent sensor failure or a severe deterioration of the acoustic signal. The system will then force a switch to open-loop timing control and issue an alarm.
[0073] In summary, construct the four-dimensional feature vector Y. m =[C m Q m , , Var(W)], are used as the observation inputs for the HMM.
[0074] S205: HMM State Decoding and Stage Determination:
[0075] Hot start method: The first batch adopts open-loop control with a fixed time-temperature curve, and the moisture content is manually sampled and measured every 10 minutes and the stage is marked;
[0076] Furthermore, the five stages correspond to the following moisture content ranges: >30%, 30%-18%, 18%-12%, 12%-8%, and <8%.
[0077] The window step size of 120 event segments is synchronized with the sampling interval to obtain approximately 7 labeled samples. The Baum-Welch algorithm is used to estimate the initial parameters of the HMM.
[0078] The Hidden Model (HMM) configuration includes: 5 hidden states corresponding to 5 baking stages; the observation probabilities use a single Gaussian model with diagonalized covariance, where each state has only 8 parameters, allowing for stable initialization with small samples; a regularization term of 10 is added during training. -4 The state transition matrix constraint only allows forward transitions between adjacent states, therefore: A j,j =0.7, A j,j+1 =0.3, A 5,5 =1.0, and the rest are 0; the initial state distribution is [1, 0, 0, 0, 0].
[0079] Cold start protection: Calculate the log-likelihood value Λ of the current batch. batch (Dimensionless) and reference closed-loop batch Λ ref The relative rate of change (dimensionless) ΔΛ = (Λ batch -Λ ref ) / |Λ ref | (dimensionless). If there is no reference closed-loop batch, the switching condition is "accumulating 3 normal batches that have not triggered open-loop protection" (open-loop protection batches are not counted, and normal batches are not required to be consecutive, but when interleaving open-loop batches, it is necessary to verify that ΔΛ≧-0.3 of the two most recent normal batches). If ΔΛ<-0.3, it is determined that the HMM has degraded, and it is switched back to open-loop operation for one batch.
[0080] It needs to be further explained that Λ ref The update conditions are as follows:
[0081] (1) This batch is in closed-loop mode; (2) Quality score Q score Not lower than 80% of the historical average; if fewer than 10 batches, not lower than the expected quality score Q. expected 70%.
[0082] Among them, Q expected The results were determined through standard baking experiments and stored in the variety parameter set. This screening mechanism ensures that Λ ref Only from closed-loop batches that meet quality standards, to avoid abnormal data contaminating the reference benchmark.
[0083] After entering the closed-loop operation phase, the feature vector Y is extracted every 2.5 minutes. m The data is fed into an HMM, and the Viterbi algorithm is used to calculate the most likely state sequence, yielding the stage determination result Φ. m To reduce false positives, a sliding majority vote is performed on the judgment results of L consecutive inference windows, and the voting result is used as the final output. The value of L is first linearly interpolated to obtain the actual time of the stage transition on the calibration dataset. Then, L is iterated from 2 to 6, and the transition delay time (after deducting the lag of the voting window itself, i.e., (L-1) / 2 steps) and false alarm rate are calculated for each value. A trade-off curve is plotted, and the L value corresponding to the inflection point is taken as the final value.
[0084] S206: Confidence Assessment and Event Triggering:
[0085] Calculate the maximum probability Γ of the current state output by the Viterbi algorithm. m (Dimensionless, range 0-1) is used as the confidence level. A threshold Γ is set. th (Dimensionless, range 0-1). Γ th The calibration method is as follows: linear interpolate the true values of the stage transition on the calibration dataset, traversing Γ th From 0.60 to 0.90 (step size 0.05), the true positive rate and false positive rate are calculated using the manually labeled stage transition time as the true value. ROC curves are plotted, and the threshold corresponding to the maximum difference between the true positive rate and the false positive rate is taken.
[0086] The generation of the phase transition event has a trigger condition: it only occurs when the confidence level Γ m Reaching the threshold Γ th The above, and the current stage determines Φ m Compared to the previous window Φ m-1 The transition event E is only output when a change actually occurs. trans ={Φ old →Φ new}, where Φ old =Φ m-1 , Φ new =Φ mIf any condition is not met, the stage determination result remains unchanged. The purpose of setting this threshold is to prevent topological features from being falsely triggered due to short-term fluctuations and to ensure the reliability of state transitions.
[0087] S3: State machine driven control:
[0088] S301: Finite State Machine and Control Parameter Table:
[0089] The drum rotates at a constant speed of 12 revolutions per minute; a five-state finite state machine is used, and the control parameters for each state are as follows:
[0090] A (preheating), heating power 100%, damper opening 20%;
[0091] B (Rapid Dehydration), heating power 95%, damper opening 90%;
[0092] C (color fixing and shaping), heating power 75%, damper opening 60%;
[0093] D (slow drying), heating power 45%, damper opening 40%;
[0094] E (baking and heat preservation), heating power 5%, damper opening 10%;
[0095] Define P j V is the heating power. j For damper opening;
[0096] Ideal length of stay I ideal j The initial value was determined through a standard baking experiment: a standard batch was run under laboratory conditions using default parameters, and the average actual residence time at each stage was used as the initial value; the quality score Q obtained from the same batch of experiments was... expected This information is also stored in the variety parameter set. As production batches accumulate, the system selects the top 10% of batches in terms of quality score from the normal batches under closed-loop control, and updates the I-value using the average residence time of these batches at each stage. ideal j .
[0097] Quality rating Q score The definition is as follows:
[0098] Qscore = 0.5 * (1 - |W real -W target | / W target +0.3S color +0.2S integrity W target =8% is the target moisture content, W real S represents the actual moisture content of the sample. colorFor color scoring, the color difference ΔE measured by the colorimeter is set according to S. color =max(0, 1-ΔE / 20) is used for calculation; S integrity To determine the whole kernel rate, the average value is obtained by three repeated sampling, sieving, and weighing. If the standard deviation of the three measurements is >0.05, it is marked as "low confidence".
[0099] All three dimensions used in the quality assessment were taken from the same batch of samples. Whole kernel percentage was determined through three independent samplings, each weighing at least 500 grams; moisture content and color were assessed simultaneously with the first sampling. Batches with low confidence levels were excluded from the assessment. ideal j Updates are not used as a basis for recalibration determination.
[0100] Historical averages are updated in real time. After each batch ends, if it is not a low-confidence batch, the average quality score of all valid batches under that variety is recalculated.
[0101] S302: Execution of state transition logic:
[0102] The state machine uses stage transition events as triggers and transitions unidirectionally in the order of A to B to C to D to E, without supporting cross-stage jumps or reverse jumps. If a transition request that does not conform to the order is received, the state machine refuses to execute and maintains the current state, while generating an alarm message.
[0103] After each successful state transition, record the current timestamp t. trans The duration of stay is calculated as follows:
[0104] Δt stay =t trans -t prev_trans , where t prev_trans This refers to the moment of the last state transition.
[0105] S303: Control parameter output:
[0106] The state machine reads the corresponding heating power P based on the current stage. j Windshield opening V j Simultaneously, the control commands are sent to the heater frequency converter and the damper servo motor driver; the control commands are continuously output in 10-second cycles until the next state transition occurs.
[0107] It should be further explained that the control cycle is selected based on the following: the thermal inertia time constant of the heater is about 5-8 seconds. Using a 10-second cycle for adjustment is already greater than the response time of thermal inertia. This ensures that each adjustment action produces a practical effect within the time scale of thermal inertia. It will not cause the actuator to operate frequently due to the cycle being too short, nor will it miss the adjustment window due to the cycle being too long.
[0108] S4: Batch-to-batch self-optimization:
[0109] S401: Batch Data Archiving:
[0110] Archived after each batch: Topological feature vector sequence {Y} n}、Stage Judgment Result Φ n Control parameter execution records and final quality inspection data: actual moisture content W real Color rating S color and whole-body rate S integrity and quality rating Q score .
[0111] The original acoustic waveforms and current signals of the first calibration batch need to be stored completely for use in iterative calibration reprocessing.
[0112] Periodic automatic recalibration is performed every 50 batches. If a quality degradation recalibration is triggered when less than 50 batches have passed since the last recalibration, the counter is reset, and the next quality degradation recalibration or the 50th batch count will be used as the benchmark for execution.
[0113] S402: Incremental update of HMM parameters:
[0114] Using this batch {Y n Incremental expectation-maximization updates are performed on the HMM observation probability parameters.
[0115] It should be further explained that the confidence threshold adaptive adjustment is as follows:
[0116] The threshold for the first 5 closed-loop effective batches is relaxed to 0.6, and then the normal operation threshold of 0.9 is restored; only samples with a Viterbi posterior probability greater than the current threshold are included in the update, and samples below the threshold or fuzzy samples at the state boundary are directly discarded.
[0117] The update adopts an exponentially weighted moving average method with an update rate of α=0.3 (dimensionless). The new batch of data is given a weight of 30% and the old parameters a weight of 70%, so that the model can gradually adapt to changes in operating conditions while maintaining stability.
[0118] S403: Control parameter correction:
[0119] Control parameters were adjusted every 5 batches, and the average actual residence time at each stage was analyzed. Ideal length of stay I ideal j The deviation.
[0120] Prioritize adjusting the damper opening. Specifically, damper adjustment has less impact on the temperature field than power adjustment, and the dehumidification rate can be adjusted without changing the thermal inertia of the heater, avoiding temperature overshoot caused by sudden power changes. Open-loop protection batches are excluded from the statistics. If there are fewer than 3 valid batches, skip this correction.
[0121] If the process skips for three consecutive 5-batch cycles (15 batches), then an attempt will be made to trigger S404 recalibration. If the open-loop protection ratio is greater than 50% in the most recent 50 batches, then the process will skip and record "forced recalibration skipped due to insufficient data quality" in the log, and the counter will be reset; otherwise, the process will proceed normally.
[0122] For parameter corrections of valid batches, two scenarios are handled:
[0123] If the actual dwell time is longer than the ideal value by more than 20%, first adjust the damper opening to a smaller value, at 90% of the current value, but not lower than 10% of the lower limit. If the damper has been adjusted to the lower limit and the dwell time is still too long, then consider increasing the heating power, each time increasing it to 103% of the current value, with the upper limit not exceeding 100%.
[0124] If the actual dwell time is shorter than the ideal value by more than 20%, prioritize increasing the damper opening to 110% of the current value, but do not exceed 90% of the upper limit. If the damper is already at the upper limit and the dwell time is still too short, consider reducing the heating power, lowering it to 97% of the current value each time, with the lower limit not lower than 5%.
[0125] When parameter adjustments exceed the boundary values, they are truncated. Each adjustment is capped at 10% of the current value, and this limit is controlled by the learning rate η=0.1.
[0126] After the adjustment is complete, set the state transition probability A. j,j+1 A was temporarily increased from 0.3 to 0.5. j,j The value is simultaneously reduced to 0.5, maintained for one batch, and then restored to its original value.
[0127] In terms of execution order, S403 modification uses the latest I before modification. ideal j Value; after correction, in accordance with rule S301, I is recalculated and updated using data from all valid historical batches. ideal j .
[0128] S404: Variety Label and Model Version Management:
[0129] Parameter sets for different varieties are stored separately, with each variety maintaining its own independent set. Each set includes the mean and variance vectors of the HMM observation probabilities, the state transition matrix, two control parameters (heating power and damper opening), the ideal residence time, and a dual-channel base model library. Before starting a batch, the operator selects the variety, and the system automatically loads the corresponding set of parameters.
[0130] Version saving uses an incremental triggering method; a new version is saved when any of the following conditions are met:
[0131] First, S403 performed a parameter correction operation; second, the HMM mean vector μ j The change in Euclidean distance exceeded the set version preservation threshold θ. ver .
[0132] θ ver The value of μ is obtained through calibration: the entire process—from embedding vector generation, graph construction, topological feature extraction to HMM state decoding—is run on the calibration dataset using the calibrated optimal parameters, and μ is calculated between consecutive batches. j The standard deviation σ of the change in Euclidean distance μ Take θ ver =2σ. If there are fewer than 2 available batches, use 0.1 as the default value temporarily, and recalibrate and replace it after accumulating 10 batches.
[0133] If a certain variety Q score Five consecutive batches falling below 90% of the historical average trigger recalibration. Recalibration involves parameters including: peak-to-valley ratio threshold ξ, window width M, voting window length L, nearest neighbor number k, time-series decay scale τ, and confidence threshold Γ. th and version saving threshold θ ver .
[0134] Before performing recalibration, the system first checks the percentage of open-loop protection batches in the most recent 50 batches. If it exceeds half, the recalibration will be skipped and a log message "Insufficient data quality, it is recommended to check the equipment" will be recorded. The system will then manually trigger the recalibration again after manual confirmation. If the operator insists on performing the recalibration, they will need to confirm the recalibration on the interface before continuing.
[0135] During the calibration process, if a parameter fails to converge after more than 5 iterations, or if the parameter change is greater than 10... -3 θ ver The system will stop updating and continue using the current threshold, while recording an alarm message. All calibrated workflows run automatically between batches, without affecting the normal production rhythm.
[0136] Secondly: The accompanying drawings of the embodiments disclosed in this invention only involve the structures involved in the embodiments disclosed in this invention. Other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of this invention can be combined with each other.
[0137] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring, characterized in that, include: S1. Signal Acquisition and Pulse Feature Extraction: Simultaneously acquire three signals: acoustic, temperature, and motor current signals from the drying drum. Jointly identify the drum phase to divide the acoustic event window, extract acoustic event segments to construct an event stream, and extract the total number of pulses, pulse interval sequence, and amplitude attenuation sequence within the event segment to generate a variable-length original feature vector. S2. Topology network construction and baking status determination: Based on the variable length original features, a dual-scale sliding window segmentation process is adopted to construct a dual-channel DTW embedding vector, and an elastic state bias is introduced to calculate the comprehensive similarity of nodes. A weighted topology graph is built to extract a four-dimensional topology feature vector. This feature vector is input into a hidden Markov model to decode and determine the baking stage. Combined with confidence verification, a stage transition event is generated. S3, State Machine Drive Control: Based on stage transition events, drive the five-state finite state machine to migrate unidirectionally in sequence, retrieve the preset heating power and damper opening corresponding to the current baking stage, and send them to the actuator to adjust the drying operation conditions in real time and count the actual dwell time of each stage. S4. Batch-to-batch self-optimization: After each batch ends, the topological features, stage results and quality data are archived for weighted updates of HMM observation parameters; control parameters are corrected according to the deviation of actual residence time and ideal value in each stage; parameters of different varieties are stored independently and saved according to preset conditions; when the quality score meets the trigger conditions, the recalibration of the entire set of parameters is initiated.
2. The adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring according to claim 1, characterized in that: The joint identification drum phase segmentation acoustic event window includes: The system filters the motor current to calculate the drum rotation cycle, extracts the sound signal energy fluctuation curve, compares the fluctuation ratio of the two curves to determine the drum position, and defines the nut drop zone as the sound acquisition window. If the nut drop zone is not identified for three consecutive rotations, the system prompts to clean the sensor and suspends the drying operation.
3. The adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring according to claim 2, characterized in that: The generation of the variable-length original feature vector includes: Within a single sound acquisition window, the total number of colliding pulses is counted, and the time interval sequence and pulse amplitude attenuation ratio sequence of adjacent pulses are extracted. These three types of data are combined to form an original feature vector. The length of this vector automatically changes with the number of pulses, completely preserving the pulse sequence change pattern, without performing mean or variance compression on a fixed length.
4. The adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring according to claim 1, characterized in that: The segmented processing using a dual-scale sliding window includes: The training window has a fixed step size of 120 event segments, the same as the manual sampling interval, and is used for model training. The inference window has a fixed step size of 30 event segments and is used for online real-time state inference. If the number of valid acoustic event segments in the current window is less than 80% of the total window length, the calculation results of that window are discarded, and the stage judgment results use the output of the previous valid window.
5. The adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring according to claim 4, characterized in that: The construction of the dual-channel DTW embedding vector and the introduction of elastic state bias to calculate the comprehensive similarity of nodes include: Corresponding pattern libraries were established for pulse interval sequences and amplitude decay sequences, respectively. The distance between the sequence and the samples in the library was calculated using the dynamic time warping algorithm, and the embedding vector was generated. The elastic state value representing the hardness of the nut was first obtained by converting the number of pulses. The comprehensive similarity between the two event nodes was calculated by combining the vector similarity, the temporal distance coefficient, and the elastic state difference compensation term.
6. The adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring according to claim 5, characterized in that: The process of constructing a weighted topology graph and extracting four-dimensional topological feature vectors includes: Based on comprehensive similarity, corresponding nearest neighbor nodes are selected for each node and weighted connection relationships are established to form a weighted topological network graph; the weighted global clustering coefficient, network modularity, average weighted degree, and global edge weight variance of the network are calculated, and the four parameters are combined to form a four-dimensional topological feature vector; when the proportion of effective nodes in the window is lower than the set threshold, the current feature is determined to be invalid and the previous effective state result is used.
7. The adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring according to claim 6, characterized in that: The step of inputting the feature vector into the Hidden Markov Model for decoding and ripening includes: The parameters of the hidden Markov model corresponding to the five drying stages of nuts are pre-configured, and the four-dimensional topological feature vector is used as the model observation input. The Viterbi algorithm is used to decode the observed features, and combined with the multi-window sliding voting method, the result of the current drying stage is output.
8. The adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring according to claim 7, characterized in that: The generation of the stage transition event by combining confidence verification includes: The maximum posterior probability of the decoded Hidden Markov Model is extracted as the decision confidence level. A valid stage transition event is generated only when the confidence level is greater than the preset threshold and the current baking stage is inconsistent with the previous stage. Otherwise, the original baking stage decision result remains unchanged.
9. The adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring according to claim 8, characterized in that: The driving five-state finite state machine unidirectional sequential transition includes: The finite state machine pre-sets working states that correspond one-to-one with the five roasting stages of the nuts, and only transitions forward step by step based on valid stage transition events; it prohibits cross-state jumps and reverse state rollbacks, and does not execute transitions when abnormal state jump instructions are detected, and keeps the current working state unchanged.
10. The adaptive program and control method for drying and roasting nuts with skin based on real-time monitoring according to claim 1, characterized in that: The weighted update and parameter correction in S4 include: The parameters of the Hidden Markov Model are updated iteratively using a weighted average method based on the archived data of each batch. The damper opening and heating power parameters are corrected after comparing the actual dwell time of each stage with the ideal value. The complete set of model parameters is stored separately for different nut varieties. When the change in model parameters exceeds the set threshold or when 50 batches have been run, a new version is saved. When the quality score of 5 consecutive batches is lower than 90% of the historical average, the entire set of parameters is recalibrated. Before recalibrating, the number of open-loop control batches in the most recent 50 batches is counted. If the proportion exceeds 50%, the recalibration is suspended and executed after manual confirmation.