Summary of the invention
In order to overcome existing analog-driven flowtube amplitude control method and using the Digitized Closed Loop system of FPGA
The deficiency of control method, the present invention provide a kind of Coriolis mass flowmeter amplitude control method based on digital drive-type, adopt
To DSP28335 processor be core processing unit, by flowtube open vibration signal sample, and with preset
Value subtracts each other to obtain basic deviation value, the difference summation that is then calculated again by the basic deviation, every time and basic deviation it is opposite
Deviation constitutes control amount by linear combination and carries out amplitude control to flowtube, is adjusted using the pid parameter based on magnitude margin
Method determines the target letter of amplitude adjusted according to the sampling period in flowtube amplitude-frequency response sensitivity section and discretized system
Number finally calculates one group of optimal control parameter value and realizes optimal parameter setting to closed-loop system, shakes to reach to flowtube
Dynamic system enters effective control of saturation integral domain, when control amount enters saturation region, only accumulates the negative bias of basic deviation item
Residual quantity, and without increasing the cumulative of integral term, vibrating tube steady-state error, increase rate control precision are eliminated with this.
The present invention solves the technical solution that its technical problem is taken comprising the steps of:
Step 1: opening vibration signal to CMF flowtube carries out analog-to-digital conversion (Analog-to-Digital, AD) sampling, use
Converter samples CMF vibrating flow tube signal and exports its digital value sequence to get to being forced to amplitude data, according to
CMF flowtube 1Hz/1mv drives principle that vibrating flow tube amplitude set value V is arrangeds, the flowtube width of k-th of AD sampling output
Angle value and vibrating flow tube amplitude set value VsDifference indicate that e (k-1) indicates (k-1) a AD sampling output with e (k)
Flowtube range value and vibrating flow tube amplitude set value VsDifference, using difference equation
U (k)=Kp[e(k)+Ki∑e(k)+Kd(e(k)-e(k-1))] (1)
The control amount U (k) of CMF closed loop self oscillatory system controller output is solved, wherein Kp、KiAnd KdRespectively indicate ratio
Example constant, integral constant and derivative constant;
Step 2: oscillograph acquires CMF flowtube pumping signal amplitude, the stream then acquired with converter in step 1
Buret is forced to amplitude data and carries out logistic fit, the relation curve side for obtaining the control amount of driving voltage and being forced between amplitude
Journey, the logistic fit curvilinear equation that will be obtained
Y=0.5177ln (x) -0.4813 (2)
Governing equation is adjusted as amplitude, wherein x is the control amount of driving signal, and y is to be forced to amplitude;
Step 3: the objective function for defining amplitude adjusted is F (Kp, Ki, Kd), objective function F (Kp, Ki, Kd) meet F
(Kp, Ki, Kd)=ε1σ+ε2ts+ε3N, and the weighting coefficient ε of parameter1、ε2、ε3Meet relationship
ε1+ε2+ε3=1, wherein σ is overshoot, tsFor system regulating time, N is flowtube amplitude response threshold range,
Objective function, proportionality constant and integral constant meet following constraint condition:
Guarantee weighting coefficient ε1+ε2+ε3Under conditions of=1, first from proportionality constant KpStart to adjust, then adjusts integral constant
Ki, finally adjust derivative constant Kd, the proportionality constant for meeting formula (3), integral constant and derivative constant are sequentially found, by showing
Wave device observation window monitors the variation of vibrating flow tube amplitude, and parameter specifically adjusts principle are as follows:
When the amplitude oscillation data on oscillograph show that amplitude oscillation frequency is greater than 20 times/second, by proportionality constant KpAdd
0.03, otherwise do not adjust;When the amplitude read in the scale value from oscillograph deviates setting amplitude VsFall velocity value it is big
In 0.5 second, then by integral constant KiSubtract 0.03, does not otherwise adjust;When the difference of flowtube oscillations Amplitude maxima and minimum value
Beyond amplitude response threshold range N, then by derivative constant KdSubtract 0.03, does not otherwise adjust;
According to the above principle and sequence adjustment proportionality constant, integral constant and derivative constant, so that the amplitude wave of flowtube
Dynamic range is lower than 0.2mv;
Step 4: difference e (k), e (k-1), e (k-2) to be substituted into the error increment equation Δ U (k) of PID output control amount
=U (k)-U (k-1), obtains Δ U (k) are as follows:
Δ U (k)=Kp(e(k)-e(k-1))+Kie(k)+Kd(e(k)-2e(k-1)+e(k-2)) (4)
Wherein, e (k-2) indicates the flowtube range value and vibrating flow tube amplitude set of (k-2) a AD sampling output
Value VsDifference bring formula (2) input parameter x into using Δ U (k) as the drive control amount to flowtube, obtain forced oscillation
Width;
The control amount U (k) for calculating current time, judges whether control amount U (k) exceeds amplitude response threshold range N,
N=[Umax, Umin], amplitude response upper bound Umax=Vs+ 0.2, amplitude response lower bound Umin=Vs- 0.2, work as U
(k) when exceeding amplitude response threshold range N, by K in formula (4)i0 implementation anti-saturation integral separation is set, so that flowtube amplitude
Fluctuation range is lower than 0.2mv.
The beneficial effects of the invention are as follows tune ginseng is carried out due to using the pid parameter setting method based on magnitude margin, lead to
The sampling period for crossing optimization flowtube amplitude-frequency response sensitivity section and raising discretized system determines amplitude adjusted objective function.
The constraint condition that objective function, proportionality constant and integral constant meet is solved, then verifies optimal proportionality constant Kp, integral constant
Ki, derivative constant Kd, complete optimal parameter setting.The limit range of drive control amount output is set, is overcome due to opening amplitude
Output supersaturated amplitude out-of-control phenomenon caused by increasing in short-term.Small flow is unable to satisfy compared to conventional analog circuits driving method
The control precision of liquid quality stream discharge amplitude, changes insensitive disadvantage to flowtube amplitude under two phase flow/batch of material stream situation, this
The method of invention improves the speed of amplitude response, using the method optimizing amplitude tracking performance of Digital Signal Processing, so that
Flowtube can maintain stable amplitude with the actuation techniques index of 1Hz/1mv, ensure that high-precision frequency, phase difference output.Phase
Than the CMF Digitized Closed Loop control system that FPGA hardware circuit is realized, the hardware resource that this method uses is less, does not need to carry out
The design of complicated kernel circuitry, reduces enterprise's use cost.
Specific embodiment
Present invention will be further explained below with reference to the attached drawings and examples.
Step 1: opening vibration signal to CMF flowtube carries out analog-to-digital conversion (Analog-to-Digital, AD) sampling, use
Converter samples CMF vibrating flow tube signal and exports its digital value sequence to get to being forced to amplitude data, according to
CMF flowtube 1Hz/1mv drives principle that vibrating flow tube amplitude set value V is arrangeds, the flowtube width of k-th of AD sampling output
Angle value and vibrating flow tube amplitude set value VsDifference indicate that e (k-1) indicates (k-1) a AD sampling output with e (k)
Flowtube range value and vibrating flow tube amplitude set value VsDifference, using difference equation
U (k)=Kp[e(k)+Ki∑e(k)+Kd(e(k)-e(k-1))] (1)
The control amount U (k) of CMF closed loop self oscillatory system controller output is solved, wherein Kp、KiAnd KdRespectively indicate ratio
Example constant, integral constant and derivative constant;
Step 2: oscillograph acquires CMF flowtube pumping signal amplitude, the stream then acquired with converter in step 1
Buret is forced to amplitude data and carries out logistic fit, the relation curve side for obtaining the control amount of driving voltage and being forced between amplitude
Journey, the logistic fit curvilinear equation that will be obtained
Y=0.5177ln (x) -0.4813 (2)
Governing equation is adjusted as amplitude, wherein x is the control amount of driving signal, and y is to be forced to amplitude;
Step 3: the objective function for defining amplitude adjusted is F (Kp, Ki, Kd), objective function F (Kp, Ki, Kd) meet F
(Kp, Ki, Kd)=ε1σ+ε2ts+ε3N, and the weighting coefficient ε of parameter1、ε2、ε3Meet relationship
ε1+ε2+ε3=1, wherein σ is overshoot, tsFor system regulating time, N is flowtube amplitude response threshold range,
Objective function, proportionality constant and integral constant meet following constraint condition:
Guarantee weighting coefficient ε1+ε2+ε3Under conditions of=1, first from proportionality constant KpStart to adjust, then adjusts integral constant
Ki, finally adjust derivative constant Kd, the proportionality constant for meeting formula (3), integral constant and derivative constant are sequentially found, by showing
Wave device observation window monitors the variation of vibrating flow tube amplitude, and parameter specifically adjusts principle are as follows:
When the amplitude oscillation data on oscillograph show that amplitude oscillation frequency is greater than 20 times/second, by proportionality constant KpAdd
0.03, otherwise do not adjust;When the amplitude read in the scale value from oscillograph deviates setting amplitude VsFall velocity value it is big
In 0.5 second, then by integral constant KiSubtract 0.03, does not otherwise adjust;When the difference of flowtube oscillations Amplitude maxima and minimum value
Beyond amplitude response threshold range N, then by derivative constant KdSubtract 0.03, does not otherwise adjust;
According to the above principle and sequence adjustment PID proportionality constant, integral constant and derivative constant, so that the amplitude of flowtube
Fluctuation range is lower than 0.2mv;
Step 4: difference e (k), e (k-1), e (k-2) to be substituted into the error increment equation Δ U (k) of PID output control amount
=U (k)-U (k-1), obtains Δ U (k) are as follows:
Δ U (k)=Kp(e(k)-e(k-1))+Kie(k)+Kd(e(k)-2e(k-1)+e(k-2)) (4)
Wherein, e (k-2) indicates the flowtube range value and vibrating flow tube amplitude set of (k-2) a AD sampling output
Value VsDifference bring formula (2) input parameter x into using Δ U (k) as the drive control amount to flowtube, obtain forced oscillation
Width;
The control amount U (k) for calculating current time judges whether control amount U (k) exceeds amplitude response threshold range N,
N=[Umax, Umin], amplitude response upper bound Umax=Vs+ 0.2, amplitude response lower bound Umin=Vs- 0.2, if U
(k) > Umax accumulates negative bias residual quantity, and the correspondence control amount U (k) of Δ U (k) < 0 is all added, if U (k) < Umin, accumulation
The correspondence control amount U (k) of Δ U (k) > 0 is all added by positively biased residual quantity, i.e., when U (k) exceeds amplitude response threshold range N,
By K in formula (4)i0 implementation anti-saturation integral separation is set, the final result of amplitude control is so that maintaining flowtube amplitude fluctuations
Range is lower than 0.2mv.
As shown in Figure 1, the CMF flowtube system core component industrially applied include: two parallel U-shaped flowtubes,
Vibration signal picks up sensors A, B and driving assembly etc..The present invention uses the processing list using DSP28335 processor as core
Member, other the peripheral auxiliary functional circuit modules being related to are as shown in Figure 2, it can be seen that including Direct Digital Frequency Synthesizers
(Direct Digital Synthesizer, DDS), electronic switch, digital-to-analogue multiplier (Multiplying Digital to
Analog Converter, MDAC), power amplification circuit, signal condition amplifying circuit etc., the wherein sensors A output road INA letter
Number, sensor B exports the road INB signal.
The present invention provides a kind of Coriolis mass flowmeter amplitude control method based on digital driving method, this method meter
Obtained control amount is output to drive circuit assembly shown in Fig. 1, so that two parallel U-shaped flowtubes keep stable vibration width
Degree.Key is that an electronic switch of this method setting controls keyword in Fig. 2, is cut by changing Key value progress driving method
It changes: if Key=0, by the starting flowtube work of DDS drive module;If Key=1, driven by right side feedback signal INA/INB
System constitutes a closed loop autonomous system and generates self-oscillation, and the amplitude control method provided through the invention is controlled
System.Vout is that digital-to-analogue multiplier carries out the defeated of amplitude adjustment to DDS initial excitation amount or sensors A, the road B signal amplitude in Fig. 2
Result out;D+ is the drive control amount that Vout passes through that power amplification circuit obtains, which is output to driving group shown in FIG. 1
Part maintains flowtube stable vibration.CH1, CH2 are that oscillograph monitors input port in Fig. 2, for monitoring the work of vibrational system
Make state;The road INA, INB is the vibrating tube vibration signal of sensors A shown in FIG. 1, sensor B output.
Specific implementation of the invention are as follows:
PID controller structural block diagram shown in Fig. 3, vibrational system time-domain expression is written as
Wherein T is system communication cycle, TdFor response delay
Time, at the kth T moment, deviation e (k)=Rin (k)-Rout (k), wherein Rin (k) is the flowtube amplitude of AD sampling output
Value, Rout (k) are vibrating flow tube amplitude set value, error accumulation ∑ e (k), error differentialAbove-mentioned CMF is shaken
Movable model time-domain expression sliding-model control is
U (k)=Kp[e(k)+Ki∑e(k)+Kd(e (k)-e (k-1))], CMF closed loop self-excitation is replaced with this difference equation
The continuous differential equation of oscillatory system is convenient for doing subsequent processing, in kth T previous moment (k-1) T,
U (k-1)=Kp[e(k-1)+Ki∑e(j)+Kd(e (k-1)-e (k-2))], the increment of kT and two moment of (k-1) T
It is then Δ U (k)=Kp(e(k)-e(k-1))+Kie(k)+Kd(e(k)-2e(k-1)+e(k-2))。
The objective function for defining amplitude adjusted is F (Kp, Ki, Kd)=ε1σ+ε2ts+ε3N, wherein σ is overshoot, tsTo be
System regulating time, N are flowtube amplitude response threshold range, Kp、Ki、KdThe respectively proportionality constant of system, integral constant, micro-
Divide constant, makes objective function parameters weighting coefficient ε1、ε2、ε3Meet ε1+ε2+ε3=1, and objective function, KpAnd KiBelow meeting about
Beam condition:
Change each weighting coefficient ε1、ε2、ε3Size, tested referring to shown in Fig. 4 obtained flowtube drive-be forced to amplitude
The right result of logistic fit adjusts drive signal amplitude, first from proportionality constant KpStart to adjust, then adjusts integral constant Ki, finally adjust
Save derivative constant Kd, the Optimal Control constant for meeting above-mentioned constraint condition is sequentially found, vibrating flow tube width is monitored by oscillography
The variation of degree, when the amplitude oscillation data on oscillograph show that amplitude oscillation frequency is greater than 20 times/second, by proportionality constant KpAdd
0.03, otherwise do not adjust;When the amplitude read in the scale value from oscillograph deviates setting amplitude VsFall velocity value it is big
In 0.5 second, then by integral constant KiSubtract 0.03, does not otherwise adjust;When the difference of flowtube oscillations Amplitude maxima and minimum value
Beyond amplitude response threshold range N, then by derivative constant KdSubtract 0.03, does not otherwise adjust.
The present invention makes flowtube remain steady to control error increment Δ U (k) as the driving excitation control amount to flowtube
Determine resonance state, calculate the control amount U (k) at current time, judges whether control amount U (k) exceeds amplitude response threshold range N,
N=[Umax, Umin], amplitude response upper bound Umax=Vs+ 0.2, amplitude response lower bound Umin=Vs-0.2.When U (k) exceeds width
Spend response lag range N when, by formula (4) in Ki0 implementation anti-saturation integral separation is set, prevents flowtube from occurring in a short time
Vibrational system exports the case where relatively large deviation and causes system amplitude that will persistently increase and generated Induced Oscillation.
Flow chart of the invention is as shown in figure 5, drive policy setting flowtube need according to CMF flowtube 1Hz/1mv first
Then Oscillation Amplitude value to be achieved carries out parameter tuning to the proportionality constant of PID, integral constant, derivative constant, uses setting value
Actual vibration range value is subtracted, when the absolute value of the value is greater than 0.2mv, integral separation calculates the error increment of control amount simultaneously
Vibration is maintained with this to control flowtube;When the absolute value of the value is less than 0.2mv, directly the error increment of control amount is calculated simultaneously
Stable vibration is maintained to control flowtube with this, vibrating flow tube amplitude adjusts knot when setting in Oscillation Amplitude threshold range
Otherwise return is started to readjust by beam.