I used an off the shelf controller for my pump. About $100 for a 3A VFD not including transducer
Yeah, most pumps are AC and this was DC so I didn't have a off the shelf solution.
With a PLC, analog input for the pressure sensor and SSR to drive the PWM it was fairly straightforward to put together. Hardest part was getting the PID tuning right but even that only took a bit of time.
They also make some very low cost PLCs that work pretty well. I built a solar powered DC irrigation pump with proper PID control+SSR to support varying flow rates(most irrigation pumps are on/off only) with their hardware.