A control method and device of a sunshade curtain, a vehicle, a medium and a program product

By performing spectrum analysis and benchmark comparison on the motor's operating sound, the reliability and stability issues of the anti-pinch technology for electric sunshades were resolved, enabling rapid and sensitive detection of obstacles.

CN122129186APending Publication Date: 2026-06-02CHONGQING CHANGAN AUTOMOBILE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING CHANGAN AUTOMOBILE CO LTD
Filing Date
2026-04-03
Publication Date
2026-06-02

Smart Images

  • Figure CN122129186A_ABST
    Figure CN122129186A_ABST
Patent Text Reader

Abstract

This application provides a control method, device, vehicle, medium, and program product for a sunshade curtain; the method includes: acquiring a first sound signal during the opening or closing of the sunshade curtain driven by a drive motor; performing spectral analysis on the first sound signal to obtain a first spectrum diagram; comparing the first spectrum diagram with a reference spectrum diagram; wherein the reference spectrum diagram is obtained based on a second sound signal collected during the operation of the drive motor when the sunshade curtain is in normal operation; if the comparison result is abnormal, determining that the sunshade curtain has encountered an obstacle, and controlling the drive motor to drive the sunshade curtain to move in the opposite direction to the current direction of movement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, specifically to a control method, device, vehicle, medium, and program product for a sunshade. Background Technology

[0002] Currently, anti-pinch methods for electric sunshades are generally divided into current-based anti-pinch schemes and Hall effect anti-pinch schemes. There are also some speed detection-based schemes, which also rely on Hall effect calculations to determine the rotational speed and are essentially Hall effect anti-pinch schemes as well. However, both current-based and Hall effect anti-pinch schemes are easily affected by motor voltage and ambient temperature, resulting in potential for false alarms or unreliable anti-pinch measures. Summary of the Invention

[0003] This application provides a method for controlling a sunshade curtain, a control device for a sunshade curtain, a vehicle, a computer-readable storage medium, and a computer program product, which are beneficial for improving the speed, reliability, and stability of detecting whether a sunshade curtain encounters an obstacle.

[0004] In a first aspect, embodiments of this application provide a control method for a sunshade curtain, the method comprising: acquiring a first sound signal during the operation of the drive motor while the sunshade curtain is being opened or closed by a drive motor; performing spectral analysis on the first sound signal to obtain a first spectrum diagram; comparing the first spectrum diagram with a reference spectrum diagram; wherein the reference spectrum diagram is obtained based on a second sound signal collected during the operation of the drive motor while the sunshade curtain is in normal operation; and determining that the sunshade curtain has encountered an obstacle if the comparison result is abnormal, and controlling the drive motor to drive the sunshade curtain to move in the opposite direction to the current direction of movement.

[0005] It is understood that in the control method provided in this application embodiment, during the process of the drive motor driving the sunshade to open or close, a first sound signal of the drive motor during operation is acquired; then, the first sound signal is subjected to spectrum analysis to obtain a first spectrum diagram; and the first spectrum diagram is compared with a reference spectrum diagram to determine whether the sunshade has encountered an obstacle. Thus, since the frequency change of the drive motor's sound is earlier and more sensitive than the current change, that is, before the physical resistance increases significantly (leading to a change in current), a small change in the mechanical stress state will cause a change in the spectrum corresponding to the sound of the drive motor operating. Therefore, it is beneficial to control the sunshade to reverse in a timely manner at the initial stage of the sunshade encountering an obstacle; furthermore, since the frequency of sound is less affected by power supply voltage and temperature fluctuations, it is beneficial to improve the reliability and stability of detection; even for flexible obstacles with insignificant increases in resistance, the small vibrations and sound changes introduced can be effectively captured in the frequency domain, thus enabling effective detection of flexible obstacles as well.

[0006] In some embodiments, comparing the first spectrogram with a reference spectrogram includes: comparing the spectral features of the first spectrogram with the spectral features of the reference spectrogram.

[0007] It is understood that in the control method provided in the embodiments of this application, the spectral characteristics of the first spectrum diagram are compared with the spectral characteristics of the reference spectrum diagram. Since the frequency characteristics of sound are less affected by power supply voltage and temperature fluctuations, it is beneficial to improve the reliability and stability of detection. Even for flexible obstacles with insignificant resistance increases, the small vibrations and sound changes introduced can be effectively captured in the frequency domain. Therefore, it is possible to effectively detect flexible obstacles as well.

[0008] In some embodiments, comparing the spectral characteristics of the first spectrogram with the spectral characteristics of the reference spectrogram includes one or more of the following: comparing the energy of the actual frequency in the first spectrogram with the energy of the reference frequency in the reference spectrogram; comparing the magnitude of the actual frequency in the first spectrogram with the magnitude of the reference frequency in the reference spectrogram; comparing the amplitude of the actual frequency in the first spectrogram with the amplitude of the reference frequency in the reference spectrogram; and comparing the actual resonance peak in the first spectrogram with the amplitude of the reference frequency in the reference spectrogram.

[0009] It is understood that in the control method provided in this application embodiment, since the energy, magnitude, amplitude, and resonant peak of the frequency are all related to the operating state of the drive motor, and if the sunshade encounters an obstacle during the process of the drive motor driving the sunshade to open or close, the frequency characteristics (energy, magnitude, amplitude, and resonant peak) in the spectrum diagram will change. This is beneficial for improving the speed, reliability, and stability of detecting whether the sunshade has encountered an obstacle.

[0010] In some embodiments, the comparison result is abnormal, including one or more of the following: the energy difference between the energy of the actual frequency and the energy of the reference frequency is greater than or equal to a first threshold; the actual frequency is less than the reference frequency, and the difference between the actual frequency and the reference frequency is greater than or equal to A% of the reference frequency; the amplitude of the actual frequency is greater than the amplitude of the reference frequency, and the difference between the amplitude of the actual frequency and the amplitude of the reference frequency is greater than or equal to B% of the amplitude of the reference frequency; the difference between the actual resonance peak and the amplitude of the reference frequency is greater than a second threshold.

[0011] It is understood that in the control method provided in this application embodiment, when the sunshade encounters an obstacle during operation, the running resistance of the drive motor increases. In order to overcome this increased resistance, the speed of the drive motor decreases, resulting in a decrease in the fundamental frequency of the drive motor. When the load on the sunshade increases, it causes more severe vibrations in components such as the stator and rotor of the drive motor. The more severe vibrations are transmitted to the air through the drive motor housing and mounting structure, resulting in a larger amplitude and higher energy of the drive motor. When the sunshade encounters an obstacle during operation, if structural resonance is involved, it will also be accompanied by an abnormal amplification of the resonance peak. Therefore, when the energy difference between the energy of the actual frequency and the energy of the reference frequency is greater than or equal to a first threshold, the actual frequency is less than the reference frequency and the difference between the actual frequency and the reference frequency is greater than or equal to A% of the reference frequency, the amplitude of the actual frequency is greater than the amplitude of the reference frequency and the difference between the amplitude of the actual frequency and the amplitude of the reference frequency is greater than or equal to B% of the amplitude of the reference frequency, or the difference between the actual resonance peak and the amplitude of the reference frequency is greater than a second threshold, the comparison is considered abnormal, that is, the sunshade encounters an obstacle. This improves the speed, reliability, and stability of detecting whether a sunshade is encountering an obstacle.

[0012] In some embodiments, the method further includes: repeatedly acquiring a second sound signal during the operation of the drive motor; wherein the second sound signal is the sound signal of the drive motor when the drive motor drives the sunshade to complete one operation without obstacles; performing spectral analysis on the second sound signal to obtain a second spectrum diagram; and obtaining the reference spectrum diagram based on multiple second spectrum diagrams.

[0013] It is understood that in the control method provided in this application embodiment, the second sound signal of the drive motor is collected when the drive motor drives the sunshade curtain to complete one full operation in the absence of obstacles; then, the spectrum analysis of the second sound signal is performed on each of the two signals; and a reference spectrum is obtained based on the multiple second spectrum diagrams. This is beneficial to making the obtained reference spectrum diagram more reliable, and thus beneficial to improving the detection speed, reliability and stability when detecting whether the sunshade curtain has encountered an obstacle.

[0014] In some embodiments, the step of performing spectral analysis on the first audio signal to obtain a first spectrogram includes: preprocessing the first audio signal to obtain a first processed signal; adding a Hanning window to the first processed signal to obtain a second processed signal; and performing a fast Fourier transform on the second processed signal to obtain the first spectrogram.

[0015] It is understood that in the control method provided in this application embodiment, the first sound signal is first preprocessed to amplify the sound signal or eliminate environmental noise, etc.; then, a Hanning window is added to the first processed signal to suppress spectral leakage and improve frequency recognition accuracy; next, a fast Fourier transform is performed on the second processed signal to obtain a first spectrum. This makes the obtained first spectrum more reliable, and thus helps to improve the detection speed, reliability, and stability when detecting whether the sunshade has encountered an obstacle.

[0016] Secondly, embodiments of this application provide a control device for a sunshade curtain, comprising: an acquisition module configured to acquire a first sound signal during the opening or closing of the sunshade curtain driven by a drive motor; a spectrum analysis module configured to perform spectrum analysis on the first sound signal to obtain a first spectrum diagram; a comparison module configured to compare the first spectrum diagram with a reference spectrum diagram; wherein the reference spectrum diagram is obtained based on a second sound signal collected during the operation of the drive motor when the sunshade curtain is in normal operation; and a control module configured to determine that the sunshade curtain has encountered an obstacle if the comparison result is abnormal, and control the drive motor to drive the sunshade curtain to move in the opposite direction to the current direction of movement.

[0017] Thirdly, embodiments of this application provide a vehicle, which includes a drive motor, a sunshade, a memory, and a processor; Memory for storing computer-executable instructions or computer programs that run on the processor; The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the sunshade control method provided in the embodiments of this application.

[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the sunshade control method provided in embodiments of this application when executed by a processor.

[0019] Fifthly, embodiments of this application provide a computer program product, including a computer program or computer-executable instructions, wherein when the computer program or computer-executable instructions are executed by a processor, the control method for the sunshade curtain provided in embodiments of this application is implemented. Attached Figure Description

[0020] Figure 1 A schematic diagram of the implementation process of a sunshade curtain control method provided in this application embodiment. Figure 1 ; Figure 2 A schematic diagram illustrating an implementation process for obtaining a first spectrum diagram, provided in an embodiment of this application; Figure 3 A schematic diagram of the implementation process of a sunshade curtain control method provided in this application embodiment. Figure 2 ; Figure 4 A schematic diagram of the control system for a sunshade curtain provided in an embodiment of this application; Figure 5 A schematic diagram illustrating a sound amplitude characteristic provided in an embodiment of this application; Figure 6 A schematic diagram of the implementation process of a sunshade curtain control method provided in this application embodiment. Figure 3 ; Figure 7 A schematic diagram of a control device for a sunshade curtain provided in an embodiment of this application; Figure 8 This is a structural schematic diagram of a vehicle provided in an embodiment of this application. Detailed Implementation

[0021] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described below in conjunction with the accompanying drawings. The embodiments described below are only some embodiments of this application, not all embodiments. Therefore, the described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] In the following description, references to “some embodiments” or “other embodiments” describe a subset of all possible embodiments. However, it is understood that “some embodiments” or “other embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0024] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0026] In one related technology, a current detection method is provided, which determines whether a sunshade has encountered an obstacle by monitoring changes in the current of the drive motor. When the sunshade encounters an obstacle, the motor load increases, the current rises, and the system controls the sunshade to reverse when it detects that the current exceeds a set threshold. However, current changes are greatly affected by factors such as temperature, power supply voltage, and mechanical wear, making threshold setting difficult and prone to misjudgment (failure to activate the anti-pinch function) or malfunction (unexplained reversal). For soft obstacles with little change in resistance (such as a child's finger), the current change may be insignificant, leading to anti-pinch failure.

[0027] Another related technology provides a Hall pulse counting method, which compares the number of motor rotations counted by a Hall sensor with a preset normal operating number of rotations; when the number of rotations is abnormal, it is determined that the motor is stalled. However, this method is essentially a "post-stall" detection, and the response is not timely enough. By the time it is detected, some compression and damage may have already occurred to the obstacle or the sunshade mechanism itself.

[0028] In summary, the aforementioned technologies suffer from problems such as slow response, susceptibility to interference, and insensitivity to flexible obstacles. Therefore, there is an urgent need for a more sensitive, faster, and more reliable anti-pinch technology for sunshades.

[0029] In view of this, this application provides a method for controlling a sunshade, the method being applied to the vehicle integration unit (VIU) of a vehicle controller. Figure 1 A schematic diagram of the implementation process of a sunshade curtain control method provided in this application embodiment. Figure 1 ,like Figure 1 As shown, the method includes steps 101 to 103: Step 101: During the process of the drive motor driving the sunshade to open or close, acquire the first sound signal when the drive motor is running. Step 102: Perform spectral analysis on the first sound signal to obtain a first spectrum diagram; Step 103: Compare the first spectrum diagram with the reference spectrum diagram; wherein the reference spectrum diagram is obtained based on the second sound signal collected when the drive motor is running under normal operating conditions of the sunshade curtain; Step 104: If the comparison result is abnormal, determine that the sunshade curtain has encountered an obstacle, and control the drive motor to drive the sunshade curtain to move in the opposite direction to the current direction of movement.

[0030] It is understood that in the sunshade control method provided in this application embodiment, during the process of the drive motor driving the sunshade to open or close, a first sound signal of the drive motor during operation is acquired; then, the first sound signal is subjected to spectrum analysis to obtain a first spectrum diagram; and the first spectrum diagram is compared with a reference spectrum diagram to determine whether the sunshade has encountered an obstacle. Thus, since the frequency change of the drive motor's sound is earlier and more sensitive than the current change, that is, before the physical resistance increases significantly (leading to a change in current), a small change in the mechanical stress state will cause a change in the spectrum corresponding to the sound of the drive motor operating. Therefore, it is beneficial to control the sunshade to reverse in a timely manner at the initial stage of the sunshade encountering an obstacle; furthermore, since the frequency of sound is less affected by power supply voltage and temperature fluctuations, it is beneficial to improve the reliability and stability of detection; even for flexible obstacles with insignificant increases in resistance, the small vibrations and sound changes introduced can be effectively captured in the frequency domain, thus enabling effective detection of flexible obstacles as well.

[0031] The following sections will describe further optional implementation methods for each of the above steps, as well as related terms.

[0032] In step 101, during the process of the drive motor driving the sunshade to open or close, the first sound signal of the drive motor during operation is acquired.

[0033] It should be understood that the drive motor is not limited in the embodiments of this application. In some embodiments, the drive motor includes a micro motor for driving the sunshade to open (including open to a specific position) or close (including close to a specific position), which is a smaller and more precise actuator. Further, in some embodiments, the drive motor includes, but is not limited to, one of the following: a micro DC motor or a stepper motor. The micro DC motor starts rotating upon receiving an electrical signal from the vehicle body, driving the roller to retract or extend the sunshade. The stepper motor can precisely control the sunshade to open to a specific position (e.g., allowing the sunshade to open only one-third), rather than simply "open" or "close".

[0034] In this embodiment, the sunshade is not limited to any particular type. The sunshade, used to block sunlight, is an automatically raising and lowering curtain driven by a motor. In some embodiments, the sunshade includes, but is not limited to, one of the following: side window sunshades, rear windshield sunshades, sunroof / panoramic sunroof sunshades, etc. Side window sunshades are installed on the rear door windows (or the side windows of the vehicle) and are typically made of mesh or coated fabric, providing sun protection and privacy. Rear windshield sunshades are installed behind the rear seats and in front of the rear windshield; when raised, they prevent rear passengers from being directly exposed to sunlight and also prevent glare from following vehicle headlights. Sunroof / panoramic sunroof sunshades are typically a large roller-type curtain that slides from the front of the roof to the rear, opening or closing.

[0035] In some embodiments, acquiring the first sound signal during the operation of the drive motor includes: acquiring the first sound signal during the operation of the drive motor collected by a sound sensor disposed near the drive motor. This method, using a sound sensor for detection, eliminates the need for direct contact with the drive motor or transmission mechanism, simplifying the device structure and reducing hardware costs.

[0036] It should be understood that the sound sensor is not limited in the embodiments of this application; the frequency response range of the sound sensor needs to cover the main operating frequency band of the drive motor. In some embodiments, the sound sensor is a high-temperature resistant and electromagnetic interference-resistant micro-electro-mechanical systems (MEMS) microphone.

[0037] In this embodiment, the installation location of the sound sensor is not limited. In some embodiments, the sound sensor is installed on the drive motor housing or inside the drive motor compartment at a location that allows for clear acquisition of the sound of the drive motor during operation and is less affected by ambient noise.

[0038] In some embodiments, acquiring the first sound signal during the operation of the drive motor includes: acquiring the first sound signal during the operation of the drive motor at a first sampling rate.

[0039] It should be understood that the first sampling rate is not limited in the embodiments of this application. For example, in one possible implementation, the first sampling rate is 20 kilohertz (kHz).

[0040] In step 102, the first sound signal is subjected to spectral analysis to obtain a first spectrum diagram.

[0041] In some embodiments, Figure 2 This application provides a schematic diagram of an implementation process for obtaining a first spectrogram, as shown in the embodiment of the present application. Figure 2As shown, the first audio signal can be subjected to spectral analysis through the following steps 201 to 203 to obtain the first spectrum diagram: Step 201: Preprocess the first sound signal to obtain a first processed signal; Step 202: Apply a Hanning window to the first processed signal to obtain the second processed signal; Step 203: Perform a Fast Fourier Transform on the second processed signal to obtain the first spectrum.

[0042] It is understood that in the sunshade control method provided in this application embodiment, the first sound signal is first preprocessed to amplify the sound signal or eliminate environmental noise, etc.; then, a Hanning window is added to the first processed signal to suppress spectral leakage and improve frequency identification accuracy; next, a fast Fourier transform is performed on the second processed signal to obtain a first spectrum. This makes the obtained first spectrum more reliable, and thus helps to improve the detection speed, reliability, and stability when detecting whether the sunshade has encountered an obstacle.

[0043] In some embodiments, preprocessing the first audio signal to obtain a first processed signal includes: digitally filtering and / or amplifying the first audio signal to obtain the first processed signal.

[0044] It is understood that, in this embodiment, digital filtering of the first sound signal is beneficial for eliminating environmental noise. Amplifying the first sound signal is beneficial for bringing the weak sensor signal up to a voltage range that the backend device can effectively recognize and process. Furthermore, since the sound of a normally operating drive motor is a smooth background sound, the energy of this sound is relatively low. Without high-rate, low-noise amplification, the frequencies corresponding to these sound signals may be hidden in electronic noise and cannot be displayed on the spectrum.

[0045] Furthermore, in some embodiments, the step of digitally filtering and / or amplifying the first audio signal to obtain the first processed signal includes one of the following: digitally filtering the first audio signal to obtain the first processed signal; amplifying the first audio signal to obtain the first processed signal; digitally filtering the first audio signal and then amplifying it to obtain the first processed signal; or amplifying the first audio signal and then digitally filtering it to obtain the first processed signal.

[0046] It should be understood that the audio signal from the drive motor, after being converted by the microphone, may output a very weak electrical signal (in the millivolt range). Such a weak signal is highly susceptible to external electromagnetic interference (such as electromagnetic radiation from the motor itself or crosstalk from other electronic devices within the vehicle) when transmitted on the circuit board. Therefore, in this embodiment, the first audio signal is amplified and then digitally filtered. This method of first amplifying the first audio signal helps avoid noise contamination, which could lead to difficulties in distinguishing between normal and noise signals. Then, digital filtering of the amplified audio signal helps to accurately select the desired frequency.

[0047] For example, in one possible implementation, the sound signal of the drive motor running is collected in real time at a certain sampling rate (e.g., 20kHz) each time the user operates the sunshade. Hanning window weighting and fast Fourier transform are performed on each short-time signal (e.g., a 50-millisecond time window) to obtain the real-time spectrum (i.e., an example of the first spectrogram).

[0048] In step 103, the first spectrum diagram is compared with the reference spectrum diagram; wherein the reference spectrum diagram is obtained based on the second sound signal collected when the drive motor is running under normal operating conditions of the sunshade.

[0049] It should be understood that, in this embodiment, the normal operating state of the sunshade refers to its operating state when it does not encounter any obstacles. This is beneficial for determining whether the first spectrum is abnormal based on the reference spectrum.

[0050] In some embodiments, the method further includes: performing spectral analysis on the second sound signal to obtain a second spectrogram; and using the second spectrogram as the reference spectrogram.

[0051] In other embodiments, Figure 3 A schematic diagram of the implementation process of a sunshade curtain control method provided in this application embodiment. Figure 2 ,like Figure 3 As shown, the method further includes the following steps 301 to 303: Step 301: Collect the second sound signal when the drive motor is running multiple times; wherein, the second sound signal is the sound signal of the drive motor when the drive motor drives the sunshade to run completely once in the absence of obstacles; Step 302: Perform spectral analysis on the second sound signal to obtain the second spectrum diagram; Step 303: Based on multiple second spectrograms, obtain the reference spectrogram.

[0052] It is understood that in the sunshade control method provided in this application embodiment, the second sound signal of the drive motor is collected when the drive motor drives the sunshade to complete one full operation in the absence of obstacles; then, the spectrum analysis of the second sound signal is performed on each of the two signals; and a reference spectrum is obtained based on the multiple second spectrum diagrams. This is beneficial to making the obtained reference spectrum diagram more reliable, and thus beneficial to improving the detection speed, reliability and stability when detecting whether the sunshade has encountered an obstacle.

[0053] In some embodiments, the step of performing spectral analysis on the second audio signal to obtain a second spectrogram includes: preprocessing the second audio signal to obtain a third processed signal; adding a Hanning window to the third processed signal to obtain a fourth processed signal; and performing a fast Fourier transform on the fourth processed signal to obtain a second spectrogram.

[0054] In some embodiments, the preprocessing of the second audio signal to obtain a third processed signal includes: digitally filtering and / or amplifying the second audio signal to obtain the third processed signal.

[0055] Furthermore, in some embodiments, the step of digitally filtering and / or amplifying the second audio signal to obtain the third processed signal includes one of the following: digitally filtering the second audio signal to obtain the third processed signal; amplifying the second audio signal to obtain the third processed signal; digitally filtering the second audio signal and then amplifying it to obtain the first processed signal; or amplifying the second audio signal and then digitally filtering it to obtain the third processed signal.

[0056] In some embodiments, obtaining the reference spectrum based on a plurality of second spectrograms includes: averaging the same positions in the plurality of second spectrograms to obtain the reference spectrum. In other embodiments, obtaining the reference spectrum based on a plurality of second spectrograms includes: filtering the plurality of second spectrograms to obtain a plurality of reliable second spectrograms; averaging the same positions in the plurality of reliable second spectrograms to obtain the reference spectrum.

[0057] In this embodiment of the application, filtering of multiple second spectrograms includes: filtering out second spectrograms with large outliers in the second spectrograms, and using the remaining second spectrograms as the reference spectrograms.

[0058] It should be understood that, in the embodiments of this application, temperature may affect the internal characteristics of the drive motor. When the temperature changes, parameters such as the magnetic force of the permanent magnets and the winding resistance inside the drive motor will change, thereby affecting the dynamic response of the drive motor. In extremely cold weather, battery discharge performance and motor lubrication will be affected, which may lead to a slower response of the drive motor during start-up and acceleration. In hot weather, the winding resistance of the drive motor increases, which may also cause changes in its speed fluctuation characteristics under high load.

[0059] Therefore, in some embodiments, the reference spectrum refers to a reference spectrum within the same temperature range as the first spectrum. The temperature includes the ambient temperature of the drive motor.

[0060] For example, in one possible implementation, a learning program is executed when the vehicle rolls off the production line or after a new drive motor is replaced. In an absolutely safe environment (without any obstacles), the sunshade is controlled to run at a constant speed through a complete "off-on-off" cycle. During this process, after finding the zero-point position (i.e., the end position of the sunshade) during the first closure, the spectrum and real-time position of the sound signal are recorded throughout. The spectrum data from multiple time points are averaged (the frequency at the same position is averaged multiple times) to establish a real-time position-spectrum mapping relationship, ultimately generating a multi-dimensional "sound reference frequency feature library," which is then stored in the electrically erasable programmable read-only memory (EEPROM) of the vehicle's integrated unit.

[0061] In some embodiments, comparing the first spectrogram with a reference spectrogram includes: comparing the spectral features of the first spectrogram with the spectral features of the reference spectrogram.

[0062] It is understood that in the control method of the sunshade curtain provided in the embodiments of this application, the spectral characteristics of the first spectrum diagram are compared with the spectral characteristics of the reference spectrum diagram. Since the frequency characteristics of sound are less affected by power supply voltage and temperature fluctuations, it is beneficial to improve the reliability and stability of detection. Even for flexible obstacles with insignificant resistance increases, the small vibrations and sound changes introduced can be effectively captured in the frequency domain. Therefore, it is possible to effectively detect flexible obstacles as well.

[0063] It should be understood that the spectral features described in this application embodiment are not limited. In some embodiments, the spectral features include, but are not limited to, one or more of the following: frequency energy, frequency magnitude, frequency amplitude, resonant peak, etc.

[0064] In some embodiments, comparing the spectral characteristics of the first spectrogram with the spectral characteristics of the reference spectrogram includes one or more of the following: comparing the energy of the actual frequency in the first spectrogram with the energy of the reference frequency in the reference spectrogram; comparing the magnitude of the actual frequency in the first spectrogram with the magnitude of the reference frequency in the reference spectrogram; comparing the amplitude of the actual frequency in the first spectrogram with the amplitude of the reference frequency in the reference spectrogram; and comparing the actual resonance peak in the first spectrogram with the amplitude of the reference frequency in the reference spectrogram.

[0065] It is understood that in the sunshade control method provided in this application embodiment, since the energy, magnitude, amplitude, and resonant peak of the frequency are all related to the operating state of the drive motor, and if the sunshade encounters an obstacle during the process of the drive motor driving the sunshade to open or close, the frequency characteristics (energy, magnitude, amplitude, and resonant peak) in the spectrum diagram will change. This is beneficial for improving the speed, reliability, and stability of detecting whether the sunshade has encountered an obstacle.

[0066] It should be understood that the energy of the frequency is not limited in the embodiments of this application. Frequency energy is generally proportional to the square of the frequency amplitude. In some embodiments, the energy of the frequency also refers to the power percentage of the corresponding frequency in the entire signal. The magnitude of the frequency is not limited in the embodiments of this application. The magnitude of the frequency refers to how quickly the signal changes over time, and the unit is Hertz (Hz).

[0067] In this embodiment, the amplitude of the frequency is not limited. The amplitude of the frequency refers to the intensity of a specific frequency component, typically the peak or effective value of vibration displacement, velocity, or acceleration. In this embodiment, the resonant peak value is not limited. The resonant peak value refers to the maximum vibration amplitude reached at the resonant frequency point when the system resonates.

[0068] In some embodiments, comparing the energy of the actual frequencies in the first spectrum with the energy of the reference frequencies in the reference spectrum includes comparing the total energy of the actual frequencies in the first spectrum with the total energy of the reference frequencies in the reference spectrum. Further, in some embodiments, the total energy of the actual frequencies in a specific frequency band in the first spectrum is compared with the total energy of the reference frequencies in that specific frequency band in the reference spectrum.

[0069] In some embodiments, comparing the magnitude of the actual frequency in the first spectrum with the magnitude of the reference frequency in the reference spectrum includes comparing the average value of the actual frequencies in the first spectrum with the average value of the reference frequencies in the reference spectrum. Further, in some embodiments, the average value of the actual frequencies in a specific frequency band in the first spectrum is compared with the average value of the reference frequencies in that specific frequency band in the reference spectrum.

[0070] In some embodiments, comparing the amplitude of the actual frequency in the first spectrum with the amplitude of the reference frequency in the reference spectrum includes comparing the average amplitude of the actual frequency in the first spectrum with the average amplitude of the reference frequency in the reference spectrum. Further, in some embodiments, the average amplitude of the actual frequency in a specific frequency band in the first spectrum is compared with the average amplitude of the reference frequency in the specific frequency band of the reference spectrum.

[0071] In step 104, if the comparison result is abnormal, it is determined that the sunshade curtain has encountered an obstacle, and the drive motor is controlled to drive the sunshade curtain to move in the opposite direction to the current direction of movement.

[0072] It should be understood that the obstacles described in this application embodiment are not limited. An obstacle can be any object that hinders the movement of the sunshade within its normal range. In some embodiments, the obstacles include hard obstacles and soft obstacles. Exemplarily, in one possible implementation, the hard obstacle can be luggage, tree branches, etc., and the soft obstacle can be fingers, strips of cloth, etc.

[0073] In some embodiments, controlling the drive motor to drive the sunshade curtain to move in the opposite direction to the current direction of movement includes: controlling the drive motor to stop driving the current movement of the sunshade curtain, and controlling the drive motor to drive the sunshade curtain to move in the opposite direction to the current direction of movement.

[0074] It is understood that, in this embodiment of the application, when it is determined that the sunshade has encountered an obstacle, the drive motor is controlled to stop driving the current movement of the sunshade, and the drive motor is controlled to drive the sunshade to move in the opposite direction to the current movement direction. This helps to prevent objects from being pinched.

[0075] Furthermore, in some embodiments, controlling the drive motor to stop driving the current movement of the sunshade includes: cutting off the power supply to the drive motor.

[0076] In some embodiments, the comparison result is abnormal, including one or more of the following: the energy difference between the energy of the actual frequency and the energy of the reference frequency is greater than or equal to a first threshold; the actual frequency is less than the reference frequency, and the difference between the actual frequency and the reference frequency is greater than or equal to A% of the reference frequency; the amplitude of the actual frequency is greater than the amplitude of the reference frequency, and the difference between the amplitude of the actual frequency and the amplitude of the reference frequency is greater than or equal to B% of the amplitude of the reference frequency; the difference between the actual resonance peak and the amplitude of the reference frequency is greater than a second threshold.

[0077] It is understood that in the control method for the sunshade curtain provided in this application embodiment, when the sunshade curtain encounters an obstacle during operation, the running resistance of the drive motor increases. In order to overcome this increased resistance, the speed of the drive motor will decrease, resulting in a decrease in the basic frequency of the drive motor. When the load on the sunshade curtain increases, it causes more severe vibrations in components such as the stator and rotor of the drive motor. The more severe vibrations are transmitted to the air through the drive motor housing and mounting structure, resulting in a larger amplitude and higher energy of the drive motor. When the sunshade curtain encounters an obstacle during operation, if structural resonance is involved, it will also be accompanied by an abnormal amplification of the resonance peak. Therefore, when the energy difference between the energy of the actual frequency and the energy of the reference frequency is greater than or equal to a first threshold, the actual frequency is less than the reference frequency and the difference between the actual frequency and the reference frequency is greater than or equal to A% of the reference frequency, the amplitude of the actual frequency is greater than the amplitude of the reference frequency and the difference between the amplitude of the actual frequency and the amplitude of the reference frequency is greater than or equal to B% of the amplitude of the reference frequency, or the difference between the actual resonance peak and the amplitude of the reference frequency is greater than a second threshold, the comparison is considered abnormal, that is, the sunshade curtain encounters an obstacle. This improves the speed, reliability, and stability of detecting whether a sunshade is encountering an obstacle.

[0078] It should be understood that in the embodiments of this application, A, B, the first threshold, and the second threshold are not limited. In some embodiments, A, B, the first threshold, and the second threshold are empirical values ​​related to the applied force. For example, in one possible implementation, A and B are both 10.

[0079] The following describes an exemplary application of the embodiments of this application in a real-world application scenario.

[0080] This application provides an anti-pinch system and method for sunshades or side window sunshades in automobiles (i.e., an example of a sunshade control method). It determines whether the sunshade is an obstruction by analyzing the frequency characteristics of the motor's operating sound and then executes an anti-pinch action. The sunshade sound frequency determination anti-pinch method and system provided in this application can identify abnormalities in advance before physical contact or stalling occurs by analyzing the sound signals generated by the drive motor during operation in real time, thereby achieving fast, sensitive, and non-contact anti-pinch protection.

[0081] Figure 4 This is a schematic diagram of the control system for a sunshade curtain provided in an embodiment of this application, as shown below. Figure 4 As shown, the system includes: a drive motor 401, a sunshade 402, a sound sensor 403, a signal processing module 404, and a control unit 405; wherein, The drive motor 401 is used to drive the opening and closing of the sunshade curtain 402; The sound sensor 403 is located near the drive motor 401 or at a location where the sound of the drive motor 401 can be effectively collected, and is used to collect the sound signal of the drive motor 401 during operation. The signal processing module 404 is connected to the sound sensor 403 and the control unit 405. It is used to preprocess (e.g., filtering, amplification) and frequency analysis (e.g., fast Fourier transform) the acquired sound signal, extract the characteristic frequency (i.e. frequency feature) of the sound signal, and send it to the control unit 405. The control unit 405 is connected to the signal processing module 404 and the drive motor 401, and internally stores the sound reference frequency feature library of the sunshade 402 under the "normal unobstructed operation state". The control unit 405 is used to receive the frequency characteristics of the current sound from the signal processing module 404 in real time during the operation of the sunshade 402; compare the current sound frequency characteristics with the pre-stored sound reference frequency characteristics; when an abnormality is detected in the current sound frequency or amplitude characteristics, it is immediately determined that an obstacle has been encountered, and a stop and reverse command is sent to the drive motor 401.

[0082] The principle and logic behind triggering the anti-pinch function based on abnormal sound is as follows: the frequency of the drive motor's sound is primarily proportional to its rotational speed. The faster the speed, the higher the fundamental frequency of the drive motor's operation and the alternation of the electromagnetic field. When the sunshade encounters an obstacle during operation, the resistance of the sunshade motor increases. To overcome this increased resistance, the drive motor's speed decreases, resulting in a reduction in the fundamental frequency of the drive motor's operation.

[0083] The amplitude of the sound from a drive motor is closely related to its output torque and current. When the load on the sunshade increases, the drive motor needs to output more torque to pull the sunshade. According to the characteristics of drive motors, torque is proportional to current, so the input current of the drive motor will increase significantly. The increased current leads to a stronger magnetic field force inside the drive motor, causing more severe vibrations in components such as the stator and rotor; transmission components such as gears and output shafts need to transmit greater forces, increasing internal friction, impact, and deformation. These more severe vibrations are transmitted into the air through the drive motor housing and mounting structure, resulting in a larger amplitude of the drive motor's sound.

[0084] Anti-pinch is triggered when the current frequency (N_Hz) is lower than the reference frequency (B_Hz) and exceeds the reference frequency by A% (which can be calibrated according to the anti-pinch force); or when the amplitude of the current frequency (N_dB) is greater than the amplitude of the reference frequency (B_dB) by B%.

[0085] Therefore, the anti-pinch condition must be met to trigger the following conditions: ((N_Hz)<B_Hz)&&((B_Hz-N_Hz)> =B_Hz*A%)) || ((N_dB>B_dB)&& ((N_dB–B_dB)>=B_dB*B%)).

[0086] It is understood that this application can achieve the following technical effects: (1) High sensitivity and early warning: The frequency change of the drive motor sound is earlier and more sensitive than the current change. Before the physical resistance increases significantly (causing the current change), the slight change in the mechanical stress state will cause the change in the sound spectrum of the motor operation, thereby achieving "early perception" and preventing the problem from happening in advance; (2) Strong anti-interference ability: The sound frequency characteristics are far less affected by power supply voltage fluctuations and temperature changes than the current, which improves reliability and stability; (3) Effective for flexible obstacles: Even for flexible obstacles with no significant increase in resistance (such as fingers and strips of cloth), the small vibrations and sound changes introduced can be effectively captured in the frequency domain, solving a major pain point of the current method; (4) Non-contact detection: Detection is performed by a sound sensor, without direct contact with the drive motor or transmission mechanism, which simplifies the structure and reduces hardware costs.

[0087] In some embodiments, the sound sensor is a high-temperature resistant and electromagnetic interference-resistant MEMS microphone, whose frequency response range needs to cover the main operating frequency band of the drive motor (e.g., 100Hz-10kHz). It is installed on the drive motor housing or inside the drive motor compartment in a location that can clearly capture the sound of the drive motor and is less affected by ambient noise.

[0088] The signal processing module and control unit are integrated into the vehicle control module (VIU). The VIU's microcontroller unit (MCU) and its built-in analog-to-digital converter (ADC) and hardware accelerators (such as the CMSIS-DSP library) are used to perform sound signal sampling, digital filtering, and Fast Fourier Transform (FFT). During control system initialization or at the end of the production line, the sunshade is controlled to operate normally several times in an unobstructed environment. Sound signals are collected by sound sensors and analyzed by the signal processing module to establish a complete library of sound reference frequency characteristics representing normal conditions, which is then stored in the control module. For example, Figure 5 This is a schematic diagram of a sound amplitude characteristic provided in an embodiment of this application, such as... Figure 5 As shown, solid lines represent resistance, dashed lines represent normal conditions, and P1-P2 represent resonance peaks.

[0089] Learning Phase (Calibration): A learning program is executed once when the vehicle rolls off the production line or after a new drive motor is replaced. In an absolutely safe environment (without any obstacles), the sunshade is controlled to run at a constant speed for a complete "off-on-off" cycle. During this process, after the control unit finds the zero-point position (i.e., finds the end position of the sunshade) during the first closure, it records the spectrum of the sound signal and the real-time position throughout the process. The spectrum data from multiple time points are averaged (the average value of the frequency at the same position is taken multiple times) to establish a mapping relationship between real-time position and spectrum, ultimately generating a multi-dimensional "sound reference frequency feature library" and storing it in the VIU's EEPROM.

[0090] When a user operates the sunshade, the MCU continuously collects sound signals at a certain sampling rate (e.g., 20kHz). Each time the user operates the sunshade, the control system collects the sound of the drive motor in real time and extracts its real-time frequency characteristics. These characteristics are then compared in real-time with a sound reference frequency feature library. When the difference between the real-time frequency characteristics and the reference characteristics exceeds a preset safety threshold, the control unit immediately commands the motor to stop and reverse a certain distance, thus achieving the anti-pinch function.

[0091] The real-time spectrum is obtained by performing Hanning window weighting and FFT transformation on each short-time signal segment (e.g., a 50-millisecond time window).

[0092] The control unit retrieves the reference spectrum corresponding to the current position of the sunshade and compares it with the real-time spectrum. The comparison algorithm can be to calculate the total energy within a specific frequency band (e.g., 1kHz-5kHz) and compare the difference between the actual total energy in that specific frequency band and the reference total energy in that specific frequency band with a threshold, or to monitor specific resonance peaks (e.g., ...). Figure 5Does the amplitude of P1-P2 exceed the threshold?

[0093] When an abnormality is detected, the anti-pinch function is triggered. The VIU immediately sends a stop command to the sunshade, cuts off the positive power supply to the motor drive circuit, and connects the reverse power supply after stopping, causing the sunshade to rotate 200 mm. At the same time, it can send anti-pinch alarm information to the Event Data Collector (EDC) (the vehicle screen, mobile application, or audio can also be used) through the service interface.

[0094] Figure 6 A schematic diagram of the implementation process of a sunshade curtain control method provided in this application embodiment. Figure 3 ,like Figure 6 As shown, the method includes the following steps 601 to 608: Step 601: The sunshade curtain is started and running; Step 602: Collect the sound of the motor running; Step 603, signal processing; Step 604: Extract the current sound spectrum; Step 605: Compare with the pre-stored "normal sound reference frequency feature library"; Step 606: Determine if the comparison result is normal; if yes, proceed to step 607; otherwise, proceed to step 608. Step 607, normal operation; Step 608, trigger anti-pinch function.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application, and all such modifications or substitutions should be covered within the protection scope of this application.

[0096] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps; or steps from different embodiments may be combined into a new technical solution. Based on the foregoing embodiments, this application provides an apparatus.

[0097] Figure 7 This is a schematic diagram of a control device for a sunshade curtain provided in an embodiment of this application, as shown below. Figure 7As shown, the control device 70 for the sunshade curtain includes: an acquisition module 701, a spectrum analysis module 702, a comparison module 703, and a control module 704; wherein, The acquisition module 701 is configured to acquire the first sound signal of the drive motor during the opening or closing of the sunshade driven by the drive motor. The spectrum analysis module 702 is configured to perform spectrum analysis on the first audio signal to obtain a first spectrum diagram. The comparison module 703 is configured to compare the first spectrum diagram with a reference spectrum diagram; wherein the reference spectrum diagram is obtained based on the second sound signal collected when the drive motor is running under normal operating conditions of the sunshade curtain; The control module 704 is configured to determine that the sunshade has encountered an obstacle when the comparison result is abnormal, and to control the drive motor to drive the sunshade to move in the opposite direction to the current direction of movement.

[0098] In some embodiments, the comparison module 703 is further configured to compare the spectral features of the first spectrogram with the spectral features of the reference spectrogram.

[0099] In some embodiments, the comparison module 703 is further configured to compare the energy of the actual frequency in the first spectrum diagram with the energy of the reference frequency in the reference spectrum diagram; compare the magnitude of the actual frequency in the first spectrum diagram with the magnitude of the reference frequency in the reference spectrum diagram; compare the amplitude of the actual frequency in the first spectrum diagram with the amplitude of the reference frequency in the reference spectrum diagram; and compare the actual resonance peak value in the first spectrum diagram with the amplitude of the reference frequency in the reference spectrum diagram.

[0100] In some embodiments, the comparison result is abnormal, including one or more of the following: the energy difference between the energy of the actual frequency and the energy of the reference frequency is greater than or equal to a first threshold; the actual frequency is less than the reference frequency, and the difference between the actual frequency and the reference frequency is greater than or equal to A% of the reference frequency; the amplitude of the actual frequency is greater than the amplitude of the reference frequency, and the difference between the amplitude of the actual frequency and the amplitude of the reference frequency is greater than or equal to B% of the amplitude of the reference frequency; the difference between the actual resonance peak and the amplitude of the reference frequency is greater than a second threshold.

[0101] In some embodiments, the control device 70 further includes: a obtaining module; the obtaining module is configured to repeatedly collect a second sound signal during the operation of the drive motor; wherein the second sound signal is the sound signal of the drive motor when the drive motor drives the sunshade to run completely once in the absence of obstacles; perform spectrum analysis on the second sound signal respectively to obtain a second spectrum diagram; and obtain the reference spectrum diagram based on multiple second spectrum diagrams.

[0102] In some embodiments, the spectrum analysis module 702 is further configured to preprocess the first sound signal to obtain a first processed signal; add a Hanning window to the first processed signal to obtain a second processed signal; and perform a fast Fourier transform on the second processed signal to obtain a first spectrum.

[0103] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0104] It should be noted that the module division in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or have two or more units integrated into one unit. The integrated units can be implemented in hardware, as software functional units, or a combination of software and hardware.

[0105] It should be noted that, in the embodiments of this application, if the above methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.

[0106] This application provides a vehicle, Figure 8 This application provides a schematic diagram of the structure of a vehicle, as shown in the embodiment of the present application. Figure 8As shown, the vehicle 80 includes a drive motor 801, a sunshade 802, a memory 803, and a processor 804; the memory 803 stores a computer program that can run on the processor 804, and the processor 804 executes the program to implement the steps in the method provided in the above embodiments.

[0107] It should be noted that the memory 803 is configured to store instructions and applications that can be executed by the processor 804, and can also cache data to be processed or already processed in the processor 804 and various modules in the vehicle 80 (e.g., image data, audio data, voice communication data and video communication data), which can be implemented by flash memory or random access memory (RAM).

[0108] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method provided in the above embodiments.

[0109] This application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the method provided in the above-described method embodiments.

[0110] It should be noted that the descriptions of the above storage medium and electronic device embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the storage medium and electronic device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0111] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, they will not be repeated here.

[0112] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.

[0113] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or electronic device. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0114] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of electronic devices or modules can be electrical, mechanical, or other forms.

[0115] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0116] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.

[0117] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0118] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.

[0119] Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0120] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0121] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0122] The features disclosed in the several method or electronic device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or electronic device embodiments.

[0123] The above are merely embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for controlling a sunshade curtain, characterized in that, The method includes: During the process of the drive motor driving the sunshade to open or close, the first sound signal of the drive motor during operation is acquired; Perform spectral analysis on the first sound signal to obtain a first spectrum diagram; The first spectrum diagram is compared with the reference spectrum diagram; wherein the reference spectrum diagram is obtained based on the second sound signal collected when the drive motor is running under normal operating conditions of the sunshade. If the comparison result is abnormal, it is determined that the sunshade has encountered an obstacle, and the drive motor is controlled to drive the sunshade to move in the opposite direction to the current direction of movement.

2. The control method according to claim 1, characterized in that, The step of comparing the first spectrogram with the reference spectrogram includes: The spectral features of the first spectrogram are compared with the spectral features of the reference spectrogram.

3. The control method according to claim 2, characterized in that, The comparison of the spectral features of the first spectrogram with the spectral features of the reference spectrogram includes one or more of the following: The energy of the actual frequency in the first spectrum diagram is compared with the energy of the reference frequency in the reference spectrum diagram; The magnitude of the actual frequency in the first spectrum diagram is compared with the magnitude of the reference frequency in the reference spectrum diagram; The amplitude of the actual frequency in the first spectrum diagram is compared with the amplitude of the reference frequency in the reference spectrum diagram; The actual resonance peak value in the first spectrum diagram is compared with the amplitude of the reference frequency in the reference spectrum diagram.

4. The control method according to claim 3, characterized in that, The comparison result is abnormal, including one or more of the following: The energy difference between the energy at the actual frequency and the energy at the reference frequency is greater than or equal to a first threshold. The actual frequency is less than the reference frequency, and the difference between the actual frequency and the reference frequency is greater than or equal to A% of the reference frequency. The amplitude of the actual frequency is greater than the amplitude of the reference frequency, and the difference between the amplitude of the actual frequency and the amplitude of the reference frequency is greater than or equal to B% of the amplitude of the reference frequency. The difference between the actual resonance peak value and the amplitude of the reference frequency is greater than the second threshold.

5. The control method according to any one of claims 1 to 4, characterized in that, The method further includes: The second sound signal during the operation of the drive motor is collected multiple times; wherein, the second sound signal is the sound signal of the drive motor when the drive motor drives the sunshade to complete one operation in the absence of obstacles; The second sound signal was subjected to spectral analysis to obtain the second spectrum diagram; The reference spectrum is obtained based on multiple second spectrum diagrams.

6. The control method according to any one of claims 1 to 4, characterized in that, The step of performing spectral analysis on the first audio signal to obtain a first spectrum diagram includes: The first sound signal is preprocessed to obtain a first processed signal; A Hanning window is applied to the first processed signal to obtain the second processed signal; The second processed signal is subjected to a Fast Fourier Transform to obtain the first spectrum.

7. A control device for a sunshade curtain, characterized in that, The device includes: The acquisition module is configured to acquire the first sound signal of the drive motor during the opening or closing of the sunshade driven by the drive motor. The spectrum analysis module is configured to perform spectrum analysis on the first audio signal to obtain a first spectrum diagram. The comparison module is configured to compare the first spectrum diagram with a reference spectrum diagram; wherein the reference spectrum diagram is obtained based on the second sound signal collected when the drive motor is running under normal operating conditions of the sunshade curtain; The control module is configured to determine that the sunshade has encountered an obstacle when the comparison result is abnormal, and to control the drive motor to drive the sunshade to move in the opposite direction to the current direction of movement.

8. A vehicle, characterized in that, The vehicle includes a drive motor, a sunshade, a memory, and a processor; the memory is used to store a computer program running on the processor; the processor is used to execute the computer program in the memory to perform the sunshade control method according to claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by a processor using the control method for the sunshade curtain as described in claims 1 to 6.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, the control method for the sunshade curtain as described in claims 1 to 6 is implemented.