A method, device, medium and vehicle for determining the output frequency of a pulse width modulation channel
By determining the frequency adjustment range for the PWM channels in the vehicle controller and using a random number generation algorithm, the problem of electromagnetic interference superposition when multiple PWM channels work together is solved, the randomized distribution of frequency is achieved, the peak value of electromagnetic interference is reduced, and the system stability is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAOMI EV TECH CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-02
AI Technical Summary
In the existing technology, when multiple PWM channels work together in the vehicle controller, the problem of electromagnetic interference superposition cannot be effectively solved. The fixed frequency adjustment method cannot achieve randomized frequency distribution, resulting in concentrated interference energy and affecting the normal operation of the vehicle electronic equipment.
By determining a reasonable frequency adjustment range for each PWM channel and combining it with a preset random number generation algorithm, such as the XOR shift algorithm and the Mason slew algorithm, the target output frequency is dynamically allocated, so that the frequency of each PWM channel is randomly distributed, breaking the fixed and periodic correlation of the frequency and dispersing the interference energy.
It effectively reduces local electromagnetic interference peaks, avoids electromagnetic interference to vehicle electronic equipment, and improves system stability and anti-interference capability.
Smart Images

Figure CN122137256A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of vehicle technology, and in particular to a method, apparatus, medium, and vehicle for determining the output frequency of a pulse width modulation channel. Background Technology
[0002] In automotive controllers that employ real-time operating systems, a large number of pulse width modulation (PWM) channels are required to meet the needs of multi-device collaborative control.
[0003] To reduce electromagnetic interference from each PWM channel to vehicle electronic equipment, existing technologies set a fixed frequency adjustment range for some PWM channels. However, this approach may create a new set of interference frequencies and cannot solve the problem of electromagnetic interference superposition when multiple PWM channels work together. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this application discloses a method, apparatus, medium, and vehicle for determining the output frequency of a pulse width modulation channel.
[0005] According to a first aspect of the present disclosure, a method for determining the output frequency of a pulse width modulation channel is provided, comprising:
[0006] Obtain the initial output frequency of each pulse width modulation channel, and determine the frequency adjustment range of each pulse width modulation channel based on the initial output frequency;
[0007] Based on a preset random number generation algorithm, the target output frequency of each pulse width modulation channel is determined, and the target output frequency is within the frequency adjustment range.
[0008] Optionally, determining the frequency adjustment range of each pulse width modulation channel based on the initial output frequency includes:
[0009] Based on the initial output frequency, a lower limit and an upper limit for frequency adjustment are determined according to a preset frequency adjustment ratio, and the frequency adjustment range is determined based on the lower limit and the upper limit for frequency adjustment.
[0010] Optionally, it also includes:
[0011] Collect electromagnetic interference spectrum data corresponding to each pulse width modulation channel when it outputs at the target output frequency;
[0012] The electromagnetic interference spectrum data is analyzed to extract the frequency location and intensity information of the current electromagnetic interference peak.
[0013] Based on the frequency location and the intensity information, the parameters of the preset random number generation algorithm are adjusted.
[0014] Optionally, the preset random number generation algorithm is an XOR shift algorithm; adjusting the parameters of the preset random number generation algorithm based on the frequency position and the intensity information includes:
[0015] The extracted electromagnetic interference peak features are determined based on the frequency location and the intensity information; wherein, the electromagnetic interference peak features include the peak frequency corresponding to the frequency location and the peak intensity corresponding to the intensity information;
[0016] The extracted peak electromagnetic interference features are queried in the target association model to determine the target displacement parameter of the XOR shift algorithm that matches the extracted peak electromagnetic interference features; the target association model is an association model between the peak electromagnetic interference features and the displacement parameter of the XOR shift algorithm.
[0017] Update the displacement parameters currently used by the XOR shift algorithm to the target displacement parameters.
[0018] Optionally, it also includes:
[0019] The frequency adjustment range of each pulse width modulation channel is input into the interference prediction model trained to convergence in order to determine the combination of pulse width modulation channels that have a risk of cooperative interference.
[0020] Based on the preset random number generation algorithm, the output frequency of each pulse width modulation channel in the pulse width modulation channel combination with the risk of cooperative interference is re-determined.
[0021] Optionally, it also includes:
[0022] Collect interference data from multiple sets of different pulse width modulation channel combinations under different frequency configurations;
[0023] The interference data is labeled, with channel combinations that do not generate cooperative interference and their corresponding data labeled as positive samples, and channel combinations that generate cooperative interference and their corresponding data labeled as negative samples.
[0024] An initial algorithm model is constructed, and the labeled positive samples and negative samples are used as training data to input the initial algorithm model for iterative training until convergence, so as to obtain the interference prediction model that has been trained to convergence.
[0025] Optionally, the preset random number generation algorithm is an XOR shift algorithm; determining the target output frequency of each pulse width modulation channel based on the preset random number generation algorithm includes:
[0026] Obtain an initial random seed value, and use an XOR shift algorithm to perform a shift and XOR operation on the initial random seed value to generate the current random value;
[0027] Based on the current random value, determine the target output frequency of the current pulse width modulation channel within the frequency adjustment range;
[0028] The current random value is used as the initial random seed value for the next pulse width modulation channel to determine the target output frequency of the next pulse width modulation channel.
[0029] Optionally, the preset random number generation algorithm is the Mason rotation algorithm; the step of determining the target output frequency of each pulse width modulation channel based on the preset random number generation algorithm includes:
[0030] Initialize the random number generator for the Mason twitch algorithm, and generate a random number sequence using the random number generator;
[0031] The random number sequence is mapped to the frequency adjustment range of each pulse width modulation channel to determine the target output frequency of each pulse width modulation channel.
[0032] According to a second aspect of the present disclosure, an apparatus for determining the output frequency of a pulse width modulation channel is provided, comprising:
[0033] The frequency adjustment range determination module is used to obtain the initial output frequency of each pulse width modulation channel and determine the frequency adjustment range of each pulse width modulation channel based on the initial output frequency.
[0034] The output frequency determination module is used to determine the target output frequency of each of the pulse width modulation channels based on a preset random number generation algorithm, wherein the target output frequency is within the frequency adjustment range.
[0035] Optionally, it also includes:
[0036] The acquisition module is used to acquire electromagnetic interference spectrum data corresponding to each pulse width modulation channel when it outputs at the target output frequency;
[0037] The analysis module is used to analyze the electromagnetic interference spectrum data to extract the frequency location and intensity information of the current electromagnetic interference peak.
[0038] The adjustment module is used to adjust the parameters of the preset random number generation algorithm based on the frequency position and the intensity information.
[0039] Optionally, the adjustment module is specifically used for:
[0040] The extracted electromagnetic interference peak features are determined based on the frequency location and the intensity information; wherein, the electromagnetic interference peak features include the peak frequency corresponding to the frequency location and the peak intensity corresponding to the intensity information;
[0041] The extracted peak electromagnetic interference features are queried in the target association model to determine the target displacement parameter of the XOR shift algorithm that matches the extracted peak electromagnetic interference features; the target association model is an association model between the peak electromagnetic interference features and the displacement parameter of the XOR shift algorithm.
[0042] Update the displacement parameters currently used by the XOR shift algorithm to the target displacement parameters.
[0043] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, the storage medium storing a computer program or instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the steps of the method described in the first aspect.
[0044] According to a fourth aspect of the present disclosure, a vehicle is provided, comprising:
[0045] Processor; memory used to store processor-executable instructions;
[0046] The processor is configured to implement the steps of the method described in any of the first aspects.
[0047] This disclosure provides a method, apparatus, medium, and vehicle for determining the output frequency of a pulse width modulation (PWM) channel. The method determines a reasonable frequency adjustment range for each PWM channel and then uses a preset random number generation algorithm to allocate a target output frequency within that range, resulting in a randomized distribution of the PWM channel frequencies. This breaks the fixed and periodic correlation of the PWM channel frequencies, dispersing concentrated interference energy to multiple discrete points across a wide frequency band, reducing local electromagnetic interference peaks at the source, and effectively avoiding electromagnetic interference to vehicle-mounted electronic equipment.
[0048] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0049] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0050] Figure 1 This is a schematic diagram illustrating an application scenario of a method for determining the output frequency of a pulse width modulation channel according to some embodiments of this disclosure;
[0051] Figure 2 This is a flowchart illustrating a method for determining the output frequency of a pulse width modulation channel according to some embodiments of the present disclosure;
[0052] Figure 3 This is a flowchart illustrating another method for determining the output frequency of a pulse width modulation channel according to some embodiments of the present disclosure;
[0053] Figure 4 This is a schematic diagram of a device for determining the output frequency of a pulse width modulation channel, according to some embodiments of the present disclosure;
[0054] Figure 5 This is a functional block diagram of a vehicle illustrating an exemplary embodiment. Detailed Implementation
[0055] Some embodiments of this disclosure will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. Various changes, modifications, and equivalents of the methods, apparatus, and / or systems described herein will become apparent upon understanding this disclosure. For example, the order of operations described herein is merely illustrative and is not limited to those orders set forth herein, but can be changed as will become apparent upon understanding this disclosure, except for operations that must be performed in a particular order. Furthermore, for clarity and brevity, descriptions of features known in the art may be omitted.
[0056] The embodiments described in the following examples of this disclosure are not representative of all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0057] In vehicle electronic control systems, PWM channels are key components for realizing functions such as motor drive, lighting control, and sensor signal output. Especially in automotive zone control units (ZCUs) using real-time operating systems (such as NuttX), it is often necessary to configure more than twenty PWM channels to meet the needs of multi-device collaborative control. To ensure the control accuracy and response speed of the PWM signals, each PWM channel needs to operate based on a preset output frequency. However, in practical applications, as the number of PWM channels increases and the operating frequency rises, the existing fixed-frequency output mode, when multiple PWM channels output at a fixed initial frequency, will cause the interference energy of each PWM channel to concentrate at a specific frequency point (such as the initial frequency and its harmonic frequencies). This leads to a significant increase in local EMI (Electromagnetic Interference) peaks, which may interfere with the normal operation of electronic devices such as vehicle radar, navigation, and communication systems.
[0058] To reduce the impact of electromagnetic interference on electronic devices, existing technologies set fixed frequency adjustment ranges for some PWM channels. However, the adjustment process often relies on manually preset frequency values or simple periodic frequency hopping, which cannot achieve randomized distribution of the frequency of each PWM channel. If the adjustment patterns of multiple PWM channels become similar, a new set of interference frequencies may be formed, which is still difficult to effectively disperse interference energy and cannot fundamentally solve the EMI superposition problem when multiple PWM channels work together.
[0059] Figure 1 This is a schematic diagram illustrating an application scenario corresponding to a method for determining the output frequency of a pulse width modulation channel, based on some embodiments of this disclosure. For example... Figure 1 As shown, specifically, this scenario includes a PWM channel frequency determination device 11 and a PWM channel set 12, which includes multiple PWM channels. The PWM channel frequency determination device 11 is communicatively connected to the multiple PWM channels.
[0060] Optionally, during operation, the PWM channel frequency determination device 11 sequentially acquires the initial output frequencies of multiple PWM channels in the PWM channel set 12, and determines the frequency adjustment range of each PWM channel based on the initial output frequencies. Then, according to a pre-set random number generation algorithm, the target output frequency of each PWM channel is determined, and the target output frequency is within the frequency adjustment range.
[0061] Optionally, the PWM channel frequency determination device 11 stores the target output frequency of each PWM channel so that the vehicle controller can recall the frequency parameters in real time during subsequent operation and control each PWM channel to operate according to the target output frequency. Optionally, the vehicle controller can read the target output frequency corresponding to each PWM channel from the storage unit and configure the corresponding hardware timer according to the target output frequency, so that the timer can generate PWM signals at an accurate frequency.
[0062] Figure 2 This is a flowchart illustrating a method for determining the output frequency of a pulse width modulation channel according to some embodiments of this disclosure, such as... Figure 2 As shown, a method for determining the output frequency of a pulse width modulation channel can be performed using a frequency determination device or equipment, and the method includes the following steps.
[0063] S201. Obtain the initial output frequency of each pulse width modulation channel, and determine the frequency adjustment range of each pulse width modulation channel based on the initial output frequency.
[0064] Optionally, the initial output frequency is a preset reference frequency based on the performance requirements of the controlled device (such as a motor, light, or sensor) corresponding to each PWM channel, and must meet the control device's requirements for control accuracy and response speed. For example, the initial frequency of the PWM channel driving the window lift motor is 1kHz to ensure smooth motor operation and a response delay controlled within 1ms; the initial frequency of the PWM channel controlling the daytime running lights is 200Hz to avoid visible flickering of the lights.
[0065] Specifically, after obtaining the initial output frequency of each PWM channel, a reasonable frequency adjustment range needs to be determined for each PWM channel based on the actual situation and anti-interference requirements.
[0066] Optionally, the frequency adjustment range is centered on the initial output frequency, fluctuating up or down by a certain percentage or a fixed value. For example, for a PWM channel with an initial output frequency of 1kHz, its frequency adjustment range can be set to 800Hz-1200Hz.
[0067] Optionally, the lower limit of the frequency adjustment range can be determined based on the performance limits of the controlled device, that is, the lower limit of the frequency adjustment range can be the lowest PWM frequency at which the controlled device can operate stably. For example, for a certain model of vehicle-mounted water pump motor, significant vibration will occur when the PWM frequency is below 500Hz. Therefore, the lower limit of the frequency adjustment range can be set to 500Hz.
[0068] Optionally, the upper limit of the frequency adjustment range can be determined by comprehensively considering the hardware performance of the vehicle controller (such as the clock frequency and frequency division accuracy of the PWM controller) and the limitations on high-frequency interference in electromagnetic compatibility (EMC) standards. For example, the PWM controller of the vehicle controller supports a maximum output frequency of 5kHz, and the frequency band below 5kHz will not overlap with the operating frequency band of the vehicle radar. Therefore, the upper limit of the frequency adjustment range can be set to 5kHz.
[0069] Optionally, the frequency adjustment range of each pulse width modulation channel is determined based on the initial output frequency, specifically including: determining the lower limit and upper limit of frequency adjustment according to the initial output frequency and a preset frequency adjustment ratio, and determining the frequency adjustment range based on the lower limit and upper limit of frequency adjustment.
[0070] Optionally, the initial output frequency of each PWM channel can be obtained through system configuration parameters, hardware settings, or default values. For example, in vehicle electronic systems, the initial output frequency of the PWM channel related to motor drive can be set according to the rated speed of the motor and design requirements; in industrial automation control, the initial output frequency of the PWM channel simulating sensor signals can be determined according to the sensor's sampling frequency and signal processing requirements.
[0071] The preset frequency adjustment ratio is a parameter that determines the frequency adjustment range. This ratio is pre-set based on factors such as system performance requirements and load characteristics. Optionally, the preset frequency adjustment ratio can be a fixed value or different values set according to the function and application scenario of different PWM channels. For example, for PWM channels with high frequency stability requirements, such as safety-critical signal control channels in vehicle electronic systems, the preset frequency adjustment ratio can be set relatively small, such as ±2%; while for PWM channels with larger frequency variation requirements, such as motor speed control channels, the preset frequency adjustment ratio can be set relatively large, such as ±10%. Once the lower and upper limits of frequency adjustment are determined, the frequency adjustment range can be determined.
[0072] S202. Based on a preset random number generation algorithm, determine the target output frequency of each pulse width modulation channel. The target output frequency is within the frequency adjustment range.
[0073] Optionally, after determining the frequency adjustment range of each PWM channel, a preset random number generation algorithm is used to generate a random number for each PWM channel.
[0074] The preset random number generation algorithm is a pre-set algorithm used to generate random numbers. It can be a common uniform distribution random number generation algorithm, a normal distribution random number generation algorithm, etc. The specific random number generation algorithm can be flexibly selected according to actual needs.
[0075] Specifically, the generated random numbers are used to determine the target output frequency of each PWM channel within the frequency adjustment range.
[0076] For example, for a PWM channel with a frequency adjustment range of 800Hz-1200Hz, if the generated random number is 0.3 (assuming the random number range is 0-1), then the target output frequency of the PWM channel can be calculated as: 800+(1200-800)×0.3=920Hz.
[0077] It should be noted that the target output frequency of each PWM channel is randomly determined within its frequency adjustment range, thus achieving a randomized distribution of the frequency of each PWM channel. This randomized distribution allows the interference energy of each PWM channel to be dispersed over a wider frequency range, avoiding the concentration of interference energy at a specific frequency point and effectively reducing local EMI peaks.
[0078] Optionally, considering the frequency adjustment accuracy of the PWM controller in the ZCU (typically in the 1Hz or 10Hz range), the calculated target output frequency is rounded to meet the frequency accuracy requirements supported by the hardware. For example, if the hardware only supports a 10Hz adjustment accuracy, the calculated 923Hz needs to be rounded to 920Hz.
[0079] Optionally, after determining the target output frequency of each PWM channel, the frequency determining device stores the target output frequency of each PWM channel. The storage method can be to store it in the vehicle's internal memory (such as EEPROM, Flash, etc.), so that the vehicle controller can call the target output frequency of each PWM channel in real time during subsequent operation.
[0080] Optionally, when calling the target output frequency, the vehicle controller will configure the corresponding frequency parameters into the hardware timers of each PWM channel according to different operating scenarios and requirements. For example, in a motor drive scenario, the vehicle controller adjusts the output frequency of the PWM channel according to the vehicle's speed and load, based on the stored target output frequency, thereby changing the motor's speed and torque to achieve vehicle power control.
[0081] Optionally, the frequency determining device or equipment may periodically execute steps S201-S202 according to a preset period. Optionally, the preset period may range from 1ms to 10ms.
[0082] This disclosure provides a method for determining the output frequency of a pulse width modulation (PWM) channel. By defining a reasonable frequency adjustment range for each PWM channel and then using a preset random number generation algorithm to allocate a target output frequency within the frequency adjustment range, the frequencies of each PWM channel are randomly distributed. This breaks the fixed and periodic correlation of the PWM channel frequencies, dispersing concentrated interference energy to multiple discrete points within a wide frequency band, reducing local electromagnetic interference peaks at the source, and effectively avoiding electromagnetic interference to automotive electronic equipment.
[0083] Figure 3 This is a flowchart illustrating another method for determining the output frequency of a pulse width modulation channel according to some embodiments of this disclosure, with reference to... Figure 3As shown, as an optional implementation, based on the above embodiments, the preset random number generation algorithm is the Xorshift algorithm; based on the preset random number generation algorithm, the target output frequency of each pulse width modulation channel is determined, including the following steps:
[0084] S301. Obtain the initial random seed value, and use the XOR shift algorithm to perform a shift and XOR operation on the initial random seed value to generate the current random value.
[0085] Among them, the XOR shift algorithm has the advantages of high computational efficiency and simple hardware implementation, making it more suitable for the real-time requirements of automotive electronic control systems. The basic principle of the XOR shift algorithm is to change the value of data by performing shift and XOR operations on the data, thereby producing a seemingly random result. Specifically, assuming the initial random seed value is a binary number, the XOR shift algorithm will first perform a left or right shift operation on this binary number by a certain number of bits, and then perform an XOR operation between the shifted result and the original data to obtain a new binary number, which is the current random value.
[0086] The initial random seed value can be selected from the output value of the hardware random number generator of ZCU or the clock counter value when the system starts up, to ensure the uniqueness and randomness of the seed value; then the initial random seed value is shifted and XORed using the XOR shift algorithm to generate the current random value.
[0087] S302. Based on the current random value, determine the target output frequency of the current pulse width modulation channel within the frequency adjustment range.
[0088] Optionally, after generating the current random value, the frequency determining device determines the target output frequency of the current pulse width modulation channel within a predetermined frequency adjustment range based on the current random value.
[0089] Optionally, based on the current random value, the target output frequency of the current pulse width modulation channel is determined within the frequency adjustment range by means of linear mapping or scaling.
[0090] S303. Use the current random value as the initial random seed value for the next pulse width modulation channel to determine the target output frequency of the next pulse width modulation channel.
[0091] Optionally, after determining the target output frequency of the current pulse width modulation channel, the current random value is used as the initial random seed value for the next pulse width modulation channel. This ensures that the target output frequencies of each PWM channel have a certain degree of randomness and independence, avoiding situations where multiple channels have the same target output frequency or exhibit obvious patterns, thus improving the system's stability and anti-interference capability.
[0092] Optionally, the frequency determination device stores the current random value in a register or memory unit. When it is necessary to determine the target output frequency of the next pulse width modulation channel, the current random value is read from the register or memory unit as a new initial random seed value. Then, the XOR shift algorithm is used again to perform a bitwise XOR operation to generate a new current random value. The target output frequency of the next pulse width modulation channel is then determined within the frequency adjustment range using the method described above. This process is repeated until the target output frequencies of all PWM channels are determined.
[0093] This disclosure provides a method for determining the output frequency of a pulse width modulation (PWM) channel. The target output frequency is determined by using an XOR shift algorithm. The XOR shift algorithm is simple, efficient, and has low computational overhead, and can quickly generate random values. The current random value is used as the seed value for the next channel, ensuring that the frequency allocation of each PWM channel is independent and has good randomness, effectively dispersing interference.
[0094] As an optional implementation, based on the above embodiments, the preset random number generation algorithm is the Mason rotation algorithm; based on the preset random number generation algorithm, the target output frequency of each pulse width modulation channel is determined, including the following steps:
[0095] First, initialize the random number generator for the Mason twitch algorithm and generate a random number sequence using the random number generator.
[0096] The Mason Strike algorithm is a pseudo-random number generation algorithm. The initialization process involves setting an initial state for the algorithm, typically based on a seed value. This seed value can be random data such as system time or a unique hardware identifier. For example, in a vehicle's electronic system, the timestamp of the vehicle's power-on moment can be used as the seed value. The seed value is input into the Mason Strike algorithm's initialization function, which performs a series of operations on the seed value according to specific mathematical rules, generating the algorithm's initial internal state array. This internal state array contains all the information needed for the algorithm to subsequently generate random numbers; its size and structure determine the algorithm's periodicity and the quality of its randomness.
[0097] Optionally, after initialization, the random number generator generates a random number sequence. The Mason twitch algorithm extracts and generates random numbers from the internal state array through a series of bit operations and state transitions. After each random number is generated, the internal state array is updated according to a predetermined rule to prepare for the next random number generation. The generated random numbers have a uniform distribution characteristic, meaning that within a given numerical range, the probability of each value appearing is approximately equal. For example, to generate a 32-bit random number, the algorithm extracts the corresponding bit information from the internal state array, performs a series of XOR and shift operations, and obtains a 32-bit random value. By repeatedly performing this process, random number sequences of arbitrary length can be generated.
[0098] Secondly, the random number sequence is mapped to the frequency adjustment range of each pulse width modulation channel to determine the target output frequency of each pulse width modulation channel.
[0099] Optionally, the generated random number sequence is mapped one by one to the frequency adjustment range of each PWM channel to determine the target output frequency of each PWM channel.
[0100] Optionally, before mapping, the random numbers need to be normalized to the [0,1] interval to ensure that the mapped random values are within the input range required for linear mapping. Then, the normalized random values are converted into the target output frequency of the corresponding PWM channel using the linear mapping formula. By adopting this method, the matching of random number sequences with PWM channels can be assigned sequentially according to the channel number, eliminating the need to initialize a generator separately for each PWM channel. This simplifies the program logic and ensures the independence of random numbers for each PWM channel.
[0101] The present disclosure provides a method for determining the output frequency of a pulse width modulation channel. By using the Mason rotation algorithm to determine the target output frequency, it can utilize its ultra-long period (such as 2^19937-1) and uniform distribution characteristics to generate a high-quality pseudo-random sequence, ensuring the randomness of the frequency allocation of multiple PWM channels and the uniform dispersion of interference energy.
[0102] As an optional implementation, based on the above embodiments, the method further includes the following steps:
[0103] First, collect the electromagnetic interference spectrum data corresponding to each pulse width modulation channel when it outputs at the target output frequency.
[0104] Optionally, when the PWM channel outputs at the target output frequency, electromagnetic interference (EMI) test equipment (such as a spectrum analyzer or interference coupling sensor) is used to collect the corresponding EMI spectrum data. Optionally, the EMI test equipment is connected to the output terminal of the PWM channel or its surrounding space to accurately obtain EMI information generated by the PWM signal.
[0105] Optionally, the data collected by the electromagnetic interference testing equipment should include the intensity values of electromagnetic interference at different frequency points, typically expressed in decibels. The data acquisition process can be performed after the PWM channel has been stably outputting the target frequency for a period of time to ensure the accuracy and stability of the data.
[0106] Next, the electromagnetic interference spectrum data is analyzed to extract the frequency location and intensity information of the current electromagnetic interference peak.
[0107] Among them, the electromagnetic interference spectrum data reflects the interference intensity generated by the PWM signal at different frequency points, while the frequency position and intensity information of the electromagnetic interference peak represent the area where the interference is most concentrated.
[0108] Optionally, environmental noise interference can be removed first using Gaussian filtering, and then data analysis algorithms (such as peak detection algorithms) can be used to extract the frequency location and intensity information of the current electromagnetic interference peak. Peak detection algorithms can compare the electromagnetic interference intensity values at different frequency points to find the frequency point with the highest intensity as the peak frequency location, and record the intensity value at that frequency point. For example, a sliding window algorithm can be used to slide across the spectrum data, calculating the maximum value of the data within the window and its corresponding frequency location.
[0109] Finally, based on frequency location and intensity information, the parameters of the preset random number generation algorithm are adjusted.
[0110] The parameters of the preset random number generation algorithm may include the range of random numbers, distribution type (such as uniform distribution, normal distribution, etc.), and interval of random number generation. The adjustment strategy for the parameters of the preset random number generation algorithm can be formulated according to actual needs.
[0111] Optionally, the range of random numbers can be adjusted according to the peak frequency location, the distribution type of random numbers can be adjusted according to the peak intensity, or the random number generation interval can be adjusted based on a combination of the peak frequency location and intensity.
[0112] For example, if the peak frequency deviates significantly from the target output frequency, the range of random numbers can be increased, allowing the frequency or duty cycle of the PWM signal to vary randomly over a wider range, thus more effectively dispersing electromagnetic interference energy. If the peak intensity is large, indicating severe electromagnetic interference, a more uniform random number distribution can be used to make the PWM signal changes more randomly, avoiding excessive electromagnetic interference at certain specific frequency points. For example, the distribution can be changed from uniform to normal, with appropriate adjustments to the normal distribution parameters, making the random numbers more concentrated near the target frequency while still maintaining a degree of randomness. If both the peak frequency location and intensity are large, the interval for generating random numbers can be appropriately reduced, causing the frequency or duty cycle of the PWM signal to change more frequently, thus dispersing electromagnetic interference energy more quickly. For example, the random number generation interval can be adjusted from 10ms to 5ms.
[0113] This disclosure provides a method for determining the output frequency of a pulse width modulation channel. By acquiring electromagnetic interference spectrum data in real time and analyzing peak characteristics, the frequency location and intensity information of the interference concentration can be identified, and then a targeted random number generation algorithm can be preset.
[0114] As an optional implementation, based on the above embodiments, the preset random number generation algorithm is an XOR shift algorithm. Adjusting the parameters of the preset random number generation algorithm based on frequency position and intensity information includes the following steps:
[0115] First, the peak characteristics of the electromagnetic interference extracted are determined based on the frequency location and intensity information; wherein, the peak characteristics of the electromagnetic interference include the peak frequency corresponding to the frequency location and the peak intensity corresponding to the intensity information.
[0116] Among them, the peak characteristics of electromagnetic interference are structured data, including at least the peak frequency (i.e. the frequency point with the highest interference intensity) and the peak intensity (the interference amplitude corresponding to the frequency point with the highest interference intensity).
[0117] Optionally, the extracted electromagnetic interference peak features can be normalized (e.g., the frequency can be mapped to the [0,1] interval, and the intensity can be converted to a relative value) to eliminate the influence of dimensions.
[0118] Secondly, the extracted electromagnetic interference peak features are queried in the target association model to determine the target displacement parameters of the XOR shift algorithm that match the extracted electromagnetic interference peak features; the target association model is the association model between the electromagnetic interference peak features and the displacement parameters of the XOR shift algorithm.
[0119] Optionally, the target association model is pre-trained using a large amount of electromagnetic interference test data to establish a mapping relationship between the peak characteristics of electromagnetic interference and the displacement parameters of the XOR shift algorithm. For example, when a certain peak characteristic of electromagnetic interference is output to the target association model, the target association model outputs: adjust the number of shifts in the XOR shift algorithm (e.g., adjust the basic shift combination of 13 bits, 17 bits, and 5 bits to a new combination of 15 bits, 19 bits, and 7 bits), so that the distribution characteristics of the generated random number sequence change, guiding the subsequent target output frequency away from the concentrated interference frequency band.
[0120] Optionally, the target association model may employ machine learning algorithms (such as support vector machine (SVM), random forest (RF), neural network (NN), etc.) or rule-based expert systems.
[0121] Finally, the displacement parameters currently used by the XOR shift algorithm are updated to the target displacement parameters.
[0122] Optionally, the displacement parameters currently used by the XOR shift algorithm can be directly updated to the queried target displacement parameters to complete the dynamic adjustment of the algorithm parameters.
[0123] Optionally, the internal state of the XOR shift algorithm (such as random seed, register value, etc.) is reinitialized according to the target displacement parameters. During system operation, electromagnetic interference data is continuously collected and the above steps are executed cyclically to achieve dynamic adaptive adjustment of the displacement parameters of the XOR shift algorithm.
[0124] This disclosure provides a method for determining the output frequency of a pulse width modulation (PWM) channel. By extracting the peak characteristics of electromagnetic interference (EMI) composed of peak frequency and peak intensity, it provides a clear and reliable basis for adjusting the parameters of the XOR shift algorithm. Through a pre-constructed target correlation model, the peak characteristics of EMI can be directly and quickly matched with the target displacement parameters of the XOR shift algorithm without complex calculations or derivations. By updating the displacement parameters of the XOR shift algorithm to the matching target parameters, the distribution characteristics of the random number sequence generated by the XOR shift algorithm can be changed, thereby guiding the target output frequency of the subsequent PWM channel away from the concentrated interference frequency band and effectively avoiding the superposition of new interference energy.
[0125] As an optional implementation, based on the above embodiments, the method includes the following steps:
[0126] First, the frequency adjustment range of each pulse width modulation channel is input into the interference prediction model trained to convergence in order to identify the pulse width modulation channel combinations that have a risk of cooperative interference.
[0127] The interference prediction model is a machine learning model (such as gradient boosting trees or neural networks) trained on historical sample data of a large number of PWM channel frequency combinations and cooperative interference results. The role of the interference prediction model is to assess the risk of cooperative interference caused by frequency combinations of different channels. Cooperative interference refers to the superposition of interference energy due to specific correlations between the frequencies of multiple channels, even though the frequencies are not concentrated (such as integer frequency ratios or harmonic overlap).
[0128] Optionally, in application, the frequency adjustment range of each pulse width modulation channel is input into the interference prediction model trained to convergence. The interference prediction model outputs the cooperative interference risk value (such as a probability value between 0 and 1) of each frequency combination, and identifies channel combinations whose risk value exceeds the risk threshold (such as 0.7).
[0129] Secondly, based on a preset random number generation algorithm, the output frequency of each pulse width modulation channel in the pulse width modulation channel combination with the risk of cooperative interference is re-determined.
[0130] Optionally, for high-risk channel combinations identified by the interference prediction model, the output frequency of each PWM channel is re-determined based on a preset random number generation algorithm.
[0131] This disclosure provides a method for determining the output frequency of a pulse width modulation (PWM) channel. By training a convergent interference prediction model, it identifies channel combinations with a risk of cooperative interference in advance based on the frequency adjustment range of each channel. By using a preset random number generation algorithm, it reconfigures the channel frequencies of these risky channel combinations, thereby changing the frequency distribution characteristics of the channel combinations. This ensures that the target output frequency of each PWM channel is far away from the correlated interference range, blocking the formation of cooperative interference at its source and effectively avoiding the electromagnetic interference superposition problem caused by multiple PWM channel frequency combinations.
[0132] As an optional implementation, based on the above embodiments, the method further includes the following steps:
[0133] First, interference data was collected from multiple sets of different pulse width modulation channel combinations under different frequency configurations.
[0134] Optionally, the data collection targets cover common channel combination types in vehicles (such as combinations between motor drive channels, mixed combinations of motor and lighting channels, etc.). Each PWM channel combination can be configured with at least 50 different frequency combinations (the frequency values are all within the frequency adjustment range of the corresponding PWM channel). The interference data includes parameters such as EMI spectrum, peak intensity, and peak frequency under each frequency configuration. The data collection environment can simulate the real vehicle electromagnetic environment (such as background interference including vehicle power supply noise, wireless signal interference, etc.).
[0135] Secondly, the interference data is labeled, with channel combinations that do not generate cooperative interference and their corresponding data labeled as positive samples, and channel combinations that generate cooperative interference and their corresponding data labeled as negative samples.
[0136] Optionally, when the peak interference intensity of a certain PWM channel combination exceeds 1.2 times the sum of the interference intensity of a single channel, it can be determined that cooperative interference has occurred, and the PWM channel combination and its corresponding data are marked as negative samples; when the peak interference intensity of a certain PWM channel combination is less than 1.0 times the sum of the interference intensity of a single channel, it is determined that no cooperative interference has occurred, and it is marked as a positive sample. The marking process can combine automated detection and manual verification to ensure the accuracy of the marking.
[0137] Finally, an initial algorithm model is constructed. The labeled positive and negative samples are used as training data to input the initial algorithm model for iterative training until convergence, so as to obtain a converged interference prediction model.
[0138] Alternatively, a gradient boosting tree or a lightweight neural network (such as 1D-CNN or LSTM) can be used as the initial algorithm model.
[0139] Optionally, the labeled positive and negative samples can be divided into training, validation, and test sets in a 7:2:1 ratio and input into the initial algorithm model for iterative training, with the validation set accuracy as the monitoring metric. Optionally, when the validation set accuracy fluctuates less than 0.5% over multiple consecutive iterations (e.g., 5 iterations), the initial algorithm model is considered to have converged.
[0140] This disclosure provides a method for determining the output frequency of a pulse width modulation (PWM) channel. By collecting interference data from multiple sets of different channel combinations under various frequency configurations, it provides comprehensive and realistic data source support for constructing an interference prediction model. Positive and negative samples are labeled using clear cooperative interference criteria, ensuring the training data has clear feature discrimination. By inputting labeled samples into the initial algorithm model and iteratively training it until convergence, the initial algorithm model can accurately uncover the implicit correlation between frequency combinations and cooperative interference. The resulting interference prediction model can efficiently identify channel combinations exhibiting cooperative interference, ensuring the accuracy and reliability of cooperative interference prediction.
[0141] Figure 4 This is a schematic diagram illustrating the structure of a device for determining the output frequency of a pulse width modulation channel according to some embodiments of this disclosure. (Reference) Figure 4 As shown in the figure, this disclosure provides a pulse width modulation channel output frequency determination device 40, including a frequency adjustment range determination module 41 and an output frequency determination module 42.
[0142] Specifically, the frequency adjustment range determination module 41 is used to obtain the initial output frequency of each pulse width modulation channel and determine the frequency adjustment range of each pulse width modulation channel based on the initial output frequency; the output frequency determination module 42 is used to determine the target output frequency of each pulse width modulation channel based on a preset random number generation algorithm, and the target output frequency is within the frequency adjustment range.
[0143] Optionally, the default random number generation algorithm is an XOR shift algorithm.
[0144] Optionally, the output frequency determination module 42, when determining the target output frequency of each pulse width modulation channel based on a preset random number generation algorithm, is specifically used to: obtain an initial random seed value; perform a shift and XOR operation on the initial random seed value using an XOR shift algorithm to generate a current random value; determine the target output frequency of the current pulse width modulation channel within the frequency adjustment range based on the current random value; and use the current random value as the initial random seed value of the next pulse width modulation channel to determine the target output frequency of the next pulse width modulation channel.
[0145] Optionally, the default random number generation algorithm is the Mason rotation algorithm.
[0146] Optionally, the output frequency determination module 42, when determining the target output frequency of each pulse width modulation channel based on a preset random number generation algorithm, is specifically used to: initialize the random number generator of the Mason rotation algorithm and generate a random number sequence through the random number generator; map the random number sequence to the frequency adjustment range of each pulse width modulation channel to determine the target output frequency of each pulse width modulation channel.
[0147] Optionally, the frequency adjustment range determination module 41, when determining the frequency adjustment range of each pulse width modulation channel based on the initial output frequency, is specifically used to: determine the lower limit and upper limit of frequency adjustment according to the initial output frequency and a preset frequency adjustment ratio, and determine the frequency adjustment range based on the lower limit and upper limit of frequency adjustment.
[0148] Optionally, the device for determining the output frequency of a pulse width modulation channel provided in this disclosure further includes: an acquisition module, an analysis module, and an adjustment module.
[0149] Optionally, the acquisition module is used to acquire the electromagnetic interference spectrum data corresponding to each pulse width modulation channel when it outputs at the target output frequency; the analysis module is used to analyze the electromagnetic interference spectrum data to extract the frequency position and intensity information of the current electromagnetic interference peak; and the adjustment module is used to adjust the parameters of the preset random number generation algorithm based on the frequency position and intensity information.
[0150] Optionally, the preset random number generation algorithm is an XOR shift algorithm. The adjustment module, when adjusting the parameters of the preset random number generation algorithm based on frequency location and intensity information, specifically performs the following: determining the currently extracted electromagnetic interference peak feature based on the frequency location and intensity information; wherein, the electromagnetic interference peak feature includes the peak frequency corresponding to the frequency location and the peak intensity corresponding to the intensity information; querying the currently extracted electromagnetic interference peak feature in the target association model to determine the target displacement parameter of the XOR shift algorithm that matches the currently extracted electromagnetic interference peak feature; the target association model is an association model between the electromagnetic interference peak feature and the displacement parameter of the XOR shift algorithm; updating the displacement parameter currently used by the XOR shift algorithm to the target displacement parameter.
[0151] Optionally, the apparatus for determining the output frequency of a pulse width modulation channel provided in this disclosure further includes an interference prediction module.
[0152] Optionally, the interference prediction module is used to input the frequency adjustment range of each pulse width modulation channel into the interference prediction model trained to convergence, so as to determine the pulse width modulation channel combination with cooperative interference risk; and to redetermine the output frequency of each pulse width modulation channel in the pulse width modulation channel combination with cooperative interference risk based on a preset random number generation algorithm.
[0153] Optionally, the interference prediction module is also used to collect interference data of multiple sets of different pulse width modulation channel combinations under different frequency configurations; to label the interference data, labeling channel combinations that do not generate cooperative interference and their corresponding data as positive samples, and labeling channel combinations that generate cooperative interference and their corresponding data as negative samples; to construct an initial algorithm model, and to input the labeled positive and negative samples as training data into the initial algorithm model for iterative training until convergence, so as to obtain an interference prediction model that has been trained to convergence.
[0154] Regarding the pulse width modulation channel output frequency determination device in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the pulse width modulation channel output frequency determination method, and will not be elaborated here.
[0155] Figure 5 This is a functional block diagram illustrating a vehicle according to an exemplary embodiment. For example, vehicle 600 can be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicles.
[0156] Reference Figure 5 The vehicle 600 may include various subsystems, such as an infotainment system 610, a perception system 620, a decision control system 630, a drive system 640, and a computing platform 650. The vehicle 600 may also include more or fewer subsystems, and each subsystem may include multiple components. Furthermore, each subsystem and each component of the vehicle 600 can be interconnected via wired or wireless means.
[0157] In some embodiments, the infotainment system 610 may include a communication system, an entertainment system, and a navigation system, etc.
[0158] The perception system 620 may include several sensors for sensing information about the environment surrounding the vehicle 600. For example, the perception system 620 may include a global positioning system (which may be GPS, BeiDou, or other positioning systems), an inertial measurement unit (IMU), lidar, millimeter-wave radar, ultrasonic radar, and a camera device.
[0159] The decision control system 630 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.
[0160] The drive system 640 may include components that provide powered motion to the vehicle 600. In one embodiment, the drive system 640 may include an engine, an energy source, a transmission system, and wheels. The engine may be one or a combination of internal combustion engines, electric motors, and compressed air engines. The engine is capable of converting energy provided by the energy source into mechanical energy.
[0161] Some or all of the functions of vehicle 600 are controlled by computing platform 650. Computing platform 650 may include at least one processor 651 and memory 652, processor 651 can execute instructions 653 stored in memory 652.
[0162] Processor 651 can be any conventional processor, such as a commercially available CPU. Processors may also include graphics processing units (GPUs), field-programmable gate arrays (FPGAs), systems-on-chips (SoCs), application-specific integrated circuits (ASICs), or combinations thereof.
[0163] The memory 652 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0164] In addition to instruction 653, memory 652 can also store data, such as road maps, route information, vehicle position, direction, speed, and other data. The data stored in memory 652 can be used by computing platform 650.
[0165] In this embodiment of the disclosure, processor 651 may execute instruction 653 to complete all or part of the steps of the method for determining the output frequency of a pulse width modulation channel described above.
[0166] In some embodiments of this disclosure, a computer-readable storage medium including instructions is also provided, such as a memory including instructions that can be executed by a processor of a device to perform the methods described above. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0167] Based on this understanding, the technical solution disclosed herein can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) and includes several instructions.
[0168] This method is used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the various implementation scenarios of this disclosure.
[0169] Those skilled in the art will also understand that the various illustrative logical blocks and steps listed in the embodiments of this application can be implemented by electronic hardware, computer software, or a combination of both. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the described functionality using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of this application.
[0170] Furthermore, the term “exemplary” is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “exemplary” is not necessarily to be construed as advantageous compared to other aspects or designs. Rather, the use of the term “exemplary” is intended to present the concept in a concrete manner. As used herein, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless otherwise specified or clear from the context, “X applies A or B” is intended to mean any of the natural inclusive arrangements. That is, “X applies A or B” satisfies any of the foregoing instances if X applies A; X applies B; or both X applies A and B. Additionally, unless otherwise specified or clear from the context to refer to the singular form, the articles “a” and “an” as used in this application and the appended claims are generally understood to mean “one or more.”
[0171] Similarly, although this disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art upon reading and understanding this specification and the accompanying drawings. This disclosure includes all such modifications and variations and is limited only by the scope of the claims. In particular, with respect to the various functions performed by the components described above (e.g., elements, resources, etc.), unless otherwise indicated, the terminology used to describe such components is intended to correspond to any component (functionally equivalent) that performs the specific function of the described component, even if structurally not equivalent to the disclosed structure. Furthermore, although specific features of this disclosure may have been disclosed with respect to only one of several implementations, such features may be combined with one or more other features of other implementations, as may be desired and advantageous to any given or particular application. Moreover, with regard to the terms “comprising,” “owning,” “having,” “having,” or variations thereof as used in the detailed description or claims, such terms are intended to be inclusive in a manner similar to the term “including.”
[0172] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0173] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
[0174] It should be understood that, unless otherwise specifically indicated, features of various embodiments of this disclosure described herein can be combined with each other. As used herein, the term “and / or” includes any one of the relevant listed items and any combination of any two or more; similarly, “at least one of…” includes any one of the relevant listed items and any combination of any two or more.
[0175] Although terms such as “first,” “second,” and “third” may be used herein to describe various components, parts, regions, layers, or sections, these components, parts, regions, layers, or sections are not limited to these terms. Rather, these terms are used only to distinguish one component, part, region, layer, or section from another. Therefore, without departing from the teachings of the examples described herein, the first component, part, region, layer, or section mentioned in the examples may also be referred to as the second component, part, region, layer, or section. Furthermore, the terms “first” and “second” are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as “first” or “second” may explicitly or implicitly include at least one of that feature. In the description herein, “a plurality” means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A method for determining the output frequency of a pulse width modulation channel, characterized in that, include: Obtain the initial output frequency of each pulse width modulation channel, and determine the frequency adjustment range of each pulse width modulation channel based on the initial output frequency; Based on a preset random number generation algorithm, the target output frequency of each pulse width modulation channel is determined, and the target output frequency is within the frequency adjustment range.
2. The method according to claim 1, characterized in that, Determining the frequency adjustment range of each pulse width modulation channel based on the initial output frequency includes: Based on the initial output frequency, a lower limit and an upper limit for frequency adjustment are determined according to a preset frequency adjustment ratio, and the frequency adjustment range is determined based on the lower limit and the upper limit for frequency adjustment.
3. The method according to any one of claims 1 or 2, characterized in that, Also includes: Collect electromagnetic interference spectrum data corresponding to each pulse width modulation channel when it outputs at the target output frequency; The electromagnetic interference spectrum data is analyzed to extract the frequency location and intensity information of the current electromagnetic interference peak. Based on the frequency location and the intensity information, the parameters of the preset random number generation algorithm are adjusted.
4. The method according to claim 3, characterized in that, The preset random number generation algorithm is an XOR shift algorithm; The step of adjusting the parameters of the preset random number generation algorithm based on the frequency position and the intensity information includes: The extracted electromagnetic interference peak features are determined based on the frequency location and the intensity information; wherein, the electromagnetic interference peak features include the peak frequency corresponding to the frequency location and the peak intensity corresponding to the intensity information; The extracted peak electromagnetic interference features are queried in the target association model to determine the target displacement parameter of the XOR shift algorithm that matches the extracted peak electromagnetic interference features; the target association model is an association model between the peak electromagnetic interference features and the displacement parameter of the XOR shift algorithm. Update the displacement parameters currently used by the XOR shift algorithm to the target displacement parameters.
5. The method according to any one of claims 1 or 2, characterized in that, Also includes: The frequency adjustment range of each pulse width modulation channel is input into the interference prediction model trained to convergence in order to determine the combination of pulse width modulation channels that have a risk of cooperative interference. Based on the preset random number generation algorithm, the output frequency of each pulse width modulation channel in the pulse width modulation channel combination with the risk of cooperative interference is re-determined.
6. The method according to claim 5, characterized in that, Also includes: Collect interference data from multiple sets of different pulse width modulation channel combinations under different frequency configurations; The interference data is labeled, with channel combinations that do not generate cooperative interference and their corresponding data labeled as positive samples, and channel combinations that generate cooperative interference and their corresponding data labeled as negative samples. An initial algorithm model is constructed, and the labeled positive samples and negative samples are used as training data to input the initial algorithm model for iterative training until convergence, so as to obtain the interference prediction model that has been trained to convergence.
7. The method according to claim 1, characterized in that, The preset random number generation algorithm is an XOR shift algorithm; The determination of the target output frequency for each pulse width modulation channel based on a preset random number generation algorithm includes: Obtain an initial random seed value, and use an XOR shift algorithm to perform a shift and XOR operation on the initial random seed value to generate the current random value; Based on the current random value, determine the target output frequency of the current pulse width modulation channel within the frequency adjustment range; The current random value is used as the initial random seed value for the next pulse width modulation channel to determine the target output frequency of the next pulse width modulation channel.
8. The method according to claim 1, characterized in that, The preset random number generation algorithm is the Mason rotation algorithm; The determination of the target output frequency for each pulse width modulation channel based on a preset random number generation algorithm includes: Initialize the random number generator for the Mason twitch algorithm, and generate a random number sequence using the random number generator; The random number sequence is mapped to the frequency adjustment range of each pulse width modulation channel to determine the target output frequency of each pulse width modulation channel.
9. A device for determining the output frequency of a pulse width modulation channel, characterized in that, include: The frequency adjustment range determination module is used to obtain the initial output frequency of each pulse width modulation channel and determine the frequency adjustment range of each pulse width modulation channel based on the initial output frequency. The output frequency determination module is used to determine the target output frequency of each of the pulse width modulation channels based on a preset random number generation algorithm, wherein the target output frequency is within the frequency adjustment range.
10. The apparatus according to claim 9, characterized in that, Also includes: The acquisition module is used to acquire electromagnetic interference spectrum data corresponding to each pulse width modulation channel when it outputs at the target output frequency; The analysis module is used to analyze the electromagnetic interference spectrum data to extract the frequency location and intensity information of the current electromagnetic interference peak. The adjustment module is used to adjust the parameters of the preset random number generation algorithm based on the frequency position and the intensity information.
11. The apparatus according to claim 10, characterized in that, The adjustment module is specifically used for: The extracted electromagnetic interference peak features are determined based on the frequency location and the intensity information; wherein, the electromagnetic interference peak features include the peak frequency corresponding to the frequency location and the peak intensity corresponding to the intensity information; The extracted peak electromagnetic interference features are queried in the target association model to determine the target displacement parameter of the XOR shift algorithm that matches the extracted peak electromagnetic interference features; the target association model is an association model between the peak electromagnetic interference features and the displacement parameter of the XOR shift algorithm. Update the displacement parameters currently used by the XOR shift algorithm to the target displacement parameters.
12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program or instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the steps of the method according to any one of claims 1-8.
13. A vehicle, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the steps of the method according to any one of claims 1-8.