Sound playing method and device
By acquiring audio signals and motor data, and generating a third electrical signal to control the sound of the car motor, the motor noise problem is solved and user experience and satisfaction is improved.
Patent Information
- Application Number
- CN202411210266.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-08-30
AI Technical Summary
During the operation of the car, the motor noise cannot be eliminated, which affects the user experience and leads to low user satisfaction.
By acquiring the audio signal and motor data, a third electrical signal is generated, which is used to control the motor to generate sound and eliminate motor noise.
It effectively eliminates motor noise, improves user experience and satisfaction, and achieves a better human-computer interactive experience.
Smart Images

Figure CN118732583B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile technology, and in particular to a sound playing method and device. Background Art
[0002] Movies and karaoke have become a common entertainment activity and are widely present in people's lives. Now they have become one of the lifestyles for people to gather, make friends and have fun. And proper entertainment is an extremely effective way to relieve stress for people who lead a fast-paced life.
[0003] People usually go to specific entertainment venues to watch movies and sing karaoke songs, which have good sound and sound insulation. However, this not only costs a certain amount of money, but is also time-consuming and labor-intensive. Therefore, with the continuous development of vehicle control technology and people's multi-functional needs for vehicles, watching movies and singing karaoke songs have gradually shifted to vehicle-mounted terminal devices. At present, when playing sound in a car, the car audio installed in the car is usually used. For example, when a user wants to sing karaoke in the car, the music sung by the user and the music on the mobile terminal can be played using the car audio equipment installed in the car. However, when the car is running, the motor of the car will make certain sounds (noises), which usually cannot be eliminated, affecting the user experience and resulting in low user satisfaction. Summary of the invention
[0004] The purpose of the embodiment of the present invention is to provide a sound playing method to solve the problem that the motor of the car in the current solution will make a certain sound, and these noises are usually impossible to eliminate, which affects the user experience and leads to low user satisfaction. The specific technical solution is as follows:
[0005] In a first aspect of the present invention, a sound playing method is provided, the method comprising:
[0006] Acquire a corresponding first electrical signal according to the audio signal;
[0007] Determine a second electrical signal when the motor is in a working state according to the motor data;
[0008] obtaining a third electrical signal based on the first electrical signal and the second electrical signal;
[0009] The motor is controlled to generate sound according to the third electrical signal.
[0010] Optionally, the third electrical signal is obtained by mixing the first electrical signal and the second electrical signal.
[0011] Optionally, controlling the motor to make a sound according to the third electrical signal comprises:
[0012] Determine a control signal PWM duty cycle for a drive controller of the motor according to the third electrical signal;
[0013] The motor is controlled to generate sound according to the duty cycle of the control signal PWM.
[0014] Optionally, acquiring a corresponding first electrical signal according to the audio signal includes:
[0015] Demodulating the audio signal to obtain frequency and amplitude;
[0016] A corresponding first electrical signal is acquired according to the frequency and the amplitude.
[0017] Optionally, before demodulating the audio signal to obtain the frequency and amplitude, the method further includes:
[0018] Get the audio signal of the device communicating with the car.
[0019] Optionally, acquiring an audio signal of a device communicating with the car includes:
[0020] Acquiring voice information collected by a microphone communicating with the vehicle; or,
[0021] Acquiring audio information transmitted by an external mobile terminal in communication with the automobile;
[0022] The voice information and / or the audio information is used as an audio signal of the vehicle.
[0023] Optionally, determining the second electrical signal indicating that the motor is in a working state according to the motor data includes:
[0024] A second electrical signal is determined based on the motor data in a targeted manner when the motor is in a driving state.
[0025] Optionally, the target method includes at least one of a table lookup method, a table lookup and interpolation combination method, and a piecewise linear fitting method.
[0026] Optionally, the third electrical signal is obtained by mixing the first electrical signal and the second electrical signal, and includes:
[0027] Performing difference calculation on the first electrical signal and the second electrical signal to obtain a difference signal;
[0028] The difference signal is used as a third electrical signal.
[0029] Optionally, controlling the motor to make sound according to the control signal PWM duty cycle includes:
[0030] When the audio signal is played through the in-vehicle multimedia of the car, the motor is controlled to produce sound.
[0031] Optionally, controlling the motor to make sound according to the control signal PWM duty cycle includes:
[0032] Convert the control signal PWM duty cycle of the synchronous rotating coordinate system into the control signal PWM duty cycle of the stationary coordinate system;
[0033] The control signal PWM duty ratio of the stationary coordinate system is modulated by a space vector pulse width modulation algorithm to obtain the control signal PWM duty ratio of each phase bridge arm of the motor;
[0034] The motor sound is controlled by the PWM duty cycle of the control signal of each phase bridge arm.
[0035] Optionally, the in-vehicle multimedia includes an external screen, and after controlling the motor to make a sound according to the third electrical signal, the method further includes:
[0036] The image information is displayed on the screen outside the vehicle; wherein the image information is an image adapted to the sound of the motor, a preset image and / or a random image.
[0037] A second aspect of the embodiments of the present invention discloses a sound playing device, the device comprising:
[0038] A first electrical signal acquisition module, used to acquire a corresponding first electrical signal according to the audio signal;
[0039] A second electrical signal acquisition module, used for determining a second electrical signal when the motor is in a working state according to the motor data;
[0040] A third electrical signal acquisition module, configured to obtain a third electrical signal based on the first electrical signal and the second electrical signal;
[0041] The motor sound module is used to control the motor to make sound according to the third electrical signal.
[0042] In another aspect of the present invention, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes any of the above-mentioned sound playing methods.
[0043] In another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned sound playing methods.
[0044] In another aspect of the implementation of the present invention, a vehicle is provided, wherein the vehicle implements any of the above-mentioned sound playing methods.
[0045] Compared with the related art, the embodiments of the present invention have at least the following advantages:
[0046] In the embodiment of the present invention, the corresponding first electrical signal can be obtained according to the audio signal, and the second electrical signal when the motor is in the working state can be determined based on the motor data, and the third electrical signal can be obtained based on the first electrical signal and the second electrical signal, and the motor can be controlled to make a sound according to the third electrical signal. The embodiment of the present invention utilizes and controls the sound of the motor based on the audio signal, eliminates the noise of the motor, improves the user experience, and increases user satisfaction.
[0047] Optionally, the audio signal may be the sound of a user speaking or singing through a microphone. Therefore, by controlling the motor to emit a sound that matches the audio signal according to the audio signal, a better human-computer interaction experience can be achieved, further increasing user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0049] Figure 1 A flowchart of a sound playing method provided in an embodiment of the present invention;
[0050] Figure 2 A schematic diagram of the structure of a system for realizing car sound playback provided in an embodiment of the present invention;
[0051] Figure 3 A schematic diagram of a process of playing car sound provided in an embodiment of the present invention;
[0052] Figure 4 A schematic diagram of realizing a karaoke mode provided in an embodiment of the present invention;
[0053] Figure 5 A schematic diagram of a voice implementation method provided in an embodiment of the present invention;
[0054] Figure 6 is a schematic diagram of a coordinate transformation provided in an embodiment of the present invention;
[0055] Figure 7 It is a schematic diagram of a process flow of a motor sound of a vehicle provided in an embodiment of the present invention;
[0056] Figure 8 is a structural diagram of an electric drive control system of a motor provided in an embodiment of the present invention;
[0057] Fig. 9 This is a flow chart for realizing the display of an external vehicle screen provided in an embodiment of the present invention;
[0058] Fig.10 The present invention provides a structural block diagram of a sound playing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0060] Reference Figure 1 , is a flow chart of the steps of a sound playing method provided in an embodiment of the present invention, such as Figure 1 As shown, the method may specifically include the following steps:
[0061] Step 101: acquiring a corresponding first electrical signal according to an audio signal;
[0062] In a specific implementation, the embodiment of the present invention can be applied to an automobile, which can include an automobile main controller (automobile controller), and the automobile controller can be used to control the motor of the automobile, for example, to control the speed and other parameters of the motor of the automobile. The motor can be a permanent magnet synchronous motor, or an asynchronous motor, an electric excitation field winding, a dual motor, a six-phase motor, or other motors, and the embodiment of the present invention does not need to be limited to this.
[0063] Among them, the electrical signal (including the first electrical signal) may include other signals that can be used to control the motor, such as the direct- and alternating-axis current. The first electrical signal of the embodiment of the present invention may be obtained based on an audio signal, wherein the audio signal may be music or the sound of a person speaking. Exemplarily, the direct- and alternating-axis current refers to the direct-axis current (d-axis current) and the quadrature-axis current (q-axis current) of the motor, specifically the quadrature-axis current and the direct-axis current in a synchronous rotating coordinate system based on the orientation of the motor rotor magnetic field. Specifically, in the motor, the current vector may be decomposed into two components, the direct-axis current and the quadrature-axis current. The two components correspond to the direct-axis and quadrature-axis directions of the motor, respectively, and have different effects and influences. The direct-axis current is related to the magnetic flux direction on the direct axis (d-axis) of the motor, and the quadrature-axis current is related to the magnetic flux direction on the quadrature axis (q-axis) of the motor. In actual motor control, the ratio of the direct-axis current to the quadrature-axis current determines the speed of the motor. Therefore, for the control of the motor of the vehicle, these two components need to be properly controlled and adjusted to achieve the optimal control effect.
[0064] Step 102, determining a second electrical signal indicating that the motor is in a working state according to the motor data;
[0065] In an embodiment of the present invention, a second electrical signal when the motor is in a working state (driving state) can be determined based on the motor data of the motor, wherein the motor data can include at least information such as the current, rotation speed, and electrical angle of the motor. The second electrical signal can be a direct-axis current (d-axis current) and a quadrature-axis current (q-axis current) for the motor, specifically a quadrature-axis current and a direct-axis current in a synchronous rotating coordinate system based on the orientation of the motor rotor magnetic field.
[0066] Step 103: Obtain a third electrical signal based on the first electrical signal and the second electrical signal;
[0067] Step 104: Control the motor to make sound according to the third electrical signal.
[0068] In the embodiment of the present invention, after obtaining the first electrical signal and the second electrical signal, the motor can be collaboratively controlled to make a sound based on the first electrical signal and the second electrical signal. Specifically, the third electrical signal can be obtained from the first electrical signal and the second electrical signal, and the motor can be controlled to make a sound based on the third electrical signal. Specifically, the speed of the motor can be controlled based on the third electrical signal so that the motor generates a specific vibration that is converted into sound.
[0069] In the embodiment of the present invention, the corresponding first electrical signal can be obtained according to the audio signal, and the second electrical signal when the motor is in the working state can be determined based on the motor data, and the third electrical signal can be obtained based on the first electrical signal and the second electrical signal, and the motor can be controlled to make a sound according to the third electrical signal. The embodiment of the present invention utilizes and controls the sound of the motor based on the audio signal, eliminates the noise of the motor, improves the user experience, and increases user satisfaction.
[0070] In one embodiment of the present invention, the step 104 of controlling the motor to make a sound according to the third electrical signal includes:
[0071] Determine a control signal PWM duty cycle for a drive controller of the motor according to the third electrical signal;
[0072] The motor is controlled to generate sound according to the duty cycle of the control signal PWM.
[0073] In the specific implementation, the Space Vector Pulse Width Modulation (SVPWM) algorithm is an advanced PWM (Pulse Width Modulation) technology for motor control. The SVPWM algorithm achieves precise control of the motor speed by modulating the three-phase voltage of the motor. Specifically, the SVPWM algorithm can determine the control signal PWM duty cycle of the motor drive controller based on the third electrical signal calculation, and then control the motor sound based on the control signal PWM duty cycle.
[0074] In an embodiment of the present invention, in order to realize the control of the motor, it is necessary to convert the control signal PWM duty cycle of the synchronous rotating coordinate system into the control signal PWM duty cycle of the stationary coordinate system, and then modulate the control signal PWM duty cycle of the stationary coordinate system using the SVPWM algorithm to obtain the control signal PWM duty cycle of the motor. Finally, the sound of the motor can be controlled by the control signal PWM duty cycle.
[0075] In an embodiment of the present invention, the step of obtaining a corresponding first electrical signal according to the audio signal includes:
[0076] Demodulating the audio signal to obtain frequency and amplitude;
[0077] A corresponding first electrical signal is acquired according to the frequency and the amplitude.
[0078] In a specific implementation, the corresponding AC current instruction can be pre-set according to different frequencies and amplitudes, and the corresponding electrical signal (for example, the first electrical signal of the embodiment of the present invention) can be obtained based on the AC current instruction. In the embodiment of the present invention, the frequency and amplitude can be obtained by demodulating the audio signal, and then the corresponding target AC current instruction can be determined based on the frequency and amplitude of the audio signal, and then the first electrical signal can be determined based on the target AC current instruction.
[0079] In one embodiment of the present invention, before demodulating the audio signal to obtain the frequency and amplitude, the method further includes:
[0080] Get the audio signal of the device communicating with the car.
[0081] In the embodiment of the present invention, the audio signal may be an audio signal of a device that communicates with the car. Specifically, the device that communicates with the car may be a device inside the car or a device outside the car.
[0082] In one embodiment of the present invention, the step of acquiring an audio signal of a device communicating with the automobile includes:
[0083] Acquiring voice information collected by a microphone communicating with the vehicle; or,
[0084] Acquiring audio information transmitted by an external mobile terminal in communication with the automobile;
[0085] The voice information and / or the audio information is used as an audio signal of the vehicle.
[0086] In the embodiment of the present invention, the device inside the car can be an in-car audio system, and the device outside the car can be an external mobile terminal, such as a mobile phone and a computer. Specifically, the external mobile terminal and the wireless microphone can communicate wirelessly with the car (car main controller) via a Bluetooth communication module and a Wifi communication module. Figure 2 , is a schematic diagram of a system structure for realizing car sound playback provided by an embodiment of the present invention, wherein a circuit board of a car main controller 201 is provided with a Bluetooth communication element 1, a Bluetooth communication element 2, a Wifi communication element 1, and a Bluetooth communication element 2. The car main controller 201 wirelessly communicates with a wireless microphone 202 via a Bluetooth communication element 1 or a Wifi communication module 1, and receives voice signals such as music information sung by a user from the wireless microphone 202. The car main controller 201 wirelessly communicates with an external mobile terminal (mobile device) 203 via a Bluetooth communication element 2 or a Wifi communication module 2, and receives audio signals such as music information sung by the external mobile terminal 203.
[0087] In an embodiment of the present invention, the audio signal may be voice information collected by a microphone that communicates with the car, such as music sung by a user collected by the microphone when the user is singing karaoke in the car, or it may be audio information transmitted by an external mobile terminal that communicates with the car, such as music played on the mobile terminal when the user is singing karaoke in the car, or the sound of a movie played on the mobile terminal when the user is watching a movie in the car.
[0088] Since the audio signal of the embodiment of the present invention may be the sound of a user speaking or singing through a microphone, controlling the motor to emit a sound that matches the audio signal according to the audio signal can achieve a better human-computer interaction experience and further increase user satisfaction.
[0089] For example, refer to Figure 3 , is a flow chart of a sound playing process provided in an embodiment of the present invention, and the specific steps are as follows:
[0090] Step S201: When the user speaks, the wireless microphone collects the sound as voice information.
[0091] Step S202: The processor of the wireless microphone converts the voice information into an electrical signal, wherein the electrical signal includes the waveform and frequency information of the sound.
[0092] Step S203: The wireless transmitting circuit further processes the electrical signal and transmits the electrical signal through radio waves. The wireless transmitting circuit mainly consists of the following parts: modulator, power amplifier and antenna. The function of the modulator is to process the weak electrical signal generated by the processor of the wireless microphone to make it an electrical signal suitable for wireless transmission. The modulation method of the electrical signal can be selected from frequency modulation (frequency modulation) or amplitude modulation (amplitude modulation).
[0093] Step S204: The power of the electrical signal is amplified to a level suitable for propagation by the power amplifier;
[0094] Step S205: The electrical signal processed by the modulator and the power amplifier is converted into a radio wave through the antenna, and sent into the air through the transmitting antenna.
[0095] Step S206: The wireless receiving circuit of the main controller of the automobile mainly consists of two parts: a demodulator and an amplifier. The function of the demodulator is to restore the received electrical signal to the electrical signal before modulation, and to restore the waveform and frequency information of the original sound.
[0096] Step S207: The amplifier further amplifies the restored electrical signal for subsequent sound playback processing.
[0097] Steps S208 and S209: The external mobile terminal may be a mobile phone, a computer or other device, which communicates wirelessly with the main controller of the vehicle via a Bluetooth communication module and a Wifi communication module to transmit music signals or accompaniment signals.
[0098] Step S210: The audio information of movies or music stored in the intelligent connected vehicle system can be used for playing when watching movies or singing karaoke.
[0099] Step S211: The audio information of the movie or music stored inside the motor controller MCU (Microcontroller Unit) can be used to play when watching movies or singing karaoke.
[0100] Step S212: the car main controller plays the audio information corresponding to the movie and the video simultaneously. In addition, the car main controller mixes the received user's voice signal and the audio information of the music to form a mixed music signal of a human voice simulation signal and an accompaniment signal for playing during karaoke.
[0101] Reference Figure 4, is a schematic diagram of the implementation of a karaoke mode provided in an embodiment of the present invention. The state can be determined by reading the bits on the car used to mark each device or mode. Among them, 0X33F4.0, 0X33F, 4.0-4.7 are CAN (Controller Area Network) communication messages, written in the control software, and can be used as flags for judging different karaoke modes. For example: 0X33F4.0-4.7=0X0: 0X33F: message ID; 4.0-4.7: represents the 4th byte of the message (a total of 8 bytes); 0X0: value (hexadecimal). The specific implementation steps are as follows:
[0102] Step S501: 0X409 Bits 24-25 of sub-ID 0X3 obtain the microphone and connector status.
[0103] Step S502: A playback source selection button is added to the PAD (Passenger Audio / Visual Display). Through the playback source selection button, the motor sound can be selected when singing karaoke outside the car, and the AMP (Amplifier) can be used when singing karaoke inside the car.
[0104] Step S503: The user can select the outdoor karaoke source through the PAD. When the multimedia receives this signal and sends Media0X33F4.0-4.7=0X0, it is invalid. The rest is consistent with the in-car karaoke mode, and the in-car power amplifier AMP is used. When the PDC (vehicle controller) receives 0X33F4.0-4.7 = 0X0 and the multimedia source status 0X1BE 8.0-8.1 = 0X1, it enters the outdoor karaoke mode and parses the audio signal sent by the multimedia into a control signal to control the MCU to sound. When the usage scenario 0X33F 4.0-4.7=0X4, karaoke is interconnected.
[0105] Reference Figure 5, is a schematic diagram of a voice implementation method provided in an embodiment of the present invention. The voice outside the car can be divided into preset voice 501 and real-time voice 502. The preset voice is the same as the normal voice command. The user turns on the preset voice on the PAD, and the on-board voice performs voice recognition, matches the set text command, and issues the corresponding voice mode. The PDC controls the MCU output. The real-time voice is similar to the preset voice. The on-board voice needs to perform voice recognition, convert the voice into text, convert the text into speech, and synthesize the speech. The multimedia information stream is given to the PDC, and the PDC controls the MCU output. This mode requires the user to manually turn on the real-time voice on the PAD. Among them, the preset voice key and the real-time voice key set on the PAD can be turned on and off at the same time. When singing karaoke, turn on the preset voice key and the real-time voice key at the same time to achieve the simultaneous playback of human voice signals and preset accompaniment signals. When watching a movie, turn on the preset voice key to play the audio information of the preset movie.
[0106] In one embodiment of the present invention, the step 105 of determining the second electrical signal indicating that the motor is in a working state according to the motor data includes:
[0107] A second electrical signal when the motor is in a driving state is determined according to the motor data in a preset manner.
[0108] Among them, the preset method at least includes a table lookup method, a table lookup and interpolation combination method, and a piecewise linear fitting method.
[0109] In an embodiment of the present invention, after calculating the motor data of the motor, a second electrical signal of the motor in a driving state is determined by a preset method such as a table lookup method, a combination of table lookup and interpolation method, and a piecewise linear fitting method according to parameters such as the rotational speed in the motor data.
[0110] In one embodiment of the present invention, the third electrical signal is obtained by mixing the first electrical signal and the second electrical signal, specifically:
[0111] Performing difference calculation on the first electrical signal and the second electrical signal to obtain a difference signal;
[0112] The difference signal is used as the third electrical signal.
[0113] In an embodiment of the present invention, the sound of the motor can be collaboratively controlled by mixing the first electrical signal and the second electrical signal. For example, the mixing process can be to calculate the difference between the first electrical signal and the second electrical signal to obtain a difference signal, and then convert the difference signal into a third electrical signal for a drive controller of the motor, such as a control signal PWM duty cycle, so as to control the sound of the motor according to the control signal PWM duty cycle.
[0114] In one embodiment of the present invention, controlling the motor to make sound according to the control signal PWM duty cycle includes:
[0115] When the audio signal is played through the in-vehicle multimedia of the car, the motor is controlled to produce sound.
[0116] Among them, in-vehicle multimedia may include in-vehicle audio, in-vehicle and out-vehicle display screens (out-vehicle screens) and other devices or components.
[0117] In an embodiment of the present invention, after obtaining the audio signal, the motor can be controlled to emit sound to replace the audio signal originally played in the car, or the motor can be controlled to emit sound that matches the audio signal while the audio signal is played through the in-car multimedia in the car, that is, the in-car multimedia plays the audio signal plus the sound emitted by the motor, thereby providing users with a diversified car sound playback experience.
[0118] It should be noted that the sound playback of a car is usually limited to the interior of the car, that is, an audio device is set up in the car compartment, and the audio signal is played through the audio device. However, in some scenarios, users need to transmit information to the outside of the car, and need to configure an audio device facing the outside of the car. However, configuring an audio device facing the outside of the car increases the cost of the car and is not very practical. The embodiment of the present invention expands the function of the motor in the car through the sound of the motor, so that information (such as the sound of the user's speech, the sound of karaoke, and the sound of the movie, etc.) can be transmitted to the outside of the car through the motor, and there is no need to set up an additional audio device facing the outside of the car, thereby reducing the cost of the car. Of course, as mentioned above, the embodiment of the present invention can also control the sound of the motor to eliminate the noise of the motor. In this way, whether the audio signal is played through the audio device in the car or the motor emits a sound that matches the audio signal, the motor will not make noise, thereby improving the user experience and satisfaction.
[0119] In one embodiment of the present invention, controlling the motor to make sound according to the control signal PWM duty cycle includes:
[0120] Convert the control signal PWM duty cycle of the synchronous rotating coordinate system into the control signal PWM duty cycle of the stationary coordinate system;
[0121] The control signal PWM duty cycle of the stationary coordinate system is modulated using a space vector pulse width modulation algorithm to obtain the duty cycle of each phase bridge arm of the motor;
[0122] The sound generation of the motor is controlled by the duty ratio of each phase bridge arm.
[0123] Specifically, Space Vector Pulse Width Modulation (SVPWM) is an advanced PWM (Pulse Width Modulation) technology for motor control. The SVPWM algorithm achieves precise control of the motor speed by modulating the three-phase voltage of the motor. Specifically, the SVPWM algorithm can calculate the duty cycle of each phase of the motor bridge arm, and control the sound of each phase of the motor through the duty cycle of each phase of the bridge arm.
[0124] In an embodiment of the present invention, in order to realize the control of the motor, it is necessary to convert the control signal PWM duty cycle of the synchronous rotating coordinate system into the control signal PWM duty cycle of the stationary coordinate system, and then modulate the control signal PWM duty cycle of the stationary coordinate system using the SVPWM algorithm to obtain the duty cycle of each phase bridge arm of the motor. Finally, the sound of the motor can be controlled by the duty cycle of each phase bridge arm.
[0125] In order to enable those skilled in the art to better understand the embodiments of the present invention, a specific example is used below to illustrate the implementation method of the motor sound of a car. Figure 6 , is a schematic diagram of a coordinate transformation provided in an embodiment of the present invention. The coordinate transformations involved in the control of the motor are:
[0126] Clark transformation: stationary coordinate transformation, transforming the three-phase stationary coordinate system A, B, C into the two-phase stationary coordinate system α, β. PARK transformation: synchronous rotating coordinate transformation, transforming the two-phase stationary coordinate system α, β into the synchronous rotating coordinate system d, q.
[0127] Inverse Clark transform: the inverse transform of Clark transform, α, β to A, B, C.
[0128] Inverse PARK transform: the inverse transform of PARK transform, d, q to α, β.
[0129] Reference Figure 7 , is a schematic diagram of a flow chart of a motor sound of a vehicle provided in an embodiment of the present invention, and the specific implementation steps are as follows:
[0130] Step S301: The motor state acquisition unit acquires motor feedback data to calculate motor data; the motor data may include current, speed, electrical angle signal and other data.
[0131] Step S302: Obtain the quadrature-axis current and direct-axis current (second electrical signal) driven by the motor. Specifically, the quadrature-axis current and direct-axis current given in the original driving state can be obtained according to the motor data such as the motor speed, by using a table lookup, a combination of table lookup and interpolation, and a piecewise linear fitting method. The quadrature-axis current and direct-axis current of the feedback in the synchronous rotating coordinate system based on the orientation of the motor rotor magnetic field are obtained according to the motor data collected by the motor state acquisition unit from the motor feedback. In order to facilitate the control of the three-phase alternating variables of the A-phase axis, the B-phase axis, and the C-phase axis of the motor, they are usually converted to the alternating variables of the α-axis and β-axis in the stationary coordinate system, and then the α-axis and β-axis alternating variables are converted to the DC quantities d-axis and q-axis of the synchronous rotating coordinate system, and the control of the three-phase alternating variables of the A-phase axis, the B-phase axis, and the C-phase axis is achieved by controlling the DC quantities d-axis and q-axis. Usually, the transformation between different coordinate systems is achieved through coordinate transformation. The Clark transformation is used to transform the three-phase stationary coordinate system into the two-phase stationary coordinate system, and vice versa, which is the inverse Clark transformation. The Park transformation is used to transform the two-phase stationary coordinate system into the synchronous rotating coordinate system, and vice versa, which is the inverse Park transformation.
[0132] Step S303: the main controller of the automobile demodulates the audio signal to obtain the frequency and amplitude corresponding to the audio signal.
[0133] Step S304: Obtain the corresponding target AC current instruction according to the frequency and amplitude.
[0134] Step S305: Obtaining the quadrature-axis current and the direct-axis current (first electrical signal) in a synchronous rotating coordinate system based on the orientation of the motor rotor magnetic field according to the target AC current command.
[0135] Steps S306 and S307: the hybrid processing unit coordinately controls the target quadrature-axis current and direct-axis current with the quadrature-axis current and direct-axis current originally in the driving state.
[0136] Step S308: Calculate the PWM duty cycle (third electrical signal) of each phase control signal of the motor, and obtain the PWM duty cycle of each phase, so that the motor emits relevant voice prompts. For example, the voice prompts can be "Karaoke in the car is turned on", "Karaoke outside the car is turned on", etc. This step performs closed-loop control on the current on the dq axis according to the vector control method of the motor. For the direct-axis current id* and the quadrature-axis current iq* obtained in step S302, the direct-axis current id and the quadrature-axis current iq obtained by motor feedback are respectively subtracted, and the output Ud target value and Uq target value are controlled by PID (Proportional-Integral-Derivative controller). Ud and Uq are obtained by inverse Park transformation to obtain Uα and Uβ, and Uα and Uβ are modulated by SVPWM to obtain the duty cycle of each phase bridge arm, which is given to the drive module S309; the motor is controlled to make sounds.
[0137] Reference Figure 8 , is a structural diagram of an electric drive control system of a motor provided in an embodiment of the present invention. Specifically, the three-phase inverter of the electric drive control system 802 of the motor 801 includes six power switch units, each of which includes a power switch and a freewheeling diode. The first power switch unit includes an upper bridge arm VT1 and a freewheeling diode VD1, the second power switch unit includes a lower bridge arm VT2 and a freewheeling diode VD2, the third power switch unit includes an upper bridge arm VT3 and a freewheeling diode VD3, the fourth power switch unit includes a lower bridge arm VT4 and a freewheeling diode VD4, the fifth power switch unit includes an upper bridge arm VT5 and a freewheeling diode VD5, and the sixth power switch unit includes a lower bridge arm VT6 and a freewheeling diode VD6. The output end of the first power switch unit and the input end of the second power switch unit are connected to form the first phase of the three-phase inverter, controlling the A phase of the three-phase motor; the output end of the third power switch unit and the input end of the fourth power switch unit are connected to form the second phase of the three-phase inverter, controlling the B phase of the three-phase motor; the output end of the fifth power switch unit and the input end of the sixth power switch unit are connected to form the third phase of the three-phase inverter, controlling the C phase of the three-phase motor. Of course, the above motors are only used as examples and are not limited to the above motors in practical applications.
[0138] In one embodiment of the present invention, the in-vehicle multimedia includes an external screen, and after controlling the motor to make a sound according to the third electrical signal, the method further includes:
[0139] Displaying image information on the screen outside the vehicle; wherein the image information is an image adapted to the sound, a preset image and / or a random image.
[0140] Reference Fig. 9, is a flow chart for realizing the display of an external screen provided in an embodiment of the present invention. The image information displayed on the external screen may include expressions, texts, dynamic patterns, etc. These image information may be images adapted to the sound of the motor, or preset images, or random images. For example, the image information displayed on the external screen may select preset pattern information 901 and DIY (Do It Yourself, homemade) pattern information 902. Exemplarily, the user can enter the preset pattern interface through the preset pattern control key set by the PAD, select the pattern to be displayed, each pattern is equipped with related sound effects, the pattern and sound effect information flow is given to the PDC, the PDC controls the MCU output, and the sound effect is played out and the pattern display on the external screen is carried out simultaneously. The user enters the pattern design interface through the DIY pattern control key set by the PAD, and can configure the sound effect for the pattern at the same time. After the design is completed, the pattern and sound effect information flow is given to the PDC, the PDC controls the MCU output, and the sound effect is played out and the pattern display on the external screen is carried out simultaneously. For example, in some models of cars, the pixel screen of the grille can be used to display information, displaying image information such as expressions, music lyrics, scenery, and physical dynamic patterns.
[0141] In summary, the embodiment of the present invention provides a system and method for a whole-vehicle music external playback mode, which uses motor sound generation technology to play the audio signal corresponding to the movie video, the voice information collected by the wireless microphone, and the audio signal transmitted by the external mobile terminal. The motor realizes the singing and sound functions at the same time, and reduces and improves the motor noise. The embodiment of the present invention can realize two modes of watching movies and singing karaoke in the car and outside the car. In addition, the embodiment of the present invention also provides a method for displaying information on the screen outside the car, which realizes the playback of sound (including motor sound and sound emitted by the car's audio equipment) while increasing the display of the screen outside the car. The screen outside the car can display image information such as expressions, text, and dynamic patterns, which can enhance the car's viewing and competitiveness.
[0142] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0143] Reference Fig.10 , is a structural block diagram of a sound playing device provided in an embodiment of the present invention, such as Fig.10 As shown, the device is applied to a car controller and may specifically include the following modules:
[0144] A first electrical signal acquisition module 1001, configured to acquire a corresponding first electrical signal according to an audio signal;
[0145] A second electrical signal acquisition module 1002, used to determine a second electrical signal of the motor when the motor is in a working state according to the motor data;
[0146] A third electrical signal acquisition module 1003, configured to obtain a third electrical signal based on the first electrical signal and the second electrical signal;
[0147] The motor sound module 1004 is used to control the motor to make a sound according to the third electrical signal.
[0148] In an embodiment of the present invention, the third electrical signal is obtained by mixing the first electrical signal and the second electrical signal.
[0149] In one embodiment of the present invention, the motor sound module 1004 is used to:
[0150] Determine a control signal PWM duty cycle for a drive controller of the motor according to the third electrical signal;
[0151] The motor is controlled to generate sound according to the duty cycle of the control signal PWM.
[0152] In one embodiment of the present invention, the first electrical signal acquisition module 1001 is used to:
[0153] Demodulating the audio signal to obtain frequency and amplitude;
[0154] A corresponding first electrical signal is acquired according to the frequency and the amplitude.
[0155] In one embodiment of the present invention, the device further includes: an audio signal acquisition module, configured to:
[0156] Get the audio signal of the device communicating with the car.
[0157] In one embodiment of the present invention, the audio signal acquisition module is used to:
[0158] Acquiring voice information collected by a microphone communicating with the vehicle; or,
[0159] Acquiring audio information transmitted by an external mobile terminal in communication with the automobile;
[0160] The voice information and / or the audio information is used as an audio signal of the vehicle.
[0161] In one embodiment of the present invention, the second electrical signal acquisition module 1002 is used to:
[0162] A second electrical signal is determined based on the motor data in a targeted manner when the motor is in a driving state.
[0163] In one embodiment of the present invention, the target mode includes at least one of a table lookup mode, a table lookup and interpolation combination mode, and a piecewise linear fitting mode.
[0164] In one embodiment of the present invention, the third electrical signal acquisition module 1003 is used to:
[0165] Performing difference calculation on the first electrical signal and the second electrical signal to obtain a difference signal;
[0166] The difference signal is used as the third electrical signal.
[0167] In one embodiment of the present invention, controlling the motor to make sound according to the control signal PWM duty cycle includes:
[0168] When the audio signal is played through the in-vehicle multimedia of the car, the motor is controlled to produce sound.
[0169] In one embodiment of the present invention, the motor sound module 1004 is used to:
[0170] Convert the control signal PWM duty cycle of the synchronous rotating coordinate system into the control signal PWM duty cycle of the stationary coordinate system;
[0171] The control signal PWM duty ratio of the stationary coordinate system is modulated by a space vector pulse width modulation algorithm to obtain the control signal PWM duty ratio of each phase bridge arm of the motor;
[0172] The motor sound is controlled by the PWM duty cycle of the control signal of each phase bridge arm.
[0173] In one embodiment of the present invention, the device further comprises: an image information display module, configured to:
[0174] The image information is displayed on the screen outside the vehicle; wherein the image information is an image adapted to the sound of the motor, a preset image and / or a random image.
[0175] As for the above-mentioned device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0176] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0177] In another embodiment of the present invention, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the sound playing method described in any of the above embodiments.
[0178] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute any of the sound playing methods described in the above embodiments.
[0179] In another embodiment of the present invention, a vehicle is provided, wherein the vehicle implements any of the above-mentioned sound playing methods.
[0180] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0181] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0182] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0183] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A sound playing method, characterized in that: The method comprises: Acquire a corresponding first electrical signal according to the audio signal; Determine a second electrical signal when the motor is in a working state according to the motor data; A third electrical signal is obtained based on the first electrical signal and the second electrical signal; the third electrical signal is obtained by mixing the first electrical signal and the second electrical signal, specifically: a difference signal is obtained by performing a difference calculation on the first electrical signal and the second electrical signal; and the difference signal is used as the third electrical signal; controlling the motor to produce sound according to the third electrical signal; When taking photos inside or outside the car, or in karaoke mode, the outside car voice is turned on. The outside car voice is divided into preset voice and real-time voice. When taking photos inside or outside the car, the preset voice is used as an audio signal, and the motor sound is controlled according to the preset voice; in karaoke mode, the preset voice and the real-time voice are used as audio signals, and the motor sound is controlled according to the preset voice and the real-time voice.
2. The method according to claim 1, characterized in that The step of controlling the motor to make a sound according to the third electrical signal comprises: Determine a control signal PWM duty cycle for a drive controller of the motor according to the third electrical signal; The motor is controlled to generate sound according to the duty cycle of the control signal PWM.
3. The method according to claim 1, characterized in that The step of obtaining a corresponding first electrical signal according to the audio signal comprises: Demodulating the audio signal to obtain frequency and amplitude; A corresponding first electrical signal is acquired according to the frequency and the amplitude.
4. The method according to claim 3, characterized in that Before demodulating the audio signal to obtain the frequency and amplitude, the method further includes: Get the audio signal of the device communicating with the car.
5. The method according to claim 4, characterized in that The step of acquiring an audio signal of a device communicating with the car comprises: Acquiring voice information collected by a microphone communicating with the vehicle; or, Acquiring audio information transmitted by an external mobile terminal in communication with the automobile; The voice information and / or the audio information is used as an audio signal of the vehicle.
6. The method according to claim 1, characterized in that The second electrical signal for determining that the motor is in a working state according to the motor data comprises: A second electrical signal is determined based on the motor data in a targeted manner when the motor is in a driving state.
7. The method according to claim 6, characterized in that The target method includes at least one of a table lookup method, a table lookup and interpolation combination method, and a piecewise linear fitting method.
8. The method according to claim 2, characterized in that: The step of controlling the motor to make sound according to the control signal PWM duty cycle comprises: When the audio signal is played through the in-vehicle multimedia of the car, the motor is controlled to produce sound.
9. The method according to claim 2, characterized in that: The step of controlling the motor to make sound according to the control signal PWM duty cycle comprises: Convert the control signal PWM duty cycle of the synchronous rotating coordinate system into the control signal PWM duty cycle of the stationary coordinate system; The control signal PWM duty ratio of the stationary coordinate system is modulated by a space vector pulse width modulation algorithm to obtain the control signal PWM duty ratio of each phase bridge arm of the motor; The motor sound is controlled by the PWM duty cycle of the control signal of each phase bridge arm.
10. The method according to claim 8, characterized in that The in-vehicle multimedia includes an external screen. After controlling the motor to make a sound according to the third electrical signal, the method further includes: The image information is displayed on the screen outside the vehicle; wherein the image information is an image adapted to the sound of the motor, a preset image and / or a random image.
11. A sound playing device, characterized in that: The device comprises: A first electrical signal acquisition module, used to acquire a corresponding first electrical signal according to the audio signal; A second electrical signal acquisition module, used to determine a second electrical signal when the motor is in a working state according to the motor data; A third electrical signal acquisition module is used to obtain a third electrical signal based on the first electrical signal and the second electrical signal; the third electrical signal is obtained by mixing the first electrical signal and the second electrical signal, specifically: performing a difference calculation on the first electrical signal and the second electrical signal to obtain a difference signal; and using the difference signal as the third electrical signal; The motor sound module is used to control the motor sound according to the third electrical signal; when taking photos inside or outside the car, or in karaoke mode, the outside car voice is turned on, and the outside car voice is divided into preset voice and real-time voice. When taking photos inside or outside the car, the preset voice is used as an audio signal, and the motor sound is controlled according to the preset voice; in karaoke mode, the preset voice and the real-time voice are used as audio signals, and the motor sound is controlled according to the preset voice and the real-time voice.
12. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 10 when executing a program stored in a memory.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
14. A vehicle, characterized in that: The vehicle comprises an apparatus as claimed in claim 11.
Citation Information
Patent Citations
Active sound generation apparatus using motor
CN112350639A
Sound production method and device of automobile motor, storage medium and automobile motor
CN115158032A