I'm trying to implement a PID controller for a hydraulic tilt compensation. I've got it running allready but without PID so far, cause my coding skills are rather weak.
The following situation is given: I use an IMU to sense the tilt, using y axis quaternion, so I get angle values between +/-15°, the hydraulic proportional valve accepts signals from -10 to +10 volts. I'm using a 12 bit DAC to generate the control voltage with an op amp to scale it to the required +/-10 volts. Now a problem occured, wwithout a proper PID controller I don't get a strong enough response to the tilt error and thus the compensation does only minor corrections of the tilt.
Now my question is, how can I get an PID output with a "center point" of 2047 and an input between -15° and +15°?
My problem is that I don't fully understand the PID libraries, I looked into PID_v1, PID_v2, and QuickPID so far.
I almost forgot to mentionion that I would need some sort of deadband, like +/-1°.
thanks in advance for your efforts