You are on page 1of 4

PID Controller Settings Page 1 of 4

Consult the following link to a summary of the next book on computer simulation by Stanislaw Raczynski: Link to
the book summary

Vehicle dynamics simulation: CarDyns program

Get the C++ source code for queuing simulation: CQM - C source code generator for queuing models

Low cost system dynamics simulation: SimBall program

New version of the Fluids program: Fluids5 - fluid dynamics simulation


Easy predictor: PredictHIT http://www.raczynski.com/pn/predict.htm

Recommended links:
Some (free) articles on simulation http://www.raczynski.com/art/artyk1.html
PASION Simulation System http://www.raczynski.com/pn/pn.htm
Simulation Encyclopedia http://www.raczynski.com/pn/encyk.htm
Queuing Model Simulator http://www.raczynski.com/pn/qms.htm (NOTE that QMS now has an animator. Low cost, ideal for class)

We strongly recommend the following:


All Of Your Software Needs @ SoftwareStore.com!
Simulation of sampled data systems : digital control systems with "sample-and-hold" elelments. Details in Simulation section

PLATFORM: PC min 64KRAM, 256K and a fast machine recommended. Windows 98 or later, NT or XP.

Optimal settings of the Proportional-Integral-Derivative controller

PIDS program
How to buy it: The PIDS program calculates the PID controller settings and simulates the close-loop control system
Secure order with the following structure
form

PASION
Simulation
System

Molecular
Simulation

Simulation
Encyclopedia

Fluid flow
Simulation
Figure 1.
Queuing Model
Simulation Set point - the desired value of the controlled variable X
Error - control error. This is the difference between the set point and the measured real controlled value.
Y - the controller output
Heat transfer V - delayed controller output ( the Delay and Process blocks form the model of the controlled process)
Simulation X - controlled value. This is the output of the controlled process, for example temperature, pressure, motor velocity, flow etc.
Xm - the measurement result. The measurment instrument may have the gain different from zero and a first order inertia, given by its time
3D image constant.
drawing
The main simulation procedure was generated using the Signal Flow module of the PASION Simulation System.

There are two parts of the program:

1. ZIEGLER-NICHOLS settings (a practical way to find the controller tunning)

2. Optimal settings with integral optimization criteria (more "academic" way to find optimal controller

9/29/2010
PID Controller Settings Page 2 of 4
.
settings)

PART 1
SIMULATION
Using the FLOWD module of the
Ziegler-Nichols methods PASION simulation system you
can simulate control systems
described by block diagrams or
The two Ziegler-Nichols (Z-N) methods are implemented. Using the first method you must provide the rpocess signal flow diagrams. The blocks
reaction rate and the equivalent time delay. The program calculates the Z-N tunning for the proportional, PI or PID or the links of the corresponding
controllers. The controller can have the anti-windup feature to avoid the saturation of the integral part. Then, the signal flow diagram can be as
process transfer function is being estimated, supposing it is a second order process with time delay. This transfer follows.
function is used to simulate the open loop process response and the closed loop response with Z-N tunning. You can Linear link (gain)
Nonlinear (includes switching
verify if the controller is working as expected, and then change the settings and repeat the simulation. The project controllers or any other non-
data and results can be stored in a file, retrieved and editted. linearity)
Dynamic, given by a transfer
Using the second Z-N method, you provide the "ultimate period" and the "ultimate gain". Recall that those are the function
parameters of the closed loop oscillations at the limit of stability. The rest is done as for the first Z-N method, Time delay
Integrator
described above. In the Z-N methods the measurement instrument is supposed to be a part of the process (the block PID controller
is supposed to have gain 1). Sampler (Sample-and-hold)
Superlink (a sub-model prepared
The following figure shows en example of PIDS program output for the settings obtained by the first Z-N method. earlier)

You draw the system structure,


give the necessary parameters,
and the rest is done automatically.
The software generates the model
equations, the PASION source
code, translates it to the Delphi
Pascal, invokes the Delphi comiler
and runs the simulation. For more
information consult
http://www.raczynski.com/pn/pn.htm

Note that we can do


customized simulations
for you. Contact us at

Use this button to buy PID


Controller Settings program.
Only US $ 18.

What follows: When your payment is


accepted, we receive a copy of the
receipt. Then, we send to you the
download and installation instructions
by e-mail. If this does not happen the
next few hours, please send us a
message. Please provide an alternate e-
mail address, sometimes we cannot
communicate (bad anti-spam or other
restrictions).

PART 2

Integral optimization criteria

Controlled process

The PIDS program supports controlled processes that are linear and are given by a transfer function of up to fifth
order, with or without additional time delay. The time delay is introduced as a separate block. Only the delay value is
necessary to define it.
The controller

The controller type can be:

Proportional, given by its gain


PID - controller with proportional, integral and derivative actions
PD - proportional-derivative controller
PI - proportional-integral controller
I - integral controller

The controller may have limitted output. This means that a saturation can be defined at the controller output. If so,
the whole system becomes non-linear.

Optimization procedure

The PIDS program can be used to simulate the control system with given user settings or to optimize the settings
according to certain optimization criteria. The program supports some typical integral criteria, all of them being
related to the control error in response to a step function applied to the system input (set point). The criteria are as
follows.

9/29/2010
PID Controller Settings Page 3 of 4
ITAE - The Integral of Time per Absolute Error

ITQE - The Integral of Time per Cuadratic Error

IQE - The Integral of Quadratic Error

IAE - The Integral of Absolute Error

An Example

Consider a temperature control system. The controlled process is a small electric heater. The time unit for the whole
system is one minute. The input to the process is a volage sent by the PID controller. Suppose that the powel
amplifier has no inertia and that it is included in the process block. The total static gain of the process (including the
amplifier) is equal to 60 degree C/volt. The process dynamics is approximated by a third order transfer function with
additional delay of 0.2 min. So, the whole transfer function of the process is as follows

As for the measurement channel, suppose that we use a thermoresistor with corresponding signal conditioner, which
overall gain (sensor and the circuit) is equal to 0.003 Volts/degree C. The sensor time-constant is equal to 0.3 min.

So, the total static gain of the feedback loop excluding the controller is equal to 0.18. To make this gain equal to one,
we would need the controller with gain 5.55. Suppose that our initial settings make the total feedback gain slightly
greater than one, the controller gain being equal to 7. Let set the integration time and derivative action coefficient
equal to 2 and 0.1, respectively. To avoid big signals in the case if instability and to take into account some physical
limitations, we set the controller upper saturation limit to 10 and the lower limit to -10.

You will see that with the above user settings the system is unstable. The following figure shows the growing
oscillations of the controlled value (temperature). Note that our controlled process is lineal, and it can reach positive
as well negative output values. Physically, this means that the process includes a heater and a cooler, and that both
operation modes (heating and cooling) have the same dynamic properties.

Now, let us request the ITAE optimization procedure. The optimization procedure finds controller settings that stabilize the process and
minimize ITAE. First, the global rough solution is found by a random search. Then, the settings are refined with the non-gradient Powell
optimization algorithm.

The optimization progress is shown for the controlled variable. The following plot is the temperature response of the whole system with
controller settings near to optimal ones (after calculating 1065 trajectories). The optimal controller settings are also shown.

9/29/2010
PID Controller Settings Page 4 of 4

Contact: Stanislaw Raczynski stanracz@prodigy.net.mx

How to buy it: Secure order form

9/29/2010

You might also like