# PID - Circuit Design

C
Thread Starter

#### Carl_Stram

I am trying to build a demo for a college course. I am modeling an "electronic throttle body." Have simulated with MATLAB and derived a transfer function.

The next step is to use this transfer function to build a PID electronic circuit using opamps, resistors, and capacitors on a breadboard.

It "seems" like this should be the easy part, but I am lost.

A

#### anonymous

PID basics

I will attach documents illustrating the application of PID servo compensation. The example shows the transfer function for P,I, and D compensation.

Regards

George Younkin
gwyounkin [at] charter.net

F

#### Friedrich Haase

Just yahoo for "PID circuit."
Friedrich

P

#### Peter Nachtwey

> Have simulated with MATLAB and derived a transfer function. <

So what is it? We can't help you select the PID gains without knowing the transfer function.

P

#### pvbrowser

search the web for "bode diagram ziegler nichols"

You can plot the bode diagram of your system.
Now your task is to adjust the transfer function of your controller so that you get the desired transfer function of the open loop.

G(s) = Gcontroller(s) * Gsytem(s)

The bode diagram of G(s) is only allowed to have amplifications > 0dB when the phase of that frequency is higher than -180 degree otherwise you would get an instable closed loop system.

PS:
Instead of a PID controller it is often better to use a PID-T1 controller because in that case the influence of the differential part will be limited.

<pre>
Transfer function of a PID-T1 controller:

expressed as product

1 + TnP*s 1 + TvP*s
Gr(s) = Kpp * --------- * ---------
TnP*s 1 + Td*s

or expressed as sum.

1 Tv*s
Gr(s) = Kp * ( 1 + ---- + -------- )
Tn*s 1 + Td*s

See:
http://pvbrowser.org/pvbrowser/sf/manual/rllib/html/classrlController.html
http://pvbrowser.org/pvbrowser/sf/m...er_8cpp.html#6944c6ed7403a335d5d5912c79cad294
</pre>

P

#### pvbrowser

According to Fourier (french mathematician) you can approximate any function in time by a sum of sinusoidal functions. The sinusoidal functions are called the frequency domain.

The frequency domain can be plotted in a bode diagram.

If any frequency of the open loop control system has an amplification higher 0 dB when it has a higher phase than -180 degree it will mean a closed loop amplification with almost positive feedback for that frequency. Thus the closed loop control system will get instable.

If you know the transfer function of the system in the bode diagram you can construct the transfer function of the resulting open loop by adding the bode diagram of your controller to the bode diagram of your system.

The goal is to adjust the bode diagram of the resulting system to have amplifications higher 0 dB only when the phase is higher than -180 degree thus resulting in a stable closed loop transfer function.

In practice you will need to stay apart from the theoretical limit.

Attention:
The above does only apply if you have a linear system or a system that can be seen as linear around it's working point. Nonlinear systems can not be handled with these tools.