Disclosure of Invention
The invention aims to provide a bidirectional direct current power supply ripple monitoring system and method based on measurement electric variables, which are used for solving the problems of low ripple detection accuracy, noise interference and signal distortion in the background technology.
To achieve the above object, in one aspect, the present invention provides a bidirectional dc power supply ripple monitoring system based on measuring an electrical variable, including:
The power supply detection module detects and captures voltage and current signals of the output end of the bidirectional direct current power supply through a sensor, wherein the voltage and current signals comprise direct current components and alternating current ripple components;
The signal conditioning module is used for amplifying, filtering and converting signals output by the sensor through the signal conditioning circuit, amplifying the signals through dynamically adjusting the gain of an amplifier in the signal conditioning circuit, and optimizing the dynamically adjusted gain through increasing the dynamic range, the noise level and the system bandwidth limiting parameters of the signals;
the data analysis module executes a digital signal processing algorithm DSP on the data output by the signal conditioning circuit, and calculates coefficients, amplitudes and frequencies of the ripple waves;
And the alarm module is used for carrying out alarm processing on the ripple waves through a threshold algorithm.
As a further improvement of the technical scheme, the signal conditioning module comprises an amplifying unit, a filtering unit and a converting unit;
the amplifying unit amplifies the micro signal output by the sensor through an operational amplifier in the signal conditioning circuit;
The filtering unit removes noise and interference in the signal through a low-pass filter in the signal conditioning circuit;
the conversion unit converts the continuous analog signal into a digital signal through an analog-to-digital converter ADC in the signal conditioning circuit.
As a further improvement of the technical scheme, the amplifying unit amplifies the micro signal output by the sensor through an operational amplifier in the signal conditioning circuit, and the method comprises the following steps:
S3.1, selecting an inverting amplifier and designing an amplifying circuit;
S3.2, calculating the required gain according to the required output signal amplitude and the output signal amplitude of the sensor ,WhereinRepresenting the resistance of the feedback resistor,Representing an input resistance, dynamically adjusting the gain of the amplifier, and optimizing the dynamically adjusted gain by introducing dynamic range, noise level and system bandwidth limiting parameters of the signal;
the optimized gain formula is: ;
Wherein, Indicating that the gain after the adjustment is to be made,Representing the gain adjustment factor, which determines the speed and magnitude of the gain adjustment,Representing the dynamic range adaptation coefficient of the signal,Representing the signal noise suppression coefficient(s),Representing the system bandwidth adaptation coefficient(s),Which is indicative of the target power level,Representing the power level of the current signal;
and S3.3, amplifying the signal by the gain value of the amplifier.
As a further improvement of the present technical solution, in S3.2, the dynamic adjustment gain specifically includes:;
Wherein, Indicating that the gain after the adjustment is to be made,The gain adjustment coefficient is represented as such,Which is indicative of the target power level,Representing the power level of the current signal.
As a further improvement of the present technical solution, the filtering unit removes noise and interference in a signal through a low-pass filter in a signal conditioning circuit, and includes the following steps:
s4.1, determining the highest frequency component Q of the signal and the suppressed noise frequency V;
s4.2, selecting an RC filter, and calculating the resistance and capacitance values of the filter;
S4.3, calculating the values of the resistance and the capacitance of the filter for meeting the required cut-off frequency :Wherein, the method comprises the steps of, wherein,Is the value of the electrical resistance,Is a capacitance value;
s4.4, connecting the resistor and the capacitor to construct an RC filter circuit according to the calculated resistor and capacitor values;
s4.5, after construction is completed, an oscilloscope is used for checking the frequency response of the filter, so that high-frequency noise and interference of the signal are effectively restrained, and the low-frequency component of the signal is reserved.
As a further improvement of the present technical solution, the conversion unit converts a continuous analog signal into a digital signal through an analog-to-digital converter ADC in the signal conditioning circuit, and includes the following steps:
S5.1, sampling signals, and discretizing continuous analog signals in time;
S5.2, after sampling, converting the analog voltage value of each sampling point into a digital value, dividing a continuous voltage range into a limited number of discrete levels in a quantization process, wherein each level corresponds to a digital code word;
s5.3, the quantized signal is encoded into a digital sequence, and binary encoding is usually used;
s5.4, outputting the coded digital signal by an analog-to-digital converter.
As a further improvement of the technical scheme, the data analysis module executes a digital signal processing algorithm DSP on the data output by the signal conditioning circuit, calculates coefficients, amplitudes and frequencies of the ripple waves, and comprises the following steps:
s6.1, preprocessing data;
s6.2, segmenting the signals for multiple times, carrying out fast Fourier transform on the signals of each segment, superposing the frequency spectrums obtained by all the fast Fourier transforms through a phase superposition method, and dividing the frequency spectrums by the total segmented sampling number for identifying the ripple frequency and the harmonic waves thereof;
s6.3, calculating the ripple coefficient :;
Wherein, Representing the effective value of the ripple voltage,Representing the effective value of the direct voltage;
The ripple amplitude is the peak value of the signal in the fast Fourier transform result;
the ripple frequency is the frequency corresponding to the largest peak in the fast fourier transform result.
As a further improvement of the present technical solution, in S6.3, the effective value of the ripple voltage and the effective value of the dc voltage are specifically:
Effective value of ripple voltage The method comprises the following steps:;
Wherein, Representing the number of samples from which the ripple is separated from the signal;
Effective value of DC voltage The method comprises the following steps:;
Wherein, Representing the number of samples from which the dc component is separated from the signal,Represent the firstAverage of the individual samples.
As a further improvement of the technical scheme, the alarm module carries out alarm processing on the ripple wave through a threshold algorithm, and the method comprises the following steps:
s7.1, setting a threshold value a of a ripple coefficient, a threshold value b of ripple amplitude and a threshold value c of ripple frequency;
S7.2, comparing the monitored ripple coefficient with a threshold value a of a set ripple coefficient, comparing the monitored ripple amplitude with a threshold value b of the set ripple amplitude, comparing the monitored ripple frequency with a threshold value c of the set ripple frequency, and if the ripple coefficient, the amplitude and the frequency exceed the respective set threshold values, indicating that the ripple output by the power supply exceeds an allowable range;
and S7.3, when the ripple coefficient, amplitude and frequency exceed set thresholds, the alarm system gives out an audible warning.
On the other hand, the invention provides a bidirectional direct current power supply ripple monitoring method based on the measured electric variable, which is based on the bidirectional direct current power supply ripple monitoring system based on the measured electric variable, and comprises the following steps:
S8.1, detecting and capturing voltage and current signals of the output end of the bidirectional direct current power supply through a sensor;
s8.2, amplifying, filtering and converting signals output by the sensor through a signal conditioning circuit;
S8.3, calculating ripple coefficients, amplitudes and frequencies in output data of the signal conditioning circuit through a digital signal processing algorithm DSP;
and S8.4, adopting a threshold algorithm to alarm the ripple exceeding the threshold.
Compared with the prior art, the invention has the beneficial effects that:
1. In the bidirectional DC power supply ripple monitoring system and method based on the measurement of the electric variable, the operational amplifier in the signal conditioning circuit amplifies the signal output by the sensor, so that the signal quality is improved, the signal integrity is kept, the high-frequency noise and interference in the signal are removed by the low-pass filter, the ripple characteristic is kept, the signal to noise ratio of the signal is improved, the ripple characteristic is more obvious, the analog signal is converted into the digital signal by the analog-to-digital converter ADC, the basis is provided for the subsequent digital signal processing and analysis, the high-resolution ADC can provide more accurate digital representation, the ripple monitoring precision is improved, the performance of the ripple monitoring system is improved, the stability and the response capability of the system are also enhanced, and the accurate and reliable electric variable monitoring is provided.
2. In the bidirectional DC power supply ripple monitoring system and method based on the measurement of the electric variable, the DSP can accurately calculate the characteristic parameters of the ripple, including the coefficient, the amplitude and the frequency of the ripple, which is helpful for more accurately identifying and positioning the problems in the power supply system, the DSP algorithm can be implemented to monitor the characteristic of the ripple in real time, find abnormality in time, accurately analyze the ripple through the digital signal processing algorithm, and improve the performance of the monitoring and control system.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1:
referring to fig. 1, a bidirectional dc power supply ripple monitoring system based on measuring an electrical variable is provided, which includes:
the power supply detection module 1 detects and captures voltage and current signals of the output end of the bidirectional direct current power supply through a sensor, wherein the voltage and current signals comprise direct current components and alternating current ripple components;
in the present embodiment, the direct current component is obtained by calculating the average value of the signal, which is a stable portion of the signal over a period of time, and the alternating current ripple is a high-frequency fluctuation superimposed on the direct current component, whose frequency composition is analyzed by subtracting the direct current component from the signal and then performing fourier transform (FFT).
The signal conditioning module 2 amplifies, filters and converts the signal output by the sensor through the signal conditioning circuit;
In this embodiment, the signal conditioning module 2 includes an amplifying unit, a filtering unit, and a converting unit;
The amplifying unit amplifies the tiny signal output by the sensor through an operational amplifier in the signal conditioning circuit so as to enhance the tiny signal;
The filtering unit removes noise and interference in the signal through a low-pass filter in the signal conditioning circuit;
The conversion unit converts the continuous analog signals into digital signals through an analog-to-digital converter ADC in the signal conditioning circuit so as to facilitate subsequent digital signal processing;
further, an amplifying unit amplifies a minute signal output from a sensor through an operational amplifier in a signal conditioning circuit, the operational amplifier having a very high open loop gain, which means that even minute signal variations can be amplified to a significant level, which can achieve very high gain accuracy, a modern operational amplifier is generally designed to have very low noise, which is very important when amplifying a minute signal because it can ensure that the signal-to-noise ratio of the signal is maintained at a high level, thereby improving signal quality, and an operational amplifier can achieve stable gain through a negative feedback circuit, which can maintain good performance even in the event of temperature variations or power supply fluctuations, comprising the steps of:
s3.1, selecting an inverting amplifier, designing an amplifying circuit, wherein the amplifying circuit generally comprises an input stage, an intermediate stage and an output stage, the input stage is responsible for receiving weak signals of a sensor, the intermediate stage provides gain, and the output stage provides enough driving capability to drive a subsequent circuit;
S3.2, calculating the required gain according to the required output signal amplitude and the output signal amplitude of the sensor I.e., the amplification of the signal,WhereinRepresenting the resistance of the feedback resistor,Representing an input resistance, dynamically adjusting the gain of the amplifier;
The dynamic adjustment gain formula is specifically: ;
Wherein, Indicating that the gain after the adjustment is to be made,The gain adjustment coefficient is represented as such,Which is indicative of the target power level,Representing the power level of the current signal;
The dynamic range of the signal, the noise level and the system bandwidth limiting parameter are increased to optimize a dynamic adjustment gain formula, wherein the system can automatically adapt to the change of the signal strength through dynamic adjustment of the gain, the definition and the accuracy of the signal can be kept no matter the signal is a weak signal or a strong signal, the influence of noise on the signal can be effectively reduced through gain optimization, the signal to noise ratio of the signal can be improved through proper gain adjustment particularly when the signal is weak, the system bandwidth limitation is considered, the dynamic adjustment of the gain can ensure that the signal can be effectively transmitted in the available bandwidth, the bandwidth waste or the signal overflow is avoided, the signal quality and the system resource can be balanced through adjustment of the gain, the optimal signal transmission effect can be ensured under the limited bandwidth, the dynamic characteristics under different signal conditions can be better adapted, and the power consumption and the system response speed can be reasonably controlled on the premise of ensuring the signal quality;
the optimized gain formula is optimized as follows: ;
Wherein, Indicating that the gain after the adjustment is to be made,Representing the gain adjustment factor, which determines the speed and magnitude of the gain adjustment,Representing the dynamic range adaptation coefficient of the signal,Representing the signal noise suppression coefficient(s),Representing the system bandwidth adaptation coefficient(s),Which is indicative of the target power level,Representing the power level of the current signal;
In the formula, ,The dynamic range of the signal is represented,Representing a dynamic range sensitivity coefficient;, Representing the noise sensitivity coefficient of the device, Representing noise level;, Representing the current system bandwidth of the system, Representing the maximum band of the system;
In this embodiment, the gain of the amplifier is adjusted according to the real-time signal characteristic specifically as follows:
S3.21 measuring dynamic Range of Signal in real time Using Signal processing techniques Noise levelBroadband of systemCalculating the power level of the current signalAnd a target power level;
S3.22, setting gain adjustment coefficientThe coefficients need to be determined experimentally to ensure the stability of the system;
s3.23, calculating a new gain formula according to the measurement result and the optimized gain formula Generating a control signal to adjust the gain of the variable resistor;
the generation of a control signal to adjust the gain of the variable resistor is specifically:
Using an analogue controlled variable resistor instead of Or (b)The resistance of the variable resistor is controlled by an analog signal, and the gain is changed.
And S3.3, amplifying the signal by the gain value of the amplifier.
Further, the filtering unit removes noise and interference in the signal through a low-pass filter in the signal conditioning circuit, the main function of the low-pass filter is to allow the signal below a certain cut-off frequency to pass, and attenuate or block the signal above the cut-off frequency, which makes the low-pass filter very suitable for removing high-frequency noise, the noise and interference removal can significantly improve the signal-to-noise ratio (SNR) of the signal, the high SNR means that the signal is clearer and easier to process and interpret, and the low-pass filter can protect the sensitive circuit from noise by removing the high-frequency noise, so as to avoid possible misoperation or damage, comprising the following steps:
s4.1 determining the highest frequency component Q of the signal and the suppressed noise frequency V, the highest frequency component of the signal being below the cut-off frequency of the filter The noise frequency should be higher than the cut-off frequency of the filter;
S4.2, selecting an RC (resistance-capacitance) filter, and calculating the resistance and capacitance values of the filter to meet the required cut-off frequency and attenuation rate;
S4.3, calculating the values of the resistance and the capacitance of the filter for meeting the required cut-off frequency :Wherein, the method comprises the steps of, wherein,Is the value of the electrical resistance,Is the capacitance value by adjustingAndCan set the cut-off frequency of the filterEnsuring that it is between the highest frequency component Q of the signal and the noise frequency V;
S4.4, connecting the resistor and the capacitor to construct an RC filter circuit according to the calculated resistor and capacitor values; typically, the signal passes through a series resistor and then connects with a parallel capacitor to form a basic RC low pass filter;
s4.5, after construction is completed, an oscilloscope is used for checking the frequency response of the filter, so that high-frequency noise and interference of the signal are effectively restrained, and the low-frequency component of the signal is reserved.
Further, the conversion unit converts continuous analog signals into digital signals through the analog-to-digital converter ADC in the signal conditioning circuit, the digital signals are less susceptible to noise and interference than the analog signals, because their states are generally discrete, either 0 or 1, which makes the digital signals more stable in transmission and storage processes, reduces the risk of signal distortion, the digital signals can be easily transmitted through a network without distance limitation, and occupies relatively less space in storage, and is convenient to manage and retrieve, comprising the steps of:
S5.1, sampling the signal, discretizing continuous analog signals in time, namely, capturing the signal instantaneously at a series of fixed time points (sampling moments), wherein at each sampling moment, an ADC captures an instantaneous value of the signal, the value reflects the voltage or current of the signal at that moment, and the sampling frequency is at least twice the highest frequency component of the signal so as to avoid aliasing effect;
S5.2, after sampling, converting the analog voltage value of each sampling point into a digital value, dividing a continuous voltage range into a limited number of discrete levels in a quantization process, wherein each level corresponds to a digital code word;
s5.3, the quantized signal is encoded into a digital sequence, and binary encoding is usually used, wherein the encoding is used for facilitating storage, transmission and processing of the digital signal;
S5.4, the coded digital signal is output by an analog-to-digital converter and can be in parallel or serial format.
The data analysis module 3 executes a digital signal processing algorithm DSP on the data output by the signal conditioning circuit, and calculates coefficients, amplitudes and frequencies of ripples;
In this embodiment, the data analysis module 3 performs a digital signal processing algorithm DSP on the data output by the signal conditioning circuit, and calculates coefficients, amplitudes and frequencies of the ripple, where the digital signal processing algorithm can provide higher precision than analog processing, and can accurately calculate frequency components of the ripple using Fast Fourier Transform (FFT), so as to obtain more accurate ripple coefficients and amplitude information, which can be easily adjusted to adapt to different signal characteristics and analysis requirements, and where the digital signal processing algorithm can extract valuable ripple information from complex signals output by the signal conditioning circuit, including the following steps:
s6.1, preprocessing the data, removing offset, filtering high-frequency noise or carrying out proper window function weighting so as to reduce boundary effect;
S6.2, segmenting signals for multiple times, carrying out fast Fourier transform on the signals of each segment, superposing frequency spectrums obtained by all the fast Fourier transforms through a phase superposition method, dividing the frequency spectrums by the total segmented sampling quantity, and identifying ripple frequencies and harmonics thereof, so that the random noise level in the frequency spectrums is reduced, the signal to noise ratio is improved, and the frequency resolution is indirectly improved;
s6.3, calculating the ripple coefficient :;
Wherein, Representing the effective value of the ripple voltage,Representing the effective value of the direct voltage;
further, the effective value of the calculated ripple voltage is specifically:
s6.31, calculating an average value of the digital signal samples obtained by the converter ADC, which generally represents the DC component in the signal, subtracting the average value from each sample value to eliminate the DC component, and leaving only the ripple part;
s6.32 for each sample value Calculating the square thereofSumming the squares of all the sample values to obtain a total sum of squares;
S6.33, dividing by the number of samplesTo obtain the average square value;
S6.34 effective value of ripple voltageThis value gives the energy level of the undulating portion, which can be used to quantify the size of the ripple;
The effective value of the direct current voltage is specifically: ;
Wherein, Representing the number of samples from which the dc component is separated from the signal,Represent the firstAverage of the individual samples;
The ripple amplitude is the peak value of the signal in the fast Fourier transform result, namely the difference between the maximum amplitude and the minimum amplitude of ripple frequency components;
The ripple frequency is the frequency corresponding to the largest peak in the fast fourier transform result, i.e., the most significant frequency component.
The alarm module 4 carries out alarm processing on the ripple wave through a threshold algorithm;
In this embodiment, the alarm module 4 alarms the ripple by means of a threshold algorithm, which is generally simple and computationally small, meaning that they can react quickly to signal changes, very efficient for situations requiring immediate alarms, once the threshold setting is completed, the system will be very stable and predictable unless the environmental conditions change, which contributes to maintaining the long-term reliability of the system, comprising the steps of:
s7.1, setting a threshold value a of a ripple coefficient, a threshold value b of ripple amplitude and a threshold value c of ripple frequency, wherein the threshold value is a standard for judging whether the ripple exceeds a normal range;
S7.2, comparing the monitored ripple coefficient with a threshold value a of a set ripple coefficient, comparing the monitored ripple amplitude with a threshold value b of the set ripple amplitude, comparing the monitored ripple frequency with a threshold value c of the set ripple frequency, and if the ripple coefficient, the amplitude and the frequency exceed the respective set threshold values, indicating that the ripple output by the power supply exceeds an allowable range;
and S7.3, when the ripple coefficient, amplitude and frequency exceed set thresholds, the alarm system gives out an audible warning.
Example 2:
the difference between the embodiment 2 and the embodiment 1 of the present invention is that the embodiment describes a static mechanical property acquisition and analysis method used by a bidirectional direct current power supply ripple monitoring system based on measurement electric variables.
The bidirectional direct current power supply ripple monitoring method based on the measured electric variable is based on the bidirectional direct current power supply ripple monitoring system based on the measured electric variable, and comprises the following steps:
S8.1, detecting and capturing voltage and current signals of the output end of the bidirectional direct current power supply through a sensor;
s8.2, amplifying, filtering and converting signals output by the sensor through a signal conditioning circuit;
S8.3, calculating ripple coefficients, amplitudes and frequencies in output data of the signal conditioning circuit through a digital signal processing algorithm DSP;
and S8.4, adopting a threshold algorithm to alarm the ripple exceeding the threshold.
The foregoing has shown and described the basic principles, principal features and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the above-described embodiments, and that the above-described embodiments and descriptions are only preferred embodiments of the present invention, and are not intended to limit the invention, and that various changes and modifications may be made therein without departing from the spirit and scope of the invention as claimed.