Remote status monitoring system of toaster based on MQTT protocol
By constructing a first-order thermal inertia model and extracting spectral energy density values using the Goertzel algorithm, and combining this with the MQTT protocol to generate control commands, the problem of lag in toaster status monitoring was solved, enabling early identification and remote warning of heating wire aging and poor contact.
Patent Information
- Application Number
- CN202611349781.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-11-27
AI Technical Summary
Existing toaster status monitoring relies on a single threshold judgment, resulting in delayed early warning and an inability to identify potential electrical fire hazards caused by aging heating wires or poor contact. Traditional monitoring methods also lack the ability to perceive high-frequency features.
The remote status monitoring system for toasters based on the MQTT protocol collects voltage, current, and temperature data to construct a first-order thermal inertia model. It uses the recursive least squares method to identify the real-time time constant, and combines the Goertzel algorithm to extract the spectral energy density value, calculate the comprehensive safety risk index, and generate MQTT control commands for remote monitoring.
It enables real-time health status assessment of toasters, quickly identifies thermal inertia and electrical characteristic anomalies, reduces computing resource consumption, improves detection real-time performance and accuracy, and ensures the immediacy and reliability of remote monitoring.
Smart Images

Figure CN123185236A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of control system technology, and in particular to a remote status monitoring system for toasters based on the MQTT protocol. Background Technology
[0002] Current technologies for monitoring toaster status largely rely on a single threshold judgment mechanism, determining faults solely by monitoring whether the real-time temperature exceeds a fixed safety limit. In actual operation, this static threshold judgment method is lagging, failing to distinguish between normal high-temperature baking and abnormal overheating conditions. Alarms are often triggered only after a rapid temperature rise has caused component damage or even a fire, hindering early warning systems. Furthermore, traditional monitoring methods ignore the high-frequency characteristics inherent in current and voltage signals, lacking the ability to detect weak arcs or voltage fluctuations caused by poor contact in the early stages of heating wire aging. This allows potential electrical fire hazards to remain latent for extended periods without being detected. Therefore, improvements are needed. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of existing technologies by proposing a remote status monitoring system for toasters based on the MQTT protocol.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: a remote status monitoring system for toasters based on the MQTT protocol includes: Obtain the controller of the toaster oven, use the controller to collect voltage data, current data and temperature data of the toaster oven during the entire working cycle, and combine the voltage data, the current data and the temperature data into a toaster oven operation data set; A first-order thermal inertia model is constructed based on the toaster's operating data set. The recursive least squares method is used to iteratively calculate the first-order thermal inertia model in order to identify and obtain the real-time time constant of the toaster. The Goertzel algorithm is used to perform frequency domain feature transformation on the toaster operation data set to extract the spectral energy density value of the toaster in a preset high-frequency range. The comprehensive safety risk index of the toaster is calculated based on the real-time time constant and the spectral energy density value. The comprehensive security risk index and the real-time time constant are matched with the preset hierarchical security policy to generate corresponding MQTT control commands, and the MQTT control commands are published through the MQTT protocol to perform remote status monitoring.
[0005] Preferably, the step of using the controller to collect voltage, current, and temperature data of the toaster throughout its entire operating cycle specifically includes: Configure the high-frequency sampling channel of the controller and set the sampling frequency to a preset resolution frequency, which can cover the heating start-up stage and the pop-up cooling stage; During the heating start-up phase, the voltage data and the current data are simultaneously acquired through the high-frequency sampling channel, and the temperature data is also acquired to form a heating period data stream; During the pop-up cooling phase, the temperature data is continuously collected to form a cooling period data stream; The heating period data stream and the cooling period data stream are time-stamp aligned and filtered preprocessed to remove random pulse interference in the voltage data and the current data, thereby generating a standardized set of toaster operation data.
[0006] Preferably, the step of constructing a first-order thermal inertia model based on the toaster operating data set, and iteratively calculating the first-order thermal inertia model using the recursive least squares method to identify and obtain the real-time time constant of the toaster specifically includes: Establish the transfer function of the first-order thermal inertia model, discretize the transfer function into a difference equation format, and determine that the input vector in the difference equation corresponds to the product of the voltage data and the current data, and the output vector corresponds to the temperature data. Initialize the covariance matrix and parameter vector of the recursive least squares method, and set a forgetting factor to adjust the algorithm's sensitivity to new data; The data points in the toaster operation data set are read in time-by-time, the temperature output at the current time is predicted based on the parameter vector at the previous time, and the prediction error between the predicted output and the actual collected temperature data is calculated. Calculate the gain vector based on the prediction error and the covariance matrix, and update the parameter vector using the gain vector; Extract physical quantities that characterize the system's thermal response rate from the updated parameter vector, and determine these physical quantities as the real-time time constant.
[0007] Preferably, the step of using the Goertzel algorithm to perform frequency domain feature transformation on the toaster operating data set and extracting the spectral energy density value of the toaster in a preset high-frequency range specifically includes: Determine the center frequency point of the preset high frequency range, where the center frequency point corresponds to the characteristic frequency generated by heating wire aging or micro-arc fault. A second-order infinite impulse response filter structure based on the Goertzel algorithm is used to iteratively calculate the current data in the toaster operation data set to calculate the filter state variable corresponding to each sampling point. After completing an iteration of a processing window, the complex spectral component at the center frequency point is calculated based on the filter state variables, and the power value is obtained by performing a modulus square operation on the complex spectral component. The power values at all frequency points within the preset high-frequency range are integrated and divided by the frequency bandwidth for normalization to obtain the spectral energy density value reflecting the intensity of the arc fault.
[0008] Preferably, the step of calculating the comprehensive safety risk index of the toaster based on the real-time time constant and the spectral energy density value specifically includes: A standard reference model is provided, and the reference time constant and reference spectral energy density threshold of the standard reference model under normal operating conditions are obtained. A risk assessment model is constructed using the real-time time constant, the spectral energy density value, the reference time constant, and the reference spectral energy density threshold. The comprehensive safety risk index is calculated using the risk assessment model, and the calculation formula for the risk assessment model is as follows: ; in, This represents the comprehensive security risk index. This represents the real-time time constant obtained through identification. This represents the reference time constant. The weighting coefficients representing thermal inertia deviation. This indicates the absolute deviation of real-time thermal inertia from the reference value. The moderating index representing sensitivity to bias. This represents the calculated spectral energy density value. This represents the reference spectral energy density threshold. Weighting coefficients representing the characteristics of high-frequency electric arcs. This represents the natural logarithm function.
[0009] Preferably, the step of matching the comprehensive security risk index and the real-time time constant with a preset hierarchical security policy to generate corresponding MQTT control instructions specifically includes: Define a first safety threshold, a second safety threshold, and a jamming judgment time threshold, wherein the second safety threshold is greater than the first safety threshold; Determine whether the comprehensive security risk index is less than or equal to the first security threshold. If so, determine that the current state is normal and generate the MQTT control instruction containing the normal state code. Determine whether the comprehensive safety risk index is greater than the first safety threshold and less than or equal to the second safety threshold. If so, determine that the current state is an abnormal heating load and generate the MQTT control instruction containing warning information and a level 1 abnormal code. Determine whether the comprehensive security risk index is greater than the second security threshold. If so, determine that the current state is a serious fault and generate the MQTT control instruction containing an emergency stop request and a level 2 fault code. Independent of the judgment of the comprehensive safety risk index, it is determined whether the real-time time constant is greater than the material jam judgment time threshold. If so, it indicates that the cooling rate is abnormal, the current state is determined to be a material jam fault, and the MQTT control command containing a material jam alarm message and a level 3 fault code is generated.
[0010] Preferably, the step of publishing the MQTT control command via the MQTT protocol to perform remote status monitoring specifically includes: Establish a long-lived connection with the MQTT broker server, and configure a publish topic and a subscribe topic. The publish topic is used to report device status, and the subscribe topic is used to receive remote control commands. The MQTT control commands are encapsulated in JSON format, and the comprehensive security risk index, the real-time time constant, and the generated normal status code, the first-level exception code, the second-level fault code, or the third-level fault code are written into the message load. The quality of service (QS) level is selected based on the urgency of the MQTT control command. For commands that include the emergency stop request or the material jam alarm message, the highest QS level is selected. The encapsulated message is pushed to the published topic, enabling the remote monitoring terminal to parse the message payload and display the real-time health status and fault warning information of the toaster.
[0011] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, voltage, current, and temperature data of the toaster throughout its entire operating cycle are collected and combined into an operational data set. A first-order thermal inertia model reflecting the thermal response characteristics of the equipment is constructed. The recursive least squares method is used to iteratively calculate the model and identify the real-time time constant. This allows for the quantification of the thermal inertia changes during the heating and cooling processes, effectively identifying physical anomalies such as slowed heat dissipation due to slag buildup or excessively rapid temperature rise due to dry burning under no-load conditions. The Goertzel algorithm is introduced to perform frequency domain feature transformation on the operational data, selectively extracting the spectral energy density value within a preset high-frequency range, without requiring a full-band Fourier transform. It can quickly capture the micro-arc fault characteristics caused by aging or poor contact of heating wire, reduce computing resource consumption and improve detection real-time performance. It integrates thermal inertia parameters and arc characteristic parameters to calculate a comprehensive safety risk index, realizing a dual-dimensional assessment of thermal anomalies and electrical potential hazards. Based on the risk index and the matching results of real-time time constant and graded safety strategy, it generates and publishes MQTT messages containing specific control instructions, ensuring that the remote monitoring terminal can obtain the health status of the equipment in real time and perform emergency shutdown or early warning operations. It can still ensure the reliability and timeliness of instruction transmission in low-bandwidth network environments, and improve the accuracy of remote monitoring of household electric heating equipment. Attached Figure Description
[0012] Figure 1 This is a system flowchart of the present invention. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0014] Please see Figure 1 The present invention provides a technical solution: a remote status monitoring system for toasters based on the MQTT protocol, comprising: Obtain the controller of the toaster, use the controller to collect voltage, current and temperature data of the toaster throughout the entire working cycle, and combine the voltage, current and temperature data into a toaster operation data set; A first-order thermal inertia model was constructed based on the toaster operation data set. The recursive least squares method was used to iteratively calculate the first-order thermal inertia model in order to identify and obtain the real-time time constant of the toaster. The Goertzel algorithm was used to perform frequency domain feature transformation on the toaster operation data set to extract the spectral energy density value of the toaster in a preset high-frequency range. The comprehensive safety risk index of the toaster is calculated based on the real-time time constant and the spectral energy density value. The comprehensive security risk index and real-time time constant are matched with the preset hierarchical security policy to generate corresponding MQTT control commands, and the MQTT control commands are published through the MQTT protocol to perform remote status monitoring.
[0015] In this embodiment, the steps of collecting voltage, current, and temperature data of the toaster throughout its entire operating cycle using the controller are as follows: Configure the controller's high-frequency sampling channel, set the sampling frequency to a preset resolution frequency that covers both the heating start-up phase and the pop-up cooling phase. During the heating start-up phase, voltage and current data are simultaneously collected through the high-frequency sampling channel, along with temperature data, forming a heating period data stream. During the pop-up cooling phase, temperature data is continuously collected, forming a cooling period data stream. The heating and cooling period data streams are then time-stamped and pre-processed with filtering to remove random pulse interference from the voltage and current data, generating a standardized toaster operation data set.
[0016] Specifically, firstly, configure the registers of the toaster's main control MCU, enable the built-in 12-bit successive approximation analog-to-digital converter (ADC), set the ADC's sampling mode to independent mode, and enable the direct memory access (DMA) channel to reduce CPU interrupt load. For the high-frequency sampling channel configuration, the sampling frequency needs to be set to the preset resolution frequency. This resolution frequency The setting is based on the Nyquist sampling theorem and experimental analysis of the spectral characteristics of micro-arc faults in heating wires. Typically, a frequency more than 80 times the fundamental frequency of the power grid (50Hz) is selected. For example, setting... To ensure coverage of transient changes during the heating start-up phase and steady-state heat dissipation during the pop-up cooling phase, while capturing high-frequency noise characteristics, a hardware timer triggers ADC conversion during the heating start-up phase to ensure the analog voltage signal output by the voltage transformer is accurate. Analog current signal output by current transformer It can maintain microsecond-level time synchronization, avoiding power calculation errors caused by phase differences. At the same time, it collects temperature data through a connected thermistor NTC sensor. Because the temperature changes relatively slowly, its sampling frequency The frequency can be set to 10Hz to form a data stream during the heating period. During the cooling phase, after the heating relay is detected to be disconnected, the temperature sensor continues to collect data, continuously recording the residual temperature decay curve in the furnace cavity, forming a data stream during the cooling period. Subsequently, the collected multi-frequency mixed data is processed. A linear interpolation algorithm is used to map the low-frequency temperature data onto the same time axis as the high-frequency voltage and current data to achieve timestamp alignment. For random pulse interference that may be introduced by power grid surges or switching actions in the voltage and current data, a median filtering algorithm is used, and the filter window size is set. For 5 sampling points, the values within the window are sorted and the median value is taken as the valid data. Data with a deviation exceeding 3 times the standard deviation is discarded. The anomalies, among which This represents the standard deviation of the data within the current window. After filtering preprocessing, Z-score normalization is used to normalize all data, which involves subtracting the mean of that data channel. Divide by its standard deviation A standardized set of toaster operation data is generated and stored in the controller's SRAM buffer as the input basis for subsequent model identification, ensuring the purity of the data and the accuracy of the timing.
[0017] In this embodiment, the steps for constructing a first-order thermal inertia model based on the toaster operation data set and using the recursive least squares method to iteratively calculate the first-order thermal inertia model to identify and obtain the real-time time constant of the toaster are as follows: Establish the transfer function of the first-order thermal inertia model; discretize the transfer function into a difference equation format; determine that the input vector in the difference equation corresponds to the product of voltage and current data, and the output vector corresponds to temperature data; initialize the covariance matrix and parameter vector of the recursive least squares method; set a forgetting factor to adjust the algorithm's sensitivity to new data; read in data points from the toaster operation data set time-by-time; predict the current temperature output based on the parameter vector of the previous time step; calculate the prediction error between the predicted output and the actual collected temperature data; calculate the gain vector based on the prediction error and the covariance matrix; update the parameter vector using the gain vector; extract physical quantities that characterize the system's thermal response speed from the updated parameter vector; and determine these physical quantities as the real-time time constant.
[0018] Specifically, based on the principles of heat transfer, the transfer function of the first-order thermal inertia model is established, and the function has the following form: ,in Represents the complex frequency domain transfer function of the system. This represents the steady-state gain of the system, which is the ratio of the final temperature rise to the input power. This represents the system's time constant, i.e., the time required for the response to reach 63.2% of its steady-state value. Let [1] denote the Laplace transform operator, and let [2] denote the constant term in the denominator. The transfer function of the continuous domain is discretized using the backward difference transform method to obtain the difference equation format. ,in Indicates the current time The system output temperature, Indicates the previous moment The system output temperature, Indicates the current time The system input power, This represents the regression coefficient related to the time constant. Represent the input coefficients related to the gain, and determine the input vector in the difference equation. The output vector corresponds to the instantaneous power data obtained by multiplying voltage and current data. Corresponding to the collected temperature data, the operational parameters of the Recursive Least Squares (RLS) algorithm are then initialized, and the covariance matrix is set. For example, a large diagonal matrix ,in This represents the estimation error covariance matrix at the initial time. The initial large number is used to represent the initial uncertainty. Represent the identity matrix, and define the parameter vector. Let be the zero vector, where Includes parameters to be identified Set a forgetting factor The forgetting factor is used to adjust the algorithm's sensitivity to new data. The value range is usually set between 0.98 and 0.995. For example, if 0.98 is used, data points from the toaster operation data set are read from memory time by time, based on the parameter vector estimated at the previous time step. Predict the temperature output at the current moment based on the current input data. And calculate the predicted output. Compared with the actual collected temperature data Prediction error between ,in This represents the prediction error, and the gain vector is calculated based on the prediction error and the covariance matrix of the previous time step. The parameter vector is updated using the gain vector to obtain the estimated parameters at the current time step. Simultaneously, the covariance matrix is updated for use in the next iteration. After the data processing for the entire working cycle is completed, physical quantities that characterize the thermal response rate of the system are extracted from the final updated parameter vector. Using the formula The physical time constant is obtained by inverse solving, where This represents the calculated real-time time constant. Indicates the system's sampling period. Represents the natural logarithm function. The regression coefficient obtained by identification is used to determine the physical quantity as the real-time time constant.
[0019] In this embodiment, the specific steps of using the Goertzel algorithm to perform frequency domain feature transformation on the toaster operation data set and extract the spectral energy density value of the toaster in a preset high-frequency range are as follows: The center frequency point of the preset high-frequency range is determined, and the center frequency point corresponds to the characteristic frequency generated by heating wire aging or micro-arc faults. The second-order infinite impulse response filter structure of the Goertzel algorithm is applied to iteratively calculate the current data in the toaster operation data set, calculating the filter state variable corresponding to each sampling point. After completing the iteration of one processing window, the complex spectral component at the center frequency point is calculated based on the filter state variable, and the modulus square operation is performed on the complex spectral component to obtain the power value. The power values of all frequency points within the preset high-frequency range are integrated and divided by the frequency bandwidth for normalization, resulting in the spectral energy density value reflecting the intensity of the arc fault.
[0020] Specifically, the center frequency point of the preset high-frequency range is first determined by analyzing the failure mechanism of the heating wire material and the historical fault waveform database. The center frequency point The characteristic frequency corresponding to the aging of the heating wire or micro-arc fault is selected, for example, 50kHz. Then, the coefficients required for the Goertzel algorithm are calculated. ,in [2] represents the cosine coefficients calculated recursively, and [2] represents the constant coefficients. Represents the cosine trigonometric function. This indicates that the constant value of pi is approximately 3.14159. Indicates the target center frequency. The sampling frequency of the signal is used to initialize the filter state variables using a second-order infinite impulse response filter structure based on the Goertzel algorithm. and Current data sequence in toaster operation data set Perform iterative calculations, the calculation formula is as follows: ,in Indicates the current time The internal state variables of the filter, Indicates the current time The input current sampling value, This represents the state variable from the previous moment. This represents the state variable from the time step two moments ago. The filter state variable corresponding to each sampling point is calculated, and this process is completed within one processing window. After iteration of sampling points This indicates the length of the processing window. The complex spectral component at the center frequency is calculated based on the final filter state variables. The calculation formula involves the synthesis of the real and imaginary parts, and the power value at that frequency is obtained by performing a modulus-square operation on the complex spectral component. In order to cover a preset high-frequency range based on the center frequency, for example ,in This represents the frequency offset. The Goertzel calculation process is repeated at several selected key frequency points within this interval to obtain the power values at these frequency points. The total energy is then obtained by discrete integration or summation of the power values at all frequency points within the preset high-frequency interval. and divide by frequency bandwidth That is, the number of frequency points or the frequency range is normalized to eliminate the numerical differences caused by different bandwidth selection ranges, so as to obtain the spectral energy density value that can reflect the intensity of the arc fault. .
[0021] In this embodiment, the steps for calculating the comprehensive safety risk index of the toaster based on the real-time time constant and the spectral energy density value are as follows: A standard reference model is provided; the baseline time constant and baseline spectral energy density threshold of the standard reference model under normal operating conditions are obtained; a risk assessment model is constructed using the real-time time constant, the spectral energy density value, the baseline time constant, and the baseline spectral energy density threshold; and the comprehensive safety risk index is calculated using the risk assessment model. The calculation formula for the risk assessment model is: ,in, This represents the comprehensive safety risk index. This represents the real-time time constant obtained from the identification. Indicates the reference time constant. The weighting coefficients representing thermal inertia deviation. This indicates the absolute deviation of real-time thermal inertia from the reference value. The moderating index representing sensitivity to bias. This represents the calculated spectral energy density value. Indicates the reference spectral energy density threshold. Weighting coefficients representing the characteristics of high-frequency electric arcs. This represents the natural logarithm function.
[0022] Specifically, a standard reference model is provided, which is obtained by statistical averaging of operating data from a large number of healthy toaster ovens in a controlled laboratory environment, and the baseline time constant of the standard reference model under normal operating conditions is obtained. For example, setting it to 120 seconds, and a baseline spectral energy density threshold. The threshold is set to three times the average noise floor of normal equipment, for example, 0.05mW / Hz. A risk assessment model is constructed using the real-time time constant, spectral energy density value, reference time constant, and reference spectral energy density threshold. The comprehensive safety risk index is calculated using the risk assessment model. The calculation formula for the risk assessment model is as follows: ,in, The comprehensive safety risk index is a dimensionless numerical value that measures the degree to which the current operating state of equipment deviates from its normal state. This represents the real-time time constant identified by the recursive least squares method, in seconds. This represents the reference time constant, expressed in seconds, and serves as a scale for comparison. This represents a weighting factor for thermal inertia deviation, with a value between 0 and 1, for example, 0.6. It is used to adjust the proportion of thermal failures in the total risk. This indicates the absolute deviation of real-time thermal inertia from the reference value. The absolute value operator is used to represent the absolute value. This represents the adjustment index for sensitivity to deviation, typically set to 2 to amplify the effect of larger deviations. This represents the calculated spectral energy density value, in mW / Hz. This represents the reference spectral energy density threshold, in mW / Hz. Weighting coefficients representing the characteristics of high-frequency electric arcs, with values ranging from 0 to 1, for example, 0.4, and , Represented by constants The natural logarithm function with a base of approximately 2.71828 is used to compress the dynamic range of arc energy data. [1] represents the bias constant introduced to prevent the logarithmic function from being zero. By substituting the thermal parameters of the physical layer and the frequency domain parameters of the electrical layer into the formula, a normalized risk value is calculated.
[0023] In this embodiment, the steps of matching the comprehensive safety risk index and real-time time constant with the preset hierarchical safety strategy to generate corresponding MQTT control instructions are as follows: Define a first safety threshold, a second safety threshold, and a jam judgment time threshold. The second safety threshold is greater than the first safety threshold. Determine whether the comprehensive safety risk index is less than or equal to the first safety threshold. If so, the current state is determined to be normal, and an MQTT control instruction containing a normal state code is generated. Determine whether the comprehensive safety risk index is greater than the first safety threshold and less than or equal to the second safety threshold. If so, the current state is determined to be an abnormal heating load, and an MQTT control instruction containing a warning message and a level 1 abnormal code is generated. Determine whether the comprehensive safety risk index is greater than the second safety threshold. If so, the current state is determined to be a serious fault, and an MQTT control instruction containing an emergency stop request and a level 2 fault code is generated. Independent of the determination of the comprehensive safety risk index, determine whether the real-time time constant is greater than the jam judgment time threshold. If so, it indicates an abnormal cooling rate, and the current state is determined to be a jam fault, and an MQTT control instruction containing a jam alarm message and a level 3 fault code is generated.
[0024] Specifically, define the first security threshold. Second safety threshold and the time threshold for judging material loading The first safety threshold Set to 0.3, this value is determined based on the 95th percentile of the distribution of historical minor fault data, serving as the second safety threshold. The value is set to 0.7, which is determined based on the lower limit of the critical fault threshold. This is the time threshold for determining material jamming. Set as the reference time constant The time is 1.5 times, or 180 seconds, to determine the comprehensive safety risk index. Is it less than or equal to the first safety threshold? If so, the current state is determined to be normal, and an MQTT control instruction containing a normal status code (e.g., 0x00) is generated to determine the overall security risk index. Is it greater than the first safety threshold? And less than or equal to the second safety threshold If so, the current state is determined to be an abnormal heating load, such as the presence of slag or slight aging. An MQTT control command containing a warning message and a level 1 exception code (e.g., 0x01) is generated to determine the comprehensive safety risk index. Is it greater than the second safety threshold? If so, the current state is determined to be a serious fault, such as arcing or short circuit. An MQTT control command containing an emergency stop request and a level 2 fault code (e.g., 0x02) is generated, independently of the comprehensive safety risk index, and the real-time time constant is determined in parallel. Is the time limit for judging material processing greater than the threshold? If so, it indicates that the equipment is dissipating heat very slowly and the cooling rate is abnormal. The current state is determined to be a jam fault, that is, the bread slice is stuck in the slot, causing the heat to be unable to dissipate. An MQTT control command containing a jam alarm message and a level 3 fault code (e.g., 0x03) is generated.
[0025] In this embodiment, the steps of publishing MQTT control commands via the MQTT protocol to perform remote status monitoring are as follows: establishing a long connection with the MQTT broker server, configuring a publishing topic and a subscription topic, the publishing topic being used to report device status, and the subscription topic being used to receive remote control commands; encapsulating the MQTT control commands in JSON format; writing the comprehensive security risk index, real-time time constant, and generated normal status code, level 1 exception code, level 2 fault code, or level 3 fault code into the message payload; selecting the quality of service level according to the urgency of the MQTT control commands; selecting the highest quality of service level for commands containing emergency shutdown requests or material jam alarm messages; and pushing the encapsulated message to the publishing topic, enabling the remote monitoring terminal to parse the message payload and display the real-time health status and fault warning information of the toaster.
[0026] Specifically, initialize the network communication module, establish a long TCP / IP connection with the MQTT broker server, and set the heartbeat packet sending interval. Configure the publishing theme to stay active for 60 seconds. and subscribing to topics The published topic is named "device / toaster / {deviceID} / status", where {deviceID} represents a unique device identifier used to report device status. The subscribed topic is named "device / toaster / {deviceID} / cmd", used to receive remote control commands, encapsulate MQTT control instructions in JSON format, construct a JSON object, and display the calculated comprehensive security risk index. Retain two decimal places and identify the real-time time constant. The rounded values, along with the generated normal status code, level 1 exception code, level 2 fault code, or level 3 fault code, are written as key-value pairs into the message payload. For example, {"risk": 0.45, "tau": 125, "code": "0x01"} selects the Quality of Service (QoS) level based on the urgency of the MQTT control command. For commands containing normal status codes or level 1 exception codes, QoS 0 is selected, meaning the message is sent at most once to save bandwidth. For commands containing emergency stop requests or material jam alarm messages, the highest QoS level, QoS 2, is selected, meaning the message is sent only once. A four-way handshake ensures that the message reaches the MQTT broker server without loss or duplication. The MQTT client's Publish interface is called to push the encapsulated message to the publishing topic, enabling remote monitoring terminals subscribed to the topic to parse the message load and display the toaster's real-time health status and fault warning information.
Claims
1. A remote status monitoring system for toasters based on the MQTT protocol, characterized in that, The system includes: Obtain the controller of the toaster oven, use the controller to collect voltage data, current data and temperature data of the toaster oven during the entire working cycle, and combine the voltage data, the current data and the temperature data into a toaster oven operation data set; A first-order thermal inertia model is constructed based on the toaster's operating data set. The recursive least squares method is used to iteratively calculate the first-order thermal inertia model in order to identify and obtain the real-time time constant of the toaster. The Goertzel algorithm is used to perform frequency domain feature transformation on the toaster operation data set to extract the spectral energy density value of the toaster in a preset high-frequency range. The comprehensive safety risk index of the toaster is calculated based on the real-time time constant and the spectral energy density value. The comprehensive security risk index and the real-time time constant are matched with the preset hierarchical security policy to generate corresponding MQTT control commands, and the MQTT control commands are published through the MQTT protocol to perform remote status monitoring.
2. The remote status monitoring system for toasters based on the MQTT protocol according to claim 1, characterized in that, The specific steps for using the controller to collect voltage, current, and temperature data of the toaster oven throughout its entire operating cycle are as follows: Configure the high-frequency sampling channel of the controller and set the sampling frequency to a preset resolution frequency, which can cover the heating start-up stage and the pop-up cooling stage; During the heating start-up phase, the voltage data and the current data are simultaneously acquired through the high-frequency sampling channel, and the temperature data is also acquired to form a heating period data stream; During the pop-up cooling phase, the temperature data is continuously collected to form a cooling period data stream; The heating period data stream and the cooling period data stream are time-stamp aligned and filtered preprocessed to remove random pulse interference in the voltage data and the current data, thereby generating a standardized set of toaster operation data.
3. The remote status monitoring system for toasters based on the MQTT protocol according to claim 1, characterized in that, The specific steps for constructing a first-order thermal inertia model based on the toaster operating data set, and using the recursive least squares method to iteratively calculate the first-order thermal inertia model to identify and obtain the real-time time constant of the toaster are as follows: Establish the transfer function of the first-order thermal inertia model, discretize the transfer function into a difference equation format, and determine that the input vector in the difference equation corresponds to the product of the voltage data and the current data, and the output vector corresponds to the temperature data. Initialize the covariance matrix and parameter vector of the recursive least squares method, and set a forgetting factor to adjust the algorithm's sensitivity to new data; The data points in the toaster operation data set are read in time-by-time, the temperature output at the current time is predicted based on the parameter vector at the previous time, and the prediction error between the predicted output and the actual collected temperature data is calculated. Calculate the gain vector based on the prediction error and the covariance matrix, and update the parameter vector using the gain vector; Extract physical quantities that characterize the system's thermal response rate from the updated parameter vector, and determine these physical quantities as the real-time time constant.
4. The remote status monitoring system for toasters based on the MQTT protocol according to claim 1, characterized in that, The step of using the Goertzel algorithm to perform frequency domain feature transformation on the toaster operating data set and extracting the spectral energy density value of the toaster in a preset high-frequency range specifically includes: Determine the center frequency point of the preset high frequency range, where the center frequency point corresponds to the characteristic frequency generated by heating wire aging or micro-arc fault. A second-order infinite impulse response filter structure based on the Goertzel algorithm is used to iteratively calculate the current data in the toaster operation data set to calculate the filter state variable corresponding to each sampling point. After completing an iteration of a processing window, the complex spectral component at the center frequency point is calculated based on the filter state variables, and the power value is obtained by performing a modulus square operation on the complex spectral component. The power values at all frequency points within the preset high-frequency range are integrated and divided by the frequency bandwidth for normalization to obtain the spectral energy density value reflecting the intensity of the arc fault.
5. The remote status monitoring system for toasters based on the MQTT protocol according to claim 1, characterized in that, The specific steps for calculating the comprehensive safety risk index of the toaster based on the real-time time constant and the spectral energy density value are as follows: A standard reference model is provided, and the reference time constant and reference spectral energy density threshold of the standard reference model under normal operating conditions are obtained. A risk assessment model is constructed using the real-time time constant, the spectral energy density value, the reference time constant, and the reference spectral energy density threshold. The comprehensive safety risk index is calculated using the risk assessment model, and the calculation formula for the risk assessment model is as follows: ; in, This represents the comprehensive security risk index. This represents the real-time time constant obtained through identification. This represents the reference time constant. The weighting coefficients representing thermal inertia deviation. This indicates the absolute deviation of real-time thermal inertia from the reference value. The moderating index representing sensitivity to bias. This represents the calculated spectral energy density value. This represents the reference spectral energy density threshold. Weighting coefficients representing the characteristics of high-frequency electric arcs. This represents the natural logarithm function.
6. The remote status monitoring system for a toaster based on the MQTT protocol according to claim 1, characterized in that, The step of matching the comprehensive security risk index and the real-time time constant with the preset hierarchical security strategy to generate the corresponding MQTT control command is as follows: Define a first safety threshold, a second safety threshold, and a jamming judgment time threshold, wherein the second safety threshold is greater than the first safety threshold; Determine whether the comprehensive security risk index is less than or equal to the first security threshold. If so, determine that the current state is normal and generate the MQTT control instruction containing the normal state code. Determine whether the comprehensive safety risk index is greater than the first safety threshold and less than or equal to the second safety threshold. If so, determine that the current state is an abnormal heating load and generate the MQTT control instruction containing warning information and a level 1 abnormal code. Determine whether the comprehensive security risk index is greater than the second security threshold. If so, determine that the current state is a serious fault and generate the MQTT control instruction containing an emergency stop request and a level 2 fault code. Independent of the judgment of the comprehensive safety risk index, it is determined whether the real-time time constant is greater than the material jam judgment time threshold. If so, it indicates that the cooling rate is abnormal, the current state is determined to be a material jam fault, and the MQTT control command containing a material jam alarm message and a level 3 fault code is generated.
7. The remote status monitoring system for a toaster based on the MQTT protocol according to claim 6, characterized in that, The specific steps for publishing the MQTT control commands via the MQTT protocol to perform remote status monitoring are as follows: Establish a long-lived connection with the MQTT broker server, and configure a publish topic and a subscribe topic. The publish topic is used to report device status, and the subscribe topic is used to receive remote control commands. The MQTT control commands are encapsulated in JSON format, and the comprehensive security risk index, the real-time time constant, and the generated normal status code, the first-level exception code, the second-level fault code, or the third-level fault code are written into the message load. The quality of service (QS) level is selected based on the urgency of the MQTT control command. For commands that include the emergency stop request or the material jam alarm message, the highest QS level is selected. The encapsulated message is pushed to the published topic, enabling the remote monitoring terminal to parse the message payload and display the real-time health status and fault warning information of the toaster.
