Free Download of CONPAK Package!!
CONPAK: AN INTERACTIVE CONTROL
SYSTEMS AND TRANSFER FUNCTIONS SIMULATION
AND ANALYSIS PACKAGE
By : Malek Badi, MSc,BSc.
1 - ABSTRACT :
--------------
This paper introduces a CACSD package for
the interactive design and analysis of
negative feedback single-input single-
output linear time invariant systems and
transfer functions.
The package offers an integrated progra-
mmable and graphical design environment in
the time, frequency and Laplace domains.
A new concept in user interface design
for engineering applications is implemented,
based on an interactive tabular multi-
criteria numerical search, and proved more
powerful than graphical methods for the
iterative design methodology.
2 - Introduction :
------------------
Linear time invariant control systems may
be described by a Transfer Function
Y(s) = F(s) U(s)
where Y(s),U(s) are the Laplace transforms
of y(t) and u(t) ; the output and input
signals respectively , and F(s) is the
Laplace Transform of the system input-output
mapping given by :
Nz i
SUM a(i) S
A(s) i=0
F(s) = ------- = -----------------
B(s) Np j
SUM b(j) S
j=0
where A(s) is the Zeroes polynaomial,
and B(s) is the Poles polynaomial.
A negative feedback closed loop control
system is made up of the following blocks:
- a controller K C(s)
- a plant G (s)
- a feedback transducer H(s)
The design of such control systems
involves selecting the appropriate parameters
of any of the components especially the
controller , and investigating the behaviour
of the controlled system for these parameters.
3 - Traditional Approach :
_________________________
Empirical methods have been widely
developed for the case of high order systems,
such methods as Root Locus , Frequency and
time response are mostly carried out through
graphical sketches and the system behaviour
and stability for input signals is guessed
according to empirical observations and
judgement to some design criteria such as
phase margin , gain margin , bandwidth ,
maximum overshoot, damping ratio or location
of system poles and zeroes.
Iterative design cycles are unavoidable ,
where the components parameters are varied
and the system design criteria observed ,
until the required system specification are
met.
This iterative design methodology proves
a laborious task for pen and paper work , and
the design process becomes inadvertantly slow
and tedious.
Numerical algorithms may be developed
and implemented for a specific design
problem and the resultant program may run
fast and produce fine results for the
problem, however such programs in most cases
lack the flexibility and convenience of
visual comparison and judgement of results as
provided by handsketches of graph or analogue
simulation. Besides , The rigidity of the
algorithm which in most cases are built to
handle a specific design criteria becomes
another obstacle to the designer , since
reprogramming and modification to the
algorithms and programs interferes with the
designers thoughts.
Although a sophisticated program may be
developed to handle multi criteria design ,
with several options dealing with the input
and output of data . The program may become
overly complex to operate and renders the
traditional approach a better alternative.
Interpretation and comparison of results
and thence modification to the design, which
are the main stages of iterative design
becomes a rather laborious task , suffering
the lack of visual judgement and comparison
of trend envisaged by the graphical methods.
4 - Interactive Tabular Search :
________________________________
In this paper, a new concept which tackles
the problem of interactive iterative design
is introduced. The concept overcomes the
problem of restricting the user to a specific
design criteria or objective , and enables
him to freely carry out a design task by
visual interaction with the package ,through
tabulated results . The tabulated results
(eg. frequency response) may be navigated as
the user wishes to , until a specific design
objective is found (eg. phase margin,etc..).
The results are tabulated as pages , of
say 10 rows, where each row shows the values
of design parameters ( eg. phase,dB,etc..)
corresponding to the independent variable
(frequency). The first row shows the starting
value of the independent variable w , and
the ith row shows the values corresponding
to (w + i.dw ), where dw is the increment.
The design parameters A1, A2, A3,... are
functions of the independent variable w.
Hence : A1 = /_ F(jw)
A2 = |F(jw)|
A3 = Re(F(jw))
A4 = Im(F(jw))
. ..
. ..
. ..
If the functions A1 .. Am are tabulate
against the independent variable w , then
the phase margin is found when |F(s)| = 1.
In other words, the user should visually
concentrate on the column showing |F(jw)|
and attempts to find the row showing this
value approaching 1.0 .
The screen shows a table for the values
of the designe indicators A1,A2,... on each
row (i) , corresponding to the independent
variable (w) , as shown in figure 1.
As seen the value of interest lies between
the 4th & 5th rows. Hence the user may piont
with the cursor to this row, and requests an
"unfolding" of the table around the 4th row,
in general , the user may :
- UNFOLD the page , by pressing the key
labelled [Ins] , at any row on the
table, and a new page appears, starting
with value of w on that row and the
with value of w on that row and the
increment between each successive rows
for the new table; is divided by 10 , ie.
dw <-- dw / 10
- FOLD the page , by pressing the key
labelled [Home] , at any row on the
table, and a new page appears, starting
with value of w on that row and the
increment between each successive rows
for the new table is multiplied by 10, ie.
dw <-- 10 x dw
- PAGE through the results by pressing
special keys on the keyboard labelled
[PgUp]/[PgDn] , and new pages are shown
with the same number of rows , but for
different values for the independent
variable w.
These operations are known by the term
"Navigation", here the navigator is the
designer and his task is to land to a
specific value of one of the tabulated
parameters.
This concept is a tabular equivalent to
graphical design methodology, and it may be
generally applied for any engineering problem
that are solved through trial and error
iterative design.
--------------------------------------------
w /_F(jw) |F(jw)| Re(F(jw)) Im(F(jw))
--------------------------------------------
0.0 0. 0.60 . .
1.0 -40.0 0.78 . .
2.0 -82.3 0.85 . .
3.0 -120.2 0.96 <-- UNFOLD at this row
4.0 -140.6 1.12 to diplay for range
5.0 -154.2 1.34 . 3.0< w <3.9
. . . . and search for
. . . . |F(jw)| =1.0
. . . . .
9.0 -175.2 1.38 . .
--------------------------------------------
^ ^ ^ ____ Column of Searched
| | value
| |
| |_______ other design parameter
|
|____Independent Variable
Fig. 1 Interactive Tables
5 - An Overview of the Package :
_________________________________
An interactive design package as the one
presented by this paper "CONPAK" provides
an environment to the designer where several
design tasks may be carried out with ease an
efficiency.
The package is operated through Hierarchical
menus , where each menu is displayed at the
top line of the screen , and is made up of
several options. The user may point to the
required option or command and then selects
it,The selected option may have a submenu or
may perform a specific command or operation,
such as :
- changing data values.
- specifing accuracy, of numerical
algoritms (eg. integration step).
- specifying start and final values
( eg. plotting ranges,..etc.).
- loading and saving :
-- data,
-- sessions (ie. recorded keystrokes).
-- graphic configurations.
- selecting the design domain.
- format of graphical output.
- erasing the display,..etc.
- selecting output format, wether in :
-- Interactive Tabular Form.
-- Tabular Form.
-- Printed output.
-- graphical form.
All the commands and operations may be
recorded as set of keystrokes, and then
replayed at will.
The following design domains are made
available :
- Root locus
- Time Response
- Frequency Response as :
-- Bode plots
-- Nyquist Diagrams
-- Nichols Diagrams
Any of the above analysis may be carried
out on any of the following system components
which are definable by the user :
- Controller K C(s)
- Plant G (s)
- Feedback Transducer H(s)
or the computed components :
- Forward Path K C(s) G(s)
- Open Loop K C(s) G(s) H(s) -- designtimesp=8290> F(s)
- Closed Loop K C(s) G(s)
------------------
1 + K C(s) G(s) H(s)
The effects of design parameter variation
may be readily noticed on any transfer
function in any domain as required.
5.1 - Macros :
______________
Another feature in the package is the
ability to record a specific design session
or sub-session , then replaying this session
at the press of a key. These recordings
are known as "Macross" , and have gained
widespread acceptance among desktop based
computer application.
This way, the user may readily carryout
repeated operations , and if properly used ,
a costumised design procedure may be perfo-
rmed over and over for differrent sets of
data , or for several values of designe
paramters.
5.2 - Data Entry :
___________________
The control system is defined by entering
each block as a transfer function made of
a numerator and a denominator polynomials.
The order of each polynomial is entered
then each coefficient is entered.
These values may be selectively changed
during the design session.
Data may be saved to , or loaded from a
disk file at any point during the design
session , hence several design alternatives
may be compared by loading each data file
then overlapping graphical results.
5.3 - Graphical Output :
________________________
The second Option , in the main menu
"Graphics_Axis" , enables the user to define
the axis system of each domain . this option
allows the user to load a pre-saved graph
axis layout or save the current layout , or
define a new layout of the graphs by the
following operations :
- resizing the plotting area.
- relocation of the graph on
the screen.
- definition of the maximum and
minimum values of the coordinates.
- definition of the axis labels
format, and spacing.
These operations allow a multitude of
set ups for the graphs , hence the user may
select to have two graphs on the screen eg.
the root locus on the top half and the
time responce at the bottom half. Or may have
have all four graphs shown altogether.
It should be noticed that several Graphs
may be overlapped , in order to enable the
user to compare different designs.
5.4 - Root locus :
__________________
The root locus option generates the poles
and zeroes of any chosen block besides
generation of root locus plot for a range of
controller gains , the user is given a fast
method of varying the values of the gain K
by pressing special keys on the keyboard.
By combining the root locus and the
macro capability a user may investigate eg.
the effect of changing a specific coeffic-
ients of any component on the root locus.
The algorithm used for computing the
roots of a polynomial are based on :
- a Newton Raphson method , extended to
the complex domain.
- Nested evaluation of a polynomial of
a complex variable.
- a synthetic division algorithm,
for eliminating computed roots
from original polynomial.
The algorithm is refined for the case of
calculating the root locus , where the
current roots are used in the next iteration
as the estimates of the new roots.
Other options given to the user is the
ability to fine tune the root computation
algorithm by specifying the accuracy etc..
5.5 - Time Response :
_____________________
The " Time Response " option enables the
the user to investigate the time response of
any selected block,eg.the plant or the closed
loop response to a selected type of input
signal :
- Unit Step.
- Impulse
- Ramp where the value of the gradient
may be specified.
- Sinsoidal where the Sine wave frequency
may be specified.
Besides the user is allowed to enter the
values of :
- numerical integration step length.
- the final time for the simulation.
The algorithm used for time response
simulation is a Runge - Kutta fourth order
method , where the transfer function being
simulated is automatically transformed to a
state space ( canonical form ) model.
The output of the simulation may be viewed
in tabular form or as a graphical plot.
5.6 - Frequency Response :
_________________________
The " Frequency Response " option enables
the user to perform frequency response
- Bode Plots
- Nyquist Diagrams
- Nichols Diagrams
If graphical results are desired then as
described for the other options , graphs
may be plotted and superimposed etc..
If tabular results are desired then
according to the chosen domain, the results
will be displayed.
The frequency response of a transfer
function is computed by a nested evaluation
algorithm as described previously.
6 - Conclusion :
________________
"CONPAK" was introduced. it is an attempt
to bring the power of desktop computers to
the practical utilisaton of udergraduate
students attending courses in the field
of Control Engineering.
The simple user interface as offered in
the form of interactive tables for numerical
search and easy access and navigation to the
various domains and system components, gives
the user a feel for the engineering design
process undisturbed by tackling the problem
via traditional means.
The concepts offered in this package may
be applied for Digital control systems and
other engineering iterative design problems.
New Features :
Command line sytax :
c:\> CONPAK [ data.CMP ] [ config.CFG ] [ macro.MCR [ /A] ]