A digital conditioning method, conditioning circuit, electronic device and computer-readable storage medium for a hydraulic valve core displacement sensor
Through high-precision digital demodulation technology, using discrete Hilbert transform and phase compensation, combined with Butterworth low-pass filtering, the problem of signal amplitude deviation of the hydraulic valve displacement sensor is solved, the measurement accuracy and system reliability are improved, and the High-precision signal output.
Patent Information
- Application Number
- CN202410933343.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Existing hydraulic valve displacement sensors have signal amplitude deviation problems in signal processing, resulting in low measurement accuracy. Moreover, traditional analog signal processing is easily affected by temperature and humidity, making it difficult to achieve high-precision digital demodulation.
High-precision digital demodulation technology is adopted, through discrete Hilbert transform and phase compensation, combined with Butterworth low-pass filtering, to eliminate signal amplitude deviation and improve measurement accuracy and system reliability.
It effectively eliminates the phase difference caused by the core position deviation, improves the measurement accuracy and system reliability of the hydraulic valve spool displacement sensor, simplifies the hardware design, reduces the use of external components, and achieves high-precision signal output.
Smart Images

Figure CN118463788B
Abstract
Description
Technical Field
[0001] The invention relates to the field of hydraulic valve displacement sensors, and in particular to improvements on a digital signal conditioning circuit and method for a hydraulic valve core displacement sensor. Background Art
[0002] The Linear Variable Differential Transformer (LVDT) is a sensor that converts displacement into electrical signals. As a front-end detection device of the control system, the sensor detects and collects the characteristic information of physical objects and their changes, and transforms the collected physical characteristics into electrical signals or other required forms of information according to certain rules for transmission, thereby achieving the requirements of measurement information transmission, signal processing and storage, data display, measurement recording and control.
[0003] The accuracy of the displacement feedback signal is not only affected by the displacement sensor itself, but also by its signal conditioning circuit. LVDT signal processing methods are mainly divided into two categories: analog signal processing and digital signal processing. Among them, the number of discrete components in the analog signal processing circuit is large, which is easily affected by temperature and humidity, and it is difficult to achieve high integration. The number of components in the digital signal processing circuit is small, nonlinear compensation can be achieved, and the system is easy to integrate. At present, the logic circuit is generally integrated into the chip in this field, and the conditioning function is realized through the supporting circuit. For example, the widely used chips such as AD598 and AD698, but in actual applications, there are problems such as high heat generation and temperature rise affecting the accuracy; and it cannot be programmed and does not have nonlinear correction capabilities. Therefore, high-precision digital demodulation has become the development direction of this field.
[0004] Combined with the structure of LVDT itself, it consists of a primary coil and two secondary coils. When the iron core is in the middle position, the voltages induced by the two secondary coils are equal and opposite in phase, and the output voltage difference is zero. Ideally, when the iron core deviates from the center position, a 180° phase difference should be generated between the induced electromotive forces of the secondary coils. However, due to the asymmetry of magnetic coupling, a non-180° phase difference will be generated between the induced electromotive forces of the two secondary coils. This will cause deviations when calculating the difference in the amplitudes of the two signals. How to use the intervention of high-precision digital demodulation technology to eliminate the above deviations has become a technical problem that needs to be solved urgently in this field. Summary of the invention
[0005] In view of the above technical problems, the present invention proposes a digital conditioning method for a hydraulic valve core displacement sensor which utilizes high-precision digital demodulation technology to eliminate signal amplitude deviation, thereby improving the measurement accuracy and reliability of the LVDT sensor.
[0006] The invention also provides a conditioning circuit for implementing the conditioning method, as well as an electronic device and a computer-readable storage medium.
[0007] A digital conditioning method for a hydraulic valve core displacement sensor of the present invention is operated according to the following steps:
[0008] 1) Excitation signal formation,
[0009] The processor forms an excitation signal with a frequency of f and an amplitude of Av;
[0010] 2) Amplification of excitation signal,
[0011] The excitation signal is adjusted to an excitation input signal with a frequency of f and an amplitude of n×Av by a bias adjustment amplifier circuit; n is 2-8; the excitation input signal is input to the primary coil of the hydraulic valve core displacement sensor;
[0012] 3) Sampling and filtering,
[0013] The processor synchronously samples the output signals of the two secondary coils of the hydraulic valve core displacement sensor, and filters them respectively, to obtain two filtered secondary coil output signal S1 data and S2 data;
[0014] 4.1), Discrete Hilbert Transform,
[0015] Performing discrete Hilbert transform on the two filtered secondary coil output signals S1 data and S2 data obtained in step 3), respectively analyzing the amplitude and phase information of the filtered signals to obtain complex signals, wherein the complex signals are S1 transformed data and S2 transformed data;
[0016] 4.2) Phase difference compensation,
[0017] Calculate the instantaneous phase difference between the S1 transformation data and the S2 transformation data, and perform phase compensation on the S1 transformation data to obtain the S11 transformation data, so that the phase difference between the S11 transformation data and the S2 transformation data is adjusted to 180 degrees;
[0018] 5) Digital low-pass filtering,
[0019] Extract the real part of the S11 transformed data obtained in step 4.2) and the real part of the S2 transformed data obtained in step 4.1), calculate the absolute difference, and form a half wave;
[0020] Then, Butterworth low-pass filtering is used to remove high-frequency noise to obtain a low-pass filtering smooth curve;
[0021] 6) Average value calculation,
[0022] Calculate the average value of the low-pass filter smoothed curve obtained in step 5) to obtain the average value;
[0023] 7), Output the average value and buffer the signal,
[0024] Output the average value obtained in step 6) through the D / A channel to the signal output buffer circuit to obtain an analog voltage signal corresponding to the displacement.
[0025] For the digital conditioning method of a hydraulic valve spool displacement sensor according to the present invention, further, the steps of the discrete Hilbert transform in step 4.1) are specifically as follows:
[0026] For the discrete signal X[n], the Hilbert transform is implemented through the following steps:
[0027] a), Fourier transform: Perform a fast Fourier transform (FFT) on the signal: X[f]=FFT(X[n]);
[0028] b), Frequency domain filtering: Construct a filter H[f], and its frequency spectrum is as follows:
[0029] ,
[0030] where N is the length of the signal, that is, the total number of data points in the discrete signal X[n], n is the discrete time index of the signal, ranging from 0 to N - 1, and f is the frequency;
[0031] The frequency response H[f] of the discrete Hilbert transform filter is divided into three parts in the frequency domain:
[0032] Positive frequency part 0 < f < N / 2: In the positive frequency range, the response of the filter is 1,
[0033] Zero frequency and Nyquist frequency part f = 0 or f = N / 2: At the zero frequency and Nyquist frequency, the response of the filter is 0,
[0034] Negative frequency part -N / 2 < f < 0: In the negative frequency range, the response of the filter is -1;
[0035] c) Apply the filter: Apply the filter to the result of the Fourier transform: Y[f]=X[f]⋅H[f];
[0036] d) Inverse Fourier transform: Perform an inverse Fourier transform on the filtered signal: Y[n]=IFFT(Y[f]);
[0037] e) The obtained Y[n] is the Hilbert transform of the signal X[n], and the original signal X[n] and Y[n] form an analytic signal: Z[n]= X[n]+jY[n],
[0038] The analytical signal Z[n] is used to calculate the instantaneous phase of the original signal X[n]:
[0039] Instantaneous phase: ;
[0040] The filtered real signal is converted into a complex signal through Hilbert transform, and the real part information X[n] and phase information φ[n] are extracted from the analytical signal.
[0041] The present invention provides a digital conditioning method for a hydraulic valve core displacement sensor. Further, the phase difference compensation step in step 4.2) includes: processing the instantaneous phases of the two secondary coils through a phase expansion algorithm to ensure the continuity of the phases; calculating the difference between the two instantaneous phases, and compensating the difference to adjust it to 180 degrees.
[0042] The present invention provides a digital conditioning method for a hydraulic valve core displacement sensor. Further, in step 5), the Butterworth low-pass filter removes high-frequency noise by removing the high-frequency noise and retaining the DC component of the signal.
[0043] A conditioning circuit for realizing a digital conditioning method of a hydraulic valve core displacement sensor of the present invention, the conditioning circuit comprising: a processor, a bias adjustment amplifier circuit, a hydraulic valve core displacement sensor interface circuit, a signal output buffer circuit and a power supply circuit,
[0044] The power supply circuit outputs 3.3V DC power to the processor, outputs ±3.3V DC power to the bias adjustment amplifier circuit and the signal output buffer circuit respectively, and outputs 24V DC power to the hydraulic valve spool displacement sensor interface circuit;
[0045] The processor is provided with an excitation signal output port for outputting an excitation signal to the bias adjustment amplifier circuit;
[0046] The bias adjustment amplifier circuit adjusts the excitation signal to an excitation input signal and transmits it to the hydraulic valve core displacement sensor interface circuit, and then transmits it to the primary coil of the hydraulic valve core displacement sensor;
[0047] The processor is provided with an S1 synchronous A / D sampling interface and an S2 synchronous A / D sampling interface for collecting output signals of two secondary coils of the hydraulic valve spool displacement sensor;
[0048] The processor is also provided with an average value output interface for connecting to the signal output buffer circuit.
[0049] The conditioning circuit of the present invention, further, the bias adjustment amplifier circuit includes an operational amplifier U4, a capacitor C19, a resistor R6 and a resistor R2, and the operational amplifier U4 has pins 1, 2, 3, 4 and 8;
[0050] The capacitor C19 is connected to the excitation signal output port of the processor, the excitation signal is connected to the positive electrode of the capacitor C19, the negative electrode of the capacitor C19 is connected to the resistor R6 and then connected to the pin 2 of the operational amplifier U4, and the capacitor C19 is used to filter out the high-frequency noise of the excitation signal and play a role in direct current isolation;
[0051] The resistor R2 is connected between pin 1 and pin 2 of the operational amplifier U4 to form a negative feedback loop;
[0052] Pin 3 of the operational amplifier U4 is grounded, pin 4 is connected to a negative power supply voltage of -3.3v, and pin 8 is connected to a positive power supply voltage of +3.3v;
[0053] After being amplified, the excitation signal is output from pin 1 of the operational amplifier U4 as the excitation input signal of the hydraulic valve core displacement sensor.
[0054] The conditioning circuit of the present invention, further, the signal output buffer circuit comprises an operational amplifier U5 and a resistor R7, the operational amplifier U5 has pins 1, 2, 3, 4 and 8;
[0055] The signal output by the average value output interface of the processor is connected to the resistor R7, and the resistor R7 is further connected to the pin 3 of the operational amplifier U5, the pin 8 of the operational amplifier U5 is connected to the positive power supply voltage +3.3v, and the pin 4 is connected to the negative power supply voltage -3.3v;
[0056] Pin 2 of the operational amplifier U5 is connected to pin 1 and then to the OUT terminal for outputting the buffered signal.
[0057] The conditioning circuit of the present invention further comprises a power circuit including a connector, a power management chip U1, a power management chip U3, and capacitors C1, C2, C3, C4 and C5, wherein the power management chip U1 and the power management chip U3 are respectively provided with pins 1 to 8;
[0058] The connector is externally connected to a 24V DC power supply, and then connected to pin 8 of the power management chip U1 via the connector;
[0059] Pin 2 of the power management chip U1 is connected between the capacitor C1 and pin 1 of the power management chip U1;
[0060] Pins 3 and 5 of the power management chip U1 are both grounded;
[0061] Pin 6 and pin 7 of the power management chip U1 are connected to one end of the capacitor C1 at the same time, and the other end of the capacitor C1 is connected to pin 1 of the power management chip U1;
[0062] The positive electrodes of the capacitors C2 and C3 are connected to pin 1 respectively, and the negative electrodes are grounded respectively;
[0063] So that the positive terminal of capacitor C3 at pin 1 of power management chip U1 outputs 3.3V power;
[0064] Pin 8 of the power management chip U3 is connected to the 3.3v power supply; Pin 3 of the power management chip U3 is grounded;
[0065] The positive electrode of capacitor C4 is connected to pin 2 of power management chip U3, and the negative electrode of capacitor C4 is connected to pin 4 of power management chip U3;
[0066] Pin 5 of the power management chip U3 is connected to the negative electrode of the capacitor C5, and the positive electrode of the capacitor C5 is grounded;
[0067] This enables -3.3v power to be output at pin 5 of the power management chip U3 and the negative terminal of the capacitor C5.
[0068] An electronic device comprises a memory, a processor and a computer program stored in the memory and executed by the processor. When executing the computer program, the processor runs a digital conditioning method for a hydraulic valve core displacement sensor of the present invention.
[0069] A computer-readable storage medium comprising the digital conditioning method of the present invention stores a computer program, which, when executed, implements the digital conditioning method of a hydraulic valve core displacement sensor of the present invention.
[0070] The frequency and peak-to-peak value (the difference between the highest and lowest values of the signal in one cycle, i.e., the range between the maximum and the minimum) of the excitation signal in the present invention are generated by a preset processor (ARM or DSP) control algorithm and amplified by adjusting the bias amplifier circuit. The output signals of the two secondary coils of the valve differential transformer displacement sensor LVDT are sampled through the two A / D channels of the processor at a sampling frequency three times that of the excitation signal, and then the two sampled signals are respectively subjected to digital moving average filtering to filter out noise and smooth the signal. The obtained signal is applied with discrete Hilbert transform to obtain a complex signal. By analyzing the complex form of the signal, the amplitude and phase information can be extracted, the instantaneous phase difference between the S1 transformation data and the S2 transformation data is calculated, and the S1 transformation data is adjusted for phase compensation to obtain the S11 transformation data, so that the phase difference between the S11 transformation data and the S2 transformation data is 180 degrees (dynamic adjustment). The real parts of the S11 transformation data and the S2 transformation data signals are extracted to calculate the absolute value difference and form a half wave. A Butterworth low-pass filter is designed and applied to remove high-frequency noise, and the DC component of the filtered signal is calculated to obtain the average value of the signal. The average value is output to the signal output buffer circuit through the D / A channel to obtain an analog voltage signal corresponding to the displacement.
[0071] The present invention effectively eliminates the phase difference caused by the core position offset by introducing discrete Hilbert transform and phase compensation technology, thereby improving the measurement accuracy and system reliability of the hydraulic valve core displacement sensor. Two digital filtering measures (digital moving average filtering and Butterworth low-pass filtering) and discrete Hilbert transform are used to achieve multi-level filtering and processing of signals, ensuring smooth signals and effective noise removal. All signal processing steps are completed on the ARM processor, which simplifies the hardware design, reduces the use of external components, and facilitates system integration and miniaturization. The output is an analog voltage signal through a digital-to-analog converter (D / A), which improves the stability and accuracy of the signal output. The method has broad application prospects in the fields of industrial automation and control. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 It is a work flow chart of the present invention;
[0073] Figure 2 It is a block diagram of the working principle of the present invention;
[0074] Figure 3 It is a schematic diagram of a bias adjustment amplifier circuit in the present invention;
[0075] Figure 4 is a schematic diagram of a signal output buffer circuit in the present invention;
[0076] Figure 5 It is a schematic diagram of the interface circuit of the hydraulic valve core displacement sensor in the present invention;
[0077] Figure 6 is a schematic diagram of a power supply circuit in the present invention;
[0078] Figure 7 is a signal curve diagram before and after phase compensation in the present invention;
[0079] Figure 8 yes Figure 7 A partial enlarged view of the mid-axial area;
[0080] Fig. 9 It is a half-wave signal curve diagram formed when |S11|>|S2| in the present invention;
[0081] Fig.10 It is a half-wave signal curve diagram formed when |S2|>|S11| in the present invention;
[0082] Fig.11 It is a curve diagram outputted after the present invention performs Butterworth digital filtering on the half-wave signal;
[0083] Fig.12is a linear correspondence diagram between the analog voltage signal outputted in step 7) of the present invention and the displacement data;
[0084] Figure 2 The dashed box in the middle represents a device or circuit;
[0085] The dot-dash line represents the signal transmission route;
[0086] The solid line represents the power transmission route;
[0087] In the figure: Q1-half-wave signal, Q2-low-pass filter smoothing curve, Q3-average value curve. DETAILED DESCRIPTION
[0088] The following is combined with Figure 1-12 The technical solution of the present invention is further illustrated by specific implementation methods.
[0089] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on this patent; in order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0090] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "inner", "outer", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as a limitation on this patent. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0091] In the description of the present invention, unless otherwise clearly specified and limited, if the term "connection" or the like appears to indicate the connection relationship between components, the term should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two components or the interaction relationship between two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0092] Before specifically describing a digital conditioning method for a hydraulic valve core displacement sensor of the present invention, it is necessary to describe in detail the hardware environment in which the method is run, that is, the conditioning circuit for implementing the digital conditioning method for the hydraulic valve core displacement sensor of the present invention. Figure 2-6 As shown,
[0093] The conditioning circuit includes: a processor, a bias adjustment amplifier circuit, a hydraulic valve core displacement sensor interface circuit, a signal output buffer circuit and a power supply circuit, wherein the processor can be selected to use ARM or DSP; this embodiment takes ARM as an example,
[0094] The power supply circuit outputs 3.3v DC power to the processor (ARM), outputs ±3.3v DC power to the bias adjustment amplifier circuit and the signal output buffer circuit respectively, and outputs 24v DC power to the hydraulic valve core displacement sensor interface circuit; of course, the power output to the LVDT here can also be directly supplied by an external 24v DC power supply.
[0095] The processor (ARM) is provided with an excitation signal output port for outputting an excitation signal to the bias adjustment amplifier circuit;
[0096] The bias adjustment amplifier circuit adjusts the excitation signal to an excitation input signal and transmits it to the hydraulic valve core displacement sensor interface circuit, and then transmits it to the primary coil of the hydraulic valve core displacement sensor;
[0097] The processor (ARM) is provided with an S1 synchronous A / D sampling interface and an S2 synchronous A / D sampling interface, which are used to collect the output signals of the two secondary coils of the hydraulic valve core displacement sensor;
[0098] The processor is also provided with an average value output interface for connecting to a signal output buffer circuit.
[0099] This needs to be combined Figure 5 The interface circuit of the hydraulic valve core displacement sensor (LVDT) in the embodiment of the present invention is used to illustrate the port connection form of the LVDT when the present invention is running. The LVDT is provided with a connector P2, specifically: the primary coil of the LVDT is connected to the port 6 of P2, and the excitation input signal S0 generated by the bias amplifier circuit is connected to the primary coil of the LVDT through the port 6 of P2. The ground corresponding to the primary coil of the LVDT is connected to the port 5 of P2; the secondary coil 1 of the LVDT is output through the port 3 of P2, and the ground corresponding to the secondary coil 1 is connected to the port 2 of P2; the secondary coil 2 of the LVDT is output through the port 4 of P2, and the ground corresponding to the secondary coil 2 is connected to the port 1 of P2.
[0100] Furthermore, the bias adjustment amplifier circuit, such as Figure 3As shown, it includes an operational amplifier U4 (TLV2372ID), a capacitor C19 (10µF, 16V), a resistor R6 (10K) and a resistor R2 (20K). The operational amplifier U4 has pins 1, 2, 3, 4 and 8. In this embodiment, the operational amplifier U4 adopts the TLV2372ID model. In this embodiment, the 5, 6 and 7 pins of the operational amplifier U4 are not used.
[0101] Capacitor C19 is connected to the excitation signal output port of the processor, the excitation signal (DAC) is connected to the positive electrode of capacitor C19, the negative electrode of capacitor C19 is connected to resistor R6 and then connected to pin 2 of operational amplifier U4. Capacitor C19 is used to filter out the high-frequency noise of the excitation signal DAC and play a DC isolation role; R6 limits the input current of the input operational amplifier and plays a role in protecting the circuit.
[0102] Resistor R2 is connected between pin 1 and pin 2 of operational amplifier U4 to form a negative feedback loop;
[0103] Pin 3 of the operational amplifier U4 is grounded, pin 4 is connected to a negative power supply voltage of -3.3v, and pin 8 is connected to a positive power supply voltage of +3.3v;
[0104] After being amplified, the excitation signal is output from pin 1 of the operational amplifier U4 through the connection point S0 as the excitation input signal of the hydraulic valve spool displacement sensor.
[0105] Of course, under the technical measures provided by this circuit, the frequency and amplitude of the sine wave can be changed by modifying the code, and the amplitude of the excitation signal can be changed by adjusting the ratio of R2 and R6 of the bias amplifier circuit.
[0106] Further, the signal output buffer circuit, such as Figure 4 As shown, it includes an operational amplifier U5 (TLV2372ID) and a resistor R7 (10K). The operational amplifier U5 has pins 1, 2, 3, 4 and 8. In this embodiment, the operational amplifier U5 model also adopts TLV2372ID, and its pins 5, 6 and 7 are not used in this embodiment.
[0107] The average value output signal OUTPUT of the processor is connected to resistor R7 (10K), resistor R7 is connected to pin 3 of operational amplifier U5, pin 8 of operational amplifier U5 is connected to positive power supply voltage +3.3v, and pin 4 is connected to negative power supply voltage -3.3v; thus, output of +3.3v and -3.3v is realized.
[0108] Pin 2 of operational amplifier U5 is connected to pin 1 and then to the OUT terminal for outputting the buffered signal. The output signal represents the precise displacement of the hydraulic valve core, achieving high-precision displacement measurement.
[0109] Furthermore, the power supply circuit is as follows Figure 6 As shown, it includes a connector CN1, a power management chip U1, a power management chip U3, and capacitors C1, C2, C3, C4 and C5. The power management chip U1 and the power management chip U3 are respectively provided with pins 1 to 8; in this embodiment, the power management chip U1 adopts LP2951ACMX, and the power management chip U3 adopts MAX660CSA+.
[0110] The connector is connected to an external 24V DC power supply, and then connected to pin 8 of the power management chip U1 through the connector;
[0111] Pin 2 of the power management chip U1 is connected between capacitor C1 and pin 1 of the power management chip U1; capacitor C1 is used for high-frequency noise filtering and can provide a low-impedance path to reduce the amplitude of these high-frequency components and ensure the stability of the output voltage.
[0112] Pins 3 and 5 of the power management chip U1 are both grounded;
[0113] Pin 6 and pin 7 of the power management chip U1 are connected to one end of the capacitor C1 at the same time, and the other end of the capacitor C1 is connected to pin 1 of the power management chip U1;
[0114] The positive electrodes of capacitors C2 and C3 are connected to pin 1, and the negative electrodes are grounded. Capacitors C2 and C3 are used to further filter and stabilize the output voltage.
[0115] So that the positive terminal of capacitor C3 at pin 1 of power management chip U1 outputs 3.3V power;
[0116] Pin 8 of the power management chip U3 is connected to a 3.3v power supply; Pin 3 of the power management chip U3 is grounded;
[0117] The positive electrode of capacitor C4 is connected to pin 2 of power management chip U3, and the negative electrode of capacitor C4 is connected to pin 4 of power management chip U3; capacitor C4 is charged and discharged alternately, playing the role of storing and transferring charge;
[0118] Pin 5 of the power management chip U3 is connected to the negative electrode of the capacitor C5, and the positive electrode of the capacitor C5 is grounded;
[0119] This enables -3.3v power to be output at pin 5 of the power management chip U3 and the negative terminal of the capacitor C5.
[0120] After describing the operating environment of the present invention, a digital conditioning method for a hydraulic valve core displacement sensor of the present invention is described in detail below. Figure 1 , 2 As shown, follow these steps to run:
[0121] 1) Excitation signal formation,
[0122] An excitation signal with a frequency of f and an amplitude of Av is formed by the processor; specifically, this embodiment selects an ARM master MCU with two D / A channels, two A / D channels and a CMSIS DSP instruction set; ARM generates a sinusoidal wave excitation signal with a frequency of 5.077kHz and a peak-to-peak value of 2.23V through code; and it is output by the D / A channel.
[0123] 2) Amplification of excitation signal,
[0124] The excitation signal generated in the previous step is adjusted to an excitation input signal with a frequency of f and an amplitude of n×Av through a bias adjustment amplifier circuit; n is 2-8; the excitation input signal is input into the primary coil of the hydraulic valve core displacement sensor; in this embodiment, n is 2, and the excitation input signal after bias adjustment amplification is: a sinusoidal wave signal with a frequency of 5.077kHz and a peak-to-peak value of 4.46V.
[0125] 3) Sampling and filtering,
[0126] The processor (ARM) synchronously samples the output signals of the two secondary coils of the hydraulic valve core displacement sensor respectively, and filters them respectively, to obtain two filtered secondary coil output signal S1 data and S2 data;
[0127] In the signal sampling and primary filtering part, the two secondary coil output signals of the valve LVDT are synchronously sampled through the two A / D channels of the ARM at a sampling frequency three times that of the excitation signal. The sampled signals are filtered by digital moving average to filter out noise and smooth the signals. The window size of the digital moving average filter is determined according to the sampling rate and the frequency of the excitation signal to optimize the signal smoothing effect.
[0128] 4.1), Discrete Hilbert Transform,
[0129] Performing discrete Hilbert transform on the two filtered secondary coil output signals S1 data and S2 data obtained in step 3), respectively analyzing the amplitude and phase information of the filtered signals to obtain complex signals, wherein the complex signals are S1 transformed data and S2 transformed data;
[0130] The specific steps of discrete Hilbert transform in step 4.1) are:
[0131] For a discrete signal X[n], the Hilbert transform is implemented by the following steps:
[0132] a) Fourier transform: Perform fast Fourier transform (FFT) on the signal: X[f]=FFT(X[n]);
[0133] b), Frequency-domain filtering: Construct a filter H[f] with the following spectrum:
[0134] ,
[0135] where N is the length of the signal, i.e., the total number of data points in the discrete signal X[n], n is the discrete-time index of the signal, ranging from 0 to N - 1, and f is the frequency;
[0136] The frequency response H[f] of the discrete Hilbert transform filter is divided into three parts in the frequency domain:
[0137] Positive frequency part 0 < f < N / 2: In the positive frequency range, the response of the filter is 1,
[0138] Zero frequency and Nyquist frequency parts f = 0 or f = N / 2: At zero frequency and Nyquist frequency, the response of the filter is 0,
[0139] Negative frequency part -N / 2 < f < 0: In the negative frequency range, the response of the filter is -1;
[0140] c) Apply the filter: Apply the filter to the result of the Fourier transform: Y[f] = X[f] ⋅ H[f];
[0141] d) Inverse Fourier transform: Perform the inverse Fourier transform on the filtered signal: Y[n] = IFFT(Y[f]);
[0142] e) The obtained Y[n] is the Hilbert transform of the signal X[n], and the original signal X[n] and Y[n] form an analytic signal: Z[n] = X[n] + jY[n],
[0143] The analytic signal Z[n] is used to calculate the instantaneous phase of the original signal X[n]:
[0144] Instantaneous phase: ;
[0145] Convert the filtered real signal to a complex signal through the Hilbert transform, and extract the real part information X[n] and phase information ϕ[n] from the analytic signal.
[0146] 4.2), Phase difference compensation,
[0147] Calculate the instantaneous phase difference between the S1-transformed data and the S2-transformed data, and perform phase compensation on the S1-transformed data to obtain the S11-transformed data, so that the phase difference between the S11-transformed data and the S2-transformed data is adjusted to 180 degrees;
[0148] The phase difference compensation step includes: processing the instantaneous phases of the two secondary coils by a phase unwrapping algorithm to ensure the continuity of the phases; calculating the difference between the two instantaneous phases and compensating the difference to adjust it to 180 degrees.
[0149] The working principle of LVDT is based on electromagnetic induction and magnetic coupling. Due to the asymmetry of magnetic coupling, the induced electromotive force of the two secondary coils will have a non-180° phase difference. This will cause a deviation when calculating the amplitude difference of the two signals. In order to eliminate this deviation, the phase difference is calculated and compensated. The phase of S1 is compensated to obtain S11, so that the phase difference between S11 and S2 is 180 degrees (dynamic adjustment). Figure 7 , 8 shown.
[0150] 5) Digital low-pass filtering,
[0151] Extract the real part of the S11 transform data obtained in step 4.2) and the S2 transform data obtained in step 4.1), calculate the absolute difference, and form a half wave;
[0152] Then, Butterworth low-pass filtering is used to remove high-frequency noise while retaining the DC component of the signal, resulting in Fig.11 The smooth curve Q2, i.e. the trend line, is filtered by medium and low pass;
[0153] The intention of extracting the real part of the present invention is particularly explained here: the discrete Hilbert transform obtains a complex signal, and the real part represents the original signal, including the phase information of the signal, directly reflects the actual change of the signal, and can provide more accurate instantaneous information; the amplitude is the modulus of the complex signal, which reflects the overall strength of the signal, does not contain phase information, and may ignore some detailed changes. Calculating the real part difference is relatively simple, and there is no need to calculate the modulus of the complex number. Therefore, in the present invention, it is chosen to extract the real part after calculating the instantaneous phase through the discrete Hilbert transform and compensating for the phase difference, rather than calculating the complex amplitude. The operating efficiency of the present invention is improved.
[0154] During the operation of the LVDT, when the core is in the middle position, the coupling (mutual inductance) between the secondary coil 1 and the secondary coil 2 and the primary coil is equal, that is, the induced electromotive force of the two coils is equal. Since the outputs of the two secondary coils are connected in series in reverse, the phase difference is 180°, so the output voltage is zero.
[0155] When the core moves from the middle position to the secondary coil 1, the mutual inductance between the secondary coil 1 and the primary coil increases, and the induced electromotive force increases. The mutual inductance between the secondary coil 2 and the primary coil decreases, and the induced electromotive force decreases. That is, |S11|>|S2|, the absolute value difference of the amplitude is |S11| - |S2|, in this case, the negative sign is defined, and the final half-wave signal Q1 is -(|S11|- |S2|), such as Fig. 9 .
[0156] When the core moves from the middle position to the secondary coil 2, the mutual inductance between the secondary coil 2 and the primary coil increases, and the induced electromotive force increases. The mutual inductance between the secondary coil 1 and the primary coil decreases, and the induced electromotive force decreases. That is, |S2|>|S11|, the absolute value difference of the amplitude is |S2| - |S11|, in this case, the positive sign is defined, and the final half-wave signal Q1 is |S2| -|S11|, such as Fig.10 .
[0157] The direction information (positive or negative sign) is combined with the amplitude difference to form a half-wave signal with direction information. In this way, the direction information of the signal can be embedded in the amplitude calculation, thereby indicating the size and direction of the displacement signal. This enables the LVDT to accurately measure linear displacement.
[0158] 6) Average value calculation,
[0159] The low-pass filter smoothing curve Q2 obtained in step 5) is averaged to obtain the average value, such as Fig.11 The average value curve Q3 obtained in Fig.11 a dotted line at the middle level;
[0160] 7) Output the average value and perform signal buffering.
[0161] The average value (ie, digital voltage signal) obtained in step 6) is output to the signal output buffer circuit through the D / A channel to obtain an analog voltage signal corresponding to the displacement; completed.
[0162] Combination Fig.12 Further explanation: This figure is the result of using the digital conditioning method of the present invention to condition the LVDT displacement sensor with a range of ±10mm, that is, the linear correspondence between the displacement signal of the sensor and the analog voltage signal of the conditioning output. It can be seen that the method of the present invention can linearly condition the displacement signal of the LVDT displacement sensor. Before using the method of the present invention, the corresponding LVDT displacement sensor should be calibrated within the range. In view of the fact that the technical measures are easy to implement by those skilled in the art under the enlightenment of the present invention, they will not be repeated in the present invention.
[0163] When developing the digital conditioning algorithm in Matlab, the half-wave signal Q1 is subjected to Butterworth digital filtering and average value calculation. After Butterworth digital filtering, the low-pass filter smoothing curve Q2 is output, as shown in Fig.11 As shown, after calculating the average value, the average value curve Q3 is output. Fig.11 It can be clearly seen that the calculation of the average value can effectively eliminate low-frequency drift, making the signal smoother and more stable, and significantly improving the accuracy of signal processing.
[0164] Most of the existing conditioning circuits use integrator circuits (analog devices) to calculate the average value. The accuracy of this circuit is affected by component parameters and the environment, and the parameters are not easy to adjust. Compared with integrator circuits, digital average calculation has higher accuracy and stability, greater flexibility and programmability.
[0165] It is specially noted here that all waveforms given in the embodiments of the present invention and the accompanying drawings are only schematic diagrams of the explanation of the steps and performance of the digital conditioning algorithm using continuous signals in the process of developing the digital conditioning method by Matlab. When the present method is actually applied, all signals are digital signals after sampling. In view of the fact that the explanation method is easy to understand for those skilled in the art under the enlightenment of the present invention, it will not be repeated in the present invention. The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executed by the processor. When the processor executes the computer program, it realizes the digital conditioning method of the hydraulic valve spool displacement sensor.
[0166] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed, a digital conditioning method for a hydraulic valve core displacement sensor is implemented.
[0167] It should be noted that the above specific implementations are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art should understand that various modifications, equivalent substitutions, changes, etc. can be made to the present invention based on the technical content disclosed in this application document. However, as long as these changes do not deviate from the spirit of the present invention, they should be within the scope of protection of the present invention. In addition, some terms used in the specification and claims of this application are not restrictive, but are only for the convenience of description.
Claims
1. A digital conditioning method for a hydraulic valve core displacement sensor, characterized in that: Run as follows: 1). Generation of excitation signal The processor generates an excitation signal with a frequency of f and an amplitude of Av. 2). Amplification of excitation signal The excitation signal is adjusted by a bias amplification circuit to an excitation input signal with a frequency of f and an amplitude of n×Av; n ranges from 2 to 8; the excitation input signal is input into the primary coil of the hydraulic valve spool displacement sensor. 3). Sampling and filtering The processor synchronously samples the output signals of the two secondary coils of the hydraulic valve spool displacement sensor respectively and filters them respectively to obtain two sets of filtered secondary coil output signal data S1 and S2. 4.1). Discrete Hilbert transform Perform discrete Hilbert transform on the two sets of filtered secondary coil output signal data S1 and S2 obtained in step 3), and analyze the amplitude and phase information of the filtered signals respectively to obtain complex signals, where the complex signals are S1 transform data and S2 transform data. 4.2). Phase difference compensation Calculate the instantaneous phase difference between the S1 transform data and the S2 transform data, and perform phase compensation on the S1 transform data to obtain S11 transform data, so that the phase difference between the S11 transform data and the S2 transform data is adjusted to 180 degrees. 5). Digital low-pass filtering Extract the real part of the S11 transform data obtained in step 4.2) and the real part of the S2 transform data obtained in step 4.1), calculate the absolute difference, and form a half-wave. Then adopt Butterworth low-pass filtering measures to remove high-frequency noise to obtain a low-pass filtered smooth curve. 6). Average value calculation Calculate the average value of the low-pass filtered smooth curve obtained in step 5) to obtain the average value. 7). Output of average value and signal buffering Output the average value obtained in step 6) through the D / A channel to the signal output buffer circuit to obtain an analog voltage signal corresponding to the displacement.
2. A digital conditioning method for a hydraulic valve core displacement sensor according to claim 1, characterized in that: The specific steps of the discrete Hilbert transform in step 4.1) are as follows: For the discrete signal X[n], the Hilbert transform is realized through the following steps: a). Fourier transform: Perform a fast Fourier transform (FFT) on the signal: X[f]=FFT(X[n]); b). Frequency domain filtering: Construct a filter H[f], and its frequency spectrum is as follows: , where N is the length of the signal, that is, the total number of data points in the discrete signal X[n], n is the discrete time index of the signal, ranging from 0 to N - 1, and f is the frequency. The frequency response H[f] of the discrete Hilbert transform filter is divided into three parts in the frequency domain: Positive frequency part 0 < f < N / 2: In the positive frequency range, the response of the filter is 1. Zero frequency and Nyquist frequency parts f = 0 or f = N / 2: At the zero frequency and Nyquist frequency, the response of the filter is 0. Negative frequency part -N / 2 < f < 0: In the negative frequency range, the response of the filter is -1. c). Apply the filter: Apply the filter to the result of the Fourier transform: Y[f]=X[f]⋅H[f]; d). Inverse Fourier transform: Perform an inverse Fourier transform on the filtered signal: Y[n]=IFFT(Y[f]); e) The obtained Y[n] is the Hilbert transform of the signal X[n]. The original signal X[n] and Y[n] form the analytical signal: Z[n] = X[n] + jY[n], The analytical signal Z[n] is used to calculate the instantaneous phase of the original signal X[n]: Instantaneous phase: ; The filtered real signal is converted into a complex signal through Hilbert transform, and the real part information X[n] and phase information φ[n] are extracted from the analytical signal.
3. The digital conditioning method for a hydraulic valve core displacement sensor according to claim 1 is characterized in that: The phase difference compensation step in step 4.2) includes: processing the instantaneous phases of the two secondary coils by a phase unwrapping algorithm to ensure the continuity of the phases; calculating the difference between the two instantaneous phases and compensating the difference to adjust it to 180 degrees.
4. The digital conditioning method for a hydraulic valve core displacement sensor according to claim 1 is characterized in that: The Butterworth low-pass filter in step 5) removes high-frequency noise by removing the high-frequency noise and retaining the DC component of the signal.
5. A conditioning circuit for implementing the digital conditioning method of any hydraulic valve core displacement sensor in claims 1-4, characterized in that: The conditioning circuit includes: a processor, a bias adjustment amplifier circuit, a hydraulic valve core displacement sensor interface circuit, a signal output buffer circuit and a power supply circuit. The power supply circuit outputs 3.3V DC power to the processor, outputs ±3.3V DC power to the bias adjustment amplifier circuit and the signal output buffer circuit respectively, and outputs 24V DC power to the hydraulic valve spool displacement sensor interface circuit; The processor is provided with an excitation signal output port for outputting an excitation signal to the bias adjustment amplifier circuit; The bias adjustment amplifier circuit adjusts the excitation signal to an excitation input signal and transmits it to the hydraulic valve core displacement sensor interface circuit, and then transmits it to the primary coil of the hydraulic valve core displacement sensor; The processor is provided with an S1 synchronous A / D sampling interface and an S2 synchronous A / D sampling interface for collecting output signals of two secondary coils of the hydraulic valve spool displacement sensor; The processor is also provided with an average value output interface for connecting to the signal output buffer circuit.
6. The conditioning circuit according to claim 5, characterized in that: The bias adjustment amplifier circuit includes an operational amplifier U4, a capacitor C19, a resistor R6 and a resistor R2, and the operational amplifier U4 has pins 1, 2, 3, 4 and 8; The capacitor C19 is connected to the excitation signal output port of the processor, the excitation signal is connected to the positive electrode of the capacitor C19, the negative electrode of the capacitor C19 is connected to the resistor R6 and then connected to the pin 2 of the operational amplifier U4, and the capacitor C19 is used to filter out the high-frequency noise of the excitation signal and play a role in direct current isolation; The resistor R2 is connected between pin 1 and pin 2 of the operational amplifier U4 to form a negative feedback loop; Pin 3 of the operational amplifier U4 is grounded, pin 4 is connected to a negative power supply voltage of -3.3v, and pin 8 is connected to a positive power supply voltage of +3.3v; After being amplified, the excitation signal is output from pin 1 of the operational amplifier U4 as the excitation input signal of the hydraulic valve core displacement sensor.
7. The conditioning circuit according to claim 5, characterized in that: The signal output buffer circuit includes an operational amplifier U5 and a resistor R7, wherein the operational amplifier U5 has pins 1, 2, 3, 4 and 8; The signal output by the average value output interface of the processor is connected to the resistor R7, and the resistor R7 is further connected to the pin 3 of the operational amplifier U5, the pin 8 of the operational amplifier U5 is connected to the positive power supply voltage +3.3v, and the pin 4 is connected to the negative power supply voltage -3.3v; Pin 2 of the operational amplifier U5 is connected to pin 1 and then to the OUT terminal for outputting the buffered signal.
8. The conditioning circuit according to claim 5, characterized in that: The power circuit includes a connector, a power management chip U1, a power management chip U3, and capacitors C1, C2, C3, C4 and C5. The power management chip U1 and the power management chip U3 are respectively provided with pins 1 to 8; The connector is externally connected to a 24V DC power supply, and then connected to pin 8 of the power management chip U1 via the connector; Pin 2 of the power management chip U1 is connected between the capacitor C1 and pin 1 of the power management chip U1; Pins 3 and 5 of the power management chip U1 are both grounded; Pin 6 and pin 7 of the power management chip U1 are connected to one end of the capacitor C1 at the same time, and the other end of the capacitor C1 is connected to pin 1 of the power management chip U1; The positive electrodes of the capacitors C2 and C3 are connected to pin 1 respectively, and the negative electrodes are grounded respectively; So that the positive terminal of capacitor C3 at pin 1 of power management chip U1 outputs 3.3V power; Pin 8 of the power management chip U3 is connected to the 3.3v power supply; Pin 3 of the power management chip U3 is grounded; The positive electrode of capacitor C4 is connected to pin 2 of power management chip U3, and the negative electrode of capacitor C4 is connected to pin 4 of power management chip U3; Pin 5 of the power management chip U3 is connected to the negative electrode of the capacitor C5, and the positive electrode of the capacitor C5 is grounded; This enables -3.3v power to be output at pin 5 of the power management chip U3 and the negative terminal of the capacitor C5.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executed by the processor, characterized in that: When executing the computer program, the processor implements the digital conditioning method for the hydraulic valve core displacement sensor described in any one of claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed, the digital conditioning method of the hydraulic valve core displacement sensor described in any one of claims 1-8 is implemented.
