Sunroof controller failure detection method and system
The sunroof fault detection method, which utilizes multi-channel acquisition and a joint diagnostic model, solves the problems of single feature recognition dimensions and difficulty in distinguishing coupled faults in existing technologies. It achieves accurate identification and location of sunroof faults, improving diagnostic accuracy and system reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG WANYI AUTOMOBILE TECH CO LTD
- Filing Date
- 2026-04-19
- Publication Date
- 2026-06-26
AI Technical Summary
Existing sunroof fault diagnosis technologies suffer from limitations such as single feature recognition dimensions, difficulty in distinguishing complex coupled faults, insufficient ability to identify mechanical jamming and electrical short circuits, and inability to accurately locate bus communication and hardware drive faults. These limitations result in limited diagnostic accuracy, increased maintenance costs, and impact on overall vehicle reliability.
The system acquires raw physical characteristic signals and bus communication status data during the operation of the sunroof through a multi-channel acquisition unit, performs time-frequency domain analysis, constructs a joint diagnostic model to fuse multi-source heterogeneous information, and combines a preset fault fingerprint database to identify and locate faults, including in-depth processing of the current sampling module, Hall sensor and bus communication status.
It achieves comprehensive perception of mechanical operating conditions, electrical performance, and communication status, improves the accuracy of fault identification, reduces the false alarm rate, maintains high diagnostic sensitivity in complex dynamic load environments, extends the service life of the sunroof system, and reduces after-sales maintenance costs.
Smart Images

Figure CN122284574A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fault detection and automotive electronic control technology, specifically relating to a fault detection method and system for a sunroof controller. Background Technology
[0002] With the rapid development of automotive electronics technology and the continuous improvement of intelligence levels, the role of vehicle body control systems in vehicle safety and comfort is becoming increasingly prominent. As an important component of the vehicle body control system, the reliability and safety of the sunroof directly affect the driving experience and occupant safety, and efficient fault detection technology is crucial to ensuring the stable operation of the sunroof system.
[0003] Sunroof controllers typically integrate motor drive control, position detection, and bus communication functions. In practical applications, the system primarily achieves precise control of the sunroof's opening and closing status and anti-pinch protection by collecting the motor's physical operating parameters and communication protocol data. Current detection technologies often focus on real-time monitoring of the motor's operating status, aiming to take appropriate protective measures promptly in the event of abnormal operating conditions.
[0004] Existing sunroof fault diagnosis methods suffer from the following shortcomings: The detection features are too simplistic, typically relying on simple threshold judgments such as whether the current exceeds limits or the motor is stalled, lacking the ability to deeply analyze complex operating conditions; the accuracy of identifying coupled faults is low, as the lack of joint verification of multi-source parameters makes it difficult for the system to accurately distinguish between inter-turn short-circuit faults in the motor body and physical jamming anomalies in the mechanical track; the ability to locate hardware-software related faults is weak, failing to effectively identify the essential difference between hardware damage to the controller drive arm and command loss caused by abnormal LIN bus load; and the system's comprehensive processing capability for multi-source heterogeneous information is insufficient, with traditional single-judgment methods often exhibiting poor robustness when facing electromagnetic interference or dynamic load changes. These problems collectively limit the accuracy of sunroof controller fault diagnosis, increase maintenance costs, and affect the reliability of the entire vehicle. Summary of the Invention
[0005] To address the structural technical pain points of existing sunroof fault diagnosis technologies, such as limited feature recognition dimensions, difficulty in distinguishing complex coupled faults, insufficient ability to identify mechanical jamming and electrical short circuits, and inability to accurately locate bus communication and hardware driver faults, this invention provides a sunroof controller fault detection method, comprising the following steps: S1. Obtain the original physical characteristic signals and bus communication status data during the operation of the sunroof through the multi-channel acquisition unit; the multi-channel acquisition unit uses the current sampling module set in the drive circuit to obtain the bus current signal and phase current signal of the motor, uses the Hall sensor associated with the motor shaft to capture the pulse signal representing the sunroof position information and speed information in real time, and simultaneously monitors the data link layer of the local interconnection network bus to collect message frame status data and power supply voltage fluctuation values. S2. Perform time-frequency domain analysis on the original physical feature signal to extract multi-dimensional operating features, and simultaneously calculate the real-time load parameters of the bus communication status data; the multi-dimensional operating features include the current ripple frequency and current change slope representing the motor commutation state obtained by feature denoising processing of the acquired bus current signal, and also include the instantaneous angular velocity and angular acceleration of the motor calculated based on the pulse period of the Hall sensor, and determine the real-time physical position of the sunroof by combining a preset travel mapping table; the real-time load parameters include the bus load feature vector generated after statistical analysis of the messages of the local interconnection network bus; S3. Input the multi-dimensional operating characteristics and the real-time load parameters into a preset joint diagnostic model and perform multi-source heterogeneous information fusion processing. The joint diagnostic model includes establishing a current-speed coupling correlation model to compare the matching degree of current change slope and angular acceleration, and constructing a drive-communication collaborative evaluation model to combine power supply voltage fluctuation characteristics and bus load feature vector to determine the root cause of abnormal command execution. Then, a weighted fusion algorithm is used to dynamically adjust the weights of different features according to the current operating mode of the window to form a global diagnostic matrix covering current features, motion features and communication features. S4. Based on the fusion processing results, identify and output specific fault categories and location information through a logical judgment matrix; match the global diagnostic matrix with a preset fault fingerprint database to identify whether there are motor body faults, mechanical track faults, hardware drive module faults, or communication link faults.
[0006] Preferably, the current sampling module is equipped with a high-precision shunt with low temperature drift characteristics, and the current sampling module is coupled with an anti-aliasing filter circuit composed of operational amplifiers. The cutoff frequency of the anti-aliasing filter circuit is configured to filter out the electromagnetic noise generated by the high-speed switching of the power transistor in the drive circuit and retain the current ripple signal within the frequency range. The high-frequency sampling frequency used to acquire the bus current signal and phase current signal is configured to be a preset multiple higher than the motor commutation frequency to ensure that the characteristic components related to the motor rotor structure are separated in the frequency domain.
[0007] Preferably, the pulse signal is obtained through a dual Hall sensor arrangement scheme, and the spatial position difference of the dual Hall sensors is set to a preset electrical angle; The process of acquiring the pulse signal includes: using the hardware input capture function to record the trigger time of the rising edge and falling edge of each pulse, determining the rotation direction of the motor by logically judging the leading or lagging relationship of the two pulse signals, and deriving the real-time physical displacement of the sunroof glass in combination with the preset lead screw transmission ratio.
[0008] Preferably, the extraction process of the current change slope includes: During the motor startup phase or load change phase, calculate the increment of the current amplitude within a unit sampling period; The S3 includes distinguishing between electrical performance deviations and abnormal mechanical resistance, including: when the slope of the current change is detected to show a positive surge, while the angular acceleration is negative or below the first preset acceleration threshold, it is determined that the increased electrical energy has not been converted into kinetic energy, thereby determining that there is an increase in mechanical running resistance caused by the accumulation of foreign objects in the skylight track.
[0009] Preferably, the process of extracting the current ripple frequency includes: Perform a Fast Fourier Transform on the bandpass filtered current signal to identify the main harmonic components; The S3 includes cross-validation logic for the execution current ripple frequency and the Hall physical speed: the speed corresponding to the harmonic component is compared with the physical speed measured by the Hall sensor. When the deviation between the two exceeds a preset proportional threshold, it is determined that the motor has abnormal torque fluctuations caused by inter-turn short circuits or commutator wear.
[0010] Preferably, the process of constructing the bus load feature vector includes: statistically analyzing the frame error rate, collision rate, and command response timeout rate of the local interconnect network bus within a preset sliding window; The frame error rate is determined based on the ratio of the number of checksum error messages to the total number of received messages. The collision rate is calculated by monitoring whether the bus is pulled low to a dominant bit when sending a recessive bit. The instruction response timeout rate is determined by recording whether the response delay time from the master node sending the scheduling table instruction to the slave node's feedback data exceeds the protocol's upper limit.
[0011] Preferably, when executing S3, it also includes fault determination logic for the metal-oxide-semiconductor field-effect transistor in the drive circuit: when the bus current is detected to rise rapidly to the preset current limiting threshold and the angular velocity fed back by the Hall sensor drops to zero within a preset time, the transient sequence of the disappearance of current ripple and the return of speed to zero is analyzed retrospectively. If the vanishing point of the current ripple characteristic precedes the zeroing point of the rotation speed on the time axis, it is determined that the metal-oxide-semiconductor field-effect transistor of the drive bridge arm has been damaged by breakdown. If the rotational speed reaches zero before the ripple disappearance point, it is determined that the motor is stalled due to severe mechanical track jamming.
[0012] Preferably, the processing of bus communication status data also includes classification and statistical logic for checksum errors: when the checksum error only appears in a message frame with a function identifier, it is determined to be a software logic anomaly of the transmitting controller; When the checksum error occurs randomly in all types of message frames and is accompanied by edge jitter of the physical layer level, it is determined that the signal integrity is compromised due to harness shielding failure or strong external interference.
[0013] Preferably, when executing S3, an association determination logic based on power supply voltage fluctuation characteristics is introduced: The system monitors the voltage drop depth and recovery time of the power supply. When the voltage drop depth exceeds the preset drop threshold and the bus conflict rate or checksum error is simultaneously observed to increase, it is identified as transient electromagnetic interference caused by the start of an external high-power load. The system automatically enters the signal fault tolerance mode and suspends the current fault judgment logic until the power supply voltage recovers to the preset stable range and maintains the preset stable duration.
[0014] A sunroof controller fault detection system, used to implement the above method, includes: The signal acquisition module is used to acquire the physical quantities and communication message data of the motor operation in real time. The signal acquisition module integrates a current transformer component, a pulse capture interface and a bus transceiver monitoring circuit. The current transformer component is deployed at the power input terminal of the controller and the lower bridge arm side of the drive bridge to realize synchronous monitoring of the total current and branch current. The feature processing unit, connected to the signal acquisition module, is used to convert the raw signal into a feature vector for diagnosis. The feature processing unit includes a hard real-time processing engine, which is configured to perform digital filtering, effective value calculation and phase locking and frequency measurement of the high-frequency current signal in parallel, and to use multi-point regression analysis logic to perform linear trend fitting on continuous sampling points to extract the slope of current change. The integrated diagnostic kernel is configured to receive the feature vector and execute joint evaluation logic based on current, speed, and communication. The integrated diagnostic kernel integrates a fuzzy logic inference engine and a preset heuristic judgment algorithm to automatically adjust the weight ratio of current features and bus features in the final evaluation according to the data confidence under different operating conditions, and introduces a health index variable to reflect the overall performance deviation of the system. The judgment output module is used to generate fault commands and control the sunroof to perform safety redundancy operations, and is responsible for sending standardized diagnostic codes to the vehicle central gateway; the judgment output module is associated with a non-volatile storage area storing a fault fingerprint database, which contains multi-dimensional feature vector templates for different fault modes obtained through deep learning training.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention solves the problem that traditional sunroof fault diagnosis relies solely on a single current threshold by constructing a diagnostic architecture that integrates multi-source heterogeneous information.
[0016] 2. By introducing the deep integration of Hall position signals and bus load data, the system achieves comprehensive perception of mechanical conditions, electrical performance, and communication status.
[0017] 3. This multi-dimensional cross-validation mechanism improves the accuracy of fault identification and can accurately separate the coupling characteristics of mechanical jamming and electrical faults, thereby reducing the false alarm rate of the system.
[0018] 4. Under complex dynamic load environments, this invention utilizes the complementarity of multidimensional features to ensure high diagnostic sensitivity even under weak feature signals, thereby extending the service life of the sunroof system and reducing after-sales maintenance costs. Attached Figure Description
[0019] 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 three-in-one joint evaluation logic based on current, speed and communication in this invention; Figure 3 This is a logical flowchart of the multi-channel raw signal acquisition and multi-dimensional operational feature extraction in this invention; Figure 4 This is a flowchart illustrating the logical process of global diagnostic matrix construction and fault fingerprint database matching and identification in this invention. Figure 5 This is a schematic diagram of the multi-level interaction relationship and data flow of the sunroof controller fault detection system in this invention. Detailed Implementation
[0020] Example 1: Reference Figures 1 to 5 This embodiment details a fault detection method for a sunroof controller applied in a smart cockpit environment of a passenger vehicle. The method is designed to address the problem of false alarms caused by mechanical wear, lubricant aging, and electronic component parameter drift during long-term use of the sunroof.
[0021] Step S1 involves acquiring the raw physical characteristic signals and bus communication status data during the sunroof's operation through a multi-channel acquisition unit. At the hardware level, the sunroof controller's signal acquisition circuit is configured with a multi-channel acquisition architecture capable of parallel processing.
[0022] In step S11, a current sampling module installed in the drive circuit is used to acquire the motor's bus current signal and phase current signal at a preset high-frequency sampling frequency. Specifically, this current sampling module uses a high-precision shunt with low temperature drift characteristics, and its resistance is set at the milliohm level to reduce the impact on the voltage drop of the main power circuit.
[0023] To capture the subtle current ripple generated during motor commutation, an anti-aliasing filter circuit composed of operational amplifiers is coupled to the sampling module. This anti-aliasing filter circuit has its cutoff frequency precisely calibrated to filter out electromagnetic noise generated by the high-speed switching of the power transistors in the drive circuit, while fully preserving the current pulsation signal in the frequency range of 200 Hz to 5000 Hz. The high-frequency sampling frequency is configured to be more than five times higher than the motor commutation frequency. In practical applications, if the commutation frequency at the motor's highest speed is 1000 Hz, the sampling frequency needs to be set above 5000 Hz to ensure that spectral aliasing does not occur in subsequent frequency domain analysis, thereby accurately separating the characteristic components related to the motor rotor structure in the frequency domain.
[0024] Step S12 involves capturing pulse signals in real time using Hall effect sensors associated with the motor shaft. This embodiment employs a dual Hall effect sensor arrangement, with the spatial position difference between the two sensors set to 90 electrical degrees. When the magnet on the motor rotor sweeps across the sensor's sensing surface, it generates two square wave pulse signals with a phase difference. The acquisition interface records the rising and falling edges of each pulse in real time via hardware input capture. This timestamp information is used to obtain the sunroof's position and rotational speed information. By logically determining the leading or lagging relationship between the two pulse signals' phases, the system can uniquely determine the motor's rotation direction, and then, combined with a preset screw drive ratio, accurately deduce the real-time physical displacement of the sunroof glass.
[0025] Step S13 involves real-time monitoring of the data link layer of the local interconnection network bus. The sunroof controller, acting as a slave node on the local interconnection network bus, uses its internal bus transceiver to convert dominant and recessive voltage levels on the bus into digital logic signals. The controller's protocol processor continuously collects message frame status data, including the deviation of the synchronization field, the verification status of the identifier field, and the integrity of data segments. Furthermore, the power monitoring circuit collects real-time fluctuations in the power supply voltage. This synchronous monitoring of the power supply voltage is crucial because transient drops in the vehicle's power system, such as during the start-up of a high-power starter motor, directly affect the motor's torque output and the level threshold of the bus driver. By introducing this dimension of parameters, false fault signals caused by unstable external power supply can be filtered out.
[0026] Step S2: Perform time-frequency domain analysis on the original physical feature signal to extract multi-dimensional operating features, and simultaneously calculate the real-time load parameters of the bus communication status data.
[0027] Step S21 involves denoising the acquired bus current signal. The process first includes applying a moving average filtering algorithm to remove random high-frequency glitches, followed by extracting the current ripple frequency and current change slope representing the commutation state. The current change slope extraction process is as follows: during motor startup or load surge phases, the controller calculates the increment of the current amplitude within a unit sampling period. The ratio of the difference between the current value collected at the current moment and the current value at the previous moment to the sampling period time is the current change slope. When the current increment exceeds a first preset threshold, it indicates a significant change in the power consumption of the motor circuit within a short period.
[0028] Step S22: Calculate the instantaneous angular velocity and angular acceleration of the motor based on the pulse period of the Hall sensor. The controller calculates the time difference between two adjacent rising pulse edges, takes its reciprocal, and combines it with the motor's pole pair parameter to obtain the instantaneous angular velocity of the motor. Further, the angular acceleration is obtained by differential calculation of the angular velocities of adjacent periods. The system determines the real-time physical position of the sunroof using a preset travel mapping table. The travel mapping table records the total number of Hall pulses corresponding to each millimeter of displacement during the sunroof's transition from fully open to fully closed.
[0029] Step S23 involves statistically analyzing the messages on the local interconnection network bus and calculating the frame error rate, collision rate, and command response timeout rate within a specific time window. The frame error rate is calculated based on the ratio of the number of messages with checksum errors to the total number of received messages within a preset 1000-millisecond sliding window. The collision rate is calculated by monitoring whether the bus is forcibly pulled low to a dominant bit when sending a recessive bit. The command response timeout rate records the response delay time from the master node sending a scheduling table command to the slave node's feedback data. If the delay time exceeds the upper limit specified by the protocol, communication is considered to have a risk of lag. These parameters are integrated to generate a bus load feature vector, which is used to characterize the health of the communication link.
[0030] Step S3: Input the multi-dimensional operating characteristics and real-time load parameters into the preset joint diagnostic model and perform multi-source heterogeneous information fusion processing.
[0031] Step S31: Establish a current-speed coupling correlation model. This model compares the matching degree between the current change slope and angular acceleration to distinguish between electrical performance deviations and abnormal mechanical resistance. Under normal mechanical operation, an increase in current should be accompanied by a positive increase in angular acceleration (start-up phase) or a stable angular acceleration (uniform speed phase). If a positive surge in the current change slope is detected, while the angular acceleration is negative or significantly lower than the first preset acceleration threshold, the system determines that this increased electrical energy has not been converted into effective kinetic energy but has been used to overcome additional mechanical friction. This initially indicates an increase in mechanical running resistance, such as the presence of foreign objects in the track.
[0032] Step S32: Construct a drive communication collaborative evaluation model. This model combines power supply voltage fluctuation characteristics with bus load feature vectors to determine the root cause of abnormal command execution. If the system detects that the sunroof actuator does not respond to the opening command, and the power supply voltage fluctuation is within a preset stable range, but the conflict rate in the bus load feature vector is abnormally high, then the fault source is determined to be a damaged physical communication link or bus congestion, rather than a damaged motor drive circuit.
[0033] Step S33: The evaluation results of the above models are integrated using a weighted fusion algorithm. The weighted fusion algorithm dynamically adjusts the weights of different features based on the current sunroof operating mode: such as initialization mode, automatic operation mode, and anti-pinch trigger mode. Under high-speed driving conditions, due to the large wind resistance noise, the system automatically increases the confidence weight of the current ripple feature and decreases the weight of the Hall speed signal, forming a global diagnostic matrix covering current features, motion features, and communication features.
[0034] Step S4: Based on the fusion processing results, the specific fault category and location information are identified and output through the logical judgment matrix.
[0035] Step S41: Match the global diagnostic matrix with a preset fault fingerprint database. The fault fingerprint database stores multi-dimensional feature templates for various typical fault modes. For example, for inter-turn short circuits in motor body faults, the template features in the fingerprint database are: there is a deviation between the current ripple frequency and the theoretical commutation frequency corresponding to the physical speed measured by the Hall sensor, and this deviation exceeds a preset proportional threshold, such as 10%. When the similarity between the real-time extracted feature vector and the template exceeds the preset matching threshold, the fault can be identified.
[0036] Step S42: After identifying a fault, the system triggers corresponding protective actions based on the severity of the fault. If the fault is determined to be a severe motor stall, the controller will immediately cut off the drive signal of the power transistor to prevent it from burning out. If the fault is determined to be a minor increase in track friction, a maintenance warning will be sent to the body control unit via the bus. At the same time, the system generates a fault diagnosis log with a timestamp, recording a snapshot of the current waveform at the time of the fault, the bus error count, and the physical location of the sunroof, so that after-sales personnel can perform in-depth analysis using a diagnostic tool.
[0037] Example 2: This example focuses on describing the deep diagnostic logic of the sunroof controller when facing complex electromagnetic interference and power system instability. In actual vehicle operation, when high-power inductive loads inside the vehicle, such as wiper motors and air conditioning compressors, start and stop, it can cause instantaneous voltage drops and spikes in the power supply network, which often leads to false alarms from traditional controllers.
[0038] In step S13, this embodiment enhances the depth of analysis of power supply voltage fluctuations. The acquisition unit not only records the absolute value of the voltage but also monitors the depth of voltage drops and recovery time through a high-speed comparator circuit. In step S23, the monitoring of the local interconnect network bus adds statistical logic for classifying checksum errors.
[0039] During the drive communication coordination evaluation in step S32, the system employs an associative judgment logic. When a power supply voltage drop exceeds a preset drop threshold, such as a sudden drop from 12 volts to below 9 volts, and an increase in bus conflict rate or checksum error is observed within the same timestamp range, the fusion diagnostic kernel does not directly determine it as a controller hardware fault. Instead, the system identifies such phenomena as transient electromagnetic interference caused by the startup of an external high-power load. The system automatically enters a "signal fault-tolerant mode," temporarily suspending the current fault judgment logic until the power supply voltage recovers to a preset stable range, such as 11 volts to 16 volts, and maintains this stable state for a preset duration.
[0040] To address the stability of bus communication, this embodiment introduces targeted monitoring of messages with specific identifiers in step S23. If checksum errors only occur in message frames with function identifiers, while other status query messages behave normally, the determination logic will point to a software logic anomaly in the sending controller or a protocol parsing error in that function. If checksum errors occur randomly in all types of message frames and are accompanied by edge jitter of the physical layer level, it is determined that the signal integrity is compromised due to harness shielding failure or strong external interference.
[0041] During fault location in step S41, a time coherence check is introduced into the logical decision matrix. For any identified fault characteristic, the system requires it to remain consistent over three consecutive sampling periods. This multi-dimensional cross-validation and time-series filtering improves the system's robustness in harsh electromagnetic environments, ensuring that only genuine hardware failure or persistent communication interruption triggers the final fault command.
[0042] Example 3: This example elaborates on the technical details of the present invention in detecting early performance degradation inside the motor and determining hardware damage in the drive circuit, which is of great significance for realizing the transformation from passive maintenance to predictive maintenance.
[0043] In step S21, a deeper level of frequency domain transformation is employed in the processing of the current signal. A spectral mapping under pure textual description logic is performed on the bandpass-filtered current signal. The system identifies the main harmonic components in the current waveform, which are determined by the physical structure of the motor rotor commutator. In step S31, the system performs cross-validation between the current ripple frequency and the Hall physical speed.
[0044] Under normal conditions, there is a fixed linear relationship between the physical speed of the motor and the frequency of the current ripple. When the system detects a deviation between the two exceeding a preset proportional threshold, for example, the speed feedback from the Hall sensor remains constant, but a specific harmonic frequency in the current ripple shifts or its amplitude increases abnormally, this usually indicates an inter-turn short circuit or commutator wear inside the motor. This early, subtle change is undetectable in traditional current RMS detection.
[0045] To address fault detection in the metal-oxide-semiconductor field-effect transistor (MOSFET) of the drive circuit, this embodiment incorporates a transient characteristic comparison logic in step S31. When a sudden fault causes the bus current to rise rapidly to a preset current-limiting threshold, and the angular velocity fed back by the Hall sensor drops to 0 within a preset time, the system will retrospectively analyze the transient sequence in which the current ripple disappears.
[0046] If high-speed sampling data reveals that the vanishing point of the current ripple characteristic precedes the point of zero rotation speed on the time axis, this means that the motor's commutation characteristics were lost due to an electrical circuit break or short circuit before it stopped rotating. This indicates that the metal-oxide-semiconductor field-effect transistor in the drive arm has been damaged by a breakdown. Conversely, if the data shows that the speed reaches zero before the ripple disappears, meaning the motor was forcibly stopped before the current became a constant DC value, this indicates that the motor is stalled due to severe mechanical track jamming. This millisecond-level analysis of the fault evolution process provides irrefutable data evidence for accurately distinguishing between electrical damage and mechanical jamming.
[0047] Example 4: This example describes how the present invention avoids false alarms and anti-pinch failures in low-temperature environments by dynamically adjusting the threshold to address the impact of changes in lubricating grease viscosity on sunroof operation in cold climates.
[0048] In extremely cold conditions, such as when the ambient temperature is below -20 degrees Celsius, the grease inside the sunroof guide rail becomes abnormally viscous, leading to increased resistance in motor operation. Traditional detection methods, which use a fixed current threshold, easily misinterpret this as mechanical jamming or anti-pinch triggering.
[0049] In step S1 of this embodiment, the system additionally acquires temperature data shared by the vehicle exterior temperature sensor via the bus. When extracting the current change slope in step S21, the system dynamically compensates for the "first preset change threshold" based on the temperature parameters. The lower the temperature, the higher the preset change threshold is adjusted to allow for normal current increases due to lubricant viscosity.
[0050] In the current-speed coupling correlation model in step S31, the system compares the changing trend of angular acceleration. Under the condition of increased resistance due to low temperature, although the current is large, the change of angular acceleration is usually slow and smooth, exhibiting a "soft load" characteristic. However, in the case of true hard mechanical jamming, such as when a foreign object falls into the track, the angular acceleration will show an instantaneous step drop.
[0051] By introducing a temperature compensation coefficient into the global diagnostic matrix in step S33, this invention can accurately isolate parameter variations caused by environmental factors. When slow operation due to low temperature is detected, the determination output module will not output a fault command, but will instead control the drive circuit to increase the duty cycle, providing greater starting torque to overcome resistance, and marking it as a low-temperature operation mode in the fault log.
[0052] Example 5: This example describes a sunroof controller fault detection system, used to implement the methods described in the above examples. The system employs a modular design to achieve high real-time performance and high data processing efficiency.
[0053] The system includes a signal acquisition module that integrates a current transformer component, a pulse capture interface, and a bus transceiver monitoring circuit. The current transformer component is deployed at both the controller's power input and the lower arm of the drive bridge. This dual-position deployment enables simultaneous monitoring of the total current and branch current; by comparing the difference, the system can even detect minute leakage faults in the controller's internal circuit board. The pulse capture interface connects to the microcontroller's hardware timer channel, ensuring that the edges of the Hall signal can be recorded with nanosecond-level resolution.
[0054] Connected to the signal acquisition module is the feature processing unit. This feature processing unit contains a hard real-time processing engine, whose logical structure is configured as a parallel processing architecture, capable of simultaneously performing digital filtering, RMS value calculation, and phase locking and frequency measurement of the Hall pulse signal. This parallelism ensures that the delay from the change of physical quantity to the generation of feature vectors is controlled within 2 milliseconds.
[0055] The system includes a fusion diagnostic kernel configured to receive feature vectors and execute joint evaluation logic based on a three-dimensional approach of current, speed, and communication. This fusion diagnostic kernel integrates a fuzzy logic inference engine and a pre-defined heuristic decision-making algorithm. The kernel can automatically adjust the weighting of current and bus features in the final evaluation based on the data confidence level under different operating conditions. For example, when a high error rate is detected in the bus communication itself, the kernel automatically reduces the confidence level of communication features in fault location and instead relies on local current and position hardwired signals for degraded protection determination.
[0056] The decision output module generates fault instructions based on the kernel's evaluation results. This module is responsible not only for driving the power stage to perform safety redundancy operations, such as stopping operation, reversing, or cutting off power, but also for sending standardized diagnostic codes to the vehicle's central gateway via the local interconnect network bus. The decision output module is also associated with a non-volatile memory area for storing the aforementioned fault fingerprint database. This database contains multi-dimensional feature vector templates for different fault modes. These templates were obtained by deep learning training and compression of a large amount of operating data from motors under normal conditions, winding short-circuit conditions, bearing wear conditions, track obstruction conditions, and communication interference conditions, ensuring high-performance matching and identification with limited embedded resources.
[0057] In this embodiment, the feature processing unit employs multi-point regression analysis when calculating the slope of the current change. This means it doesn't simply take the difference between two points, but rather performs linear trend fitting using 10 consecutive sampling points. This approach further filters out interference caused by commutation pulsations, ensuring the slope parameter accurately reflects the macroscopic trend of the load torque.
[0058] Furthermore, during the weighted fusion process in step S33, the fusion diagnostic kernel introduces an intermediate variable called the health index. This intermediate variable is a continuous value distributed from 0 to 100, reflecting the current overall performance deviation of the system. When the health index continues to decline but has not yet reached the fault determination threshold, the determination output module triggers a predictive maintenance signal, reminding the driver to check the sunroof tracks via the dashboard, thus intervening before a fault actually occurs.
[0059] The interaction between the modules of the above system is achieved through a high-speed internal bus, ensuring that the closed-loop response time from the raw physical quantity input at the sensor end to the final judgment output meets automotive-grade requirements.
[0060] Through the detailed descriptions of the above embodiments, it can be seen that the present invention constructs a logically rigorous, rapidly responsive, and accurately positioned sunroof fault monitoring system by deeply mining and collaboratively processing multi-source heterogeneous data such as current, rotational speed, position, voltage, and communication load. This sunroof fault monitoring system utilizes the complementarity of multi-dimensional features to not only identify single hardware failures but also deeply analyze complex coupled faults and environmental interference factors. Especially in situations where the use of complex mathematical formulas is prohibited, the detailed physical logic description and engineering implementation path described above ensure that those skilled in the art can implement the predetermined fault detection function based on the technical means described in this invention, thereby improving system robustness and diagnostic accuracy.
[0061] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for detecting faults in a sunroof controller, characterized in that, Includes the following steps: S1. Obtain the original physical characteristic signals and bus communication status data during the operation of the sunroof through the multi-channel acquisition unit; the multi-channel acquisition unit uses the current sampling module set in the drive circuit to obtain the bus current signal and phase current signal of the motor, uses the Hall sensor associated with the motor shaft to capture the pulse signal representing the sunroof position information and speed information in real time, and simultaneously monitors the data link layer of the local interconnection network bus to collect message frame status data and power supply voltage fluctuation values. S2. Perform time-frequency domain analysis on the original physical feature signal to extract multi-dimensional operating features, and simultaneously calculate the real-time load parameters of the bus communication status data; the multi-dimensional operating features include the current ripple frequency and current change slope representing the motor commutation state obtained by feature denoising processing of the acquired bus current signal, and also include the instantaneous angular velocity and angular acceleration of the motor calculated based on the pulse period of the Hall sensor, and determine the real-time physical position of the sunroof by combining a preset travel mapping table; the real-time load parameters include the bus load feature vector generated after statistical analysis of the messages of the local interconnection network bus; S3. Input the multi-dimensional operating characteristics and the real-time load parameters into a preset joint diagnostic model and perform multi-source heterogeneous information fusion processing. The joint diagnostic model includes establishing a current-speed coupling correlation model to compare the matching degree of current change slope and angular acceleration, and constructing a drive-communication collaborative evaluation model to combine power supply voltage fluctuation characteristics and bus load feature vector to determine the root cause of abnormal command execution. Then, a weighted fusion algorithm is used to dynamically adjust the weights of different features according to the current operating mode of the window to form a global diagnostic matrix covering current features, motion features and communication features. S4. Based on the fusion processing results, identify and output specific fault categories and location information through a logical judgment matrix; match the global diagnostic matrix with a preset fault fingerprint database to identify whether there are motor body faults, mechanical track faults, hardware drive module faults, or communication link faults.
2. The sunroof controller fault detection method according to claim 1, characterized in that, The current sampling module is equipped with a high-precision shunt with low temperature drift characteristics, and the current sampling module is coupled with an anti-aliasing filter circuit composed of operational amplifiers. The cutoff frequency of the anti-aliasing filter circuit is configured to filter out the electromagnetic noise generated by the high-speed switching of the power transistor in the drive circuit and retain the current ripple signal within the frequency range. The high-frequency sampling frequency used to acquire the bus current signal and phase current signal is configured to be a preset multiple higher than the motor commutation frequency to ensure that the characteristic components related to the motor rotor structure are separated in the frequency domain.
3. The sunroof controller fault detection method according to claim 2, characterized in that, The pulse signal is obtained through a dual Hall sensor arrangement scheme, and the spatial position difference of the dual Hall sensors is set to a preset electrical angle. The process of acquiring the pulse signal includes: using the hardware input capture function to record the trigger time of the rising edge and falling edge of each pulse, determining the rotation direction of the motor by logically judging the leading or lagging relationship of the two pulse signals, and deriving the real-time physical displacement of the sunroof glass in combination with the preset lead screw transmission ratio.
4. The sunroof controller fault detection method according to claim 3, characterized in that, The process of extracting the slope of the current change includes: During the motor startup phase or load change phase, calculate the increment of the current amplitude within a unit sampling period; The S3 includes distinguishing between electrical performance deviations and abnormal mechanical resistance, including: when the slope of the current change is detected to show a positive surge, while the angular acceleration is negative or below the first preset acceleration threshold, it is determined that the increased electrical energy has not been converted into kinetic energy, thereby determining that there is an increase in mechanical running resistance caused by the accumulation of foreign objects in the skylight track.
5. A method for detecting faults in a sunroof controller according to claim 4, characterized in that, The process of extracting the current ripple frequency includes: Perform a Fast Fourier Transform on the bandpass filtered current signal to identify the main harmonic components; The S3 includes cross-validation logic for the execution current ripple frequency and the Hall physical speed: the speed corresponding to the harmonic component is compared with the physical speed measured by the Hall sensor. When the deviation between the two exceeds a preset proportional threshold, it is determined that the motor has abnormal torque fluctuations caused by inter-turn short circuits or commutator wear.
6. A method for detecting faults in a sunroof controller according to claim 5, characterized in that, The process of constructing the bus load feature vector includes: statistically analyzing the frame error rate, collision rate, and command response timeout rate of the local interconnection network bus within a preset sliding window; The frame error rate is determined based on the ratio of the number of checksum error messages to the total number of received messages. The collision rate is calculated by monitoring whether the bus is pulled low to a dominant bit when sending a recessive bit. The instruction response timeout rate is determined by recording whether the response delay time from the master node sending the scheduling table instruction to the slave node's feedback data exceeds the protocol's upper limit.
7. A method for detecting faults in a sunroof controller according to claim 6, characterized in that, When executing S3, it also includes fault determination logic for the metal oxide semiconductor field-effect transistor in the drive circuit: when the bus current is detected to rise rapidly to the preset current limiting threshold and the angular velocity fed back by the Hall sensor drops to zero within a preset time, the transient sequence of the disappearance of current ripple and the return of speed to zero is analyzed retrospectively. If the vanishing point of the current ripple characteristic precedes the zeroing point of the rotation speed on the time axis, it is determined that the metal-oxide-semiconductor field-effect transistor of the drive bridge arm has been damaged by breakdown. If the rotational speed reaches zero before the ripple disappearance point, it is determined that the motor is stalled due to severe mechanical track jamming.
8. A method for detecting faults in a sunroof controller according to claim 7, characterized in that, The processing of bus communication status data also includes classification and statistical logic for checksum errors: when the checksum error only appears in a message frame with a function identifier, it is determined to be a software logic anomaly of the transmitting controller; When the checksum error occurs randomly in all types of message frames and is accompanied by edge jitter of the physical layer level, it is determined that the signal integrity is compromised due to harness shielding failure or strong external interference.
9. A method for detecting faults in a sunroof controller according to claim 8, characterized in that, When executing S3, an association determination logic based on power supply voltage fluctuation characteristics is introduced: The system monitors the voltage drop depth and recovery time of the power supply. When the voltage drop depth exceeds the preset drop threshold and the bus conflict rate or checksum error is simultaneously observed to increase, it is identified as transient electromagnetic interference caused by the start of an external high-power load. The system automatically enters the signal fault tolerance mode and suspends the current fault judgment logic until the power supply voltage recovers to the preset stable range and maintains the preset stable duration.
10. A sunroof controller fault detection system, used to implement the method according to any one of claims 1 to 9, characterized in that, include: The signal acquisition module is used to acquire the physical quantities and communication message data of the motor in real time. The signal acquisition module integrates a current transformer component, a pulse capture interface, and a bus transceiver monitoring circuit. The current transformer component is deployed at the power input terminal of the controller and on the lower arm side of the drive bridge to achieve synchronous monitoring of the total current and branch current. The feature processing unit, connected to the signal acquisition module, is used to convert the raw signal into a feature vector for diagnosis. The feature processing unit includes a hard real-time processing engine, which is configured to perform digital filtering, effective value calculation and phase locking and frequency measurement of the high-frequency current signal in parallel, and to use multi-point regression analysis logic to perform linear trend fitting on continuous sampling points to extract the slope of current change. The integrated diagnostic kernel is configured to receive the feature vector and execute joint evaluation logic based on current, speed, and communication. The integrated diagnostic kernel integrates a fuzzy logic inference engine and a preset heuristic judgment algorithm to automatically adjust the weight ratio of current features and bus features in the final evaluation according to the data confidence under different operating conditions, and introduces a health index variable to reflect the overall performance deviation of the system. The judgment output module is used to generate fault commands and control the sunroof to perform safety redundancy operations, and is responsible for sending standardized diagnostic codes to the vehicle's central gateway. The determination output module is associated with a non-volatile storage area that stores a fault fingerprint database, which contains multi-dimensional feature vector templates for different fault modes obtained through deep learning training.