Copyright © IFAC Computer Aided Design in Control Systems. Beijing. PRC. 1988
THE STRUCTURE AND FUNCTIONS OF CCSCAD PACKAGE Chen Zhen-Yu, Han Jing-Qing and Wang Zhi-Bao Chinese Association of Automation, PRC
Abstract. A large control systems CAD package - CCSCAD had been established by cooperative efforts. There are 16 functional subpackages included in the package, which have the functions of time series anal ysis, system identification and parameter estimation, selfadaptive prediction, SISO and MIMO system analysis and s ynthesis both in time domain and frequency domain methods, systems simulation, SISO and MIMO adaptive control etc. All the functional subpackages and mathematical libraries are dispatched by general .anage.ent program, and both the interactive dial ogue operation mode and macro-com.and file operation .ode had been implemented. Three computer aided teaching subpackage also had been included. CCSCAD package had been used in a lot of engineering projects. Keyword.
Control systems CAD; CAD package; control systems analysis; control systems synthesis.
INTRODUCTION
to cover the riped parts of control theory in most areas, which included identification, modelling, time series analyais, singlevariable and multivariable systems analYSis and synthesis, frequency domain method, stste space method and po11nomial matrix method, discrete systems and continuous systems, adaptive control and prediction, systems simulation etc. In order to match the requirements of teaching in uniVersities, the CAT subpackages also had been included.
Owing to the development of modern control theory, a lot of discipline branches have been grown up, and the using of mathematical tools also h~s been extended widely. The engineers who work on the area of applications of control theory have met difficulties to apply the modern control theory to the engineering projects. To overcome the difficulties between theory and applications as well as to improve the efficiency of control systems design, the development of CAD techniques have been encouraged by Chinese Association of Automation, and a large control systems CAD package - CCSCAD had been established by cooperative efforts with experts of 15 Universities and Institutes, which was strongly supported by the National Natural Science Foundation of China.
THE COMPOSITION AND FUNCTIONS OF PACKAGE The entire CCSCAD package is composed by 16 functional subpackages, and two mathmatical libraries are also included. Three CAT subpackages as a part of CCSCAD are existed for teaching in universities. The structure of CCSCAD package is shown in
The overall planning of CCSCAD package was
Fig. 1.
The composition of CCSCAD package
157
158
Chen Zhen-Yu , Han Jing-Qing and Wang Zhi-Bao
the Fig. 1. In the Fig., TSAMFP s ubpackage is provided for time series anal ysis, modelling and forecasting. There are five functional modules involved in this subpackage, one is data handling module which is provided to constructe the frequency spectrum diagram as well as to analyse the distributed characteristic of data series; another is autoregressive module which is provided to build the AR model of data series and to estimate the values of parameters; another is ARM A module which is provided to build the ARMA model of data series and to estimate the values of parameters; another is nonlinear module which is provided to build the AR model by optimal gate limit selection measures; another is time series forecasting module which can .ake the forecasting of time series by appointed the order of ARMA model and the parameters, or by appointed the gate limit of parameters of AR model. IDENSP subpackage is provided for systems identification and parameters estimation. There are five kinds of functions involved in this subpackage, one is multivariable linear system identification functions which are composed by several parameter estimation measures such as recursiYe least square, recursive extension least square, recursive instrument variable methods etc. and the bilinear function identification method also is included; another is nonlinear system identification functions which can accept nonlinear describing function for modelling and several optimal search methods such as simplex, variable scale, Machado method are used; another is data handling functions which can caculate the auto-correlation functions and crosscorrelation functions, and also can make the filtering; another is multivariable linear system simulation functions which can test the identification error by real collecting data; another is nonlinear system simulation functions which can test the identification error also by real collecting data. APSUBP subpackage is provided for selfadaptive system prediction. There are three distinct selfadaptive prediction methods inyolyed in this subpackage, one is multilevel progressive order method, which treats the prediction problem of time-varying systems in two steps, predicts the timevar ying coefficients of systems in the first step, then predicts the state variables in the second step by recursive calculations; another is multivariable multistep self-tuning method, which estimates the orders of system model and paramaters matrix in the first step, then uses the multistep self-tuning predicter to obtain the state variables prediction; another is adaptive filter and prediction method, which is provided for time-varying noise dynamic systems, the states and parameters of system are constant but the noises of states and observation noises are timevarying. SISOSP subpackage is provided for singlevariable systems analysis and synthesis. It is suitable for continuous-time state variable model, transfer function model, z-transfer function model or difference equation model. The main functions of this package are: continous-time system
anal ysis, which is provided to find out system eignvalues, eigenvectors, system state time response etc., and to obtain the performance both in time-domain and in the frequency-domain, and to plot system Bode diagram, Nyquist diagram, root locus and system time response; continuous-time system s ynthesis, which is provided to design a state feedback for a set of given closed-loop eigenvalues or for minimixing a linear quadratic index, to design a Luenberger observer, to design a series compensator for matching the frequency response of a real system, to optimalize the coefficients of series compensator for a set of given timedomain performance index or frequencydomain performance index; conversion to and from between the continuous-time system and discrete-time system. HAHSSP subpackage is provided specially for digitalized high accurancy and high speed servo control system design. There 13 design methods involved in this subpackage, which are : minimum steps, staleness weighting factor, Pierre deadbeat, error search, linear programing, minimum norm, weighting minimum norm, time-domain matrix, state space, step response, simplified synthesis, quadratic criteria state space and quadratic criteria step response methods. The following performance of servo system designed by this sub package can be reached : the system transient duration response of unit step or unit ramp can be finished in limited sampling periods, and the steady-state deviation will be zero; the system overshot of step response can be less then setted value; the system step response has no negative shot; the designed series digital controller can Qe implemented physically; the transient time will be minimum when the above performance is reached. LQGDSP subpackage is provided for multivariable systems analysis and synthesis in the case of using quadratic performance criteria. The functions of this subpackage are : the transformation and simplification of systems model if the input system model is in frequency domain form; system analysis provided as transformation of system model into canonical controllable form or observable form, decomposition of controllable structure or observable structure, system stability recognition; system synthesis and design provided as pole assignment, design of feedback controller, design of states observer, solving matrix Riccati equation which include to solve differential Riccati equation and algebraic Riccati equation using trial and iteration method, sign function method, decomposed method and spectral factor decomposed method, design of optimal controller for system with Gaussian distributed noise by quadratic performance criteria, design of Kal man fil ter. STATSP subpackage is provided for multivariable systems analysis and synthesis with some other features, which are : the system model can be in discrete inputoutput form with independent system noise and measuring nOise; the pole assignment compensator can be designed etc. MVSAAS subpackage is provided for multi-
The Structure and Functions of CCSCAD Package
variable systems analysis and synthesis also with some other features, which are system stability analysis with a lot of criterions such as Routh's criterion, Nyquist's criterion, Schwarz's criterion, Schor-Cohn's criterion, Lypnov method, singular values method etc.; design of system decoupling controller etc. MPOLSP subpackage is provided for dynamic compensator design of single and multi variable systems with polynomial matrix method, which has the merit of simplicity and uniform to handle system analysis and design. This method is suitable for such kinds of systems : SISO state feedback system, SISO observer s ystem, SISO reduced order observer system, SISO output dynamic feedback system, SISO follow-up control system, SISO antidisturbance regulating system, SISO anti-disturbance follow-up control system, SISO optimal states estimation system, SIMO output dynamiC feedback system, SIMO anti-disturbance followup control system, MIAo output dynamic feedback system and observer system, MIMO anti-disturbance follow-up control system. MFCADP subpackage is provided for multivariable control systems design with frequency domain method. The functions of this subpackage are : using pseudo-domination method to design system dynamic precompensator to implement system diagonal dominance or decoupling; using Nyquist array method or inverse Nyquist array method to design control system; using characteristic locus techniques to design control system; transformation of system model from state space form to transfer function matrix form or by inverse; plotting Nyquist diagram, Bode diagram, Gershgorin band diagram etc. OCPACK subpackage is provided for solving openloop optimal control of nonlinear systems. The problem is to solve the control function U( t) while the functional performance criteria J(u) becoming minimum. The conjugate gradient method is used in this subpackage. And some improved measures have been involved to accelerate the calculation speed and to increase the relia bility. SMPACK subpackage is provided for system simulation. Three kinds of description forms for simulation model have been involved in this subpackage, one is for linear system which can be described as state equations or transfer functions; another is for block diagram form which almost looks like the using of analogue computer, and there have 38 typical element blocks such as integration, one order, two order, mathematical calculation, signal generation and typical nonlinear functions etc. been provided; another is for differential equations model which is suitable both for linear and nonlinear systems simulation. Several differential equation calculation methods have been involved , which are : Runge-Kutta, Euler, Rung-Kutta-Shampine, Runge-Kutta-Merson, Runge-Kutta Fehlberg, Adams, Gear, Rosenbrock etc. ASCDSP subpackage is provided for singlevariable self-tuning control systems design, the system model can be in didcrete diffirence equation form or state space equation form. Eight kinds of self-tuning system design methods have been involved
159
in this subpackage, which are: implicit or direct self-tuning calculation methods, which identify the parameters of selftuning controller directl y such as minimum variance self-tuning re gulator, minimum var i ance pole-assignment self-tuning controller, generalized minimum variance self-tuning controller, pole-assignment self-tuning controller for non-minimum phase system; explicit or indirect selftuning calculation methods, which identify the parameters of s ystem model in the first step then calculate the parameters of self-tuning controller in the second step, such as pole-assigenment method of direct solving polynomial equation and to identify the control parameter; pole-assignment method and minimizing quadratic performance criter~a method to match the state space model. The self-tuning system design is carried out during the entire system simulation procedure. AMCDSP subpackage is provided for multivariable self-tuning control systems design. Four kinds of self-tuning system design methods have been involved in this subpackage, which are : minimum variance self-tuning regulator; generalized minimum variance self-tuning controller; pole assignment self-tuning regulator; minimum variance pole-assignment self-tuning regulator. There are five kinds of parameters recursive estimation methods involved in this subpackage : least square, square root filter least square, extension least square, extension square root filter least square, fixed trace recursive estimation method. AMRCSP subpackage is provided for singlevariable model reference adaptive control system design. It is sutable to solve parallel adaptive control function for less then three orders system, which is varied only for the altitude of system coefficient. The adaptive system design is carried out during the entire system simUlation procedure. PCJDSP subpackage is provided to design the control systems by the singular perturbation method for complex systems, which both have some high speed variables and some low speed variables. This subpackage has the system analysis and synthesis functions, which are: decomposition of high speed and low speed models for singular perturbation system, anal ysis of system stalility, controllability, observability characteristics; design of poleassignment, observer, reduced order observer, state feedback controller and suboptimal regulator for singular perturbation system. BLINAL library is provided for linear algebra methematical calculations. It is composed mainly by three parts, which are: solving various kinds of linear algebra equation sets, the Gaussian decomposition of coefficient matrix, determ i nant, inverse matrix and condition n umber also can be obtai ned; solving various special decomposition of matrix and least square method, the pseudo-inverse matrix and condition number also can be obtained; solving eigen value and eigenvector of matrix. All of the methematical calc ulation can be implemented in single precision real form or dOUble precisi on real form. There are 87 subroutines involved in this library, each
Chen Zhen-Yu, Han Jing-Qing and Wang Zhi-Bao
160
subroutine can be used independently. OPPACK library is provided for basic programs of optimization calculus. It is composed by six kinds of optimization calculation methods, which are : search methods to solving critical value of singlevariable functions, some methods are need not to solve the derivative of functions and some methods are need; direct search methods to solve minimum value of multivariable functions, all the methods are need not to solve the derivative of function such as conjugate direction, simplex, parabola approximation methods etc.; conjugate gradient methods to solve minimum value of multivariable functions, these methods require to solve minimum value of multivariable functions, these methods also require to solve the value and gradient of the function; Newton's method to solve minimum value of multivariable functions, which requires to solve the value, gradient and Hessian matrix of the function; Sumt method to solve the minimum value of multivariable functions under the restricted condition, which also requires to solve the value and gradient of the function. CSCCAT subpackage is provided for analysis and design of linear singlevariable control systems by classical control theory methods to match the requirement of teaching in universities. In system analysis part, Routh's criterion is used for stability analysis; Runge-Kutta method is used for solving system time domain performance index; the root locus can be obtained by solving roots and pOints search method etc. In system design part, leading and lagging phase correction methods are used and the Bode diagram can be ploted etc. CSFCAT subpackage is provided for analysis design of single and multivariable control
I
r---------------;:~~~~~~~~~~~~~~
systems by frequency domain methods to ma· tch the requirement of teaching in univer· sities. In the singlevariable part, the different input forms of block diagram, transfer function and state space equatiol will be available, the stability and dyna· mic characteristic of the system can be analysed, the series regulator also can b, designed. In the multivariable part, the inverse Nyquist array method is used to design the multivariable control systems. CSSCAT subpackage is provided for analysi l and design of single and multi variable control systems by state space methods to match the requirement of teaching in universities. The functions of system stability analysis, transformation of standard forms, minimum realization and simulation are involved for single and multivariable systems analysis. And the functions of pole assignment of states feedback or out· puts feedback and states feedback of mini· mum orders observer methods are involved for single and multivariable system design. THE MANAGEMENT OF PACKAGE The CCSCAD package has two kinds of opera· ting mode. One is the Interactive mode, which implements CAD of control system step by step by the using of man-machine dialogue, and all the running commands ar , input through the keyboard. If anyone is not familiar with ccscad package or if a new control system will be designed just in first trial stage, the Interactive ope· rating mode will be recommend to him, th~ the designer can know the CAD process in details, or can try each possibility with various commands and parameters. Another is the File mode, which implements CAD like a batch process, a lot of CAD
Iteractive or ~F~____________, File mode? / ,______________ ~----------------I _ _ _ _ _ _ _ _- L_ _ _ _ _ _ _ _- , Display the menu of macrocommand files names {Answer the name or End command}
Display the menu of subpacka~es name s ( Answer the name or End command)
N
' -____________-7-~I'-< It er act i ve or :;'ile mod e ? P.un all the commands involved in the macrocommand file
l
8. Fig. 2.
mod e ?
>
Y (I s theN End command?
The block diagram of package management program
y
N
F
The Structure and Functions of CCSCAD Package
161
requirements of describing the functions of all subpackages. First layer is input the command name, second layer input the subcommand name. The third layer is input three groups of structure parameters to describe the model states and other characteristics for linear systems, and input nonlinear express function and structure parameters for nonlinear systems. Then the input and output data files, output equipments and forms will be appoined. After the decode of command, subcommand and structure parameters, the relative data files will be opened and the command, subcommand will be executed to run the relative subroutine to implement the appointed CAD jobs. The above procedure can be done once more in one subpackage when the designer wants to try again. If the designer has reached the target to use in one subpackage, then he can return to CCSCAD system to call another subpackage or get the end.
commands are prearranged as a file to satisfy the requirements of control system CAD in every details. When this macrocommand file starts to run, the commands in the file will be executed one by one in series. This File mode can do the CAD with high efficiency. Of course, user must familiar with CCSCAD package, and all the pre-trials must be done before. The block diagram of package management program is shown in Fig. 2. When the CCSCAD package starts to run, first step is to select the operating mode, if Interactive mode is selected, the menu of subpackage names will be dispalyed on the CRT and user can select the required subpackage to implement CAD jobs by interactive dialogue. If File mode is selected, the menu of macro-command file names will be displayed on the CRT, and user can select the required file to run the relative macro-command set.
If we consider the above softwares as the kinds of resources, the Fig. 4 expresses the fumctions of management program as the center of CCSCAD package, which dispatchs all the resources of package to implement all the functions of CAD.
When the appointed s~package is going to run, the subpackage management program will control all the functions of subpackage. The block diagram of subpackage management program is shown in Fig. 3. All the functions of subpackage are controled by various commands. An unified command, subcommand and parameters three layers structures have been designed to cover the
All of the functional subpackage are written by FORTRAN language, and the parts of
Call sub package
IInput command namel
I Input
1 subcommand namel
"lonl~~_~ _~r_nonli_~ea:_ function ~I>-__L_i----'T Input structure paramete rs group 1
I Input nonlinear express funct ion and structure Parameters
1
Input structure parameters group 2
I
I
J
L
Input struc~1 parameters ~
I
3
Appoint input and out.,ut data files and equipmantsl
________________~__- - , I
I
c-~______~__~_LL-
1
IDecod e command.. subcommand and paramet ers, and open ~_files. Execut command and subcommand. -'
1 .~----------Y---~~-~t~~~~JpaCkage
..
Fig. 3.
again
?~
N
Return to
CC SCAD
The block diagram of subpackage management program
Dis.,atching man86emant program
Input data files
Fig. 4.
Output data files
The operting diagram of CCSCAD resources
162
Chen Zhen- Yu, Han Jing-Qing and Wang Zhi-Bao
CAT subpackages are written by BASIC language due to easy to match the teaching requirements. The entire CCSCAD package contains 150 , 000 statements, which can be run on the midium size computer and also can be run on the micro-computer but in the unit of subpackage in a series sequences. APPLICATIONS AND DEVELOPMENT OF CCSCAD PACKAGE The construction of CCSCAD package had been finished in 1986, and a lot of engineering applications are carried out in universities, institutes and other departments. Following are a part of examples : Singlevariable subpackage had been used to design the combustion control systems. The servo control systems of industrial robot and automobile hydraulic driven control s ystems were designed both by using single and multivariable subpackages, and the modelling of navigation direction control and side thrust control were implemented by bilinear identification method. The aviation control system was designed by using of LQG multivariable subpackage. The multivariable frequency domain subpackage had been used to design the aviation horizontal stablizing systems, combustion control systems of petroleum heating furnace, temperature control systems of heat treatment furnace. The single and multivariable self-tuni~g subpackage had been used to design the combustion control systems of boilers and the temperature control systems of an nealing furnace. The multivariable state space method subpackage had been used to design the electric power control system of electroslag remelting process. The simulation subpackage had been used for to simulate the above designed systems and others. The time series and prediction subpackages had been used to predict the railway passengers flow rate, the electric power system load rate, the production rate of oilfield and the demand rate demand rate of steels etc. The CAT subpackages also had been used for teaching in several tens universities. The CCSCAD package is established by cooperative efforts, and now this cooperative working group which are composed by a lot of universities and institutes are gOing to improve the characteristic of package. The contents of improvement planning consist as following. Some new CAD expert systems will be developed, in the early time an expert system for simulations had been built as a subpackage, which has a knowledge base mainly used for inspecting the Stiff characteristic of simulsted system, and can select calculation methods automaticly. The function of this subpackage will be improved, and other expert systems such as problem driven CAD system etc. also will be developed. The real time environment adaptive system CAD package have been planned, the CAD package will connect with real plant measuring system to collect the process detected information, and the adaptive controller will be designed linked with actual plant in the real time environment, and the result of' controller design will be much more satisfied for the real time control. Some new mathematical calculation methods for system design also will be developed. The software engineering methodology will be
applied to improve the quality of programming as well as the system maintainability. The express form of system input and output such as tables and graphs will be diversified. REFERENCES Chen Zhen-Yu. (1985). Industrial applications of CAD packages for control systems in the PRC. 3rd IFAC Symp. on om uter ided esi n in ontrol and Engineering SYstems, July 1-Aug. 2, 19 5. Lyngby, Denmark. Han Jing-Qing. (1984). Polynomial method for design of control systems. Information and Control, Vol.13.No.1-3. Han Jing-Qing, Xu Ke-Kang. (1986). The structural algorithm of matrix sequence and linear systems. Control Theory and Applications, Vol.3.N6.2. Wang Zhi-BaO, Lu Gui-Zhang, Wang Xiu-Feng. (1985). Design of the control system CAD Roftware package. Control Theory and Applications, Vol.2.No.2.