2

I am currently building a PID controller and now I would like to know:

  1. What is the equivalent resistance of R15, R16, R11 in order to be able to set the resistance of the adder (R6, U5) quite precisely, so that the voltage of the step response fits the input function? I'm still testing and it should fit once. I'm thinking 3000 ohms but I'm wondering that for the gain I need R6 = 890 ohms instead of 1000 ohms, if I want the gain to be 1/3.

  2. Also, I noticed that the adder outputs an offset of -13.32 mV. I'm aware that is the sum of the individual offsets. Can this be fixed?

Schematic

Simulation

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208
Daniel
  • 333
  • 1
  • 8
  • 1
    If you want the proportional gain to be 1/3 then R6 must equal 1000 ohms. If you then hit the input with a ramp, due to the differentiator circuit AND the proportional circuit, the gain will look higher. So, what do you want? – Andy aka Feb 08 '22 at 17:17
  • Ok, you understood me ^^ Exactly, due to the three individual circuits, which are summed up at the node, the signal has a certain size. You might think: "It would be enough to make the adder gain 1/3, thus 1000 ohms", but that's still too much :D – Daniel Feb 08 '22 at 17:34
  • `So, what do you want?` – Andy aka Feb 08 '22 at 17:44
  • The output voltage should be the same as the input voltage. – Daniel Feb 08 '22 at 17:49
  • It can never be like that except at one frequency; I think you misunderstand what PID controller does. – Andy aka Feb 08 '22 at 18:00

2 Answers2

2

What is the equivalent resistance of R15, R16, R11 in order to be able to set the resistance of the inverter (R6, U5) quite precisely, so that the voltage of the step response fits the input function?

The values of the PID will need to be tuned. There are many tutorials and videos on how to do this. In short, tune the P and the I until they match the step response as close as possible, you will be limited by the closed loop response of the opamps (opamps have finite bandwidth). Most of the time you won't need D, D gives you more of a high frequency response. You may want to change the values and observe the response to see what each does (especially zeroing all but one parameter).

Also, I noticed that the adder outputs an offset of -13.32 mV. I'm aware that is the sum of the individual offsets. Can this be fixed?

My guess is it's probably the offset voltage of the opamp model (if they actually modeled that). You could find out by making a unity gain buffer and tying the input to ground, if you have an offset, then it's probably from the voltage offset of the amplifier model. All opamps have a voltage offset that can be considered on the inputs of their terminals.

If you want to correct the offset, you could add another amplifier with a variable input voltage to add in 13mV. (in the real world you could do this with a potientometer and a unity gain buffer, and add this into you summing junction)

Here are some other resources on this:
https://www.analog.com/media/en/training-seminars/tutorials/MT-037.pdf

How do I correct the offset voltage of op-amps which have no explicit offset-null pins?

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208
  • Thanks for your detailed explanation. Sure, the controller still needs to be tuned. I'll have to take a look at the linked thread. – Daniel Feb 08 '22 at 17:37
2

I have looked at PID simulations using SPICE some time ago in my APEC 2012 seminar. In the example I gave, I was computing the various coefficients from classical poles and zeroes placements which makes better sense, in my opinion, than following a tweaking procedure:

enter image description here

The above picture represents a filtered PID featuring an extra high-frequency pole forcing gain roll-off at high frequency naturally improving gain margin. This is the equivalent of a classical type 3 compensator that you can find in the literature.

A simulator like PSpice, via OrCAD, can automate the calculation of the PID coefficients with macros as shown in the picture. However, to compute these poles/zeroes and stabilize a process, you first need to study its control-to-output transfer function from which you will infer the compensation strategy (PI, PID etc.). This transfer function can be obtained with an analytical approach, a bench experiment on a prototype or simulation. This is the starting point of any loop stabilization exercise.

Verbal Kint
  • 20,420
  • 1
  • 16
  • 50