Preparatory control system of rail pressure and controlling method based on hardware constant current control
Technical field
The present invention relates to the preparatory control algorithm of a kind of rail pressure.Preparatory control system of rail pressure and the controlling method that particularly relate to a kind of joint-track type engine fuel injection system based on constant current control based on hardware constant current control.
Background technique
Common rail pressure control logic mainly comprises following components: measurement of rail pressure actual value and filtering, rail pressure control target value are calculated, rail pressure controller PID designs, rail pressure state of a control machine designs, rail pressure is controlled final controlling element output control etc.Its basic thought is: pass through the value of feedback of suitable filtering algorithm as closed loop control according to the rail pressure value of actual measurement; Calculates the rail pressure control deviation and import, and controller output is determining the flow of high pressure oil pump output as PID, this just and the high pressure oil pump characteristics connect.High pressure oil pump mainly adopts PWM to control the aperture (electric current) of fuel gauging unit, and its parameter is control cycle and dutycycle, and the demand fuel supply flow rate of common rail pipe can be converted into the driving current of fuel gauging unit.Therefore, when engine speed during greater than certain value, the flow of pump directly by aperture (electric current) decision of flow measurement unit, can be calculated the control dutycycle of solenoid valve according to required galvanometer, and this is known/known.
At present; More advanced rail pressure controlling method is that preparatory control of rail pressure and feedback control are combined; In advance control is to calculate current reference according to engine speed, circulating fuel injection quantity and target rail pressure, and it mainly acts on is that to reduce the retard time and the retentive control device deviation of rail pressure controller very little.Its essence is open loop control, and the PID controller is finely tuned rail pressure on this basis simultaneously, thereby makes the rail pressure control module realize good target rail pressure following feature, this also is known/and known (referenced patent document: application number 201010601766.7)
; The actual resistance of considering fuel gauging unit controls valve can change with inside temperature; The winding method and the assembly technology of while control valve coil; And when work power supply status fluctuation, all can cause the working control valve account for wide than (target current) and control valve aperture electric current (actual current) generation than large deviation, make the rail pressure controller control the bigger setting deviation of generation in advance.So more refined control also should add the feedback control of fuel gauging unit controls valve electric current, guarantee the control electric current desirable follow the goal-setting electric current.
In the prior art, in order to realize the electrical current of High Accuracy Control electromagnetic type proportional control valve, introduced current closed-loop control, and in energising control, added integral processing, wherein the integral initial value is set with dual mode.A kind of mode is used the control valve resistance value and is calculated, and (the referenced patent document: application number 200880120382.4), a kind of mode in back is the optimization to preceding a kind of mode for another kind of employing target current and actual current difference storage gain mode.Based on the current closed-loop control mode of software approach, be difficult to follow accurately fast target current all the time.
Because the temperature change of control valve environment is very big; Ambient temperature difference from start-up course to high load working procedure control valve is big; Working control valve resistance always departs from the standard resistor of setting, and deviation value always is in fluctuation, and this certainly will influence the performance of rail pressure controller under the different operating environment.Simultaneously, the software closed-loop control method reaches optimum efficiency because processor interrupts the restriction of time-delay and computing capability, and response cycle is long, and current following control response is also slack-off thereby rail pressure is controlled in advance.
Summary of the invention
Technical problem to be solved by this invention is; Provide a kind of to improve the rail pressure adjusting function; The realization rail pressure is followed fast, reduces the software algorithm complexity simultaneously as far as possible, and practicing thrift the processor hardware resource is rail pressure preparatory control system and the controlling method of purpose based on hardware constant current control.
The technological scheme that the present invention adopted is: a kind of preparatory control system of rail pressure and controlling method based on hardware constant current control.Based on the preparatory control system of rail pressure of hardware constant current control, be the preparatory control system of rail pressure that is used for passing through respectively constant current driving unit and PWM drive unit drives high pressure oil pump-fuel gauging unit, comprising:
ECU internal timing interrupt module: under the unit effect of ECU internal timing, trigger regularly and interrupt, so that produce synchronous constant current controlling value and PWM driving pulse;
Reference current enquiry module: the reference current that calculates this operating mode fuel gauging unit through motor mean speed, cyclic spray oil mass and target rail pressure;
The electric current distribution module: the reference current that the reference current enquiry module is calculated is divided into electric current regulated value and current setting value; And the electric current regulated value sent to constant current driving unit; Electric current regulated value and current setting value are sent to PWM driving pulsewidth computing module, and the allocation proportion of reference current is in the 5%-95% interval;
The constant-current driving pulsewidth is caught computing module: the constant-current driving pulse triggering by constant current driving unit, and be used to catch the constant-current driving pulse, and calculate this constant-current driving pulse pulsewidth, simultaneously result of calculation is sent to PWM and drive the pulsewidth computing module;
PWM drives the pulsewidth computing module: the constant-current driving pulse pulsewidth of the seizure that the electric current regulated value of sending according to the electric current distribution module and current setting value and constant-current driving pulsewidth seizure computing module are sent calculates the driving pulsewidth of PWM driver element; And result of calculation is converted into timing ga(u)ge numerical value, and send to the PWM driver element.
The formula that described PWM drives the pulsewidth computing module is: d=b * c/a, wherein:
A is the electric current regulated value, and b is a current setting value, and c is a constant-current driving pulse pulsewidth, and d is the driving pulsewidth of PWM driver element.
Employing is in ECU control main program running based on the controlling method of the preparatory control system of rail pressure of hardware constant current control, carry out that the ECU internal timing that is produced by the timer among the ECU interrupts and by the constant-current driving pulse triggering along the external interrupt that produces;
Described internal interrupt comprises the steps:
1) rail pressure is controlled the reference current inquiry in advance, calculates the reference current of this operating mode fuel gauging unit through motor mean speed, cyclic spray oil mass and target rail pressure;
2) the reference current proportioning is calculated, and the reference current that step 1 is calculated is divided into electric current regulated value and current setting value, and the electric current regulated value is sent to constant current driving unit;
3) constant current control current value is set, and by the constant-current driving pulse triggering of constant current driving unit, catches the constant-current driving pulse;
4) reference current proportioning value is preserved, and preserves electric current regulated value and current setting value that step 2 obtains, and the constant-current driving pulse that captures of step 3;
5) internal timing interrupt service routine interrupt response finishes, and returns main program
Described external interrupt comprises the steps:
1) calculating constant-current driving pulse pulsewidth, is the constant-current driving pulse that captures according to the internal interrupt program, calculates this constant-current driving pulse pulsewidth;
2) PWM drives pulsewidth calculating; PWM drives the conversion of pulsewidth count value, triggers drive signal, is according to resulting electric current regulated value of internal interrupt program and current setting value; And the resulting constant-current driving pulse of step 1 pulsewidth; Calculate the driving pulsewidth of PWM driver element, and result of calculation is converted into timing ga(u)ge numerical value, and send to PWM driver element (5).
3) external definition interrupt service routine interrupt response finishes, and returns main program.
The driving pulsewidth of external interrupt program and step 2 described calculating PWM driver element (5) is to adopt following formula to calculate:
d=b×c/a,
Wherein: a is the electric current regulated value, and b is a current setting value, and c is a constant-current driving pulse pulsewidth, and d is the driving pulsewidth of PWM driver element.
Preparatory control system of rail pressure and controlling method based on hardware constant current control of the present invention, it is fast to have a response time, the characteristics that following property is good; It does not receive temperature variant influence of fuel gauging unit coil resistance fully, and control is accurate, speed of response is fast; Reduce the difficulty and the complicated good fortune of software control simultaneously, practiced thrift the hardware resource of processor.
Description of drawings
Fig. 1 is a whole composition module schematic representation of the present invention;
Fig. 2 is a synchronized signal sequential chart of the present invention;
Fig. 3 is that internal timing of the present invention interrupts flow chart;
Fig. 4 is an external interrupt flow chart of the present invention.
Wherein:
1: reference current enquiry module 2: the electric current distribution module
3: constant current driving unit 4: high pressure oil pump and fuel gauging unit
5:PWM driver element 6: external interrupt
7:PWM drives pulsewidth computing module 8: the constant-current driving pulsewidth is caught computing module
The preparatory control module 10:ECU internal timing of 9:ECU rail pressure interrupts
A: motor mean speed b: cyclic spray oil mass
C: target rail pressure d: constant-current driving pulse
E: cycle synchronisation f: drive synchronously
G:PWM driving pulse m: rising edge
N: trailing edge h: pulsewidth is caught and is calculated
Embodiment
Below in conjunction with embodiment and accompanying drawing preparatory control system of rail pressure and the controlling method based on hardware constant current control of the present invention made detailed description.
As shown in Figure 1; The preparatory control system of rail pressure based on hardware constant current control of the present invention; It is the preparatory control system of rail pressure that is used for driving through constant current driving unit 3 and PWM driver element 5 respectively high pressure oil pump and fuel gauging unit 4; The main closed loop control that realizes the target reference current responds rail pressure control fast and follows the target rail pressure, is mainly used in and produces synchronous constant current controlling value and PWM driving pulse.Include:
The ECU internal timing interrupts 10: when carrying out ECU control main program; Produce by the timer among the ECU, be used to set the transmission cycle of constant-current driving regulated value, promptly under the unit effect of ECU internal timing; Trigger regularly and interrupt, so that produce synchronous constant current controlling value and PWM driving pulse;
External interrupt 6: along generation, be used for synchronous constant-current driving pulse and PWM driving pulse by the constant-current driving pulse triggering;
Reference current enquiry module 1: the reference current that calculates this operating mode fuel gauging unit through motor mean speed a, cyclic spray oil mass b and target rail pressure c;
Electric current distribution module 2: the reference current that reference current enquiry module 1 is calculated is divided into electric current regulated value and current setting value; And the electric current regulated value is sent to constant current driving unit 3 through communication mechanism; Through variable assignments electric current regulated value and current setting value are sent to PWM driving pulsewidth computing module 7; The allocation proportion of reference current can freely be set according to actual needs, can be in the 5%-95% interval;
The constant-current driving pulsewidth is caught computing module 8: the constant-current driving pulse by constant current driving unit 3 is caught computing module 8 through hardware connection input triggering constant-current driving pulsewidth.The triggering edge (trailing edge) of this constant-current driving pulse is mainly used in the synchronization mechanism that produces constant-current driving pulse and PWM driving pulse, makes the PWM driving pulse remain the synchronous and driving synchronous (as shown in Figure 2) with the constant-current driving pulse interval.The constant-current driving pulsewidth is caught computing module 8 and is caught the constant-current driving pulse; And calculate this constant-current driving pulse pulsewidth; Calculating is the high level through the seizure of ECU internal timing unit and the constant-current driving pulse that adds up; With the count value * timing unit clock frequency of catching and adding up, i.e. constant-current driving pulse pulsewidth sends to PWM with result of calculation simultaneously and drives pulsewidth computing module 7;
PWM drives pulsewidth computing module 7: the constant-current driving pulse pulsewidth of the seizure that the electric current regulated value of sending according to electric current distribution module 2 and current setting value and constant-current driving pulsewidth seizure computing module 8 are sent calculates the driving pulsewidth of PWM driver element 5; And result of calculation is converted into timing ga(u)ge numerical value; Specifically be according to the timer frequency; Be the driving pulsewidth/timer frequency of PWM driver element 5, and send to PWM driver element 5.
The formula that described PWM drives pulsewidth computing module 7 is: d=b * c/a, wherein:
A is the electric current regulated value, and b is a current setting value, and c is a constant-current driving pulse pulsewidth, and d is the driving pulsewidth of PWM driver element.
Because constant current driving unit 3 is based on the current closed-loop control of hardware; Its control accuracy is high, response is fast; Its constant-current driving pulse is followed high pressure oil pump fuel gauging unit solenoid electric valve changes in resistance and is changed, and constant-current driving pulsewidth seizure calculating 8 seizure parameters calculated have good real-time.Simultaneously, constant current driving unit 3 and PWM driver element 5 are that parallel connection drives fuel gauging unit solenoid valve, the hardware environment at both places consistent (comprising power supply, fuel gauging unit solenoid valve, driving loop etc.).Thus, identical with driving the electric current that pulsewidth can guarantee that fuel gauging unit solenoid valve flows through with the cycle, the ratio of constant-current driving pulsewidth and PWM driving pulsewidth is exactly the ratio that both distribute electric current during with the cycle.
Employing of the present invention is based on the controlling method of the preparatory control system of rail pressure of hardware constant current control; Be in ECU control main program running, carry out successively the ECU internal timing of setting the transmission cycle of constant-current driving regulated value by the timer among the ECU being used to of producing interrupt 10 and by the constant-current driving pulse triggering along the external interrupt 6 that is used for synchronous constant-current driving pulse and PWM driving pulse that produces;
As shown in Figure 3, the internal timing interrupt service routine comprises the steps: after interrupt response
1) rail pressure is controlled the reference current inquiry in advance, calculates the reference current of this operating mode fuel gauging unit through motor mean speed, cyclic spray oil mass and target rail pressure;
2) the reference current proportioning is calculated, and the reference current that step 1 is calculated is divided into electric current regulated value and current setting value, and the electric current regulated value is sent to constant current driving unit 3;
3) constant current control current value is set, and by the constant-current driving pulse triggering of constant current driving unit 3, catches the constant-current driving pulse;
4) reference current proportioning value is preserved, and preserves electric current regulated value and current setting value that step 2 obtains, and the constant-current driving pulse that captures of step 3;
5) internal timing interrupt service routine interrupt response finishes, and returns main program.
As shown in Figure 4, the external interrupt service routine comprises the steps: after interrupt response (being triggered by constant-current driving pulse trailing edge)
1) calculating constant-current driving pulse pulsewidth, is the constant-current driving pulse that captures according to the internal interrupt program, calculates this constant-current driving pulse pulsewidth;
2) PWM drives pulsewidth and calculates the conversion of PWM driving pulsewidth count value, triggering drive signal; Be according to resulting electric current regulated value of internal interrupt program and current setting value; And the resulting constant-current driving pulse of step 1 pulsewidth, calculate the driving pulsewidth of PWM driver element 5, and result of calculation is converted into timing ga(u)ge numerical value (according to the timer frequency; Be the driving pulsewidth/timer frequency of PWM driver element (5)), and send to PWM driver element 5.
The driving pulsewidth of the described calculating of external interrupt program and step 2 PWM driver element 5 is to adopt following formula to calculate:
d=b×c/a, (1)
Wherein: a is the electric current regulated value, and b is a current setting value, and c is a constant-current driving pulse pulsewidth, and d is the driving pulsewidth of PWM driver element;
3) external definition interrupt service routine interrupt response finishes, and returns main program.
As shown in Figure 2, wherein constant-current driving pulse pulsewidth is the high level time cycle by the each pulse of ECU specific timer stored counts constant-current driving; Wherein the trailing edge n of constant-current driving pulse d is used for guaranteeing PWM driving pulse g and constant-current driving pulse d cycle synchronisation; After trailing edge n arrives; The PWM driving pulse g that configures starts working, and guarantees that through afterflow fuel gauging unit solenoid valve reference current reaches preparatory control target.
Here set the part be sent to constant current driving unit 3 and be 3/4 control current value in advance, being assigned to PWM, to account for wide be 1/4 control current value in advance than the part of calculating 7.
Timer among the ECU produces periodic down trigger, and internal timing interrupt service routine interrupt response gets into corresponding interrupt service routine.
Preparatory control system of rail pressure and controlling method based on hardware constant current control of the present invention, it is fast to have a response time, the characteristics that following property is good; It does not receive temperature variant influence of fuel gauging unit coil resistance fully, and control is accurate, speed of response is fast; Reduce the difficulty and the complicated good fortune of software control simultaneously, practiced thrift the hardware resource of processor.
Like Fig. 1, Fig. 3, shown in Figure 4; Preparatory control system of rail pressure and controlling method based on hardware constant current control of the present invention; Working procedure be: reference current enquiry module 1 begins to calculate through motor mean speed, cyclic spray oil mass and target rail pressure the reference current of this operating mode fuel gauging unit; Obtain the electric current regulated value of constant current driving unit 3 and the current setting value of PWM driver element 5 through electric current distribution module 2 subsequently; Electric current distribution module 2 sends to constant current driving unit 3 through communication mechanism with regulated value then, through variable assignments PWM driving pulsewidth computing module 7 is preserved and sent to electric current regulated value and current setting value.
Internal timing interrupt service routine interrupt response finishes, and returns main program.
The target current of constant current driving unit 3 for realizing setting, its hardware closed-loop controlling mechanism is started working, and produces the constant-current driving pulse, and the trailing edge of this constant-current driving pulse triggers an external interrupt, gets into the external interrupt service routine.
At first, program accesses specific timer and catches constant-current driving pulse high level count value, calculates constant-current driving pulse pulsewidth through system clock frequency.
Then, calculate PWM driving pulsewidth by formula 1, set the PWM drive signal.The PWM that its high level promptly calculates drives pulsewidth, and this drive signal high level keeps low level later always, and until the response of break in service next time, the PWM driving pulse refreshes, and the driving of a beginning new round is set.
External definition interrupt service routine interrupt response finishes, and returns main program.
Like Fig. 1, constant current driving unit 3 and 5 actings in conjunction of PWM driver element are in high pressure oil pump-fuel gauging unit 4.
Like Fig. 3, the constant-current driving pulse is exported in accomplished and response simultaneously through the reference current of constant current driving unit 3,3/4.Through catch calculating the constant-current driving pulsewidth, calculate PWM driver element 5 and will realize that 1/4 the required PWM of reference current drives pulsewidth, and simultaneously PWM to be driven pulse width conversion being that PWM drives pulsewidth count value (based on the timer clock frequency) and sends PWM driver element 5.Under the synchronous triggering of constant-current driving pulse trailing edge, the afterflow effect (like Fig. 2 signal sequence) of PWM driving pulsewidth has finally realized the preparatory control of reference current.