Here is a simple control algorithm
- User sets a desired pressure and electrical current
- Read the current pressure
- If the pressure is less than the desired pressure, increase the current by 5% of the desired value, then repeat from step 2
- If the pressure is greater than the desired pressure, keep the current the same, go to step 2.
Here is a simple control algorithm