MatLab versión 6 - Facultade de Informática
Transcripción
MatLab versión 6 - Facultade de Informática
MatLab versión 6 FACULTADE DE INFORMÁTICA SOFTWARE Matlab Versión 6 Introducción En los últimos años la Facultad de Informática de A Coruña ha venido utilizando el software Matlab para la realización de los créditos prácticos en las tres titulaciones impartidas en la Facultad: Ingeniería Informática, Ingeniería Técnica Informática de Gestión e Ingeniería Técnica Informática de Sistemas. Matlab, desarrollado por la compañía MathWorks, es un producto ampliamente reconocido para la informática técnica que abarca gran variedad de áreas de aplicación, entre las que se encuentran el procesamiento de imágenes, sistemas de mando, ciencias naturales, finanzas, economía... Este entorno incluye herramientas para adquisición y análisis de datos, visualización y procesamiento de las imágenes, prototipos de algoritmos, planificación y simulación, programación y desarrollo de aplicaciones y un largo etcétera. Dentro de un entorno muy amigable con una facilidad extraordinaria para la resolución de problemas relacionados con diversas disciplinas. Matlab integra informática matemática, visualización y un lenguaje técnico muy poderoso. Permitiendo además importar rutinas externas escritas en LENGUAJE C, C++, Fortran y Java a sus aplicaciones. Existen diversas implementaciones Open Source compatibles en cierta medida con Matlab, como Octave y Scilab que dan una muestra de como se puede aprovechar el "saber hacer" de MathWork, puesto que incorporan sus técnicas de trabajo y sus entornos amigables. Hasta ahora se han utilizado los módulos de Matlab, Simulink, Neural Network Toolbox, Signal Processing Toolbox, Wavelet Toolbox y Communications Blockset en asignaturas tales como Sistemas Conexionistas, Tratamiento Digital de la Señal, Técnicas de Simulación, etc. http://www.fi.udc.es/cc/srv/sft/Matlab6.html (1 of 3) [25/10/2004 11:41:42] MatLab versión 6 Matlab Versión 6 En Marzo de 2001 se ha instalado para uso docente en la Facultad de Informática la versión 6 de Matlab que proporciona un entorno mejorado, cuyas características más reseñables son: ● Nuevo escritorio con una carpeta de herramientas para manejar el entorno de MATLAB, incluida la Ventana de Orden, la ventana de Historia de Orden, Workspace Browser, Editor de Serie, etc. ● Mejora del cómputo matemático y perfeccionamiento de los algoritmos: la biblioteca de LAPACK esta perfeccionada para realizar cálculos de matrices más rápidos, nuevos solvers de ecuaciones diferenciales y algoritmos de cuadratura más exactos. ● Nuevas estadísticas de los datos y las herramientas básicas para el análisis rápido de datos trazados. ● Nuevos rasgos avanzados de visualización: despliegue de imágenes 2-D, superficies y volúmenes como objetos transparentes; la barra de herramientas de la cámara interactiva para controlar perspectivas. ● Nueva interface para llamar rutinas de Java y los prebuilt usando Java objet directamente de MATLAB. ● Nueva interface de comunicación del puerto serie para comunicar con instrumentos externos a MATLAB. ● Integración de MATLAB con Microsoft Visual Estudio. ● Ventana de ayuda que permite buscar, leer e imprimir la documentación en linea. Algunos Toolboxes utilizados en la docencia de la Facultad de Informática de A Coruña han sido mejorados, tales como: ● Signal Processing Toolbox 5: proporciona herramientas para el análisis de señales y sistemas lineales, para modelar datos de series temporales y para el desarrollo de algoritmos. ● Filter Design Toolbox 2: complementa al Signal Processing Toolbox 5 proporcionando técnicas de diseño de filtros avanzados. ● Control System Toolbox 5: proporciona un entorno interactivo para modelar, analizar y diseñar sistemas de control. ● Neural Network Toolbox 4: proporciona los algoritmos mas utilizados en el diseño y simulación de redes de neuronas. Uso http://www.fi.udc.es/cc/srv/sft/Matlab6.html (2 of 3) [25/10/2004 11:41:42] MatLab versión 6 Para la ejecución de este entorno de trabajo en los sistemas de docencia deberá realizar su conexión a la maquina de alias matlab. El programa se ejecutará utilizando la instrucción matlab. Información adicional Para una mayor información sobre las mejoras introducidas en esta nueva versión de Matlab se pueden consultar las siguientes páginas: ● Características generales de la release 12: [HTML] ● Nuevas características de Matlab 6: [HTML] [PDF] ● Nuevas características de Simulink 4: [HTML] [PDF] ● Nuevas características de Control System Toolbox 5: [HTML] [PDF] ● Nuevas características de Neural Network Toolbox 4: [HTML] [PDF] ● Nuevas características de Signal Processing Toolbox 5: [HTML] [PDF] ● Nuevas características de Wavelet Toolbox 2: [HTML] [PDF] ● Nuevas características de Communications Blockset 2: [HTML] [PDF] © Copyright 2001. Centro de Cálculo da Facultade de Informática. http://www.fi.udc.es/cc/srv/sft/Matlab6.html (3 of 3) [25/10/2004 11:41:42] What’s New for M ATLAB 6? ® Feature highlights for MATLAB 6 and other new and updated Release 12 products for analysis, visualization, algorithm development, and application deployment.* NEW AND UPDATED PRODUCTS DATA ACQUISITION AND ACCESS NEW! Instrument Control Toolbox 5 Data Acquisition Toolbox 6 Database Toolbox 6 DATA ANALYSIS AND MATH Signal Processing Toolbox The new MATLAB 6 desktop NEW! 7 Filter Design Toolbox 7 Control System Toolbox 8 Neural Network Toolbox 8 Statistics Toolbox 9 Spline Toolbox 9 APPLICATION DEPLOYMENT Data acquisition with the new Instrument Control Toolbox MATLAB Compiler 10 MATLAB C/C++ Math Library 10 MATLAB C/C++ Graphics Library 10 MATLAB Runtime Server 11 MATLAB Web Server 11 FINANCE AND ECONOMICS *Also included in Release 12 are numerous other products, including tools for image processing, control design, and DSP and communications. For information on these additional products, go to www.mathworks.com MathWorks customers who are under subscription service will receive their new Release 12 CD automatically. The MathWorks NEW! Datafeed Toolbox 12 Financial Derivatives Toolbox 12 M ATLAB 6 for computation, analysis, visualization, and development MATLAB 6 makes learning and using MATLAB easier, more efficient, and more effective. The new desktop front end offers a portfolio of tools that work together to transform MATLAB into an even more intuitive, integrated environment for exploration and development. These tools provide quick access to MATLAB code, variables, data files, graphics, and online help, enabling you to find what you need when you need it. New point-and-click tools make common importing and plotting tasks easy and give you fast access to the features you need to produce presentation-quality graphics. You can modify any element of your plots without coding, eliminating the need to remember command names and graphical attributes. MATLAB 6 also incorporates the LAPACK and FFTW libraries, several new mathematical algorithms, and new interfaces to external data and to Java. NEW FEATURE HIGHLIGHTS MATLAB Desktop ■ ■ ■ ■ ■ ■ ■ 2 New desktop interface with all the tools for managing your MATLAB environment Command Window for interactively exploring MATLAB Command History tool for logging executed MATLAB commands and preserving them across sessions for reference and reuse Help/Help Navigator windows for accessing, reading, and searching the online HTML documentation (browser displays documentation for all installed products concurrently) Workspace Browser for viewing and modifying variable values, types, and hierarchy (integrated with Array Editor and Import Wizard) Array Editor for viewing and editing array contents in a tabular format (linked with the Workspace Browser for easy flow between variable viewing and editing) Launch Pad for accessing documentation, demos, and GUI-based tools from all installed MathWorks products What’s New for M ATLAB 6? The new MATLAB desktop configured with the Command Window and the Launch Pad, Workspace Browser, Command History, and Array Editor tools. The data visible in the Array Editor corresponds to the highlighted variable in the Workspace Browser window. ■ ■ Current Directory browser for viewing, maintaining, and searching MATLAB files Enhanced M-file Editor/Debugger for creating, editing, and debugging MATLAB M-files The Help window (above) displays a list of topics in the Help Navigator (left portion of window) found when the user initiated a search on “transparency.” The relevant help section (right portion of window) includes a 3-D graphic and the code that created it. Language and GUI Development Features ■ ■ and feel, and provides more powerful tools for layout and alignment, property viewing and setting, and menu editing. When a new GUI is saved, MATLAB captures the results in an M-file in a structured outline framework that can serve as the basis for developing an entire application. MATLAB Java interface for calling Java code directly from MATLAB includes support for creating and using Java objects, allowing you to use Java libraries directly from MATLAB. GUIDE, a MATLAB tool for GUI prototyping and development, is now more responsive, has an intuitive look ■ ■ Function handle data type stores function information for faster function evaluation with feval. New MATLAB add-in for Visual Studio lets you create MATLAB functions (MEX-files) from C and C++ code in the Microsoft® Visual Studio environment. Advanced Visualization Features ■ ■ Display of 2-D images, surfaces, and volumes as transparent objects, enabling visualization of obscured layers of overlapping data and interior views of closed volumes Camera toolbar and menu options to control the point of view (orbit, tilt, vertical, horizontal); principal axis (scene orientation); scene light; and projection type ■ ■ OpenGL rendering, offering significant increases in display speed with graphics hardware Improved performance for large data sets and animations View of a lit 3-D isosurface with endcaps using the new smooth3 function to smooth the data. The new camera control toolbar is visible below the plot toolbar. Plot Editing, Annotation, and Analysis Features ■ ■ ■ ■ New plotting toolbar and menus for easily creating, editing, and annotating plot titles, legends, axis labels, freeform text, arrows, and lines Functions for overlaying plots of basic data statistics for x and y, such as minimum, maximum, and mean New graphical Property Editor for viewing and modifying any plot or GUI attribute Windows-style page setup for improved hardcopy output ■ ■ Basic Fitting GUI for computing polynomial fits and spline interpolation, with optional display of one or more fits on the plot Additional Basic Fitting options, including: • Saving the fit to the workspace • Computing and displaying the fit residuals • Evaluating a fit (by interpolation or extrapolation) and producing a table or plot of the results • Annotating a plot with fit equations and residuals This 2-D MATLAB graphic tracks CO2 concentration over time (measured in years). Using the Basic Fitting menu option in the new graphics toolbar Tools menu and the Basic Fitting dialog (right), 4th and 7th degree polynomial fits have been interactively applied to the data. Data compiled by J.M. Barnola et al., Worldwatch Institute. What’s New for M ATLAB 6? 3 Data Access and File Format Enhancements ■ ■ ■ ■ ■ ■ ■ ■ New Import Wizard for easy importing of external data from a file into the MATLAB workspace Serial port interface for direct access to peripheral devices such as modems, printers, and scientific instruments via your computer’s RS-232, RS-485, and RS-422 ports (PC, Solaris, Linux) Importing of Microsoft Excel worksheets Improved figure export to other programs, such as Microsoft Word and PowerPoint (Clipboard via EMF files) Importing and exporting of Windows AVI files (uncompressed only for UNIX) Importing of GIF format data files Importing of Windows Icon and Cursor files (all platforms) CCITT Group 3 and 4 fax support for TIFF files The Import Wizard allows you to preview the contents of data files before importing them. A preview of the list of variables is displayed in the membrane.mat file (left). The data in the variable L (highlighted) is displayed in the window on the right. Mathematical Computation and Algorithm Enhancements ■ ■ ■ ■ ■ 4 Matrix math in MATLAB now incorporates the well-known LAPACK library (which replaces LINPACK and EISPACK), increasing MATLAB’s speed on computations involving matrices of order several hundred. FFT functions such as fft and ifft now rely on the MIT FFTW library, resulting in speedups particularly for composite, prime, and large prime factor array lengths. New functions let you write C MEX-files that call LAPACK and BLAS directly from MATLAB. Qhull-based functions extend Delaunay functionality to three or more dimensions. New griddatan and griddata3 functions enable data gridding and hyper-surface fitting for three or more dimensions. What’s New for M ATLAB 6? ■ ■ ■ ■ New differential equation solvers solve two-point boundary value problems for ODEs by collocation initial-boundary value problems for parabolic-elliptic PDEs. The eigs and svds sparse matrix computation functions now use the well-known Fortran ARPACK library. The symmlq, minres, and lsqr sparse matrix computation functions now solve symmetric indefinite and rectangular systems. Faster, more accurate quadrature algorithms now handle singularities. PRODUCTS FOR DATA ACQUISITION AND ACCESS Instrument Control Toolbox 1 The Instrument Control Toolbox allows you to communicate with data acquisition devices and instruments, such as spectrum analyzers, oscilloscopes, and function generators. Support is provided for GPIB and VISA communication protocols. The toolbox lets you generate data in MATLAB to send out to an instrument or read data into MATLAB for analysis and visualization. NEW FEATURE HIGHLIGHTS ■ ■ ■ ■ ■ ■ ■ Support for: • GPIB (IEEE-488, HPIB) interfaces from Agilent, CEC, ComputerBoards, IOTech, Keithley, and National Instruments • VISA (Serial, GPIB, VXI, GPIB-VXI) interfaces from Agilent and National Instruments Graphical user interfaces for instrument setup and communication Reading and writing of binary and ASCII data Event handling for errors, timeout, bytes available, data written, and other events Recording of data transferred to and from instruments Synchronous and asynchronous (blocking and non-blocking) read and write Advanced serial port (RS-232, RS-422, RS-485) support The Instrument Control Toolbox provides tools for communicating with instruments and external devices. Two GUIs, instrcreate and instrcomm , allow you to easily configure and control your instruments. What’s New for M ATLAB 6? 5 Data Acquisition Toolbox 2 The Data Acquisition Toolbox allows you to control and communicate with a variety of data acquisition hardware devices. You can configure external hardware, stream live data directly into MATLAB for analysis, and send data out. Version 2 of the Data Acquisition Toolbox now includes support for ComputerBoards hardware. NEW FEATURE HIGHLIGHTS ■ ■ Support for ComputerBoards devices, including hardware that supports analog input, analog output, and digital I/O Data Acquisition Adaptor Kit for developing custom interfaces to data acquisition devices Data read into MATLAB can be analyzed and visualized while it is being acquired. Here, a signal from an oscilloscope is visualized in a MATLAB graphics window. Database Toolbox 2.1 The Database Toolbox allows you to query and exchange data with most ODBC/JDBC databases directly from MATLAB. Version 2.1 of the Database Toolbox makes it easier to query data and quickly access the MATLAB report-generation tools. This version performs approximately 100 times faster than version 2. The Database Toolbox is now available on all platforms for which MATLAB offers Java support. NEW FEATURE HIGHLIGHTS ■ ■ Group qualifier in the Where Clause dialog makes it easier to interactively select multiple query criteria. Report Generator function enables access to the MATLAB Report Generator directly from within the Visual Query Builder. The new Group option in the Where Clause dialog makes it easier to graphically select multiple query criteria. 6 What’s New for M ATLAB 6? PRODUCTS FOR DATA ANALYSIS AND MATH Signal Processing Toolbox 5 The Signal Processing Toolbox provides tools for signal and linear system analysis, time series data modeling, and algorithm development. Version 5 of the Signal Processing Toolbox provides a new graphical user interface for designing and analyzing digital filters. This interface builds on SPTool, the toolbox’s original GUI, which contains support for signal viewing and spectral analysis. NEW FEATURE HIGHLIGHTS ■ ■ ■ New GUI-driven Filter Design and Analysis Tool provides functions for interactively designing, evaluating, and comparing filters. SPTool can now play a selected portion of a signal to a sound card, eliminating the need to create subsets of the signal before listening. SPTool offers signal markers with improved readouts that you can easily manipulate. ■ FIR filter enhancements include automatic order adjustment and improvements to remez. FDATool lets you create and edit lowpass, highpass, bandpass, and bandstop FIR and IIR digital filters. You can graphically design filters from scratch or import previously designed filters. Filter Design Toolbox 2 The Filter Design Toolbox complements the Signal Processing Toolbox by providing advanced filter design techniques for designing, simulating, and analyzing fixed- and floating-point filters. The functions in the Filter Design Toolbox can help you determine the effects of fixed-point processing. You can then evaluate a trade-off between required precision width and available design resources. NEW FEATURE HIGHLIGHTS ■ ■ ■ Provides advanced techniques for designing, simulating, and analyzing digital filters Simplifies the design of fixed-point filters and analysis of quantization effects Extends the capabilities of the Signal Processing Toolbox, adding architectures and design methods for complex real-time DSP applications State trajectories showing normal behavior and overflow limit-cycles. What’s New for M ATLAB 6? 7 Control System Toolbox 5 The Control System Toolbox provides an interactive environment for modeling, analyzing, and designing control systems. Version 5 of the Control System Toolbox introduces the SISO Design Tool, a new GUI that displays root locus and Bode diagrams. You can use both root locus and frequency design techniques to perform rapid iterations on compensator design for SISO systems. The enhanced LTI Viewer is now dynamically linked to the SISO Design Tool. These two GUIs let you design compensators graphically without using the command line. NEW FEATURE HIGHLIGHTS ■ ■ ■ New SISO Design Tool for compensator design Enhanced LTI Viewer with data markers, better grids, and sharper plots Tools for setting preferences and customizing plots ■ ■ Algorithmic enhancements, including stability margins and sharper root locus plots Comprehensive new Getting Started manual The SISO Design Tool simplifies the task of designing controllers. You can click-anddrag to move the compensator poles and zeros and then automatically update the open- and closed-loop response plots. Neural Network Toolbox 4 The Neural Network Toolbox provides generalized versions of the most commonly used network paradigms and algorithms for neural network design and simulation. Version 4 of the Neural Network Toolbox adds an intuitive and comprehensive GUI for designing and managing neural networks. This version also contains a suite of new features, examples, and Simulink blocks to help you use the toolbox in control system applications. NEW FEATURE HIGHLIGHTS ■ ■ GUI tools for: • Entering, importing, and exporting data • Creating, initializing, training, and simulating networks • Visualizing and evaluating network performance New control system examples that illustrate model predictive control, feedback linearization, and model reference adaptive control ■ ■ Performance benchmarks for selecting the appropriate algorithm for your application Functions that apply weight and bias learning rules in both batch and incremental mode The Neural Network user interface allows you to import and export data, as well as create, view, train, and simulate networks. 8 What’s New for M ATLAB 6? Statistics Toolbox 3 The Statistics Toolbox includes functions and interactive tools for analyzing historical data, modeling and simulating systems, developing statistical algorithms, and learning and teaching statistics. Version 3 of the Statistics Toolbox enhances support for linear models, with new functions for the analysis of variance and support for additional regression techniques. Also included is new support for nonnormal data using robust techniques, generalized linear models for a variety of nonnormal distributions, and nonparametric techniques. NEW FEATURE HIGHLIGHTS ■ ■ ■ ■ ■ ■ New linear model functions, including: • Multivariate ANOVA, with graphics functions for examining data • Multi-way and nonparametric ANOVA • Analysis of covariance (ANOCOVA) Multiple comparisons of means and other estimates Multiple response surface fitting Calculation of simultaneous confidence bounds Support for robust regression and generalized linear models Capability for importing numeric and text data from tab-delimited files ■ ■ ■ Additional functions for distribution testing and plotting New fractional factorial design generation Multivariate t random number generation The gplotmatrix function creates a matrix of scatter plots. In this example four measures of automobile performance are compared: miles per gallon (MPG), acceleration, weight, and horsepower. You can also use the function to group variables. In this example, the year of manufacture has been added to the analysis. Spline Toolbox 3 The Spline Toolbox provides powerful features for data fitting and visualization and for interpolation and extrapolation, allowing you to fit a curve or surface through a set of observational data. Version 3 of the Spline Toolbox gives you easy access to this functionality through a new GUI, as well as features that help you learn about and work with splines more easily and productively. NEW FEATURE HIGHLIGHTS ■ New graphical user interface allows you to: • Create and manage various spline approximations • Add, delete, and move data or knots • Vary parameters that affect a spline fit • View the first or second derivative of a spline or its error • Save splines to the workspace • Observe the underlying toolbox commands that generate the spline ■ ■ New command-line option that lets the approximation functions determine the knots Enhanced documentation with an expanded tutorial and a new glossary With the new Spline Tool you can view and compare multiple spline fits on the same plot. What’s New for M ATLAB 6? 9 PRODUCTS FOR APPLICATION DEPLOYMENT MATLAB Compiler and C/C++ Libraries The MATLAB Compiler Suite, which consists of the MATLAB Compiler and the MATLAB C/C++ Math and Graphics Libraries, allows you to convert your MATLAB M-files automatically to C and C++ for use as stand-alone programs. Version 2.1 of the MATLAB Compiler Suite contains new optimizations that improve executable speed and significantly increase the range of compilable applications. A new component, the MATLAB add-in for Visual Studio development system, lets you use the Compiler from within Microsoft Visual Studio. NEW FEATURE HIGHLIGHTS ■ ■ ■ ■ ■ ■ ■ Improved optimization of generated C/C++ code Support for the inclusion of MEX-files in stand-alone applications Support for the compilation of M-files containing: • input calls with no workspace variable arguments • load/save • eval calls with no workspace variable arguments • pause • Function handles (New MATLAB feature) New MLIB file capability for packaging multiple compiled files as a single, shared library The MATLAB add-in for Visual Studio, a new feature in MATLAB 6, allowing you to compile, edit, and run M-files from Microsoft Visual Studio using the Compiler Suite Folding for scalar and non-scalar valued array constants New support for integer data types (int 8, 16, 32 and uint 8, 16, 32), enabling the conversion of image processing applications to C/C++ code Using the MATLAB add-in for Visual Studio you can compile, edit, and run M-files within the Microsoft Visual C/C++ environment. The Compiler Suite lets you automatically convert many MATLAB applications, like this windplot example, to C and C++. 10 What’s New for M ATLAB 6? MATLAB Runtime Server 6 The MATLAB Runtime Server allows you to take an existing MATLAB application and turn it into a standalone product that is easy and economical to package and distribute. Version 6 of the MATLAB Runtime Server supports the latest MATLAB 6 functionality. Additional product and documentation enhancements make it easier to develop Runtime Server applications. NEW FEATURE HIGHLIGHTS ■ ■ ■ New buildp function generates runtime p-code for applications automatically. depfun now locates Java class-dependent functions. Improved documentation provides more detailed examples and templates, more comprehensive descriptions of product features, and additional information on application setup. The Runtime Server lets you convert any MATLAB application to a stand-alone deployable application. This Query by Singing example queries 360 songs through pattern recognition. The user triggers the song-retrieval process by singing part of the song. MATLAB Web Server 1.2 The MATLAB Web Server allows you to embed MATLAB math and graphics in your Web applications. Version 1.2 of the MATLAB Web Server contains enhancements that improve performance for NT servers, increase security, and support the Linux platform. NEW FEATURE HIGHLIGHTS ■ ■ ■ The NT Web Server architecture now keeps MATLAB sessions open once started, significantly reducing startup time. System administrators can now limit user access (particularly beneficial when the Web Server application is operating outside a firewall or directly on the HTTP server machine). The Web Server can now run on a system whose architecture differs from that of the HTTP server machine. The aeronautical, financial, and mechanical applications shown here are among the many Web-deployable applications that you can develop with the MATLAB Web Server. What’s New for M ATLAB 6? 11 PRODUCTS FOR FINANCE AND ECONOMICS Datafeed Toolbox 1.2 The Datafeed Toolbox lets you download a wide variety of security data from financial data servers into your MATLAB workspace. You can then pass this data to MATLAB or to another toolbox, such as the Financial Time Series Toolbox, for further analysis. Version 1.2 of the Datafeed Toolbox provides support for two financial data servers in addition to Bloomberg. NEW FEATURE HIGHLIGHTS ■ ■ ■ Access to data from Interactive Data’s Remote Plus Access to data from Yahoo!’s financial Web site, quote.yahoo.com IDC and Yahoo! support incorporated into the Datafeed Toolbox graphical user interface In this example, the Datafeed Toolbox interface is used to make a Bloomberg connection and then request and chart data for a stock price. Financial Derivatives Toolbox 1 The Financial Derivatives Toolbox, an extension to the Financial Toolbox, allows you to create and manage portfolios containing several types of financial instruments and calculate their prices and sensitivities. It also offers functionality for assessing the fundamental hedging tradeoffs. NEW FEATURE HIGHLIGHTS ■ ■ ■ Create and manage the following instrument portfolios: • Bonds and options on bonds • Fixed rate and floating rate notes • Caps and floors • Vanilla swaps Calculate prices and sensitivities based on the Heath-Jarrow-Morton (HJM) model or on a given interest rate term structure Perform hedging analysis The MathWorks Tel: 508.647.7000 [email protected] www.mathworks.com The treeviewer function displays a diagram of the HJM tree, allowing you to interactively examine the values on the nodes of the tree. This example shows the prices of a 4% bond along the top and bottom branch paths of the HJM price tree. 9858v01 10/00 © 2000 by The MathWorks, Inc. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and Target Language Compiler is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders. Simulink 4 ® for modeling, simulation, and analysis of dynamic systems Simulink® is an interactive tool for modeling, simulating, and analyzing dynamic systems. It enables you to build graphical block diagrams, simulate dynamic systems, evaluate system performance, and refine your designs. Simulink integrates seamlessly with MATLAB®, providing you with immediate access to an extensive range of analysis and design tools. These benefits make Simulink the tool of choice for control system design, DSP design, communications system design, and other simulation applications. KEY FEATURES USABILITY ■ ■ ■ ■ ■ Extensive library of predefined blocks Graphical debugger Model Browser for navigating model hierarchies Finder for searching models and libraries Customizable blocks that can incorporate existing C, Ada, MATLAB, and Fortran code COMPUTATIONAL SUPPORT Creating Models ■ Linear, nonlinear, continuous-time, discrete-time, multirate, conditionally executed, mixed-signal, and hybrid systems ■ Support for matrix signals and operations ■ Bitwise Logical Operator block logically masks, inverts, or shifts the bits of an unsigned integer signal Simulink provides a complete set of modeling tools that you can use to quickly develop detailed block diagrams of your systems. Features such as block libraries, hierarchical modeling, signal labeling, and subsystem customization provide a powerful set of capabilities for creating, modifying, and maintaining block diagrams. These modeling features, together with Simulink’s comprehensive set of predefined blocks, make it easy to create concise representations of your systems, regardless of their complexity. An engine model uses Trigger blocks to model conditionally executed behavior. As a function of the crankshaft angle, a pulse triggers a cylinder to fire. 1 Desired rpm pi/30 rpm to rad/s Kp Proportional Gain Ki T z-1 Integral Gain 0 2 N limit output 1 1 Throttle Ang. mass(k+1) Discrete-Time Integrator controller output prevent windup 1 Init Unit Delay 1 z mass(k) 2 integrator input enable integration [0.152] Trigger trigger KEY FEATURES (continued) LARGE MODEL DEVELOPMENT ■ Models can be grouped into hierarchies to create a simplified view of components or subsystems ■ Simulink data objects enable you to create applicationspecific MATLAB data types for your Simulink models ■ Simulink Explorer GUI for viewing and editing data objects ■ Library Browser for convenient block selection ■ Intellectual property protection using S-functions (requires Real-Time Workshop® 4.0) ■ Simulations can be run from the MATLAB command line, either interactively or in batch mode Extensible Block Library The Library Browser makes Simulink comes with more than 200 built-in blocks that implement commonly required modeling functions. The blocks are grouped into libraries according to their behavior: Sources, Sinks, Discrete, Continuous, Nonlinear, Math, Functions & Tables, and Signals & Systems. it easy to navigate through In addition, Simulink offers features for creating customized blocks and block libraries. You can customize not only the functionality of a block, but also its user interface, using icons and dialog boxes. For example, you can create blocks to model the behavior of specialized mechanical, circuit, or software components, such as motors, inverters, servo-valves, power plants, filters, tires, modems, receivers, or other dynamic components. Custom blocks can be saved in your own block library for future use and can be shared with work groups, vendors, and customers. block libraries and then drag and drop selected blocks onto your model. S-Functions An S-function (system-function) is a custom code module that defines the behavior of a Simulink block. Simulink provides templates for creating your own S-functions using existing or newly-developed code (C, Ada, Fortran, or MATLAB). Once you have created an S-function, you can include it in your model, using Simulink’s S-function block. S-functions reduce the time required to model large-scale systems by allowing you to incorporate existing code into your model. Simulink provides multi-port and multi-rate S-function support to enhance usability and permit different sample times (C and MATLAB only). Masks Simulink’s mask editor allows you to create a custom user interface, called a mask, for any subsystem or S-function block. The mask can include a custom icon, parameter dialog, online help, and initialization script. Custom masks allow you to tailor a block’s appearance and user interface for specific applications. This feature makes it easy to reuse blocks across multiple systems, as well as systems with large numbers of models, and models with many levels. You can modify a block’s behavior and its attributes in every model simply by applying the change to the library source. Configurable Subsystem Block A Configurable Subsystem block represents any block contained in a specified library of blocks. Using the Configurable Subsystem block’s dialog box, you can specify which block in the library it represents. You can also specify the inputs and outputs of the selected block. The Simulink Explorer provides you with a graphical user interface for viewing and editing Simulink data objects. Using the Simulink Explorer, you can view most classes of variables in the MATLAB workspace, and filter and sort Configurable Subsystem blocks simplify the creation of models that represent families of designs. For example, suppose that you want to model an automobile that offers a choice of engines. To model such a design, you would first create a library of models of the engine types available with the car. You would then use a Configurable Subsystem block in your car model to represent the choice of engines. To model a particular variant of the basic car design, you need only choose the engine type, using the configurable engine block’s dialog. This enables you to rapidly swap design choices in and out of your model. variables by variable name and class. You can also view and edit property values. Simulink Data Objects Simulink is used in many applications to create high-fidelity plant models of realworld systems and to design algorithms to control these systems. To represent these systems and algorithms more accurately, you can use Simulink data objects to define new MATLAB data types that are specific to your application and then use them as parameters and signals in your Simulink models. You can view and edit all Simulink data with the Simulink Explorer. Model Library Support Model library support makes it easy to build and maintain libraries of customized blocks. You can create a block whose properties are defined in the model library. Then, when you make a change to the library version of the block, the change propagates through any models that use that block. Short-Time Spectrum DF2T The short-time fast Fourier transform (FFT) block is a masked subsystem in this model, built using the DSP Blockset. The parameters for the short-time FFT block are controlled through the dialog box (top right image). The block diagram for the detailed subsystem (center image) remains hidden from view until the user chooses to reveal it. hamming Out 1 In |FFT| ^ 2 In Win Window Magnitude FFT In Direct-Form II Transpose Filter Out Normalization 1 Out Model Navigation Tools Library Browser (Windows only)—provides a tree-structured view of all block libraries installed on your system. Model Browser (Windows only)—enables you to navigate your model hierarchically, and open systems directly in your model. Finder dialog box—enables you to search Simulink models for objects that satisfy specified search criteria. The Mux block is used to collect multiple signals into a vectored signal bundle that can function as a data bus. The Demux block is used to disassemble vectored signals so that they can be accessed as individual signals. The Bus Selector block provides support for larger models by making it easy to select a subset of signals from a bus defined by a Mux or another Bus Selector block. Block diagram zooming—greatly simplifies model viewing by allowing you to enlarge or shrink the view. Because most Simulink blocks support vectored operations, you can greatly reduce the number of blocks needed to model your system. This results in clean, simple, and easy-to-read block diagrams. Scalar and Vector Connections Matrix Signal Support Simulink supports the modeling of singleinput/single-output (SISO) and multi-input/ multi-output (MIMO) systems. Many Simulink blocks accept or output matrix signals. A matrix signal is a twodimensional array of signal elements represented by a matrix. Each matrix element represents the value of the corresponding signal element at the current time step. You can use Simulink source blocks (for example, Sine Wave or Constant) to generate matrix signals. You can use the following Simulink blocks for matrix operations on matrix signals: • The Product block supports both elementby-element and matrix multiplication and inversion of inputs. • The Gain block supports matrix and element-by-element multiplication of the input signal by a gain factor. Both input signals and gain factors can be matrices. You can use Simulink’s Mux and Demux blocks to multiplex matrix signals. For example, you can: • Generate signal buses by feeding matrix signals into Mux blocks along with vector or scalar signals • Manipulate the elements of a signal bus by splitting it into its components using a Demux block, and then connecting the demuxed signals to nonvirtual blocks, such as the Gain block 1-exp(-deltat1/Ts) z-exp(-deltat1/Ts) Stick Filter Ka z-exp(-deltat1/Tal) Zero-Order Hold Alpha Sensor Filter Kf 1 1-exp(-deltat1/Tal) 1 States Zero-Order Hold T Act. Comd. Ki z-1 Zero-Order Hold Discrete-Time Integrator Actuator Pos. ActPos Kq -K- 1-exp(-W2*deltat1) z-exp(-W2*deltat1) Pitch Sensor Filter This Simulink model represents a digital control system for an aircraft. The Simulink debugger allows you to graphically diagnose modeling errors. The debugger lets you step through the simulation block by block, or run to a breakpoint. The currently executing block is displayed in yellow. You can also display block states, block inputs and outputs, and other information while running a model. Zero-Order Hold StopInt Error Anti-Wind-Up 2 Template Act. Pos. Cmd. Act. Meas. Configurable Actuator Act. Pos. Cmd. [Linear] Act. Meas. To create a configurable subsystem, you first create a library of blocks representing the various block configurations. Then, within a model, you can choose a block from your library using the configurable subsystem's right-click menu. Linear Actuator Subsystem Act. Pos. Cmd. [Non-Linear] Act. Meas. Non-Linear Actuator Subsystem Simulink debugger has both graphical and command-line user interfaces. State-of-the-Art Integration Algorithms Simulation After building your block diagram in Simulink, you can debug it using the interactive Simulink debugger. Then, you can run interactive simulations and view the results live. The powerful suite of solvers available in Simulink make simulation results extremely accurate. Simulink Debugger The Simulink debugger is an interactive tool for locating and diagnosing errors in a Simulink model. It enables you to quickly pinpoint problems in your model by running simulations step-by-step and displaying intermediate block states and input and output values. The The Simulink simulation engine offers numerous features for simulating large, challenging systems. Foremost among these is the set of integration algorithms, called solvers, that are based on the MATLAB ordinary differential equation (ODE) suite. These solvers are well suited to continuoustime (analog), discrete-time, hybrid, and mixed-signal simulations of any size. In addition, they provide fast, reliable, and extremely accurate simulation results. For complete handling of discrete systems, the DSP Blockset is also recommended. The solvers support differential algebraic equations (DAEs) with multichannel algebraic loops. An algebraic constraint block facilitates the solution of a system in which an algebraic constraint applies to the governing set of equations. The solvers also support stiff systems, systems with algebraic loops, and systems with state events (such as discontinuities, including instantaneous changes in plant dynamics). Conditionally Executed Subsystems With Simulink, you can build and simulate models with subsystems that execute conditionally; and are therefore dependent upon controlling logic signals. The signals can either enable or trigger the execution of the subsystem. Two blocks, the Trigger block and the Enable block, can be placed in any Simulink subsystem. An enabled or triggered subsystem includes an additional input signal to handle controlling logic. When conditionally executed subsystems are disabled they are not executed during the simulation, which noticeably improves processing speed within multimode systems. Event-Based Simulation Support Simulink is tightly integrated with Stateflow®, the MathWorks’ solution for modeling event- driven behavior. The seamless interaction between Simulink and Stateflow gives you the ability to model and simulate your system’s dynamic and event-driven behavior as a single, integrated system. (For example, Simulink and Stateflow share an integrated Finder.) Designers of automotive, aerospace, telecommunications, and many other types of embedded systems have a complete solution to perform faster, more accurate and extensive simulations of complex, large-scale systems. double-precision floating point; single-precision floating point; signed and unsigned 8-, 16-, and 32-bit integers; and Boolean. You can use Stateflow charts to include supervisory control logic within your Simulink model for activating or deactivating conditionally executed subsystems in Simulink. The Stateflow chart receives input from the Simulink model, determines the actions to be taken, changes states appropriately, and sends logic signals to activate or deactivate the triggered and enabled subsystems in Simulink. Analysis Data Typing Simulink supports complex numbers for basic blocks and complex/real conversions. In addition, the Data Type Conversion block allows you to convert a signal of one type (such as a float) to a signal of another type (int32, for example). Many of the blocks in Simulink support several data types. The ability to specify the data types of a model’s signal and block parameters is particularly useful in realtime applications such as microcontrollers and DSPs. With this capability, you can specify the optimal data types required to represent signals, block parameters, and mathematical operations exactly as they are represented on these devices. Additionally, by choosing the appropriate data types for your model’s signals and parameters, you can dramatically increase the performance and decrease the size of code generated from the model. Supported data types are Audits and Revision Histories Simulink models are compatible with standard configuration control software such as SCCS and RCS. As a result, audits and revision histories are easily maintained for large projects and for models shared within a multi-platform workgroup. Simulink includes many features for detailed system analysis. Key capabilities include: linearization, equilibrium point determination, animation, parameter optimization, and parametric analysis. Related Products Simulink is the foundation for a family of design solutions, spanning DSP, communications, control, and power system design. Companion products include: • Real-Time Workshop for code generation • Stateflow for event-driven systems and logic design • Simulink Performance Tools for simulation acceleration and more • Block libraries for specialized applications, such as the DSP Blockset, the Fixed-Point Blockset, the Power System Blockset, and the Communications Blockset. ■ Extracting Linear Models The dynamics of nonlinear block diagrams can be approximated through linearization, enabling you to apply design techniques that require linear model representations. You can use Simulink’s linmod function to obtain linear state-space models from your block diagrams. For demos, application examples, tutorials, user stories, and pricing: Animation • Visit www.mathworks.com Simulink provides immediate access to MATLAB’s powerful 2-D and 3-D graphics and animation capabilities. You can use MATLAB to enhance your visual displays and gain deeper insight into your system’s behavior as the simulation progresses. • Contact The MathWorks directly Integration with MATLAB Because Simulink is built on top of MATLAB, it provides a unique development environment. This system allows you to run simulations either interactively, using Simulink’s graphical interface, or systematically, by running sets of experiments in batch mode from the MATLAB command line. You can then generate test vectors and analyze the results collectively. Tel: 508.647.7000 [email protected] www.mathworks.com US & Canada 508-647-7000 Benelux France Germany Spain Switzerland UK +31 (0)182 53 76 44 +33 (0)1 41 14 67 14 +49 (0)89 995901 0 +34 93 362 13 00 +41 (0)31 954 20 20 +44 (0)1223 423 200 Visit www.mathworks.com to obtain contact information for authorized MathWorks representatives in countries throughout Asia Pacific, Latin America, the Middle East, Africa, and the rest of Europe. 9320v02 10/00 © 2000 by The MathWorks, Inc. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and Target Language Compiler is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders. Control System Toolbox 5 for designing and analyzing automatic control systems The Control System Toolbox builds on the foundation of MATLAB® to provide specialized tools for control system engineering. The toolbox is a collection of algorithms, written primarily as M-files, that implement common control system design, analysis, and modeling techniques. The Control System Toolbox is a core toolbox for the analysis, design, and tuning of feedback control systems. Its broad range of capabilities encompasses both classical and modern control design methods, including root locus, pole placement, and LQG regulator design. Convenient graphical user interfaces (GUIs) simplify typical control engineering tasks. KEY FEATURES ■ LTI Viewer, an interactive GUI for analyzing and comparing linear-time-invariant (LTI) systems ■ SISO Design Tool, an interactive GUI for analyzing and tuning single-input/single-output (SISO) feedback control systems ■ GUI suite for setting preferences and properties, giving you complete control over the visualization of time and frequency plots ■ Specialized data structures, called LTI objects, for concisely representing transfer function, state-space, zero/pole/gain, and frequency response data model formats ■ Support for multi-input/multi-output (MIMO) systems, continuous-time and sampled-data systems, and systems with time delays ■ Functions and operators for connecting LTI models with complex block diagrams (series, parallel, and feedback connections) ■ Support for a variety of discrete-to-continuous conversion methods ■ Functions for plotting the time and frequency responses of systems and comparing several systems with a single command ■ Tools for classical and modern control design techniques, including root locus, loop shaping, pole placement, and LQR/LQG regulation A linked LTI Viewer With the SISO Design GUI, you can tune gains and design compensators using root locus and loop shaping techniques. The compensator parameters can be changed graphically by interacting with the root locus and Bode diagrams. When you modify the compensator gain or dynamics, the open- and closed-loop response plots update automatically, providing useful guidance in the tuning process. displays open- and closed-loop response plots. In the following example, sys1 and sys2 are linear models being combined with a simple command-line operation: >> sys1 + sys2 % parallel connection of systems sys1 and sys2 You can also manipulate and analyze entire collections of linear models at the same time using LTI model arrays. Model Characteristics The Control System Toolbox contains commands to query model characteristics such as the I/O dimensions, poles, zeros, and DC gain. These commands apply to both continuous- and discrete-time models. Interconnecting Linear Models You can easily connect LTI models in parallel, series, or feedback mode. You can also use these basic interconnections in combination to derive models of complex block diagrams. Analysis and Design With the LTI Viewer, you can easily graph the responses of one or several systems—all in one window. Step and impulse plots, pole/zero plots, and all frequency-domain responses (Bode, Nyquist, Nichols, and singular values) are available in the LTI Viewer. The LTI Viewer allows you to display important response characteristics, such as stability margins on the plots using data markers. With the Control System Toolbox, you can model linear-time-invariant (LTI) systems in transfer function, zero/pole/gain, or state-space form. You can manipulate both continuous-time and discrete-time systems and convert between various model representations. You can compute and graph time responses, frequency responses, and root loci. Other functions let you perform pole placement, optimal control, and estimation. The Control System Toolbox is open and extensible, allowing you to create custom M-files to suit your particular application. Building Models The Control System Toolbox supports four linear model representations: state-space models (SS), transfer functions (TF), zero/pole/gain (ZPK) models, and frequency response data (FRD) models. LTI objects are provided for each model type. In addition to model data, LTI objects can store the sample time of discrete-time systems, time delays, input and output names, notes about the model, and more. Using LTI objects, you can manipulate models as single entities and combine them using matrix-like operations. Some tasks lend themselves to graphical manipulation, while others benefit from the flexibility of the command line. The Control System Toolbox is designed to accommodate both approaches, providing both GUIs and a complete set of command-line functions for model analysis and design. Analyzing Models Graphically Using the LTI Viewer The Control System Toolbox LTI Viewer is a GUI that simplifies the analysis of linear, timeinvariant systems. You use the LTI Viewer to view and compare the response plots of several linear models at the same time. You can generate time and frequency response plots to inspect key response parameters, such as rise time, maximum overshoot, and stability margins. Using mouse-driven interactions you can select input and output channels from MIMO systems. The LTI Viewer can display up to seven different plot types simultaneously, including step, impulse, Bode (magnitude and phase or magnitude only), Nyquist, Nichols, sigma, and pole/zero. In addition to right-click menus, all response plots include data markers. These allow you to scan the plot data, identify key data, and determine the source system for a given plot. Using right-click menu options, you can access several LTI Viewer controls and options, including: The LTI Viewer is suitable for a wide range of applications where a GUI-driven environment is desirable. For situations that require programming, customized plots, or the inclusion of data unrelated to your LTI models, the Control System Toolbox provides commandline functions that implement the basic plots for time- and frequency-domain analysis used in control system engineering. These functions apply to any kind of linear model (continuous or discrete, SISO or MIMO,) or to arrays of models. • Plot Type—changes the plot type • Systems—selects or deselects any of the models loaded in the LTI Viewer • Characteristics—displays key response characteristics and parameters • Zoom—zooms in and out of plot regions • Grid—adds grids to your plots • Properties—opens the Property Editor, where you can customize plot attributes Current Compensator Analyzing Models Using the Command Line Designing Compensators Using SISO Design Tool The Control System Toolbox SISO Design Tool is a GUI that lets you analyze and tune SISO feedback control systems. Using the SISO Design Tool, you can graphically tune the compensator gain and dynamics using a mix of root locus and loop shaping techniques. For example, you can use the root locus view to stabilize the feedback loop and enforce some minimum damping, and use the Bode diagrams to adjust the bandwidth, check the gain and phase margins, or add a notch filter for disturbance rejection. The SISO Design Tool is designed to work closely with the LTI Viewer, allowing you to rapidly iterate on your design and immediately see the results in the LTI Viewer. When you make a change in the compensator, the Feedback Structure Open-Loop Bode Diagram Gain Margin Root Locus Phase Margin Status Bar The SISO Design GUI can be used for both continuous- and discrete-time plants. Here, the root locus and Bode diagrams are shown for a discrete-time plant. d + + u y 100 s 2 + s + 100 + n F(s) yn LQG Regulator + This example illustrates the design of a simple LQG regulator. The code excerpt below shows how the controller is designed and how the closed-loop Right-click menus system is created. The impulse-response simplify customizations plot shows a comparison between the of plots and GUIs open-loop system (red) and the closedloop system (blue). G = ss(tf(100,[1 1 100])) Klqr = lqry(G,10,1) Kest = kalman(G(:,[1 1]),1, 0.01) F = lqgreg(Kest, Klqr) clsys = feedback(G,F,+1) impulse(G, 'r', clsys, 'b') % % % % % % state-space plant model design feedback gain matrix Kalman estimator design combine regulator and estimator form closed-loop system generate and plot impulse response LTI Viewer associated with your SISO Design Tool automatically updates the response plots that you have chosen. Pull-down and right-click menus give you the flexibility to perform control design tasks with one mouse-click. In particular, you can: The SISO Design Tool: • Drop compensator poles and zeros in the root locus or Bode diagram views • Add lead/lag networks and notch filters • Graphically tune compensator parameters with the mouse • Inspect closed-loop responses (using the LTI Viewer) • Adjust phase and gain margins • Convert models between discrete- and continuous-time • Integrates most Control System Toolbox functionality into a single GUI • Dynamically links time, frequency, and pole/zero views, offering complementary insights into the design objectives and issues • Provides graphical insight into design tradeoffs • Helps manage complexity and design iterations Designing Compensators Using the Command Line In addition to the SISO Design Tool, the Control System Toolbox provides a set of commands that you can use for a broader range of control applications, including: • Functions for classical SISO design (damping data, root locus, and gain and phase margins) • Functions for modern MIMO design (pole placement, LQR/LQG methods, and Kalman filtering) [Linear-Quadratic-Gaussian (LQG) control is a modern state-space technique for designing optimal dynamic regulators. It enables you to trade off regulation performance and control effort and take into account process disturbances and measurement noise.] Setting Plot Preferences and Properties The Control System Toolbox provides three GUIs that give you complete control over the visualization of time and frequency plots generated by the toolbox: • Toolbox Preferences—global options that you can save from session to session • Tool Preferences—options set for a particular instance of the LTI Viewer or SISO Design Tool • Plot Properties—options for customizing a given response plot Documentation and Demonstrations The Control System Toolbox provides extensive online documentation, including Getting Started, an introduction and tutorial for new users, and complete reference chapters for the toolbox GUIs and functions. The Control System Toolbox also provides an extensive suite of demonstrations, including tutorial demos (Getting Started, Model Analysis, Do’s and Don’ts); interactive demos (RLC circuit, stability margins, discretization); and detailed case studies of six applications (DC motor, feedback amplifier, disk drive, jet autopilot, steel mill, and process control). Related Products The MathWorks provides several products that are especially relevant to the tasks that you can perform with the Control System Toolbox. These include: • Simulink®—a comprehensive environment for modeling, simulating, and analyzing dynamic systems in a block diagram format The Control System Toolbox Preferences dialog box allows you to specify options that are saved from session to session. The LTI Viewer and SISO Design GUIs have preference dialog boxes for setting plot options within these GUIs. Finally, individual response plots have property editors for further customization. • Nonlinear Control Design Blockset— an optimization-based approach to control system design that tunes parameters based on user-defined, time-domain performance constraints • System Identification Toolbox—tools for building linear models of dynamic systems from measured input/output data • Fuzzy Logic Toolbox—tools for developing fuzzy logic algorithms • Robust Control Toolbox—tools for the modeling, analysis, and design of “robust” multivariable feedback control systems using H∞ techniques • µ-Analysis and Synthesis Toolbox— computational algorithms for the structured singular value, µ, applicable to robustness and performance analysis for systems with modeling and parameter uncertainties • Linear Matrix Inequality Toolbox— convex optimization algorithms for solving linear matrix inequalities (LMI), with application to robust control, multiobjective control, and gain scheduling • Model Predictive Control Toolbox— a complete set of tools for implementing model predictive control strategies ■ Sample Commands General ctrlpref damp Set Control System Toolbox preferences Creating Linear Models tf zpk ss, dss frd set Create a transfer function model Create a zero/pole/gain model Create a state-space model Create a frequency response data model Set/modify properties of LTI models Data Extraction tfdata zpkdata ssdata get frd c2d d2c d2d Conversion to state-space Conversion to zero/pole/gain Conversion to transfer function Conversion to frequency data Continuous-to-discrete conversion Discrete-to-continuous conversion Resample discrete-time model parallel series feedback lft connect Group LTI systems by appending inputs and outputs Generalized parallel connection Generalized series connection Feedback connection of two systems Generalized feedback inter-connection Derive state-space model from block diagram description Model Dynamics pole zero pzmap ltiview step impulse initial System poles System (transmission) zeros Pole-zero map Response analysis GUI (LTI Viewer) Step response Impulse response Response of state-space system with given initial state Response to arbitrary inputs State-Space Models rss, drss ss2ss ctrb, obsv gram minreal ssbal balreal modred Frequency-Domain Analysis ltiview bode sigma nyquist nichols margin allmargin freqresp Response analysis GUI (LTI Viewer) Bode diagrams of the frequency response Singular value frequency plot Nyquist plot Nichols plot Gain and phase margins All crossover frequencies and related gain/phase margins Frequency response over a frequency grid Classical Design sisotool rlocus System Interconnections append Time-Domain Analysis lsim Extract numerator(s) and denominator(s) Extract zero/pole/gain data Extract state-space matrices Access values of LTI model properties Conversions ss zpk tf dcgain norm covar Natural frequency and damping of system poles DC (low frequency) gain Norms of LTI systems Covariance of response to white noise Time Delays totaldelay delay2z pade Total delay between each input/output pair Replace delays by poles at z=0 or FRD phase shift Pade approximation of time delays Matrix Equation Solvers lyap dlyap care SISO design GUI (root locus and loop shaping techniques) Evans root locus Random stable statespace models State coordinate transformation Controllability and observability matrices Controllability and observability gramians Minimal realization and pole/zero cancellation Diagonal balancing of state-space realizations Gramian-based input/output balancing Model state reduction dare Solve continuous Lyapunov equations Solve discrete Lyapunov equations Solve continuous algebraic Riccati equations Solve discrete algebraic Riccati equations Pole Placement place estim reg MIMO pole placement Form estimator given estimator gain Form regulator given statefeedback and estimator gains LQR/LQG Design lqr, dlqr lqry lqrd kalman kalmd Linear-quadratic (LQ) statefeedback regulator LQ regulator with output weighting Discrete LQ regulator for continuous plant Kalman estimator Discrete Kalman estimator for continuous plant Tel: 508.647.7000 [email protected] www.mathworks.com For demos, application examples, tutorials, user stories, and pricing: • Visit www.mathworks.com • Contact The MathWorks directly US & Canada 508-647-7000 Benelux France Germany Spain Switzerland UK +31 (0)182 53 76 44 +33 (0)1 41 14 67 14 +49 (0)89 995901 0 +34 93 362 13 00 +41 (0)31 954 20 20 +44 (0)1223 423 200 Visit www.mathworks.com to obtain contact information for authorized MathWorks representatives in countries throughout Asia Pacific, Latin America, the Middle East, Africa, and the rest of Europe. 9318v02 10/00 © 2000 by The MathWorks, Inc. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and Target Language Compiler is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders. Neural Network Toolbox 4 for designing and simulating neural networks The Neural Network Toolbox extends the MATLAB® computing environment to provide tools for the design, implementation, visualization, and simulation of neural networks. Neural networks are uniquely powerful tools in applications where formal analysis would be difficult or impossible, such as pattern recognition and nonlinear system identification and control. The Neural Network Toolbox provides comprehensive support for many proven network paradigms, as well as a graphical user interface that allows you to design and manage your networks. The toolbox’s modular, open, and extensible design simplifies the creation of customized functions and networks. KEY FEATURES ■ Graphical user interface (GUI) for creating, training, and simulating your neural networks ■ Support for the most commonly used supervised and unsupervised network architectures ■ A comprehensive set of training and learning functions ■ A suite of Simulink® blocks, as well as documentation and demonstrations of control-system applications ■ Automatic generation of Simulink models from neural network objects ■ Modular network representation, allowing an unlimited number of input sets, layers, and network interconnections ■ Pre- and post-processing functions for improving network training and assessing network performance ■ Routines for improving generalization ■ Visualization functions for viewing network performance Working with Neural Networks Inspired by the biological nervous system, neural network technology is being used to solve a wide variety of complex scientific, engineering, and business problems. Commercial applications include investment portfolio trading, data mining, process control, noise suppression, data compression, and speech recognition. Neural networks are ideally suited for such problems because, like their biological counterparts, a neural network can learn, and therefore can be trained to find solutions, recognize patterns, classify data, and forecast events. Unlike analytical approaches commonly used in fields such as statistics and control theory, neural networks require no explicit model and no limiting assumptions of normality or linearity. The behavior of a neural network is defined by the way its individual computing elements are connected and by the strength of those connections, or weights. The weights are automatically adjusted by training the network according to a specified learning rule until it properly performs the desired task. This window displays portions of the neural network GUI. Dialogs and panes allow you to visualize your network (top), evaluate training results (bottom), and manage your networks (center). The MathWorks Supported Training Functions Because neural networks require intensive matrix computations, MATLAB provides a natural framework for rapidly implementing neural networks and for studying their behavior and application. Neural Network Toolbox GUI This tool lets you import potentially large and complex data sets. The GUI also allows you to create, initialize, train, simulate, and manage your networks. Simple graphical representations allow you to visualize and understand network architecture. Supported Network Architectures Supervised Networks Supervised neural networks are trained to produce desired outputs in response to example inputs, making them particularly well suited for modeling and controlling dynamic systems, classifying noisy data, and predicting future events. The Neural Network Toolbox supports the following supervised networks: • Feed-forward networks have one-way connections from input to output layers. They are commonly used for prediction, pattern recognition, and nonlinear function fitting. Supported feed-forward networks include feed-forward backpropagation, cascade-forward backpropagation, feed-forward input-delay backpropagation, linear, and perceptron networks. • Radial basis networks provide an alternative fast method for designing nonlinear feed-forward networks. Supported variations include generalized regression and probabilistic neural networks. • Recurrent networks use feedback to recognize both spatial and temporal patterns. Supported recurrent networks include Elman and Hopfield. • Learning vector quantization (LVQ) is a powerful method for classifying patterns that are not linearly separable. LVQ allows trainb Batch training with weight and bias learning rules trainbfg BFGS quasi-Newton backpropagation trainbr Bayesian regularization trainc Cyclical order incremental update traincgb Powell-Beale conjugate gradient backpropagation traincgf Fletcher-Powell conjugate gradient backpropagation traincgp Polak-Ribiere conjugate gradient backpropagation traingd Gradient descent backpropagation traingda Gradient descent with adaptive learning rate (lr) backpropagation traingdm Gradient descent with momentum backpropagation traingdx Gradient descent with momentum & adaptive lr backpropagation trainlm Levenberg-Marquardt backpropagation trainoss One step secant backpropagation trainr Random order incremental update trainrp Resilient backpropagation (Rprop) trains Sequential order incremental update trainscg Scaled conjugate gradient backpropagation you to specify class boundaries and the granularity of classification. Unsupervised Networks Unsupervised neural networks are trained by letting the network continually adjust itself to new inputs. They find relationships within data as it is presented and can automatically define classification schemes. The Neural Network Toolbox supports two types of selforganizing unsupervised networks: • Competitive layers recognize and group similar input vectors. By using these groups, the network automatically sorts the inputs into categories. • Self-organizing maps learn to classify input vectors according to similarity. Unlike competitive layers, they also preserve the topology of the input vectors, assigning nearby inputs to nearby categories. Supported Training and Learning Functions Training and learning functions are mathematical procedures used to automatically adjust the network’s weights and biases. The training function dictates a global algorithm that affects all the weights and biases of a given network. The learning function can be applied to individual weights and biases within a network. Supported Learning Functions learncon Conscience bias learning function Control System Applications learngd Gradient descent weight/bias learning function learngdm Gradient descent with momentum weight/bias learning function learnh Hebb weight learning function learnhd Hebb with decay weight learning rule Neural networks have been successfully applied to the identification and control of nonlinear systems. Included in the toolbox are descriptions, demonstrations, and Simulink blocks for three popular control applications: model predictive control, feedback linearization, and model reference adaptive control. learnis Instar weight learning function learnk Kohonen weight learning function learnlv1 LVQ1 weight learning function learnlv2 LVQ2 weight learning function learnos Outstar weight learning function learnp Perceptron weight and bias learning function learnpn Normalized perceptron weight and bias learning function learnsom Self-organizing map weight learning function learnwh Widrow-Hoff weight and bias learning rule Model Predictive Control Example The following example shows the model predictive control of a continuous stirred tank reactor (CSTR). This controller creates a neural network model of a nonlinear plant to predict future plant response to potential control signals. An optimization algorithm then computes the control signals that optimize future plant performance. You can incorporate neural network control blocks included in the toolbox into your existing Simulink models. By changing the parameters of these blocks you can tailor the network’s performance to your application. NN Predictive Controller Reference Optim. Random Reference Clock Control Signal Plant Output Flow Rate Concentration NN Model Plant (Continuous Stirred Tank Reactor) X(2Y) Graph This window displays a Simulink model that includes the neural network predictive control block and CSTR plant model (top left). Dialogs and panes allow you to visualize validation data (lower left) and manage the neural network control block (lower center) and your plant identification (right). 1 p{1} p{1} a{1} a{1} Layer 1 p{1} a{2} a{2} a{1} Layer 2 a{1} p{1} a{1} a{2} 1 TDL weight p{1} Delays 1 IW{2,1} 2 TDL weight a{1} Delays 2 LW{2,1} 1 a{3} tansig a{2} bias y{1} a{2} 1 netsum b{2} Layer 3 Neural network simulation blocks for use in Simulink can be automatically generated using the gensim command. Here, a three-layer neural network has been converted into Simulink blocks. Simulink Support Improving Generalization Documentation and Examples Once a network has been created and trained, it can be easily incorporated into Simulink models. A simple command (gensim) automatically generates network simulation blocks for use with Simulink. This feature also makes it possible for you to view your networks graphically. Improving the network’s ability to generalize helps prevent overfitting, a common problem in neural network design. Overfitting occurs when a network has memorized the training set but has not learned to generalize to new inputs. Overfitting produces a relatively small error on the training set but will produce a much larger error when new data is presented to the network. The Neural Network Toolbox User’s Guide was written by Professor Emeritus Howard Demuth and Mark Beale, developers of the Neural Network Toolbox and authors, with Professor Martin Hagen, of Neural Network Design. The User’s Guide is of textbook quality and provides a thorough treatment of neural network architectures, paradigms, and neural network applications. It also includes a tutorial and application examples. Additional demonstrations and application examples are included with the product. Pre- and Post-Processing Functions Pre-processing the network inputs and targets improves the efficiency of neural network training. Post-processing enables detailed analysis of network performance. The Neural Network Toolbox provides the following pre- and post-processing functions: • Principal component analysis reduces the dimensions of the input vectors. • Post-training analysis performs a regression analysis between the network response and the corresponding targets. • Scale minimum and maximum scales inputs and targets so that they fall in the range [-1,1]. • Scale mean and standard deviation normalizes the mean and standard deviation of the training set. The MathWorks The Neural Network Toolbox provides two solutions to improve generalization: • Regularization modifies the network’s performance function, the measure of error that the training process minimizes. By changing it to include the size of the weights and biases, training produces a network that not only performs well with the training data, but produces smoother behavior when presented with new data. • Early stopping is a technique that uses two different data sets: the training set, which is used to update the weights and biases, and the validation set, which is used to stop training when the network begins to overfit the data. Tel: 508.647.7000 [email protected] www.mathworks.com For demos, application examples, tutorials, user stories, and pricing: • Visit www.mathworks.com • Contact The MathWorks directly US & Canada 508-647-7000 Benelux France Germany Spain Switzerland UK +31 (0)182 53 76 44 +33 (0)1 41 14 67 14 +49 (0)89 995901 0 +34 93 362 13 00 +41 (0)31 954 20 20 +44 (0)1223 423 200 Visit www.mathworks.com to obtain contact information for authorized MathWorks representatives in countries throughout Asia Pacific, Latin America, the Middle East, Africa, and the rest of Europe. 8511v04 10/00 © 2000 by The MathWorks, Inc. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and Target Language Compiler is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders. Signal Processing Toolbox 5 for algorithm development, signal and linear system analysis, and time-series modeling The Signal Processing Toolbox is a collection of MATLAB® functions that provides a rich, customizable framework for analog and digital signal processing (DSP). Graphical user interfaces (GUIs) support interactive designs and analyses, while command-line functions support advanced algorithm development. The Signal Processing Toolbox is the ideal environment for signal analysis and DSP algorithm development. It uses industrytested signal processing algorithms that have been carefully chosen and implemented for maximum efficiency and numeric reliability. Signal Processing Toolbox functions are implemented as M-files routines written in the MATLAB language, which give you access to the source code and algorithms. The opensystem philosophy of MATLAB and the toolboxes enables you to make changes to existing functions or add your own. KEY FEATURES ■ A comprehensive set of signal and linear system models ■ Tools for analog filter design ■ Tools for Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) digital filter design, analysis, and implementation ■ The most widely used transforms, such as fast Fourier transform (FFT) and discrete cosine transform (DCT) ■ Methods for spectrum estimation and statistical signal processing ■ Functions for parametric time-series modeling ■ Routines for waveform generation, including a Gaussian pulse generator, a periodic sinc generator, and a pulse train generator ■ Data windowing algorithms You can use the toolbox in speech and audio processing, communications, digital control, radar, geophysics, test instrumentation, realtime control, finance, medicine, and other applications. FDATool (above) is a built-in GUI that lets you design many types of FIR and IIR filters. You select the filter types from the available methods in the GUI. This diagram shows the GUI with Filter Design Toolbox installed. The figure at left shows an annotatable print preview of the filter’s magnitude response. The MathWorks Sample Functions Filter Analysis abs angle freqs freqspace freqz freqzplot grpdelay impz unwrap zplane fir1 Magnitude Phase angle Laplace transform requency response Frequency spacing for frequency response. Z-transform frequency response Plot frequency response data Group delay Discrete impulse response Unwrap phase Discrete pole-zero plot Filter Implementation conv conv2 deconv fftfilt filter filter2 filtfilt filtic latcfilt medfilt1 sgolayfilt sosfilt upfirdn Convolution 2-D convolution Deconvolution Overlap-add filter implementation Filter implementation Two-dimensional digital filtering Zero-phase version of filter Determine filter initial conditions Lattice filter implementation 1-Dimensional median filtering Savitzky-Golay filter implementation Second-order sections (biquad) filter implementation Up sample, FIR filter, down sample cremez fircls fircls1 firls firrcos intfilt kaiserord remez remezord sgolay Convolution matrix Complex and nonlinear phase equiripple FIR filter design Analog Lowpass Filter Prototypes besselap buttap cheb1ap cheb2ap ellipap butter cheby1 cheby2 ellip maxflat yulewalk Butterworth filter design Chebyshev type I filter design Chebyshev type II filter design Elliptic filter design Generalized Butterworth lowpass filter design Yule-Walker filter design IIR Filter Order Estimation buttord cheb2ord ellipord Butterworth filter order estimation Chebyshev type I filter order estimation Chebyshev type II filter order estimation Elliptic filter order estimation Bessel filter prototype Butterworth filter prototype Chebyshev type I filter prototype (passband ripple) Chebyshev type II filter prototype (stopband ripple) Elliptic filter prototype Analog Filter Design besself butter cheby1 cheby2 ellip Bessel analog filter design Butterworth filter design Chebyshev type I filter design Chebyshev type II filter design Elliptic filter design Analog Filter Transformation lp2bp lp2bs IIR Digital Filter Design cheb1ord FIR Filter Design convmtx fir2 Window based FIR filter design - low, high, band, stop, multi FIR arbitrary shape filter design using the frequency sampling method Constrained Least Squares filter design – arbitrary response Constrained Least Squares FIR filter design – low and highpass Optimal least-squares FIR filter design Raised cosine FIR filter design Interpolation FIR filter design Kaiser window design based filter order estimation Optimal Chebyshevnorm FIR filter design Remez design based filter order estimation Savitzky-Golay FIR smoothing filter design lp2hp lp2lp Lowpass to bandpass analog filter transformation Lowpass to bandstop analog filter transformation Lowpass to highpass analog filter transformation Lowpass to lowpass analog filter transformation Filter Discretization bilinear impinvar Bilinear transformation with optional prewarping Impulse invariance analog to digital conversion Linear System Transformations latc2tf polystab polyscale Lattice or lattice ladder to transfer function conversion Polynomial stabilization Scale roots of polynomial residuez sos2ss sos2tf sos2zp ss2sos ss2tf ss2zp tf2latc tf2sos tf2ss tf2zp zp2sos zp2ss zp2tf Z-transform partial fraction expansion Second-order sections to state-space conversion Second-order sections to transfer function conversion Second-order sections to zero-pole conversion State-space to secondorder sections conversion State-space to transfer function conversion State-space to zero-pole conversion Transfer function to lattice or lattice ladder conversion Transfer function to second-order sections conversion Transfer function to state-space conversion Transfer function to zero-pole conversion Zero-pole to secondorder sections conversion Zero-pole to state-space conversion Zero-pole to transfer function conversion fft fft2 fftshift hilbert idct ifft ifft2 Cepstral Analysis cceps icceps rceps cohere corrcoef corrmtx cov csd pburg blackman boxcar chebwin hamming hann kaiser triang Bartlett window Blackman window Rectangular window Chebyshev window Hamming window Hanning window Kaiser window Triangular window pcov peig periodogram pmcov Transforms czt dct dftmtx Chirp-z transform Discrete cosine transform Discrete Fourier transform matrix pmtm pmusic pwelch pyulear rooteig rootmusic tfe Complex cepstrum Inverse complex cepstrum Real cepstrum and minimum phase reconstruction Statistical Signal Processing and Spectral Analysis Windows bartlett Fast Fourier transform 2-D fast Fourier transform Swap vector halves Discrete-time analytic signal via Hilbert transform Inverse discrete cosine transform Inverse fast Fourier transform Inverse 2-D fast Fourier transform Coherence function estimate Correlation coefficients Autocorrelation matrix Covariance matrix Cross spectral density Power spectral density estimate via Burg's method Power spectral density estimate via the covariance method Power spectral density estimate via the eigenvector method Power spectral density estimate via the periodogram method Power spectral density estimate via the modified covariance method Power spectral density estimate via the Thomson multitaper method xcorr xcorr2 xcov Power spectral density estimate via the MUSIC method Power spectral density estimate via Welch's method Power spectral density estimate via the YuleWalker AR Method Sinusoid frequency and power estimation via the eigenvector algorithm Sinusoid frequency and power estimation via the MUSIC algorithm Transfer function estimate Cross-correlation function 2-D cross-correlation Covariance function Parametric Modeling arburg arcov armcov aryule invfreqs invfreqz prony stmcb AR parametric modeling via Burg's method AR parametric modeling via covariance method AR parametric modeling via modified covariance method AR parametric modeling via the Yule-Walker method Analog filter fit to frequency response Discrete filter fit to frequency response Prony's discrete filter fit to time response Steiglitz-McBride iteration for ARMA modeling Linear Prediction ac2rc ac2poly is2rc lar2rc levinson lpc lsf2poly poly2ac poly2lsf poly2rc rc2ac rc2is rc2lar rc2poly rlevinson schurrc Multirate Signal Processing Autocorrelation sequence to reflection coefficients conversion Autocorrelation sequence to prediction polynomial conversion Inverse sine parameters to reflection coefficients conversion Log area ratios to reflection coefficients conversion Levinson-Durbin recursion Linear predictive coefficients using autocorrelation method Line spectral frequencies to prediction polynomial conversion Prediction polynomial to autocorrelation sequence conversion Prediction polynomial to line spectral frequencies conversion Prediction polynomial to reflection coefficients conversion Reflection coefficients to autocorrelation sequence conversion Reflection coefficients to inverse sine parameters conversion Reflection coefficients to log area ratios conversion Reflection coefficients to prediction polynomial conversion Reverse LevinsonDurbin recursion Schur algorithm decimate interp interp1 resample spline upfirdn Resample data at a lower sample rate Resample data at a higher sample rate General 1-D interpolation. (MATLAB Toolbox) Resample sequence with new sampling rate Cubic spline interpolation Up sample, FIR filter, down sample Waveform Generation chirp diric gauspuls gmonopuls pulstran rectpuls sawtooth sinc square tripuls vco Swept-frequency cosine generator Dirichlet (periodic sinc) function Gaussian RF pulse generator Gaussian monopulse generator Pulse train generator Sampled aperiodic rectangle generator Sawtooth function Sinc or sin(pi*x)/(pi*x) function Square wave function Sampled aperiodic triangle generator Voltage controlled oscillator Specialized Operations buffer cell2sos cplxpair demod Buffer a signal vector into a matrix of data frames Convert cell array to second-order-section matrix Order vector into complex conjugate pairs Demodulation for communications simulation dpss eqtflength modulate seqperiod sos2cell specgram stem strips udecode uencode Discrete prolate spheroidal sequences (Slepian sequences) Equalize the length of a discrete-time transfer function Modulation for communications simulation Find minimum-length repeating sequence in a vector Convert second-ordersection matrix to cell array Spectrogram, for speech signals Plot discrete data sequence Strip plot Uniform decoding of the input Uniform quantization and encoding of the input into N-bits Graphical User Interfaces fdatool sptool Filter Design and Analysis Tool Signal Processing Tool Power Spectral Density Estimates for a 4th Order AR Model 40 MUSIC Yule AR Burg Welch MTM Covariance Mod Covar Power Spectral Density (dB / rads/sample) 30 20 Spectral analysis of a signal 10 using a range of parametric and nonparametric techniques. 0 -10 -20 The Signal Processing Toolbox provides two GUIs: FDATool is a comprehensive tool for designing and analyzing digital filters that helps you: -30 -40 They are particularly useful for visualizing time-frequency information, spectra, and pole-zero locations. For example, you can interactively design a filter by graphically placing the poles and zeroes in the z-plane. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Normalized Angular Frequency (∗π rads/sample) Signal and Linear System Models The Signal Processing Toolbox provides a broad range of models for representing signals and linear time-invariant systems, allowing you to choose the method that best suits your application, including representations for transfer functions state space, and zero-pole-gain. The toolbox also includes functions for transforming models from one representation to another. Filter Design The Signal Processing Toolbox features a full suite of design methods for finite impulse response (FIR) and infinite impulse response (IIR) digital filters. These methods support the rapid design and evaluation of lowpass, highpass, bandpass, bandstop, and multiband filters such as Butterworth, Chebyshev, elliptic, Yule-Walker, window-based, leastsquares, and Parks-McClellan. The filter structures available include the direct forms I and II, lattice, lattice-ladder, and secondorder sections. You can comment among the various realizations with tools provided. Spectral Analysis The Signal Processing Toolbox provides unsurpassed facilities for frequency-domain analysis and spectral estimation. Several of these methods are based on a highly optimized FFT. The toolbox includes functions 0.8 0.9 1 • Access most FIR and IIR filter design methods in the toolbox using a simplified, graphical interface for computing the discrete Fourier, discrete cosine, Hilbert, and other transforms useful in analysis, coding, and filtering. The spectral analysis methods available include Welch's, Burg's, modified covariance, Yule-Walker, the multitaper method, and the MUSIC method. Visualization The GUIs in the Signal Processing Toolbox let you interactively view and measure signals, design and apply filters, and perform spectral analysis while exploring the effects of different analysis parameters and methods. • Analyze filters by exchanging magnitude, phase, impulse, and step responses and by calculating group delay and pole-zero plots • Import previously designed filters and filter coefficients that you have stored in the MATLAB workspace. Export filter coefficients • Access additional filter design methods and quantization features of the Filter Design Toolbox (when that optional product is installed) • Print filter response directly from the GUI with the option to annotate plots SPTool’s Filter Designer includes a Pole/Zero editor that lets you design a filter through the graphical placement of poles and zeroes. The Filter Viewer lets you view all characteristics of the filter. • A crosshair locator that locates individual data points on the spectrogram You can evaluate time/frequency information in the spectrogram by using the signal panner or the crosshair locator. This will allow you to locate data points in the spectrogram. They will display and interactively update a frequency slice of the input signal, a time slice of signal, and a readout of time and frequency values. You can call the specgramdemo from the MATLAB command line by typing specgramdemo(y,FS) where y is the input signal and Fs is the signal’s sampling rate. Context-sensitive help is available for specgramdemo. Product Requirements Specgramdemo is a user-friendly GUI that provides interactive calculations of a signal’s time-frequency distribution. SPTool is a suite of GUI tools providing access to many of the signal, filter, and spectral analysis functions that helps you: • Measure and analyze the time-domain information of one or more signals and send audio signal to the PC’s sound card • Graphically analyze frequency-domain data using a variety of spectral estimation methods, including Burg, FFT, multitaper (MTM), MUSIC, eigenvector, Welch, and Yule-Walker AR For demos, application examples, tutorials, user stories, and pricing: An Interactive Demo • Contact The MathWorks directly • Visit www.mathworks.com • Design and edit FIR and IIR filters of various lengths and types and with standard (lowpass, highpass, bandpass, bandstop, and multiband) configurations, as well as design filters by graphically placing poles and zeroes in the z-plane The Signal Processing Toolbox provides specgramdemo, a user-friendly GUI that interactively calculates a signal’s time-frequency distribution. Specgramdemo presents: • View the characteristics of a designed or imported filter, including its magnitude response, phase response, group delay, pole-zero plot, impulse response, and step response • The power spectral density of the input signal • Apply the filter to a selected signal The MathWorks The Signal Processing Toolbox runs on all MathWorks supported platforms. It requires MATLAB 6. ■ • The original time series data • The spectrogram of the input signal • A colorbar indicating the color scale of the spectrogram US & Canada 508-647-7000 Benelux France Germany Spain Switzerland UK +31 (0)182 53 76 44 +33 (0)1 41 14 67 14 +49 (0)89 995901 0 +34 93 362 13 00 +41 (0)31 954 20 20 +44 (0)1223 423 200 Visit www.mathworks.com to obtain contact information for authorized MathWorks representatives in countries throughout Asia Pacific, Latin America, the Middle East, Africa, and the rest of Europe. • A signal panner that lets you focus in and out on the signal Tel: 508.647.7000 [email protected] www.mathworks.com 9317v03 11/00 © 2000 by The MathWorks, Inc. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and Target Language Compiler is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders. Wavelets Packets The wavelet packets method is a generalization of wavelet decomposition that provides a richer range of decomposition encodings. The following functions compute, decompose, and reconstruct wavelet packets; construct and manipulate wavelet packet trees; and compute entropy values and packet coefficients: bestlevt besttree entrupd wentropy wp2wtree wpcoef wpcutree wpdec wpdec2 wpfun wpjoin wprcoef wprec wprec2 wpsplt Best level tree (wavelet packet) Best tree (wavelet packet) Entropy update (wavelet packet) Entropy (wavelet packet) Extract wavelet tree from wavelet packet tree Wavelet packet coefficients Cut wavelet packet tree Wavelet packet decomposition 1-D Wavelet packet decomposition 2-D Wavelet packet functions Recompose wavelet packet Reconstruct wavelet packet coefficients Wavelet packet reconstruction 1-D Wavelet packet reconstruction 2-D Split (decompose) wavelet packet Discrete Stationary Wavelet Transforms iswt iswt2 swt swt2 Inverse discrete stationary wavelet transform 1-D Inverse discrete stationary wavelet transform 2-D Discrete stationary wavelet transform 1-D Discrete stationary wavelet transform 2-D De-noising and Compression for Signals and Images The following functions specify coefficients and thresholds for denoising and compression and perform de-noising and compression using wavelets or wavelet packets: ddencmp thselect wbmpen wdcbm wdcbm2 wden wdencmp Default values for de-noising or compression Threshold selection for de-noising Penalized threshold for wavelet 1-D or 2-D de-noising Thresholds for wavelet 1-D using Birge-Massart strategy Thresholds for wavelet 2-D using Birge-Massart strategy Automatic 1-D de-noising using wavelets De-noising or compression using wavelets The U.S. Federal Bureau of Investigation has selected wavelet compression techniques for their extensive fingerprint database. Here, the automatic thresholding feature of the Wavelet Toolbox produces a compressed image with about 72% zeros and 98% of the original signal. wnoise wnoisest wpbmpen wpdencmp wpthcoef wthcoef wthcoef2 wthresh wthrmngr Generate noisy wavelet test data Estimate noise of 1-D wavelet coefficients Penalized threshold for wavelet packet de-noising De-noising or compression using wavelet packets Wavelet packet coefficients thresholding Wavelet coefficient thresholding 1-D Wavelet coefficient thresholding 2-D Perform soft or hard thresholding Threshold settings manager Utilities and Other Functions The Wavelet Toolbox provides general mathematical, function, matrix, and string manipulation utilities to support wavelet analysis. Specialized tree management functions maintain and manipulate data structures and tree structures, including creating and plotting trees; specifying tree order and depth; and indexing, counting, and reorganizing nodes. Wavelet Analysis Applications The Wavelet Toolbox supports a full suite of wavelet analysis and synthesis operations. It can be used to: • Enhance edge detection in image processing • Achieve high rates of signal or image compression with virtually no loss of significant data • Restore noisy signals and degraded images • Discover trends in noisy or faulty data • Study the fractal properties of signals and images • Extract information-rich features for use in classification and pattern-recognition applications The Wavelet Toolbox GUI provides point-and-click access to power wavelet-processing tasks, such as Graphical User Interface automatic de-noising, with instant The GUI gives you all the functionality of the toolbox in an intuitive, point-and-click environment. It provides: visualization of the results. Interval- • Wavelet 1-D Tool for discrete wavelet analysis of signals • Wavelet 2-D Tool for discrete wavelet analysis of images • Continuous and Complex Continuous Wavelet 1-D Tool for continuous wavelet analysis of real signals using complex wavelets • Signal and Image De-noising Tools, using the stationary wavelet transform for performing translation-invariant de-noising of signals • Local Variance Adaptive Threshold Tools, for defining time-dependent thresholds • Density Estimation 1-D for estimating wavelet-based density • Regression Estimation 1-D for exploring de-noising schemes for equally or unequally sampled data • Wavelet Coefficients Selection 1-D and 2-D for performing wavelet reconstruction schemes based on various wavelet coefficient selection strategies • Signal Extension/Truncation for performing one-dimensional signal extension and truncation using periodic, symmetric, smooth, and zeropadding methods compression tools. dependent threshold settings can also be applied in the de-noising and About the Authors The authors of the Wavelet Toolbox are Michel Misiti, Georges Oppenheim, and Jean-Michel Poggi, mathematics professors at École Centrale de Lyon, Université de MarneLa-Vallée, and Université René Descartes, Paris 5, and Yves Misiti, a research engineer specializing in Computer Sciences at Université Paris-Sud. The authors are members of the “Laboratoire de Mathématique,” Université Paris-Sud. Their fields of interest are wavelets, statistical signal processing, stochastic processes, and adaptive control. The authors’ group, which was formed more than ten years ago, has published numerous theoretical papers and collaborated on many industrial applications of advanced signal processing and control technologies. ■ Tel: 508.647.7000 [email protected] www.mathworks.com For demos, application examples, tutorials, user stories, and pricing: • Visit www.mathworks.com • Contact The MathWorks directly US & Canada 508-647-7000 Benelux France Germany Spain Switzerland UK +31 (0)182 53 76 44 +33 (0)1 41 14 67 14 +49 (0)89 995901 0 +34 93 362 13 00 +41 (0)31 954 20 20 +44 (0)1223 423 200 Visit www.mathworks.com to obtain contact information for authorized MathWorks representatives in countries throughout Asia Pacific, Latin America, the Middle East, Africa, and the rest of Europe. 8797v02 10/00 © 2000 by The MathWorks, Inc. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and Target Language Compiler is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders. MODULATION CHANNELS AWGN channel Binary symmetric channel Multipath Rayleigh fading channel Rician fading channel Digital Baseband and Passband Amplitude Modulation General QAM modulator and demodulator M-PAM modulator and demodulator Rectangular QAM modulator and demodulator SYNCHRONIZATION Phase Modulation Phase-locked loop Baseband PLL Charge pump PLL Linearized baseband PLL BPSK modulator and demodulator DBPSK modulator and demodulator DQPSK modulator and demodulator M-DPSK modulator and demodulator M-PSK modulator and demodulator OQPSK modulator and demodulator QPSK modulator and demodulator BASIC COMM FUNCTIONS 1 2 3 4 5 1 1 2 2 3 Integrators Discrete modulo integrator Integrate and dump Modulo integrator Windowed integrator Frequency Modulation M-FSK modulator and demodulator Continuous Phase Modulation Sequence Operations CPFSK modulator and demodulator CPM modulator and demodulator GMSK modulator and demodulator MSK modulator and demodulator Complex phase difference Complex phase shift Interlacer and deinterlacer Repeat and derepeat Puncture and insert zero Scrambler and descrambler Analog Baseband and Passband DSB AM modulator and demodulator DSBSC AM modulator and demodulator FM modulator and demodulator PM modulator and demodulator SSB AM modulator and demodulator UTILITY FUNCTIONS 101 5 dB lin Bit to integer converter Data mapper dB Here a tutorial example shows how you can quickly build a communication Bernoulli bin Convolutional Encoder system comprising a channel, modulation Bernoulli Random Binary Generator Convolutional Encoder scheme, and coding. Tx Rx BPSK Unbuffer BPSK Modulator Baseband 0.01203 Error Rate Calculation 566 AWGN Channel 4.706e+004 Error Rate Calculation Display Terminator Info Viterbi Decoder Viterbi Decoder Buffer Terminator1 Scalar quantizer Re(u) Sampled Quantizer Encode Complex to Real-Imag AWGN Being based on Simulink, the Communications Blockset handles arbitrarily complex systems by allowing you to build and navigate models hierarchically. You can process all the multi-rate digital signals that are typical in communications systems, such as frames, bits and symbols. And you can make use of Simulink’s continuous time features to model analog signals. Simulink provides the interactive, block diagram simulation environment including model construction, navigation, simulation management and debugging. It also provides primitive analog and discrete, linear and non-linear building blocks, such as arithmetic, logic and relational operators, subsystems, Laplace transforms, z-transforms, look-up tables, polynomials and switches. You also have the ability to add your own custom C code or M code modules using the Simulink S-function block. ■ This BER plot can be calculated by a MATLAB script that runs your simulation many times for different Eb/No values. USING THE COMMUNICATIONS BLOCKSET WITH OTHER MATHWORKS PRODUCTS To run the Communications Blockset, the Communications Toolbox, the Signal Processing Toolbox, Simulink and the DSP Blockset must also be installed. The DSP Blockset This provides all the MATLAB® With MATLAB you can create key DSP blocks common in any digital communications system. These blocks include filters, adaptive filters, interpolation, signal operations, transforms, vector math, matrix math, linear algebra, and frequency scopes. The Communications Blockset also makes extensive internal use of the DSP Blockset. scripts to automate the running of your simulation multiple times to calculate bit-error plots. You can also use it for post processing of simulation data as well as numerous ancillary parameter manipulation and generation tasks. The Communication Toolbox This provides a number of support functions for error correction coding including polynomial creation and Galois field computations. The Communications Blockset also makes extensive internal use of the Communications Toolbox. The MathWorks Real-Time Workshop For large models or long simulation runs, Real-time Workshop can generate a standalone C executable for running multiple simulations or for co-simulation with low-level EDA tools. For demos, application examples, tutorials, user stories, and pricing: • Visit www.mathworks.com • Contact The MathWorks directly US & Canada 508-647-7000 Benelux France Germany Spain Switzerland UK +31 (0)182 53 76 44 +33 (0)1 41 14 67 14 +49 (0)89 995901 0 +34 93 362 13 00 +41 (0)31 954 20 20 +44 (0)1223 423 200 Visit www.mathworks.com to obtain contact information for authorized MathWorks representatives in countries throughout Asia Pacific, Latin America, the Middle East, Africa, and the rest of Europe. Stateflow® You can also integrate your physical layer design in Simulink and the Communications Blockset with your linklayer design in Stateflow, The MathWorks control logic design product. Tel: 508.647.7000 [email protected] www.mathworks.com 9869v00 10/00 © 2000 by The MathWorks, Inc. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and Target Language Compiler is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders.