1
\$\begingroup\$

I need some idea of what type of controller I should use. But, I am thinking of a PID controller.

Here is my problem:

I have a simple circuit like this one:

schematic

simulate this circuit – Schematic created using CircuitLab

In this circuit, the resistor R is time variance. My goal is to have a desired current amplitude to be generated through this circuit. My idea is to control the voltage source via a PID controller do you think it is possible? Do you have any other suggestion?

Update:

The load characteristic over a wide range of voltage looks like this: enter image description here

\$\endgroup\$
  • 2
    \$\begingroup\$ Sounds like you want a "constant current driver". \$\endgroup\$ – pjc50 Aug 24 '15 at 15:28
  • \$\begingroup\$ It could be possible, depending on numerous factors you haven't shared: What range does R vary over, and how quickly? How accurately do you need to maintain the constant current? There are also several well-known ways to do this with an analog circuit, which might be more robust than a digital method. \$\endgroup\$ – The Photon Aug 24 '15 at 15:40
  • \$\begingroup\$ can you plz elaborate on what is "constant current driver"? \$\endgroup\$ – user1801381 Aug 24 '15 at 15:45
  • \$\begingroup\$ FYI: R varies between 200 ohms to 200k ohms. R also varies very quickly (disproportional to voltage) as voltage varies. I need at least 10% steady state error for the current amplitude. \$\endgroup\$ – user1801381 Aug 24 '15 at 15:49
  • \$\begingroup\$ Also, sorry if I didn't mention. I am looking for a software solution, not a hardware solution. The hardware is fixed as shown in the circuit of the problem. I am given 'target current' and my job is to generate a 'output voltage'. \$\endgroup\$ – user1801381 Aug 24 '15 at 15:58
1
\$\begingroup\$

You can certainly close such a loop digitally, but the performance (response time including correction from disturbances such as fast changes in R) will likely be very much inferior to having a good DAC and an analog closed loop.

Anyway, if you deliberately (in analog or digital form) insert a dominant lag that is much longer than the sample time, you can use ordinary PID tuning rules. Suppose your sample frequency is 1kHz and your ADC and DAC respond almost instantly, then you might want a 10Hz cutoff low pass filter on the output.

On the other hand, if the load really looks like a (very linear) R, and if the sample rate is low and the ADC settles completely during each sample time you could simply calculate the estimated R' as Vout/Imeasured and calculate the new V from the estimated R, perhaps with a bit of integral action. This won't work over a wide range if the load is something very nonlinear like an LED, and other precautions would probably be necessary to prevent damaging such a load by overshoot.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thank you for your feedback. I have updated the original post with an image of the load's characteristic vary over input voltage. Also, I like simple solution and fast settling time, less than 1000 ms. Would you consider the load I have shown is linear or non-linear? \$\endgroup\$ – user1801381 Aug 25 '15 at 13:57
  • \$\begingroup\$ Extremely nonlinear- a linear load would be a horizontal line (constant resistance). What current are you trying to maintain over that 10,000:1 range in resistance? How much voltage maximum? \$\endgroup\$ – Spehro Pefhany Aug 25 '15 at 14:46
  • \$\begingroup\$ My voltage source can generate a max 160 V. My max current is 50 mA. My max load is 200K ohms. \$\endgroup\$ – user1801381 Aug 25 '15 at 15:05
  • \$\begingroup\$ Should one side of the load be grounded? \$\endgroup\$ – Spehro Pefhany Aug 25 '15 at 15:09
  • \$\begingroup\$ The load is not grounded. However, the load has a return path (-) to the source. The voltage source is common grounded by design. \$\endgroup\$ – user1801381 Aug 25 '15 at 15:17
1
\$\begingroup\$

I had very good luck with a 2 op amp circuit similar to the one in Figure 10 from here:

figure 10

I had a few additional resistors. The current was multiplexed among PLTs sequentially to measure temperature at different points on the system.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.