Friday, June 26, 2015

Controlling a Negative Voltage Outuput in a Control Loop

I know it's been a while since I last posted and I've been rather busy. Hopefully I can get a chance to post more often soon. I'm thinking of doing a semi-teardown of a HP 3585A Spectrum Analyzer. Now, on to the problem:

Let's say you have a device in your circuit that outputs a negative voltage, but all your control and power supply voltages are positive. How do you handle feedback of the negative voltage with the positive control signal? The short answer is "with a summing junction," but I've written a little more detail on it.

Fig.1 - Click to enlarge

Let's start with the voltage divider. You should design this such that the full output of your feedback (your negative voltage) is divided down to the negative of the maximum control voltage. That's assuming this is the correct sense that you want, maximum positive control voltage equals maximum negative voltage output. In other words, for maximum output divide down to -5V for a max control Voltage of +5V. I also added a small capacitor here, which adds some filtering and helps with phase margin.

Next is the all important summing junction. You should design this to zero out the command voltage when a matching feedback voltage is present on the voltage divider. In other words, at full output the divider should be at -5V and control voltage at +5V so the voltage at the midpoint of the summing junction should be zero Volts. Ignoring the summing junction, these resistors would be equal, but you could also design it for +3V to zero out -5V or something. Compensate for the divider by calculating the parallel combination of the lower divider resistor and the feedback side resistor of the summing junction. Then set the control voltage side resistor of the summing junction based on the balance you need. Finally, it is best to set the summing junction resistor values at least 1 order of magnitude higher than the lower divider resistor in order to avoid influencing the divider ratio. All these values are calculable using basic electrical theory (Ohm's law, Kirchoff's laws, etc).
Example: Assume R4 = 30k, Max Feedback Voltage at divider cap = -5V and Max Control Voltage = +5V. For zero volts at summing point at max control and feedback, R5 = 330k and R6 = 300k.
Finally is the control section of the circuit (well, it's all part of the control loop really). In my application (a high voltage negative power supply) I used an operational amplifier. You could use a microcontroller or other methods depending on your needs, but be aware that you may have negative voltages at the summing junction with certain conditions. My opamp is set up as a noninverting amplifier, with added low pass filtering. Set the values here so that they filter out any noise you expect to receive, but also have a reasonable response time.

Something important to consider with R1 and R2 (the opamp resistors) is overall loop gain and stability. You may need to (depending on your application) design the opamp and overall loop gain such that the gain is 1 or less (R2 <= R1). The reason for this is that with high gain and multiple phase shifts you can get your control loop into a situation where it is oscillating itself. This is called loop oscillation and is generally to be avoided. Filtering also helps with this. In my application, the high voltage negative power supply constitutes a high gain block which had multiple unpredictable phase shifts inside it which could cause loop oscillation if not planned for and controlled.

Keep in mind that the negative output of your device or circuit does not necessarily have to be linear, but it must be monotonic. Here is an overall description of how the circuit works:
At a steady state of 0V output with everything powered up, the Control Voltage is switched from 0V to +5V. Since the voltage from the divider is 0V, the voltage at the summing junction becomes a positive value. The output of the opamp starts increasing, which goes to the control input of the device or circuit and the output of the device starts increasing (going towards some negative voltage). At some point, the output of the device reaches the desired value and feedback from the divider equals -5V. With the feedback value = -5V and control voltage = +5V, the voltage at the summing junction is equal to 0V and the opamp's output stops increasing.
 Assume a semi-steady state where the Control Voltage = +5V, feedback voltage = -5V and output is at a desired level. Now the control voltage is reduced to +2.5V. Since the feedback voltage is at -5V, the value at the summing junction is now -2.5V which is seen by the opamp. The opamp starts decreasing its output thereby controlling the device to reduce its negative voltage output. Eventually the control voltage and feedback voltage balance where the output of the device would be about 1/2 of its maximum output (2.5/5).
Please note that it is not necessary to have a negative power supply for the opamp, as the goal is not to output a negative voltage from the opamp, only to reduce its output. I hope this is helpful to someone, even though it may be considered fairly basic it may not be entirely obvious.

No comments:

Post a Comment