| TFI: insegnare e apprendere
i controlli automatici di base con Matlab
Zanichelli Editore, 1998
well-tested and complete version of the TFI software
Download the TFI software for your version of Matlab (automatic installation) (NEW)
Download the TFI software for your version of Matlab (manual installation)
How to install and use TFI
TFI: Teaching and Learning Basic Control Systems with Matlab
Part I - General Information
What TFI is
TFI in a basic course on Control
Installing, setting, and starting
How to get started
How to continue and quit
How to change some TFI settings
How to manage figures
How to print figures
Part II - TFI and Its Applications
tfi: creates the TFI environment where the following
con[vert],gi,gj: converts gi from s to z and saves the result as gj
defa[ctf],gi,gj: defactors gi and saves the result as gj
deft[f],gi: defines gi with the mouse or as Bessel, Butterworth, Padè tf
des[crf],gi: analyzes a nonlinear system with the describing function
dpop[ov],gi: p lots the Popov diagram of gi
fac[tf],gi,gj: factors gi and saves as gj
fre[sp],gi: plots the frequency response of gi
gpm[arg],gi: displays the (generalized) gain and phase margin of gi
inv[tr],gi: displays the inverse Laplace (or z- ) transform of gi
lag[c],gi,gj: designs a lag compensator (with the Bode diagrams)
lea[dc],gi,gj: designs a lead compensator (with the Bode diagrams)
mak[eleg]: creates or cleans a legend in the last figure
nls[im],gi,gj,gk,gw: plots the time response of a nonlinear feedback system
per[ftra],gi,gj,gk,gw: designs a digital perfect tracking compensator
pidc,gi,gj: designs a PID regulator (with the Bode diagrams)
pidd,gi,gj: designs a discrete-time PID regulator (with the Bode diagrams)
pidn[ich],gi,gj: designs a PD, PI or PID regulator (with the Nichols diagram)
regd[ph],gi,gj,gk,gw: designs a regulator by pole assignment with the Diophantine equation
regn[ich],gi,gj: designs a lead or lag compensator (with the Nichols diagram)
regr[ootl],gi,gj: designs a compensator or a regulator with the root locus
rob[par],gi,gj,gk,gw: analyzes robustness versus parameter variations
roo[tl],gi: plots the root locus of gi
rou[th],gi: displays the closed-loop stability intervals of gi
sam[ptime],T: defines the current sampling time for discrete-time systems
sel[ect],gi,gj: interactively selects factors from gi and saves as gj
sta[rtint]: defines some TFI environment settings
tfe[val],gi: evaluates gi at a particular value of s or z
tre[sp],gi: plots the impulse or step response of gi
wpl[ane],gi,gj: converts from z to w -plane or from w to z-plane
zpp[lots],gi,gj,gk,gw: plots the zero-pole maps of some transfer functions.
Some questions and answers
Q: When "TFI has some problems with your
request" appears in the Command Window, what have I to do?
A: You can obtain some more information on the cause of these problems by exiting to Matlab and calling the same function with the Matlab syntax [for instance, "regnich('gi','gj')" instead of "regnich,gi,gj"] from the TFI work directory. These problems usually arise from conflict of application names in the matlabpath, and are overcome with the matlabpath reduction facility provided in startint .
Q: Is it possible to use both the English and the Italian versions from the same Matlab Command Window?
A: Yes. Before launching TFI from the Matlab Command Window, you can use the commands italiano or english, corresponding to the files italiano.m or english.m to be located in a directory of the matlabpath, different from intp and intpi, for instance in the directory ...local, available in all the Matlab versions considered below.
DOWNLOAD HERE THE AUTOMATIC INSTALLER FOR THE TFI SOFTWARE
unibom.zip From Unibo website
zanim.zip From Zanichelli websites
DOWNLOAD HERE THE COMPLETE VERSION OF THE TFI SOFTWARE
NOTE: THE CD-ROM OF THE BOOK IS NO LONGER REQUIRED
tfi-4.zip For Matlab 4 and Windows XP
tfi-5.zip For Matlab 5 (Release 11) and Windows XP * tfi-5.zip For Matlab 6 (Release 12) and Windows XP * tfi-5.zip For Matlab 6 (Release 13) and Windows XP * tfi-7a.zip For Matlab 7 (R 14) and Windows XP #
tfi-7a.zip For Matlab 7 (R2009a) and Windows XP #
tfi-7b.zip For Matlab 7 (from R2010a to R2014a) and Windows7
tfi-7c.zip For Matlab 8/9 (from R2014b to R2016b) and Windows8
NOTE:. The release R2014b does not support TFI, because of significant changes of several graphic commaands. Hint: use a previous release. Any Matlab user is allowed to download any old Matlab version. For instance you can use the release R2014a, that supports perfectly TFI.
The old Matlab releases supporting TFI range from Matlab 4.2c (1994) to Matlab R2014a (march 7,2014), hence this choice is extremely easy.
HOW TO INSTALL AND USE TFIHOW TO USE THE AUTO INSTALLER
- Download the installer file and unzip it
- Open Matlab as Administrator
- Set the Matlab current folder to contain the installer
- Launch the installer on Matlab, writing the name of the .m file in the command window
HOW TO MANUALLY INSTALL TFIThe following installation procedure is referred to TFI for Matlab 5 and 6 (Releases 11, 12 and 13). For Matlab 7 (Releases from 14 to 2009a). The version for Matlab 4 requires a different setting of the matlabpath (refer to the file readme.txt contained in the upgrade file "tfi-4-17.zip").
HOW TO INSTALL THE ITALIAN VERSION
1 - Copy the directory \intpi to \matlabroot\toolbox. To know matlabroot simply enter "matlabroot" from the Command Window.
2 - Use "Path Browser" at the top of the Command Window or "Set Path" under the popmenu "File" to add the directory \matlabroot\toolbox\intpi to the matlabpath. Check if this process was successfull by typing "path" in the Command Window.
HOW TO INSTALL THE ENGLISH VERSION
1 - Copy the directory \intp to \matlabroot\toolbox. To know \matlabroot simply enter "matlabroot" from the Command Window.
2 - Use "Path Browser" at the top of the Command Window or "Set Path" under the popmenu "File" to add the directory \matlabroot\toolbox\intp to the matlabpath. Check if this process was successfull by typing "path" in the Command Window.
HOW TO INSTALL BOTH THE ITALIAN AND THE ENGLISH VERSION AND SWITCH TO EACH OTHER
If you want to use both the Italian and the English versions and switch to each other, you must copy the files italiano.m and english.m available in directory \switching of the zip file to the directory \matlabroot\toolbox\local (already present in all the Matlab installations). Switching is achieved by typing "english" or "italiano" in the Command Window, before TFI is entered.
HOW TO RUN
From the Command Window type "tfi" and press return; when a figure covers the Command Window, you can pass to the Command Window again by pressing the return key. To exit to Matlab from TFI, type "exit" or "quit". You can use "new" to create a new figure, "fig1", "fig2",... to select a particular figure, "ordf" to arrange all figures like a card deck, "sma[ll]", "med[ium]" and "lar[ge]" to change the size of the current figure. Of course, you can also use the mouse to manage figures according to the Windows rules and the "Esc" key to pass from any figure to the Command Window.
NOTE: It is necessary to use a character with uniform letterspacing, like Fixedsys or Courier New in the Command Window to obtain a clear display of transfer functions.
NOTE: It is possible to quit most applications by entering "0" from any menu.
HOW TO CHANGE SOME TFI SETTINGS
Command "startint" from TFI can be used:
1 - to define the work directory of TFI
2 - to reduce the matlabpath in TFI environment if necessary
3 - to set as black or white the figure background
4 - to activate or disactivate legend in figures
1 - The work directory of TFI is the directory where all transfer function files are saved. In the first run of TFI it is by default assumed to be the same as the Matlab directory, but it can easily be changed; of course, the new directory must exist (if not, a message is displayed and the work directory is not changed). For instance, it is possible to use \matlabroot\work for Matlab (it can be specified as a property of the Matlab icon in Windows or in the above file startup.m) and \matlabroot\workint for TFI. The Matlab work directory is restored when TFI is quitted.
2 - At present it is not necessary to reduce the matlabpath when entering the TFI environment. This option must be used if some future toolboxes contain some files with names equal to those of \intpi or \intp directory. In this case path reduction and location of \intpi or \intp after other directories in the matlabpath eliminate conflict. The names of the toolboxes strictly necessary in the TFI environment, specified in the file "startint.m", are the standard ones of Matlab 5 or Matlab 7 (without any toolbox) plus \intpi or \intp.
3 - The background color of the figures can be set to black (less radiation and very clean colors in color prints) or to white (more similar to other Window applications and more in vogue today).
4 - The utility "legend" available in Matlab 5-6-7 specifies, in the figures, the corresponding transfer functions names in a small window that can be moved with the mouse to the most convenient location. Unfortunately the current version of legend is quite time-consuming, so that its use is left as an option that can be switched on/off with "startint".
The above settings are permanently saved in the file "set_tfi5.mat" or "set_tfi7.mat", located in the work directories of Matlab and TFI (it is repeated in both).
HOW TO PRINT FIGURES
Use the Matlab "print" command from the Command Window of TFI (type "help print" from TFI or Matlab to see all options). For instance, "print xx.ps -dps" generates the PostScript file "xx.ps" that reports the current figure, while "print xx.ps -dps -append" appends the figure to others in the same file. Let us recall that the option -dpsc instead of -dps enables color printing, and -deps, -depsc produce Encapsulated PostScript, that can be used to insert figures in Microsoft Word documents. By using Microsoft Word you can also select the most convenient size for the figure (both x and y dimensions can be independently changed).
Use the Windows printing facility from the graphic window. To pass from the Command Window to the current graphic window, type "shg" (from TFI) or select the figure with the mouse in the application window.
Top of this page