Auto-tuning electro-hydraulic valve
A flow control valve includes a housing that includes a fluid inlet, a fluid outlet, a first work port and a second work port. The housing defines a spool bore and a pilot spool bore. A main stage spool is disposed in the spool bore. A pilot stage spool is disposed in the pilot spool bore. The pilot stage spool is in selective fluid communication with the main stage spool. A microprocessor includes a controller having a restricted structured controller and a compensation controller. Outputs of the restricted structured controller and the compensation controller are summed to form an electrical signal that is communicated to the pilot stage spool.
1. A method for optimizing a plurality of gains of a microprocessor including a controller, the method comprising:
defining a first gain of a control parameter;
defining a second gain of the control parameter, wherein the first and second gains and the control parameter are used by the controller to generate a command signal for a device;
selecting a low point and a high point for the first gain;
selecting a low point and a high point for the second gain;
combining each of the low and high points of the first gain with each of the low and high points of the second gain;
calculating, with the controller, an error between an actual system parameter of the device and a desired system parameter for each combination, wherein the actual system parameter is a function of the command signal;
selecting the combination that yields the lowest error;
utilizing values of the first and second gains of the selected combination in a subsequent iteration.
2. The method of claim 1 , further comprising detecting variation in the command signal.
3. The method of claim 2 , further comprising setting the command signal to zero if the variation is outside of upper and lower limits.
4. The method of claim 1 , wherein the device is an electro-hydraulic control valve.
5. The method of claim 4 , wherein the command signal is a PWM signal.
6. The method of claim 5 , wherein the first gain is a proportional gain.
7. The method of claim 6 , wherein the second gain is an integral gain.