Automobile sunroof control method, system, computer equipment and storage medium
By receiving sunroof control commands, obtaining interactive sound effects and calculating speaker gain parameters for sound effects synthesis, the problem of the noise in the running of the car sunroof affecting the user's comfort, achieving full masking of noise and improving the sense of technology.
Patent Information
- Application Number
- CN202210301590.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-03-25
AI Technical Summary
The existing technology cannot effectively mask the operating noise of the car sunroof, affecting the user's comfort and cannot improve the technological experience.
By receiving the sunroof control command, interactive sound effects are obtained, and the speaker gain parameters are calculated based on the speaker layout information and the sunroof real-time position parameters, and the sound effects are synthesized, so that the speaker can play audio signals synchronized with the sunroof position to cover the sunroof noise.
It realizes full masking of the operating noise of the sunroof, improving the user's comfort and technological experience.
Smart Images

Figure CN115214504B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle infotainment, and in particular to a vehicle sunroof control method, system, computer equipment and storage medium. Background Art
[0002] As vehicles become increasingly intelligent and their infotainment systems rapidly advance, users are increasingly interested in the technological feel of their vehicles, with interactive sound effects creating a particular buzz. Currently, interactive sound effects are widely used in various scenarios, such as the welcome sound when unlocking the vehicle, the power-on start sound, and the sound effects of switching driving modes.
[0003] Existing control systems add warning sounds during the operation of power-operated door and window components. For example, when power sliding doors and power tailgates are opened and closed, a single-frequency sound is played to alert the user to safety. However, these warning sounds have a very limited effect on masking the noise from the power components. Furthermore, the unpleasant warning sound itself is a noise source, and the warning sound fails to enhance the overall technological sound effect of the vehicle.
[0004] As electric vehicles become increasingly quiet, the noise generated by sunroof operation significantly impacts the comfort of drivers and passengers. Currently, traditional NVH (noise, vibration, and harshness) control methods, such as controlling single-unit source noise and adding acoustic insulation, cannot completely eliminate sunroof operating noise, nor can they enhance the user's sense of technology when the sunroof is operating. Summary of the Invention
[0005] Based on this, it is necessary to provide a car sunroof control method, device, computer equipment and storage medium to address the above technical problems, so as to solve the problem that the noise generated by the operation of the car sunroof affects the user's comfort, and the existing technology has poor noise masking effect and cannot enhance the user's sense of technology experience.
[0006] A method for controlling a car sunroof, comprising:
[0007] receiving a sunroof control instruction, adjusting a position of the sunroof according to the sunroof control instruction, and obtaining an interactive sound effect corresponding to the sunroof control instruction;
[0008] Acquire arrangement information of the speakers and real-time position parameters of the skylight, and calculate gain parameters of at least two speakers according to the arrangement information and the real-time position parameters;
[0009] Performing sound effect synthesis according to the interactive sound effect and the gain parameter to obtain audio signals of each speaker;
[0010] Each of the audio signals is sent to a corresponding speaker, so that each of the speakers plays the audio signal synchronized with the real-time position of the sunroof.
[0011] A vehicle sunroof control device, comprising:
[0012] a sunroof control module, configured to receive a sunroof control instruction, adjust the position of the sunroof according to the sunroof control instruction, and obtain an interactive sound effect corresponding to the sunroof control instruction;
[0013] a sound effect analysis and calculation module, configured to obtain arrangement information of the speakers and real-time position parameters of the skylight, and calculate gain parameters of at least two speakers based on the arrangement information and the real-time position parameters;
[0014] An audio processing module, configured to synthesize the sound effects according to the interactive sound effects and the gain parameters to obtain audio signals of each speaker;
[0015] The power amplifier module is used to send each of the audio signals to a corresponding speaker, so that each of the speakers plays the audio signal synchronized with the real-time position of the sunroof.
[0016] A computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the above-mentioned automobile sunroof control method is implemented.
[0017] One or more readable storage media storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the above-mentioned vehicle sunroof control method.
[0018] The above-mentioned automobile sunroof control method, device, computer equipment, and storage medium adjust the position of the sunroof according to the sunroof control command, obtain interactive sound effects corresponding to the sunroof control command, calculate the gain parameters of at least two speakers based on the speaker layout information and the real-time position parameters of the sunroof, perform sound effect synthesis processing based on the interactive sound effects and gain parameters, obtain audio signals from each speaker, and cause each speaker to play an audio signal synchronized with the real-time position of the sunroof. The present invention starts from the direction from which the user receives sound, and synthesizes sound effects by adding gain parameters to the speakers. This allows the synthesized virtual sources of each speaker to cover the noise source of the sunroof, enabling the speakers to synchronously play interactive sound effects corresponding to different operating conditions when the sunroof is in operation, achieving full masking of the sunroof operating noise, while providing a sound effect atmosphere experience and enhancing the user's comfort and sense of technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 This is a flow chart of a method for controlling a car sunroof according to an embodiment of the present invention;
[0021] Figure 2 1 is a schematic diagram of a front and rear opening working condition of a vehicle sunroof control method according to an embodiment of the present invention;
[0022] Figure 3 1 is a schematic diagram of a left and right opening working condition of a vehicle sunroof control method according to an embodiment of the present invention;
[0023] Figure 4 1 is a schematic diagram of an acoustic wave transmission method for controlling a car sunroof in one embodiment of the present invention;
[0024] Figure 5 This is a schematic structural diagram of a vehicle sunroof control system according to an embodiment of the present invention;
[0025] Figure 6 FIG. 1 is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0027] In one embodiment, if Figure 1 As shown, a method for controlling a car sunroof is provided, comprising the following steps S10-S40.
[0028] S10. Receive a sunroof control instruction, adjust the position of the sunroof according to the sunroof control instruction, and obtain an interactive sound effect corresponding to the sunroof control instruction.
[0029] It is understood that the sunroof can be opened and closed via a control switch. The control switch can be configured as at least one of a sunroof control button, a voice control assistant, and an instrument console (touch screen). In other words, the user triggers sunroof control commands through button control, voice control, or instrument screen control. Sunroof control commands include but are not limited to open commands, close commands, and emergency stop commands.
[0030] After receiving the sunroof control command, the sunroof control system can convert the control command into a control signal to adjust the position of the sunroof. At the same time, the corresponding interactive sound effect is called from the sound source library according to the sunroof control command. The sound source library can be a local database of the car or a network database connected to the car. The sound source library stores multiple interactive sound effects, and users can add customized interactive sound effects according to their needs. Since the noise generated by the operation of the sunroof includes the noise of friction between the mechanical slider and the guide rail and the wind vibration noise generated by the sunroof window, interactive sound effects with scene masking effects can be selected, such as the sound of flowing water, birds singing, musical instruments playing, and background sounds of songs. Users can pre-set corresponding interactive sound effects for each sunroof control command to create a sense of atmosphere in different scenes.
[0031] S20 : Acquire arrangement information of the speakers and real-time position parameters of the skylight, and calculate gain parameters of at least two speakers according to the arrangement information and the real-time position parameters.
[0032] It is understood that the speakers include at least two speakers in a speaker pair. When there are more than two speakers, each pair of speakers is a speaker pair, with the two speakers in the speaker pair being the first speaker and the second speaker, respectively. Speaker placement information includes information about the speaker's position distribution within the vehicle, such as the speaker's symmetry, the distance between the speaker and the sunroof, and the speaker's height. The speakers play audio signals, generating sound waves that reach the user's left and right ears. The user determines the direction of the sound waves based on the phase difference between the sound received by the left and right ears. The sunroof's real-time position parameter refers to the real-time position of the sunroof's moving end during the process of adjusting its position and executing control commands. The sunroof's position constantly changes during opening and closing, and the user's left and right ears receive noise, and the direction of the noise they perceive also changes constantly. The sunroof is in motion during the execution of control commands, and the noise it produces varies to the user. The speaker positions in the vehicle are relatively fixed. To the user, the sound waves generated by the speakers appear to be emitted from a fixed direction. The direction of the sound waves determined by the user is the direction of the synthesized virtual source of each speaker. When the speaker plays the audio signal of the interactive sound effect, the gain parameters of the speaker include the gain parameters of the first speaker audio signal and the gain parameters of the second speaker audio signal. Adjusting the gain parameters can achieve the synchronous change of the synthetic virtual source direction of the speaker and the noise direction of the sunroof operation.
[0033] S30: Perform sound effect synthesis according to the interactive sound effect and the gain parameter to obtain audio signals of each speaker.
[0034] Understandably, in dual-channel stereo, speakers always appear in pairs, and a synthetic virtual source is formed by superimposing the audio signals of the first speaker and the second speaker. Dual channels are the principle of achieving stereo. Two speakers are placed in space at a certain angle to each other. Each speaker is provided with a signal by a separate channel. The two channel signals with different gain parameters are different in phase. When the user listens to the sound at the intersection of the axis lines of the two speakers, they can feel the stereo effect. The audio signals of the speakers are synthesized according to the interactive sound effects and gain parameters. Since the gain parameters of the audio signals of the first speaker and the second speaker are constantly changing, the direction of the synthetic virtual source of the first speaker and the second speaker will change with the change of the gain parameters. The change of the gain parameters is determined by the real-time position of the sunroof operation, so that the synthetic virtual source of the speaker covers the noise source of the sunroof, and the sound direction of the synthetic virtual source is synchronized with the sound direction of the sunroof operation noise.
[0035] S40: Send each of the audio signals to a corresponding speaker, so that each of the speakers plays the audio signal synchronized with the real-time position of the sunroof.
[0036] Understandably, the car's power amplifier transmits the audio signals from each speaker to the corresponding first and second speakers, driving the speakers to play the interactive sound effects corresponding to the sunroof control commands, achieving synchronized playback and directional movement of the interactive sound effects corresponding to the sunroof control commands. A power amplifier, also known as a power amplifier, primarily amplifies the relatively weak input signal from the audio source equipment, generating a sufficient current to drive the speakers to reproduce the sound. When the speakers play the audio signal, the real-time changes in the additional gain parameters synchronize the direction of the synthesized virtual source sound with the real-time position of the sunroof during operation.
[0037] This embodiment determines the operating conditions of the sunroof based on the sunroof control instructions, calls the corresponding interactive sound effects under different operating conditions, and changes the additional gain parameters of the speaker according to the real-time position parameters of the sunroof, so as to synchronize the sound direction of the speaker's synthesized virtual source with the sound direction of the sunroof operating noise, thereby achieving full noise coverage.
[0038] Optionally, in step S10, that is, obtaining the interactive sound effect corresponding to the sunroof control instruction, includes:
[0039] S101, determining the working condition of the sunroof according to the sunroof control instruction;
[0040] S102: Obtain interactive sound effects corresponding to the working condition.
[0041] It is understandable that the sunroof control instructions include but are not limited to opening instructions, closing instructions and emergency stop instructions. The sunroof is in a corresponding working condition when executing the sunroof control instruction, and different working conditions correspond to different sunroof interactive sound effects. After the sunroof receives the sunroof control instruction, it determines whether the working condition information of the sunroof is open, closed or emergency stop. The entire process from the start of executing the sunroof control instruction to the end of executing the sunroof control instruction is in the corresponding working condition. When the sunroof is in operation, it is necessary to quickly determine the working condition information and call the corresponding interactive sound effect according to the specific working condition to effectively create a sense of atmosphere. For example, when the sunroof is in the open working condition, the interactive sound effect that matches the opening scene will be played.
[0042] This embodiment can quickly determine the working condition information of the sunroof after receiving the sunroof control command, and accurately obtain the interactive sound effects corresponding to different working condition information.
[0043] Optionally, in step S20, i.e., obtaining the real-time position parameters of the skylight, includes:
[0044] S201, monitoring the relative position of the skylight through a sensor, and obtaining a reference point position of the skylight;
[0045] S202: Calculate the real-time position parameter according to the reference point position and the relative position.
[0046] It is understandable that the sensor is a position sensor, which can sense the position of the object being measured and convert it into a usable output signal. The position sensor can be selected from electromagnetic, photoelectric, differential transformer, capacitor, reed switch, Hall type, etc. In one embodiment, a Hall sensor can be used. The Hall sensor has a strong anti-interference ability and can obtain a more accurate relative position of the skylight. The reference point position can be set according to actual needs, such as it can be the starting point of the skylight or the end point of the skylight. The coordinates of the reference point position can be defined according to actual needs, such as it can be (0,0,0) or (1,0,0). The relative position can be the coordinate with the reference point position as the reference point. The relative position can be a two-dimensional coordinate or a three-dimensional coordinate. If the reference point position and the relative position are both three-dimensional coordinates, the real-time position parameter can be the coordinate difference between the relative position and the reference point position.
[0047] In one embodiment, for ease of understanding, the car sunroof is in an open working condition, with the sunroof opening front and back, and the user is directly under the sunroof. In actual car use scenarios, the car sunroof can also be opened left and right, and the user's seating position is scattered in the front, back, left and right below the car sunroof. The user's position can be projected using mathematical principles to perform similar calculations. Figure 2As shown, when the sunroof is open, the total distance between the sunroof's starting point and ending point is 2l. As the sunroof moves from front to back, the sunroof's starting point serves as its reference point, the actual position of the sunroof at the open end serves as its relative position, and the distance L between the relative position and the reference point serves as its real-time position parameter. When the sunroof is at its starting point, the real-time position parameter L = 0, indicating the sunroof is not yet open. When the sunroof is in the middle position, the real-time position parameter L = 1, indicating the sunroof is halfway open. When the sunroof is at its ending point, the real-time position parameter L = 2l, indicating the sunroof is fully open.
[0048] This embodiment can calculate the real-time position parameters of the sunroof based on the reference point position of the sunroof and the relative position of the sunroof when the sunroof is in the front-to-back opening condition.
[0049] Optionally, the gain parameter includes a gain amplitude;
[0050] In step S20, that is, calculating the gain parameters of at least two speakers according to the arrangement information and the real-time position parameters, the method includes:
[0051] S203, calculating actual direction parameters of the loudspeaker according to the arrangement information;
[0052] S204, calculating a synthetic virtual source direction parameter of the loudspeaker according to the real-time position parameter;
[0053] S205 : Calculate gain amplitudes of at least two loudspeakers according to the actual direction parameter and the synthesized virtual source direction parameter.
[0054] Understandably, in one embodiment, for ease of understanding, the car sunroof is in an open state, the sunroof is open front and back, the user is directly below the sunroof, the first speaker is located at the starting end of the sunroof on the car roof, the second speaker is located at the ending end of the sunroof on the car roof, and the first speaker and the second speaker are symmetrically distributed. In actual car use scenarios, the number of speakers can be two, four, or more even pairs, and the speaker settings can be located at the starting end and the ending end of the sunroof on the car roof, or symmetrically distributed at the four corners of the car roof. Similar calculations can be performed using geometric relationships. Figure 2 As shown, the height of the first speaker is H, and the distance between the first speaker and the center line of the user's ears is l. According to the principle of trigonometric function, the actual direction parameter θ0 of the first speaker can be calculated. Since the first speaker and the second speaker are symmetrically distributed, the actual direction parameter of the second speaker is also θ0. The real-time position parameter of the skylight is L, the distance between the starting point of the skylight and the center line of the user's ears is l, and the height of the skylight is H. According to the principle of trigonometric function, the noise source direction parameter θ at the real-time position of the skylight can be calculated. I, the direction of the speaker's synthetic virtual source coincides with the direction of the noise source to achieve full noise shielding. The parameter of the speaker's synthetic virtual source direction is θ I .
[0055] This embodiment can calculate the gain amplitudes of at least two speakers based on the actual direction parameters of the speakers and the synthetic virtual source direction parameters of the speakers when the sunroof is in the front-to-back opening condition.
[0056] Optionally, the gain amplitude includes a gain amplitude of the first speaker and a gain amplitude of the second speaker;
[0057] In step S205, that is, calculating the gain amplitudes of at least two loudspeakers according to the actual direction parameter and the synthesized virtual source direction parameter, the method includes:
[0058] S206: Process the actual direction parameter and the synthesized virtual source direction parameter using a preset geometric model to generate the gain amplitude, wherein the preset geometric model includes:
[0059]
[0060] Where θ0 represents the actual direction parameter of the loudspeaker;
[0061] θ I represents the synthesized virtual source direction parameter of the loudspeaker;
[0062] A L Indicates the gain amplitude of the first speaker;
[0063] A R Indicates the gain amplitude of the second speaker.
[0064] It is understandable that, in one embodiment, A L Indicates the gain amplitude of the first speaker, A R Indicates the gain amplitude of the second speaker, A L / A R Indicates the relative gain of the first speaker and the second speaker. During the operation of the sunroof, the synthetic virtual source direction parameter θ of the speaker I In the synchronous change, the actual direction parameter θ0 of the loudspeaker is unchanged. At this time, the relative gain A of the first loudspeaker and the second loudspeaker is L / A R The corresponding synchronous changes make the direction of the loudspeaker's synthetic virtual source coincide with the direction of the noise source, achieving a full shielding effect of the noise.
[0065] This embodiment can calculate the gain amplitudes of at least two speakers according to the actual direction parameters of the speakers and the synthesized virtual source direction parameters of the speakers. Specifically, the relative gains of the first speaker and the second speaker can be calculated.
[0066] Optionally, before step S30, that is, before performing sound effect synthesis according to the interactive sound effect and the gain parameter, the following steps are included:
[0067] S301, constructing an acoustic model including the gain amplitude, and evaluating the sound pressure correlation relationship between the gain amplitudes of each speaker through the acoustic model;
[0068] The acoustic model includes:
[0069] P L =A L exp(-jkr LL )+A R exp(-jkr LR )
[0070] P R =A L exp(-jkr RL )+A R exp(-jkr RR )
[0071] Among them, P L represents the plane wave superposition sound pressure generated by the first loudspeaker and the second loudspeaker at the left ear position;
[0072] P R represents the plane wave superposition sound pressure generated by the first loudspeaker and the second loudspeaker at the right ear position;
[0073] j represents the imaginary part of the complex form of the plane wave;
[0074] A L Indicates the gain amplitude of the first speaker;
[0075] A R Indicates the gain amplitude of the second speaker;
[0076] Wave number k = 2πf / c, f represents frequency, c represents speed of sound;
[0077] r LL Indicates the distance from the first speaker to the left ear;
[0078] r RL Indicates the distance from the first speaker to the right ear;
[0079] r RR Indicates the distance from the second speaker to the right ear;
[0080] r LR Indicates the distance from the second speaker to the left ear.
[0081] Understandably, in one embodiment, for ease of understanding, the car sunroof is in an open state, the sunroof is open to the left and right, the user is directly below the sunroof, the centerline of the two ears coincides with the centerline of the sunroof, the first speaker is located at the starting end of the sunroof on the car roof, and the second speaker is located at the ending end of the sunroof on the car roof, and the first speaker and the second speaker are symmetrically distributed. Figure 3 As shown, the sound waves received by the user's left ear include the superposition of plane waves generated by the first and second speakers at the left ear position, and the sound waves received by the user's right ear include the superposition of plane waves generated by the first and second speakers at the right ear position. The dual-channel stereo principle is used to calculate the superposition sound pressure of the plane waves generated by the first and second speakers at the left and right ear positions, respectively. Sound pressure is the change in atmospheric pressure caused by sound wave disturbances, which is equivalent to the pressure change caused by superimposing a sound wave disturbance on the atmospheric pressure. Since the measurement of sound pressure is relatively easy to achieve, other physical quantities such as particle velocity can also be indirectly obtained through the measurement of sound pressure, so this physical quantity is often used in acoustics to describe sound waves.
[0082] In some cases, it's necessary to consider the time difference between the sound emitted by a speaker reaching the left and right ears. For example, the first speaker can be located on the left side of the car, and the second speaker can be located on the right side of the car, with the first and second speakers symmetrically positioned. The distances from the first and second speakers to the ears then have the following relationship:
[0083] r LL =r RR =r0-asinθ0
[0084] r LR =r RL =r0+asinθ0
[0085] Where r0 represents the distance from the speaker to the center of the ears;
[0086] a represents the distance from the left or right ear to the center of both ears;
[0087] θ0 represents the actual direction parameter of the loudspeaker.
[0088] The above distance relationship can be used to calculate the time difference between the sound from the speaker reaching the left ear and the right ear respectively.
[0089] The audio signal played by the speaker is transmitted to the user's left and right ears in the form of sound waves. The transmission of sound waves is similar to the transmission of light, and is transmitted to the user's left and right ears in the form of parallel lines. Since the speaker and the center line of the two ears form a certain angle, that is, the actual direction parameter θ0 of the speaker, there is a difference in the distance the sound waves are transmitted, that is, the distance from the speaker to the left and right ears is different. Figure 4As shown, the distances from the first speaker to the left and right ears are r LL and r RL The distance from the first speaker to the center of the two ears is r0, and the distance from the left ear or right ear to the center of the two ears is a. According to the principle of trigonometric function, r is calculated. LL and r RL Similarly, calculate the distance r from the second speaker to the left and right ears RR and r LR .
[0090] Optionally, the gain parameter also includes a phase delay time difference;
[0091] After step S301, that is, after evaluating the sound pressure correlation between the gain amplitudes of the respective speakers by using the acoustic model, the method further includes:
[0092] S302, calculating the phase delay difference using a preset delay model;
[0093] The delay model includes:
[0094]
[0095] Among them, ITD P Indicates the phase delay difference of binaural sound pressure;
[0096] ψ L Indicates the phase of the left ear sound pressure;
[0097] ψ R Indicates the phase of the sound pressure in the right ear;
[0098] a represents the distance from the left or right ear to the center of both ears;
[0099] θ0 represents the actual direction parameter of the loudspeaker.
[0100] It can be understood that the plane wave superposition sound pressure P generated by the first speaker and the second speaker at the left and right ear positions is L and P R After ignoring the common factor -r0, the phase delay time difference ITD of the binaural sound pressure of the loudspeaker is calculated based on the binaural principle. P The phase delay difference of binaural sound pressure is the time difference of binaural sound pressure. The interaural time difference (ITD) refers to the time difference when the sound wave reaches the two ears due to the distance between the two ears. At low frequencies, the time difference of binaural sound pressure is only related to the angle and has nothing to do with the frequency. The time difference of sound waves from the sound source to the two ears is an important basis for users to locate the direction of the sound source. When the sound source is in the center vertical plane, the interaural time difference is zero; when the sound source deviates from the center vertical plane, the distance from the sound source to the left and right ears is different, so there is a time difference.
[0101] It is understandable that the noise source during the operation of the sunroof is monaural. The user locates the noise source through the time difference of the binaural sound pressure. The phase delay time difference ITD of the binaural sound pressure of the noise source is calculated based on the monaural principle. The formula is expressed as:
[0102]
[0103] It can be understood that the direction of the synthetic virtual source of the loudspeaker coincides with the direction of the noise source of the sunroof operation to achieve full noise shielding, which is equivalent to the phase delay difference ITD of the binaural sound pressure of the loudspeaker P The phase delay difference ITD is equal to the binaural sound pressure of the noise source, and the formula is expressed as:
[0104]
[0105] Among them, θ I Represents the synthesized virtual source direction parameters of the loudspeaker.
[0106] It can be understood that the inverse tangent function is expanded into a Taylor series according to ka, and the first-order term is taken to obtain the geometric relationship between the synthetic virtual source direction parameter of the loudspeaker and the actual direction parameter of the loudspeaker, which is expressed as follows:
[0107]
[0108] Understandably, when A L =A R When sinθ I =0,θ I = 0°, the synthetic virtual source is located directly above the user; when A L >A R When sinθ I >0, the synthesized virtual source moves closer to the first speaker; when A L >> R When sinθ I ≈sinθ0, the synthetic virtual source is located in the direction of the first speaker. Similarly, the relationship between the synthetic virtual source direction and the direction of the second speaker can be obtained. When the skylight is in the open working condition, the skylight moves from the skylight starting point to the skylight end point, and the synthetic virtual source direction changes synchronously from the direction of the first speaker to the direction of the second speaker. The geometric relationship between the synthetic virtual source direction parameters of the above-mentioned speakers and the actual direction parameters of the speakers conforms to the preset geometric model, which means that by calculating the gain parameters of the speakers through the preset geometric model, the synthetic virtual source direction of the speakers can be made to coincide with the real-time position direction of the skylight, achieving a full noise shielding effect. At the same time, after the gain parameters are added, the sound source of the interactive sound effect moves synchronously with the skylight.
[0109] This embodiment can achieve that when the sunroof is in the left or right opening working condition, the speaker audio signal is additionally processed with the gain parameters, and the direction of the synthesized virtual source of the speaker coincides with the real-time position direction of the sunroof. Therefore, after the sound effect is synthesized according to the interactive sound effect and the gain parameters, the sound source of the interactive sound effect can be synchronized with the sunroof.
[0110] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the 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 the present invention.
[0111] In one embodiment, a car sunroof control system is provided, which corresponds to the car sunroof control method in the above embodiment. The car sunroof control system includes a sunroof control module, a sound effect analysis and calculation module, an audio processing module, and a power amplifier module. Figure 5 As shown, each functional module is described in detail as follows:
[0112] a sunroof control module, configured to receive a sunroof control instruction, adjust the position of the sunroof according to the sunroof control instruction, and obtain an interactive sound effect corresponding to the sunroof control instruction;
[0113] a sound effect analysis and calculation module, configured to obtain arrangement information of the speakers and real-time position parameters of the skylight, and calculate gain parameters of at least two speakers based on the arrangement information and the real-time position parameters;
[0114] An audio processing module, configured to synthesize the sound effects according to the interactive sound effects and the gain parameters to obtain audio signals of each speaker;
[0115] The power amplifier module is used to send each of the audio signals to a corresponding speaker, so that each of the speakers plays the audio signal synchronized with the real-time position of the sunroof.
[0116] It is understandable that in one embodiment, the voice trigger unit, button trigger unit and instrument trigger unit of the sunroof control module are used to trigger the sunroof control instructions; the sunroof control module is connected to the sound source library to call the interactive sound effects corresponding to different sunroof control instructions; the sunroof control module is connected to the sound effect analysis and calculation module to input the real-time position parameters of the sunroof into the sound effect analysis and calculation module. The sound effect analysis and calculation module is connected to the sound effect processing module to input the gain parameters into the sound effect processing module. The sound effect processing module is connected to the sound source library to obtain interactive sound effects; the AMP unit and DEL unit of the sound effect processing module are used to synthesize sound effects according to the interactive sound effects and gain parameters to obtain audio signals for each speaker. The sound effect analysis and calculation module and the sound effect processing module can be integrated into a sunroof sound effect controller module. The power amplifier module is connected to the sound effect processing module to obtain audio signals and send each audio signal to the corresponding speaker, so that the speaker plays an audio signal synchronized with the real-time position of the sunroof.
[0117] Optional sunroof control module includes:
[0118] a working condition determining unit, configured to determine a working condition of the sunroof according to the sunroof control instruction;
[0119] The sound effect unit is called to obtain the interactive sound effect corresponding to the working condition.
[0120] Optionally, the sound effect analysis and calculation module includes:
[0121] a sunroof position acquisition unit, configured to monitor the relative position of the sunroof through a sensor and acquire a reference point position of the sunroof;
[0122] A real-time position calculation unit is used to calculate the real-time position parameter according to the reference point position and the relative position.
[0123] Optionally, the sound effect analysis and calculation module also includes:
[0124] an actual direction calculating unit, configured to calculate an actual direction parameter of the speaker according to the arrangement information;
[0125] a synthetic direction calculation unit, configured to calculate a synthetic virtual source direction parameter of the loudspeaker according to the real-time position parameter;
[0126] The gain amplitude calculation unit is configured to calculate the gain amplitudes of at least two loudspeakers according to the actual direction parameter and the synthesized virtual source direction parameter.
[0127] Optionally, the sound effect analysis and calculation module also includes:
[0128] A geometric model calculation unit is configured to process the actual direction parameter and the synthesized virtual source direction parameter using a preset geometric model to generate the gain amplitude, wherein the preset geometric model includes:
[0129]
[0130] Where θ0 represents the actual direction parameter of the loudspeaker;
[0131] θ I represents the synthesized virtual source direction parameter of the loudspeaker;
[0132] A L Indicates the gain amplitude of the first speaker;
[0133] A R Indicates the gain amplitude of the second speaker.
[0134] Optionally, the audio processing module includes:
[0135] an acoustic model calculation unit, configured to construct an acoustic model including the gain amplitudes, and evaluate the sound pressure correlation between the gain amplitudes of the respective speakers using the acoustic model;
[0136] The acoustic model includes:
[0137] P L =A L exp(-jkr LL )+A R exp(-jkr LR )
[0138] P R =A L exp(-jkr RL )+A R exp(-jkr RR )
[0139] Among them, P L represents the plane wave superposition sound pressure generated by the first loudspeaker and the second loudspeaker at the left ear position;
[0140] P R represents the plane wave superposition sound pressure generated by the first loudspeaker and the second loudspeaker at the right ear position;
[0141] j represents the imaginary part of the complex form of the plane wave;
[0142] A L Indicates the gain amplitude of the first speaker;
[0143] A R Indicates the gain amplitude of the second speaker;
[0144] Wave number k = 2πf / c, f represents frequency, c represents speed of sound;
[0145] r LL Indicates the distance from the first speaker to the left ear;
[0146] r RL Indicates the distance from the first speaker to the right ear;
[0147] r RR Indicates the distance from the second speaker to the right ear;
[0148] r LR Indicates the distance from the second speaker to the left ear.
[0149] Optionally, the audio processing module further includes:
[0150] A time delay model calculation unit, configured to calculate the phase delay time difference using a preset time delay model;
[0151] The delay model includes:
[0152]
[0153] Among them, ITD P Indicates the phase delay difference of binaural sound pressure;
[0154] ψ L Indicates the phase of the left ear sound pressure;
[0155] ψ R Indicates the phase of the sound pressure in the right ear;
[0156] a represents the distance from the left or right ear to the center of both ears;
[0157] θ0 represents the actual direction parameter of the loudspeaker.
[0158] The specific definitions of the sunroof control system can be found in the definitions of the sunroof control method above and will not be repeated here. Each module in the aforementioned sunroof control system may be implemented in whole or in part via software, hardware, or a combination thereof. Each of these modules may be embedded in or independent of a processor within a computer device in hardware form, or may be stored in a computer device memory in software form, allowing the processor to call and execute the corresponding operations of each module.
[0159] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating system, computer-readable instructions and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The database of the computer device is used to store data involved in the sunroof control method. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer-readable instructions are executed by the processor, a sunroof control method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0160] In one embodiment, a computer device is provided, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the following steps are implemented:
[0161] receiving a sunroof control instruction, adjusting a position of the sunroof according to the sunroof control instruction, and obtaining an interactive sound effect corresponding to the sunroof control instruction;
[0162] Acquire arrangement information of the speakers and real-time position parameters of the skylight, and calculate gain parameters of at least two speakers according to the arrangement information and the real-time position parameters;
[0163] Performing sound effect synthesis according to the interactive sound effect and the gain parameter to obtain audio signals of each speaker;
[0164] Each of the audio signals is sent to a corresponding speaker, so that each of the speakers plays the audio signal synchronized with the real-time position of the sunroof.
[0165] In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided. The computer-readable storage media provided in this embodiment include non-volatile computer-readable storage media and volatile computer-readable storage media. The computer-readable storage media store computer-readable instructions that, when executed by one or more processors, implement the following steps:
[0166] receiving a sunroof control instruction, adjusting a position of the sunroof according to the sunroof control instruction, and obtaining an interactive sound effect corresponding to the sunroof control instruction;
[0167] Acquire arrangement information of the speakers and real-time position parameters of the skylight, and calculate gain parameters of at least two speakers according to the arrangement information and the real-time position parameters;
[0168] Performing sound effect synthesis according to the interactive sound effect and the gain parameter to obtain audio signals of each speaker;
[0169] Each of the audio signals is sent to a corresponding speaker, so that each of the speakers plays the audio signal synchronized with the real-time position of the sunroof.
[0170] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0171] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0172] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A method for controlling a car sunroof, characterized in that: include: receiving a sunroof control instruction, adjusting a position of the sunroof according to the sunroof control instruction, and obtaining an interactive sound effect corresponding to the sunroof control instruction; Acquire arrangement information of the speakers and real-time position parameters of the skylight, and calculate gain parameters of at least two speakers according to the arrangement information and the real-time position parameters; Performing sound effect synthesis according to the interactive sound effect and the gain parameter to obtain audio signals of each speaker; sending each of the audio signals to a corresponding speaker so that each of the speakers plays the audio signal synchronized with the real-time position of the sunroof; Wherein, the gain parameter includes a gain amplitude; The calculating gain parameters of at least two speakers according to the arrangement information and the real-time position parameters includes: Calculating actual direction parameters of the loudspeaker according to the arrangement information; Calculating a synthetic virtual source direction parameter of the loudspeaker according to the real-time position parameter; Calculating gain amplitudes of at least two loudspeakers according to the actual direction parameter and the synthesized virtual source direction parameter; The gain amplitude includes the gain amplitude of the first speaker and the gain amplitude of the second speaker; The calculating the gain amplitudes of at least two loudspeakers according to the actual direction parameter and the synthesized virtual source direction parameter comprises: The actual direction parameter and the synthesized virtual source direction parameter are processed by a preset geometric model to generate relative gains of the first loudspeaker and the second loudspeaker.
2. The vehicle sunroof control method according to claim 1, wherein: The obtaining of the interactive sound effect corresponding to the sunroof control instruction includes: determining an operating condition of the sunroof according to the sunroof control instruction; Get the interactive sound effect corresponding to the working condition.
3. The vehicle sunroof control method according to claim 1, wherein: The acquiring the arrangement information of the speakers and the real-time position parameters of the skylight includes: monitoring the relative position of the skylight by a sensor and obtaining a reference point position of the skylight; The real-time position parameter is calculated according to the reference point position and the relative position.
4. The vehicle sunroof control method according to claim 1, wherein: The preset geometric model includes: in, Indicates the actual direction parameters of the loudspeaker; represents the synthesized virtual source direction parameter of the loudspeaker; Indicates the gain amplitude of the first speaker; Indicates the gain amplitude of the second speaker.
5. The vehicle sunroof control method according to claim 1, wherein: Before performing the sound effect synthesis according to the interactive sound effect and the gain parameter, the method includes: Constructing an acoustic model including the gain amplitudes, and evaluating the sound pressure correlation between the gain amplitudes of the respective speakers using the acoustic model; The acoustic model includes: in, represents the plane wave superposition sound pressure generated by the first loudspeaker and the second loudspeaker at the left ear position; represents the plane wave superposition sound pressure generated by the first loudspeaker and the second loudspeaker at the right ear position; represents the imaginary part of the complex form of the plane wave; Indicates the gain amplitude of the first speaker; Indicates the gain amplitude of the second speaker; Wave number , Indicates frequency, represents the speed of sound; Indicates the distance from the first speaker to the left ear; Indicates the distance from the first speaker to the right ear; Indicates the distance from the second speaker to the right ear; Indicates the distance from the second speaker to the left ear.
6. The vehicle sunroof control method according to claim 5, wherein: The gain parameter also includes a phase delay time difference; After evaluating the sound pressure correlation between the gain amplitudes of the respective speakers by using the acoustic model, the method further includes: Calculating the phase delay time difference by using a preset time delay model; The preset delay model includes: in, Indicates the phase delay difference of binaural sound pressure; Indicates the phase of the left ear sound pressure; Indicates the phase of the sound pressure in the right ear; Indicates the distance from the left or right ear to the center point of both ears; Indicates the actual direction parameter of the loudspeaker.
7. A car sunroof control system, characterized in that: include: a sunroof control module, configured to receive a sunroof control instruction, adjust the position of the sunroof according to the sunroof control instruction, and obtain an interactive sound effect corresponding to the sunroof control instruction; a sound effect analysis and calculation module, configured to obtain arrangement information of the speakers and real-time position parameters of the skylight, and calculate gain parameters of at least two speakers based on the arrangement information and the real-time position parameters; An audio processing module, configured to synthesize the sound effects according to the interactive sound effects and the gain parameters to obtain audio signals of each speaker; a power amplifier module, configured to transmit each of the audio signals to a corresponding speaker, so that each of the speakers plays the audio signal synchronized with the real-time position of the sunroof; The sound effect analysis and calculation module further includes: an actual direction calculating unit, configured to calculate an actual direction parameter of the speaker according to the arrangement information; a synthetic direction calculation unit, configured to calculate a synthetic virtual source direction parameter of the loudspeaker according to the real-time position parameter; a gain amplitude calculation unit, configured to calculate the gain amplitudes of at least two loudspeakers according to the actual direction parameter and the synthesized virtual source direction parameter; The geometric model calculation unit is used to process the actual direction parameter and the synthetic virtual source direction parameter through a preset geometric model to generate relative gains of the first loudspeaker and the second loudspeaker.
8. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein: When the processor executes the computer-readable instructions, the automobile sunroof control method according to any one of claims 1 to 6 is implemented.
9. One or more readable storage media storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the vehicle sunroof control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Control system for noise generated by functional hardware components
CN105992104A
Noise suppression method for vehicle interior, by detecting operation of doors, power windows, seat adjusters etc. and producing masking noises accordingly
DE102004031657A1