You are on page 1of 41

MatLab versin 6

FACULTADE DE INFORMTICA

SOFTWARE

Matlab Versin 6
Introduccin
En los ltimos aos la Facultad de Informtica de A Corua ha venido utilizando el software Matlab para la realizacin de los crditos prcticos en las tres titulaciones impartidas en la Facultad: Ingeniera Informtica, Ingeniera Tcnica Informtica de Gestin e Ingeniera Tcnica Informtica de Sistemas. Matlab, desarrollado por la compaa MathWorks, es un producto ampliamente reconocido para la informtica tcnica que abarca gran variedad de reas de aplicacin, entre las que se encuentran el procesamiento de imgenes, sistemas de mando, ciencias naturales, finanzas, economa... Este entorno incluye herramientas para adquisicin y anlisis de datos, visualizacin y procesamiento de las imgenes, prototipos de algoritmos, planificacin y simulacin, programacin y desarrollo de aplicaciones y un largo etctera. Dentro de un entorno muy amigable con una facilidad extraordinaria para la resolucin de problemas relacionados con diversas disciplinas. Matlab integra informtica matemtica, visualizacin y un lenguaje tcnico muy poderoso. Permitiendo adems 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 tcnicas de trabajo y sus entornos amigables. Hasta ahora se han utilizado los mdulos de Matlab, Simulink, Neural Network Toolbox, Signal Processing Toolbox, Wavelet Toolbox y Communications Blockset en asignaturas tales como Sistemas Conexionistas, Tratamiento Digital de la Seal, Tcnicas de Simulacin, etc.
http://www.fi.udc.es/cc/srv/sft/Matlab6.html (1 of 3) [25/10/2004 11:41:42]

MatLab versin 6

Matlab Versin 6
En Marzo de 2001 se ha instalado para uso docente en la Facultad de Informtica la versin 6 de Matlab que proporciona un entorno mejorado, cuyas caractersticas ms reseables son: q 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. q Mejora del cmputo matemtico y perfeccionamiento de los algoritmos: la biblioteca de LAPACK esta perfeccionada para realizar clculos de matrices ms rpidos, nuevos solvers de ecuaciones diferenciales y algoritmos de cuadratura ms exactos. q Nuevas estadsticas de los datos y las herramientas bsicas para el anlisis rpido de datos trazados. q Nuevos rasgos avanzados de visualizacin: despliegue de imgenes 2-D, superficies y volmenes como objetos transparentes; la barra de herramientas de la cmara interactiva para controlar perspectivas. q Nueva interface para llamar rutinas de Java y los prebuilt usando Java objet directamente de MATLAB. q Nueva interface de comunicacin del puerto serie para comunicar con instrumentos externos a MATLAB. q Integracin de MATLAB con Microsoft Visual Estudio. q Ventana de ayuda que permite buscar, leer e imprimir la documentacin en linea. Algunos Toolboxes utilizados en la docencia de la Facultad de Informtica de A Corua han sido mejorados, tales como: q Signal Processing Toolbox 5: proporciona herramientas para el anlisis de seales y sistemas lineales, para modelar datos de series temporales y para el desarrollo de algoritmos. q Filter Design Toolbox 2: complementa al Signal Processing Toolbox 5 proporcionando tcnicas de diseo de filtros avanzados. q Control System Toolbox 5: proporciona un entorno interactivo para modelar, analizar y disear sistemas de control. q Neural Network Toolbox 4: proporciona los algoritmos mas utilizados en el diseo y simulacin 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 versin 6

Para la ejecucin de este entorno de trabajo en los sistemas de docencia deber realizar su conexin a la maquina de alias matlab. El programa se ejecutar utilizando la instruccin matlab.

Informacin adicional
Para una mayor informacin sobre las mejoras introducidas en esta nueva versin de Matlab se pueden consultar las siguientes pginas: q Caractersticas generales de la release 12: [HTML] q Nuevas caractersticas de Matlab 6: [HTML] [PDF] q Nuevas caractersticas de Simulink 4: [HTML] [PDF] q Nuevas caractersticas de Control System Toolbox 5: [HTML] [PDF] q Nuevas caractersticas de Neural Network Toolbox 4: [HTML] [PDF] q Nuevas caractersticas de Signal Processing Toolbox 5: [HTML] [PDF] q Nuevas caractersticas de Wavelet Toolbox 2: [HTML] [PDF] q Nuevas caractersticas de Communications Blockset 2: [HTML] [PDF]

Copyright 2001. Centro de Clculo da Facultade de Informtica.

http://www.fi.udc.es/cc/srv/sft/Matlab6.html (3 of 3) [25/10/2004 11:41:42]

Whats 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 Data Acquisition Toolbox Database Toolbox 5 6 6

DATA ANALYSIS AND MATH


Signal Processing Toolbox
The new MATLAB 6 desktop

7 7 8 8 9 9

NEW!

Filter Design Toolbox Control System Toolbox

Neural Network Toolbox Statistics Toolbox Spline Toolbox

APPLICATION DEPLOYMENT
MATLAB Compiler
Data acquisition with the new Instrument Control Toolbox

10 10 10 11 11

MATLAB C/C++ Math Library MATLAB C/C++ Graphics Library MATLAB Runtime Server MATLAB Web Server

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.

Datafeed Toolbox NEW! Financial Derivatives Toolbox

12 12

The MathWorks

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
s s s

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

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.
s s

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.

Current Directory browser for viewing, maintaining, and searching MATLAB files Enhanced M-file Editor/Debugger for creating, editing, and debugging MATLAB M-files

Whats New for M ATLAB 6?

Language and GUI Development Features


s

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

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.

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


s

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


s

s s

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.

Whats New for M ATLAB 6?

Data Access and File Format Enhancements


s s

s s s s s s

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 computers 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


s

s s

Matrix math in MATLAB now incorporates the well-known LAPACK library (which replaces LINPACK and EISPACK), increasing MATLABs 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.

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.

Whats New for M ATLAB 6?

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


s

s s s s s

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.

Whats New for M ATLAB 6?

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


s

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


s

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.

Whats 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 toolboxs original GUI, which contains support for signal viewing and spectral analysis.

NEW FEATURE HIGHLIGHTS


s

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


s s s

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.

Whats New for M ATLAB 6?

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


s s s

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


s

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

s s

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.

Whats 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


s

s s s s s

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

s s s

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


s

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.

Whats New for M ATLAB 6?

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


s s s

s s

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

Whats 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


s s s

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


s

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.

Whats 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


s s s

Access to data from Interactive Datas 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


s

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 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.

The MathWorks

Tel: 508.647.7000 info@mathworks.com www.mathworks.com

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
s s s s s 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

Creating Models
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 Simulinks comprehensive set of predefined blocks, make it easy to create concise representations of your systems, regardless of their complexity.

COMPUTATIONAL SUPPORT
s Linear, nonlinear, continuous-time, discrete-time, multirate, conditionally executed, mixed-signal, and hybrid systems s Support for matrix signals and operations s Bitwise Logical Operator block logically masks, inverts, or shifts the bits of an unsigned integer signal

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 Integral Gain 0 2 N
integrator input enable integration controller output

1 T z-1 Discrete-Time Integrator limit output Throttle Ang.

1 mass(k+1)

[0.152]

1 z

1 mass(k)

Init

Unit Delay

2 Trigger trigger

prevent windup

KEY FEATURES

(continued)

LARGE MODEL DEVELOPMENT


s Models can be grouped into hierarchies to create a simplified view of components or subsystems s Simulink data objects enable you to create applicationspecific MATLAB data types for your Simulink models s Simulink Explorer GUI for viewing and editing data objects s Library Browser for convenient block selection s Intellectual property protection using S-functions (requires Real-Time Workshop 4.0) s Simulations can be run from the MATLAB command line, either interactively or in batch mode

Extensible Block Library


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. 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.

The Library Browser makes it easy to navigate through 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 Simulinks 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
Simulinks 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 blocks 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 blocks 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 blocks dialog box, you can specify which block in the library it represents. You can also specify the inputs and outputs of the selected block. 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 blocks dialog. This enables you to rapidly swap design choices in and out of your model.

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 variables by variable name and class. You can also view and edit property values. models. You can view and edit all Simulink data with the Simulink Explorer.

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

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 In Win Window

|FFT| ^ 2 Magnitude FFT Direct-Form II Transpose Filter 1 Out

In

Out

Normalization

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 boxenables you to search Simulink models for objects that satisfy specified search criteria. Block diagram zoominggreatly simplifies model viewing by allowing you to enlarge or shrink the view.

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. 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.

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 Simulinks 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

Scalar and Vector Connections


Simulink supports the modeling of singleinput/single-output (SISO) and multi-input/ multi-output (MIMO) systems.

Matrix Signal Support


Many Simulink blocks accept or output matrix signals. A matrix signal is a twodimensional array of signal elements

1-exp(-deltat1/Ts) z-exp(-deltat1/Ts) Stick Filter 1-exp(-deltat1/Tal) z-exp(-deltat1/Tal) Zero-Order Hold Alpha Sensor Filter Zero-Order Hold Zero-Order Hold Kf 1 Ka T z-1 Discrete-Time Integrator Actuator Pos.
ActPos

1 States

Ki

Act. Comd.

Kq 1-exp(-W2*deltat1) z-exp(-W2*deltat1) Pitch Sensor Filter Zero-Order Hold

StopInt

Error

Anti-Wind-Up

-K-

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.

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


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.

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

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 systems 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. 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.

double-precision floating point; single-precision floating point; signed and unsigned 8-, 16-, and 32-bit integers; and Boolean.

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. s

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.

Analysis
Simulink includes many features for detailed system analysis. Key capabilities include: linearization, equilibrium point determination, animation, parameter optimization, and parametric analysis.

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 Simulinks linmod function to obtain linear state-space models from your block diagrams.

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 models 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 models signals and parameters, you can dramatically increase the performance and decrease the size of code generated from the model. Supported data types are

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

Animation
Simulink provides immediate access to MATLABs 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 systems behavior as the simulation progresses.

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 Simulinks 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.

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.

Tel: 508.647.7000 info@mathworks.com www.mathworks.com

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
s LTI Viewer, an interactive GUI for analyzing and comparing linear-time-invariant (LTI) systems s SISO Design Tool, an interactive GUI for analyzing and tuning single-input/single-output (SISO) feedback control systems s GUI suite for setting preferences and properties, giving you complete control over the visualization of time and frequency plots s Specialized data structures, called LTI objects, for concisely representing transfer function, state-space, zero/pole/gain, and frequency response data model formats s Support for multi-input/multi-output (MIMO) systems, continuous-time and sampled-data systems, and systems with time delays s Functions and operators for connecting LTI models with complex block diagrams (series, parallel, and feedback connections) s Support for a variety of discrete-to-continuous conversion methods s Functions for plotting the time and frequency responses of systems and comparing several systems with a single command s 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 systemsall 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. 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.

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.

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. Using right-click menu options, you can access several LTI Viewer controls and options, including: Plot Typechanges the plot type Systemsselects or deselects any of the models loaded in the LTI Viewer Characteristicsdisplays key response characteristics and parameters Zoomzooms in and out of plot regions Gridadds grids to your plots Propertiesopens the Property Editor, where you can customize plot attributes

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.

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

Analyzing Models Using the Command Line


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.

Current Compensator

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

100 s 2 + s + 100 + 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 system is created. The impulse-response plot shows a comparison between the open-loop system (red) and the closedloop system (blue). Right-click menus simplify customizations of plots and GUIs

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. The SISO Design Tool: 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

Pull-down and right-click menus give you the flexibility to perform control design tasks with one mouse-click. In particular, you can: 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

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 Preferencesglobal options that you can save from session to session Tool Preferencesoptions set for a particular instance of the LTI Viewer or SISO Design Tool Plot Propertiesoptions for customizing a given response plot

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.

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, Dos and Donts); 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: Simulinka comprehensive environment for modeling, simulating, and analyzing dynamic systems in a block diagram format

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 Toolboxtools for building linear models of dynamic systems from measured input/output data Fuzzy Logic Toolboxtools for developing fuzzy logic algorithms Robust Control Toolboxtools 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 s

Sample Commands
General
ctrlpref damp

Set Control System Toolbox preferences

Creating Linear Models


tf zpk ss, dss frd set

dcgain norm covar

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

Natural frequency and damping of system poles DC (low frequency) gain Norms of LTI systems Covariance of response to white noise

State-Space Models
rss, drss ss2ss ctrb, obsv gram minreal ssbal balreal modred

Time-Domain Analysis
ltiview step impulse initial lsim

Data Extraction
tfdata zpkdata ssdata get

Response analysis GUI (LTI Viewer) Step response Impulse response Response of state-space system with given initial state Response to arbitrary inputs

Extract numerator(s) and denominator(s) Extract zero/pole/gain data Extract state-space matrices Access values of LTI model properties

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

Frequency-Domain Analysis
ltiview bode sigma nyquist nichols margin allmargin freqresp

Conversions
ss zpk tf 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

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

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

Classical Design
sisotool rlocus

System Interconnections
append

SISO design GUI (root locus and loop shaping techniques) Evans root locus

dare

Solve continuous Lyapunov equations Solve discrete Lyapunov equations Solve continuous algebraic Riccati equations Solve discrete algebraic Riccati equations

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

Pole Placement
place estim reg

MIMO pole placement Form estimator given estimator gain Form regulator given statefeedback and estimator gains

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

LQR/LQG Design
lqr, dlqr lqry lqrd kalman kalmd

Model Dynamics
pole zero pzmap

System poles System (transmission) zeros Pole-zero map

Linear-quadratic (LQ) statefeedback regulator LQ regulator with output weighting Discrete LQ regulator for continuous plant Kalman estimator Discrete Kalman estimator for continuous plant

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.

Tel: 508.647.7000 info@mathworks.com www.mathworks.com

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 toolboxs modular, open, and extensible design simplifies the creation of customized functions and networks.

KEY FEATURES
s

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

s s

s s

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.
s s

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.

trainb trainbfg trainbr trainc

Batch training with weight and bias learning rules BFGS quasi-Newton backpropagation Bayesian regularization Cyclical order incremental update Powell-Beale conjugate gradient backpropagation Fletcher-Powell conjugate gradient backpropagation Polak-Ribiere conjugate gradient backpropagation Gradient descent backpropagation Gradient descent with adaptive learning rate (lr) backpropagation Gradient descent with momentum backpropagation Gradient descent with momentum & adaptive lr backpropagation Levenberg-Marquardt backpropagation One step secant backpropagation Random order incremental update Resilient backpropagation (Rprop) Sequential order incremental update Scaled conjugate gradient backpropagation

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.

traincgb traincgf traincgp traingd traingda traingdm traingdx trainlm trainoss trainr trainrp

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

trains trainscg

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 networks 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 learngd learngdm learnh learnhd learnis learnk learnlv1 learnlv2 learnos learnp learnpn learnsom learnwh Conscience bias learning function Gradient descent weight/bias learning function Gradient descent with momentum weight/bias learning function Hebb weight learning function Hebb with decay weight learning rule Instar weight learning function Kohonen weight learning function LVQ1 weight learning function LVQ2 weight learning function Outstar weight learning function Perceptron weight and bias learning function Normalized perceptron weight and bias learning function Self-organizing map weight learning function Widrow-Hoff weight and bias learning rule

Control System Applications


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.

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 networks performance to your application.

NN Predictive Controller

Reference Random Reference

Optim. Control Signal

Clock
Flow Rate Concentration

Plant Output

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}

Layer 1
p{1} a{2} a{1}

a{1}

1
a{2}

TDL Delays 1 TDL Delays 2

weight IW{2,1} weight LW{2,1} bias b{2} netsum tansig 1 a{2}

p{1} 2 a{1}

Layer 2 a{1}
p{1} a{1} a{3}

1 y{1}

a{2}

a{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
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 Generalization
Improving the networks 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 provides two solutions to improve generalization: Regularization modifies the networks 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.

Documentation and Examples


The Neural Network Toolbox Users 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 Users 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.

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.

The MathWorks

Tel: 508.647.7000 info@mathworks.com www.mathworks.com

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. You can use the toolbox in speech and audio processing, communications, digital control, radar, geophysics, test instrumentation, realtime control, finance, medicine, and other applications.

KEY FEATURES
s A comprehensive set of signal and linear system models s Tools for analog filter design s Tools for Finite Impulse Response (FIR) and Infinite Impulse

Response (IIR) digital filter design, analysis, and implementation


s The most widely used transforms, such as fast Fourier

transform (FFT) and discrete cosine transform (DCT)


s Methods for spectrum estimation and statistical signal processing s Functions for parametric time-series modeling s Routines for waveform generation, including a Gaussian pulse

generator, a periodic sinc generator, and a pulse train generator


s Data windowing algorithms

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 filters 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

fir2

fircls

fircls1

firls firrcos intfilt kaiserord

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

remez remezord sgolay

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

Analog Lowpass Filter Prototypes


besselap buttap cheb1ap

cheb2ap

ellipap

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


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
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

IIR Filter Order Estimation


buttord cheb1ord Butterworth filter order estimation Chebyshev type I filter order estimation Chebyshev type II filter order estimation Elliptic filter order estimation

Bilinear transformation with optional prewarping Impulse invariance analog to digital conversion

FIR Filter Design


convmtx cremez

Linear System Transformations


latc2tf

Convolution matrix Complex and nonlinear phase equiripple FIR filter design

cheb2ord ellipord

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

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

pmusic

pwelch

pyulear

rooteig

rootmusic

Cepstral Analysis
cceps icceps rceps

tfe

Complex cepstrum Inverse complex cepstrum Real cepstrum and minimum phase reconstruction

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

Statistical Signal Processing and Spectral Analysis


cohere corrcoef corrmtx cov csd pburg

Parametric Modeling
arburg arcov armcov

Windows
bartlett 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

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

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

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

dpss

ac2poly

is2rc

resample spline upfirdn

lar2rc

levinson lpc

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

eqtflength

modulate

seqperiod

sos2cell

Waveform Generation
chirp diric gauspuls gmonopuls pulstran rectpuls sawtooth sinc square tripuls vco

specgram stem strips udecode uencode

lsf2poly

poly2ac

poly2lsf

poly2rc

rc2ac

rc2is

rc2lar

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

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

Specialized Operations
buffer

rc2poly

rlevinson schurrc

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

Power Spectral Density Estimates for a 4th Order AR Model


40 MUSIC Yule AR Burg Welch MTM Covariance Mod Covar

30

Power Spectral Density (dB / rads/sample)

20

Spectral analysis of a signal


10

using a range of parametric and nonparametric techniques.

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. The Signal Processing Toolbox provides two GUIs: FDATool is a comprehensive tool for designing and analyzing digital filters that helps you:

-10

-20

-30

-40

0.1

0.2

0.3 0.4 0.5 0.6 0.7 Normalized Angular Frequency ( rads/sample)

0.8

0.9

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. 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 SPTools 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.

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.

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.

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

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 signals sampling rate. Context-sensitive help is available for specgramdemo.

Product Requirements
Specgramdemo is a user-friendly GUI that provides interactive calculations of a signals time-frequency distribution. The Signal Processing Toolbox runs on all MathWorks supported platforms. It requires MATLAB 6. s

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 PCs sound card 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 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 Apply the filter to a selected signal

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: 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

An Interactive Demo
The Signal Processing Toolbox provides specgramdemo, a user-friendly GUI that interactively calculates a signals time-frequency distribution. Specgramdemo presents: The original time series data The spectrogram of the input signal The power spectral density of the input signal A colorbar indicating the color scale of the spectrogram A signal panner that lets you focus in and out on the signal

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.

The MathWorks

Tel: 508.647.7000 info@mathworks.com 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

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

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

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 automatic de-noising, with instant visualization of the results. Intervaldependent threshold settings can also be applied in the de-noising and compression tools.

Graphical User Interface


The GUI gives you all the functionality of the toolbox in an intuitive, point-and-click environment. It provides: 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

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-Valle, 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 Mathmatique, 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. s

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.

Tel: 508.647.7000 info@mathworks.com www.mathworks.com

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 Digital Baseband and Passband Amplitude Modulation


General QAM modulator and demodulator M-PAM modulator and demodulator Rectangular QAM modulator and demodulator

CHANNELS
AWGN channel Binary symmetric channel Multipath Rayleigh fading channel Rician fading channel

SYNCHRONIZATION Phase Modulation


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 Phase-locked loop Baseband PLL Charge pump PLL Linearized baseband PLL

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


CPFSK modulator and demodulator CPM modulator and demodulator GMSK modulator and demodulator MSK modulator and demodulator

Sequence Operations
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 dB 5 lin

Bit to integer converter Data mapper dB

Here a tutorial example shows how you can quickly build a communication system comprising a channel, modulation scheme, and coding.
Bernoulli bin Bernoulli Random Binary Generator Convolutional Encoder Convolutional Encoder Unbuffer BPSK BPSK Modulator Baseband

Tx Rx

Error Rate Calculation

0.01203 566 4.706e+004 Display Terminator Scalar quantizer Buffer Terminator1 Sampled Quantizer Encode AWGN Channel AWGN

Error Rate Calculation

Info

Re(u)

Viterbi Decoder Viterbi Decoder

Complex to Real-Imag

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 Simulinks 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. s

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


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.

MATLAB With MATLAB you can create


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.

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

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.

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. 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.

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.

The MathWorks

Tel: 508.647.7000 info@mathworks.com 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.

You might also like