Signal preprocessing method
By collecting the high-voltage side signal of the battery cluster and processing the fundamental frequency and square wave signals, the problem of inaccurate current and voltage control caused by changes in the high-frequency characteristics of IGBT is solved, the stability and reliability preprocessing of the signal is achieved, and the battery is ensured The charge and discharge efficiency and safety of the cluster.
Patent Information
- Application Number
- CN202410846119.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-29
Smart Images

Figure CN118858747A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of signal processing, and specifically relates to a signal preprocessing method. Background Art
[0002] Existing battery clusters are usually equipped with DC-DC (DC-DC converter) or directly use PCS (Power Conversion System). These electronic power devices are usually equipped with switching devices IGBT (Insulate-Gate Bipolar Transistor). The role of IGBT in the energy storage system is usually to accurately control the voltage and current to ensure high charging and discharging efficiency of the battery cluster and a smooth charging and discharging process, while protecting the battery from damage and extending the service life of the battery cluster.
[0003] However, the high-frequency characteristics of IGBT may change with the use time. This change may have a negative impact on the charging and discharging functions of the energy storage system, resulting in inaccurate current and voltage control of the battery cluster. Therefore, it is necessary to accurately monitor the high-speed transient faults on the high-voltage side of the battery cluster. In the prior art, the high-voltage side signal of the battery cluster is usually directly collected, and the high-voltage measurement signal is analyzed to determine whether the supply and discharge of the corresponding battery cluster is abnormal. The high-voltage side signal is usually an AC non-sinusoidal signal with sinusoidal components of different frequencies superimposed, which is prone to aliasing errors and spectrum leakage. The high-frequency characteristics of IGBT will also have a certain impact on the high-voltage side signal. Therefore, how to pre-process the collected high-voltage side signal of the battery cluster to make the collected high-voltage side signal more stable and reliable is an urgent problem to be solved. Summary of the invention
[0004] The present application provides a signal preprocessing method, which can preprocess the collected high-voltage side signal of a battery cluster to ensure the stability and reliability of the high-voltage side signal.
[0005] In order to solve the above technical problems, the present application provides a signal preprocessing method, which comprises the following steps:
[0006] Collecting a first signal, determining a sampling frequency based on a fundamental frequency and a single-cycle sampling point of the fundamental, and capturing a sampling value of the first signal according to the single-cycle sampling point of the fundamental and the sampling frequency;
[0007] Determine the frequency of the first signal based on the sampling value, and adjust the sampling frequency according to the frequency change of the first signal;
[0008] Converting the first signal into a square wave signal with the same phase, comparing a reference frequency and the frequency of the first signal to generate a difference signal, and determining the real-time frequency of the square wave signal according to the difference signal, so that the square wave signal has the same frequency as the first signal;
[0009] Introducing a three-phase square wave signal having the same phase as the fundamental wave, generating an intermediate square wave signal according to the three-phase square wave signal and a square wave signal having the same frequency and phase as the first signal, and performing frequency doubling processing on the intermediate square wave signal;
[0010] The intermediate square wave signal after the frequency doubling process is subjected to zero-crossing detection and secondary filtering and shaping to obtain a pre-processed first signal.
[0011] As a further improvement of the present application, the capturing of the sampling value of the first signal according to the fundamental wave single-cycle sampling point and the sampling frequency includes:
[0012] Filtering out frequency signals in the first signal that are higher than a first preset percentage sampling frequency by a bandpass filter;
[0013] An effective sampling point is determined according to the fundamental wave single-cycle sampling point, sampling values of the first signal after filtering are captured based on the effective sampling point and a preset sampling interval value, and mean square processing is performed on several of the sampling values to obtain effective sampling values of the first signal.
[0014] As a further improvement of the present application, determining the frequency of the first signal based on the sampling value, and adjusting the sampling frequency according to the frequency change of the first signal includes:
[0015] Based on Fourier transform, a plurality of the valid acquisition values are analyzed and processed to obtain spectrum information of the first signal, the frequency of the first signal is determined according to the spectrum information, and the sampling frequency is adjusted according to the frequency change of the first signal.
[0016] As a further improvement of the present application, the step of comparing the reference frequency and the frequency of the first signal to generate a difference signal includes:
[0017] Determine the reference frequency according to a pulse-per-second signal of a temperature-compensated crystal oscillator, a constant-temperature crystal oscillator or a satellite timing service;
[0018] The reference frequency and the frequency of the first signal are input into a phase detector, so that the phase detector compares the phases of the reference frequency and the frequency of the first signal and generates the difference signal.
[0019] As a further improvement of the present application, determining the real-time frequency of the square wave signal according to the value signal includes:
[0020] Passing the difference signal through a low-pass filter to generate a stable difference signal, applying the stable difference signal to a voltage-controlled oscillator to form an output frequency, until the output frequency is synchronized with the reference frequency;
[0021] Dividing the output frequency so that the output frequency after the frequency division is equal to the reference frequency;
[0022] The divided output frequency is multiplied to obtain the real-time frequency.
[0023] As a further improvement of the present application, the introducing of the three-phase square wave signal having the same phase as the fundamental wave, and generating the intermediate square wave signal according to the three-phase square wave signal and the square wave signal having the same frequency and phase as the first signal, comprises:
[0024] Introducing a three-phase square wave signal having the same phase as the fundamental wave through FPGA;
[0025] The three-phase square wave signal and a square wave signal having the same frequency and direction as the first signal are logically ORed to generate the intermediate square wave signal.
[0026] As a further improvement of the present application, the zero-crossing detection of the intermediate square wave signal after the frequency multiplication processing includes:
[0027] Determine whether the zero-crossing point of the intermediate square wave signal after the frequency doubling process is within a preset range within a preset time; if so, perform secondary filtering and shaping on the intermediate square wave signal;
[0028] If not, the preset sampling interval value is adjusted until the zero-crossing point of the intermediate square wave signal within the preset time is within the preset range.
[0029] As a further improvement of the present application, the secondary filtering and shaping of the intermediate square wave signal includes:
[0030] Preliminarily filtering out noise and interference frequencies in the intermediate square wave signal by means of a band-stop filter;
[0031] The noise and interference frequency in the intermediate square wave signal are further filtered out by a digital filter, and the amplitude and phase of the intermediate square wave signal are adjusted.
[0032] As a further improvement of the present application, after obtaining the preprocessed first signal, the method further includes:
[0033] The first signal after the secondary filtering and shaping is frequency-multiplied again, so that the frequency of the first signal after the frequency-multiplied processing matches the frequency of the collected first signal.
[0034] As a further improvement of the present application, the first preset percentage is 50%, and the attenuation value of the bandpass filter is less than 4.8 dB.
[0035] As a further improvement of the present application, the fundamental wave is a grid fundamental wave, and the fundamental wave frequency of the grid fundamental wave is 50 Hz or 60 Hz;
[0036] The single-cycle sampling points of the grid fundamental wave are 1024 sampling points, and the sampling frequency=fundamental wave frequency×single-cycle sampling points of the grid fundamental wave.
[0037] As a further improvement of the present application, the first signal is a high-voltage side signal of the power grid.
[0038] The signal preprocessing method provided in this application has the following beneficial effects:
[0039] The signal preprocessing method provided by the present application collects a first signal, determines a sampling frequency based on the fundamental frequency of the power grid and a single-cycle sampling point of the fundamental wave, determines a sampling value of the first signal based on the sampling frequency and the single-cycle point of the fundamental wave, performs a fast Fourier transform on the sampling value to analyze the frequency of the first signal, and further adjusts the sampling frequency according to the frequency change of the first signal to ensure that the acquisition frequency of the first signal can be adaptively adjusted following the frequency of the first signal; converts the first signal into a square wave signal with the same phase, determines the real-time frequency of the square wave signal according to a reference frequency, introduces a three-phase square wave signal with the same phase as the fundamental wave through an FPGA, generates an intermediate square wave signal through logical or processing, performs frequency multiplication processing on the intermediate square wave signal according to demand, performs zero crossing detection and secondary filtering and shaping on the intermediate square wave signal after the frequency multiplication processing, avoids large errors in the signal during the conversion process, and shapes and optimizes the intermediate square wave signal to match the collected first signal; the present application converts the collected first signal into a square wave signal matching the first signal, and the square wave signal is easier to process and analyze than directly comparing the first signal, effectively ensuring the stability and reliability of the first signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only part of the embodiments of the present application, rather than all the embodiments. For ordinary technicians in this field, without paying creative work, other drawings obtained based on these drawings all fall within the scope of protection of this application.
[0041] Figure 1 A schematic diagram of a flow chart of a signal preprocessing method provided in an embodiment of the present application;
[0042] Figure 2 for Figure 1 The structural schematic diagram of the signal preprocessing method shown;
[0043] Figure 3 for Figure 1 A schematic diagram of a structure for determining a real-time frequency in a signal preprocessing method shown;
[0044] Figure 4 A schematic diagram of the flow of step S6 in the signal preprocessing method provided in an embodiment of the present application;
[0045] Figure 5 is a schematic diagram of the structure of a signal preprocessing system provided in an embodiment of the present application;
[0046] Figure 6 is a schematic diagram of the structure of a signal preprocessing device provided in an embodiment of the present application;
[0047] Figure 7 It is a structural schematic diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] In order to make the description of the disclosed content more detailed and complete, the following is an illustrative description of the implementation methods and specific examples of the present application; however, this is not the only form of implementing or applying the specific embodiments of the present application. The implementation methods cover the features of multiple specific embodiments and the method steps and their sequences for constructing and operating these specific embodiments. However, other specific embodiments can also be used to achieve the same or equal functions and step sequences. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0050] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0051] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two, and other quantifiers are similar. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application, and the embodiments of the present application and the features in the embodiments may be combined with each other without conflict.
[0052] Please refer to Figure 1-Figure 4 , the present application provides a signal preprocessing method, which can preprocess the collected high-voltage side signal of the battery cluster to ensure the stability and reliability of the high-voltage side signal. Please refer to Figure 1 , is a flow chart of a signal preprocessing method provided in an embodiment of the present application, and the signal preprocessing method comprises the following specific steps:
[0053] S1: collecting a first signal, determining a sampling frequency based on a fundamental frequency and a fundamental single-cycle sampling point, and capturing a sampling value of the first signal according to the fundamental single-cycle sampling point and the sampling frequency;
[0054] As an optional implementation, the signal preprocessing method provided in the present application can be applied to a power grid. When applied to a battery cluster connected to a power grid, the first signal on the high-voltage side of the battery cluster can be collected and preprocessed. The first signal can be a current signal on the high-voltage side or a voltage signal on the high-voltage side. Of course, it is also feasible to set it to other forms of the first signal. The present application does not further limit the specific form of the first signal.
[0055] Optionally, the fundamental wave is a grid fundamental wave, and the frequency of the grid fundamental wave can be determined as 50 Hz or 60 Hz, where 50 Hz is the standard frequency of a domestic grid and 60 Hz is the standard frequency of a foreign grid. Taking the domestic grid of 50 Hz as an example, the single-cycle sampling points of the domestic grid fundamental wave are 1024 sampling points.
[0056] For further information, please refer to Figure 2 ,for Figure 1As shown in the structural diagram of the signal preprocessing method, the calculation formula of the above sampling frequency can be calculated based on sampling frequency = fundamental frequency × single-cycle sampling point of the fundamental wave of the power grid. Therefore, taking the domestic power grid as an example, the sampling frequency of the present application can be determined to be 1024×50Hz=51.2kHz. When the foreign power grid is used as an example for calculation, the sampling frequency that can be determined is 1024×60Hz=61.44kHz. Of course, the sampling frequency and the determined single-cycle sampling point can be adjusted according to actual needs, and the present application does not impose further restrictions on this.
[0057] As an optional implementation manner, the above-mentioned capturing the sampling value of the first signal according to the fundamental wave single-cycle sampling point and the sampling frequency includes:
[0058] Filtering out frequency signals in the first signal that are higher than a first preset percentage sampling frequency by a bandpass filter;
[0059] An effective sampling point is determined according to the fundamental wave single-cycle sampling point, sampling values of the first signal after filtering are captured based on the effective sampling point and a preset sampling interval value, and mean square processing is performed on several of the sampling values to obtain effective sampling values of the first signal.
[0060] In the process of collecting the first signal, a frequency signal in the first signal that is higher than a first preset percentage sampling frequency may be filtered out by a bandpass filter to prevent an aliasing frequency phenomenon from occurring.
[0061] Exemplarily, the first signal can be collected by a signal collector (not shown in the figure), and the bandpass filter can be set before the signal collector to limit the bandwidth of the first signal and filter out frequency signals higher than the Nyquist frequency in the first signal as much as possible to reduce interference from fractional frequency waveforms that are not integer multiples of the fundamental frequency in the first signal.
[0062] Among them, the Nyquist frequency is the minimum sampling frequency specified in the sampling theorem, which can prevent the occurrence of signal aliasing. The present application preferably sets the first preset percentage to 50%, that is, the frequency signal higher than 50% of the sampling frequency in the first signal is filtered out by a bandpass filter.
[0063] It should be noted that the first signal collected above may be an AC non-sinusoidal signal rather than a standard sinusoidal signal. The AC non-sinusoidal signal can be decomposed into a combination of sinusoidal signals of different frequencies. In order to meet the requirements of high-quality signal indicators, the aliasing error and frequency leakage of the first signal provided in this application should meet the requirement of attenuation less than 0.3dB when there are 1024 sampling points in a single cycle of the grid fundamental wave.
[0064] Since the attenuation of the bandpass filter is linearly proportional to the frequency within the passband of the bandpass filter, the attenuation of the bandpass filter at a sampling frequency of 51.2kHz can be determined by a simple proportional relationship. According to the sampling theorem, if the initial power of a signal is P and the power after transmission is P', the attenuation coefficient is = 10*log10(P / P'). When the attenuation coefficient is 0.3dB, it means that the power after transmission is about 94.6% of the initial power, which is the required high-quality signal indicator.
[0065] The attenuation of the bandpass filter at 3.2kHz is 0.3dB, so the attenuation of the bandpass filter at a sampling frequency of 51.2kHz should be (51.2kHz / 3.2kHz)×0.3dB=4.8dB, which means that the attenuation of the bandpass filter at a sampling frequency of 51.2kHz is 4.8dB. Of course, the passband cutoff frequency of the bandpass filter can also be adjusted to make the attenuation of the bandpass filter less than 4.8dB to meet the high-quality signal indicators. This application does not impose further restrictions on this.
[0066] Furthermore, the fundamental wave single-cycle sampling points determined above are 1024 sampling points. However, in the actual input point processing calculation, not every calculated indicator is based on 1024 sampling points. Instead, two or three levels of extraction can be performed on the basis of 1024 sampling points to determine the required effective sampling points.
[0067] For example, the second-level extraction can be 512 sampling points, and the third-level extraction can be 128 sampling points. The number of sampling points should satisfy 2 to the power of n sampling points. This application does not impose further restrictions on the number of valid sampling points actually extracted, and the above can be adjusted in response to actual needs.
[0068] In an optional embodiment, taking the need to extract 128 valid sampling points from 1024 sampling points of a single-cycle fundamental wave sampling point as an example for explanation, an array A
[128] of 128 numbers can be defined, and 128 sampling values can be obtained by performing equal-interval number sampling calculations at a preset sampling interval value, and then the sampling values corresponding to the 128 valid sampling points are processed by mean square to obtain valid sampling values of the first signal.
[0069] It should be noted that the above sampling interval value depends on the data processing capability of the hardware platform for extracting 128 valid sampling points from the 1024 sampling points of the fundamental single-cycle sampling points. In principle, the smaller the interval value between the valid sampling points, the more accurate the effective value obtained. This application does not impose further restrictions on the specific data of the sampling interval value, and can be preset according to the data processing capability of the actual hardware platform.
[0070] In the embodiment of the present application, a "calculate_effective_value" function is defined to perform mean square processing on the sample values collected at the 128 effective sampling points to obtain the effective sample values of the first signal.
[0071] Exemplarily, the implementation code of the above “calculate_effective_value” function is:
[0072]
[0073] The code provided above defines a "calculate_effective_value" function, which accepts a data array A
[128] and a sampling interval value as parameters, then traverses the array and performs mean square processing on the sampling values corresponding to the 128 sampling points to obtain the effective sampling value of the first signal.
[0074] It can be understood that the code provided above is only used as an example of an optional implementation method, and equal-interval data acquisition can also be achieved through other data processing codes or functions. The present application does not impose any restrictions on the specific implementation method of the sampling value of the first signal after filtering based on the effective sampling points and the preset sampling interval.
[0075] In the embodiment of the present application, the effective sampling value of the first signal can be obtained by the formula To perform calculation; wherein, I is a valid sampling point, i is a sampling value corresponding to the sampling point, and a plurality of sampling values are processed by mean square to obtain a valid sampling value of the first signal.
[0076] Of course, it is also possible to directly calculate the average value or variance of several sampling values. As long as the effective sampling value corresponding to the first signal can be calculated based on several sampling values, other calculation methods are also feasible. The present application calculates several sampling values through the mean square formula, which can make the final several effective sampling values smoother, which is convenient for subsequent analysis and processing of the first signal.
[0077] As an optional implementation manner, determining the frequency of the first signal based on the sampling value, and adjusting the sampling frequency according to a frequency change of the first signal, includes:
[0078] Based on Fourier transform, a plurality of the valid acquisition values are analyzed and processed to obtain spectrum information of the first signal, the frequency of the first signal is determined according to the spectrum information, and the sampling frequency is adjusted according to the frequency change of the first signal.
[0079] In an embodiment of the present application, while implementing the sampling of the first signal, it is also necessary to extract the spectrum information of the first signal by analyzing and processing a number of valid sampling values based on the fast Fourier transform, so as to determine the frequency and frequency change of the first signal based on the spectrum information, and further adjust the sampling frequency according to the frequency change of the first signal. Since the sampling frequency is determined by the fundamental frequency and the fundamental single-cycle sampling points, the number of the fundamental single-cycle sampling points can be adjusted according to the frequency change of the first signal, so as to automatically adjust the sampling frequency according to the change of the first signal, thereby realizing accurate synchronous sampling of the first signal.
[0080] Step S3: converting the first signal into a square wave signal with the same phase, comparing the reference frequency and the frequency of the first signal to generate a difference signal, and determining the implementation frequency of the square wave signal according to the difference signal, so that the square wave signal has the same frequency as the first signal;
[0081] In the embodiments of this application, please refer to Figure 3 ,for Figure 1 The structural diagram of determining the real-time frequency in the signal preprocessing method shown in the figure, in step S3, the above-mentioned collected first signal needs to be converted into a square wave signal with the same phase. Specifically, the conversion of the above-mentioned signal can be achieved through a phase detector, a filter, a voltage-controlled oscillator and a divider, and the frequency and phase of the square wave signal are synchronized with the frequency and phase of the first signal by utilizing the feedback control principle.
[0082] As an optional implementation manner, the step of comparing the reference frequency and the frequency of the first signal to generate a difference signal includes:
[0083] Determine the reference frequency according to a pulse-per-second signal of a temperature-compensated crystal oscillator, a constant-temperature crystal oscillator or a satellite timing service;
[0084] The reference frequency and the frequency of the first signal are input into a phase detector, so that the phase detector compares the phases of the reference frequency and the frequency of the first signal and generates the difference signal.
[0085] In an embodiment of the present application, it is necessary to set a reference frequency. The reference frequency may be a reference frequency determined by a temperature-compensated crystal oscillator, a constant temperature crystal oscillator or a second pulse signal of a satellite timing service. It may be a reference frequency determined solely by a temperature-compensated crystal oscillator, a constant temperature crystal oscillator or a second pulse signal of a satellite timing service. It may also be a reference frequency determined by a combination of the temperature-compensated crystal oscillator, a constant temperature crystal oscillator or a second pulse signal of a satellite timing service selected in different applicable scenarios. As long as a reference frequency can be provided as a reference for the subsequent generation of a real-time frequency, any method selected is feasible, and the present application does not impose any further restrictions on this.
[0086] Further, please refer to Figure 3After the reference frequency f0 is determined, the reference frequency f0 and the frequency of the first signal are simultaneously input into the phase detector, which compares the phases of the two frequencies and outputs a signal representing the phase difference between the two, namely, a difference signal.
[0087] As an optional implementation manner, the above-mentioned determining the real-time frequency of the square wave signal according to the value signal includes:
[0088] Passing the difference signal through a low-pass filter to generate a stable difference signal, applying the stable difference signal to a voltage-controlled oscillator to form an output frequency, until the output frequency is synchronized with the reference frequency;
[0089] Dividing the output frequency so that the output frequency after the frequency division is equal to the reference frequency;
[0090] The divided output frequency is multiplied to obtain the real-time frequency.
[0091] In an embodiment of the present application, after the above-mentioned difference signal passes through a low-pass filter, a relatively smooth intermediate value will be obtained. This intermediate value can be a voltage value, which will act on the voltage-controlled oscillator and form an output frequency. After the above-mentioned trigger control link reaches a stable state, the output frequency will be synchronized with the reference frequency.
[0092] Specifically, the signal difference obtained by the phase detector will act on the voltage-controlled oscillator, and a corresponding relationship can be formed between the output frequency of the voltage-controlled oscillator and the input control voltage. Therefore, when the voltage value is applied to the voltage-controlled oscillator, the voltage-controlled oscillator will form an output frequency corresponding to the voltage value. When the above-mentioned filtering and sampling of the first signal can ease the tendency to a stable state, the output frequency will be further synchronized with the preset frequency.
[0093] Furthermore, when the output frequency is synchronized with the preset frequency, the output frequency can be divided by a. At this time, the output frequency f2 obtained after the frequency division process will be equal to the original reference frequency f0. At this time, the voltage-controlled oscillator generates the real real-time frequency f1 according to the newly obtained output frequency f2. At this time, f1=a*f0=a*f2,
[0094] f1 is the required real-time frequency.
[0095] It can be understood that in the above process of obtaining the real-time frequency f1, it is necessary to ensure that a stable phase relationship is maintained between the output frequency f2 and the original reference frequency f0, that is, a stable numerical difference is maintained between the phases and no jumps occur. Only under the premise of maintaining a stable phase relationship between the output frequency f2 and the original reference frequency f0 can a stable linear relationship be maintained between the real-time frequency f1 and the frequency of the first signal. Further, by adjusting the a value, the real-time frequency f1 is made the same as the frequency of the first signal, thereby making the real-time frequency f1 of the square wave signal the same as the frequency of the first signal.
[0096] It should be noted that the present application converts the first signal into a square wave signal with the same phase as the first signal through a phase detector, a filter, a voltage-controlled oscillator and a frequency divider, and then further determines the real-time frequency f1 of the square wave signal. At this time, the square wave signal has the same frequency as the first signal, and the square wave signal has a fixed duty cycle, which is easier to process and analyze than directly comparing with the first signal.
[0097] Since the trigger link is sensitive to signal noise and distortion, if the first signal is directly selected for processing and analysis, there may be large noise or distortion in the first signal, which may lead to inaccurate trigger detection. However, the present application converts the first signal into a square wave signal with the same frequency and direction as the first signal, and can directly obtain the period or frequency of the first signal by measuring the period or frequency of the square wave signal. The square wave signal can also be used as a reference signal to compare and lock the phase of the first signal collected later, or the square wave signal can be divided or multiplied again as needed to compare and lock other collected first signals. The above methods are all feasible, and the present application does not further limit the specific application of the square wave signal with the same frequency and direction as the first signal.
[0098] It is understandable that as long as the square wave signal can be used as a reference signal, the reference signal can be compared with the first signal collected later, or other signals to be processed for phase comparison and locking by frequency division or frequency multiplication, which is feasible and should be known to those skilled in the art.
[0099] Step S4: introducing a three-phase square wave signal with the same phase as the fundamental wave, generating an intermediate square wave signal according to the three-phase square wave signal and a square wave signal with the same frequency and direction as the first signal, and performing frequency doubling processing on the square wave signal;
[0100] As an optional implementation manner, the above-mentioned introducing a three-phase square wave signal having the same phase as the fundamental wave, and generating an intermediate square wave signal according to the three-phase square wave signal and the square wave signal having the same frequency and phase as the first signal, comprises:
[0101] Introducing a three-phase square wave signal having the same phase as the fundamental wave through FPGA;
[0102] The three-phase square wave signal and a square wave signal having the same frequency and direction as the first signal are logically ORed to generate the intermediate square wave signal.
[0103] In the embodiment of the present application, it is necessary to introduce three-phase square wave signals with the same phase as the fundamental wave through FPGA (Field-Programmable Gate Array) and DSP (Digital Signal Processor).
[0104] Exemplarily, a three-phase square wave signal with the same phase as the grid fundamental wave can be introduced through FPGA, and the phase difference between the three-phase square wave signals is 120°. The three-phase square wave signal is processed with the square wave signal with the same frequency and direction as the above-mentioned first signal in a logical OR manner to generate an intermediate square wave signal. The present application can enhance the stability and reliability of the intermediate square wave signal through logical OR processing, ensuring that only one-phase signal is continuous and stable to guarantee subsequent phase-locked frequency doubling operations.
[0105] Preferably, an access storage kernel can be developed using an FPGA high-speed hardware customized prototype, which requires two completely independent sets of data lines, address lines, and read-write control lines on an SRAM (Static Random-Access Memory), which means that two independent systems or controllers can access the memory at the same time without interfering with each other. It allows two independent controllers ARM (Advanced RISC Machines) and DSP to asynchronously access the storage unit at the same time, so that when the addresses of the two ports in the kernel are different, they can perform read and write operations at the same time without conflict. The signal preprocessing method provided in the present application is preferably implemented based on the above-mentioned FPGA logic control and DSP unit.
[0106] As an optional implementation, after an intermediate square wave signal is generated by a three-phase square wave signal and a square wave signal with the same frequency and direction as the first signal, the intermediate square wave signal needs to be frequency multiplied to adjust the frequency of the intermediate square wave signal as required. Of course, the intermediate square wave can also be frequency divided as required. The above methods are all feasible, and technicians in this field can perform the above-mentioned frequency multiplication or frequency division according to actual needs, and the present application does not impose further restrictions on this.
[0107] Step S5: performing zero-crossing detection and secondary filtering and shaping on the intermediate square wave signal after the frequency doubling process to obtain a preprocessed first signal.
[0108] As an optional implementation manner, the above-mentioned zero-crossing detection of the intermediate square wave signal after the frequency multiplication processing includes:
[0109] Determine whether the zero-crossing point of the intermediate square wave signal after the frequency doubling process is within a preset range within a preset time; if so, perform secondary filtering and shaping on the intermediate square wave signal;
[0110] If not, the preset sampling interval value is adjusted until the zero-crossing point of the intermediate square wave signal within the preset time is within the preset range.
[0111] Although the frequency of the output intermediate square wave signal has high real-time tracking of the first signal, the intermediate square wave signal has poor anti-interference ability, especially when voltage waveform distortion occurs, which may trigger zero-crossing detection. Therefore, it is necessary to judge the zero-crossing point of the intermediate square wave after frequency doubling within a preset time.
[0112] In simple terms, zero-crossing detection refers to the zero point of the intermediate square wave signal from the positive half axis to the negative half cycle or from the negative half cycle to the positive half cycle. Therefore, this application needs to judge the zero-crossing point of the intermediate square wave signal within the preset time to determine whether the zero-crossing point is within the preset range.
[0113] For example, taking a single cycle of 210 points as an example, 51 points are sampled in 1ms, corresponding to about 4ms in a single cycle. If the zero-crossing point in the single cycle is within (51±15) points, it means that the zero-crossing point of the intermediate square wave signal within the preset time is within the preset range. If the zero-crossing point in the single cycle is not within (51±15) points, it means that the zero-crossing point of the intermediate square wave signal within the preset time is not within the preset range. Therefore, it is necessary to adjust the above-mentioned sampling interval value or the sampling frequency until the zero-crossing point of the intermediate square wave signal within the preset time is within the preset range, and then further perform secondary filtering and shaping on the intermediate square wave signal.
[0114] As an optional implementation manner, the secondary filtering and shaping of the intermediate square wave signal includes:
[0115] Preliminarily filtering out noise and interference frequencies in the intermediate square wave signal by means of a band-stop filter;
[0116] The noise and interference frequency in the intermediate square wave signal are further filtered out by a digital filter, and the amplitude and phase of the intermediate square wave signal are adjusted.
[0117] When the zero crossing point of the intermediate square wave signal within the preset time is within the preset range, the intermediate square wave signal needs to be filtered at least twice, firstly performing the first preliminary filtering on the intermediate square wave signal, and then further shaping and optimizing the intermediate square wave signal.
[0118] Specifically, in the first filtering, noise, interference or unnecessary frequency components in the intermediate square wave signal are preferably removed by a band-stop filter, so as to perform preliminary cleaning and preparation on the intermediate square wave signal.
[0119] In the second filtering, it is necessary to further filter out the remaining noise, interference or unnecessary frequency components in the intermediate square wave signal, and adjust the amplitude or phase of the intermediate square wave signal so that the adjusted intermediate square wave signal meets the specific frequency response component. The second filtering can be achieved through a more complex digital filter.
[0120] The present application can remove most of the unnecessary frequency components in the intermediate square wave signal through the first filtering, and can more accurately adjust and optimize the intermediate square wave signal through the second filtering, so as to obtain the desired intermediate square wave signal.
[0121] As an optional implementation manner, after obtaining the preprocessed first signal, the method further includes:
[0122] S6: performing frequency doubling processing again on the first signal after secondary filtering and shaping, so that the frequency of the pre-processed first signal matches the frequency of the collected first signal.
[0123] In the embodiments of this application, please refer to Figure 4 , which is a flow chart of step S6 in the signal preprocessing method provided in an embodiment of the present application. After the above-mentioned intermediate square wave signal is subjected to secondary filtering and shaping, a preprocessed first signal is obtained, and the preprocessed first signal also needs to be frequency-multiplied so that the frequency of the first signal after frequency multiplication matches that of the first signal collected in step S1. It can also be understood that the present application uses the signal subjected to secondary filtering and shaping as the preprocessed first signal, and after obtaining the preprocessed first signal, it is also necessary to perform frequency multiplication on the first signal so that the frequency of the first signal obtained after frequency multiplication matches that of the first signal collected in step S1, thereby converting the first signal into a square wave signal having the same frequency and phase as the first signal.
[0124] It should be understood that the first signal obtained after the frequency doubling processing in step S6 is a square wave signal, while the first signal collected in step S1 is an AC non-sinusoidal signal, but the square wave signal obtained after the frequency doubling processing matches the frequency of the first signal collected in step S1, thereby facilitating the evaluation and analysis of the initially collected first signal based on the first signal after the frequency doubling processing.
[0125] In a specific embodiment provided in the present application, the signal preprocessing method provided above can collect data on the high voltage side of the power grid. When applied to a battery cluster, it can collect data on the high voltage side voltage or high voltage side current of the battery cluster.
[0126] Existing battery clusters are usually equipped with DC-DC (DC-DC converter) or directly use PCS (Power Conversion System). These electronic power devices are usually equipped with switching devices IGBT (Insulate-Gate Bipolar Transistor). The role of IGBT in the energy storage system is usually to accurately control the voltage and current to ensure high charging and discharging efficiency of the battery cluster and a smooth charging and discharging process, while protecting the battery from damage and extending the service life of the battery cluster.
[0127] However, the high-frequency characteristics of IGBTs may change over time, which may have a negative impact on the charging and discharging functions of the energy storage system, resulting in inaccurate current and voltage control of the battery cluster. Therefore, it is necessary to accurately monitor high-speed transient faults on the high-voltage side of the battery cluster.
[0128] Specifically, by applying the signal preprocessing method provided by the present application to the high-voltage side of the battery cluster, taking the monitoring of the voltage signal on the high-voltage side of the battery cluster as an example, the present application collects the high-voltage side voltage signal, preprocesses the high-voltage side voltage signal, and converts it into a square wave signal that matches the high-voltage side voltage signal. By analyzing the phase, amplitude and frequency of the square wave signal, it is determined whether the high-voltage side voltage signal corresponding to the square wave signal is abnormal, so as to timely inspect and maintain the battery cluster, or locate the location of the fault, so as to avoid the fault from spreading and affecting other battery clusters that are working normally.
[0129] As an optional implementation, the signal preprocessing method provided in the present application can collect and analyze high-voltage side signals at high speed, so that the fault can be discovered in time at the early stage of occurrence, and relevant personnel can be reminded to repair the fault in time, and the high-voltage side signal of each battery cluster can be collected according to needs. In this way, after collecting a high-speed transient fault, the power supply to the fault area can be cut off in time to avoid accidents such as overheating of the battery cluster and fire, which will cause casualties and property losses, thereby ensuring the overall safety of the battery system and improving the reliability and stability of the energy storage system.
[0130] Of course, the signal preprocessing method provided in the present application can also be applied to other technical fields. As long as the collected signal needs to be preprocessed and converted into a matching square wave signal so as to analyze the characteristics of the collected signal according to the matching square wave signal, the implementation scenario is feasible, and the present application does not impose any further restrictions on this.
[0131] The present application provides a signal preprocessing method, which collects a first signal, determines a sampling frequency based on a fundamental frequency of a power grid and a single-cycle sampling point of the fundamental wave, determines a sampling value of the first signal based on the sampling frequency and the single-cycle point of the fundamental wave, performs a fast Fourier transform on the sampling value to analyze the frequency of the first signal, and further adjusts the sampling frequency according to the frequency change of the first signal to ensure that the acquisition frequency of the first signal can be adaptively adjusted following the frequency of the first signal; converts the first signal into a square wave signal with the same phase, determines the real-time frequency of the square wave signal according to a reference frequency, introduces a three-phase square wave signal with the same phase as the fundamental wave through an FPGA, generates an intermediate square wave signal through logical or processing, performs frequency multiplication processing on the intermediate square wave signal according to demand, performs zero crossing detection and secondary filtering and shaping on the intermediate square wave signal after the frequency multiplication processing, avoids large errors in the signal during the conversion process, and shapes and optimizes the intermediate square wave signal to match the collected first signal; the present application converts the collected first signal into a square wave signal matching the first signal, and the square wave signal is easier to process and analyze than directly comparing the first signal, effectively ensuring the stability and reliability of the first signal.
[0132] Based on the signal preprocessing method provided above, the present application also provides a signal preprocessing system, such as Figure 5 , which is a schematic diagram of the structure of a signal preprocessing system provided in an embodiment of the present application, the system includes a signal acquisition module, a frequency adjustment module, a square wave conversion module, a frequency doubling processing module and a filtering and shaping module.
[0133] The signal acquisition module is used to acquire the first signal, determine the sampling frequency based on the fundamental frequency and the fundamental single-cycle sampling points, and capture the sampling value of the first signal according to the fundamental single-cycle sampling points and the sampling frequency;
[0134] The frequency adjustment module is used to determine the frequency of the first signal based on the sampling value, and adjust the sampling frequency according to the frequency change of the first signal;
[0135] The square wave conversion module is used to convert the first signal into a square wave signal with the same phase, compare the reference frequency and the frequency of the first signal to generate a difference signal, and determine the real-time frequency of the square wave signal according to the difference signal, so that the square wave signal has the same frequency as the first signal;
[0136] The frequency doubling processing module is used to introduce a three-phase square wave signal with the same phase as the fundamental wave, generate an intermediate square wave signal according to the three-phase square wave signal and the square wave signal with the same frequency and phase as the first signal, and perform frequency doubling processing on the intermediate square wave signal;
[0137] The filtering and shaping module is used to perform zero-crossing detection and secondary filtering and shaping on the intermediate square wave signal after the frequency doubling process to obtain the pre-processed first signal.
[0138] For other details about how each module in the above-mentioned signal preprocessing system implements the above-mentioned technical solution, please refer to the description of the signal preprocessing method provided in the above-mentioned application embodiment, which will not be repeated here.
[0139] Based on the signal preprocessing method provided above, such as Figure 6 , which is a schematic diagram of the structure of a signal preprocessing device provided in an embodiment of the present application, and an embodiment of the present application further provides a signal preprocessing device, the recognition device comprising a processor 601 and a memory 602 coupled to the processor 601. The memory 602 stores a computer program, and when the computer program is executed by the processor 601, the processor 601 executes the steps in the signal preprocessing method provided in the above embodiment.
[0140] For other details about how the processor 601 in the above-mentioned signal preprocessing device implements the above-mentioned technical solution, please refer to the description of the signal preprocessing method provided in the above-mentioned application embodiment, which will not be repeated here.
[0141] Among them, the processor 601 can also be called a CPU (Central Processing Unit), and the processor 601 may be an integrated circuit chip with signal processing capabilities; the processor 601 can also be a general-purpose processor, DSP (Digital Signal Process), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, among which the general-purpose processor can be a microprocessor or the processor 601 can also be any conventional processor, etc.
[0142] like Figure 7As shown, the embodiment of the present application also provides a schematic diagram of the structure of a computer-readable storage medium, on which a readable computer program 701 is stored; wherein the computer program 701 can be stored in the above storage medium in the form of a software product, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, magnetic disk or optical disk, ROM (Read-Only Memory), RAM (Random Access Memory) and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, and tablets.
[0143] In the several embodiments provided in the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0144] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0145] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A signal preprocessing method, characterized in that: The method comprises the following steps: Collecting a first signal, determining a sampling frequency based on a fundamental frequency and a single-cycle sampling point of the fundamental, and capturing a sampling value of the first signal according to the single-cycle sampling point of the fundamental and the sampling frequency; Determine the frequency of the first signal based on the sampling value, and adjust the sampling frequency according to the frequency change of the first signal; Converting the first signal into a square wave signal with the same phase, comparing a reference frequency and the frequency of the first signal to generate a difference signal, and determining the real-time frequency of the square wave signal according to the difference signal, so that the square wave signal has the same frequency as the first signal; Introducing a three-phase square wave signal having the same phase as the fundamental wave, generating an intermediate square wave signal according to the three-phase square wave signal and a square wave signal having the same frequency and phase as the first signal, and performing frequency doubling processing on the intermediate square wave signal; The intermediate square wave signal after the frequency doubling process is subjected to zero-crossing detection and secondary filtering and shaping to obtain a pre-processed first signal.
2. The signal preprocessing method according to claim 1, characterized in that: The capturing of the sampling value of the first signal according to the fundamental wave single-cycle sampling point and the sampling frequency includes: Filtering out frequency signals in the first signal that are higher than a first preset percentage sampling frequency by a bandpass filter; An effective sampling point is determined according to the fundamental wave single-cycle sampling point, sampling values of the first signal after filtering are captured based on the effective sampling point and a preset sampling interval value, and mean square processing is performed on several of the sampling values to obtain effective sampling values of the first signal.
3. The signal preprocessing method according to claim 2, characterized in that: The determining the frequency of the first signal based on the sampling value, and adjusting the sampling frequency according to the frequency change of the first signal, comprises: Based on Fourier transform, a plurality of the valid acquisition values are analyzed and processed to obtain spectrum information of the first signal, the frequency of the first signal is determined according to the spectrum information, and the sampling frequency is adjusted according to the frequency change of the first signal.
4. The signal preprocessing method according to claim 1, characterized in that: The step of comparing a reference frequency with the frequency of the first signal to generate a difference signal comprises: Determine the reference frequency according to a pulse-per-second signal of a temperature-compensated crystal oscillator, a constant-temperature crystal oscillator or a satellite timing service; The reference frequency and the frequency of the first signal are input into a phase detector, so that the phase detector compares the phases of the reference frequency and the frequency of the first signal and generates the difference signal.
5. The signal preprocessing method according to claim 4, characterized in that: Determining the real-time frequency of the square wave signal according to the value signal comprises: Passing the difference signal through a low-pass filter to generate a stable difference signal, applying the stable difference signal to a voltage-controlled oscillator to form an output frequency, until the output frequency is synchronized with the reference frequency; Dividing the output frequency so that the output frequency after the frequency division is equal to the reference frequency; The divided output frequency is multiplied to obtain the real-time frequency.
6. The signal preprocessing method according to claim 1, characterized in that: The introducing of the three-phase square wave signal having the same phase as the fundamental wave, and generating the intermediate square wave signal according to the three-phase square wave signal and the square wave signal having the same frequency and phase as the first signal, comprises: Introducing a three-phase square wave signal having the same phase as the fundamental wave through FPGA; The three-phase square wave signal and a square wave signal having the same frequency and direction as the first signal are logically ORed to generate the intermediate square wave signal.
7. The signal preprocessing method according to claim 2, characterized in that: The step of performing zero-crossing detection on the intermediate square wave signal after the frequency multiplication process comprises: Determine whether the zero-crossing point of the intermediate square wave signal after the frequency doubling process is within a preset range within a preset time; if so, perform secondary filtering and shaping on the intermediate square wave signal; If not, the preset sampling interval value is adjusted until the zero-crossing point of the intermediate square wave signal within the preset time is within the preset range.
8. The signal preprocessing method according to claim 7, characterized in that: The secondary filtering and shaping of the intermediate square wave signal comprises: Preliminarily filtering out noise and interference frequencies in the intermediate square wave signal by means of a band-stop filter; The noise and interference frequency in the intermediate square wave signal are further filtered out by a digital filter, and the amplitude and phase of the intermediate square wave signal are adjusted.
9. The signal preprocessing method according to claim 1, characterized in that: After obtaining the preprocessed first signal, the method further includes: The first signal after the secondary filtering and shaping is frequency-multiplied again, so that the frequency of the first signal after the frequency-multiplied processing matches the frequency of the collected first signal.
10. The signal preprocessing method according to claim 2, characterized in that: The first preset percentage is 50%, and the attenuation value of the bandpass filter is less than 4.8 dB.
11. The signal preprocessing method according to any one of claims 1 to 10, characterized in that: The fundamental wave is a power grid fundamental wave, and the fundamental wave frequency of the power grid fundamental wave is 50 Hz or 60 Hz; The single-cycle sampling points of the grid fundamental wave are 1024 sampling points, and the sampling frequency=fundamental wave frequency×single-cycle sampling points of the grid fundamental wave.
12. The signal preprocessing method according to any one of claims 1 to 11, characterized in that: The first signal is a high-voltage side signal of the power grid.
