I want to build a real-time phase error correction circuit to correct the phase degree error of a feedback loop to prevent oscillation. For this I need an electronically controlled phase shifter for frequencies between 10hz and 20khz. I want it to simply offset the phase of the entire input signal fully intact. Can this be done?
If you just want adjustable delay (phase shift varies as a function of frequency), then use a ring buffer of digital samples. With 20 kHz being the upper frequency limit, you need to sample at least at 40 kHz. However, 100 kHz would be better and leave more room for the external analog filters to work.
The lowest frequency of interest is 10 Hz, which has a 100 ms period. Since you ask about "phase shift", we can infer that 100 ms is therefore the upper limit on delay. At 100 kHz sample rate and up to 100 ms delay, you need a buffer that can hold 10 kSamples. That much RAM is easy to find in many microcontrollers with plenty of room to spare. You might use 16 kWords of 16 bits each, for example.
The rest is rather simple firmware. Samples are written into the circular buffer at a fixed 100 kHz rate. You also pick a sample out of the buffer at the same rate, but the offset from the input position to the output position varies on the fly according to the delay time you are trying to achieve.
100 kHz sample rate means 10 µS per sample. That gives you 700 instruction cycles per sample for a dsPIC running at 70 MIPs, for example. That's way more than needed for this. If you want the delay to be controlled by a voltage, then you'd run the voltage into a A/D input. That can also be sampled at 100 kHz and still not get close to the 700 cycles/sample budget.
The usual approach as used in things like Cartesian loop transmitters is to take the feedback signal as an I/Q analytic pair (Or do a hilbert transform to get it into that form) then just multiply by a point on the unit circle corresponding to the desired rotation, easy.
Difficult to do over a wide bandwidth with analogue parts because a sufficiently broadband 90 shift is tricky (big lattice filter with many, many precision components, radio hams do it over 300 - 3kHz for 'phasing method' SSB, but adding two decades makes for a big network), a small DSP or FPGA running a hilbert transform and complex plane multiplier is much easier and more repeatable.