Extensible embedded industrial personal computer control method based on microcontroller chip

By constructing a data perception and computation scheduling mechanism that integrates event triggering and streaming processing, the problems of resource waste and low efficiency in embedded industrial control systems under low dynamic conditions are solved, and a high-efficiency, low-overhead control method is realized.

CN121900263APending Publication Date: 2026-04-21SHENZHEN XINSAIKE SCI&TECH DEV CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN XINSAIKE SCI&TECH DEV CO LTD
Filing Date
2026-01-16
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing embedded industrial control systems are inefficient in low-dynamic operating conditions. Periodic sampling mechanisms lead to energy waste and excessive communication bandwidth consumption. Event triggering mechanisms lack streaming context awareness and are difficult to adapt to operating condition drift and noise interference.

Method used

A data perception and computation scheduling mechanism that integrates event triggering and streaming processing is constructed. An adaptive dynamic threshold model and a lightweight control decision model are adopted, combined with sliding window statistical analysis, to achieve non-periodic control computation, thereby reducing the consumption of computing resources and communication overhead.

Benefits of technology

While ensuring control accuracy, it significantly reduces computing and communication overhead, improves system efficiency, adapts to changes in operating conditions, and reduces energy waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121900263A_ABST
    Figure CN121900263A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers and microcontrollers, and discloses an extensible embedded industrial personal computer control method based on a microcontroller chip. The method comprises the following steps: collecting multi-source sensor data and carrying out local edge preprocessing; judging event triggering conditions through a self-adaptive dynamic threshold model; starting a streaming feature extraction engine only when conditions are met, and generating feature vectors containing mean values, variances, slopes and mutation points; inputting to the lightweight multi-layer perceptron model to output a control instruction; the information is sent to the execution mechanism through the industrial communication interface; and when not triggered, entering a low-power-consumption dormant state. The method can reduce the load of the processor and the communication traffic while guaranteeing the real-time performance and reliability of control, and is suitable for a battery power supply scene or a wireless industrial Internet of Things scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer and microcontroller technology, specifically relating to a scalable embedded industrial control computer control method based on a microcontroller chip. Background Technology

[0002] With the deep integration of industrial automation and IoT technologies, embedded industrial control computers are playing an increasingly crucial role in smart manufacturing, remote monitoring, and edge computing. Traditional industrial control systems generally employ sampling and control mechanisms based on fixed periods, which rely on collecting sensor data at preset time intervals and triggering control logic. While this method is simple in structure and predictable in timing, frequent periodic sampling and calculations not only cause redundant consumption of the microcontroller chip's computing power when dealing with industrial processes with low dynamism or slow changes, but also continuously occupy limited communication bandwidth. This is especially true in battery-powered or wirelessly deployed industrial IoT nodes, significantly exacerbating energy waste and shortening equipment lifespan.

[0003] Event-triggered control, as a data-driven paradigm that responds on demand, activates the control process by setting state change thresholds or abnormal conditions, theoretically effectively avoiding invalid sampling. However, existing event-triggered schemes are mostly limited to static threshold judgments, lacking the ability to perceive the long-term statistical characteristics of data streams, and are difficult to adapt to the adaptive adjustment requirements under operating condition drift or noise interference.

[0004] Mainstream embedded industrial control platforms have not yet integrated lightweight streaming data processing capabilities, making it impossible to analyze trends, variances, or abrupt changes in data windows in real time at the edge. This results in rigid event judgment logic, which is prone to false triggering or missed triggering.

[0005] In existing technologies, periodic sampling mechanisms and event-driven architectures are often designed separately, failing to form a unified control framework for collaborative optimization. Pure periodic control is inefficient in low-dynamic scenarios; isolated event-triggered mechanisms lack robustness due to a lack of streaming context awareness. Especially on resource-constrained microcontroller platforms, how to deeply integrate streaming computing capabilities with event-triggered logic, and achieve dynamic threshold adjustment and asynchronous task scheduling through middleware, has become a key bottleneck restricting the evolution of embedded industrial control systems towards high energy efficiency and intelligence.

[0006] Therefore, there is an urgent need for a scalable control method that integrates event triggering and edge streaming processing to significantly reduce computational and communication overhead while ensuring control accuracy. Summary of the Invention

[0007] This invention provides a scalable embedded industrial control computer control method based on microcontroller chips. By constructing a data perception and computation scheduling mechanism that integrates event triggering and stream processing, it significantly reduces the computational resource occupancy and communication bandwidth consumption under low-dynamic conditions while ensuring the real-time performance and reliability of industrial control. Deployed on resource-constrained microcontroller chip platforms, this method is suitable for embedded industrial control equipment in battery-powered or wireless industrial IoT scenarios. It solves the energy waste and low system efficiency problems caused by traditional periodic sampling mechanisms that continuously perform redundant calculations and ineffective communication under slow or stable data conditions.

[0008] This invention provides a scalable embedded industrial computer control method based on a microcontroller chip, comprising: The controlled object's state data sequence is acquired through multiple industrial sensor interface modules. The state data sequence includes temperature, pressure, displacement, current, and vibration signals. The state data sequence is subjected to local edge preprocessing, which includes timestamp alignment, zero-point drift correction, and range normalization. The preprocessed state data sequence is input to the event trigger determination unit, which determines whether the current data meets the event triggering conditions based on a preset dynamic threshold model. If the event triggering conditions are met, the current data frame is marked as a valid event frame, and the streaming feature extraction engine is started. The streaming feature extraction engine performs sliding window statistical analysis on consecutive valid event frames to generate streaming feature vectors containing mean, variance, slope, and abrupt change point identifiers. The streaming feature vector is input into the lightweight control decision model, and the lightweight control decision model outputs the corresponding control command sequence. The control command sequence is sent to the actuator through the industrial communication interface module to complete the closed-loop control operation. If the event triggering condition is not met, the current control output remains unchanged, and the system enters a low-power sleep state until the next sampling clock or an external interrupt wakes it up.

[0009] Preferably, the event triggering determination unit adopts an adaptive dynamic threshold model, and the threshold parameters of the adaptive dynamic threshold model are dynamically adjusted according to the local fluctuation characteristics of historical data; The adaptive dynamic threshold model uses the standard deviation of the data within the sliding time window as a benchmark, sets the absolute change threshold to an integer multiple of the standard deviation, and sets the relative change threshold to a percentage of the current data value. When the absolute value of the difference between the newly sampled data and the data of the previous valid event frame is greater than the absolute change threshold, or when the relative change rate is greater than the relative change threshold, it is determined that the event triggering condition is met.

[0010] Preferably, the length of the sliding window is a preset fixed number of sampling points, and the number of sampling points corresponds to the time constant of the industrial process; The sliding window is implemented using a ring buffer structure, and its memory address space is statically allocated in the on-chip static random access memory of the microcontroller chip.

[0011] Preferably, the streaming feature extraction engine performs the following operations: when each valid event frame arrives, updates the data queue within the sliding window; calculates the arithmetic mean of all data within the current window; calculates the sum of squares of the deviations of each data point from the mean, and takes the square root of the sum to obtain the standard deviation; The slope parameter is obtained by fitting the time-value curve of the data within the window using the linear least squares method; if there is a situation where the change between adjacent data points within the window is greater than the preset mutation threshold, the mutation point is marked if such a situation exists. All of the above calculations are performed using fixed-point arithmetic.

[0012] Preferably, the lightweight control decision model is a multilayer perceptron neural network model pre-trained and embedded in the read-only memory of the microcontroller chip; The multilayer perceptron neural network model includes an input layer, a hidden layer, and an output layer. The number of nodes in the input layer is equal to the dimension of the streaming feature vector. The number of nodes in the hidden layer is half the number of nodes in the input layer and rounded down. The number of nodes in the output layer is equal to the number of independent degrees of freedom of the control command. Each layer is fully connected, the activation function is a piecewise linear approximation function, and the weight parameters are stored in 8-bit fixed-point format. During the inference phase, the model receives streaming feature vectors as input, performs matrix multiplication and addition operations and activation function mapping layer by layer, and finally outputs the quantized value of the control instruction sequence.

[0013] Preferably, the industrial communication interface module supports multiple industrial fieldbus protocols, including Controller Area Network (CAN) bus, Serial Peripheral Interface (SPI) bus, and Universal Asynchronous Receiver / Transmitter (UART) interface. Before sending the control command sequence, the industrial communication interface module encapsulates the control command sequence according to the communication protocol type of the target actuator, adds a frame header, check code and frame tail, and outputs it serially according to the baud rate and timing requirements specified in the protocol. The check code is generated using a cyclic redundancy check algorithm, and the generator polynomial is a predefined 16-bit polynomial.

[0014] Preferably, the low-power sleep state is achieved by configuring the power management unit of the microcontroller chip to enter a deep sleep mode; In deep sleep mode, the clock sources of the central processing unit core, analog-to-digital converter module and unnecessary peripherals are turned off, and only the real-time clock module and external interrupt controller are kept in working state. The external interrupt controller is connected to the critical safety signal line. When an emergency stop signal or communication wake-up signal is detected, an interrupt is immediately triggered to wake up the central processing unit core and restore system operation.

[0015] Preferably, the method loads a set of control parameters during the system initialization phase through a configuration management module; The control parameter set includes the threshold parameters of the event triggering judgment unit, the sliding window length, the mutation threshold of streaming feature extraction, the network structure parameters and weight data of the lightweight control decision model, and the protocol configuration information of the industrial communication interface module. The control parameter set is stored in the electrically erasable programmable read-only memory of the microcontroller chip and can be remotely modified through a secure firmware update mechanism.

[0016] Preferably, the plurality of industrial sensor interface modules are connected to the general-purpose input / output pins of the microcontroller chip via an analog-to-digital converter; The sampling frequency of the analog-to-digital converter is controlled by the timer module of the microcontroller chip; After each analog-to-digital conversion is completed, the conversion result is moved to the pre-allocated sensor data buffer via the direct memory access controller.

[0017] Preferably, the timestamp alignment operation is implemented by allocating an independent hardware timestamp register for each sensor channel; At the start of the analog-to-digital conversion, the high-precision timer value of the microcontroller chip is latched into the timestamp register of the corresponding channel; In the data preprocessing stage, the data of the other channels is linearly interpolated and compensated based on the timestamp of the earliest arriving data frame, so that the data of all channels are aligned on a unified time axis. The linear interpolation is calculated using the equation of a straight line between two points, and the value of the interpolation point is equal to the weighted average of the two sampled values ​​before and after the reference time point.

[0018] Compared with the prior art, the advantages and positive effects of the present invention are as follows: 1. This invention deeply integrates event-triggered mechanisms with streaming feature processing to construct an aperiodic control computing paradigm for resource-constrained embedded platforms. When industrial processes are in a steady state or slowly changing condition, the system only activates the computing and communication processes when data changes significantly, avoiding a large amount of invalid polling and redundant data transmission under traditional fixed-period sampling mechanisms.

[0019] 2. The event triggering judgment unit adopts an adaptive dynamic threshold model, which can automatically adjust the sensitivity according to the fluctuation characteristics of the process itself, ensuring timely response to changes in real working conditions and effectively suppressing false triggering caused by high-frequency noise.

[0020] 3. The streaming feature extraction engine introduces sliding window statistical analysis on the basis of event-driven approach, extracting process dynamic features with engineering significance from sparse effective events, and providing high-quality input information for subsequent control decisions.

[0021] 4. The lightweight control decision model adopts a multilayer perceptron structure implemented with fixed-point numbers, which realizes nonlinear control mapping with extremely low computational overhead, overcoming the performance limitations of traditional lookup table methods or simple proportional-integral-derivative controllers under complex operating conditions.

[0022] 5. The entire system architecture fully considers the hardware constraints of the microcontroller chip and reduces power consumption and resource consumption through techniques such as static memory allocation, direct memory access, deep sleep mode, and fixed-point arithmetic. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the overall technical solution architecture of the present invention; Figure 2 This is a schematic diagram of the core principle framework of the data perception and computation scheduling mechanism that integrates event triggering and stream processing in this invention; Figure 3 This is a flowchart illustrating the logical flow of local edge preprocessing and event triggering determination in this invention. Figure 4 This is a schematic diagram of the joint processing framework of the streaming feature extraction and lightweight control decision model in this invention; Figure 5 This is a schematic diagram of the multi-level interaction relationship and data flow between the microcontroller chip and industrial sensors, actuators and communication modules in this invention; Figure 6 This is a flowchart illustrating the state switching and control process of the low-power sleep and exception handling mechanism in this invention. Detailed Implementation

[0024] refer to Figures 1 to 6This invention provides a scalable embedded industrial control computer control method based on microcontroller chips. Its core lies in constructing a data perception and computation scheduling mechanism that integrates event triggering and stream processing. This method is deployed on resource-constrained microcontroller chip platforms and is suitable for embedded industrial control equipment in battery-powered or wireless industrial IoT scenarios. It solves the problems of energy waste and low system efficiency caused by traditional periodic sampling mechanisms continuously performing redundant calculations and ineffective communication under slow or stable data changes. The specific embodiments of this invention will be described in detail below with reference to the accompanying drawings.

[0025] The method includes the following steps: S1 collects the state data sequence of the controlled object through multiple industrial sensor interface modules; S2, perform local edge preprocessing on the state data sequence; S3, input the preprocessed state data sequence to the event trigger determination unit; S4. If the event triggering condition is met, mark the current data frame as a valid event frame and start the streaming feature extraction engine. S5, the streaming feature extraction engine performs sliding window statistical analysis on consecutive valid event frames to generate streaming feature vectors containing mean, variance, slope and abrupt change point identifiers; S6, input the streaming feature vector into the lightweight control decision model and output the corresponding control command sequence; S7, the control command sequence is sent to the actuator through the industrial communication interface module; S8, if the event triggering condition is not met, maintains the current control output unchanged and enters a low-power sleep state.

[0026] In step S1, multiple industrial sensor interface modules are connected to the general-purpose input / output pins of the microcontroller chip via analog-to-digital converters (ADCs). The sampling frequency of the ADCs is controlled by the timer module of the microcontroller chip, with an initial sampling frequency set to 1000 times per second. When the system enters a low-power sleep state, this initial sampling frequency automatically drops to 10 times per second to further reduce the power consumption of the analog front-end.

[0027] After each analog-to-digital conversion, the conversion result is transferred to a pre-allocated sensor data buffer via the direct memory access controller, avoiding central processing unit (CPU) involvement in data transfer. The status data sequence includes temperature, pressure, displacement, current, and vibration signals. Each signal channel is independently configured with gain and bias parameters to adapt to the output characteristics of sensors with different measurement ranges. All sensor channels share the same high-precision internal reference voltage source, ensuring consistency and long-term stability across multiple channels.

[0028] In step S2, local edge preprocessing includes timestamp alignment, zero-point drift correction, and range normalization. Timestamp alignment is achieved by assigning an independent hardware timestamp register to each sensor channel. At the start of analog-to-digital conversion, the high-precision timer value of the microcontroller chip is latched into the timestamp register of the corresponding channel. During data preprocessing, linear interpolation compensation is performed on the data from the remaining channels based on the timestamp of the earliest arriving data frame, aligning the data from all channels on a unified time axis.

[0029] The linear interpolation is calculated using the equation of a straight line between two points. The value of the interpolation point is equal to the weighted average of the two sampled values ​​before and after the reference time point, and the weighting coefficient is determined by the time interval ratio. Zero-point drift correction is achieved by acquiring the sensor output value under no-load conditions as the zero-point offset during each system power-on self-test phase, and subtracting this zero-point offset from the original sampled value in subsequent data processing.

[0030] Range normalization maps the calibrated data to an integer range of 0 to 65535. The mapping formula is as follows: ; Normalized value For correction value, (Lower limit of measurement range) The upper limit of the measurement range is set, and all calculations use 32-bit integer intermediate variables to prevent overflow. The preprocessed data is temporarily stored in the on-chip static random access memory in the form of a structure, which includes a channel identifier, a normalized value, a timestamp, and a checksum field.

[0031] In step S3, the event trigger determination unit determines whether the current data meets the event triggering conditions based on a preset dynamic threshold model. The event trigger determination unit employs an adaptive dynamic threshold model, whose threshold parameters are dynamically adjusted according to the local fluctuation characteristics of historical data.

[0032] Specifically, the adaptive dynamic threshold model uses the standard deviation of the data within the sliding time window as a benchmark, sets the absolute change threshold to twice the standard deviation, and sets the relative change threshold to 5% of the current data value.

[0033] When the absolute value of the difference between the newly sampled data and the data of the previous valid event frame is greater than the absolute change threshold, or its relative change rate is greater than the relative change threshold, the event triggering condition is determined to be met. The length of the sliding time window is fixed at 50 sampling periods, corresponding to the time constant of a typical industrial process. This sliding time window is implemented in an on-chip static random access memory using a circular buffer structure, with static allocation of memory address space to avoid fragmentation and uncertain latency caused by dynamic memory allocation.

[0034] The event-triggered decision unit performs a decision operation once when each new data frame arrives, and the decision result is used to determine whether to activate the subsequent calculation process.

[0035] In step S4, if the event triggering condition is met, the current data frame is marked as a valid event frame. Valid event frames are stored in the on-chip static random access memory of the microcontroller chip in the form of a structure, which includes a data field, a timestamp field, and a validity flag field.

[0036] The data field is an array of multi-channel sensor data, the timestamp field is a 32-bit unsigned integer, and the validity flag field is a single-byte boolean value. All valid event frames are organized into a singly linked list in chronological order, with the head pointer of the list maintained by the event triggering determination unit. After the streaming feature extraction engine is started, the engine immediately begins processing newly added valid event frames without waiting for complete data blocks.

[0037] In step S5, the streaming feature extraction engine performs sliding window statistical analysis on consecutive valid event frames. The length of the sliding window is a preset fixed number of sampling points, ranging from 10 to 100 sampling periods; in this embodiment, 60 sampling points are used. The sliding window is implemented using a circular buffer structure, and its memory address space is statically allocated in the on-chip static random access memory of the microcontroller chip.

[0038] When each valid event frame arrives, the streaming feature extraction engine performs the following operations: updates the data queue within the sliding window, removes the oldest data and inserts the latest data; calculates the arithmetic mean of all data within the current window; calculates the sum of squares of the deviations of each data point from the mean, and takes the square root to obtain the standard deviation; fits the time-value curve of the data within the window using the linear least squares method to obtain the slope parameter; detects whether there are cases where the change between adjacent data points within the window is greater than a preset mutation threshold, and if so, sets the mutation point marker.

[0039] All the above calculations are implemented using fixed-point arithmetic with a precision of 16-bit signed integers to adapt to microcontroller chips without floating-point units. The streaming feature vector contains four dimensions: mean, standard deviation, slope, and abrupt change marker. The first three are 16-bit signed integers, while the abrupt change marker is a single-byte Boolean value. The streaming feature vector is immediately passed to the lightweight control decision model after generation.

[0040] In step S6, the lightweight control decision model receives streaming feature vectors as input and outputs the corresponding control command sequence.

[0041] The lightweight control decision model is a multilayer perceptron neural network model pre-trained and embedded in the microcontroller chip's read-only memory. This multilayer perceptron neural network model includes an input layer, hidden layers, and an output layer. The input layer has 4 nodes, corresponding to the four dimensions of the streaming feature vector; the hidden layer has 2 nodes, half the number of nodes in the input layer and rounded down; the output layer has 3 nodes, set according to actual control requirements, corresponding to the pulse width modulation duty cycle, digital output switching state, and analog output voltage level, respectively. All layers are fully connected, the activation function is a piecewise linear approximation function, and the weight parameters are stored in 8-bit fixed-point format.

[0042] During the inference phase, the model performs matrix multiplication and addition operations and activation function mappings layer by layer. Matrix multiplication and addition operations use a 16-bit fixed-point accumulator, with intermediate results truncated to 8 bits for output. The three nodes of the output layer are mapped as follows: pulse width modulation duty cycle is represented in per mille form, ranging from 0 to 1000; digital output switch states are represented as Boolean arrays; and analog output voltage levels are mapped as integers from 0 to 4095, corresponding to the input code values ​​of the 12-bit digital-to-analog converter. All output values ​​undergo boundary checks via an output limiting module before transmission to ensure they are below the safe operating range of the actuator.

[0043] In step S7, the industrial communication interface module sends a sequence of control commands to the actuator. The industrial communication interface module supports various industrial fieldbus protocols, including Controller Area Network (CAN) bus, Serial Peripheral Interface (SPI) bus, and Universal Asynchronous Receiver / Transmitter (UART) interface.

[0044] Before sending the control command sequence, the industrial communication interface module encapsulates the sequence according to the communication protocol type of the target actuator, adding a frame header, checksum, and frame trailer, and outputs it serially according to the baud rate and timing requirements specified in the protocol. The checksum is generated using a cyclic redundancy check algorithm, with the generator polynomial being a predefined 16-bit polynomial. The communication process is interrupt-driven; upon completion of transmission, a completion interrupt is triggered, notifying the main control flow to continue execution.

[0045] In step S8, if the event triggering condition is not met, the current control output remains unchanged, and the system enters a low-power sleep state. The low-power sleep state is achieved by configuring the microcontroller chip's power management unit to enter a deep sleep mode. In deep sleep mode, the clock sources for the central processing unit core, analog-to-digital converter module, and unnecessary peripherals are turned off, leaving only the real-time clock module and external interrupt controller active.

[0046] An external interrupt controller is connected to a critical safety signal line. When an emergency stop signal or a communication wake-up signal is detected, an interrupt is immediately triggered to wake up the central processing unit core and resume system operation. After waking up from hibernation, the system first performs a state recovery operation, including reinitializing peripheral registers, restoring the stack pointer and program counter, and then continues to execute the event trigger determination process.

[0047] The method also includes a configuration management module for loading a control parameter set during system initialization. The control parameter set includes threshold parameters for the event triggering decision unit, sliding window length, mutation threshold for streaming feature extraction, network structure parameters and weight data for the lightweight control decision model, and protocol configuration information for the industrial communication interface module. The control parameter set is stored in the electrically erasable programmable read-only memory (EEPROM) of the microcontroller chip and supports remote modification via a secure firmware update mechanism. This secure firmware update mechanism uses digital signature verification to ensure the integrity and legitimacy of parameter updates.

[0048] The method also includes an anomaly handling mechanism. When the streaming feature extraction engine detects that the standard deviation within three consecutive sliding windows is greater than a preset upper threshold, it determines that there is a sensor malfunction or process anomaly, immediately generates a fault alarm signal, and reports it through the industrial communication interface module. Simultaneously, the system switches to a safety control mode, outputting preset safety default control commands until a manual reset command is received. The safety default control commands are stored in a read-only memory, containing safety status values ​​for all output channels, ensuring that the actuators remain harmless in abnormal situations.

[0049] In the process of streaming feature extraction, the slope parameter The calculation is performed using the following formula: ; The length of the sliding window. For the first The timestamps of each sampling point (offset relative to the start of the window). For the first The normalized values ​​of each sampling point. All operations are implemented using 16-bit fixed-point numbers, with fixed-point division performed after calculating the numerator and denominator separately.

[0050] During range normalization, the normalized value The calculation follows the formula: ; This is the value after zero-point drift correction. and These represent the lower and upper limits of the sensor's measurement range, respectively. A 32-bit integer intermediate variable is used to store the numerator during the calculation to prevent multiplication overflow.

[0051] In the adaptive dynamic threshold model, the absolute change threshold The calculation formula is: ; This represents the standard deviation of the data within the sliding time window. The standard deviation is calculated using the following formula: ; The length of the sliding time window. For the first one inside the window Data points, This represents the mean of the data within the window. The square root operation is implemented using a lookup table combined with linear interpolation to meet real-time requirements.

[0052] In the inference process of the lightweight control decision model, the hidden layer output The calculation formula is: ; For the input streaming feature vector, The hidden layer weight matrix is... This is the hidden layer bias vector. This is a piecewise linear approximation activation function. All matrix operations are implemented using a fixed-point scalar multiply-accumulate, with weights and biases stored in 8-bit fixed-point format and inputs and outputs processed in 16-bit fixed-point format.

[0053] The entire system architecture fully considers the hardware constraints of the microcontroller chip. All data buffers, circular queues, and linked list structures are statically allocated in on-chip static random access memory, avoiding runtime memory allocation. The direct memory access controller is responsible for handling sensor data and communication data, freeing up CPU core resources.

[0054] The power management unit dynamically adjusts the power supply and clock of each module according to the system status, achieving fine-grained power consumption control. Anomaly handling mechanisms and safety control modes ensure that the system can maintain basic safety functions even under fault conditions.

[0055] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0056] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A scalable embedded industrial computer control method based on a microcontroller chip, characterized in that, include: The controlled object's state data sequence is acquired through multiple industrial sensor interface modules. The state data sequence includes temperature, pressure, displacement, current, and vibration signals. The state data sequence is subjected to local edge preprocessing, which includes timestamp alignment, zero-point drift correction, and range normalization. The preprocessed state data sequence is input to the event trigger determination unit, which determines whether the current data meets the event triggering conditions based on a preset dynamic threshold model. If the event triggering conditions are met, the current data frame is marked as a valid event frame, and the streaming feature extraction engine is started. The streaming feature extraction engine performs sliding window statistical analysis on consecutive valid event frames to generate streaming feature vectors containing mean, variance, slope, and abrupt change point identifiers. The streaming feature vector is input into the lightweight control decision model, and the lightweight control decision model outputs the corresponding control command sequence. The control command sequence is sent to the actuator through the industrial communication interface module to complete the closed-loop control operation. If the event triggering conditions are not met, the current control output remains unchanged, and the system enters a low-power sleep state until the next sampling clock or an external interrupt wakes it up.

2. The scalable embedded industrial control computer control method based on a microcontroller chip according to claim 1, characterized in that, The event trigger determination unit adopts an adaptive dynamic threshold model, and the threshold parameters of the adaptive dynamic threshold model are dynamically adjusted according to the local fluctuation characteristics of historical data. The adaptive dynamic threshold model uses the standard deviation of the data within the sliding time window as a benchmark, sets the absolute change threshold to an integer multiple of the standard deviation, and sets the relative change threshold to a percentage of the current data value. When the absolute value of the difference between the newly sampled data and the data of the previous valid event frame is greater than the absolute change threshold, or when the relative change rate is greater than the relative change threshold, it is determined that the event triggering condition is met.

3. The scalable embedded industrial control computer control method based on a microcontroller chip according to claim 2, characterized in that, The length of the sliding window is a preset fixed number of sampling points, which corresponds to the time constant of the industrial process; The sliding window is implemented using a ring buffer structure, and its memory address space is statically allocated in the on-chip static random access memory of the microcontroller chip.

4. The scalable embedded industrial control computer control method based on a microcontroller chip according to claim 3, characterized in that, The streaming feature extraction engine performs the following operations: when each valid event frame arrives, updates the data queue within the sliding window; calculates the arithmetic mean of all data within the current window; calculates the sum of squares of the deviations of each data point from the mean, and takes the square root to obtain the standard deviation; The slope parameter is obtained by fitting the time-value curve of the data within the window using the linear least squares method; if there is a situation where the change between adjacent data points within the window is greater than the preset mutation threshold, the mutation point is marked if such a situation exists. All of the above calculations are performed using fixed-point arithmetic.

5. The scalable embedded industrial control computer control method based on a microcontroller chip according to claim 4, characterized in that, The lightweight control decision model is a multilayer perceptron neural network model that is pre-trained and embedded in the read-only memory of the microcontroller chip. The multilayer perceptron neural network model includes an input layer, a hidden layer, and an output layer. The number of nodes in the input layer is equal to the dimension of the streaming feature vector. The number of nodes in the hidden layer is half the number of nodes in the input layer and rounded down. The number of nodes in the output layer is equal to the number of independent degrees of freedom of the control command. Each layer is fully connected, the activation function is a piecewise linear approximation function, and the weight parameters are stored in 8-bit fixed-point format. During the inference phase, the model receives streaming feature vectors as input, performs matrix multiplication and addition operations and activation function mapping layer by layer, and finally outputs the quantized value of the control instruction sequence.

6. The scalable embedded industrial control computer control method based on a microcontroller chip according to claim 5, characterized in that, The industrial communication interface module supports multiple industrial fieldbus protocols, including Controller Area Network (CAN) bus, Serial Peripheral Interface (SPI) bus, and Universal Asynchronous Transceiver (UHT) interface. Before sending the control command sequence, the industrial communication interface module encapsulates the control command sequence according to the communication protocol type of the target actuator, adds a frame header, check code and frame tail, and outputs it serially according to the baud rate and timing requirements specified in the protocol. The check code is generated using a cyclic redundancy check algorithm, and the generator polynomial is a predefined 16-bit polynomial.

7. The scalable embedded industrial control computer control method based on a microcontroller chip according to claim 6, characterized in that, The low-power sleep state is achieved by configuring the power management unit of the microcontroller chip to enter a deep sleep mode; In deep sleep mode, the clock sources of the central processing unit core, analog-to-digital converter module and unnecessary peripherals are turned off, and only the real-time clock module and external interrupt controller are kept in working state. The external interrupt controller is connected to the critical safety signal line. When an emergency stop signal or communication wake-up signal is detected, an interrupt is immediately triggered to wake up the central processing unit core and restore system operation.

8. The scalable embedded industrial control computer control method based on a microcontroller chip according to claim 7, characterized in that, The method loads a set of control parameters during the system initialization phase via a configuration management module. The control parameter set includes the threshold parameters of the event triggering judgment unit, the sliding window length, the mutation threshold of streaming feature extraction, the network structure parameters and weight data of the lightweight control decision model, and the protocol configuration information of the industrial communication interface module. The control parameter set is stored in the electrically erasable programmable read-only memory of the microcontroller chip and can be remotely modified through a secure firmware update mechanism.

9. The scalable embedded industrial control computer control method based on a microcontroller chip according to claim 8, characterized in that, The multiple industrial sensor interface modules are connected to the general-purpose input / output pins of the microcontroller chip via analog-to-digital converters; The sampling frequency of the analog-to-digital converter is controlled by the timer module of the microcontroller chip; After each analog-to-digital conversion is completed, the conversion result is moved to the pre-allocated sensor data buffer via the direct memory access controller.

10. The scalable embedded industrial control computer control method based on a microcontroller chip according to claim 9, characterized in that, The timestamp alignment operation is achieved by allocating an independent hardware timestamp register for each sensor channel; At the start of the analog-to-digital conversion, the high-precision timer value of the microcontroller chip is latched into the timestamp register of the corresponding channel; In the data preprocessing stage, the data of the other channels is linearly interpolated and compensated based on the timestamp of the earliest arriving data frame, so that the data of all channels are aligned on a unified time axis. The linear interpolation is calculated using the equation of a straight line between two points, and the value of the interpolation point is equal to the weighted average of the two sampled values ​​before and after the reference time point.

Citation Information

Cited By

  • Real-time waveform feature vector extraction method and system for semiconductor testing

    CN122153407A