(*^

::[paletteColors = 128; 
	fontset = title, "Times", 24, L2, center, bold, nohscroll;
	fontset = subtitle, "Times", 18, L2, center, bold, nohscroll;
	fontset = subsubtitle, "Times", 14, L2, center, bold, nohscroll;
	fontset = section, "Times", 18, L2, bold, nohscroll, grayBox;
	fontset = subsection, "Times", 14, L2, bold, nohscroll, blackBox;
	fontset = subsubsection, "Times", 12, L2, bold, nohscroll, whiteBox;
	fontset = text, "Times", 14, L2, nohscroll;
	fontset = smalltext, "Times", 12, L2, nohscroll;
	fontset = input, "Courier", 14, L2, bold, nowordwrap;
	fontset = output, "Courier", 14, L2, nowordwrap;
	fontset = message, "Courier", 14, L2, R21845, G21845, B21845, nowordwrap;
	fontset = print, "Courier", 14, L2, nowordwrap;
	fontset = info, "Courier", 14, L2, nowordwrap;
	fontset = postscript, "Courier", 14, L2, nowordwrap;
	fontset = name, "Times", 12, L2, italic, R21845, G21845, B21845, nowordwrap, nohscroll;
	fontset = header, "Times", 12, L2;
	fontset = footer, "Times", 12, L2, center;
	fontset = help, "Times", 16, L2, nohscroll;
	fontset = clipboard, "New York", 14, L2;
	fontset = completions, "Courier", 18, L2, nowordwrap;
	fontset = network, "Courier", 12, L2, nowordwrap;
	fontset = graphlabel, "Courier", 14, L2, nowordwrap;
	fontset = special1, "Times", 24, L2, center, italic, nowordwrap;
	fontset = special2, "Times", 20, L2, center, italic, nowordwrap;
	fontset = special3, "Times", 16, L2, italic, nowordwrap;
	fontset = special4, "New York", 16, L2, nowordwrap;
	fontset = special5, "New York", 20, L2, nowordwrap;]
:[font = title; inactive; ]
A Brief Introduction to
the Signal Processing Packages
:[font = subtitle; inactive; ]

by Brian L. Evans and James H. McClellan
:[font = text; inactive; ]

		This is public-domain release of Mathematica code for symbolic signal processing copyrighted by The Georgia Tech Research Corporation, Wolfram Research Inc., and The Mathematica Journal.   It is a collection of Mathematica packages to perform linear transforms and convolutions symbolically.
:[font = text; inactive; ]
		To get started using these extensions, you must move the directory hierarchy SignalProcessing to a place on Mathematica's directory path which is stored in the Mathematica variable $Path:
:[font = input; ]
$Path
:[font = text; inactive; ]
For a first try of the packages, you could simply start up Mathematica in the SignalProcessing directory itself.  Then, you can invoke Mathematica and initialize it by typing 
:[font = input; ]
Needs[ "SignalProcessing`SignalProcessing`" ]
:[font = text; inactive; ]
It is possible to set up an  initialization file "init.m" to load these signal processing capabilities automatically.
:[font = text; inactive; ]
		After you read and understand the contents of this notebook, we recommend that you read the ``SignalProcessingIntroduction'' notebook next.
:[font = section; inactive; startGroup; Cclosed; ]
Scope of and Philosophy Underlying This Work
:[font = text; inactive; ]
		For the designer, the underlying philosophy of these extensions is that a user will start with many varied symbolic descriptions of a system expressed in Mathematica notation.  The user will then manipulate these expressions and simulate the results.  The hooks to generate TeX code for many of the new objects introduced by the signal processing packages are present.
:[font = text; inactive; ]
		Students can learn how to take transforms and solve linear constant coefficient difference and differential equations by following the justification output of the transform (LaPlace, InvLaPlace, Fourier, InvFourier, ZTransform, etc.) and solver (ZSolve and LSolve) rule bases.  (Complete justification is enable by the Dialogue -> All option).  Students can also check the properties of such transforms by specifying their own transform pairs, e.g. x(t) <---> X(s), via the TransformLookup option.  The packages can perform convolution in the discrete and continuous domains.
:[font = text; inactive; ]
		Professors have used these extensions to generate homework problems and their solution in circuits and systems, communications, and signal processing courses, primarily for problems involving linear systems.  We have written three tutorial notebooks that introduce students to the topics of convolution, analog filter design, and the z-transform.
:[font = text; inactive; endGroup; ]
		In its present state, the signal processing packages can perform basic symbolic, graphical, and numerical analysis of signals and systems at the level of a senior electrical engineering student.  A future goal is for it to reason about more signal and system properties (besides stability and the region of convergence), rearrange signal processing expressions so that they are more efficient, and generate code for DSP chips for some signal processing structures.
:[font = section; inactive; startGroup; Cclosed; ]
Signal Processing Notebooks
:[font = text; inactive; ]
		So far, eight notebooks (besides the one you are presently reading) describe the signal processing packages.  Three serve as tutorials on the z-transform, convolution, and analog filter design.  The others serve as on-line help.  Together, these notebooks allow students to read about signal processing, tinker with equations, and visualize ideas through animation [Evans, 1991].  With Mathematica 2.0, students will also be able to learn through hearing.  As a multimedia tool, Mathematica can enhance the learning process and make it more enjoyable.
:[font = text; inactive; ]

:[font = subtitle; inactive; startGroup; ]
Tutorial Notebooks
:[font = output; inactive; output; endGroup; center; ]
MatrixForm[{"Convolution          \
    'PiecewiseConvolution'", 
   "The z-Transform                 'zTransform'", 
   "Analog Filter Design         'AnalogFilters'"}]
;[o]
Convolution          'PiecewiseConvolution'
 
The z-Transform                 'zTransform'
 
Analog Filter Design         'AnalogFilters'
:[font = text; inactive; ]

:[font = subtitle; inactive; ]
Demonstration Notebooks
:[font = output; inactive; output; center; ]
MatrixForm[{"Testing Laplace Transforms    \
    'LaPlaceTest'"}]
;[o]
Testing Laplace Transforms    'LaPlaceTest'
:[font = text; inactive; ]

:[font = subtitle; inactive; startGroup; ]
On-Line Documentation
:[font = output; inactive; output; endGroup; center; ]
MatrixForm[{"Usage Information           'SignalProcessingUsage'", 
   "Overview with Examples   'SignalProcessingExamples'", 
   "SoutheastCon Paper                'EducationalTool'", 
   "Introduction         'SignalProcessingIntroduction'"}]
;[o]
Usage Information           'SignalProcessingUsage'
 
Overview with Examples   'SignalProcessingExamples'
 
SoutheastCon Paper                'EducationalTool'
 
Introduction         'SignalProcessingIntroduction'
:[font = text; inactive; endGroup; ]
		
We have added a section to the 'SignalProcessingExamples' notebook to update users on the changes in version 2.3 of the signal processing packages.  See also  "Symbolic Transforms with Applications to Signal Processing" published in the Fall 1990 issue of the Mathematica Journal  (vol. 1, #2) and "Mathematica As An Educational Tool for Signal Processing" in the proceedings of the 1991 IEEE Southern Conference (the content of this paper is reproduced in the EducationalTool notebook).
:[font = section; inactive; startGroup; Cclosed; ]
Hierarchical Relationship Between Files
:[font = text; inactive; ]
		The Mathematica  packages  are grouped into  four  categories:   supporting routines,	digital  signal  processing (DSP) packages , analog  signal  processing (ASP) packages, and object-oriented extensions.
:[font = subsection; inactive; startGroup; Cclosed; ]
Supporting Signal Processing Packages
:[font = text; inactive; ]
		The supporting routines are maintained in eight files.  These are usually kept in the Support sub-directory of the SignalProcessing directory of the standard Mathematica Packages directory. 
:[font = text; inactive; ]
		Six of the eight files form the foundation for the other signal processing capabilities.  "SupCode.m" defines general  purpose  Mathematica routines like Second,  SeriesQ,  ToList,  GenerateCode,  and PrintIt (which sends  Mathematica  output to a a PostScript printer).    The file "SigProc.m" establishes the representation of common signal processing operators (like  Upsample,  Shift, and Convolve) and functions  (like Step, CStep, Impulse,	Delta, and Sinc), as well as some of the interactions between them.   The file "FilterSupport.m" defines the representation of linear filters (FIR and IIR)  and their impulse responses.   "ROC.m"  defines routines which  extract and combine regions of convergence (ROC's), where an ROC is one open interval of points.  The last file is "TransSupport.m" which  provides  a  general  set of routines to aid in the writing of transformation rule bases,  extends Mathematica's graphics capabilities to include  magnitude and phase responses as well as pole-zero diagrams, and defines tools for stability analysis of LSI systems.  The discrete and piecewise continuous convolution routines are combined in the file "Convolution.m".
:[font = text; inactive; endGroup; ]
		The remaining two files may be useful in a future release, but the other signal processing packages do not rely on them.  They are "Tree.m" and "Window.m".  The first defines tree manipulation routines like AddChildToTree, DeleteFromTree, InitTree, and SubTree.  This file uses the same tree representation (lists) as does the ``standard'' tree extensions provided by Mathematica in the DiscreteMath packages.
:[font = subsection; inactive; startGroup; Cclosed; ]
Digital Signal Processing Packages
:[font = text; inactive; endGroup; ]
		The digital signal  processing  routines  are  maintained  in  the hierarchy shown below.  These files are maintained in the Mathematica sub-directory  Packages/SignalProcessing/Digital.  Most files in the DSP packages rely on the forward and inverse z-transform capabilities in "ZTransform.m" and "InvZTransform.m", respectively, which  in  turn depend on the file "ZSupport.m".   "ZSupport.m" defines  supporting routines for rule writing and checking for valid transforms.  The files "DTFT.m" and "DFT.m" contain the rules for the discrete-time Fourier transform and  the discrete Fourier transform, respectively.   The file "DSPAnalyze.m" provides  a  powerful analyzer of one- and two-dimensional signals generated  by  linear systems.  This routine graphs a signal  in  the  time-domain, prints out its z-transform, indicates conditions for the sequence to be stable, displays its pole-zero diagram, gives its DTFT, and plots its magnitude and phase responses.  The package "ZSolve.m" provides the ability to solve linear constant coefficient difference equations.
:[font = subsection; inactive; startGroup; Cclosed; ]
Analog Signal Processing Packages
:[font = text; inactive; endGroup; ]
		The analog signal processing  (ASP) packages are arranged in a similar manner, as shown below.  "LaPlace.m" and "InvLaPlace.m" provide the forward and inverse Laplace transforms, which are able to transform expressions involving signal processing operators and functions.  Note that the Laplace transform extensions released by Wolfram Research only do one-dimensional, one-sided transforms and are biased toward higher-order mathematical functions common to physics.   ASPAnalyze in "ASPAnalyze.m" provides the same capabilities as does DSPAnalyze, but for analog signals.  The ASP packages support filter design ("FilterDesign.m").  Currently, the DSP packages cannot design digital filters.
:[font = subsection; inactive; startGroup; Cclosed; ]
Signal and System Analysis Packages
:[font = text; inactive; endGroup; endGroup; ]
		This, the very top layer, is still under development and therefore has not been released.  The  files "Signal.m" and "System.m" will provide signal and system definitions after the work of  Cory Myers and Gary Kopec.  This will allow Mathematica to reason about properties of signals and systems.  Right now, Mathematica can only perform point-by-point and a limited amount of array-based signal processing.  This layer will fully implement array-based,  stream-based,  and  state machine-based signal processing.  This layer will simply provide more ways to represent, manipulate, and simulate signals and systems, as well as (hopefully) the ability to find optimal implementations of signal processing expressions.
:[font = section; inactive; startGroup; Cclosed; ]
Alteration of Standard Mathematica Routines
:[font = subsection; inactive; startGroup; ]
And
:[font = text; inactive; endGroup; ]
Simplify will remove redundant multiple arguments to And.
:[font = subsection; inactive; startGroup; ]
ClearAttributes
:[font = text; inactive; endGroup; ]
The first argument to ClearAttributes is held.
:[font = subsection; inactive; startGroup; ]
Det
:[font = text; inactive; endGroup; ]
The determinant Det of a number is that number.
:[font = subsection; inactive; startGroup; ]
Dot
:[font = text; inactive; endGroup; ]
The dot product (Dot) of two numbers is their product.
:[font = subsection; inactive; startGroup; ]
SetAttributes
:[font = text; inactive; endGroup; endGroup; ]
The first argument to SetAttributes is held.
^*)