# Getting started

Because the toolbox is currently in the alpha stage of development, a complete user manual is not yet ready. However, a quick-start guide will be published here soon. For now, some prerequisites are given, the installation procedure under MATLAB is described and some tips are provided.

## 1  Prerequisites

FOMCON toolbox is developed and tested in MATLAB version 7.10 (R2010a). However, the features are compatible with earlier releases, e.g. 7.4+. Since it is impossible for us to test the toolbox in every MATLAB release, any bug reports are appreciated.

The following MATLAB toolboxes are required for FOMCON to work:

• Control System toolbox;
• Optimization toolbox.

However, even if the Optimization toolbox is not available in the MATLAB installation, it is still possible to use certain toolbox features.

## 2  Installation

The installation currently comprises the following steps:

1. Decompress the zipped folder into a directory of your choice, e.g. C:\fomcon\
2. Setup the directory in your MATLAB path. In the MATLAB, go to File > Set Path... and click on Add with Subfolders.... Now, select the directory that contains the fomcon folder. This completes the installation.

Note: if you are not running MATLAB as administrator, you will probably need to save the MATLAB path into your personal user directory, i.e. the second step of the installation procedure will need to be repeated for every user that needs to access the toolbox.

## 3  Quick-start tips

You can start by loading up some exemplary fractional models into the MATLAB base workspace by typing the following in the MATLAB command line:

loadsets

MATLAB should report: “All test sets loaded successfully”. Now, you can type

fomcon

to launch the main module graphical user interface and experiment with the provided fractional-order systems, e.g. analyze them, design fractional controllers etc. Since all graphical user interfaces are internally linked through the menu it should be easy to accomplish this set of tasks.

1. Kalyan Reddy
Posted January 16, 2014 at 22:23 | Permalink

Hello Sir,
I tried to integrate FOMCON toolbox with Matlab .However,after typing fomcon command the following error is being shown.
??? Attempt to execute SCRIPT genvarname as a function:
C:\Program Files\MATLAB\R2011a\toolbox\matlab\lang\genvarname.m

Error in ==> gui_mainfcn at 144
setappdata(0,genvarname([‘OpenGuiWhenRunning_’, gui_State.gui_Name]),1);

Error in ==> fotf_gui at 25
gui_mainfcn(gui_State, varargin{:});

Error in ==> fomcon at 15
fotf_gui();

• Posted January 16, 2014 at 23:21 | Permalink

This is strange. Make sure that the path to FOMCON toolbox files is correctly set. Otherwise, there may be an issue with your MATLAB installation.

2. Jyoti Gupta
Posted July 30, 2014 at 19:54 | Permalink

Hello sir,

My project is on “controlling the speed of an AC machine”. My question is that Is there any block available which can directly give me the transfer function of my overall system. I am unable to calculate the transfer function of my motor as speed is variable.

• Posted August 4, 2014 at 09:17 | Permalink

In MATLAB, there is the fotf object. In Simulink we use approximations.

3. Jyoti Gupta
Posted July 31, 2014 at 09:20 | Permalink

Also sir i want to know is how to upload my simulink model in fpid_optim window for calculating the optimize values of Kp, Ki, lamda etc.

• Posted August 4, 2014 at 09:22 | Permalink

Create a new model and replace the ‘Plant LTI’ block with the block containing your system. Be aware, though, that the frequency domain characteristics may not be valid any longer (this depends on what sort of linear approximation of your system you supply in the ‘Plant model’ field in fpid_optim tool).

• Jyoti Gupta
Posted August 4, 2014 at 18:15 | Permalink

Thank u sir, but still i am unable to understand. can u please explain me in detail. I want to calculate the optimum value of Kp and Ki. Till now in my project i was using conventional PI controller (speed controller and current error controller) but now i want to replace it with fractional PI controller.
As u said i replaced the ‘Plant LTI’ block with the block containing my system but the error written below is shown

“System is no longer in workspace or invalid”

• Posted August 5, 2014 at 08:30 | Permalink

This most likely means that you did not specify a valid linear model in the optimization tool. It is treated separately from the one in Simulink.

4. Smita
Posted October 23, 2014 at 11:44 | Permalink

Hi Aleksei,
I was working with 0.42-beta version in R2010a platform.
In order to replace it with 0.41-beta I removed the earlier version.I found this updated version incompatible with my Matlab.

Then I reverted to default and again added subfolders of 0.42-beta.It works fine but it is not saved in the path.I mean it works fine during the session and for the next session i need to add again the folder and subfolders.

Please let me know how can I save it permanently?

Thanks
Smita

• Posted October 24, 2014 at 07:57 | Permalink

Make sure you have administrator rights. Otherwise, the path will not be saved. See MATLAB messages related to this.

5. Smita
Posted October 24, 2014 at 11:41 | Permalink

Hi Friends,
Can anybody help me in finding the critical gain and critical period via Zeigler-Nichols Tuning Rule(2nd method) of a FOPDT plant that is :

G=0.8.(e^-0.1s) /s+1
Where, Process gain=0.8
Time Delay=0.1
Time Constant=1

Regards
Smita

6. Smita
Posted October 25, 2014 at 08:36 | Permalink

Hi Aleksei,
Can you please help me in finding the critical gain and critical period via Zeigler-Nichols Tuning Rule(2nd method) of a FOPDT plant that is :

G=0.8.(e^-0.1s) /s+1
Where, Process gain=0.8
Time Delay=0.1
Time Constant=1

Silly qn…but i am not getting it.Please help how i can find it…Another qn “is Approximation same as Identification the terms we use often in frac. control systems…”???

Regards
Smita

7. Ashish
Posted October 30, 2014 at 18:26 | Permalink

Hello sir,
I am using FOMCON Toolbox in Matlab. but unable t0 define the plant and controller in simulink. kindly suggest me how to design any system in simulink…

Regards
Ashish

8. niji
Posted February 12, 2015 at 07:41 | Permalink

Sir..
In the fpid_optim tool i relpaced plant LTI with my system. what is meant by FOPID LTI in the fractional order PID block ,

• Posted February 12, 2015 at 09:07 | Permalink

The tool will take your LTI system specified in the fpid_optim GUI and use that in the corresponding Simulink block.

9. twins
Posted February 15, 2015 at 22:00 | Permalink

Hi dear alexi
I have a question about step response of a fractional syztsm.
when I select step time 0:0.01:2 and 0:0.001:2, step response will change a lot.
why does it happen?

• Posted February 16, 2015 at 11:51 | Permalink

This depends on the system under investigation.
The GL based implementation of the FODE solver is essentially a fixed-step method. Therefore, variations in computed output of the system are possible.

10. Pedro
Posted March 2, 2015 at 18:12 | Permalink

Aleksei,

fisrtly sorry my Inglês (I used translator)

I have a doubt in Foncom functionality:

1 – What method the inverse transform lapalce Fomcon program uses to ‘transfer function fractional’ in ‘s’ domian -> ‘t’ (time), to plot the graph step response vs time

2- the fomcon uses the CFE method (expansion continued fraction) to approximate a integer polynomial of fractional function transfer (Gs)?

• Posted March 2, 2015 at 20:21 | Permalink

1. The FODE solver is based on the Grünwald-Letnikov definition of the FO operator.
2. There are several method implemented in FOMCON for obtaining IO approximations of FO operators and transfer functions. The CFE method is used in the analog implementation module of the toolbox. See [1] for details.
[1] A. Tepljakov, E. Petlenkov, and J. Belikov, “Efficient analog implementations of fractional-order controllers,” in Proc. of the 14th International Carpathian Control Conference (ICCC), 2013, pp. 377–382.

11. Ali
Posted May 25, 2015 at 15:29 | Permalink

Hello sir
I want to optimize FOPID controller parameters using Partica swarm optimization.

12. hoomun
Posted July 21, 2015 at 22:07 | Permalink

hello.i have a simulink file relate a pmsm(permanent synchronous mathine) control ,that it has 3 pid .i want change one with fractional pid .please guide and help me

13. Lalitesh
Posted September 14, 2015 at 22:31 | Permalink

Dear Prof. Aleksei,
I have completed the first step of installation but i don’t understand the second step of installation i.e. how to set path for fomcon tool in matlab. Please details me.

Thanks and Regards

14. Asif iqbal
Posted October 13, 2015 at 12:25 | Permalink

i want to convert a continuous domain fractional order model to a delta domain fractional order model .how to do it.plz plz help me.

15. Asif iqbal
Posted October 13, 2015 at 12:26 | Permalink

fomcon toolbox is not running in matlab 2013.how to run it.

• Posted October 14, 2015 at 09:18 | Permalink

FOMCON has been tested in R2013x and should work if properly installed and configured (check MATLAB path).

16. a7med8
Posted November 21, 2015 at 02:15 | Permalink

Dear sir

can i use this tool box with matlab 7.6.0(R2008a)

Many thanks

17. a7med8
Posted November 24, 2015 at 14:10 | Permalink

Now i using the FOTF viewer and i can make add to a new FOTF .but when i close the Matlab and try to open the viewer again the all T.f that i add are not available.
if any way available to save (keep) my T.F like yrs G1,G2 and G3 when i make loadsets.

Many thanks

• Posted November 24, 2015 at 15:49 | Permalink

Just use the save command. Type help save for more information. Then load the systems as needed using the load command.

18. a7med8
Posted November 26, 2015 at 07:45 | Permalink

this the FOSS system as in Matlab i entered A,B,C,D and (comm. order) q=0.5 As you in following . but when i tray to use the STEP command the result As
(??? Error using ==> step at 79
Not enough input arguments.)
how can i solve this issue
Many thanks
>> S
Fractional-order state-space system
A =
-0.0599 0 0 0
0 -0.0476 0 0
0 0 -0.0917 0
0 0 0 -0.0694

B =
0.7665 0
0 -0.9000
0.6055 0
0 -1.3472

C =
1 1 0 0
0 0 1 1

D =
0

(comm. order) q=
0.5000

>> [Y,T] = STEP(S)
??? Error using ==> step at 79
Not enough input arguments.

19. a7med8
Posted December 10, 2015 at 21:11 | Permalink

Dear Mr Aleksei

i hope you are good
i wanna to ask any way available to handle different delay together as the following as a problem to me
??? Error using ==> fotf.plus at 28
Cannot handle different delays

Many thanks

• Posted December 11, 2015 at 18:40 | Permalink

The only way right now to tackle this problem would be to work with approximations of FO transfer functions in state-space form.

20. dan
Posted February 14, 2016 at 10:00 | Permalink

Sir,
How do we create ‘fidata’ from a fractional order transfer function.I consider the example in the manual but an error occurs when using ‘prbs’.The code is:
G2=newfotf(’1’,’0.8s^2.2+0.5s^0.9+1’);
t=(0:0.01:20)’; u=prbs(5,100,[0 1]);
u=u(450:length(t));
t=t(1:length(t)-449); y=lsim(G2,u,t)’;
id1=fidata(y,u,t);
The error is “Error using prbs”

21. dan
Posted February 15, 2016 at 09:04 | Permalink

Sir,
Could you give an example of how to create a fidata using refgen() for a fractional order transfer function.
Thank You
Regards,
Dan

22. Posted February 15, 2016 at 09:49 | Permalink

Here is a complete example from my Ph.D. thesis.

%% Our test function
G2 = fotf('1.5', '0.11s^1.93+0.79s^0.31+1');

%% Generate experimental stuff with noise
st = refgen('prbs', [2], 100, 'Ts', 0.01);
u = st.u; t=st.t;
y = lsim(G2,u,t) + (0.05*(-(2*randn(size(u))))); % Add some noise

% Generate identification dataset
fid1=fidata(y,u,t);
plot(fid1);
ylim([-0.15,1.15]);
23. dan
Posted February 15, 2016 at 11:42 | Permalink

Thank You Sir.

24. kapilg
Posted March 14, 2016 at 22:53 | Permalink

dear sir,
im new user and trouble in simulink with fractional PID controller block.inside that block two more block r there ,1]LTI system block
2]transfer function block
out of these two blocks tf block LTI system block cant edit .by default LTI variable G1

my frac PD controller is Gc(s)=(1.82*(1+13.48*s)^0.5)
my question is what should i write in LTI and TF block if my tf is above mentioned .im using matlab(2010)

thank u

25. Anirudh Nath
Posted August 13, 2016 at 08:04 | Permalink

Respected Sir,
I am working on a nonlinear system described by 8 ODE, 2 inputs (1 input and other disturbance input) and 1 output. I want to perform system identification of the system using input-output data, i.e. I want to identify a fractional order transfer function for the non-linear system. How do I do that? Please help.

• Posted August 26, 2016 at 14:11 | Permalink

You can generate some input data using the refgen facility. See its documentation for details. Then feed this input to your nonlinear equations of dynamics and collect the output. From this information, generate a SISO identification dataset using the fidata function. Proceed with the identification in the fotfid tool from there.