matlab.pdf

41
FACULTADE DE INFORMÁTICA SOFTWARE Matlab Versión 6 Introducción En los últimos años la Facultad de Informática de A Coruña ha venido utilizando el software Matlab para la realización de los créditos prácticos en las tres titulaciones impartidas en la Facultad: Ingeniería Informática, Ingeniería Técnica Informática de Gestión e Ingeniería Técnica Informática de Sistemas. Matlab, desarrollado por la compañía MathWorks, es un producto ampliamente reconocido para la informática técnica que abarca gran variedad de áreas de aplicación, entre las que se encuentran el procesamiento de imágenes, sistemas de mando, ciencias naturales, finanzas, economía... Este entorno incluye herramientas para adquisición y análisis de datos, visualización y procesamiento de las imágenes, prototipos de algoritmos, planificación y simulación, programación y desarrollo de aplicaciones y un largo etcétera. Dentro de un entorno muy amigable con una facilidad extraordinaria para la resolución de problemas relacionados con diversas disciplinas. Matlab integra informática matemática, visualización y un lenguaje técnico muy poderoso. Permitiendo además importar rutinas externas escritas en LENGUAJE C, C++, Fortran y Java a sus aplicaciones. Existen diversas implementaciones Open Source compatibles en cierta medida con Matlab, como Octave y Scilab que dan una muestra de como se puede aprovechar el "saber hacer" de MathWork, puesto que incorporan sus técnicas de trabajo y sus entornos amigables. Hasta ahora se han utilizado los módulos de Matlab, Simulink, Neural Network Toolbox, Signal Processing Toolbox, Wavelet Toolbox y Communications Blockset en asignaturas tales como Sistemas Conexionistas, Tratamiento Digital de la Señal, Técnicas de Simulación, etc. MatLab versión 6 http://www.fi.udc.es/cc/srv/sft/Matlab6.html (1 of 3) [25/10/2004 11:41:42]

Upload: leruri

Post on 02-Jan-2016

89 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Matlab.pdf

FACULTADE DE INFORMÁTICA SOFTWARE

Matlab Versión 6Introducción

En los últimos años la Facultad de Informática de A Coruña ha venido utilizando el software Matlab para la realización de los créditos prácticos en las tres titulaciones impartidas en la Facultad: Ingeniería Informática, Ingeniería Técnica Informática de Gestión e Ingeniería Técnica Informática de Sistemas.

Matlab, desarrollado por la compañía MathWorks, es un producto ampliamente reconocido para la informática técnica que abarca gran variedad de áreas de aplicación, entre las que se encuentran el procesamiento de imágenes, sistemas de mando, ciencias naturales, finanzas, economía...

Este entorno incluye herramientas para adquisición y análisis de datos, visualización y procesamiento de las imágenes, prototipos de algoritmos, planificación y simulación, programación y desarrollo de aplicaciones y un largo etcétera. Dentro de un entorno muy amigable con una facilidad extraordinaria para la resolución de problemas relacionados con diversas disciplinas.

Matlab integra informática matemática, visualización y un lenguaje técnico muy poderoso. Permitiendo además importar rutinas externas escritas en LENGUAJE C, C++, Fortran y Java a sus aplicaciones.

Existen diversas implementaciones Open Source compatibles en cierta medida con Matlab, como Octave y Scilab que dan una muestra de como se puede aprovechar el "saber hacer" de MathWork, puesto que incorporan sus técnicas de trabajo y sus entornos amigables.

Hasta ahora se han utilizado los módulos de Matlab, Simulink, Neural Network Toolbox, Signal Processing Toolbox, Wavelet Toolbox y Communications Blockset en asignaturas tales como Sistemas Conexionistas, Tratamiento Digital de la Señal, Técnicas de Simulación, etc.

MatLab versión 6

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

Page 2: Matlab.pdf

Matlab Versión 6

En Marzo de 2001 se ha instalado para uso docente en la Facultad de Informática la versión 6 de Matlab que proporciona un entorno mejorado, cuyas características más reseñables son:

● Nuevo escritorio con una carpeta de herramientas para manejar el entorno de MATLAB, incluida la Ventana de Orden, la ventana de Historia de Orden, Workspace Browser, Editor de Serie, etc.

● Mejora del cómputo matemático y perfeccionamiento de los algoritmos: la biblioteca de LAPACK esta perfeccionada para realizar cálculos de matrices más rápidos, nuevos solvers de ecuaciones diferenciales y algoritmos de cuadratura más exactos.

● Nuevas estadísticas de los datos y las herramientas básicas para el análisis rápido de datos trazados.● Nuevos rasgos avanzados de visualización: despliegue de imágenes 2-D, superficies y volúmenes como objetos

transparentes; la barra de herramientas de la cámara interactiva para controlar perspectivas.● Nueva interface para llamar rutinas de Java y los prebuilt usando Java objet directamente de MATLAB. ● Nueva interface de comunicación del puerto serie para comunicar con instrumentos externos a MATLAB. ● Integración de MATLAB con Microsoft Visual Estudio. ● Ventana de ayuda que permite buscar, leer e imprimir la documentación en linea.

Algunos Toolboxes utilizados en la docencia de la Facultad de Informática de A Coruña han sido mejorados, tales como:

● Signal Processing Toolbox 5: proporciona herramientas para el análisis de señales y sistemas lineales, para modelar datos de series temporales y para el desarrollo de algoritmos.

● Filter Design Toolbox 2: complementa al Signal Processing Toolbox 5 proporcionando técnicas de diseño de filtros avanzados.

● Control System Toolbox 5: proporciona un entorno interactivo para modelar, analizar y diseñar sistemas de control.● Neural Network Toolbox 4: proporciona los algoritmos mas utilizados en el diseño y simulación de redes de neuronas.

Uso

MatLab versión 6

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

Page 3: Matlab.pdf

Para la ejecución de este entorno de trabajo en los sistemas de docencia deberá realizar su conexión a la maquina de alias matlab. El programa se ejecutará utilizando la instrucción matlab.

Información adicional

Para una mayor información sobre las mejoras introducidas en esta nueva versión de Matlab se pueden consultar las siguientes páginas:

● Características generales de la release 12: [HTML] ● Nuevas características de Matlab 6: [HTML] [PDF] ● Nuevas características de Simulink 4: [HTML] [PDF] ● Nuevas características de Control System Toolbox 5: [HTML] [PDF] ● Nuevas características de Neural Network Toolbox 4: [HTML] [PDF] ● Nuevas características de Signal Processing Toolbox 5: [HTML] [PDF] ● Nuevas características de Wavelet Toolbox 2: [HTML] [PDF] ● Nuevas características de Communications Blockset 2: [HTML] [PDF]

© Copyright 2001. Centro de Cálculo da Facultade de Informática.

MatLab versión 6

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

Page 4: Matlab.pdf

*Also included in Release 12 are numerous other products,including tools for image processing, control design, and DSP and communications. For information on these additionalproducts, go to www.mathworks.com

MathWorks customers who are under subscription service willreceive their new Release 12 CD automatically.

The MathWorks

Data acquisition with the new InstrumentControl Toolbox

NEW! Instrument Control Toolbox

Data Acquisition Toolbox

Database Toolbox

Signal Processing Toolbox

NEW! Filter Design Toolbox

Control System Toolbox

Neural Network Toolbox

Statistics Toolbox

Spline Toolbox

MATLAB Compiler

MATLAB C/C++ Math Library

MATLAB C/C++ Graphics Library

MATLAB Runtime Server

MATLAB Web Server

Datafeed Toolbox

NEW! Financial Derivatives Toolbox

DATA ACQUISITION AND ACCESS

NEW AND UPDATED PRODUCTS

APPLICATION DEPLOYMENT

FINANCE AND ECONOMICS

DATA ANALYSIS AND MATH

5

6

6

7

7

8

8

9

9

10

10

10

11

11

12

12

What’s New for MATLAB® 6?Feature highlights for MATLAB 6 and other new and updated Release 12 productsfor analysis, visualization, algorithm development, and application deployment.*

The new MATLAB 6 desktop

Page 5: Matlab.pdf

2 What’s New for MATLAB 6?

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.

for computation, analysis, visualization, and development

MATLAB Desktop

MATLAB 6

■ New desktop interface with all the toolsfor managing your MATLAB environment

■ Command Window for interactivelyexploring MATLAB

■ Command History tool for logging executedMATLAB commands and preserving themacross sessions for reference and reuse

■ Help/Help Navigator windows for access-ing, reading, and searching the onlineHTML documentation (browser displaysdocumentation for all installed productsconcurrently)

■ Workspace Browser for viewing andmodifying variable values, types, andhierarchy (integrated with Array Editorand 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 allinstalled MathWorks products

NEW FEATURE HIGHLIGHTS

The Help window (above) displays alist of topics in the Help Navigator(left portion of window) found whenthe user initiated a search on“transparency.” The relevant helpsection (right portion of window)includes a 3-D graphic and the codethat created it.

The new MATLAB desktop configured with the Command Window and theLaunch Pad, Workspace Browser, Command History, and Array Editor tools.The data visible in the Array Editor corresponds to the highlighted variablein the Workspace Browser window.

■ Current Directory browser for viewing,maintaining, and searching MATLAB files

■ Enhanced M-file Editor/Debugger for creating, editing, and debugging MATLAB M-files

Page 6: Matlab.pdf

3What’s New for MATLAB 6?

■ New plotting toolbar and menus foreasily creating, editing, and annotatingplot titles, legends, axis labels, freeformtext, arrows, and lines

■ Functions for overlaying plots of basicdata statistics for x and y, such as minimum, maximum, and mean

■ New graphical Property Editor for viewingand modifying any plot or GUI attribute

■ Windows-style page setup for improvedhardcopy output

■ Basic Fitting GUI for computing polyno-mial fits and spline interpolation, withoptional 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

Language and GUI Development Features

■ MATLAB Java interface for calling Java code directly fromMATLAB includes support for creatingand using Java objects, allowing you touse Java libraries directly from MATLAB.

■ GUIDE, a MATLAB tool for GUI prototyping and development, is nowmore responsive, has an intuitive look

and feel, and provides more powerfultools for layout and alignment, propertyviewing and setting, and menu editing.When a new GUI is saved, MATLABcaptures the results in an M-file in astructured outline framework that canserve as the basis for developing anentire application.

■ Function handle data type stores function information for fasterfunction evaluation with feval.

■ New MATLAB add-in for Visual Studiolets you create MATLAB functions (MEX-files) from C and C++ code in the Microsoft® Visual Studio environment.

Advanced Visualization Features

■ Display of 2-D images, surfaces, and volumes as transparent objects,enabling visualization of obscured layers of overlapping data and interior views of closed volumes

■ Camera toolbar and menu options to control the point of view (orbit, tilt, vertical, horizontal); principal axis(scene orientation); scene light; andprojection type

■ OpenGL rendering, offering significantincreases in display speed with graphicshardware

■ Improved performance for large datasets and animations

View of a lit 3-D isosurface with endcaps using the newsmooth3 function to smooth the data. The newcamera control toolbar is visible below the plot toolbar.

Plot Editing, Annotation, and Analysis Features

This 2-D MATLAB graphic tracks CO2concentration over time (measured inyears). Using the Basic Fitting menuoption in the new graphics toolbar Toolsmenu and the Basic Fitting dialog (right),4th and 7th degree polynomial fits havebeen interactively applied to the data.Data compiled by J.M. Barnola et al.,Worldwatch Institute.

Page 7: Matlab.pdf

4 What’s New for MATLAB 6?

Data Access and File Format Enhancements

■ New Import Wizard for easy importing of externaldata from a file into the MATLAB workspace

■ Serial port interface for direct access to peripheraldevices such as modems, printers, and scientific instruments via your computer’s RS-232, RS-485, and RS-422 ports (PC, Solaris, Linux)

■ Importing of Microsoft Excel worksheets■ Improved figure export to other programs, such as

Microsoft Word and PowerPoint (Clipboard via EMF files)■ Importing and exporting of Windows AVI files

(uncompressed only for UNIX) ■ Importing of GIF format data files■ Importing of Windows Icon and Cursor files

(all platforms)■ CCITT Group 3 and 4 fax support for TIFF files

The Import Wizard allows you to preview the contents of data files before importing them. A preview of the list of variables is displayed in the membrane.mat file (left). The data in the variable L(highlighted) is displayed in the window on the right.

Mathematical Computation and Algorithm Enhancements

■ Matrix math in MATLAB now incorpo-rates the well-known LAPACK library(which replaces LINPACK and EISPACK),increasing MATLAB’s speed on computa-tions involving matrices of order severalhundred.

■ FFT functions such as fft and ifftnow rely on the MIT FFTW library,resulting in speedups particularly forcomposite, prime, and large prime factor array lengths.

■ New functions let you write C MEX-filesthat call LAPACK and BLAS directly from MATLAB.

■ Qhull-based functions extend Delaunayfunctionality to three or more dimensions.

■ New griddatan and griddata3functions enable data gridding andhyper-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 lsqrsparse matrix computation functionsnow solve symmetric indefinite and rectangular systems.

■ Faster, more accurate quadrature algorithms now handle singularities.

Page 8: Matlab.pdf

5What’s New for MATLAB 6?

Instrument Control Toolbox 1

PRODUCTS FOR DATA ACQUISITION AND ACCESS

NEW FEATURE HIGHLIGHTS■ Support for:

• GPIB (IEEE-488, HPIB) interfaces from Agilent, CEC, ComputerBoards,IOTech, Keithley, and NationalInstruments

• VISA (Serial, GPIB, VXI, GPIB-VXI) interfaces from Agilent and NationalInstruments

■ Graphical user interfaces for instrumentsetup and communication

■ Reading and writing of binary and ASCII data

■ Event handling for errors, timeout, bytesavailable, data written, and other events

■ Recording of data transferred to andfrom 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 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.

The Instrument Control Toolbox provides tools for communicating with instrumentsand external devices. Two GUIs, instrcreate and instrcomm, allow youto easily configure and control your instruments.

Page 9: Matlab.pdf

6 What’s New for MATLAB 6?

Database Toolbox 2.1

The Database Toolbox allows you to query and exchange data with most ODBC/JDBC databases directly

from MATLAB. Version 2.1 of the Database Toolbox makes it easier to query data and quickly access the

MATLAB report-generation tools. This version performs approximately 100 times faster than version 2.

The Database Toolbox is now available on all platforms for which MATLAB offers Java support.

NEW FEATURE HIGHLIGHTS■ Group qualifier in the Where Clause

dialog makes it easier to interactivelyselect multiple query criteria.

■ Report Generator function enables accessto the MATLAB Report Generator directlyfrom within the Visual Query Builder.

NEW FEATURE HIGHLIGHTS■ Support for ComputerBoards devices, including

hardware that supports analog input, analog output, and digital I/O

■ Data Acquisition Adaptor Kit for developing custom interfaces to data acquisition devices

Data read into MATLAB canbe analyzed and visualizedwhile it is being acquired.Here, a signal from anoscilloscope is visualized ina MATLAB graphics window.

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.

The new Group option in the Where Clause dialog makes it easier to graphically select multiple query criteria.

Page 10: Matlab.pdf

7What’s New for MATLAB 6?

PRODUCTS FOR DATA ANALYSIS AND MATH

Signal Processing Toolbox 5

The Signal Processing Toolbox provides tools for signal and linear system analysis, time series data

modeling, and algorithm development. Version 5 of the Signal Processing Toolbox provides a new

graphical user interface for designing and analyzing digital filters. This interface builds on SPTool,

the toolbox’s original GUI, which contains support for signal viewing and spectral analysis.

NEW FEATURE HIGHLIGHTS■ New GUI-driven Filter Design and

Analysis Tool provides functions forinteractively designing, evaluating, and comparing filters.

■ SPTool can now play a selected portionof a signal to a sound card, eliminatingthe need to create subsets of the signalbefore listening.

■ SPTool offers signal markers withimproved readouts that you can easilymanipulate.

■ FIR filter enhancements include auto-matic order adjustment and improve-ments to remez.

FDATool lets you create and edit lowpass,highpass, bandpass, and bandstop FIRand IIR digital filters. You can graphicallydesign filters from scratch or importpreviously designed filters.

Filter Design Toolbox 2

The Filter Design Toolbox complements the Signal Processing Toolbox by providing advanced filter design

techniques for designing, simulating, and analyzing fixed- and floating-point filters. The functions in the

Filter Design Toolbox can help you determine the effects of fixed-point processing. You can then evaluate

a trade-off between required precision width and available design resources.

NEW FEATURE HIGHLIGHTS■ Provides advanced techniques for designing,

simulating, and analyzing digital filters ■ Simplifies the design of fixed-point filters and

analysis of quantization effects ■ Extends the capabilities of the Signal Processing

Toolbox, adding architectures and design methodsfor complex real-time DSP applications

State trajectories showingnormal behavior and overflowlimit-cycles.

Page 11: Matlab.pdf

8 What’s New for MATLAB 6?

Neural Network Toolbox 4

The Neural Network Toolbox provides generalized versions of the most commonly used network paradigms

and algorithms for neural network design and simulation. Version 4 of the Neural Network Toolbox adds an

intuitive and comprehensive GUI for designing and managing neural networks. This version also contains a

suite of new features, examples, and Simulink blocks to help you use the toolbox in control system applications.

NEW FEATURE HIGHLIGHTS■ GUI tools for:

• Entering, importing, and exporting data

• Creating, initializing, training, and simulating networks

• Visualizing and evaluating network performance

■ New control system examples that illustrate model predictive control, feed-back linearization, and model referenceadaptive control

■ Performance benchmarks for selecting theappropriate algorithm for your application

■ Functions that apply weight and biaslearning rules in both batch and incre-mental mode

The Neural Network user interface allows you to import and export data,as well as create, view, train,and simulate networks.

Control System Toolbox 5

The Control System Toolbox provides an interactive environment for modeling, analyzing, and designing control

systems. Version 5 of the Control System Toolbox introduces the SISO Design Tool, a new GUI that displays root

locus and Bode diagrams. You can use both root locus and frequency design techniques to perform rapid

iterations on compensator design for SISO systems. The enhanced LTI Viewer is now dynamically linked to the

SISO Design Tool. These two GUIs let you design compensators graphically without using the command line.

NEW FEATURE HIGHLIGHTS■ New SISO Design Tool for compensator

design■ Enhanced LTI Viewer with data markers,

better grids, and sharper plots■ Tools for setting preferences and

customizing plots

■ Algorithmic enhancements, includingstability margins and sharper root locus plots

■ Comprehensive new Getting Startedmanual

The SISO Design Tool simplifies the task of designing controllers. You can click-and-drag to move the compensator poles andzeros and then automatically update theopen- and closed-loop response plots.

Page 12: Matlab.pdf

9What’s New for MATLAB 6?

Spline Toolbox 3

The Spline Toolbox provides powerful features for data fitting and visualization and for interpolation and

extrapolation, allowing you to fit a curve or surface through a set of observational data. Version 3 of the

Spline Toolbox gives you easy access to this functionality through a new GUI, as well as features that help

you learn about and work with splines more easily and productively.

NEW FEATURE HIGHLIGHTS■ New graphical user interface allows

you to: • Create and manage various spline

approximations • Add, delete, and move data or knots• Vary parameters that affect a spline fit• View the first or second derivative of

a spline or its error • Save splines to the workspace • Observe the underlying toolbox

commands that generate the spline

■ New command-line option that lets the approximation functions determine the knots

■ Enhanced documentation with anexpanded tutorial and a new glossary

With the new Spline Toolyou can view andcompare multiple splinefits on the same plot.

Statistics Toolbox 3

The Statistics Toolbox includes functions and interactive tools for analyzing historical data, modeling and

simulating systems, developing statistical algorithms, and learning and teaching statistics. Version 3 of the

Statistics Toolbox enhances support for linear models, with new functions for the analysis of variance and

support for additional regression techniques. Also included is new support for nonnormal data using robust

techniques, generalized linear models for a variety of nonnormal distributions, and nonparametric techniques.

NEW FEATURE HIGHLIGHTS■ New linear model functions, including:

• Multivariate ANOVA, with graphicsfunctions for examining data

• Multi-way and nonparametric ANOVA• Analysis of covariance (ANOCOVA)

■ Multiple comparisons of means andother estimates

■ Multiple response surface fitting■ Calculation of simultaneous

confidence bounds■ Support for robust regression and

generalized linear models■ Capability for importing numeric

and text data from tab-delimited files

■ Additional functions for distribution testing and plotting

■ New fractional factorial design generation ■ Multivariate t random number generation

The gplotmatrix function creates a matrixof scatter plots. In this example four measuresof automobile performance are compared: milesper gallon (MPG), acceleration, weight, andhorsepower. You can also use the function togroup variables. In this example, the year ofmanufacture has been added to the analysis.

Page 13: Matlab.pdf

10 What’s New for MATLAB 6?

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.

PRODUCTS FOR APPLICATION DEPLOYMENT

NEW FEATURE HIGHLIGHTS■ Improved optimization of generated

C/C++ code■ Support for the inclusion of MEX-files in

stand-alone applications■ Support for the compilation of

M-files containing:• input calls with no workspace

variable arguments• load/save

• eval calls with no workspace variable arguments

• pause

• Function handles (New MATLAB feature)

■ New MLIB file capability for packagingmultiple 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 pro-cessing applications to C/C++ code

Using the MATLAB add-in for Visual Studio you cancompile, edit, and run M-fileswithin the Microsoft VisualC/C++ environment.

The Compiler Suite lets you automatically convert many MATLAB

applications, like this windplot example, to C and C++.

Page 14: Matlab.pdf

11What’s New for MATLAB 6?

MATLAB Web Server 1.2

The MATLAB Web Server allows you to embed MATLAB math and graphics in your Web applications. Version 1.2

of the MATLAB Web Server contains enhancements that improve performance for NT servers, increase

security, and support the Linux platform.

NEW FEATURE HIGHLIGHTS■ The NT Web Server architecture now

keeps MATLAB sessions open once started, significantly reducing startup time.

■ System administrators can now limit user access (particularly beneficial whenthe Web Server application is operating outside a firewall or directly on the HTTPserver machine).

■ The Web Server can now run on a system whose architecture differs fromthat of the HTTP server machine.

MATLAB Runtime Server 6

The MATLAB Runtime Server allows you to take an existing MATLAB application and turn it into a stand-

alone product that is easy and economical to package and distribute. Version 6 of the MATLAB Runtime

Server supports the latest MATLAB 6 functionality. Additional product and documentation enhancements

make it easier to develop Runtime Server applications.

NEW FEATURE HIGHLIGHTS■ New buildp function generates runtime

p-code for applications automatically. ■ depfun now locates Java class-depend-

ent functions.■ Improved documentation provides more

detailed examples and templates, morecomprehensive descriptions of productfeatures, and additional information onapplication setup.

The Runtime Server lets youconvert any MATLAB applicationto a stand-alone deployableapplication. This Query bySinging example queries 360 songs through patternrecognition. The user triggersthe song-retrieval process bysinging part of the song.

The aeronautical, financial, andmechanical applications shown here are among the many Web-deployableapplications that you can develop withthe MATLAB Web Server.

Page 15: Matlab.pdf

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.

PRODUCTS FOR FINANCE AND ECONOMICS

NEW FEATURE HIGHLIGHTS■ Access to data from Interactive

Data’s Remote Plus■ Access to data from Yahoo!’s

financial Web site, quote.yahoo.com

■ IDC and Yahoo! support incorporated into the Datafeed Toolbox graphical user interface

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.

The treeviewer functiondisplays a diagram of the HJM tree,allowing you to interactively examinethe values on the nodes of the tree.This example shows the prices of a4% bond along the top and bottombranch paths of the HJM price tree.

NEW FEATURE HIGHLIGHTS■ Create and manage the following instrument

portfolios: • Bonds and options on bonds • Fixed rate and floating rate notes • Caps and floors • Vanilla swaps

■ Calculate prices and sensitivities based on theHeath-Jarrow-Morton (HJM) model or on agiven interest rate term structure

■ Perform hedging analysis

In this example, the Datafeed Toolboxinterface is used to make a Bloombergconnection and then request and chartdata for a stock price.

The MathWorks Tel: 508.647.7000 [email protected] 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.

Page 16: Matlab.pdf

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

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

Creating ModelsSimulink provides a complete set of model-

ing tools that you can use to quickly develop

detailed block diagrams of your systems.

Features such as block libraries, hierarchical

modeling, signal labeling, and subsystem

customization provide a powerful set of

capabilities for creating, modifying, and

maintaining block diagrams. These modeling

features, together with Simulink’s compre-

hensive set of predefined blocks, make it

easy to create concise representations of

your systems, regardless of their complexity.

Simulink® 4for modeling, simulation, and analysis of dynamic systems

KEY FEATURES

USABILITY■ Extensive library of predefined blocks

■ Graphical debugger

■ Model Browser for navigating model hierarchies

■ Finder for searching models and libraries

■ Customizable blocks that can incorporate existing

C, Ada, MATLAB, and Fortran code

COMPUTATIONAL SUPPORT■ Linear, nonlinear, continuous-time, discrete-time,

multirate, conditionally executed, mixed-signal,

and hybrid systems

■ Support for matrix signals and operations

■ Bitwise Logical Operator block logically masks, inverts,

or shifts the bits of an unsigned integer signal

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

Throttle Ang.

pi/30

rpmto

rad/s

integrator input

controller output

enable integration

prevent windup

limitoutput

Kp

Proportional Gain

Ki

Integral Gain

T

z-1

Discrete-TimeIntegrator0

2

N

1

Desiredrpm

2

trigger

1

mass(k)z

1

Unit Delay

[0.152]

Init

Trigger

1

mass(k+1)

Page 17: Matlab.pdf

KEY FEATURES (continued)

LARGE MODEL DEVELOPMENT■ Models can be grouped into hierarchies to create a

simplified view of components or subsystems

■ Simulink data objects enable you to create application-

specific MATLAB data types for your Simulink models

■ Simulink Explorer GUI for viewing and editing data

objects

■ Library Browser for convenient block selection

■ Intellectual property protection using S-functions

(requires Real-Time Workshop® 4.0)

■ Simulations can be run from the MATLAB command line,

either interactively or in batch mode

Extensible Block LibrarySimulink 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.

S-FunctionsAn S-function (system-function) is a custom

code module that defines the behavior of a

Simulink block. Simulink provides tem-

plates for creating your own S-functions

using existing or newly-developed code

(C, Ada, Fortran, or MATLAB). Once you

have created an S-function, you can

include it in your model, using Simulink’s

S-function block.

S-functions reduce the time required to

model large-scale systems by allowing you

to incorporate existing code into your

model. Simulink provides multi-port and

multi-rate S-function support to enhance

usability and permit different sample times

(C and MATLAB only).

MasksSimulink’s mask editor allows you to create a

custom user interface, called a mask, for any

subsystem or S-function block. The mask

can include a custom icon, parameter dialog,

online help, and initialization script. Custom

masks allow you to tailor a block’s appearance

and user interface for specific applications.

The Library Browser makes

it easy to navigate through

block libraries and then drag

and drop selected blocks

onto your model.

Page 18: Matlab.pdf

Simulink Data ObjectsSimulink is used in many applications to

create high-fidelity plant models of real-

world systems and to design algorithms to

control these systems. To represent these

systems and algorithms more accurately,

you can use Simulink data objects to define

new MATLAB data types that are specific

to your application and then use them as

parameters and signals in your Simulink

models. You can view and edit all Simulink

data with the Simulink Explorer.

Model Library SupportModel 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.

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.

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.

This feature makes it easy to reuse blocks

across multiple systems, as well as systems with

large numbers of models, and models with

many levels. You can modify a block’s behavior

and its attributes in every model simply by

applying the change to the library source.

Configurable Subsystem BlockA Configurable Subsystem block represents

any block contained in a specified library of

blocks. Using the Configurable Subsystem

block’s dialog box, you can specify which

block in the library it represents. You can

also specify the inputs and outputs of the

selected block.

Configurable Subsystem blocks simplify the

creation of models that represent families

of designs. For example, suppose that you

want to model an automobile that offers a

choice of engines. To model such a design,

you would first create a library of models of

the engine types available with the car. You

would then use a Configurable Subsystem

block in your car model to represent the

choice of engines. To model a particular

variant of the basic car design, you need

only choose the engine type, using the

configurable engine block’s dialog. This

enables you to rapidly swap design choices

in and out of your model.

Short-TimeSpectrum

1

Out

hamming

In

Out

Win

Window

In Out

Normalization

|FFT| ^ 2

MagnitudeFFT

DF2T

Direct-Form IITranspose Filter

1

In

Page 19: Matlab.pdf

Model Navigation ToolsLibrary Browser (Windows only)—provides

a tree-structured view of all block libraries

installed on your system.

Model Browser (Windows only)—enables

you to navigate your model hierarchically,

and open systems directly in your model.

Finder dialog box—enables you to search

Simulink models for objects that satisfy

specified search criteria.

Block diagram zooming—greatly simplifies

model viewing by allowing you to enlarge or

shrink the view.

Scalar and Vector ConnectionsSimulink supports the modeling of single-

input/single-output (SISO) and multi-input/

multi-output (MIMO) systems.

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.

Matrix Signal SupportMany Simulink blocks accept or output

matrix signals. A matrix signal is a two-

dimensional array of signal elements

1

Act.Comd.

Zero-OrderHold

Zero-OrderHold

Zero-OrderHold

Zero-OrderHold

1-exp(-deltat1/Ts)

z-exp(-deltat1/Ts)

Stick Filter

1-exp(-W2*deltat1)

z-exp(-W2*deltat1)

Pitch Sensor Filter

-K-

Ka

Kq

Ki

Kf

T

z-1

Discrete-TimeIntegrator

ActPos

ErrorStopInt

Anti-Wind-Up

1-exp(-deltat1/Tal)

z-exp(-deltat1/Tal)

Alpha Sensor Filter

2

Actuator Pos.

1

States

represented by a matrix. Each matrix

element represents the value of the corre-

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

by-element and matrix multiplication and

inversion of inputs.

• The Gain block supports matrix and

element-by-element multiplication of the

input signal by a gain factor. Both input

signals and gain factors can be matrices.

You can use Simulink’s Mux and Demux

blocks to multiplex matrix signals. For

example, you can:

• Generate signal buses by feeding matrixsignals into Mux blocks along with vectoror scalar signals

• Manipulate the elements of a signal busby splitting it into its components using a Demux block, and then connecting thedemuxed signals to nonvirtual blocks,such as the Gain block

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

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

Page 20: Matlab.pdf

Simulink debugger has both graphical

and command-line user interfaces.

State-of-the-Art Integration AlgorithmsThe 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 continuous-

time (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 alge-

braic loops. An algebraic constraint block

facilitates the solution of a system in which

an algebraic constraint applies to the govern-

ing 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 SubsystemsWith 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 subsys-

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

cessing speed within multimode systems.

Event-Based Simulation SupportSimulink is tightly integrated with Stateflow®,

the MathWorks’ solution for modeling event-

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.

SimulationAfter building your block diagram in

Simulink, you can debug it using the interac-

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

Cmd.

Act. Pos.

Act. Meas.[Non-Linear]

Non-Linear Actuator Subsystem

Cmd.

Act. Pos.

Act. Meas.

[Linear]

Linear Actuator Subsystem

Template

Cmd.

Act. Pos.

Act. Meas.

Configurable Actuator

Page 21: Matlab.pdf

driven behavior. The seamless interaction

between Simulink and Stateflow gives you the

ability to model and simulate your system’s

dynamic and event-driven behavior as a

single, integrated system. (For example,

Simulink and Stateflow share an integrated

Finder.) Designers of automotive, aerospace,

telecommunications, and many other types of

embedded systems have a complete solution

to perform faster, more accurate and extensive

simulations of complex, large-scale systems.

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.

Data TypingSimulink supports complex numbers for

basic blocks and complex/real conversions.

In addition, the Data Type Conversion block

allows you to convert a signal of one type

(such as a float) to a signal of another type

(int32, for example).

Many of the blocks in Simulink support

several data types. The ability to specify the

data types of a model’s signal and block

parameters is particularly useful in real-

time applications such as microcontrollers

and DSPs. With this capability, you can

specify the optimal data types required to

represent signals, block parameters, and

mathematical operations exactly as they are

represented on these devices. Additionally,

by choosing the appropriate data types for

your model’s signals and parameters, you

can dramatically increase the performance

and decrease the size of code generated

from the model. Supported data types are

double-precision floating point; single-pre-

cision floating point; signed and unsigned

8-, 16-, and 32-bit integers; and Boolean.

Audits and Revision HistoriesSimulink 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.

AnalysisSimulink includes many features for

detailed system analysis. Key capabilities

include: linearization, equilibrium point

determination, animation, parameter

optimization, and parametric analysis.

Extracting Linear ModelsThe dynamics of nonlinear block diagrams

can be approximated through linearization,

enabling you to apply design techniques

that require linear model representations.

You can use Simulink’s linmod function to

obtain linear state-space models from your

block diagrams.

AnimationSimulink provides immediate access to

MATLAB’s powerful 2-D and 3-D graphics

and animation capabilities. You can use

MATLAB to enhance your visual displays

and gain deeper insight into your system’s

behavior as the simulation progresses.

Integration with MATLABBecause Simulink is built on top of MATLAB,

it provides a unique development environment.

This system allows you to run simulations

either interactively, using Simulink’s

graphical interface, or systematically, by

running sets of experiments in batch mode

from the MATLAB command line. You can

then generate test vectors and analyze the

results collectively.

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

tions, such as the DSP Blockset,

the Fixed-Point Blockset, the Power

System Blockset, and the

Communications Blockset. ■

9320v02 10/00

For demos, application examples, tutorials, user stories, and pricing:

•Visit www.mathworks.com

•Contact The MathWorks directly

US & Canada 508-647-7000

Benelux +31 (0)182 53 76 44France +33 (0)1 41 14 6714Germany +49 (0)89 995901 0Spain +34 93 362 13 00Switzerland +41 (0)31 954 20 20UK +44 (0)1223 423 200

Visit www.mathworks.com to obtaincontact information for authorizedMathWorks representatives in countriesthroughout Asia Pacific, Latin America,the Middle East, Africa, and the rest of Europe.

Tel: 508.647.7000 [email protected] www.mathworks.com

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

Page 22: Matlab.pdf

KEY FEATURES

■ LTI Viewer, an interactive GUI for analyzing and comparing

linear-time-invariant (LTI) systems

■ SISO Design Tool, an interactive GUI for analyzing and tuning

single-input/single-output (SISO) feedback control systems

■ GUI suite for setting preferences and properties, giving you

complete control over the visualization of time and frequency plots

■ Specialized data structures, called LTI objects, for concisely

representing transfer function, state-space, zero/pole/gain,

and frequency response data model formats

■ Support for multi-input/multi-output (MIMO) systems, continu-

ous-time and sampled-data systems, and systems with time delays

■ Functions and operators for connecting LTI models with

complex block diagrams (series, parallel, and feedback

connections)

■ Support for a variety of discrete-to-continuous conversion

methods

■ Functions for plotting the time and frequency responses of

systems and comparing several systems with a single command

■ Tools for classical and modern control design techniques,

including root locus, loop shaping, pole placement, and

LQR/LQG regulation

The Control System Toolbox builds on the

foundation of MATLAB® to provide special-

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

Control System Toolbox 5for designing and analyzing automatic control systems

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.

A linked LTI Viewer

displays open- and

closed-loop response plots.

Page 23: Matlab.pdf

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 CharacteristicsThe Control System Toolbox contains com-

mands to query model characteristics such

as the I/O dimensions, poles, zeros, and DC

gain. These commands apply to both contin-

uous- and discrete-time models.

Interconnecting Linear ModelsYou 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 DesignSome tasks lend themselves to graphical

manipulation, while others benefit from the

flexibility of the command line. The Control

System Toolbox is designed to accommodate

both approaches, providing both GUIs and a

complete set of command-line functions for

model analysis and design.

Analyzing Models Graphically Using the LTI ViewerThe Control System Toolbox LTI Viewer is a

GUI that simplifies the analysis of linear, time-

invariant systems. You use the LTI Viewer to

view and compare the response plots of several

linear models at the same time. You can gener-

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

With the LTI Viewer, you can easily graph the responses of one or several systems—all in one window. Step and impulse

plots, pole/zero plots, and all frequency-domain responses (Bode, Nyquist, Nichols, and singular values) are available in the

LTI Viewer. The LTI Viewer allows you to display important response characteristics, such as stability margins on the plots using

data markers.

With the Control System Toolbox, you can

model linear-time-invariant (LTI) systems

in transfer function, zero/pole/gain, or

state-space form. You can manipulate both

continuous-time and discrete-time systems

and convert between various model repre-

sentations. You can compute and graph time

responses, frequency responses, and root loci.

Other functions let you perform pole place-

ment, optimal control, and estimation. The

Control System Toolbox is open and extensi-

ble, allowing you to create custom M-files to

suit your particular application.

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

Page 24: Matlab.pdf

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 Type—changes the plot type

• Systems—selects or deselects any of

the models loaded in the LTI Viewer

• Characteristics—displays key response

characteristics and parameters

• Zoom—zooms in and out of plot regions

• Grid—adds grids to your plots

• Properties—opens the Property Editor,

where you can customize plot attributes

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.

Analyzing Models Using the Command LineThe LTI Viewer is suitable for a wide range

of applications where a GUI-driven environ-

ment is desirable. For situations that require

programming, customized plots, or the inclu-

sion of data unrelated to your LTI models, the

Control System Toolbox provides command-

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

Designing Compensators Using SISO Design ToolThe 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 tech-

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

ately see the results in the LTI Viewer. When

you make a change in the compensator, the

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.

Feedback Structure

Open-Loop Bode Diagram

Gain Margin

Phase Margin

Current Compensator

Root Locus

Status Bar

Page 25: Matlab.pdf

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

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

loop system (blue).

Right-click menus

simplify customizations

of plots and GUIs

G = ss(tf(100,[1 1 100])) % state-space plant model

Klqr = lqry(G,10,1) % design feedback gain matrix

Kest = kalman(G(:,[1 1]),1, 0.01) % Kalman estimator design

F = lqgreg(Kest, Klqr) % combine regulator and estimator

clsys = feedback(G,F,+1) % form closed-loop system

impulse(G, 'r', clsys, 'b') % generate and plot impulse response

100

F(s)

yd

u

++

LQG Regulator

+

+

n

yn

s + s + 1002

Page 26: Matlab.pdf

designing optimal dynamic regulators. It

enables you to trade off regulation perform-

ance and control effort and take into account

process disturbances and measurement

noise.]

Setting Plot Preferences and PropertiesThe Control System Toolbox provides three

GUIs that give you complete control over

the visualization of time and frequency plots

generated by the toolbox:

• Toolbox Preferences—global options

that you can save from session to session

• Tool Preferences—options set for a

particular instance of the LTI Viewer or

SISO Design Tool

• Plot Properties—options for customizing

a given response plot

Documentation and DemonstrationsThe Control System Toolbox provides exten-

sive 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, includ-

ing tutorial demos (Getting Started, Model

Analysis, Do’s and Don’ts); interactive demos

(RLC circuit, stability margins, discretization);

and detailed case studies of six applications

(DC motor, feedback amplifier, disk drive,

jet autopilot, steel mill, and process control).

Related ProductsThe MathWorks provides several products

that are especially relevant to the tasks that

you can perform with the Control System

Toolbox. These include:

• Simulink®—a comprehensive environment

for modeling, simulating, and analyzing

dynamic systems in a block diagram

format

• Nonlinear Control Design Blockset—an optimization-based approach to control

system design that tunes parameters based

on user-defined, time-domain performance

constraints

• System Identification Toolbox—tools for

building linear models of dynamic systems

from measured input/output data

• Fuzzy Logic Toolbox—tools for

developing fuzzy logic algorithms

• Robust Control Toolbox—tools for the

modeling, analysis, and design of “robust”

multivariable feedback control systems

using H∞ techniques

• µ-Analysis and Synthesis Toolbox—

computational algorithms for the structured

singular value, µ, applicable to robustness

and performance analysis for systems with

modeling and parameter uncertainties

• Linear Matrix Inequality Toolbox—

convex optimization algorithms for

solving linear matrix inequalities (LMI),

with application to robust control, multi-

objective control, and gain scheduling

• Model Predictive Control Toolbox—

a complete set of tools for implementing

model predictive control strategies ■

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

erty editors for further customization.

Page 27: Matlab.pdf

Tel: 508.647.7000 [email protected] 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.

Sample Commands

Generalctrlpref Set Control System Toolbox

preferences

Creating Linear Modelstf Create a transfer function

modelzpk Create a zero/pole/gain modelss, dss Create a state-space modelfrd Create a frequency response

data modelset Set/modify properties of LTI

models

Data Extractiontfdata Extract numerator(s) and

denominator(s)zpkdata Extract zero/pole/gain datassdata Extract state-space matricesget Access values of LTI model

properties

Conversionsss Conversion to state-spacezpk Conversion to zero/pole/gaintf Conversion to transfer func-

tionfrd Conversion to frequency datac2d Continuous-to-discrete

conversiond2c Discrete-to-continuous

conversiond2d Resample discrete-time model

System Interconnectionsappend Group LTI systems by

appending inputs andoutputs

parallel Generalized parallel connectionseries Generalized series connectionfeedback Feedback connection of two

systemslft Generalized feedback

inter-connection connect Derive state-space model from

block diagram description

Model Dynamicspole System poleszero System (transmission) zerospzmap Pole-zero map

damp Natural frequency and damping of system poles

dcgain DC (low frequency) gainnorm Norms of LTI systemscovar Covariance of response to

white noise

Time-Domain Analysisltiview Response analysis GUI

(LTI Viewer)step Step responseimpulse Impulse responseinitial Response of state-space

system with given initial statelsim Response to arbitrary inputs

Frequency-Domain Analysisltiview Response analysis GUI

(LTI Viewer)bode Bode diagrams of the

frequency responsesigma Singular value frequency plotnyquist Nyquist plotnichols Nichols plotmargin Gain and phase marginsallmargin All crossover frequencies and

related gain/phase marginsfreqresp Frequency response over a

frequency grid

Classical Design sisotool SISO design GUI (root locus

and loop shaping techniques)rlocus Evans root locus

Pole Placementplace MIMO pole placementestim Form estimator given

estimator gainreg Form regulator given state-

feedback and estimator gains

LQR/LQG Designlqr, dlqr Linear-quadratic (LQ) state-

feedback regulatorlqry LQ regulator with output

weightinglqrd Discrete LQ regulator for

continuous plantkalman Kalman estimatorkalmd Discrete Kalman estimator

for continuous plant

State-Space Modelsrss, drss Random stable state-

space modelsss2ss State coordinate

transformationctrb, obsv Controllability and

observability matricesgram Controllability and

observability gramiansminreal Minimal realization and

pole/zero cancellationssbal Diagonal balancing of

state-space realizationsbalreal Gramian-based

input/output balancingmodred Model state reduction

Time Delaystotaldelay Total delay between each

input/output pairdelay2z Replace delays by poles at

z=0 or FRD phase shiftpade Pade approximation of

time delays

Matrix Equation Solverslyap Solve continuous Lyapunov

equationsdlyap Solve discrete Lyapunov

equationscare Solve continuous algebraic

Riccati equationsdare Solve discrete algebraic

Riccati equations

For demos, application examples, tutorials, user stories, and pricing:

•Visit www.mathworks.com

•Contact The MathWorks directly

US & Canada 508-647-7000

Benelux +31 (0)182 53 76 44France +33 (0)1 41 14 6714Germany +49 (0)89 995901 0Spain +34 93 362 13 00Switzerland +41 (0)31 954 20 20UK +44 (0)1223 423 200

Visit www.mathworks.com to obtaincontact information for authorizedMathWorks representatives in countriesthroughout Asia Pacific, Latin America,the Middle East, Africa, and the rest of Europe.

Page 28: Matlab.pdf

KEY FEATURES

■ Graphical user interface (GUI) for creating, training, and simulating

your neural networks

■ Support for the most commonly used supervised and unsupervised

network architectures

■ A comprehensive set of training and learning functions

■ A suite of Simulink® blocks, as well as documentation and demonstra-

tions 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

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

hensive support for many proven network

paradigms, as well as a graphical user inter-

face that allows you to design and manage

your networks. The toolbox’s modular, open,

and extensible design simplifies the creation

of customized functions and networks.

Working with Neural NetworksInspired 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 train-

ing the network according to a specified

learning rule until it properly performs the

desired task.

The MathWorks

Neural Network Toolbox 4 for designing and simulating neural networks

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

Page 29: Matlab.pdf

trainb Batch training with weight and bias learning rules

trainbfg BFGS quasi-Newton backpropagation

trainbr Bayesian regularization

trainc Cyclical order incremental update

traincgb Powell-Beale conjugate gradient backpropagation

traincgf Fletcher-Powell conjugate gradient backpropagation

traincgp Polak-Ribiere conjugate gradient backpropagation

traingd Gradient descent backpropagation

traingda Gradient descent with adaptive learning rate (lr) backpropagation

traingdm Gradient descent with momentum backpropagation

traingdx Gradient descent with momentum & adaptive lr backpropagation

trainlm Levenberg-Marquardt backpropagation

trainoss One step secant backpropagation

trainr Random order incremental update

trainrp Resilient backpropagation (Rprop)

trains Sequential order incremental update

trainscg Scaled conjugate gradient backpropagation

Because neural networks require intensive

matrix computations, MATLAB provides a

natural framework for rapidly implement-

ing neural networks and for studying their

behavior and application.

Neural Network Toolbox GUI This tool lets you import potentially large

and complex data sets. The GUI also allows

you to create, initialize, train, simulate, and

manage your networks. Simple graphical

representations allow you to visualize and

understand network architecture.

Supported Network ArchitecturesSupervised 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 non-

linear 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

you to specify class boundaries and the

granularity of classification.

Unsupervised NetworksUnsupervised 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 self-

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

cally adjust the network’s weights and biases.

The training function dictates a global

algorithm that affects all the weights and

biases of a given network. The learning

function can be applied to individual weights

and biases within a network.

Supported Training Functions

Page 30: Matlab.pdf

learncon Conscience bias learning function

learngd Gradient descent weight/bias learning function

learngdm Gradient descent with momentum weight/bias learning function

learnh Hebb weight learning function

learnhd Hebb with decay weight learning rule

learnis Instar weight learning function

learnk Kohonen weight learning function

learnlv1 LVQ1 weight learning function

learnlv2 LVQ2 weight learning function

learnos Outstar weight learning function

learnp Perceptron weight and bias learning function

learnpn Normalized perceptron weight and bias learning function

learnsom Self-organizing map weight learning function

learnwh Widrow-Hoff weight and bias learning rule

Control System ApplicationsNeural 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 lineariza-

tion, and model reference adaptive control.

Model Predictive Control ExampleThe following example shows the model

predictive control of a continuous stirred

tank reactor (CSTR). This controller creates

a neural network model of a nonlinear plant

to predict future plant response to potential

control signals. An optimization algorithm

then computes the control signals that

optimize future plant performance.

You can incorporate neural network control

blocks included in the toolbox into your

existing Simulink models. By changing the

parameters of these blocks you can tailor the

network’s performance to your application.

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

X(2Y) Graph

Random Reference

Plant(Continuous Stirred Tank Reactor)

PlantOutput

Reference

ControlSignal

Optim.

NNModel

NN Predictive Controller

Clock

Flow Rate Concentration

Supported Learning Functions

Page 31: Matlab.pdf

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.

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

Pre- and Post-Processing FunctionsPre-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 deviationnormalizes the mean and standard

deviation of the training set.

Improving GeneralizationImproving the network’s ability to generalize

helps prevent overfitting, a common problem

in neural network design. Overfitting occurs

when a network has memorized the training

set but has not learned to generalize to

new inputs. Overfitting produces a relatively

small error on the training set but will

produce a much larger error when new data

is presented to the network.

The Neural Network Toolbox provides

two solutions to improve generalization:

• Regularization modifies the network’s

performance function, the measure of

error that the training process minimizes.

By changing it to include the size of the

weights and biases, training produces a

network that not only performs well with

the training data, but produces smoother

behavior when presented with new data.

• Early stopping is a technique that uses two

different data sets: the training set, which is

used to update the weights and biases, and

the validation set, which is used to stop

training when the network begins to overfit

the data.

Documentation and ExamplesThe Neural Network Toolbox User’s Guide

was written by Professor Emeritus Howard

Demuth and Mark Beale, developers of the

Neural Network Toolbox and authors, with

Professor Martin Hagen, of Neural Network

Design. The User’s Guide is of textbook

quality and provides a thorough treatment

of neural network architectures, paradigms,

and neural network applications. It also

includes a tutorial and application examples.

Additional demonstrations and application

examples are included with the product.

1

y{1}

a{2}

a{1}

p{1}

a{1}

a{2}

a{3}

Layer 3

p{1}

a{1} a{2}

Layer 2

p{1} a{1}

Layer 1

a{2}

a{1}

1

p{1}

1

a{2}tansignetsum

bias

b{2}

weight

LW{2,1}

weight

IW{2,1}

TDL

Delays 2

TDL

Delays 1

2

a{1}

1

p{1}

For demos, application examples, tutorials, user stories, and pricing:

•Visit www.mathworks.com

•Contact The MathWorks directly

US & Canada 508-647-7000

Benelux +31 (0)182 53 76 44France +33 (0)1 41 14 6714Germany +49 (0)89 995901 0Spain +34 93 362 13 00Switzerland +41 (0)31 954 20 20UK +44 (0)1223 423 200

Visit www.mathworks.com to obtaincontact information for authorizedMathWorks representatives in countriesthroughout Asia Pacific, Latin America,the Middle East, Africa, and the rest of Europe.

The MathWorks Tel: 508.647.7000 [email protected] www.mathworks.com

Page 32: Matlab.pdf

The MathWorks

KEY FEATURES■ A comprehensive set of signal and linear system models

■ Tools for analog filter design

■ Tools for Finite Impulse Response (FIR) and Infinite Impulse

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

■ The most widely used transforms, such as fast Fourier

transform (FFT) and discrete cosine transform (DCT)

■ Methods for spectrum estimation and statistical signal processing

■ Functions for parametric time-series modeling

■ Routines for waveform generation, including a Gaussian pulse

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

■ Data windowing algorithms

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

opment.

The Signal Processing Toolbox is the ideal

environment for signal analysis and DSP

algorithm development. It uses industry-

tested signal processing algorithms that

have been carefully chosen and imple-

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

system 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, real-

time control, finance, medicine, and other

applications.

FDATool (above) is a built-in GUI that lets you design many types

of FIR and IIR filters. You select the filter types from the available

methods in the GUI. This diagram shows the GUI with Filter Design

Toolbox installed. The figure at left shows an annotatable print

preview of the filter’s magnitude response.

Page 33: Matlab.pdf

Sample Functions

Filter Analysisabs Magnitude

angle Phase angle

freqs Laplace transform requency response

freqspace Frequency spacing forfrequency response.

freqz Z-transform frequencyresponse

freqzplot Plot frequency responsedata

grpdelay Group delay

impz Discrete impulseresponse

unwrap Unwrap phase

zplane Discrete pole-zero plot

Filter Implementationconv Convolution

conv2 2-D convolution

deconv Deconvolution

fftfilt Overlap-add filterimplementation

filter Filter implementation

filter2 Two-dimensional digitalfiltering

filtfilt Zero-phase version of filter

filtic Determine filter initialconditions

latcfilt Lattice filter implemen-tation

medfilt1 1-Dimensional medianfiltering

sgolayfilt Savitzky-Golay filterimplementation

sosfilt Second-order sections(biquad) filter imple-mentation

upfirdn Up sample, FIR filter,down sample

FIR Filter Designconvmtx Convolution matrix

cremez Complex and nonlinearphase equiripple FIRfilter design

fir1 Window based FIRfilter design - low, high,band, stop, multi

fir2 FIR arbitrary shapefilter design using the frequency samplingmethod

fircls Constrained LeastSquares filter design –arbitrary response

fircls1 Constrained LeastSquares FIR filter design– low and highpass

firls Optimal least-squaresFIR filter design

firrcos Raised cosine FIR filter design

intfilt Interpolation FIR filter design

kaiserord Kaiser window designbased filter order estimation

remez Optimal Chebyshev-norm FIR filter design

remezord Remez design basedfilter order estimation

sgolay Savitzky-Golay FIRsmoothing filter design

IIR Digital Filter Designbutter Butterworth filter design

cheby1 Chebyshev type I filterdesign

cheby2 Chebyshev type II filterdesign

ellip Elliptic filter design

maxflat Generalized Butterworthlowpass filter design

yulewalk Yule-Walker filter design

IIR Filter Order Estimationbuttord Butterworth filter order

estimation

cheb1ord Chebyshev type I filterorder estimation

cheb2ord Chebyshev type II filterorder estimation

ellipord Elliptic filter order estimation

Analog Lowpass Filter Prototypesbesselap Bessel filter prototype

buttap Butterworth filter prototype

cheb1ap Chebyshev type I filterprototype (passbandripple)

cheb2ap Chebyshev type II filterprototype (stopbandripple)

ellipap Elliptic filter prototype

Analog Filter Designbesself Bessel analog filter

design

butter Butterworth filter design

cheby1 Chebyshev type I filterdesign

cheby2 Chebyshev type II filterdesign

ellip Elliptic filter design

Analog Filter Transformationlp2bp Lowpass to bandpass

analog filter transformation

lp2bs Lowpass to bandstopanalog filter transformation

lp2hp Lowpass to highpassanalog filter transformation

lp2lp Lowpass to lowpassanalog filter transformation

Filter Discretizationbilinear Bilinear transformation

with optional prewarping

impinvar Impulse invarianceanalog to digital conversion

Linear System Transformations

latc2tf Lattice or lattice ladderto transfer function conversion

polystab Polynomial stabilization

polyscale Scale roots of polynomial

Page 34: Matlab.pdf

residuez Z-transform partial frac-tion expansion

sos2ss Second-order sections tostate-space conversion

sos2tf Second-order sections totransfer function con-version

sos2zp Second-order sections tozero-pole conversion

ss2sos State-space to second-order sectionsconversion

ss2tf State-space to transferfunction conversion

ss2zp State-space to zero-poleconversion

tf2latc Transfer function tolattice or lattice ladderconversion

tf2sos Transfer function tosecond-order sectionsconversion

tf2ss Transfer function tostate-space conversion

tf2zp Transfer function tozero-pole conversion

zp2sos Zero-pole to second-order sectionsconversion

zp2ss Zero-pole to state-spaceconversion

zp2tf Zero-pole to transferfunction conversion

Windows

bartlett Bartlett window

blackman Blackman window

boxcar Rectangular window

chebwin Chebyshev window

hamming Hamming window

hann Hanning window

kaiser Kaiser window

triang Triangular window

Transformsczt Chirp-z transform

dct Discrete cosine transform

dftmtx Discrete Fourier transform matrix

fft Fast Fourier transform

fft2 2-D fast Fourier transform

fftshift Swap vector halves

hilbert Discrete-time analyticsignal via Hilbert transform

idct Inverse discrete cosinetransform

ifft Inverse fast Fouriertransform

ifft2 Inverse 2-D fast Fouriertransform

Cepstral Analysis

cceps Complex cepstrum

icceps Inverse complex cepstrum

rceps Real cepstrum andminimum phase reconstruction

Statistical Signal Processing and Spectral Analysis

cohere Coherence function

estimatecorrcoef Correlation coefficients

corrmtx Autocorrelation matrix

cov Covariance matrix

csd Cross spectral density

pburg Power spectral densityestimate via Burg'smethod

pcov Power spectral densityestimate via the covari-ance method

peig Power spectral densityestimate via the eigen-vector method

periodogram Power spectral densityestimate via the periodogram method

pmcov Power spectral densityestimate via the modified covariancemethod

pmtm Power spectral densityestimate via theThomson multitapermethod

pmusic Power spectral densityestimate via the MUSICmethod

pwelch Power spectral densityestimate via Welch'smethod

pyulear Power spectral densityestimate via the Yule-Walker AR Method

rooteig Sinusoid frequency andpower estimation via theeigenvector algorithm

rootmusic Sinusoid frequency andpower estimation via the MUSIC algorithm

tfe Transfer function estimate

xcorr Cross-correlation function

xcorr2 2-D cross-correlation

xcov Covariance function

Parametric Modeling

arburg AR parametric modelingvia Burg's method

arcov AR parametric modelingvia covariance method

armcov AR parametric modelingvia modified covariancemethod

aryule AR parametric modelingvia the Yule-Walkermethod

invfreqs Analog filter fit to frequency response

invfreqz Discrete filter fit to frequency response

prony Prony's discrete filter fit to time response

stmcb Steiglitz-McBride iteration for ARMAmodeling

Page 35: Matlab.pdf

Linear Predictionac2rc Autocorrelation

sequence to reflectioncoefficients conversion

ac2poly Autocorrelationsequence to predictionpolynomial conversion

is2rc Inverse sine parametersto reflection coefficientsconversion

lar2rc Log area ratios to reflec-tion coefficientsconversion

levinson Levinson-Durbin recursion

lpc Linear predictive coefficients using auto-correlation method

lsf2poly Line spectral frequenciesto prediction polyno-mial conversion

poly2ac Prediction polynomialto autocorrelationsequence conversion

poly2lsf Prediction polynomialto line spectral frequen-cies conversion

poly2rc Prediction polynomialto reflection coefficientsconversion

rc2ac Reflection coefficients toautocorrelationsequence conversion

rc2is Reflection coefficients toinverse sine parametersconversion

rc2lar Reflection coefficients to log area ratios conversion

rc2poly Reflection coefficients toprediction polynomialconversion

rlevinson Reverse Levinson-Durbin recursion

schurrc Schur algorithm

Multirate Signal Processingdecimate Resample data at a lower

sample rate

interp Resample data at ahigher sample rate

interp1 General 1-D interpolation. (MATLABToolbox)

resample Resample sequence with new sampling rate

spline Cubic spline interpolation

upfirdn Up sample, FIR filter,down sample

Waveform Generation

chirp Swept-frequency cosinegenerator

diric Dirichlet (periodic sinc)function

gauspuls Gaussian RF pulse generator

gmonopuls Gaussian monopulsegenerator

pulstran Pulse train generator

rectpuls Sampled aperiodic rectangle generator

sawtooth Sawtooth function

sinc Sinc or sin(pi*x)/(pi*x)function

square Square wave function

tripuls Sampled aperiodic triangle generator

vco Voltage controlled oscillator

Specialized Operationsbuffer Buffer a signal vector

into a matrix of dataframes

cell2sos Convert cell array tosecond-order-sectionmatrix

cplxpair Order vector intocomplex conjugate pairs

demod Demodulation for communications simulation

dpss Discrete prolate spheroidal sequences(Slepian sequences)

eqtflength Equalize the length of a discrete-time transfer function

modulate Modulation for communications simulation

seqperiod Find minimum-lengthrepeating sequence in a vector

sos2cell Convert second-order-section matrix to cellarray

specgram Spectrogram, for speechsignals

stem Plot discrete datasequence

strips Strip plot

udecode Uniform decoding ofthe input

uencode Uniform quantizationand encoding of theinput into N-bits

Graphical User Interfaces

fdatool Filter Design andAnalysis Tool

sptool Signal Processing Tool

Page 36: Matlab.pdf

Signal and Linear System ModelsThe Signal Processing Toolbox provides a

broad range of models for representing

signals and linear time-invariant systems,

allowing you to choose the method that

best suits your application, including

representations for transfer functions state

space, and zero-pole-gain. The toolbox

also includes functions for transforming

models from one representation to another.

Filter DesignThe 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 multi-

band filters such as Butterworth, Chebyshev,

elliptic, Yule-Walker, window-based, least-

squares, and Parks-McClellan. The filter

structures available include the direct forms

I and II, lattice, lattice-ladder, and second-

order sections. You can comment among the

various realizations with tools provided.

Spectral AnalysisThe Signal Processing Toolbox provides

unsurpassed facilities for frequency-domain

analysis and spectral estimation. Several of

these methods are based on a highly opti-

mized FFT. The toolbox includes functions

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.

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

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:

• Access most FIR and IIR filter design

methods in the toolbox using a

simplified, graphical interface

• 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

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-40

-30

-20

-10

0

10

20

30

40

Power Spectral Density Estimates for a 4th Order AR Model

Normalized Angular Frequency (∗π rads/sample)

Pow

er S

pect

ral D

ensi

ty (

dB /

rads

/sam

ple)

MUSIC Yule AR Burg Welch MTM CovarianceMod Covar

Spectral analysis of a signal

using a range of parametric and

nonparametric techniques.

SPTool’s Filter Designer includes a Pole/Zero editor

that lets you design a filter through the graphical

placement of poles and zeroes. The Filter Viewer

lets you view all characteristics of the filter.

Page 37: Matlab.pdf

SPTool is a suite of GUI tools providing

access to many of the signal, filter, and

spectral analysis functions that helps you:

• Measure and analyze the time-domain

information of one or more signals and

send audio signal to the PC’s sound card

• Design and edit FIR and IIR filters

of various lengths and types and with

standard (lowpass, highpass, bandpass,

bandstop, and multiband) configura-

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

An Interactive DemoThe Signal Processing Toolbox provides

specgramdemo, a user-friendly GUI that

interactively calculates a signal’s 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

• A crosshair locator that locates individual

data points on the spectrogram

You can evaluate time/frequency informa-

tion in the spectrogram by using the signal

panner or the crosshair locator. This will

allow you to locate data points in the spec-

trogram. They will display and interactively

update a frequency slice of the input signal,

a time slice of signal, and a readout of time

and frequency values.

You can call the specgramdemo from

the MATLAB command line by typing

specgramdemo(y,FS) where y is the

input signal and Fs is the signal’s sampling

rate. Context-sensitive help is available

for specgramdemo.

Product RequirementsThe Signal Processing Toolbox runs on all

MathWorks supported platforms. It requires

MATLAB 6. ■

The MathWorks Tel: 508.647.7000 [email protected] www.mathworks.com 9317v03 11/00

© 2000 by The MathWorks, Inc. MATLAB, Simulink, Stateflow, Handle Graphics, and Real-Time Workshop are registered trademarks, and Target Language Compiler is a trademark of The MathWorks, Inc. Other product or brand names are trademarks or registered trademarks of their respective holders.

Specgramdemo is a user-friendly GUI that provides interactive

calculations of a signal’s time-frequency distribution.

For demos, application examples, tutorials, user stories, and pricing:

•Visit www.mathworks.com

•Contact The MathWorks directly

US & Canada 508-647-7000

Benelux +31 (0)182 53 76 44France +33 (0)1 41 14 6714Germany +49 (0)89 995901 0Spain +34 93 362 13 00Switzerland +41 (0)31 954 20 20UK +44 (0)1223 423 200

Visit www.mathworks.com to obtaincontact information for authorizedMathWorks representatives in countriesthroughout Asia Pacific, Latin America,the Middle East, Africa, and the rest of Europe.

Page 38: Matlab.pdf

Wavelets PacketsThe wavelet packets method is a generalization of wavelet decompo-

sition 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 Best level tree (wavelet packet)

besttree Best tree (wavelet packet)

entrupd Entropy update (wavelet packet)

wentropy Entropy (wavelet packet)

wp2wtree Extract wavelet tree from wavelet packet tree

wpcoef Wavelet packet coefficients

wpcutree Cut wavelet packet tree

wpdec Wavelet packet decomposition 1-D

wpdec2 Wavelet packet decomposition 2-D

wpfun Wavelet packet functions

wpjoin Recompose wavelet packet

wprcoef Reconstruct wavelet packet coefficients

wprec Wavelet packet reconstruction 1-D

wprec2 Wavelet packet reconstruction 2-D

wpsplt Split (decompose) wavelet packet

Discrete Stationary Wavelet Transforms

iswt Inverse discrete stationary wavelet transform 1-D

iswt2 Inverse discrete stationary wavelet transform 2-D

swt Discrete stationary wavelet transform 1-D

swt2 Discrete stationary wavelet transform 2-D

De-noising and Compression for Signals and Images

The following functions specify coefficients and thresholds for de-

noising and compression and perform de-noising and compression

using wavelets or wavelet packets:

ddencmp Default values for de-noising or compression

thselect Threshold selection for de-noising

wbmpen Penalized threshold for wavelet 1-D or 2-D de-noising

wdcbm Thresholds for wavelet 1-D using Birge-Massart strategy

wdcbm2 Thresholds for wavelet 2-D using Birge-Massart strategy

wden Automatic 1-D de-noising using wavelets

wdencmp De-noising or compression using wavelets

wnoise Generate noisy wavelet test data

wnoisest Estimate noise of 1-D wavelet coefficients

wpbmpen Penalized threshold for wavelet packet de-noising

wpdencmp De-noising or compression using wavelet packets

wpthcoef Wavelet packet coefficients thresholding

wthcoef Wavelet coefficient thresholding 1-D

wthcoef2 Wavelet coefficient thresholding 2-D

wthresh Perform soft or hard thresholding

wthrmngr Threshold settings manager

Utilities and Other FunctionsThe 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.

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.

Page 39: Matlab.pdf

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.

For demos, application examples, tutorials, user stories, and pricing:

•Visit www.mathworks.com

•Contact The MathWorks directly

US & Canada 508-647-7000

Benelux +31 (0)182 53 76 44France +33 (0)1 41 14 6714Germany +49 (0)89 995901 0Spain +34 93 362 13 00Switzerland +41 (0)31 954 20 20UK +44 (0)1223 423 200

Visit www.mathworks.com to obtaincontact information for authorizedMathWorks representatives in countriesthroughout Asia Pacific, Latin America,the Middle East, Africa, and the rest of Europe.

Wavelet Analysis ApplicationsThe 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

Graphical User InterfaceThe 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 ContinuousWavelet 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 per-

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

cient selection strategies

• Signal Extension/Truncation for perform-

ing one-dimensional signal extension and

truncation using periodic, symmetric,

smooth, and zeropadding methods

About the AuthorsThe authors of the Wavelet Toolbox are

Michel Misiti, Georges Oppenheim, and

Jean-Michel Poggi, mathematics professors at

École Centrale de Lyon, Université de Marne-

La-Vallée, and Université René Descartes,

Paris 5, and Yves Misiti, a research engineer

specializing in Computer Sciences at

Université Paris-Sud.

The authors are members of the “Laboratoire

de Mathématique,” Université Paris-Sud.

Their fields of interest are wavelets, statistical

signal processing, stochastic processes, and

adaptive control. The authors’ group, which

was formed more than ten years ago, has

published numerous theoretical papers and

collaborated on many industrial applications

of advanced signal processing and control

technologies. ■

Tel: 508.647.7000 [email protected] www.mathworks.com

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

dependent threshold settings can also

be applied in the de-noising and

compression tools.

Page 40: Matlab.pdf

MODULATION

Digital Baseband and Passband Amplitude Modulation

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

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

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

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

CHANNELS

AWGN channelBinary symmetric channelMultipath Rayleigh fading channelRician fading channel

SYNCHRONIZATION

Phase-locked loopBaseband PLLCharge pump PLLLinearized baseband PLL

BASIC COMM FUNCTIONS

Integrators

Discrete modulo integratorIntegrate and dumpModulo integratorWindowed integrator

Sequence Operations

Complex phase differenceComplex phase shiftInterlacer and deinterlacerRepeat and derepeatPuncture and insert zeroScrambler and descrambler

UTILITY FUNCTIONS

Bit to integer converterData mapperdB

12345

11223

101 5

dB lin

Here a tutorial example shows how

you can quickly build a communication

system comprising a channel, modulation

scheme, and coding.

Viterbi Decoder

Viterbi Decoder

Unbuffer

Terminator1

Terminator

Scalarquantizer

SampledQuantizer Encode

Info

Error RateCalculation

Tx

Rx

Error Rate Calculation

0.01203

566

4.706e+004

Display

ConvolutionalEncoder

Convolutional Encoder

Re(u)

Complex toReal-Imag

Buffer

Bernoulli bin

Bernoulli RandomBinary Generator

BPSK

BPSKModulatorBaseband

AWGNAWGN

Channel

Page 41: Matlab.pdf

This BER plot can be calculated by a MATLAB script that runs your simulation many times for

different Eb/No values.

The MathWorks 9869v00 10/00

USING THE COMMUNICATIONS BLOCKSET WITH OTHER MATHWORKS PRODUCTSTo run the Communications Blockset, the Communications Toolbox, the

Signal Processing Toolbox, Simulink and the DSP Blockset must also be installed.

For demos, application examples, tutorials, user stories, and pricing:

•Visit www.mathworks.com

•Contact The MathWorks directly

US & Canada 508-647-7000

Benelux +31 (0)182 53 76 44France +33 (0)1 41 14 6714Germany +49 (0)89 995901 0Spain +34 93 362 13 00Switzerland +41 (0)31 954 20 20UK +44 (0)1223 423 200

Visit www.mathworks.com to obtaincontact information for authorizedMathWorks representatives in countriesthroughout Asia Pacific, Latin America,the Middle East, Africa, and the rest of Europe.

Being based on Simulink, the Communications

Blockset handles arbitrarily complex systems

by allowing you to build and navigate

models hierarchically. You can process all

the multi-rate digital signals that are typical

in communications systems, such as frames,

bits and symbols. And you can make use of

Simulink’s continuous time features to

model analog signals.

Simulink provides the interactive,

block diagram simulation environment

including model construction, navigation,

simulation management and debugging.

It also provides primitive analog and

discrete, linear and non-linear building

blocks, such as arithmetic, logic and

relational operators, subsystems, Laplace

transforms, z-transforms, look-up tables,

polynomials and switches. You also have

the ability to add your own custom C code

or M code modules using the Simulink

S-function block. ■

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

tion and generation tasks.

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

layer design in Stateflow, The MathWorks

control logic design product.

The DSP Blockset This provides all the

key DSP blocks common in any digital

communications system. These blocks

include filters, adaptive filters, interpola-

tion, signal operations, transforms, vector

math, matrix math, linear algebra, and

frequency scopes. The Communications

Blockset also makes extensive internal use

of the DSP Blockset.

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.

Tel: 508.647.7000 [email protected] www.mathworks.com

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