Teaching System Identification Through Interactivity
Total Page:16
File Type:pdf, Size:1020Kb
8th IFAC Symposium on Advances in Control Education (ACE 2009), Kumamoto, Japan, October 21 - 23, 2009. Teaching System Identification Through Interactivity J.L. Guzm´an ∗ D.E. Rivera ∗∗ S. Dormido ∗∗∗ M. Berenguel ∗ ∗ Dep. Lenguajes y Computaci´on, University of Almer´ıa, Spain (e-mail: joguzman,[email protected]) ∗∗ Department of Chemical Engineering, Arizona State University, Tempe AZ 85287-6006 USA (e-mail: [email protected]) ∗∗∗ Dep. Inform´atica y Autom´atica, UNED, Spain (e-mail: [email protected]) Abstract: The paper describes the main features of an interactive software tool developed in support of system identification education. This Interactive Tool for System Identification Education (ITSIE) provides two distinct functional modes that are very useful from an educational point of view. The simulation mode enables the student to evaluate the main stages of system identification, from input signal design through model validation, simultaneously and interactively in one screen on a user-specified dynamical system. The real data mode allows the user to load experimental data obtained externally and identify suitable models in an interactive fashion. The interactive tool enables students to discover a myriad of fundamental system identification concepts with a much lower learning curve than existing methods. Keywords: System identification education, interactivity, experimental design, prediction-error estimation, model validation. 1. INTRODUCTION real-time connection between decisions made during the design phase and results obtained in the analysis phase of System identification deals with the problem of building any control-related project. Because system identification dynamical models of systems from experimental data, and is a field rich in visual content that can be represented is a key component in control engineering practice [Ljung, intuitively and geometrically [Ljung, 2003a], it naturally 1999]. Consequently, system identification education forms lends itself to interactivity. A novel interactive software an essential part of any comprehensive control engineering tool for system identification was developed in Guzm´an curriculum, and as such requires flexible and simple-to-use et al. [2009] based on these ideas. This Interactive Tool software tools. There are many powerful software tools for System Identification Education (ITSIE) addresses the available for system identification [Garnier and Mensler, various issues described previously. It includes all stages 2000, Ljung, 2003a,b], but these present several disad- of system identification in the same screen, with the dif- vantages when viewed from a primarily educational point ferent stages connected interactively in such a way that a view. Normally, these tools do not evaluate all stages of the modification in one stage is automatically visualized in the system identification process (experimental design, model remaining stages. structure selection, parameter estimation, and validation) in an integrated fashion. Furthermore, available tools pro- vide substantial amounts of information in many different The work described in Guzm´an et al. [2009] represents screens, which can be quite confusing for students. Finally, an initial effort to develop an interactive software tool for system identification is naturally performed in an itera- identification, with some limitations from an educational tive manner, that is, it involves a refining process where perspective. The only plant option available is a simulated subsequent stages need to be recalculated step by step SISO fifth-order system, with no option to enable the when a parameter or specification is modified. Failure to instructor to configure his/her own simulated example accomplish these iterations in a manner transparent for that could be shared with students. It is not possible to the user diminishes any educational benefits since students load external data in order to identify models from real lose the connection with theoretical ideas and become less experiments, Finally, students cannot generate any reports motivated. Thus, a new generation of software tools ad- summarizing the results obtained with the tool. dressing these concerns are needed in support of advancing This paper presents a new improved version of this tool system identification education. providing all these new features, among others. The tool consists of a graphical interface depicting the various Interactive software tools have been proven as particularly stages of system identification. The paper emphasis is on useful techniques with high impact on control education describing the tool that examines the integrated effect [Dormido et al., 2005, Guzm´an et al., 2005, Guzm´an, of experimental design and model structure selection on 2006, Guzm´an et al., 2008]. Interactive tools provide a prediction-error estimation. Both pseudo-random binary PREPRINT 8th IFAC Symposium on Advances in Control Education (ACE 2009), Kumamoto, Japan, October 21 - 23, 2009. sequence (PRBS) and minimum crest factor multisine in- ns √ puts are applied for ARX, ARMAX, Output Error (OE), u(k)=λ 2αi cos(ωikT + φi) (2) Box-Jenkins (BJ), and State Space (SS) estimation of this i=1 system [Braun et al., 2002]. Experimental duration, esti- ωi =2πi/NsT, ns ≤ Ns/2 mation and crossvalidation data sets, input signal band- width and magnitude, and model structure are evaluated The power spectrum of the multisine input is directly λ under varying signal-to-noise ratios, with all results com- specified through the selection of the scaling factor , α puted and displayed interactively to the user. The inter- the Fourier coefficients i, the number of harmonics n N active tool is coded in Sysquake, a Matlab-like language s, and the signal length s. with fast execution and excellent facilities for interactive graphics [Piguet, 2004]. Executable files for the modules Both direct parameter specification and applying that do not require the Sysquake software to operate are time constant-based guidelines for input design are in the public domain and available for Windows, Mac, and evaluated in the tool. In practice, little is known about Linux operating systems [Guzm´an et al., 2009]. the process dynamics at the start of identification testing, and plant operating restrictions will discour- age excessively long or very intrusive identification The paper is organized as follows: a brief description on experiments. A guideline that provides a suitable the theoretical background behind the tool is presented estimate of the frequency band over which excitation in Section 2. A summary of the tool’s functionality is is required is presented in Section 3. A series of illustrative examples 1 αs ≤ ω ≤ , (3) are presented in Section 4. The paper concludes with a β τ H τ L brief discussion of development plans for the future. s dom dom τ H τ L where dom and dom are high and low estimates of the dominant time constant, and βs is an integer factor 2. THEORETICAL BACKGROUND representing the settling time of the process. For example, βs = 3; specifies the low frequency bound The theoretical background behind ITSIE is presented using the 95% settling time (T95%) of the process. αs, in Guzm´an et al. [2009]; we summarize here the more meanwhile, is a factor representing the closed-loop salient points, with emphasis on the simulation mode. In speed of response, written as a multiple of the open- ITSIE, the plant to be identified consists of a discrete-time loop response time. system sampled at a value specified by the user (default value T = 1 min) and subject to noise and disturbances Equation (3) is used in ITSIE to specify design vari- according to ables in both PRBS and multisine inputs. Expressions for specifying Tsw and nr based on (3) are developed y t p∗ q u t n t n t . ( )= ( )( ( )+ 1( )) + 2( ) (1) in Rivera [1992]: . τ L πβ τ H 2 8 dom nr 2 s dom In (1), y(t) is the measured output signal and u(t)isthe Tsw ≤ ,Ns =2 − 1 ≥ (4) input signal that is designed by the user. p∗(q) is the zero- αs Tsw order-hold-equivalent transfer function for p(s), where q is nr and Ns are integer values, while Tsw is an integer the forward-shift operator. The system is subject to two multiple of the sampling time T . Similarly, Equa- stationary white noise sources (n1 and n2) introduced at tion (3) can also be used to specify design variables different locations in the plant. n1 allows evaluating the in multisine inputs, using guidelines found in Rivera effects of autocorrelated disturbances in the data, while et al. [1993] n 2 introduces white noise directly to the output signal. πβ τ H N Tα N ≥ 2 s dom ,n≥ s s s s L (5) A comprehensive system identification procedure consists T 2πτdom of experimental design and execution, data preprocessing, α β model structure selection and parameter estimation, and In both cases increasing s and s will widen the model validation. The following are emphasized in the tool: frequency band of emphasis in the input signal and increase the resolution of the input signal spectrum. • Experimental design and execution. The success of To reduce model variance it is beneficial to apply the any identification methodology hinges on the avail- highest input signal amplitudes amag or λ that oper- ability of an informative input/output data set ob- ations will allow, and implement the greatest number tained from a sensibly designed identification exper- of input cycles m possible. In practice, decisions re- iment. In ITSIE, deterministic, periodic signals rely- garding the magnitude of the input signal, spectral ing on pseudo-random binary sequence (PRBS) and content, and experimental test duration are dictated multisine inputs are considered. A PRBS is binary by physical limitations, economics, and safety consid- signal generated by using shift register modulo 2 erations Ljung [1999]. addition. One cycle of a PRBS sequence is determined by the number of registers nr and the switching time In multisine inputs, the choice of phase angles Tsw. The signal repeats itself after NsTsw units of φi does not influence the power spectrum, but it nr time, where Ns =2 − 1; amag is the magnitude of does strongly influence plant-friendly metrics such as the PRBS signal.