Edwin Engin Yaz
Department of Electrical Engineering
University of Arkansas, Fayetteville, AR 72701
E-mail: ey1@engr.uark.edu
Asad Azemi
Department of Engineering
Penn State Delaware County Campus, Media, PA 19063
E-mail: axa20@psuvm.psu.edu
The Electrical and Engineering Department at the University of Arkansas and Electrical Engineering undergraduate and graduate programs at the Penn State Delaware County and Great Valley Campuses, respectively are incorporating computer aided engineering (CAE) and computer aided design (CAD) packages into their curricula. The intent of augmenting the curriculum with these packages is to enhance the students theoretical understanding of the material with hands on analysis and design experience. The benefits of CAE and CAD packages in the classroom have been realized by the authors and their co-workers before [1-4]. The benefits of using these packages in a university setting is also confirmed by the number of new textbooks, and revisions of previously printed textbooks incorporating new exercises and problems based on these packages, such as [5-12]. A summary of the advantages and disadvantages of incorporating these packages into our graduate curricula are presented below. The summary is followed by sections outlining the use of each package in specific classes.
One of the main advantages of using these tools is the reinforcement of student understanding of theoretical principles by means of enhanced graphical aids. Simulation results can be used effectively in classroom to emphasize the characteristics of devices and show the similarities and differences that exist between an actual and theoretical characteristics. The simple graphical nature of the simulation outputs tend to help students understand the operation of mathematically complex system behaviors.
Another equally important advantage is the preparation for analysis and the design of more complex systems than those that can be treated with pencil and paper, much like the ones students will see in industry. With these tools, instructors can assign fairly complex design problems that otherwise would be unrealistic without the help of such software. This is a key advantage that helps students apply the theoretical principles learned in the classroom to the real world problems associated with following a design cycle through completion.
Student response concerning the use of these packages is generally favorable. One interesting response received from students is an increased interest in the subject material due to the use of these packages. Student interest is heightened by the prospect of being able to design a fairly complicated system that would otherwise have to be studied only theoretically. Students are also interested in using these packages as a preparation for professional careers. They realize that getting familiar with CAE/CAD packages that will be commonly used by engineers will provide them with an important advantage later in their career.
Three of the disadvantages of using these packages are the maintenance and operation of these packages on an accessible computer system, the extra work required by students (and instructors), and assuring that the packages are included in the baseline curriculum as part of the required course material.
Requiring the use of these packages in homework assignments generally implies 24 hour student access to computer facilities. These packages tend to require large amounts of memory, and can exhibit unusually slow response times as the computer system load increases.
The second disadvantage is the additional time requirements for both students and instructors. The additional time required for students to run the simulations must be acknowledged and accounted for when assigning homework. The additional time required for the instructor includes not only the time it takes to develop and run through each simulation, but also the time required to generate handouts detailing the steps required to log into the system, use the particular package, and obtain printouts of results. The instructor must come up with tutorials to compensate for the lack of textbooks available on the use of these packages in specific areas that the courses cover. Furthermore this extra effort can not easily be quantified to be of any use in tenure/promotion/merit raise decisions by the administrators.
The third disadvantage is in defining a baseline in the curriculum for teaching these software packages. Different instructors rotate through undergraduate teaching responsibilities, and some are unwilling to incorporate these packages into their classes because of the extra effort needed. This creates students with different knowledge levels in following classes that assume that all students are familiar with the package. This can result in frustration for the students who did not have prior exposure to these material if assignments are made based on previous familiarity with the software package.
Although, a lot of work has been done in incorporation of MATLAB [13] into undergraduate control system textbooks and courses [5-12], there is no reference textbook for a graduate level linear control systems. It should be mentioned that some of the work done in an undergraduate control systems textbook, using MATLAB, could also be applied to a graduate level course. We will mention some of these functions and/or tools and others shortly.
A typical graduate level linear control systems course will discuss modeling, different state space representation of a dynamical system, matrices and matrix calculus, vectors and linear vector spaces, Lyapunov equations, eigenvalues and eigenvectors, functions of square matrices, analysis of continuos- time and discrete-time linear equations, stability, controllability, the relationship between state variable and transfer function description of a system, and possibly design of linear feedback control systems. Since, these type of courses heavily involve mathematical derivations and/or proofs, the use of a simulation package can help to provide some visual aid and make the presentation of the course material more understandable.
The MATLAB function ``eig'' solves the generalized eigenvalues and eigenvectors, when used with two input arguments (e.g. eig(A,B)). Care should be taken in using these functions since the values of generalized eigenvalues are not unique. This function is also helpful in determining positive- or negative-definiteness of a matrix. It can also be used in determining the stability of a system.
The function ``lyap or ``(dlyap'' for discrete time)'' can be used to solve the special and general form of the Lyapunov matrix equation.
The functions ``ctrb'' and ``obsv'' can be used for determining the overall stability and observability of a system described in state-space form.
Partial fraction expansion, which is used in finding parallel realization of a system, can also be performed using MATLAB. The relationship: [r, p, k] = residue[b, a] finds the residue, poles and direct terms of a partial fraction expansion of the ratio of two polynomials.
MATLAB also has many functions that can be used in state-space representation of a dynamical system. ``ss2tf'' can be used to convert a state space representation to transfer function form. ``tf2ss'' function can be used to convert a system in transfer function form to state-space form. One can also write MATLAB programs to convert the state-space representation of a system to a phase-variable form and vice versa [8]. The function ``printsys'' is also very convenient for printing the transfer function representation.
MATLAB can also be used in solving state equations. Numerical simulations and results can be obtained by using ``lsim ``(dlsim for discrete-time systems)'' function. It is also possible to obtain state transition matrix for both continuous- and discrete-time systems [8, 14]. It is also possible to write a MATLAB program to obtain Laplace transform of state transition matrix [8].
MATLAB offers a lot in terms of simulation, state estimation, and linear quadratic control of stochastic systems.
White noise with uniform density can be generated with ``rand.'' If Gaussian (normal) noise is needed, we use rand (`norm'). These are for generating white (time-wise independent) noises.
Auto-corrolated (colored) noises can be generated by modeling a discrete time system driven by a white noise. Cross-correlated random sequences can be generated by adjustment of the coefficient matrices of the white noise inputs.
Random white sequences with any other pdf than ``uniform'' or ``normal'' can
be generated by finding the transformation
between the e.g.
uniformly distributed sequence
and
where
having the required distribution.
Then, applying this transformation to uniformly distributed,
, we get
with the necessary distribution.
Wiener processes used in continuous time stochastic system simulation is
generated by summing normally distributed white noise in the following
way:
where
is normally distributed with zero mean and unit variance.
Colored noise and cross-correlated noise in continuous time can be generated similar to the discrete time case. Means, standard deviations, and covariances of sequences can be found easily by ``mean,'' ``rd,'' ``std^2.''
Commonly used discrete stochastic system models like
where
is normally distributed
with a specified mean and covariance, can easily be set up using ``dlsim''
with the required stochastic input generated as described before.
Mean and covariance evaluation of such systems can be found from the mean
equation:
((
) denoting mean value)
which is a difference equation whose solution
can be generated by also
``lsim''
The covariance evolution is given by
that can be generated with a ``for loop.'' If only the steady state value
of the covariance is needed, and if the system is stable (A has all
its eigenvalues inside the unit circle), then we can use ``dlyap'' or ``dcovar.''
Models can be converted from one form to another (e.g.. state space to transfer function) using control system toolbox the same way as for deterministic systems.
For continuous-time system simulation, the white noise (which involves infinite frequencies) is usually interpreted as band-limited (colored) noise with a cutoff frequencies that is high with respect to the system's natural frequencies but low with respect to the sampling frequency. This will allow the usual (e.g. 4th order) Runga Kutta integration algorithms to be used in analysis. Controllability and observability are tested by ``ctrb'' and ``obsv,'' the same way in the deterministic case.
Steady state Kalman filters (with constant gains) or other full-order state observers (with constant gains) can be designed using ``estim'' or ``lqe'' for continuous- and ``destim'' and ``dlqe'' for discrete-time models. ``lqed'' is used to do discrete estimator design based on continuos cost function.
``Acker'' and ``place'' can also be used to find the observer gains that assign the observer eigenvalues to certain locations in the complex plane. ``place'' works also with multi-output systems, so it's more versatile.
``Acker,'' and ``place'' can also be used for designing controllers based on pole-placement.
For steady state solution of the mean square optimal control problem, we can use ``lqr (or ``dlqr'' for discrete case).'' ``lqrd'' is used to design discrete regulators based on continuous cost function. Finally, for contrller/estimator combinations, ``reg (or ``dreg'' for discrete)'' is used that forms a controller/estimator.
In this paper, we have presented the use of MATLAB software packages in our graduate curriculum, at the university of Arkansas and the Penn State University. Several of the advantages provided by computer simulation packages, such as MATLAB, include a reinforcement of student understanding of theoretical principles, allowing assignment of larger, and more complex designs, increased student attentiveness, and enhanced professional development. The main disadvantages of using computer simulation packages are the extra work required of students and instructors, the maintenance and operation of these packages on an accessible computer system, and assuring that the packages are inserted in the baseline curriculum as part of the required course material. The general student reaction to the use of MATLAB has been very positive. Although, the students have access to MATLAB and its Control Systems and Signal Processing toolboxes in our computer labs, most of them prefer to purchase the ``Student Edition of the MATLAB, Windows Edition.'' This gives them an opportunity to work with MATLAB at their own convenience. But, it should be also mentioned that the student version contains sample functions of the MATLAB toolboxes, and not all the functions available there.