Rltool for Scilab:
A GUI based tool for SISO system design

Ishan Pendharkar
Department of Electrical Engineering,
Indian Institute of Technology Bombay
Mumbai -- 400076, INDIA.
E-mail: ishan@ee.iitb.ac.in, ishan@iitbombay.org



Welcome to help pages of RLTOOL, version 1.4
It is recommended that you use Netscape/Mozilla to view these man pages. The default help viewers that come with Scilab aren't very good at displaying images and links.

1  Overview of Rltool for Scilab

1.1  Description

RLTOOL is a completly graphics based tool for designing compensators for SISO continuous plants. An attempt has been made to provide most of the features available in a utility of similar name which is available with a well known commercial software.

1.2  Targetted users

The intention behind developing this package is to provide a free and easy to use tool for students taking a first course in control engineering. Learning is more fun if computer based teaching is used to supplement classroom lectures. It is intended to make RLTOOL as simple and user friendly as possible and yet have some powerful and innovative features.

1.3  Features

1.4  How to start RLTOOL

Once installed (see the README file accompanying this package), RLTOOL can be invoked by typing 'rlt()' on the Scilab command prompt.

2  Detailed Help on usage

2.1  Starting RLTOOL

load the rltool library as per instructions in the README file. If the library loads properly the following message is displayed on Scilab prompt:
mode(-1);
rltool is loaded;
enter "rlt()" to start
Type ``rlt()'' to start this programme.

2.2  Using RLTOOL

2.2.1  Rootlocus

It is intended to make RLTOOL very user friendly and as such most features should be obvious.

On typing ``rlt()'', the you will be prompted to either select a new rltool session or load a previous saved file. If a new session is selected, the you will be prompted to enter the transfer function as numerator / denominator in the variable 's'. Rltool will automatically load the plant you were working with in the previous session of rltool. Click ``Ok'' to confirm this plant. You may wish to edit the plant, in that case type the new plant and click ``Ok''. A Rootlocus plot of the transfer function is displayed. Open loop poles are shown by crosses and zeros by circles. Click on any point of the rootlocus plot to know the gain and closed loop poles corresponding to that point. All poles are highlighted by a mark and the corresponding gain is displayed on the top of the graphics window.

If you want a grid on the rootlocus, select ``Grid--> On''. Likewise, to turn it off, select ``Grid--> Off''. If you want to draw constant damping ratio z and natural frequency wn lines, click on ``Grid--> Zeta/Wn''. You will be prompted to enter one z and one wn of your choice. If you want to do this for various values of z and wn try ``Grid--> sgrid''.

The rootlocus is plotted with a finite (maximum) gain. This is, by default set to 1000. You can change this by clicking on ``Settings-> Rootlocus''. You might want to increase/decrease the maximum possible gain if your rootlocus shows hanging/incomplete lines or is too cluttered. Keeping this gain more than 1× e10 may result in errors.

2.2.2  Frequency design

Rltool comes with two design modes... time domain (rootlocus) and frequency domain. You can select the frequency domain mode by clicking on ``Design-->Frequency''. You will see the frequency magnitude plot of the open loop transfer function. The magnitude is shown in decibel and frequency in rad/sec. Click on the plot to determine the magnitude and frequency. The frequency domain part is still under development. It will be a great idea to take up this aspect and design it further! You can ofcourse return to the rootlocus mode by clicking on ``Design ® Root Locus''.

3  Editing of Plants

In the Root Locus mode, you can edit your plant at the click of a mouse. The following options are provided. The function of most of these should be obvious:

4  Closed loop responses

Closed loop responses are available only in ``rootlocus'' mode. There is a great deal of flexibility in rltool to see various closed loop responses. First you will have to select one ``gain configuration'' out of the possible two. Click on ``Settings-->Gain Configuration''. You will see a selection dialogue box with two choices:

You can choose the gain to be in the forward path like the following figure shows:


This corresponds to the option ``K in forward path''. You can choose to put ``K in the feedback path''. However, ``K in forward path'' is the default.

To see closed loop responses, click on ``Response-->Closed Loop''. You will be prompted to click on a point of the rootlocus to select the ``operating point'' at which you want to see the closed loop response. Once you select the operating point, you are done!

Rltool calculates the closed loop transfer function for the configuration you have selected, i.e. the closed loop transfer function for ``K in forward path'' is
G K
1+G K
and the closed loop transfer function for ``K in feedback path'' is
G
1+GK
You will see a selection menu that shows the following: Click on ``cancel'' to close the response selection menu and return to the main window of rltool.

5  Other responses

5.1  Nyquist plot

Nyquist plot of the open loop plant G(s) can be seen by clicking on ``Response-->Nyquist''. The gain and phase margin is displayed on the plot. If you find that your plot is too coarse or cluttered, you can change the minimum and maximum frequency in ``Settings-->Nyquist-Nichols plot''. The units for frequency can be changed in the ``Options'' menu of the Nyquist plot window. You must close this window to return to the main rltool window.

5.2  Nichols plot

Nichols plot for G(s) is obtained by selecting ``Response-->Nichols''. If the grid (in the main menu) is set to ``on'' you will see the logarithmic grid superimposed on the Nichols plot. Here too, you can select the desired frequency units. You must close this window to return to the main rltool window.

5.3  Popov plot

The Popov plot can be used to predict the stability of the closed loop system with a sector bound nonlinearity in loop. We plot real part of G(iw) on the real axis and w Imaginary   G(iw) on the imaginary axis. A simple construction then gives the range of the ``Popov sector'' and the ``multiplier''. Please see any standard text on nonlinear systems for more details on the Popov plot.

6  Saving and loading plants

To save your current plant, click on ``Save-->Save''. You will be prompted to enter the filename to which the plant should be written.

To load an existing plant from a file, click on "Save->Load". You will be prompted to enter the filename.

You must have the appropriate read/write permissions to do this operation.

7  Settings

We now look at the various settings that a user can access:

8  Help

A short online help is provided on some topics.

9  Some FAQs

Q. What sort of plants does RLTOOL handle?
A. RLTOOL, ver 1.2 handles real valued SISO continuous time plants (proper scalar transfer functions).

Q. How do I enter transfer functions for RLTOOL?
A. The default value is 1/s. You can change this by editing the numerator and denominator. You should enter these as polynomials in s. For example, 3s2+2s+5 should be entered as 3*s2+2*s+5.

Q. My rootlocus plot shows "hanging" incomplete lines, what should I do?
A. You need to increase the maximum allowable gain. To do this, write the appropriate value in Settings --> Rootlocus.

Q. I can't make out details on my rootlocus plot, what should I do?
A. Use the zoom utility for a bigger picture. Alternately, reduce the maximum allowed gain and you would get a more detailed plot.

Q. Though I don't click on a open loop pole/zero, the mouse handler reads the click as a open loop pole/zero, what should I do?
A. This happens because of tolerances set in RLTOOL. You can change the tolerances in Limits() macro. Alternately, ZOOM the region before selecting the point.

Q. Why is open loop frequency response (gain AND phase) not provided in the Design Frequency menu?
A. There is a bug in Scilab graphics that doesn't recognize mouse coordinates in subplots. If you can figure out a way to read the mouse coordinates in magnitude as well as phase plots, please let me know..

Q. Why is my Nyquist plot drawn only for positive frequencies? Why is it coarse?
A. This is the default. You can put the lower limit of frequency as -1000 Hz for instance and you would get a symmetric Nyquist plot. If it is too coarse, reduce the step size. This can be found in Settings --> Nyquist plot.

Q. I can't UNDO changes to my plant, what should I do?
A. RLTOOL requires to save your configuration details in a file called .rltoolcfg.sci. This is located in your present working directory. If you don't have write permissions in your present working directory, a warning message is displayed and you can't use the UNDO feature.

Q. Which dynamic responses can I see?
A. You can view the following CLOSED LOOP UNITY FEEDBACK responses: IMPULSE, STEP, RAMP, ARBITRARY INPUT. Click on Response --> Dynamic to select the "operating point" on the rootlocus. You will then see a pop-up window which will prompt you to select the desired plot.

Q. Can I simulate with any arbitrary inputs?
A. No! At present you can simulate with inputs that are (1) piece-wise linear (2) continuous (3) single-valued. You will receive an error message if your input is not of this type.

Q. Can I change the size of the plotting frame in defining the arbitrary input?
A. Yes, click on Edit->size in the plotting frame. Enter the required x and y co-ordinates. The default is x=[0,1], y=[0,1]. You may change these as required.

Q. My step/ramp/impulse response is incomplete/coarse, what should I do?
A. You need to set parameters for maximum time for incomplete response. For a finer resolution, decrease the step size. These settings are located at Settings --> Dynamic response.

Q. Sometimes I see an error message while plotting the step response/ frequency response why is this? What should I do about it?
A. This happens when the pole and zero are too close by and the mouse handler can't distinguish between the two points. When pole and zero are close by, zoom the region by the ZOOM utility before selecting a point (gain).

Q. What should I do if I get a warning/error message?
A. Look up the quick reference on errors or warnings in RLTOOL. It will probably help you remove your error.

Q. I think I have found a bug, what should I do?
A. Please mail the bug report to ishan[AT]iitbombay.org. I would appreciate if you also let me know the remedy. It will help improve RLTOOL.

Q. My RLTOOL crashes , what should I do?
A. Mail your "plant" along with the explicit details to the author. It will help improve RLTOOL.

Q. I would like the feature XYZ to be in RLTOOL, what should I do?
A. Code it into RLTOOL and submit a fresh update. Alternately, let me know about it by e-mail. I shall try to add that feature sometime...

END OF FAQ. author: Ishan Pendharkar

10  Error and warning messages

11  Contributions to Rltool

Since RLTOOL, 1.2 the following modified codes provided by Jose Paulo Vilela Soares da Cunha have been included. These enable a user to plot various frequency domain plots (Bode, magnitude, Nyquist, Nichols etc) in both Hz. and rad/sec. (as opposed to Hz only in native Scilab functions). Users may address queries about these codes to the author at jpaulo@ieee.org The latest details about RLTOOL are available at: http://www.ee.iitb.ac.in/uma/ ishan/scilab/rltool.htm

If you find RLTOOL useful, I shall be glad to hear from you!

This version is RLTOOL, 1.4. (Released May 2004).
This document was translated from LATEX by HEVEA.