Tutorial: Fractional-order PID Controller Design for a System with Input-output Delay

In this tutorial, we shall illustrate the use of the FOMCON toolbox in connection with the problem of designing a controller for a system with a significant input-output delay. For this purpose, a fractional-order first-order plus dead time (FO FOPDT) system is considered. We treat the continuous-time case.

1  Control design goal

Consider a system, that exhibits fractional-order dynamics, as well as a comparatively significant input-output delay, and is accurately described by a fractional-order transfer function

\begin{equation} G(s) = \frac{6.902}{2.686s^{0.73}+1}\mathrm{e}^{-2.9s}. \tag{1}\end{equation}

We assume, that the actuator of this system saturates at $u=\pm 1$. Suppose also that the "ideal" transfer function (1) is not known. However, experimental data from a step experiment is available:

Figure 1. Time-domain data from a step experiment (download)

In what follows, we use the tools available in the FOMCON toolbox to identify the system and design a suitable controller by means of constrained optimization.

2  System identification

Our first task is to identify the system from the experimental dataset shown in Fig. 1. To identify the system, we may use the fractional-order transfer function time-domain identification tool (fotfid).

Figure 2. Fractional-order transfer function time-domain identification tool graphical user interface

From observation of the registered transient response, we can conclude, that the system may be described by a first-order model with the static gain being close to $7$. Additionally, an input-output delay is observed and is close to $3$ seconds. Thus, our initial guess model is

\begin{equation*} G(s)=\frac{7}{s+1}\mathrm{e}^{-3s} \end{equation*}

and may be entered into the tool text fields as shown in Fig. 2. With this initial model, the system is identified in several iterations, and after a simple transformation1 using the normalize() command the system becomes

\begin{equation} \tilde{G}(s)=\frac{6.914}{2.5027s^{0.71187}+1}\mathrm{e}^{-3s}. \tag{2}\end{equation}

In the next section we shall use this model to obtain a fractional-order PID controller for the plant in (1).

3  Controller design

The first step in controller design is choosing a suitable controller structure. In this case, we are concerned with the design of a fractional-order PID controller. However, the plant to be controlled exhibits a significant input-output delay. Therefore, we consider using a Smith predictor [1]. The basic structure of the predictor is given in the next figure.

Figure 3. Basic structure of a Smith predictor in a control loop

The design of the controller $C(s)$ is carried out in two steps. First we formulate an integer-order PID controller, and then optimize the parameters of the obtained controller, including the orders of the integrator and differentiator, finally arriving at a fractional-order PID controller working in a Smith predictor based control scheme. Note, that we use the parallel form of the PID controller.

3.1  Conventional PID controller tuning

We now describe the procedure for tuning a classical, integer-order PID controller for a fractional-order plant in FOMCON. We can use the iopid_tune graphical tool to first approximate the fractional-order model by a conventional FOPDT model, and then apply classical tuning formulae to get the PID controller parameters.

Suppose, that the identified plant has a workspace name of Gp. Then, we can use the integer-order PID tuning tool and fill the data field of the Fractional plant model box as shown in the following figure.

Figure 4. Integer-order PID tuning tool graphical interface

The fractional-order model is thence identified:

\begin{equation} G(s)=\frac{6.70913}{6.53847s+1}\mathrm{e}^{-1.57628s}. \tag{3}\end{equation}

The result of the approximation is illustrated on the following figure.

Figure 5. Classical FOPDT model approximation of the fractional-order model

Now we use the Ziegler-Nichols tuning formula to obtain PID controller parameters:

\begin{equation} K_p=0.741921,K_i=0.235339,K_d=0.584738. \tag{4}\end{equation}

We shall use these parameters as the point of departure for our fractional PID controller design.

3.2  Fractional-order PID controller optimization

The design is carried out using the fpid_optim tool. Since a custom controller structure is used, we shall use Simulink for evaluating the characteristics of the transient response of our system. We set the parameters of the optimization as shown in Fig. 6.

Figure 6. FPID optimization tool graphical interface

You may notice, that we use an LTI system Gp1 instead of the aforementioned Gp, which is exactly the same system with the delay term removed, since it is compensated for by the predictor.

Now we need to build the Simulink model. We start by creating a new model fpid_optimize_Gp.mdl, which is a copy of the default model, and then clicking the Edit button. The model should open in a Simulink editor window as shown in the next figure.

Our task now is to modify this model and to add the predictor in Fig. 3. The identified model is added as part of the predictor, while the original, "ideal" model is added as the plant replacing the block in the inital model. With this setup it is also possible to evaluate the impact of the difference of the reference and original model on the control system. The resulting model is shown in Fig. 8.

We can now proceed to optimize the controller. After 100 iterations, the following controller is obtained:

\begin{equation} C(s) = 2.0717 + \frac{0.10262}{s^{0.94962}} + 0.47143s^{0.89562}. \tag{5}\end{equation}

The results2 of the optimization are presented in Fig. 9. A clear improvement of the control system performance can be observed.

Figure 9. Fractional-order PID controller optimization results


In this tutorial, we have illustrated the application of the FOMCON toolbox to the problem of designing a fractional-order controller for a process, exhibiting both fractional-order dynamics and a significant delay. The obtained results are considered satisfactory. However, in case of a real system the described procedure may need corrections, depending on particular performance specifications.


[1]N. Abe and K. Yamanaka, Smith predictor control and internal model control – a tutorial,” in SICE 2003 Annual Conference, vol. 2, 2003, pp. 1383–1387.

  • 1 This transformation is not strictly necessary
  • 2 Your results may be slightly different
This entry was posted in Tutorials and tagged , , , , , , , , . Bookmark the permalink. Trackbacks are closed, but you can post a comment.


  1. Pritesh
    Posted June 26, 2013 at 14:51 | Permalink


    I am trying to repeat this exercise. Up to point 2, I don’t have any issue.

    Could you please share figure 8 model with needed LTI model?

    I want to learn FPID for Input/Output System.

    Thanking You,

    • Posted June 27, 2013 at 13:07 | Permalink

      Hi Pritesh,

      Sorry; the model supplied in the figure description was the one without the predictor implementation. I have corrected that now.

      • Pritesh
        Posted June 28, 2013 at 06:21 | Permalink

        Hi ALEKSEI,
        Thanks for your kind reply.
        In model given by you, there is block called Fractional PID Controller.
        Inside that block, it is FPID LTI. In that there is LTI function fpid_optimize_fpid.
        How should I create the same? Is it Fractional Transfer function of FPID?
        I have created ft type of Fractional Controller. Error: The “LTI system variable” parameter of the LTI block must be set to a valid LTI model
        Please advice me…..
        Once again Thanks

        • Posted June 28, 2013 at 07:29 | Permalink

          This model should be used with the FPID Optimization tool (Figure 6). You may set the model in the Simulation parameters options box. The model must be present in the current workspace. Otherwise, if you just want to simulate the transient response, you may replace the controller and the plant with those described in the tutorial using blocks from the FOMCON Simulink library.

          • Pritesh Shah
            Posted June 29, 2013 at 10:40 | Permalink

            Hi ALEKSEI,
            I agree with your comment. FPID Optimization tool will give me fotf type of object. But in simulation, Fractional PID Controller block needs LTI Block.
            How should I get LTI block from FPID Optimization tool ?

            Once again thanks for your kind reply.

          • Posted June 29, 2013 at 23:20 | Permalink

            You may use the fractional PID contorller block from the FOMCON Simulink library.

  2. vamsi krishna
    Posted February 19, 2014 at 21:01 | Permalink

    sir,after several iteration for initial guess model we are doing the normalize for fractional order transfer function ,but here it is showing same initial model????????.can u help me please.,.,.,.,.

  3. anitha
    Posted May 31, 2014 at 07:45 | Permalink

    wht is the function to open fomcon Simulink library…

  4. Sandip
    Posted June 3, 2014 at 06:18 | Permalink

    Hi Aleksei,
    In this tutorial why we use saturation block ? what is function of this block in this model ?

    Thanking You

    • Posted June 3, 2014 at 07:41 | Permalink

      The block models actuator saturation. This is a purely physical phenomenon caused by limitations of what the actuator can actually produce (for example, a pump with max. displacement capacity of 100L/min cannot pump 200L/min).

  5. manohar
    Posted June 6, 2014 at 05:35 | Permalink

    Can this tool be used for an integer order plant transfer function..should the plant transfer function changed into an fractional order ..or else is there any way to change it from the toolbox.please suggest..
    Thanking you

    • Posted June 6, 2014 at 12:11 | Permalink

      Yes, the tool supports conventional (i.e. integer-order systems) as well. You can also convert tf objects into fotf objects, since the former is technically a subclass of the latter.

  6. manohar
    Posted June 9, 2014 at 08:33 | Permalink

    can you just give me an example of using this toolkit with an integer order plant transfer function…I will be very thankful as I tried a lot…
    thanking you

  7. emad
    Posted June 23, 2014 at 15:48 | Permalink

    i dont have fopid matlab block.what can i do?

  8. priyanka
    Posted August 7, 2014 at 09:53 | Permalink

    how would i get the FOMCON simulink library? Is it present in MATLAB software or we have access it seperately? Please help me ?

  9. Priyanka
    Posted August 13, 2014 at 10:15 | Permalink

    I download the FOMCON toolbox and follow the path as you suggest on your site to add toolbox in MATLAB, but i could not open the toolbox in MATLAB. what should i do?

  10. suresh kumar
    Posted August 19, 2014 at 16:34 | Permalink

    how to apply astrom hagguland method tofind kd value at particular phasemargin where as kp,ki fromknown zigler nicholas method and how to tune fractional order pid fromthese two methods because i am doing a project on tuning and analysis of fractional order pid please reply as early as possible

  11. Moupali Chakraborty
    Posted August 20, 2014 at 19:55 | Permalink

    Hi sir,
    I have downloaded this toolbox.This is an awesome toolbox.It gives wonderful control response of the plant.Thank you very much.

  12. Posted August 27, 2014 at 08:22 | Permalink

    how to find lamda and mu

  13. mohammad
    Posted October 13, 2014 at 20:38 | Permalink

    i am a student in ms degree i am so eager to share my science results and my researches and i want to know more about the pid-fractional order. please guide me with best regard. m.hedayati.kh@gmail.com

  14. nandhini
    Posted October 25, 2014 at 06:29 | Permalink

    how to get fpid optimisation toolbox
    please help me in this regard

    • Posted October 25, 2014 at 09:31 | Permalink

      I do not know what you mean by “fpid optimisation toolbox”. In FOMCON, you have the fpid_optim tool. You may use that.

  15. Priyanka
    Posted November 24, 2014 at 11:43 | Permalink

    Hello sir,
    Refer above steps for first order process with delay system and optimize it using fopid_optim tool, but i found some error,

    Error renaming “C:\Program
    to “C:\Program
    Permission denied

    i didnt get this problem please help me………

    • Posted November 25, 2014 at 09:33 | Permalink

      The most likely reason you get this error is because you need to run MATLAB as administrator.
      If you place FOMCON in your documents directory this should not occur.

  16. mks
    Posted December 6, 2014 at 21:38 | Permalink

    using FOMCON toolbox how we can design FOPID controller, i have tried it but i didnt get any output. Please try sove my problem because FOPID model takes by default system G1 for integral and differentiation.

  17. priyanka
    Posted December 9, 2014 at 11:50 | Permalink

    Thanks sir,
    I placed FOMCON in my documents directory. May be this error is occured due to i m running MATLAB as a administrator. I will try this solution……

  18. Kanagaraj
    Posted December 23, 2014 at 10:13 | Permalink

    Dear sir,
    i am having my experimental data (Amplitude Vs Time) for a step change in input signal. how it can be load in workspace to identify the system transfer function. i have tried to view the data given in your tutorial (at fig.1), in this zip file i can’t see any data stets. kindly clarify
    advance thanks

    • Posted December 24, 2014 at 14:37 | Permalink

      It is called “id_data.mat” and is in the ZIP archive the link to which is near said figure.

  19. ashifali
    Posted April 22, 2015 at 08:22 | Permalink

    sir i want examples of real time fractional order systems…both stable and unstable…for my project…anyone please mail me…the link for same
    _____________________________________-__________________thanx in advance

  20. Vanchinathan
    Posted June 29, 2015 at 19:39 | Permalink

    i would like to work Fractional order PID controller. now i have two question sir
    first one Where i get FOMCON Simulink library sir….??
    second one In my matlab 2013a – Simulink library not available FOMCON…
    What can i do sir…?
    Pls Reply me…

  21. mohamed adly
    Posted August 15, 2015 at 02:32 | Permalink

    dear sir,
    how can i solve this problem

    >> iopid_tune
    Error using matlab.ui.control.UIControl/set
    While setting the ‘String’ property of UIControl:
    String should be char or cell array datatype.

    Error in iopid_tune>iopid_tune_OpeningFcn (line 40)
    set(handles.txtPlant, ‘String’, sysName);

    Error in gui_mainfcn (line 220)
    feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure),

    Error in iopid_tune (line 25)
    gui_mainfcn(gui_State, varargin{:});

    thanks in advance

  22. dan
    Posted October 27, 2015 at 13:55 | Permalink

    I have tried implementing the tutorial on your blog and when simulating, I get these errors.Everything else is fine with the tool bar.It is installed successfully in the Simulink Library.I have attached the snapshots of the errors.I am currently using Matlab R2014a.I have also attached the patch file you have given.Must I use an older version if possible.I have mailed you the snapshot of the errors.

    Thanking You

  23. dan
    Posted October 27, 2015 at 14:45 | Permalink

    I have followed the procedure in the tutorial and have used the FPID_OPTIM tool.After hitting the ‘edit button’ it then goes straight to the simulink library and it also says that it was created in the previous release.I have mailed you snapshot.And thank you for your reply

  24. dan
    Posted October 28, 2015 at 10:04 | Permalink

    I have installed the older version of fomcon toolbox which you have provided, but now there are 2 errors.Should I use an older version of MATLAB and if it is possible could you send me a video of the implementation of the tutorial.I have mailed you the snapshot

    Thanking You.

  25. maajid
    Posted August 26, 2016 at 16:09 | Permalink

    Dear sir
    as i understand, when the value of mu is larger that one, the corresponding filter become improper.
    in this case, how one can implement it in Simulink like Figure 7 in this page ????
    for example try this:
    Controller is:

    Gc = oustapid(Kp,Ki, lambda, Kd, mu, 0.0001, 10000, 5,’oust’)
    LTI system is:
    G = Kt/(s*((Ra+La*s)*(J*s+B)+Kt*Kb))

  26. maajid
    Posted October 24, 2016 at 18:43 | Permalink

    Dear sir
    as i understand, when the value of mu is larger that one, the corresponding filter become improper.
    in this case, how one can implement it in Simulink like Figure 7 in this page ????
    for example try this:
    Controller is:

    Gc = oustapid(Kp,Ki, lambda, Kd, mu, 0.0001, 10000, 5,’oust’)
    LTI system is:
    G = Kt/(s*((Ra+La*s)*(J*s+B)+Kt*Kb))

    • Posted October 28, 2016 at 08:28 | Permalink

      For improper systems we can employ some zero-pole cancellation technique. In FOMCON, a rather crude, but functional method is used—we add several poles dominating at the boundary of the frequency domain of the approximation.

Post a Comment

You must be logged in to post a comment.