An intelligent control system and method for a roller shutter machine based on posture perception and vision fusion
By employing a master-slave dual-core heterogeneous hardware architecture and a method that integrates attitude perception and vision, the accuracy and fault identification issues of limit control for greenhouse curtain rolling machines have been resolved. This has enabled highly reliable, high-precision, maintenance-free limit control with multi-level redundancy protection, thereby improving the system's stability and security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 白艳明
- Filing Date
- 2026-04-20
- Publication Date
- 2026-06-12
AI Technical Summary
Existing limit control technology for greenhouse curtain rolling machines is difficult to achieve precise limit and fault identification in complex and variable environments, and lacks real-time response capability, especially in scenarios with high-frequency start and stop of cotton quilts, where stability and reliability are poor.
It adopts a master-slave dual-core heterogeneous hardware architecture, combines attitude perception and vision fusion, and constructs a closed-loop control system through a dual-insurance limit system based on angle. It integrates attitude sensor, motor status and vision data for multi-source diagnosis to achieve precise limit and emergency stop control.
It achieves highly reliable and precise maintenance-free limit control, has multi-level redundant protection, and can achieve accurate limit control and rapid fault identification in harsh environments, thus improving the stability and safety of the system.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated control technology in facility agriculture, specifically to an intelligent control system for greenhouse cotton quilt rolling machines, and particularly to a system and method for achieving precise limit and fault identification by utilizing a dual-core heterogeneous hardware architecture, dynamic attitude calibration algorithm, and multi-source data fusion diagnosis. Background Technology
[0002] Currently, the limit control of greenhouse curtain rolling machines mainly adopts the following methods, but none of them can meet the requirements for stability and accuracy in the scenario of high-frequency start-stop of cotton quilts (twice a day for half a year), and there are obvious shortcomings.
[0003] (1) Physical limit switch method: It relies on mechanical switches installed at fixed points, which are easily affected by humidity, rain and snow, and aging in the greenhouse and may fail, resulting in the cotton quilt being rolled up or unrolled; and it cannot adapt to the positional changes after the cotton quilt is deformed. Installation and debugging require professional personnel, and it is difficult for greenhouse owners to maintain it independently.
[0004] (2) Time limit method: The position is calculated by setting the running time, which is simple in logic. However, due to factors such as belt slippage, stalling, and motor speed fluctuation, the actual stroke is seriously out of sync with the set time; the operators are mostly middle-aged and elderly people, and the time parameters need to be adjusted frequently, which is cumbersome and unreliable.
[0005] (3) Pure visual positioning method: Relying on image recognition to determine the position of the quilt, the stability is extremely poor. Changes in lighting and rainy, snowy or foggy weather can easily lead to misjudgment, which not only fails to guarantee the positioning safety, but also increases the frequency of manual intervention.
[0006] (4) Indirect measurement method based on the number of rotations: Some devices indirectly estimate the position of the quilt by detecting the number of rotations of the motor shaft, reducer input shaft, or pulley (such as encoder pulses or magnet signals). This method is essentially an indirect measurement and has inherent defects such as difficult installation and maintenance, signal interference and counting errors, mechanical coupling model mismatch, and loss of position when power is off.
[0007] In summary, current limit technology either relies on vulnerable physical contacts or is based on indirect calculations. Both are single signal source and open-loop control modes, which cannot achieve both accurate limit and fault protection in complex and ever-changing greenhouse environments. Furthermore, they generally lack the ability to identify and stop sudden accidents in real time.
[0008] To address the aforementioned issues, this invention proposes an intelligent control system and method for greenhouse curtain rolling machines based on attitude perception and visual fusion. By directly measuring the pitch angle as a physical reference, it fundamentally avoids the cumulative errors and installation and maintenance difficulties associated with indirect measurements. A dual-insurance limit system with angle as the reference and time as redundancy is constructed, and the time counter is dynamically calibrated using the angle reference to form a closed-loop control of "angle calibration time, time backup angle." Simultaneously, visual analysis is introduced as an auxiliary verification and independent fallback protection method, performing multi-source fusion diagnosis with attitude data and motor status, significantly improving the accuracy of identifying serious accidents and supporting visual active emergency stop, comprehensively ensuring the operational safety and ease of use of the greenhouse curtain rolling machine. Summary of the Invention
[0009] This invention aims to overcome the shortcomings of existing technologies and provide a highly reliable, high-precision, and maintenance-free intelligent control system for roller shutter machines, achieving the following objectives: ensuring the real-time performance of limit control and the independence of video processing through a dual-core heterogeneous hardware architecture; solving the time control drift problem by utilizing attitude sensors and dynamic calibration algorithms to achieve maintenance-free and precise limit control; and integrating visual, attitude, and motor data to achieve accurate identification and emergency stop control of various abnormal accidents, where visual analysis serves both as an auxiliary verification and has independent active emergency stop capabilities.
[0010] To achieve the above objectives, the present invention adopts the following technical solution: I. Hardware Architecture Design The system adopts a master-slave dual-core heterogeneous architecture, consisting of a driver board and a 4G motherboard, and communicates via UART serial port (baud rate 115200, data bits 8, stop bits 1, no parity).
[0011] 1. Driver Board: The main control chip is ESP32, responsible for real-time data acquisition and logic control. Attitude sensing uses a BMI270 six-axis inertial measurement unit (I2C interface), outputting raw acceleration and angular velocity data. Remote control reception uses a 433MHz receiver module, which is connected to the ESP32 after π-type filtering. Motor drive uses a UNL2003 driver chip + 5-channel 12V relay module, controlled by ESP32's GPIO16 / 17, to achieve forward, reverse, and stop operation of a 1.5kW three-phase asynchronous motor. Two GPIO channels (26, 23) are reserved for external limit switches, each optically isolated, supporting wide voltage (DC 5V~24V) switching sensors. The firmware can be remotely configured via OTA to either limit signal mode or counting signal mode.
[0012] 2. 4G Motherboard (Communication and Vision Core): The main control chip is ESP32-S3, responsible for image processing, network communication, and bidirectional data interaction with the driver board. The communication module uses an Air780E 4G Cat.1 module (USB interface) to achieve bidirectional communication with the cloud platform. Image acquisition uses an OV5640 high-definition camera (DVP interface, maximum 5 megapixels, adjustable resolution and frame rate) for real-time monitoring of the quilted area.
[0013] 3. Power Supply and Structure: The power supply is designed as an AC380V to 14V AC power module, which is rectified and filtered to obtain 12V DC to power the driver board and 4G motherboard. Each board has a built-in two-stage step-down circuit, outputting 1.2V, 2.8V, 3.3V, and 4.1V to power the main control chip and peripherals. Installation and Fixing: The control box is fixed to the greenhouse curtain machine pole or roller support rod with four M3 bolts; the camera faces the area covered by the quilt to ensure an unobstructed view. Protection Design: The outer shell is an IP65-rated waterproof box, and the inlet and outlet ports are fully sealed, suitable for the humid and dusty environment of the greenhouse.
[0014] II. Core Control Logic of Driver Board Firmware The driver board uses the ESP32 as the main control chip and runs multi-tasking firmware based on FreeRTOS. The core control logic revolves around attitude data processing, angle-time dual-redundant limit, dynamic calibration, and fault detection.
[0015] 1. Attitude Data Fusion and Filtering Algorithm: The BMI270 outputs raw acceleration and angular velocity data at a frequency of 50Hz. A dynamic Kalman filter is used, employing gyroscope integrals as predictions and accelerometer-derived tilt angles as observations to fuse the data and obtain the optimal attitude angle. Process noise and observation noise are dynamically adjusted based on real-time vibration intensity. A configurable second-order / fourth-order IIR low-pass filter is used to preprocess the raw accelerometer data, filtering out high-frequency noise. The rate of change of angle is detected using a discretized rate and smoothed by IIR filtering. The 30-point sliding window variance of the acceleration magnitude is calculated in real time, normalized, and used as a vibration intensity index. Through the above algorithm, the system can stably output attitude angles with an accuracy better than 0.1° even in harsh environments.
[0016] 2. Three-Point Limit Automatic Stop Logic – Angle and Time Dual Redundancy Control: Utilizing attitude angles to identify three physical reference points – the upper limit, lower limit, and the lower edge of the air vent – precise angle-based stopping is achieved. Simultaneously, a time-based running counter is maintained as a redundant backup for travel estimation, independent of the sensors. Three preset angle thresholds (upper limit angle, lower limit angle, and air vent stop angle) and estimated running time limits are defined. Angle Limit: An independent monitoring task collects the current pitch angle in real-time at 20ms intervals. Based on the motor's running direction, it determines whether it is approaching any reference point. Upon triggering, it immediately stops and enters a cooling period. Time Limit: The running counter increments / decrements every second according to the running direction. When the preset limit is exceeded, a forced stop is initiated. Any stopping action triggers a cooling period, during which no running commands in the corresponding direction are responded to.
[0017] 3. Dynamic Calibration Algorithm for Running Time – Error Elimination Based on Angle Reference: The running counter is periodically calibrated using an absolute angle reference provided by the attitude sensor. The calibration trigger condition is that the motor stops and the attitude is stable (angle change rate less than 0.01° / s and stable for 5 consecutive samples). The calibration task is executed every 500ms. Based on the current pitch angle, the system is divided into upper limit region, lower limit region, and intermediate region, and different calibration rules are used to calculate and update the target counter value for each region. The calibration results are saved to the NVS and restored after power failure. When the attitude sensor fails, the system automatically enters degraded operation mode, stops dynamic calibration, the time limit switches operate independently, and an alarm is reported.
[0018] 4. Multi-source fusion fault detection and emergency stop: Combining attitude data, motor status, and vibration intensity information, it identifies various abnormal operating conditions in real time. Fault detection during operation includes: shaft breakage (roll angle changes by more than 5° within 1 second), stall (angle change rate remains below 0.0015° / s for more than 3 seconds after motor startup, and is in reverse rotation), and phase sequence error (angle decreases during forward rotation or increases during reverse rotation for 4 seconds). Abnormal detection after stopping includes: brake failure (angle change rate greater than 0.03° / s after motor stops for 3 seconds), and abnormal wind noise (vibration intensity exceeds 0.8). Rapid detection of installation errors: Employing a rapid detection logic independent of the main filter link, it uses a second-order low-pass filter to quickly process the raw pitch angle data from the accelerometer. When the pitch angle is below (lower limit angle -4°) and the motor is running in reverse, it immediately stops to prevent the boom from rolling back. During the emergency stop, the motor power is cut off, a buzzer alarm is activated, the system enters a cooling period, and the fault is recorded.
[0019] 5. Expandable auxiliary limit switches and OTA configuration capabilities: The driver board reserves two general-purpose GPIOs (GPIO26, 23), each with optocoupler-isolated inputs, supporting wide-voltage switching sensor inputs. The firmware adopts a modular architecture and can be dynamically configured as an external limit signal input or a counting sensor input via OTA remote upgrades. Custom signal processing logic can also be added to achieve triple redundancy protection.
[0020] III. Core Logic of 4G Motherboard Firmware The 4G motherboard uses the ESP32-S3 as the main control chip, handling communication and vision processing tasks. Upon power-up, it controls the Air780E to complete PPP dialing and connect to the cloud platform via the MQTT protocol. Image acquisition captures images at 1.5-second intervals and converts them to JPEG format, then uploads them to the cloud platform via HTTP POST. It communicates bidirectionally with the driver board via UART serial port; downlink commands are string commands, and uplink data are key-value pair status data packets (500ms cycle). OTA remote upgrades are supported.
[0021] IV. Client Functionality and Visual Analysis The client includes a WeChat mini-program, an app, and an HTML web page. The WeChat mini-program and app provide device management, group control interaction, real-time status polling, anomaly alerts, and remote parameter configuration. The HTML web page consists of a front-end and a Python Flask visual analysis back-end, used for professional image calibration, motion analysis, and safety linkage control.
[0022] The visual analysis backend includes the following modules: (1) ROI region management module: supports saving, loading, and deleting the coordinates of any quadrilateral ROI, and performs adaptive image preprocessing on the ROI region. (2) Displacement detection module: adopts a hybrid displacement detection algorithm (phase correlation method, ORB feature matching, template matching) to achieve 0.2 pixel sub-pixel displacement detection, and outputs the final displacement by weighting the confidence level. (3) Red limit mark detection module: identifies red limit marks based on HSV dual-interval color space, and after morphological denoising, determines that the high limit has been reached when the area is ≥500 pixels and the confidence level is ≥0.85. (4) Brightness distribution analysis module: calculates the grayscale histogram of the ROI region, and adaptively adjusts the detection sensitivity according to the proportion of dark / bright colors. (5) Fault comparison and active emergency stop module: receives the motor running status uploaded by the driver board, compares the visual displacement direction with the motor running direction to determine the phase sequence error; compares the displacement amplitude with the motor status to determine the stall; uses red mark detection as an independent protection for the extreme position; and uses brightness change combined with roll angle change to determine the shaft breakage. When any judgment is made and the driver board fails to trigger an emergency stop within the set time, the vision analysis backend sends an emergency stop command to the driver board via the cloud.
[0023] The visual analysis also features a severe weather degradation mechanism: when image quality falls below a preset threshold, the confidence weight of the visual analysis results is automatically reduced, the active emergency stop function is suspended, and control decisions are based on the physical sensor data of the driver board. The HTML webpage front end displays the detection results of each visual module in real time, and highlights and flashes the corresponding device in case of a fault, supporting secondary confirmation and manual emergency stop by the user.
[0024] Compared with the prior art, the present invention has the following advantages: (1) A highly reliable heterogeneous redundant control system was constructed: a multi-level redundant system with angle master reference, time tracking redundancy, optional physical sensor expansion, and active visual backup, with clear safety boundaries.
[0025] (2) It achieves maintenance-free precise positioning and self-calibration: using the absolute angle reference of the attitude sensor, the dynamic calibration algorithm eliminates the accumulated error, the calibration result is saved after power failure, and long-term operation does not require manual intervention.
[0026] (3) A primary and secondary intelligent fault diagnosis system with multi-source integration has been established: local fault detection of the driver board has the highest priority to ensure millisecond-level emergency stop response; visual analysis assists in verification and independently stops the emergency stop when the driver board does not respond; automatic degradation in severe weather avoids misjudgment.
[0027] (4) It has flexible expansion capabilities and high engineering applicability: it has reserved hardware interfaces and OTA configuration capabilities, and supports multi-terminal collaboration, group control and remote configuration.
[0028] (5) Achieves a balance between low cost and high integration: It adopts low-cost, high-integration chips such as ESP32 and ESP32-S3 and industrial-grade sensors, which have good market promotion value. Attached Figure Description
[0029] Figure 1 System overall architecture diagram. Figure 1This is a schematic diagram of the overall system architecture, drawn using a hierarchical architecture, divided from top to bottom into the client layer, cloud layer, and hardware layer. The client layer includes a WeChat mini-program, an app, and an HTML webpage (visual analysis backend); the cloud layer is the cloud platform, labeled with MQTT / HTTP communication protocols; the hardware layer consists of a 4G motherboard (ESP32-S3, Air780E, OV5640) and driver boards (ESP32, BMI270, motor drive unit), with UART serial communication between them. Data flow is indicated by arrows: Client → Cloud → 4G Motherboard → Driver Board represents the control command flow; Driver Board → 4G Motherboard → Cloud → Client represents the status / image / attitude data flow. Component numbers: 1-WeChat mini-program, 2-App, 3-HTML webpage, 4-Cloud platform, 5-4G motherboard, 6-Driver board, 7-Roller shutter motor, 8-Attitude sensor (BMI270), 9-Camera (OV5640), 10-4G communication module (Air780E).
[0030] Figure 2 Hardware module connection diagram. Figure 2 This diagram illustrates the hardware module connections, showing the hardware connections between the driver board and the 4G motherboard module by module. Driver board section annotations: GPIO16 / 17 of the ESP32 connects to the UNL2003; GPIO26 / 23 are external limit interfaces; the I2C interface connects to the BMI270; UART serial port (TX / RX); 433 receiver module interface; and the relays of the motor drive unit, as well as the connection between the UNL2003 and the three-phase asynchronous motor. 4G motherboard section annotations: The USB interface of the ESP32-S3 connects to the Air780E; the DVP interface connects to the OV5640; the UART serial port (TX / RX) is cross-connected to the driver board; GPIO expansion ports. Power supply lines annotations: AC380V to 12VDC power module, and the two-stage step-down circuits (12V to 1.2V / 2.8V / 3.3V / 4.1V) on each board. Part Numbers: 1-ESP32, 2-BMI270, 3-433 Receiver Module, 4-UNL2003, 5-12V DC Relay Module, 6-Three-Phase Asynchronous Motor, 7-External Limit Switch Interface, 8-ESP32-S3, 9-Air780E, 10-OV5640, 11-AC380V to 12VDC Power Supply Module, 12-Two-Stage Step-Down Circuit, 13-UART Serial Communication Cable.
[0031] Figure 3 : Flowchart of double-insurance limit control. Figure 3This is a flowchart of a dual-insurance limit control process, comprising five stages: start-up judgment, real-time detection, threshold judgment, stop execution, and redundancy protection. Process nodes: Motor start → Determine running direction (forward / reverse) → Load angle threshold and time limit → Acquire pitch angle and update running counter every 20ms → Check if angle threshold (upper limit / vent / lower limit) is triggered → If yes, cut off motor power, update counter + limit status, and enter cooling period; otherwise, determine if running counter exceeds limit value → If yes, execute power cut-off, status update, and cooling period; otherwise, continue real-time detection.
[0032] Figure 4 Dynamic travel calibration flowchart. Figure 4 This is a flowchart of the dynamic travel calibration process, comprising four stages: calibration trigger judgment, region division, calibration calculation, and parameter update. Process nodes: Calibration task start (500ms cycle) → Determine if the motor has stopped and the angle change rate is ≤0.01° / s and stabilizes for 5 consecutive times → Divide the region according to the pitch angle (upper limit / lower limit / middle) → Calculate the target counter value according to the region rules → If it is the lower limit region and the target value is between 5 and 30, briefly reverse and fine-tune to the lower limit position → Update the target counter value → If it exceeds the limit, forcibly set the over-limit counter value → Update the running counter and refresh the limit status → Save parameters to NVS → Calibration complete.
[0033] Figure 5 : Schematic diagram of abnormal diagnosis logic. Figure 5 This is a multi-module fusion block diagram for abnormal diagnosis logic. Common data inputs include attitude data (pitch / roll angle, rate of change of angle), motor data (current, voltage, operating status), visual analysis results (fault characteristics, displacement), and vibration intensity. Each abnormal diagnosis module includes shaft breakage, stalled rotor, installation error, and brake failure, with each labeled with a judgment threshold. Meeting these conditions triggers a fusion judgment as an abnormality, and the output actions include: triggering emergency stop, cutting off motor power, recording the fault, multi-terminal alarm, and entering the cooling period. Component numbers: 1-Attitude data acquisition module, 2-Motor data acquisition module, 3-Visual analysis module, 4-Vibration intensity detection module, 5-Shaft breakage diagnosis module, 6-Stalled rotor diagnosis module, 7-Installation error diagnosis module, 8-Brake failure diagnosis module, 9-Fusion judgment unit, 10-Emergency stop execution unit, 11-Fault recording module, 12-Multi-terminal alarm module.
[0034] Figure 6 Equipment installation diagram. Figure 6Provide a side view diagram of the equipment installation, showing the main body of the greenhouse curtain rolling machine: support pole, roller support rod, reducer, cotton roll, and greenhouse frame. The control box is fixed to the side of the reducer / roller support rod with four M3 bolts, labeled IP65 waterproof. The camera is fixed to the outside of the control box, facing the cotton-covered area, with an unobstructed field of view. The attitude sensor's coordinate system is labeled (X-axis parallel to the roller axis, Y-axis along the direction of the rolling machine's movement, Z-axis perpendicular to the roller), synchronized with the pitch movement of the rolling machine. Component numbers: 1-Greenhouse frame, 2-Cotton roll, 3-Roller support rod, 4-Support pole, 5-Rolling machine reducer, 6-Control box (IP65 waterproof), 7-M3 fixing bolts, 8-Camera (OV5640), 9-Field of view, 10-Attitude sensor (BMI270), 11-Three-phase asynchronous motor, 12-Power supply / communication line (fully enclosed). Detailed Implementation
[0035] Example 1: Hardware Setup and Installation This embodiment details the construction of an actual system based on the above scheme. Component selection: ESP32 development board (NodeMCU-32S), BMI270 six-axis attitude sensor module, ESP32-S3 development board (ESP32-S3-DevKitC-1, with PSRAM), Air780E 4G Cat.1 core board, OV5640 camera module (5-megapixel DVP interface), UNL2003 driver board + 12V DC relay module (5 channels), AC380V to 14V AC power supply module, LM2596 step-down module, AMS1117 series step-down chip, IP65 waterproof box, M3 bolts, 433 receiver module, buzzer, terminal blocks. Circuit connection: according to... Figure 2 The connections shown are as follows: UART serial ports are cross-connected (TX / RX), all modules share a common ground, and relay and motor wiring is properly insulated. Programming: FreeRTOS multitasking firmware for ESP32 and ESP32-S3 is written and programmed using a USB-to-serial converter and the ESP FlashDownload Tool, configuring the programming address according to the chip manual. Installation and Fixing: The control box is fixed to the side of the roller shutter machine's reducer with M3 bolts. The BMI270 coordinate system is adjusted to match the roller shutter machine's movement direction; the camera angle is adjusted to ensure the field of view covers the quilt area; the power / communication lines are sealed with waterproof adhesive after being led out.
[0036] Example 2: Implementation of Dual-Insurance Limiting and Dynamic Calibration Initialization: Upon system power-up, the ESP32 reads the previously saved limit thresholds (upper limit 45°, lower limit 0°, vent 20°) and running time limit (60s); initializes the BMI270, sets the output frequency to 50Hz, and activates adaptive Kalman filtering and vibration detection; the initial value of the running counter is 0 (corresponding to the lower limit position). Initiating Uplink: The user clicks "Uplink" via the mini-program, and the command is forwarded to the ESP32 via the cloud and 4G module; the ESP32 starts the motor to rotate forward, the running counter increments every second, and reads the pitch angle every 20ms. In-Run Limits: When the pitch angle reaches 20° at the vent, the vent automatically stops, the motor stops, and the running counter records the current value as 25. The system enters a cooling period and does not respond to forward rotation commands during this period. Static Calibration: After the motor stops, the system detects that the angle is stable at 20.5° (slightly higher than the vent point), and the angle change rate for five consecutive samplings is less than 0.01° / s. According to the calibration rules, the current angle is in the upper limit region (relative to the windward point). The calculated angle difference with the windward point is 0.5°. Using the measured forward rotation rate of 0.2° / s, the counter value to be reduced is round(0.5 / 0.2) = 3. Therefore, the target counter value should be 25 - 3 = 22. The system automatically calibrates the running counter from 25 to 22 and refreshes the limit status to false. The calibration result is saved to NVS. Continue to ascend: After the cooling period, the user clicks ascend again, and the motor continues to rotate forward. When the pitch angle reaches 44.2° (upper limit 45° - 0.8°), the upper limit is triggered to automatically stop, the motor stops, the running counter is updated to 61, the limit status is set to true, and the cooling period begins. Fault redundancy verification: If the attitude data is temporarily invalidated due to strong vibration, and the pitch angle does not reach 45° but the running counter has exceeded 65 (exceeding runtime_limit + 4), the time limit mechanism independently triggers a forced stop and uploads an "angle sensor abnormal" alarm, realizing dual redundancy protection.
[0037] Example 3: Abnormal Accident Identification and Emergency Stop Real-time upload: The ESP32 uploads attitude data and vibration intensity every 100ms, and motor current (rated 5A) and voltage every second; the ESP32-S3 uploads images to the cloud at 1.5 seconds / frame. Cloud-assisted analysis and independent emergency stop: The cloud server fuses the visual analysis results with attitude data and motor data for diagnosis. Shaft breakage accident simulation: The roller shutter shaft breaks. Local detection on the drive board: The roll angle suddenly changes by 12° within 0.8 seconds, meeting the shaft breakage condition, and an emergency stop is immediately executed. At the same time, the cloud visual analysis detects that the dark color ratio of the ROI suddenly increases from 20% to 75% (two consecutive frames), and the brightness analysis module determines that the shaft breakage is suspected; after receiving the roll angle change reported by the drive board, the vision backend confirms the shaft breakage a second time and issues an emergency stop command again (redundancy protection). After fusion judgment, the buzzer alarms and the LED flashes red; the mini program and APP pop up an alarm box and send an alarm SMS to the user, with auxiliary information confirmed by visual analysis. Example of visual independent emergency stop for phase sequence error: Suppose that the attitude sensor of the drive board temporarily fails due to strong vibration and no phase sequence error is detected. At this time, the motor is actually reversing (downward), but the user issued a forward (upward) command through the mini-program. The visual displacement detection module outputs a downward displacement direction for 3 consecutive frames, and after comparing it with the motor status (forward), it determines that the phase sequence is incorrect. Since the drive board did not report a fault code within 2 seconds, the vision backend actively sends an emergency stop command to the drive board through the cloud. The drive board executes a power cut, and the front-end device card displays "Phase Sequence Error - Vision Independent Trigger". Example of visual independent emergency stop for stalled motor: The motor is running, but the quilt is stuck by a foreign object. The drive board does not trigger the stall in time due to vibration interference. The visual displacement detection module determines that the displacement amplitude is less than 1 pixel for 5 consecutive seconds. The vision backend actively issues an emergency stop command, and the front end prompts "Stalled Motor - Vision Confirmation". Example of emergency stop at the red mark limit position: When the quilt roll is approaching the upper limit position, but the angle limit is not triggered due to calibration deviation, the red mark is exposed from the edge of the quilt, and the red mark detection module outputs an area ≥ 500 pixels. The vision backend immediately issues an emergency stop command as a third layer of protection. Example of degraded performance in severe weather: When encountering heavy fog, if the image blurriness of the visual analysis module exceeds a preset threshold, the system automatically reduces the confidence weight of the visual analysis results to the lowest level, and the visual analysis enters an "auxiliary sleep" state, no longer actively issuing emergency stop commands. At this time, all control decisions rely entirely on the physical sensor data of the driver board, ensuring that the system is not affected by visual misjudgments and can still operate safely and reliably.
[0038] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An intelligent control system for a roller shutter machine based on posture perception and vision fusion, characterized in that, include: The drive board includes a first main control chip and an attitude sensor, a motor drive unit, and a remote control receiver module connected thereto. The drive board is used to collect attitude data and vibration intensity data of the roller shutter in real time, and to perform limit control, dynamic calibration, and local fault detection logic. The 4G motherboard includes a second main control chip and a 4G communication module and an image acquisition module connected thereto. The 4G motherboard is used to interact with the cloud platform, process image data and forward control commands. A dual-core communication link is provided, which connects the driver board and the 4G motherboard via a serial port. The cloud platform is equipped with a visual analysis backend service. The visual analysis backend service communicates with the 4G motherboard to receive motor running status and attitude data uploaded by the driver board, perform visual analysis on the images uploaded by the 4G motherboard, fuse and compare the analysis results with the driver board data, and issue an emergency stop command to the 4G motherboard through the cloud when preset conditions are met. The client, including WeChat mini-programs, APPs, and HTML web page front-ends, communicates with the cloud platform to receive and display data, send control commands, support device group control, remote parameter configuration, and visual calibration functions. The power supply module provides operating voltage to the driver board and the 4G motherboard.
2. The system according to claim 1, characterized in that, The drive board is also equipped with an external physical limit sensor interface, with at least one general-purpose input / output pin reserved, which can be connected to an external limit switch as a physical backup limit; the motor drive unit consists of a drive chip and a relay module, and is driven by the pins of the first main control chip to realize the forward, reverse and stop control of the motor.
3. The system according to claim 1, characterized in that, The attitude sensor is a six-axis inertial measurement unit, which is connected to the first main control chip via an I2C interface; the drive board processes the raw data through dynamic Kalman filtering and multi-level low-pass filtering, and outputs pitch angle and roll angle, and the filtering parameters are dynamically adjusted according to the real-time vibration intensity.
4. A method for intelligent control of a roller shutter machine based on the system described in any one of claims 1-3, characterized in that, The method includes a three-point limit automatic stop step, specifically: Preset at least three angle thresholds: upper limit angle, lower limit angle, and air outlet stop angle; Real-time acquisition of the pitch angle of the roller shutter machine; determination of whether it is close to any angle threshold based on the motor's running direction. Once any threshold is triggered, the motor power is immediately cut off, the running counter is updated and set to the limit state, and the motor enters the cooling period. During the cooling period, the motor does not respond to running commands in the corresponding direction. Simultaneously, a time-based running counter is maintained. When the counter exceeds the preset running time limit or falls below the preset value, the motor is forcibly stopped and a cooling period mechanism is executed, forming a dual redundant limit of angle and time.
5. The control method according to claim 4, characterized in that, The method further includes a runtime dynamic calibration step, specifically: The calibration task is performed when the motor stops and the attitude is stable. Calculate the target run counter value according to the rules of the corresponding region based on the current pitch angle region; Update the counter and refresh the limit status, then save the calibration results to non-volatile storage; When an attitude sensor failure is detected, the system enters a degraded operation mode, stops dynamic calibration, operates the time limit independently, and issues a sensor failure alarm.
6. The control method according to claim 4, characterized in that, The method also includes a multi-source fusion fault detection step: Real-time acquisition of attitude data, vibration intensity, and motor operating status; Identify at least one of the following abnormal operating conditions and trigger an emergency stop: Broken shaft: The roll angle changes beyond a preset threshold within a preset time. Stalled: After the motor starts, the angle change rate remains below the preset threshold for more than a preset time, and the current state is started by a click command; Phase sequence error: After the motor starts, the actual angle change does not match the normal situation and the motor stops abruptly after a preset time; Brake failure: After the motor stops, the rate of change of angle is still greater than the preset threshold; Preventing tipping: Employs fast detection logic independent of the main filter, which immediately stops the pitch angle when it falls below the lower limit angle preset value and the reverse motor is running.
7. The system according to claim 1, characterized in that, The external limit sensor interface reserved on the driver board supports remote configuration to one of the following modes via OTA: Limit signal mode: As an input to an external limit switch, it works in parallel with angle limit and time limit; Counting signal mode: As a pulse counting input, used for connecting an external encoder or Hall sensor; OTA upgrades allow for the dynamic addition of signal processing logic for different sensors, enabling flexible expansion of the auxiliary limit function.
8. A visual fusion-based intelligent auxiliary monitoring system for roller shutter machines, characterized in that, include: HTML web page front-end, visual analysis back-end, cloud platform, and 4G motherboard that communicates with the roller shutter control system; The visual analytics backend includes: The ROI region management module is used to save and load the coordinates of user-defined regions of interest. The displacement detection module uses a hybrid displacement detection algorithm to output sub-pixel level displacement direction and amplitude; The red marker detection module identifies red limit markers within an ROI based on the HSV color space. The brightness distribution analysis module calculates the proportion of dark colors (grayscale < 80) within the ROI; The fault comparison and active emergency stop module is used to receive the motor operating status uploaded by the driver board and compare the visual inspection results with it in real time. The system is configured as follows: When the direction of motion output by the displacement detection module is opposite to the direction of motor operation and is consistent for multiple consecutive frames, it is determined to be a phase sequence error; When the motor is in the running state but the displacement amplitude is consistently lower than the preset threshold, it is determined to be stalled. When the area and confidence level output by the red marker detection module exceed the preset threshold, it is determined that the limit position has been reached. When the brightness distribution analysis module detects a sudden increase in the proportion of dark colors exceeding a preset threshold, it determines a shaft breakage accident based on the roll angle change. If any of the above determinations is met, and the driver board fails to trigger an emergency stop within the set time, the active emergency stop module sends an emergency stop command to the driver board via the cloud; at the same time, the corresponding device card will be highlighted and flashed on the front end of the HTML webpage to display the fault type and source.
9. A method for intelligent auxiliary monitoring of roller shutter machines based on visual analysis of HTML web pages, characterized in that, Includes the following steps: S1. Use the HTML webpage frontend to perform ROI marking on the camera image and save it to the backend; S2. Acquire images at a preset frequency, extract the ROI region, and perform preprocessing; S3. Perform hybrid displacement detection on two adjacent ROI images and output subpixel-level displacement data; S4. Calculate displacement stability and output the effective displacement results; S5. Detect the red limit marker within the ROI to determine whether the high limit has been reached; S6. Analyze the ROI brightness distribution and adaptively adjust the detection sensitivity based on the ratio of light to dark areas; S7. Combine visual displacement, red marker, brightness information with attitude and motor status to make judgment, output auxiliary diagnostic information and determine whether to trigger active emergency stop; S8. Real-time acquisition of motor running direction and start / stop status uploaded by the driver board; S9. Compare the visual displacement direction with the motor running direction: If the directions are opposite and the displacement amplitude is greater than 5 pixels for 3 consecutive frames, it is determined to be a phase sequence error, and S12 is executed; S10. If the motor is running and the displacement amplitude is less than 2 pixels for 5 consecutive seconds, it is determined to be stalled, and S12 is executed; S11. If the area of the red marker is ≥500 pixels and the confidence level is ≥0.85, it is determined that the extreme position has been reached, and S12 is executed; if the dark color ratio is >60% and it is continuous for 2 frames, it is determined that the axis is suspected to be broken, and S12 is executed after confirming it in combination with the roll angle change rate. S12. Send an emergency stop command to the driver board, and simultaneously highlight and flash the corresponding device in the front end of the HTML webpage, and record the fault log; When the image quality is below a preset threshold, the system automatically reduces the confidence weight of the visual analysis results, suspends the active emergency stop function, and makes control decisions based on the physical sensor data of the driver board.
10. The method according to claim 9, characterized in that, The displacement stability determination rule is as follows: a score characterizing displacement stability is calculated based on the displacement variance of multiple consecutive frames of images, and the variance is negatively correlated with the stability score.
11. The system according to claim 8, characterized in that, The HTML webpage front-end supports: device grouping, batch group control, and single-machine fine-tuning; real-time display of displacement, direction, stability, red markers, and brightness distribution; automatic highlighting and flashing and push of warning information when visual abnormalities occur.
12. The method according to claim 9, characterized in that, Before sending the emergency stop command to the driver board, a secondary confirmation step is also included: The vision analysis backend waits for the driver board to report the status again. If the driver board has already reported the same fault code, an emergency stop is immediately issued. If the driver board does not report a fault, the vision analysis backend will continuously and independently detect the fault three times. After all three tests determine the fault, an emergency stop command will be issued and marked as "vision-independent trigger" on the front end.