How to Use BESTune?

(More Info: Go back to BESTune home page)

BESTune is very easy to use. Just run the executable "BESTune.exe" and follow the self-explanatory instructions on the GUI or the step-by-step instructions below.

Step 1: Create data file co_pv.txt

Create a file named co_pv.txt which contains the open-loop bump test data (or closed-loop data if open-loop data is unavailable). It is important that the CO and PV be correctly chosen as defined by the PID equations and the CO and PV data show enough dynamics of the process. This drawing shows where to find the CO and PV variables in a typical PID control loop. An example of where to find CO and PV is given as a demo in The structure of co_pv.txt is as follows:

co1    pv1
co2    pv2
co3    pv3
 :        :

Click this link to open such a co_pv.txt file.



CO samples

PV samples





At time t1, co1 and pv1 are sampled




At time t2=t1+T, co2 and pv2 are sampled




At time t3=t2+T, co3 and pv3 are sampled




So on so forwards

The sampling periods are the same T. T should be close to, the sampling period used by your PID equation (i.e. the time period that your PID controller updates its output). However, if the ratio 

(process dead-time)/(sampling period) 

is larger than 5~9, you have three options to make this ratio less than 2~5 (1~2 is recommended).

  1. Reduce the process dead-time, e.g. move the sensor closer to your process.
  2. Increase your PID controller's sampling period.
  3. Increase the sampling period when you collect the CO and PV data without changing your PID controller's sampling period.

In some applications you are not allowed to have options 1 and 2. But option 3 is usually enough to reduce the ratio.

It is important that your CO and PV data should show how changes in CO will affect the PV variable. For this purpose it is suggested that the number of samples be no less than 200~300 (1000~3000 samples is recommended).

Don't leave any extra blanks at the end of the co_pv.txt file.

Step 2: Enter sampling period T used in "co_pv.txt" in seconds.

Step 3: Enter your process' dead-time in seconds.

The dead-time, also called time delay or lag, is the time period from the time when there is a change (increase or decrease) in CO to the time when PV begins to respond to this CO change.

Step 4: Make a guess of the order of your process. If you have no idea about this, please select 2nd order. This is a good choice for most processes.

Step 5: Select "PI" or "PID" if you want your controller to be a PI or PID controller

If your PID controller is of type A or type B, it is recommended that you select "PI" to make your controller a PI controller.

Step 6: Set tightness for your controller.

Move the slide to the right if you want your controller to be tighter. The tightness index can change from 1 to 100. If your PID controller is of type A or type B, it is recommended that you reduce the tightness index to under 20. For more details take a look at

Step 7: Click the step 7 push button to tune your PI or PID controller.

The time needed for tuning increases as the ratio of the dead-time (step 3) to the sampling period (step 2) increases. Typically the tuning is finished in less than 1 second. Please wait until the top bar of the BESTune GUI turns blue.

Step 8: Select the PID controller you are using from the pull down menu.

If your controller is not in the menu, you can choose one that is closest to your controller and convert the tuning result to that of yours. If you want your controller to be included in the list, please tell us what PID equation your controller is using.

Step 9: Click the step 9 push button to show the tuning results for your controller.

Please pay attention to the units of the tuning constants. The progress bar at the lower and left corner of the GUI shows how much dynamics is in your co_pv.txt file. High dynamics in your co_pv.txt file is important for getting correct tuning results and hence is an important criterion when choose your CO and PV data.

Step 10: Select the PID equation type your controller is using.

There are three PID equation types:

Type A: All the three P, I, and D terms act on the error e=setpoint-PV. This is the so called textbook PID equation. We don't recommend the use of type A.

Type B: The P term and I term act on the error e=setpoint-PV and the D term act on PV. Most industrial PID controllers (e.g., Allen-Bradley's PLCs) use this type of PID equation. Type B is better than Type A.

Type C: Both P and D terms act on PV, only the I term acts on the error e=setpoint-PV. We strongly recommend this type of PID equations. If you are allowed to implement your own PID equation, it is strongly recommended that you implement type C PID equation. Click here to find more about these three types.

Although we strongly recommend type C PID equations, if your controller is not type C, you have to correctly choose the actual type of your PID equations. It is very sad that most PID equations implemented in industry are either type A or type B. In such a case, you have to choose type A or type B.

Step 11: Enter setpoint sequence, upper and lower limits for CO, and simulation time span.

Step 12: By clicking on the push button, you can do the off-line "what if" simulation. 

This allows you to see how your PID controller will perform if the tuning constants given by BESTune are used. If your PID controller is of type C, your controller's performance is usually very good. However, if your PID controller is of type B and especially of type A, you may observe overshoot in the "what if" simulation. If this occurs, you can reduce the overshoot by reducing the controller tightness in step 6 (go back to step 6 and reduce the tightness until no overshoot occurs at Step 12). Click here to find more about these three types.

Step 13: If you wish, you can try tuning your controller manually.

Step 14: Click this push button to see the performance of your manually tuned or existing control loop.

Step 15: Click here to get the performance index of your manually tuned PID loop.

More info: Go to BESTune home page