Subsections
After starting RaPID you have to define a RaPID project. This
project consists of a set of names (like the names of the signals that
will be measured), a set of signal limits, the sample time and unit
and some more complicated controller related information (such as
templates) that will be used by RaPID. In this chapter we describe
how new RaPID projects are created, what their elements are and how
they can be manipulated.
As introduced in Chapter 1, there are three different
modes to start RaPID in: From File, with Simulink or in Real Time
mode. There are a range of parameters in common between projects of
different RaPID modes. These will be described in Section
3.1.1. The use of controller templates is introduced in
Section 3.1.2. The mode specific parameters are
described in Sections 3.1.3 through 3.1.5.
How to load, save and alter your projects is the topic of
Section 3.2.
A new RaPID project is started with the menu entry File
New
Project in the ``Open Loop Data Acquisition'' window. Figure
3.1 shows the ``New Project'' window when RaPID runs
in File mode.
Figure 3.1:
The ``New Project'' window in File Mode.
All names and limits should be entered before RaPID can proceed.
![\begin{figure}
\centering
\includegraphics [width=8.9cm]{line1.ps}
\end{figure}](img19.gif) |
Independent of the mode, the ``New Project'' window contains the
following parameters:
- Name: Name
- This is the name of the process,
which defaults to Plant. This could be for instance: Reactor,
Drive, Belt, Batch, .... The name can be maximally 10 characters
long. This name is used in all drawings in the main windows and as
default name when saving
data.
- Notes:
- The ``Edit...'' button behind this entry allows you to enter notes
relevant to the project. An example is shown in Figure
3.2. New information can be added during the
whole course of the project, by using any of the Edit
Notes
entries in the four main windows (You can leave the
``Project Notes'' window open at all times.). When the project is
saved, the notes are saved with it, and the next time the project is
loaded, the notes are automatically retrieved. Once the project has
been saved (or when the project was loaded from a file), the notes
are automatically saved each time you close the ``Project Notes''
window and each time you alter the notes in the ``Project
Notes'' window.
Figure 3.2:
The ``Project Notes'' window allows you
to enter project specific notes. The notes are automatically
saved in the RaPID project file, each time you alter them.
![\begin{figure}
\centering
\includegraphics [width=9.9cm]{line1.ps}
\end{figure}](img20.gif) |
- Sample Time:
- The sample time of the process.
The possibilities depend on the specific mode RaPID was started in,
and will be illustrated in the next sections. It should be noted
however that sample times should be carefully chosen. Bad designs
are often due to badly chosen sample times. For a more detailed
description on how to do this, we refer to the RaPID course notes.
- Sample Unit:
- The unit in which the
sample time is given. Possibilities are micro-seconds,
milli-seconds, seconds, minutes and hours.
- Process Input Name:
- The name of the
process input. Limited to 6 characters.
- Process Input Unit:
- The name of the
process input measurement unit. Limited to 4 characters.
- Process Input Minimum:
- The
minimal allowable process input (in process input units). This is
basically the lower saturation level of the actuator. All
subsequent simulations and real-time experiments will use this limit
to saturate the process input and to implement anti-windup .
- Process Input Maximum:
- Similar to
the ``Process Input Minimum'', but now the upper saturation limit.
- Process Output Name:
- The name of
the process output. Limited to 6 characters.
- Process Output Unit:
- The name of the
process output measurement unit. Limited to 4 characters.
- Process Output Minimum:
- The
minimal process output that can be expected (in process output
units). This value is used to determine reasonable default signal
levels and scalings. It has no impact on the identification or the
controller design.
- Process Output Maximum:
- Similar
to the ``Process Output Minimum'', but now the upper limit.
After filling out all entries, for instance for a chemical
project, the New Project window could look like Figure
3.3. The lower left ``Template'' push button is
explained in Section 3.1.2.
Figure 3.3:
The ``New Project'' window after it is
filled out for an example chemical project.
![\begin{figure}
\centering
\includegraphics [width=8.9cm]{line1.ps}
\end{figure}](img19.gif) |
When you hit the ``Template...'' button in the ``New Project''
window, a list of possible controller templates as in Figure
3.4 pops up. The idea of these templates is to
increase the portability of a RaPID controller to an industrial device
on which the controller has to run. The general templates are
described in Section 6.2.1 while you can find the more
specific industrial templates in Appendix A.
Choosing any of these templates has the following effects:
- When you edit the controller, the parameters are displayed in
the format of the controller template. See Section 6.4
and Appendix A for some examples. This implies that the
displayed parameters can be entered directly into the industrial
device without any conversion.
- The controller structures that you can select are limited to the
structures that are allowed by the controller template
(Section 6.2.2).
- When RaPID computes the controller, it takes into account the
ranges on the controller parameters that are allowed by the
industrial device. See also Appendix
A.
- In addition when you start RaPID in Real Time mode, the
specified template also defines the hardware with which RaPID is
communicating (see Section 3.1.5).
Figure 3.4:
The ``Controller Template'' window allows
you to define the hardware the RaPID controller has to be
implemented on. The limitations of this hardware are taken into
account when the controller is computed.
![\begin{figure}
\centering
\includegraphics [width=11cm]{line1.ps}
\end{figure}](img21.gif) |
The details of the industrial templates and parameters are
described in Appendix A. To avoid needless complications at
this point, further details on the exact controller formulas and
templates are deferred to the controller design chapter, Section
6.2.1.
File projects are projects where the measured data is imported
into RaPID through file transfer. The files could be either ASCII,
Matlab or RaPID files. All parameters of Section 3.1.1
are applicable. How to load your data is described in Section
4.4.2.
The sample time in the ``New Project'' window of Figure
3.2 indicates in this case the time between the
measured points in the files.
The ``New Simulink Project'' window of Figure
3.5 has the following extra features:
Figure 3.5:
The ``New Simulink Project'' window in
Simulink mode. Note the extra entries for the Simulink model.
![\begin{figure}
\centering
\includegraphics [width=10cm]{line1.ps}
\end{figure}](img22.gif) |
- File Name:
- The file name of the Simulink model (
.mdl)
that will be used to simulate the process. This model should at the
highest level consist of one subsystem with one input and one output
(the names of the elements are not important). This subsystem can
contain any Simulink model.
As an example, the Simulink model
$RaPID\Simulink\example.mdl is depicted in Figure
3.6. Opening this model leads to the simple model
of Figure 3.7.
It should be stressed that the simulation of the Simulink model
is always in seconds, even though the sampling time unit
entered in the ``New Simulink Project'' window of Figure
3.5 could be different from seconds
. If the sampling
time, as used by RaPID, is needed inside any of the Simulink blocks,
it can be accessed through the variable Ts (sampling time in
seconds ).
Figure 3.6:
The highest level of the Simulink model
should consist of a single system with one input and one output.
![\begin{figure}
\centering
\includegraphics [width=4.2cm]{line1.ps}
\end{figure}](img23.gif) |
Figure 3.7:
Beneath the highest level, any Simulink
construction is possible.
![\begin{figure}
\centering
\includegraphics [width=9.4cm]{line1.ps}
\end{figure}](img24.gif) |
- Directory:
- The directory where the Simulink model is residing.
The Browse button allows for a fast selection of the Simulink
.mdl file.
After hitting OK in the ``New Simulink Project'' window, there
are some powerful RaPID features in the ``Data Acquisition'' window.
They are grouped under the Simulink menu:
- Simulink
Model
-
This menu entry displays the Simulink model as in Figure
3.6. You can alter the model, and when saved, it
will be used for subsequent RaPID simulations. Note that when you
click the ``Plant'' block in the configuration plot of the ``Data
Acquisition'' window, the Simulink model also pops up.
- Simulink
Parameter File
-
This menu entry opens an optional
parameter M-file named <SimulinkName>p.m (for instance, when
the Simulink model is named example.mdl, the parameter file
is examplep.m in the same directory). Note that this file is
optional : when it is not specified, all parameters take their
default value. The parameter file contains two sets of parameters:
- User parameters:
- These are parameters needed in the Simulink model. For instance,
the parameters
Gain and Noise in the model of Figure
3.7 are entered in the parameter file of Figure
3.8. In this way, you can easily change the
behavior of the Simulink model without having to change the model
itself each time. Changes in parameters, followed by a subsequent
write of the parameter file, will be reflected in subsequent
simulations.
- Simulation parameters:
- The parameter file also controls how the Simulink
model will be simulated. You can include the following (optional)
parameters (see also Figure 3.8 and the Simulink
User Manual or the on-line help of
simset):
- The solver is determined by the variable
METHOD.
This could be any of the solver methods in the Matlab command
simset. The default simulation method is ode45.
- The initial state of the Simulink model is determined by the
variable
OP_POINT. It should contain as many entries as
there are states in the model. If this state is not given, or
is empty, the states default to the initial states in the
Simulink blocks.
- You can enter any of the other options of the Matlab command
simset through a variable named OPTIONS. This
should be a cell array with two columns. The first column
contains the property, the second column contains the value of
this property. See for instance the change of the property
ZeroCross in Figure 3.8.
Figure 3.8:
Optional Simulink parameter file
listing the user parameters and the simulation parameters.
![\begin{figure}
\centering
\includegraphics [width=10.5cm]{line1.ps}
\end{figure}](img14.gif) |
- Simulink
Text File
-
This opens an optional text file named <SimulinkName>.txt
(for instance, when the Simulink model is named example.mdl,
the parameter file is example.txt). Note that this file is
optional . In the Simulink text file you can enter
information about the Simulink model (see Figure
3.9).
Note the difference between this Simulink text file and the
project notes in Figure 3.2. The Notes are
specific to a project, while the text file is specific to the
Simulink model, which could be used in many projects.
Figure 3.9:
Optional Simulink text file listing
information about the Simulink model.
![\begin{figure}
\centering
\includegraphics [width=10.5cm]{line1.ps}
\end{figure}](img14.gif) |
- Simulink
Simulink:
- Launches Simulink.
When in Real Time mode, the ``New Real Time Project'' window of
Figure 3.10 is very similar to the one of the File
mode in Figure 3.1. In this case however, the
controller template (see Section 3.1.2) also defines the
real-time device RaPID is connected to. That is why the
``Template...'' button of Figure 3.1 has been
replaced by a ``Hardware...'' button in the ``New Real Time Project''
window of Figure 3.10. Once you selected the
real-time device, and started the project, the hardware can not be
altered any more. At the moment you hit the ``OK'' button in the
``New Real Time Project'' window, RaPID starts real-time communication
with the selected device. The hardware configuration of the different
devices is described in Appendix A and in the RaPID real time
manual.
It should be noted that selecting a non-installed hardware device
could hang RaPID. In Real Time mode you should thus be careful about
which device you select.
The sample time depends on the type of hardware device:
- IO Boards:
- For
input-output boards the sample time can be freely entered (as in
Figure 3.10). It should however be larger than
25 micro-seconds (smaller than 40 kHz).
- Industrial Controllers:
- The sample time is in this case determined by the hardware.
You can however subsample the signals with the down-sampling entry
in the ``New Real Time Project'' window as indicated in Figure
3.11. As explained in the RaPID course, it is
often desirable to subsample the signals of an industrial device.
Note that you can not up sample the signals, only
down sample them. Note also that this down-sampling is
not present in Simulink or File mode (even when you have
selected an industrial controller template).
Figure 3.10:
The ``New Real Time Project'' window for
an input-output Board. Note how any sample time can be entered.
You access the type of the input-output board and the way the
signals are pre-conditioned with the ``Hardware...'' button.
![\begin{figure}
\centering
\includegraphics [width=9.5cm]{line1.ps}
\end{figure}](img25.gif) |
Figure 3.11:
The ``New Real Time Project'' window for
an industrial controller. The hardware sample time is fixed to 0.25
seconds, however the sampling at which RaPID reads signals from the
device can be altered. In this case, a sub-sampling factor of 50
has been applied, which leads to a sample time of 12.5 seconds.
![\begin{figure}
\centering
\includegraphics [width=9.5cm]{line1.ps}
\end{figure}](img25.gif) |
Copyright ISMC nv
1/21/1998