ModelingSimulationImplementationUser’s GuideVersion 4For Use with Simulink®DSPBlockset
viii ContentsVariable Integer Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-491Variable Selector . . . . . . . . . . . . . .
3 Working with Signals3-60Unbuffering a Frame-Based Signal into a Sample-Based SignalYou can unbuffer a multichannel frame-based signal into a multich
Deconstructing Signals3-61The Signal From Workspace block generates a two-channel frame based-signal with frame size 4 (because the Samples per frame
3 Working with Signals3-62Importing SignalsAlthough a number of signal generation blocks are available in Simulink and the DSP Blockset, it is very co
Importing Signals3-63Sample-time parameter specifies the sample period of the sample-based output. See “Sample-Based Multichannel Signals” on page 3-1
3 Working with Signals3-64containing M consecutive samples. In other words, the workspace matrix must be oriented so as to have the independent channe
Importing Signals3-65•Form output after final data value = Setting to zeroThe Signal expression [A B] uses the standard MATLAB syntax for horizontally
3 Working with Signals3-66 As the figure above suggests, the output of the Signal From Workspace block can only be a valid sample-based signal (having
Importing Signals3-67•Channel 3: 0, 0, 0, 0, 0,...•Channel 4: 5, 5, 5,..., 0, 0, 0,...To create the model, define the following variables at the MATLA
3 Working with Signals3-68•“Constructing Multichannel Sample-Based Signals” on page 3-42Importing a Multichannel Frame-Based SignalThe Signal From Wor
Importing Signals3-69Beginning with the first M rows of the matrix, the block releases M rows of the matrix (i.e., one frame from each channel) to the
1IntroductionWelcome to the DSP Blockset . . . . . . . . . . . . 1-2What Is the DSP Blockset? . . . . . . .
3 Working with Signals3-70by the Form output after final data value by parameter. See the Signal From Workspace reference page for more information.Th
Importing Signals3-71The Signal expression [A B] uses the standard MATLAB syntax for horizontally concatenating matrices and appends column vectorB to
3 Working with Signals3-72Exporting SignalsThe To Workspace and Triggered To Workspace blocks are the primary conduits for exporting signals from a Si
Exporting Signals3-73to downsample a signal before exporting to the workspace, consider using the Downsample or FIR Decimation blocks. See “Converting
3 Working with Signals3-74 The workspace array always has time running along its third (P) dimension. Samples are saved along the P dimension whether
Exporting Signals3-75To create the model, define the following variables at the MATLAB command line.sig1 = reshape(1:100,[1 1 100]) % 1-by-1-by-100 ar
3 Working with Signals3-76yout(:,:,1:4)ans(:,:,1) = 1 -1 0 5ans(:,:,2) = 2 -2 0 5ans(:,:,3) = 3 -3 0 5ans
Exporting Signals3-77 The workspace matrix always has time running along its first (P) dimension. Samples are saved along the P dimension whether the
3 Working with Signals3-78To create the model, define the following variables at the MATLAB command line.A = [1:100;-1:-1:-100]'; % 100-by-2 matr
Exporting Signals3-79The following two sections may also be of interest:•“Creating Signals Using the Signal From Workspace Block” on page 3-38•“Constr
1 Introduction1-2Welcome to the DSP BlocksetWelcome to the DSP Blockset, the premier tool for digital signal processing (DSP) algorithm simulation and
3 Working with Signals3-80Viewing SignalsThe following blocks in the DSP Sinks library are the key blocks for displaying signals:•Matrix Viewer•Spectr
Viewing Signals3-81Specify the following parameter values in the Signal From Workspace block:•Signal = mtlb•Sample time = 1•Samples per frame = 16•For
3 Working with Signals3-82•Select Compact display from the right-click menu to allow the scope to use all the available space in the window.•Select CH
Viewing Signals3-83•Filter Type = Lowpass•Design Method = FIR (Window) •Filter Order (Specify order) = 22 •Window Specifications (Window) = Hamming•Fr
3 Working with Signals3-84To build the model, specify the following parameter values in the Sine Wave block:•Amplitude = 1•Frequency = 100•Phase offse
Delay and Latency3-85Delay and LatencyThere are two distinct types of delay that affect Simulink models:•Computational delay•Algorithmic delayThe foll
3 Working with Signals3-86A first step in improving performance is to analyze your model, and eliminate or simplify elements that are adding excessive
Delay and Latency3-87input. This delay is directly related to the time elapsed on the Simulink timer during that block’s execution. The algorithmic de
3 Working with Signals3-88Use the default settings for the Normalization, Digital Clock, Mux, and To Workspace blocks, and adjust the Signal From Work
Delay and Latency3-89The first column of ans is the Simulink time provided by the Digital Clock block. You can see that the squared 2-norm of the firs
What Is the DSP Blockset?1-3What Is the DSP Blockset?The DSP Blockset is a collection of block libraries for use with the Simulink dynamic system simu
3 Working with Signals3-90Use the default settings for the Digital Clock, Mux, and To Workspace blocks, and adjust the Signal From Workspace block’s p
Delay and Latency3-91Excess Algorithmic Delay (Tasking Latency)Under certain conditions, Simulink may force a block to delay inputs longer than is str
3 Working with Signals3-92block is called multirate when at least one input or output port has a different frame rate than the others. Many blocks are
Delay and Latency3-93Example: Nonzero Tasking Latency. Most multirate blocks experience tasking latency only in Simulink’s multitasking mode. As an ex
3 Working with Signals3-94•Set the Output signal parameter of the Frame Status Conversion block to Sample-based.Notice that the current value of the S
Delay and Latency3-95The first column of yout is the Simulink time provided by the Digital Clock block. The four values to the right of each time are
3 Working with Signals3-96The “Latency and Initial Conditions” section of the reference page for Upsample indicates that the block has zero latency fo
4 DSP OperationsOverview . . . . . . . . . . . . . . . . . . . . . 4-2Filters . . . . . . .
4 DSP Operations4-2OverviewThis chapter discusses some basic DSP operations, and how they can be implemented using the DSP Blockset. The following top
Filters4-3Filters Filtering is one of the most important operations in signal processing, and is supported in the DSP Blockset with three libraries of
1 Introduction1-4into all of its blocks. A completely frame-based model can run several times faster than the same model processing sample-by-sample;
4 DSP Operations4-4Filter DesignsFilter Designs library blocks apply specified filters to an input signal and output the result. Depending on the bloc
Filters4-5For details about a particular block, consult its reference page. Also see the rest of this section, which discuss the following topics in d
4 DSP Operations4-6The FDATool GUI Opened from the Digital Filter Design BlockDesigning Filters with Various Filter StructuresAny realizable filter ca
Filters4-7where y(k) and u(k) are, respectively, the output and input at the current time step, y(k-1) and u(k-1) are the output and input at the prev
4 DSP Operations4-8you specify a filter order. The other available parameters depend on the filter type and band configuration, as shown in the table
Filters4-9Note The Analog Filter Design block does not work with Simulink’s discrete solver, which is enabled when the discrete option is selected in
4 DSP Operations4-10TransformsThe Transforms library provides blocks for a number of transforms that are of particular importance in DSP applications:
Transforms4-11To build the model, make the following parameter settings:•In the Sine Wave block, set:-Amplitude = 1- Frequency = [15 40]- Phase offset
4 DSP Operations4-12Note that the three-block sequence of FFT, Complex to Magnitude-Angle, and Vector Scope could be replaced by a single Spectrum Sco
Transforms4-13- Input is in bit-reversed order = -Input is conjugate symmetric = •In the Sum block, set List of signs = |++.•In the Gain block, set Ga
What Is the DSP Blockset?1-5The multirate filtering algorithms employ polyphase implementations for efficient simulation and real-time code execution.
4 DSP Operations4-14
Power Spectrum Estimation4-15Power Spectrum EstimationThe Power Spectrum Estimation library provides a number of blocks for spectral analysis. Many of
4 DSP Operations4-16Linear AlgebraThe Matrices and Linear Algebra library provides three large sublibraries containing blocks for linear algebra:•Line
Linear Algebra4-17Example: LU SolverIn the model below, the LU Solver block solves the equation Ax = b, where and finds x to be the vector [-2 0 1]&ap
4 DSP Operations4-18•QR Factorization•Singular Value DecompositionSome of the blocks offer particular strengths for certain classes of problems. For e
Linear Algebra4-19You can check that LU = Ap with the Matrix Multiply block, as shown in the model below.Inverting MatricesThe Matrix Inverses library
4 DSP Operations4-20To build the model, in the DSP Constant block, set the Constant value parameter to [1 -2 3;4 0 6;2 -1 3]. As shown above, the comp
Statistics4-21StatisticsThe Statistics library provides fundamental statistical operations such as minimum, maximum, mean, variance, and standard devi
4 DSP Operations4-22selected, for example) the Maximum block finds the maximum value in each column of the current input, and returns this result at t
Statistics4-23•In the Buffer block, set:-Output buffer size (per channel) = 128- Buffer overlap = 127Running OperationsA running operation is one that
1 Introduction1-6What Is in the DSP Blockset?The DSP Blockset contains a collection of blocks organized in a set of nested libraries. The best way to
4 DSP Operations4-24DSP Blockset Demos OverviewYou can access the DSP Blockset demos by typingdemosat the MATLAB command line. In the Demos window tha
DSP Blockset Demos Overview4-25•LPC analysis and synthesis: Uses the Levinson solver and Time-Varying Lattice Filter for low-bandwidth transmission of
4 DSP Operations4-26Queues Demo•Demo uses a Queue block with a system of selection switches to illustrate pushing and popping elements from a queue.Si
5 DSP Block ReferenceFeatures of the Online DSP Block Reference . . . . . 5-2Main Sections of a Block Reference Page . . . . .
5 DSP Block Reference5-2Features of the Online DSP Block ReferenceThe online DSP Blockset block reference section contains complete information on eve
Features of the Online DSP Block Reference5-3About Tunable ParametersTunable parameters are block parameters whose settings you can change or tune dur
5 DSP Block Reference5-4Ways to Access Online DSP Block Reference PagesThere are several ways to access the reference pages:•Click Help in a block dia
Features of the Online DSP Block Reference5-5•Click on indicated links to bring up example models.•Run the models as you would run any other model.Ope
5 DSP Block Reference5-6Blocks Supporting Code GenerationYou can generate C code from models containing DSP Blockset blocks by using the Real-Time Wor
Blocks Supporting Code Generation5-7Display DownsampleDSP Constant Dyadic Analysis Filter BankDyadic Synthesis Filter Bank Edge DetectorEvent-Count Co
What Is in the DSP Blockset?1-7Double-click on a demo in the list to open that model, and select Start from the model window’s Simulation menu to run
5 DSP Block Reference5-8Real Cepstrum RepeatRLS Adaptive Filter RMSSample and Hold SelectorShort-Time FFT Signal From WorkspaceSignal To Workspace Sin
Block Library List5-9Block Library ListThis section contains the following two subsections:•“Block Library Hierarchy” – a structured list of the DSP B
5 DSP Block Reference5-10- Signal Management: Buffers- Signal Management: Indexing- Signal Management: Signal Attributes- Signal Management: Switches
Block Library List5-11DSP Constant Signal From WorkspaceDiscrete Impulse Sine WaveFrom Wave Device Triggered Signal From WorkspaceFrom Wave File Wind
5 DSP Block Reference5-12Filtering: Adaptive FiltersKalman Adaptive Filter RLS Adaptive FilterLMS Adaptive FilterFiltering: Filter DesignsAnalog Filte
Block Library List5-13Math Functions: Matrices and Linear AlgebraLinear System SolversAutocorrelation LPC Levinson-DurbinCholesky Solver LU SolverForw
5 DSP Block Reference5-14Math Functions: Matrices and Linear AlgebraMatrix OperationsConstant Diagonal Matrix Matrix ScalingCreate Diagonal Matrix Mat
Block Library List5-15QuantizersQuantizer (Simulink block) Uniform EncoderUniform Decoder Signal Management: BuffersBuffer StackDelay Line Triggered D
5 DSP Block Reference5-16Signal Management: Switches and CountersCounter Multiphase ClockEdge Detector N-Sample EnableEvent-Count Comparator N-Sample
Block Library List5-17TransformsAnalytic Signal IDCTComplex Cepstrum IFFTDCT Real CepstrumFFT
1 Introduction1-8Getting Started with the DSP BlocksetTo get started with the DSP Blockset, open the Simulink Library Browser by pressing the button
Analog Filter Design5-235Analog Filter DesignPurpose Design and implement an analog filter.Library Filtering / Filter DesignsDescription The Analog Fi
Analog Filter Design5-24attenuation Rs. Frequency values are in rad/s, and ripple and attenuation values are in dB.The analog filters are designed usi
Analog Filter Design5-25Filter typeThe type of filter to design: Lowpass, Highpass, Bandpass, or Bandstop. Tunable.Filter orderThe order of the filter
Analog Filter Design5-26References Antoniou, A. Digital Filters: Analysis, Design, and Applications. 2nd ed. New York, NY: McGraw-Hill, 1993.Supported
Analytic Signal5-275Analytic SignalPurpose Compute the analytic signal of a discrete-time input.Library TransformsDescription The Analytic Signal bloc
Analytic Signal5-28Filter orderThe length of the FIR filter used to compute the Hilbert transform.Supported Data TypesDouble-precision floating point
Autocorrelation5-295AutocorrelationPurpose Compute the autocorrelation of a vector input.Library StatisticsDescription The Autocorrelation block compu
Autocorrelation5-30Dialog BoxAll positive lagsWhen selected, computes the autocorrelation over all M+1 positive lags.Maximum positive lagThe maximum p
Autocorrelation LPC5-315Autocorrelation LPCPurpose Determine the coefficients of an Nth-order forward linear predictor.Library Estimation / Linear Pre
Autocorrelation LPC5-32Algorithm The Autocorrelation LPC block computes the least-squares solution towhere indicates the 2-norm andSolving the least
Getting Started with the DSP Blockset1-9•Help browser – Select Full Product Family Help from the Help menu, or type doc or helpdesk at the command lin
Autocorrelation LPC5-33Note that the solution to the LPC problem is very closely related to the Yule-Walker AR method of spectral estimation. In that
Autocorrelation LPC5-34Proakis, J. and D. Manolakis. Digital Signal Processing. 3rd ed. Englewood Cliffs, NJ: Prentice-Hall, 1996.Supported Data Types
Backward Substitution5-355Backward SubstitutionPurpose Solve the equation UX=B for X when U is an upper triangular matrix.Library Math Functions / Mat
Backward Substitution5-36See “Solving Linear Systems” on page 4-16 for related information.
Biquadratic Filter5-375Biquadratic FilterPurpose Apply a cascade of biquadratic (second-order section) filters to the input.Library Filtering / Filter
Biquadratic Filter5-38The SOS matrix parameter specifies the filter coefficients as a second-order section matrix of the type produced by the ss2sos a
Biquadratic Filter5-39Each pair of elements in a column specifies v1k and v2k for second-order section k of the corresponding channel. Dialog BoxSOS m
Biquadratic Filter5-40See AlsoSee “Designing Filters with Various Filter Structures” on page 4-6 for related information.Direct-Form II Transpose Filt
Buffer5-415BufferPurpose Buffer the input sequence to a smaller or larger frame size.Library Signal Management / BuffersDescription The Buffer block r
Buffer5-42Mo=1, the input is simply passed through to the output, and retains the same dimension. Sample-based full-dimension matrix inputs are not ac
How to Contact The MathWorks:www.mathworks.com Webcomp.soft-sys.matlab [email protected] Technical [email protected] Product
1 Introduction1-10Technical ConventionsThe following sections provides a brief overview of the technical conventions used in this guide, and provides
Buffer5-43You can use the rebuffer_delay function with a frame size of 1 to precisely compute the delay (in samples) for sample-based signals. For the
Buffer5-44Note that the sequence is delayed by eight samples, which is the latency of the block in Simulink’s multitasking mode for the parameter sett
Buffer5-45Nonzero LatencySample-Based Operation. For all cases of sample-based single-tasking operation other than those listed above, the Buffer bloc
Buffer5-46See “Excess Algorithmic Delay (Tasking Latency)” on page 3-91 and “The Simulation Parameters Dialog Box” in the Simulink documentation for m
Buffer5-47See AlsoSee “Buffering Sample-Based and Frame-Based Signals” on page 3-47 for related information.Delay Line DSP BlocksetUnbuffer DSP Blocks
Burg AR Estimator5-485Burg AR EstimatorPurpose Compute an estimate of AR model parameters using the Burg method.Library Estimation / Parametric Estima
Burg AR Estimator5-49Dialog BoxOutput(s)The realization to output, model coefficients, reflection coefficients, or both.Inherit estimation order from
Burg Method5-505Burg MethodPurpose Compute a parametric spectral estimate using the Burg method.Library Estimation / Power Spectrum EstimationDescript
Burg Method5-51Burg Covariance Modified Covariance Yule-WalkerCharacteristicsDoes not apply window to dataDoes not apply window to dataDoes not apply
Burg Method5-52Examples The dspsacomp demo compares the Burg method with several other spectral estimation methods.Dialog BoxInherit estimation order
Getting Started with the DSP Blockset1-11•One-dimensional array, also called a 1-D vector•1-by-N matrix, also called a row vector•M-by-1 matrix, also
Burg Method5-53Supported Data TypesSee AlsoSee “Power Spectrum Estimation” on page 4-15 for related information.Double-precision floating pointBurg AR
Check Signal Attributes5-545Check Signal AttributesPurpose Generate an error when the input signal does or does not match selected attributes exactly.
Check Signal Attributes5-55•DimensionalityChecks the dimension of signal for compliance (Is...) or noncompliance (Is not...) with the attributes in th
Check Signal Attributes5-56Dimensions Is... Is not...1-D 1-D vector,1-D scalarM-by-N matrix,1-by-N matrix (row vector),M-by-1 matrix (column vector),1
Check Signal Attributes5-57Note that when Signal dimensions is selected from the model window Format menu, Simulink displays the size of a 1-D vector
Check Signal Attributes5-58column below can be individually selected from the subordinate Specific data type menu. Note that data type information can
Check Signal Attributes5-59Dialog BoxError if inputSpecifies whether the block generates an error when the input possesses none of the required attrib
Check Signal Attributes5-60Data typeSpecifies whether the input should be checked for compliance (Is...) or noncompliance (Is not...) with the attribu
Chirp5-615ChirpPurpose Generate a swept-frequency cosine (chirp) signal.Library DSP SourcesDescription The Chirp block outputs a swept-frequency cosin
Chirp5-62Setting the Output Frame StatusUse Samples per frame parameter to set the block’s output frame status, as summarized in the table. The Sample
1 Introduction1-12Typographical ConventionsThis manual uses some or all of these conventions.Item Convention to Use ExampleExample code Monospace font
Chirp5-63The following diagram illustrates the possible shapes of the frequency sweep that you can obtain by setting the Frequency sweep and Sweep mod
Chirp5-64on page 5-62). The following table describes the characteristics of unidirectional and bidirectional sweeps. The following diagram illustrate
Chirp5-65•Target frequency (Hertz), fi(tg)•Target time (seconds), tgThe following table summarizes the sweep values at specific times for all Frequenc
Chirp5-66examine the following table and the diagram in “Shaping the Frequency Sweep by Setting Frequency Sweep and Sweep Mode” on page 5-62.Table 5-2
Chirp5-67the chirp output when the Frequency Sweep parameter is set to Linear, Quadratic, or Logarithmic. For instance, if you want a chirp signal wit
Chirp5-68Swept Cosine Instantaneous Output Frequency at the Target Time is not the Target Frequency.The swept cosine sweep value at the Target time is
Chirp5-69Open the Example 1 model by clicking here in the MATLAB Help Browser. You can also rebuild the model yourself; see the following list for mod
Chirp5-70specgram(dsp_examples_yout,[0:.01:40],400,hamming(128),110)Example 2: Bidirectional Sweeps.Change the Sweep mode parameter in the Example 1 m
Chirp5-71Open the Example 2 model by clicking here in the MATLAB Help Browser. Run your model to see the time domain output, and then type the followi
Chirp5-72Open the Example 3 model by clicking here in the MATLAB Help Browser. Run your model to see the time domain output, and then type the followi
R12 Related Products1-13R12 Related ProductsThe MathWorks provides several products that are especially relevant to the kinds of tasks you can perform
Chirp5-73Open the Example 4 model by clicking here in the MATLAB Help Browser. Run your model to see the time domain output, and then type the followi
Chirp5-74Open the Example 5 model by clicking here in the MATLAB Help Browser.Run your model to see the time domain output, and then type the followin
Chirp5-75Dialog BoxFrequency sweepThe type of output instantaneous frequency sweep, fi(t): Linear, Logarithmic, Quadratic, or Swept cosine. Tunable.Sw
Chirp5-76Target frequency (Hz)For Linear, Quadratic, and Logarithmic sweeps, the instantaneous frequency, fi(tg), of the output at the Target time, tg
Chirp5-77See “Creating Signals Using Signal Generator Blocks” on page 3-36 for related information.
Cholesky Factorization5-785Cholesky FactorizationPurpose Factor a square Hermitian positive definite matrix into triangular components.Library Math Fu
Cholesky Factorization5-79•Warning – Display a warning message in the MATLAB command window, and continue the simulation. The output is not a valid fa
Cholesky Inverse5-805Cholesky InversePurpose Compute the inverse of a Hermitian positive definite matrix using Cholesky factorization.Library Math Fun
Cholesky Inverse5-81References Golub, G. H., and C. F. Van Loan. Matrix Computations. 3rd ed. Baltimore, MD: Johns Hopkins University Press, 1996.Supp
Cholesky Solver5-825Cholesky SolverPurpose Solve the equation SX=B for X when S is a square Hermitian positive definite matrix.Library Math Functions
1 Introduction1-14Motorola DSP Developer’s KitDeveloper's kit for co-simulating and verifying Motorola 56300 and 56600 fixed-point DSP code. Comb
Cholesky Solver5-83Dialog BoxNon-positive definite inputResponse to non-positive definite matrix inputs. Tunable.Supported Data TypesSee AlsoSee “Solv
Complex Cepstrum5-845Complex CepstrumPurpose Compute the complex cepstrum of an input. Library TransformsDescription The Complex Cepstrum block comput
Complex Cepstrum5-85Inherit FFT length from input port dimensionsWhen selected, matches the output frame size to the input frame size.FFT lengthThe nu
Complex Exponential5-865Complex ExponentialPurpose Compute the complex exponential function.Library Math Functions / Math OperationsDescription The Co
Constant Diagonal Matrix5-875Constant Diagonal MatrixPurpose Generate a square, diagonal matrix.Library DSP Sources,Math Functions / Matrices and Line
Constant Diagonal Matrix5-88Supported Data Types(See AlsoSee “Creating Signals Using Constant Blocks” on page 3-33 for related information.(MATLAB com
Constant Ramp5-895Constant RampPurpose Generate a ramp signal with length based on input dimensions.Library DSP SourcesDescription The Constant Ramp b
Constant Ramp5-90See AlsoSee “Creating Signals Using Constant Blocks” on page 3-33 for related information.Create Diagonal Matrix DSP BlocksetIdentity
Contiguous Copy5-915Contiguous CopyPurpose Create a discontiguous input in a contiguous block of memory (for RTW code generation from blocks linked to
Contiguous Copy5-92Dialog BoxSupported Data Typesu1u2u3u4u5u6u7u8m1m2m3m4m5m6m7m8m6m3m7Memory addressesMemory contentsVector of pointers to new contig
2 Simulink and the DSP BlocksetOverview . . . . . . . . . . . . . . . . . . . . . 2-2The Simulink Enviro
Convert 1-D to 2-D5-935Convert 1-D to 2-DPurpose Reshape a 1-D or 2-D input to a 2-D matrix with the specified dimensions.Library Signal Management /
Convert 1-D to 2-D5-94Number of output rowsThe number of rows, Mo, in the output matrix. Tunable.Number of output columnsThe number of rows, No, in th
Convert 2-D to 1-D5-955Convert 2-D to 1-DPurpose Convert a 2-D matrix input to a 1-D vector.Library Signal Management / Signal AttributesDescription T
Convert Complex DSP To Simulink5-965Convert Complex DSP To SimulinkPurpose Convert complex data from the DSP Blockset Version 2.2 format to the Simuli
Convert Complex DSP To Simulink5-97Dialog BoxSupported Data TypesSee AlsoExisting (Version 2.2) complex-data Subsystem B upgraded to Version 3.0 compl
Convert Complex Simulink To DSP5-985Convert Complex Simulink To DSPPurpose Convert complex data from the Simulink Version 3 format to the DSP Blockset
Convert Complex Simulink To DSP5-99Dialog BoxSupported Data TypesSee AlsoExisting (Version 2.2) complex-data Subsystem B upgraded to Version 3.0 compl
Convolution5-1005ConvolutionPurpose Compute the convolution of two inputs.Library Signal OperationsDescription The Convolution block convolves corresp
Convolution5-101The dimensions of the sample-based output vector are determined by the dimensions of the input vectors:•When both inputs are row vecto
Correlation5-1025CorrelationPurpose Compute the correlation along the columns of two inputs.Library StatisticsDescription The Correlation block comput
2 Simulink and the DSP Blockset2-2OverviewThis chapter will help you get started building DSP models with Simulink and the DSP Blockset. It contains t
Correlation5-103The dimensions of the sample-based output vector are determined by the dimensions of the input vectors:•When both inputs are column ve
Counter5-1045CounterPurpose Count up or down through a specified range of numbers.Library Signal Management / Switches and CountersDescription The Cou
Counter5-105•16 bits specifies a counter with a range of 0 to 65535.•32 bits specifies a counter with a range of 0 to 232-1.•User defined enables the
Counter5-106parameter setting. When the counter value does equal the Hit value setting, the block generates a value of 1 at the Hit port. The output i
Counter5-107To run the model, first select Simulation Parameters from the Simulation menu, and set the Stop time to 30. Then adjust the block paramete
Counter5-108You can see that the seventh input samples to both the Clk and Rst ports of the Counter block represent trigger events (rising edges), so
Counter5-109Dialog BoxCount directionThe counter direction, Up or Down. Tunable, except in Simulink’s external mode.Count eventThe type of event that
Counter5-110Initial countThe counter’s initial value at the start of the simulation and after reset. Tunable, except in Simulink’s external mode.Outpu
Covariance AR Estimator5-1115Covariance AR EstimatorPurpose Compute an estimate of AR model parameters using the covariance method.Library Estimation
Covariance AR Estimator5-112References Kay, S. M. Modern Spectral Estimation: Theory and Application. Englewood Cliffs, NJ: Prentice-Hall, 1988.Marple
The Simulink Environment2-3The Simulink EnvironmentSimulink is an environment for simulating dynamic systems. It provides a modeling and simulation “f
Covariance Method5-1135Covariance MethodPurpose Compute a parametric spectral estimate using the covariance method.Library Estimation / Power Spectrum
Covariance Method5-114Inherit FFT length from input dimensionsWhen selected, uses the input frame size as the number of data points, Nfft, on which to
Create Diagonal Matrix5-1155Create Diagonal MatrixPurpose Create a square diagonal matrix from diagonal elements.Library Math Functions / Matrices and
Cumulative Sum5-1165Cumulative SumPurpose Compute the cumulative sum of row or column elements.Library Math Functions / Math OperationsDescription The
Cumulative Sum5-117The frame status of the output is the same as the input. For both sample-based and frame-based inputs, the first column of each suc
dB Conversion5-1185dB ConversionPurpose Convert magnitude data to decibels (dB or dBm).Library Math Functions / Math OperationsDescription The dB Conv
dB Conversion5-119The dBm conversion is equivalent to performing the dB operation after converting the (abs(u)^2/R) result to milliwatts.Dialog BoxCon
dB Gain5-1205dB GainPurpose Apply a gain specified in decibels.Library Math Functions / Math OperationsDescription The dB Gain block multiplies the in
dB Gain5-121Supported Data TypesSee AlsoSingle-precision floating pointDouble-precision floating point dB Conversion DSP BlocksetMath Function Simulin
DCT5-1225DCTPurpose Compute the DCT of the input.Library TransformsDescription The DCT block computes the unitary discrete cosine transform (DCT) of e
2 Simulink and the DSP Blockset2-4The first item in the list is the Simulink blockset itself, which is already expanded to show the available Simulink
DCT5-123Dialog BoxSupported Data TypesSee AlsoDouble-precision floating point Complex Cepstrum DSP BlocksetFFT DSP BlocksetIDCT DSP BlocksetReal Cepst
Delay Line5-1245Delay LinePurpose Rebuffer a sequence of inputs with a one-sample shift.Library Signal Management / BuffersDescription The Delay Line
Delay Line5-125In the model below, the block operates on a sample-based input with a Delay line size of 3.The input vectors in the example above do no
Delay Line5-126When Mo=Mi, the output data is identical to the input data, but is delayed by the latency of the block. Due to the block’s latency, the
Delay Line5-127Dialog BoxDelay line sizeThe number of rows in output matrix, Mo.Initial conditionsThe value of the block’s initial output, a scalar, v
Detrend5-1285DetrendPurpose Remove a linear trend from a vector.Library StatisticsDescription The Detrend block removes a linear trend from the length
Difference5-1295DifferencePurpose Compute the element-to-element difference along rows or columns.Library Math Functions / Math OperationsDescription
Difference5-130The output is an M-by-(N-1) matrix whose ith row has elementsThe frame status of the output is the same as the input. For convenience,
Digital Filter Design5-1315Digital Filter DesignPurpose Design and implement a variety of digital FIR and IIR filters.Library Filtering / Filter Desig
Digital Filter Design5-132Dialog Box Double-click the block to open FDATool. Supported Data TypesDouble-precision floating point
The Simulink Environment2-5The following tutorial makes use of the Simulink Library Browser, available only on PC platforms. If you are working on a U
Digital Filter Design5-133See AlsoAnalog Filter Design DSP BlocksetWindow Function DSP Blocksetfdatool Signal Processing Toolboxfvtool Signal Processi
Direct-Form II Transpose Filter5-1345Direct-Form II Transpose Filter Purpose Apply an IIR filter to the input.Library Filtering / Filter DesignsDescri
Direct-Form II Transpose Filter5-135Initial ConditionsIn its default form, the filter initializes the internal filter states to zero, which is equival
Direct-Form II Transpose Filter5-136Dialog BoxNumeratorThe filter numerator vector. Tunable; the numerator coefficients can be adjusted while the simu
Direct-Form II Transpose Filter5-137See AlsoSee “Designing Filters with Various Filter Structures” on page 4-6 for related information.Biquadratic Fil
Discrete Impulse5-1385Discrete ImpulsePurpose Generate a discrete impulse.Library DSP SourcesDescription The Discrete Impulse block generates an impul
Discrete Impulse5-139Run the model and look at the output, yout. The first few samples of each channel are shown below.yout(1:10,:)ans = 1 0
Discrete Impulse5-140Sample timeThe sample period, Ts, of the output signal. The output frame period is M∗Ts. Tunable.Samples per frameThe number of s
Downsample5-1415DownsamplePurpose Resample an input at a lower rate by deleting samples.Library Signal OperationsDescription The Downsample block resa
Downsample5-142•Enforce single rateWhen Enforce single rate is selected, the block forces the output sample rate to match the input sample rate (Tso=T
iContents1IntroductionWelcome to the DSP Blockset . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2What Is the DSP Blockset? . . . . . . . . .
2 Simulink and the DSP Blockset2-61 Type dspstartup at the MATLAB command line to configure Simulink for DSP simulation (optional). One of the things
Downsample5-143•Maintain input frame rateThe block generates the output at the slower (downsampled) rate by using a proportionally smaller frame size
Downsample5-144Nonzero Latency. The Downsample block is multirate for most settings other than those in the above table. The amount of latency for mul
Downsample5-145Adjust the block parameters as follows:•Configure the Signal From Workspace block to generate a two-channel signal with frame size of 4
Downsample5-146panel of the Simulation Parameters dialog box, and select MultiTasking from the Mode parameter. Additionally, set the Stop time to 30.R
Downsample5-147Downsample factorThe integer factor, K, by which to decrease the input sample rate. Sample offsetThe sample offset, D, which must be an
DSP Constant5-1485DSP ConstantPurpose Generate a discrete-time or continuous-time constant signal.Library DSP SourcesDescription The DSP Constant bloc
DSP Constant5-149Dialog BoxConstant valueThe constant to generate. Tunable; values entered here can be tuned, but their dimensions must remain fixed.I
DSP Constant5-150Supported Data TypesSee AlsoSee “Creating Signals Using Constant Blocks” on page 3-33 for related information.(MATLAB commands for ca
Dyadic Analysis Filter Bank5-1515Dyadic Analysis Filter BankPurpose Decompose a signal into components of equal or logarithmically decreasing frequenc
Dyadic Analysis Filter Bank5-152functions in the Wavelet Toolbox (see the Wavelet Toolbox documentation for more information).Tree StructureThe Tree s
The Simulink Environment2-76 Add a Scope block to the model.a Click Sinks (in the Simulink tree) to view the blocks in the Simulink Sinks library.b Dr
Dyadic Analysis Filter Bank5-153The bottom two outputs (ynand yn+1) share the same sample period, bandwidth, and frame size because they originate at
Dyadic Analysis Filter Bank5-154In frame-based mode, the sample period of output yk is reflected by its frame size, Mo,k, rather than by its frame rat
Dyadic Analysis Filter Bank5-155ApplicationsWavelets. The primary application for dyadic analysis filter banks is coding for data compression using wa
Dyadic Analysis Filter Bank5-156LatencyZero Latency. The Dyadic Analysis Filter Bank block has no tasking latency for frame-based operation, which is
Dyadic Analysis Filter Bank5-157Dialog BoxLowpass FIR filter coefficientsA vector of filter coefficients (descending powers of z) to be shared by all
Dyadic Analysis Filter Bank5-158Supported Data TypesSee AlsoSee the following sections for related information:•“Converting Sample Rates and Frame Rat
Dyadic Synthesis Filter Bank5-1595Dyadic Synthesis Filter BankPurpose Reconstruct a signal from its multirate bandlimited components.Library Filtering
Dyadic Synthesis Filter Bank5-160highpass and lowpass direct-form II transpose filter in the filter bank. The values of these coefficients are typical
Dyadic Synthesis Filter Bank5-161Symmetric Tree. The symmetric structure shown below (Tree structure set to Symmetric) has 2ninputs, where n is the Nu
Dyadic Synthesis Filter Bank5-162The figure below shows the input and output sample periods for the four 64-channel sample-based inputs to a three-lev
2 Simulink and the DSP Blockset2-8Close the dialog box by clicking on the OK button or by pressing Enter on the keyboard.b Double-click on the Matrix
Dyadic Synthesis Filter Bank5-163ApplicationsThe primary application for asymmetric dyadic synthesis filter banks is coding for compression using wave
Dyadic Synthesis Filter Bank5-164asymmetric tree structure generates 2n-2 zero-valued output samples in each channel before propagating the first synt
Dyadic Synthesis Filter Bank5-165Strang, G. and T. Nguyen. Wavelets and Filter Banks. Wellesley, MA: Wellesley-Cambridge Press, 1996.Vaidyanathan, P.
Edge Detector5-1665Edge DetectorPurpose Detect a transition of the input from zero to a nonzero value.Library Signal Management / Switches and Counter
Edge Detector5-167Dialog BoxSupported Data TypesSee AlsoInputSimulation timeOutput5– 04– 13– 02– 01– 200102033405000000100000100100001000000First inpu
Event-Count Comparator5-1685Event-Count ComparatorPurpose Detect threshold crossing of accumulated nonzero inputs.Library Signal Management / Switches
Event-Count Comparator5-169Dialog BoxEvent thresholdThe value against which to compare the number of nonzero inputs. Tunable.Supported Data TypesSee A
Extract Diagonal5-1705Extract DiagonalPurpose Extract the main diagonal of the input matrix.Library Math Functions / Matrices and Linear Algebra / Mat
Extract Triangular Matrix5-1715Extract Triangular MatrixPurpose Extract the lower or upper triangle from an input matrix.Library Math Functions / Matr
Extract Triangular Matrix5-172Dialog BoxExtractThe component of the matrix to copy to the output, upper triangle or lower triangle. Tunable, except in
The Simulink Environment2-9to produce a scalar output. Thus, the input to the Scope block is the point-by-point sum of the two sinusoids.2 Double-clic
FFT5-1735FFTPurpose Compute the FFT of the input.Library TransformsDescription The FFT block computes the fast Fourier transform (FFT) of each channel
FFT5-174dimension to a power-of-two length. Also, to get valid outputs, your inputs must be in linear order. Valid Block Inputs•Real- or complex-value
FFT5-175Click here in the MATLAB Help Browser to open a Simulink model based on the following diagram. 12 324 636 9481210 20 3022i+– 44i+– 66i+–2– 4–
FFT5-176Ordering Output Column Entries (Output in bit-reversed order Parameter)Set the Output in bit-reversed order parameter as follows to indicate t
FFT5-177Description of Bit-Reversed Ordering. Two numbers are bit-reversed values of each other when the binary representation of one is the mirror im
FFT5-178 in Equation 5-2. This parameter has two settings, each with its advantages and disadvantages, as described in the following table.Optimizing
FFT5-179the table of trigonometric values for speed or memory by varying the number of table entries as summarized in the following table.Algorithms U
FFT5-180convolve signals by taking the FFT of time domain data, multiplying frequency-domain data, and inputting the product to an IFFT block. The fol
FFT5-181Dialog BoxTwiddle factor computationComputation method of the term in Equation 5-2. In Table lookup mode, the block computes and stores the s
FFT5-182See AlsoComplex Cepstrum DSP BlocksetDCT DSP BlocksetIFFT DSP BlocksetPad DSP BlocksetZero Pad DSP BlocksetbitrevorderSignal Processing Toolbo
2 Simulink and the DSP Blockset2-10Running a Simulation from an M-File. You can also modify and run a Simulink simulation from within a MATLAB M-file.
Filter Realization Wizard5-1835Filter Realization WizardPurpose Automatically construct filter realizations using Sum, Gain, and Unit Delay blocks.Lib
Filter Realization Wizard5-184Fixed-Point OptionsBy default, the filter constructed by the Filter Realization Wizard operates using the Simulink stand
Filter Realization Wizard5-185Example 1: Direct Form IIDesign an fourth-order, quarter-band, lowpass Butterworth filter:1 At the MATLAB command line,
Filter Realization Wizard5-1866 Double-click the new Butter LPF block to see the Direct-Form II filter realization that the Wizard created.Example 2:
Filter Realization Wizard5-1873 Type a name for the new filter subsystem in the Block Name field. The example uses Butter SOS.4 Press the Build button
Filter Realization Wizard5-188Numerator field. The two filter sections do not need to have the same order.- Type {a1,a2} in the Denominator text field
Filter Realization Wizard5-189[k,v] = tf2latc(b,a);Configure the Wizard to use k and v as the coefficients of the lattice design:- Select Lattice (ARM
Filter Realization Wizard5-190Dialog BoxThe parameters displayed in the Architecture panel vary for different selections in the Type menu. Only a port
Filter Realization Wizard5-191Lattice CoeffsThe lattice coefficients for the lattice MA/AR/ARMA structures, specified as a vector or variable name.Lad
Filter Realization Wizard5-192Supported Data TypesSee AlsoSee “Designing Filters with Various Filter Structures” on page 4-6 for related information.F
Configuring Simulink for DSP Systems2-11Configuring Simulink for DSP SystemsWhen you create a new DSP model, you may want to adjust certain Simulink s
FIR Decimation5-1935FIR DecimationPurpose Filter and downsample an input signal.Library Filtering / Multirate FiltersDescription The FIR Decimation bl
FIR Decimation5-194•Maintain input frame sizeThe block generates the output at the slower (decimated) rate by using a proportionally longer frame peri
FIR Decimation5-195LatencyZero Latency. The FIR Decimation block has zero tasking latency for all single-rate operations. The block is single-rate for
FIR Decimation5-196samples K+1, 2K+1, and so on. See the example below for an illustration of this case.See “Excess Algorithmic Delay (Tasking Latency
FIR Decimation5-197The filter coefficient vector generated by fir1(3,0.25) is[0.0386 0.4614 0.4614 0.0386]or, equivalently,•Configure the Probe blocks
FIR Decimation5-198Dialog BoxFIR filter coefficientsThe lowpass FIR filter coefficients, in descending powers of z.Decimation factorThe integer factor
FIR Decimation5-199•“Multirate Filters” on page 4-9
FIR Interpolation5-2005FIR InterpolationPurpose Upsample and filter an input signal.Library Filtering / Multirate FiltersDescription The FIR Interpola
FIR Interpolation5-201•Maintain input frame sizeThe block generates the output at the faster (interpolated) rate by using a proportionally shorter fra
FIR Interpolation5-202LatencyZero Latency. The FIR Interpolation block has zero tasking latency for all single-rate operations. The block is single-ra
2 Simulink and the DSP Blockset2-12Using dspstartup.mThere are two ways to use the dspstartup M-file to preconfigure Simulink for DSP simulations: •Ru
FIR Interpolation5-203input matrix) appears in the output as sample Mi+1, followed by L-1 interpolated values, the second filtered input sample, and s
FIR Interpolation5-204The filter coefficient vector generated by fir1(3,0.25) is[0.0386 0.4614 0.4614 0.0386]or, equivalently,•Configure the Probe blo
FIR Interpolation5-205Dialog BoxFIR filter coefficientsThe FIR filter coefficients, in descending powers of z.Interpolation factorThe integer factor,
FIR Interpolation5-206•“Multirate Filters” on page 4-9
FIR Rate Conversion5-2075FIR Rate ConversionPurpose Upsample, filter, and downsample an input signal.Library Filtering / Multirate FiltersDescription
FIR Rate Conversion5-208Frame-Based OperationThis block accepts only frame-based inputs. An Mi-by-N frame-based matrix input is treated as N independe
FIR Rate Conversion5-209Diagnostics An error is generated if the relation between K and L shown above is not satisfied.(Input port width)/(Output port
FIR Rate Conversion5-210Supported Data TypesSee AlsoSee the following sections for related information:•“Converting Sample Rates and Frame Rates” on p
Flip5-2115FlipPurpose Flip the input vertically or horizontally.Library Signal Management / IndexingDescription The Flip block vertically or horizonta
Flip5-212Supported Data TypesSee AlsoFixed-pointCustom data typesBoolean8-, 16-, and 32-bit signed integer 8-, 16-, and 32-bit unsigned integerSingle-
Configuring Simulink for DSP Systems2-13Performance-Related SettingsA number of the settings in the dspstartup M-file are chosen to improve the perfor
Forward Substitution5-2135Forward SubstitutionPurpose Solve the equation LX=B for X when L is a lower triangular matrix.Library Math Functions / Matri
Forward Substitution5-214See “Solving Linear Systems” on page 4-16 for related information.
Frame Status Conversion5-2155Frame Status ConversionPurpose Specify the frame status of the output, sample-based or frame-based.Library Signal Managem
Frame Status Conversion5-216Supported Data TypesSee AlsoFixed-pointCustom data typesBoolean8-, 16-, and 32-bit signed integer 8-, 16-, and 32-bit unsi
From Wave Device5-2175From Wave DevicePurpose Read audio data from a standard audio device in real-time. (Windows 95/98/NT only)Library DSP SourcesDes
From Wave Device5-218The Sample Width (bits) parameter specifies the number of bits used to represent the signal samples read by the audio device. Two
From Wave Device5-219the signal sample rate was 8 kHz, this small buffer could hold approximately 0.005 second of data.)If the simulation throughput r
From Wave Device5-220length, the frame size, and the speed of the simulation. Note that increasing the buffer size may increase model latency.•Increas
From Wave Device5-221Sample rate (Hz)The sample rate of the audio data to be acquired. Select one of the standard Windows rates or the User-defined op
From Wave File5-2225From Wave FilePurpose Read audio data from a Microsoft Wave (.wav) file. (Windows 95/98/NT only)Library DSP SourcesDescription The
2 Simulink and the DSP Blockset2-14duration of the simulation. Simulink additionally precomputes the outputs of all downstream blocks driven exclusive
From Wave File5-223Dialog BoxFile nameThe path and name of the file to read. Paths can be relative or absolute.Samples per output frameThe number of s
Histogram5-2245HistogramPurpose Generate the histogram of an input or sequence of inputs.Library StatisticsDescription The Histogram block computes th
Histogram5-225For convenience, length-M 1-D vector inputs and sample-based length-M row vector inputs are both treated as M-by-1 column vectors.The ou
Histogram5-226•Normalized = •Running histogram = The resulting bin width is 4, as shown below.Dialog BoxMinimum value of inputThe lower boundary, Bm,
Histogram5-227Maximum value of inputThe upper boundary, BM, of the highest-valued bin.Number of binsThe number of bins, n, in the histogram.Normalized
IDCT5-2285IDCTPurpose Compute the IDCT of the input.Library TransformsDescription The IDCT block computes the inverse discrete cosine transform (IDCT)
IDCT5-229Dialog BoxSupported Data TypesSee AlsoDouble-precision floating point DCT DSP BlocksetIFFT DSP BlocksetidctSignal Processing Toolbox
Identity Matrix5-2305Identity MatrixPurpose Generate a matrix with ones on the main diagonal and zeros elsewhere.Library DSP Sources,Math Functions /
Identity Matrix5-231Dialog BoxInherit input port attributes from input portEnables the input port when selected. The output inherits its dimensions an
IFFT5-2325IFFTPurpose Compute the IFFT of the input.Library TransformsDescription The IFFT block computes the inverse fast Fourier transform (IFFT) of
Configuring Simulink for DSP Systems2-15of servicing the loop in cases when inline code can be used with only a modest increase in the file size.Howev
IFFT5-233Input and Output CharacteristicsThe following table describes all valid block input types, their corresponding outputs, and the dimension alo
IFFT5-234Valid Block Inputs•Must be complex-valued•M must be a power of two•In linear or bit-reversed orderDimension Along Which Block Computes IDFTCo
IFFT5-235Click here in the MATLAB Help Browser to open a Simulink model based on the following diagram. Conjugate Symmetric InputWhen the block input
IFFT5-236The block output is invalid if you set this parameter when the input is not conjugate symmetric.Inputs in Bit-Reversed OrderWhen the block in
IFFT5-237Example For an example of how to optimize computations when using both the IFFT block and FFT block in the same model, see the FFT block refe
IFFT5-238values before the simulation starts. In Trigonometric fcn mode, the block computes the sine and cosine values during the simulation. Optimize
Inherit Complexity5-2395Inherit ComplexityPurpose Change the complexity of the input to match that of a reference signal.Library Signal Management / S
Inherit Complexity5-240Dialog BoxSupported Data TypesSee AlsoFixed-pointCustom data typesBoolean8-, 16-, and 32-bit signed integer 8-, 16-, and 32-bit
Integer Delay5-2415Integer DelayPurpose Delay an input by an integer number of sample periods.Library Signal OperationsDescription The Integer Delay b
Integer Delay5-242the block generates the following sequence of matrices at the start of the simulation,where is the i,jth element of the kth matrix
ii Contents3Working with SignalsOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2Signal Concepts
2 Simulink and the DSP Blockset2-16
Integer Delay5-243of the array are output in sequence, one at each sample time of the initial delay. For a 2-by-3 input, and the parameters below,the
Integer Delay5-244The Initial conditions parameter specifies the output during the initial delay. Both fixed and time-varying initial conditions can b
Integer Delay5-245- When the all elements of the delay entry are greater than the input frame size,D = d + input frame size - 1 Only the first d entri
Integer Delay5-246the block outputs the following sequence of frames at the start of the simulation.Note that the channels have distinct time varying
Integer Delay5-247Dialog BoxDelayThe number of sample periods to delay the input signal.Initial conditionsThe value of the block’s output during the i
Integer Delay5-248Supported Data TypesSee AlsoFixed-pointCustom data typesBoolean8-, 16-, and 32-bit signed integer 8-, 16-, and 32-bit unsigned integ
Kalman Adaptive Filter5-2495Kalman Adaptive FilterPurpose Compute filter estimates for an input using the Kalman adaptive filter algorithm.Library Fil
Kalman Adaptive Filter5-250The variables are as follows. The correlation matrices, QM and QP, are specified in the parameter dialog box by scalar vari
Kalman Adaptive Filter5-251An optional Adapt input port is added when the Adapt input check box is selected in the dialog box. When this port is enabl
Kalman Adaptive Filter5-252Dialog BoxFIR filter lengthThe length of the FIR filter.Measurement noise varianceThe value to appear along the diagonal of
3 Working with SignalsOverview . . . . . . . . . . . . . . . . . . . . . 3-2Signal Concepts . . .
Kalman Adaptive Filter5-253Supported Data TypesSee AlsoSee “Adaptive Filters” on page 4-3 for related information.Double-precision floating point LMS
LDL Factorization5-2545LDL FactorizationPurpose Factor a square Hermitian positive definite matrix into lower, upper, and diagonal components.Library
LDL Factorization5-255The following options are available:•Ignore – Proceed with the computation and do not issue an alert. The output is not a valid
LDL Factorization5-256Supported Data TypesSee AlsoSee “Factoring Matrices” on page 4-17 for related information.Double-precision floating point Choles
LDL Inverse5-2575LDL InversePurpose Compute the inverse of a Hermitian positive definite matrix using LDL factorization.Library Math Functions / Matri
LDL Inverse5-258Non-positive definite inputResponse to non-positive definite matrix inputs. Tunable.References Golub, G. H., and C. F. Van Loan. Matri
LDL Solver5-2595LDL SolverPurpose Solve the equation SX=B for X when S is a square Hermitian positive definite matrix.Library Math Functions / Matrice
LDL Solver5-2601 Substitute2 Substitute3 Solve one diagonal and two triangular systems.Dialog BoxNon-positive definite inputResponse to non-positive d
Least Squares Polynomial Fit5-2615Least Squares Polynomial FitPurpose Compute the coefficients of the polynomial that best fits the input data in a le
Least Squares Polynomial Fit5-262to generate four values of dependent variable y from four values of independent variable u, received at the top port.
3 Working with Signals3-2OverviewThe first part of this chapter will help you understand how signals are represented in Simulink. It covers a number o
Least Squares Polynomial Fit5-263Supported Data TypesSee AlsoDouble-precision floating point Detrend DSP BlocksetPolynomial Evaluation DSP BlocksetPol
Levinson-Durbin5-2645Levinson-DurbinPurpose Solve a linear system of equations using Levinson-Durbin recursion.Library Math Functions / Matrices and L
Levinson-Durbin5-265The prediction error power, P, (a scalar), is output when the Output prediction error power (P) check box is selected. P represen
Levinson-Durbin5-266average (MA) process (or FIR filter) that predicts the next value of a signal from the current signal sample and a finite number o
Levinson-Durbin5-267Output prediction error power (P)When selected, the block outputs the prediction error at portP.If the value of lag 0 is zero, A=[
LMS Adaptive Filter5-2685LMS Adaptive FilterPurpose Compute filter estimates for an input using the LMS adaptive filter algorithm.Library Filtering /
LMS Adaptive Filter5-269scalars. The signal at the Out port is a scalar, while the signal at the Taps port is a sample-based vector. An optional Adapt
LMS Adaptive Filter5-270Dialog BoxFIR filter lengthThe length of the FIR filter.Step-sizeThe step size, usually in the range (0, 2). Tunable.Initial v
LMS Adaptive Filter5-271See AlsoSee “Adaptive Filters” on page 4-3 for related information.Kalman Adaptive Filter DSP BlocksetRLS Adaptive Filter DSP
LU Factorization5-2725LU FactorizationPurpose Factor a square matrix into lower and upper triangular components.Library Math Functions / Matrices and
Signal Concepts3-3Signal ConceptsSimulink models can process both discrete-time and continuous-time signals, although models that are built with the D
LU Factorization5-273Dialog BoxReferencesGolub, G. H., and C. F. Van Loan. Matrix Computations. 3rd ed. Baltimore, MD: Johns Hopkins University Press,
LU Inverse5-2745LU InversePurpose Compute the inverse of a square matrix using LU factorization.Library Math Functions / Matrices and Linear Algebra /
LU Solver5-2755LU SolverPurpose Solve the equation AX=B for X when A is a square matrix.Library Math Functions / Matrices and Linear Algebra / Linear
LU Solver5-276Supported Data TypesSee AlsoSee “Solving Linear Systems” on page 4-16 for related information.Double-precision floating point Autocorrel
Magnitude FFT5-2775Magnitude FFTPurpose Compute a nonparametric estimate of the spectrum using the periodogram method.Library Estimation / Power Spect
Magnitude FFT5-278Dialog BoxOutputDetermines whether the block computes the magnitude FFT (Magnitude) or magnitude-squared FFT (Magnitude squared) of
Magnitude FFT5-279See AlsoSee “Power Spectrum Estimation” on page 4-15 for related information.Burg Method DSP BlocksetShort-Time FFT DSP BlocksetSpec
Matrix 1-Norm5-2805Matrix 1-NormPurpose Compute the 1-norm of a matrix.Library Math Functions / Matrices and Linear Algebra / Matrix OperationsDescrip
Matrix 1-Norm5-281Supported Data TypesSee AlsoDouble-precision floating point Normalization DSP BlocksetReciprocal Condition DSP BlocksetnormMATLAB
Matrix Multiply5-2825Matrix MultiplyPurpose Multiply input matrices.Library Math Functions / Matrices and Linear Algebra / Matrix Operations Descripti
3 Working with Signals3-4The following sections provide definitions for a number of terms commonly used to describe the time and frequency characteris
Matrix Multiply5-283See AlsoDot Product SimulinkMatrix Product DSP BlocksetMatrix Scaling DSP BlocksetProduct Simulink
Matrix Product5-2845Matrix ProductPurpose Multiply the elements of a matrix along rows or columns.Library Math Functions / Matrices and Linear Algebra
Matrix Product5-285Dialog BoxMultiply alongThe dimension of the matrix along which to multiply, row or column.Supported Data TypesSee AlsoDouble-preci
Matrix Scaling5-2865Matrix ScalingPurpose Scale the rows or columns of a matrix by a specified vector.Library Math Functions / Matrices and Linear Alg
Matrix Scaling5-287Dialog BoxModeThe mode of operation, row scaling or column scaling. Tunable.Supported Data TypesSee AlsoSingle-precision floating p
Matrix Square5-2885Matrix SquarePurpose Compute the square of the input matrix.Library Math Functions / Matrices and Linear Algebra / Matrix Operation
Matrix Square5-289See AlsoMatrix Multiply DSP BlocksetMatrix Product DSP BlocksetMatrix Sum DSP BlocksetTranspose DSP Blockset
Matrix Sum5-2905Matrix SumPurpose Sum the elements of a matrix along rows or columns.Library Math Functions / Matrices and Linear Algebra / Matrix Ope
Matrix Sum5-291Dialog BoxSum alongThe dimension of the matrix to sum along, row or column.Supported Data TypesSee AlsoSingle-precision floating pointD
Matrix Viewer5-2925Matrix ViewerPurpose Display a matrix as a color image.Library DSP SinksDescription The Matrix Viewer block displays an M-by-N matr
Signal Concepts3-5Note In the block dialog boxes, the term sample time is used to refer to the sample period, Ts. An example is the Sample time param
Matrix Viewer5-293Axis PropertiesClick on the Axis properties check box to expose the axis property parameters, which control labeling and positioning
Matrix Viewer5-2941 to N (number of columns), and the y-axis is numbered from 1 to M (number of rows).In addition to the standard MATLAB figure window
Matrix Viewer5-295Dialog BoxImage propertiesSelect to expose the image property parameters. Tunable.Colormap matrixA 3-column matrix defining the colo
Matrix Viewer5-296Maximum input valueThe input value to be mapped to the color defined in the last row of the colormap matrix. Select Autoscale from t
Matrix Viewer5-297Supported Data TypesSee AlsoSee “Viewing Signals” on page 3-80 for related information.Fixed-pointCustom data typesBoolean8-, 16-, a
Maximum5-2985MaximumPurpose Find the maximum values in an input or sequence of inputs.Library StatisticsDescription The Maximum block identifies the v
Maximum5-299and outputs the sample-based 1-by-N index vector, idx. Each value in idx is an integer in the range[1 M] indexing the maximum value in the
Maximum5-300For sample-based inputs, a reset event causes the running maximum for each channel to be initialized to the value in the corresponding cha
Maximum5-301The block’s operation is shown in the figure below.The statsdem demo illustrates the operation of several blocks from the Statistics libra
Maximum5-302index (Value and index), or track the maximum value of the input sequence over time (Running).Reset portSpecifies the reset event detected
3 Working with Signals3-6The following sections explain the parameters available in this dialog box:•“Recommended Settings for Discrete-Time Simulatio
Mean5-3035MeanPurpose Find the mean value of an input or sequence of inputs.Library StatisticsDescription The Mean block computes the mean of each col
Mean5-304element yij containing the mean value of the jth column over all inputs since the last reset, up to and including element uij of the current
Mean5-305The Discrete Impulse block has the following settings:•Delay (samples) = 2•Sample time = 1•Samples per frame = 1The block’s operation is show
Mean5-306Running meanEnables running operation when selected.Reset portEnables the Rst input port when set to Non-zero sample, and disables the Rst in
Median5-3075MedianPurpose Find the median value of an input.Library StatisticsDescription The Median block computes the median value of each column in
Median5-308See AlsoMaximum DSP BlocksetMean DSP BlocksetMinimum DSP BlocksetSort DSP BlocksetStandard Deviation DSP BlocksetVariance DSP Blocksetmedia
Minimum5-3095MinimumPurpose Find the minimum values in an input or sequence of inputs.Library StatisticsDescription The Minimum block identifies the v
Minimum5-310and outputs the sample-based 1-by-N index vector, idx. Each value in idx is an integer in the range[1 M] indexing the minimum value in the
Minimum5-311The Minimum block has the following settings:•Mode = Running•Reset port = Non-zero sampleThe Signal From Workspace block has the following
Minimum5-312Dialog BoxModeThe block’s mode of operation: Output the minimum value of each input (Value), the index of the minimum value (Index), both
Signal Concepts3-7Additional Settings for Discrete-Time Simulations. It is worthwhile to know how the other solver options available in Simulink affec
Minimum5-313Supported Data TypesSee AlsoDouble-precision floating point Maximum DSP BlocksetMean DSP BlocksetMinMax SimulinkHistogram DSP BlocksetminM
Modified Covariance AR Estimator5-3145Modified Covariance AR EstimatorPurpose Compute an estimate of AR model parameters using the modified covariance
Modified Covariance AR Estimator5-315Marple, S. L., Jr., Digital Spectral Analysis with Applications. Englewood Cliffs, NJ: Prentice-Hall, 1987.Suppor
Modified Covariance Method5-3165Modified Covariance MethodPurpose Compute a parametric spectral estimate using the modified covariance method.Library
Modified Covariance Method5-317Dialog BoxEstimation orderThe order of the AR model. Inherit FFT length from input dimensionsWhen selected, uses the in
Modified Covariance Method5-318See “Power Spectrum Estimation” on page 4-15 for related information.
Multiphase Clock5-3195Multiphase ClockPurpose Generate multiple binary clock signals.Library Signal Management / Switches and CountersDescription The
Multiphase Clock5-320The Scope window below shows the Multiphase Clock block’s output for these settings. Note that the first active level appears at
Multiphase Clock5-321Dialog BoxClock frequencyThe frequency of all output clock signals.Number of phasesThe number of different phases, N, in the outp
Multiport Selector5-3225Multiport SelectorPurpose Distribute arbitrary subsets of input rows or columns to multiple output ports.Library Signal Manage
3 Working with Signals3-8Note In the recommended dspstartup settings, SingleTask rate transition is set to Error in the Diagnostics pane in the Simul
Multiport Selector5-323Example Consider the following Indices to output cell array: {4,[1:2 5],[7;8],10:-1:6}This is a four-cell array, which requires
Multiport Selector5-324Invalid indexResponse to an invalid index value. Tunable.Supported Data TypesSee AlsoFixed-pointCustom data typesBoolean8-, 16-
N-Sample Enable5-3255N-Sample EnablePurpose Output ones or zeros for a specified number of sample times.Library DSP Sources,Signal Management / Switch
N-Sample Enable5-326Trigger countThe number of samples for which the block outputs the active value. Tunable.Active levelThe value to output after the
N-Sample Switch5-3275N-Sample SwitchPurpose Switch between two inputs after a specified number of sample periods.Library Signal Management / Switches
N-Sample Switch5-328Dialog BoxSwitch countThe number of sample periods, N, for which the output is connected to the top input before switching to the
Normalization5-3295NormalizationPurpose Normalize an input by its 2-norm or squared 2-norm.Library Math Functions / Math OperationsDescription The Nor
Normalization5-330The output has the same dimension and frame status as the input. For convenience, length-M 1-D vector inputs and sample-based length
Overlap-Add FFT Filter5-3315Overlap-Add FFT FilterPurpose Implement the overlap-add method of frequency-domain filtering.Library Filtering / Filter De
Overlap-Add FFT Filter5-332If either the filter coefficients or the inputs to the block are complex, the Output parameter should be set to Complex. Ot
Signal Concepts3-9moment inbetween because Simulink implicitly auto-promotes the rate of the slower signal to match the rate of the faster signal befo
Overlap-Add FFT Filter5-333Dialog BoxFFT sizeThe size of the FFT, which should be a power-of-two value greater than the length of the specified FIR fi
Overlap-Save FFT Filter5-3345Overlap-Save FFT FilterPurpose Implement the overlap-save method of frequency-domain filtering.Library Filtering / Filter
Overlap-Save FFT Filter5-335The circular convolution of each section is computed by multiplying the FFTs of the input section and filter coefficients,
Overlap-Save FFT Filter5-336FFT sizeThe size of the FFT, which should be a power-of-two value greater than the length of the specified FIR filter.FIR
Pad5-3375PadPurpose Alter the input size by padding or truncating rows and/or columns.Library Signal OperationsDescription The Pad block changes the s
Pad5-338Number of output rowsThe desired number of rows in the output, Mo. This parameter is enabled when Columns or Columns and rows is selected in t
Permute Matrix5-3395Permute MatrixPurpose Reorder the rows or columns of a matrix. Library Math Functions / Matrices and Linear Algebra / Matrix Opera
Permute Matrix5-340When length of the permutation vector P is not equal to the number of rows or columns of the input matrix A, you can choose to get
Permute Matrix5-341Dialog BoxPermuteMethod of constructing the output matrix; by permuting rows or columns of the input.Invalid permutation indexRespo
Permute Matrix5-342See “Reordering Channels in a Frame-Based Multichannel Signal” on page 3-61 for related information.
iiiDisplaying Signals in the Time-Domain . . . . . . . . . . . . . . . . . . 3-80Displaying Signals in the Frequency-Domain . . . . . . . . . . . .
3 Working with Signals3-10discrete-time blocks, you may need to interpose a Zero-Order Hold block to discretize the signal (see the following diagram)
Polynomial Evaluation5-3435Polynomial EvaluationPurpose Evaluate a polynomial expression. Library Math Functions / Polynomial FunctionsDescription The
Polynomial Evaluation5-344Dialog BoxUse constant coefficientsWhen selected, enables the Constant coefficients parameter and disables the Coeffs input
Polynomial Stability Test5-3455Polynomial Stability TestPurpose Determine whether all roots of the input polynomial are inside the unit circle using t
Polynomial Stability Test5-346typical in DSP applications, the transfer function above is specified in descending powers of z-1 rather than z. Dialog
Pseudoinverse5-3475PseudoinversePurpose Compute the Moore-Penrose pseudoinverse of a matrix.Library Math Functions / Matrices and Linear Algebra / Mat
Pseudoinverse5-348See AlsoSee “Inverting Matrices” on page 4-19 for related information.Cholesky Inverse DSP BlocksetLDL Inverse DSP BlocksetLU Invers
QR Factorization5-3495QR FactorizationPurpose Factor a rectangular matrix into unitary and upper triangular components.Library Math Functions / Matric
QR Factorization5-350Dialog BoxReferencesGolub, G. H., and C. F. Van Loan. Matrix Computations. 3rd ed. Baltimore, MD: Johns Hopkins University Press,
QR Solver5-3515QR SolverPurpose Find a minimum-norm-residual solution to the equation AX=B.Library Math Functions / Matrices and Linear Algebra / Line
QR Solver5-352is solved for X by noting that Q-1=Q* and substituting Y =Q*Be. This requires computing a matrix multiplication for Y and solving a tria
Signal Concepts3-11Multichannel SignalsThe following figure shows the prototypical discrete-time signal discussed in “Discrete-Time Signals” on page 3
Queue5-3535QueuePurpose Store inputs in a FIFO register.Library Signal Management / BuffersDescription The Queue block stores a sequence of input samp
Queue5-354the Queue block is reenabled; the Out port value is only reset to zero in this case if Clear output port on reset is selected.When two or mo
Queue5-355Examples Example 1The table below illustrates the Queue block’s operation for a Register size of 4, Trigger type of Either edge, and Clear o
Queue5-356Dialog BoxRegister sizeThe number of entries that the FIFO register can hold.Trigger typeThe type of event that triggers the block’s executi
Queue5-357Clear inputEnable the Clr input port, which empties the queue when the trigger specified by the Trigger type is received.Clear output port o
Random Source5-3585Random SourcePurpose Generate randomly distributed values.Library DSP SourcesDescription The Random Source block generates a frame
Random Source5-359Variance parameters generates an N-channel output (M-by-N frame matrix) containing a distinct random distribution in each column. Wh
Random Source5-360The specified variance is equally divided between the real and imaginary components, so thatOutput RepeatabilityThe Repeatability pa
Random Source5-361a five-channel output is equivalent to specifying an Initial seed vector of[1012141618]. For complex outputs (Output complexity para
Random Source5-362Dialog BoxSource typeThe distribution from which to draw the random values, Uniform or Gaussian.MinimumThe minimum value in the unif
3 Working with Signals3-12Then the signal in channel 1 is composed of the following sequence.Similarly, channel 9 (counting down the columns) contains
Random Source5-363MaximumThe maximum value in the uniform distribution. This parameter is only enabled when Uniform is selected from the Source type p
Random Source5-364Sample timeThe sample period, Ts, of the random output sequence. The output frame period is M∗Ts. This parameter is enabled when the
Real Cepstrum5-3655Real CepstrumPurpose Compute the real cepstrum of an input. Library TransformsDescription The Real Cepstrum block computes the real
Real Cepstrum5-366Inherit FFT length from input port dimensionsWhen selected, matches the output frame size to the input frame size.FFT lengthThe numb
Reciprocal Condition5-3675Reciprocal ConditionPurpose Compute the reciprocal condition of a square matrix in the 1-norm.Library Math Functions / Matri
Reciprocal Condition5-368Dialog BoxReferencesGolub, G. H., and C. F. Van Loan. Matrix Computations. 3rd ed. Baltimore, MD: Johns Hopkins University Pr
Repeat5-3695RepeatPurpose Resample an input at a higher rate by repeating values.Library Signal OperationsDescription The Repeat block upsamples each
Repeat5-370•Maintain input frame rateThe block generates the output at the faster (upsampled) rate by using a proportionally larger frame size than th
Repeat5-371The block also has zero latency for all multirate operations in Simulink’s single-tasking mode.Zero tasking latency means that the block re
Repeat5-372output frame period of 1 (0.25∗4). The first channel should contain the positive ramp signal 1, 2, ..., 100, and the second channel should
Signal Concepts3-13(or time slice) from N distinct signal channels, and each matrix column represents M consecutive samples from a single channel.This
Repeat5-373 14 -14 1 -1 1 -1 2 -2 2 -2 3 -3 3 -3 4 -4 4 -4 5 -5 5 -5Since w
Repeat5-374Frame-based modeFor frame-based operation, the method by which to implement the repetition (upsampling): Maintain input frame size (i.e., i
RLS Adaptive Filter5-3755RLS Adaptive FilterPurpose Compute filter estimates for an input using the RLS adaptive filter algorithm.Library Filtering /
RLS Adaptive Filter5-376The block icon has port labels corresponding to the inputs and outputs of the RLS algorithm. Note that inputs to the In and Er
RLS Adaptive Filter5-377Dialog BoxFIR filter lengthThe length of the FIR filter.Memory weighting factorThe exponential weighting factor, in the range
RLS Adaptive Filter5-378See “Adaptive Filters” on page 4-3 for related information.
RMS5-3795RMSPurpose Compute the root-mean-square (RMS) value of an input or sequence of inputs.Library StatisticsDescription The RMS block computes th
RMS5-380parameter to None.) For sample-based inputs, the running RMS for each channel is initialized to the value in the corresponding channel of the
RMS5-381Dialog BoxRunning RMSEnables running operation when selected.Reset portEnables the Rst input port when set to Non-zero sample, and disables th
RMS5-382See AlsoMean DSP BlocksetVariance DSP Blockset
3 Working with Signals3-14•“Importing Signals” on page 3-62•“Exporting Signals” on page 3-72•“Viewing Signals” on page 3-80Benefits of Frame-Based Pro
Sample and Hold5-3835Sample and HoldPurpose Sample and hold an input signal.Library Signal OperationsDescription The Sample and Hold block acquires th
Sample and Hold5-384Initial conditionThe block’s output prior to the first trigger event.Supported Data TypesSee AlsoFixed-pointCustom data typesBoole
Short-Time FFT5-3855Short-Time FFTPurpose Compute a nonparametric estimate of the spectrum using the short-time, fast Fourier transform (ST-FFT) metho
Short-Time FFT5-386Dialog BoxWindow typeThe type of window to apply. (See the Window Function block reference.) Tunable.Stopband attenuation in dBThe
Short-Time FFT5-387parameter is enabled when Inherit FFT length from input dimensions is not selected.Number of spectral averagesThe number of spectra
Signal From Workspace5-3885Signal From WorkspacePurpose Import a signal from the MATLAB workspace.Library DSP SourcesDescription The Signal From Works
Signal From Workspace5-389•If Cyclic Repetition is specified, the block repeats the signal from the beginning after generating the last frame. If ther
Signal From Workspace5-390The Samples per frame parameter is set to 1 for 3-D input.Dialog BoxSignalThe name of the MATLAB workspace variable from whi
Signal From Workspace5-391Form output after final data value bySpecifies the output after all of the specified signal samples have been generated. The
Signal To Workspace5-3925Signal To WorkspacePurpose Write simulation data to an array in MATLAB’s main workspace.Library DSP SinksDescription The Sign
Signal Concepts3-15It’s important to note that frame-based processing will introduce a certain amount of latency into a process due to the inherent la
Signal To Workspace5-393The Frames parameter sets the dimension of the output array to 2-D or 3-D for frame-based inputs. The block ignores this param
Signal To Workspace5-394Matching the Outputs of Signal To Workspace and To Workspace BlocksThe To Workspace block in Simulink’s Sinks Library and the
Signal To Workspace5-395The Example 1 block settings are as follows.input1 = cat(3, [1 1; -1 0], [2 1; -2 0],...,[11 1; -11 0])Example 2: Frame-Based
Signal To Workspace5-396frames (two samples per frame) by the end of the simulation. The frames are concatenated to create a 22-by-4 matrix, A, in the
Signal To Workspace5-397Dialog BoxVariable nameThe name of the array that holds the input data. Tunable.Limit data points to lastThe maximum number of
Sine Wave5-3985Sine WavePurpose Generate a continuous or discrete sine wave.Library DSP SourcesDescription The Sine Wave block generates a multichanne
Sine Wave5-399In all discrete modes (see below), the block buffers the sampled sinusoids into frames of size M, where M is specified by the Samples pe
Sine Wave5-400•DiscreteIn discrete mode, the block’s discrete-time output can be generated by directly evaluating the trigonometric function, by table
Sine Wave5-401Table Lookup. The table look-up method precomputes the unique samples of every output sinusoid at the start of the simulation, and recal
Sine Wave5-402This mode offers reduced computational load, but is subject to drift over time due to cumulative quantization error. Because the method
3 Working with Signals3-16Sample Rates and Frame Rates Sample rates are an important issue in most DSP models, especially in systems incorporating rat
Sine Wave5-403length must be the same as that specified for the Frequency and Phase parameters. Tunable; the amplitude values can be altered while a s
Sine Wave5-404Sample timeThe period with which the sine wave is sampled, Ts. The block’s output frame period is M∗Ts, where M is specified by the Samp
Singular Value Decomposition5-4055Singular Value DecompositionPurpose Factor a matrix using singular value decomposition.Library Math Functions / Matr
Singular Value Decomposition5-406References Golub, G. H., and C. F. Van Loan. Matrix Computations. 3rd ed. Baltimore, MD: Johns Hopkins University Pre
Sort5-4075SortPurpose Sort the elements in the input by value.Library StatisticsDescription The Sort block sorts the elements in each column of the in
Sort5-408Value and Index ModeWhen Mode is set to Value and Index, the block outputs both the sorted matrix, val, and the index matrix, idx.Dialog BoxM
Spectrum Scope5-4095Spectrum ScopePurpose Compute and display the short-time FFT of each input signal.Library DSP SinksDescription The Spectrum Scope
Spectrum Scope5-410the number of samples on which to perform the FFT. The block zero pads or truncates every channel’s buffer to Nfft before computing
Spectrum Scope5-411For information about the scope window, as well as the Display properties, Axis properties, and Line properties panels in the dialo
Spectrum Scope5-412FFT lengthThe number of samples on which to perform the FFT. If the FFT length differs from the buffer size, the data is zero-padde
Sample Rates and Frame Rates3-17where Mi and Mo are the input and output frame sizes, respectively.The illustration below shows a one-channel frame-ba
Stack5-4135StackPurpose Store inputs into a LIFO register.Library Signal Management / BuffersDescription The Stack block stores a sequence of input sa
Stack5-414When two or more of the control input ports are triggered at the same time step, the operations are executed in the following order:1 Clr 2
Stack5-415represents a distinct trigger event. A 1 in the Empty column indicates an empty buffer, while a1 in the Full column indicates a full buffer.
Stack5-416Dialog BoxStack depthThe number of entries that the LIFO register can hold.Trigger typeThe type of event that triggers the block’s execution
Stack5-417Clear inputEnable the Clr input port, which empties the stack when the trigger specified by the Trigger type is received.Clear output port o
Standard Deviation5-4185Standard DeviationPurpose Find the standard deviation of an input or sequence of inputs.Library StatisticsDescription The Stan
Standard Deviation5-419Running OperationWhen the Running standard deviation check box is selected, the block tracks the standard deviation of each cha
Standard Deviation5-420whereu = [6 1 3 -7 2 5 8 0 -1 -3 2 1;1 3 9 2 4 1 6 2 5 0 4 17]'The Discrete Impulse block has the following settings:•Dela
Standard Deviation5-421Dialog BoxRunning standard deviationEnables running operation when selected.Reset portEnables the Rst input port when set to No
Submatrix5-4225SubmatrixPurpose Select a subset of elements (submatrix) from a matrix input.Library Math Functions / Matrices and Linear Algebra / Mat
3 Working with Signals3-18The block displays the label Ts or Tf, followed by a two-element vector. The first (left) element is the period of the signa
Submatrix5-423The Row, Column, Starting row or Starting column can be specified in six ways:•FirstFor rows, this specifies that the first row of u sho
Submatrix5-424columns are to be included, this is equivalent to y(1,:) = u(M/2-firstrow,:).For columns, this specifies that the column ofu offset from
Submatrix5-425•LastFor rows, this specifies that the last row of u should be used as the last row ofy. If all columns are to be included, this is equi
Submatrix5-426The figure below shows the operation for a 5-by-7 matrix with random integer elements, randint(5,7,10).There are often several possible
Submatrix5-427Row spanThe range of input rows to be retained in the output. Options are All rows, One row, or Range of rows. Row/Starting rowThe input
Submatrix5-428Column/Starting columnThe input column to be used as the first column of the output. Column is enabled when One column is selected from
Submatrix5-429See AlsoSee “Deconstructing Signals” on page 3-54 for related information.Reshape SimulinkSelector SimulinkVariable Selector DSP Blockse
SVD Solver5-4305SVD SolverPurpose Solve the equation AX=B using singular value decomposition.Library Math Functions / Matrices and Linear Algebra / Li
SVD Solver5-431See AlsoSee “Solving Linear Systems” on page 4-16 for related information.Autocorrelation LPC DSP BlocksetCholesky Solver DSP BlocksetL
Time Scope5-4325Time ScopeThe Time Scope block is the same as the Scope block in Simulink. To learn how to use the Time Scope block, see the Scope blo
Sample Rates and Frame Rates3-19Note that the sample rate conversion is implemented through a change in the frame period rather than the frame size. T
Time-Varying Direct-Form II Transpose Filter5-4335Time-Varying Direct-Form II Transpose FilterPurpose Apply a variable IIR filter to the input.Library
Time-Varying Direct-Form II Transpose Filter5-434•Pole-zeroThe block accepts inputs for both the numerator (Num) and denominator (Den) vectors. Input
Time-Varying Direct-Form II Transpose Filter5-435•VectorThe vector has a length equal to the number of delay elements in each filter channel, max(m,n)
Time-Varying Direct-Form II Transpose Filter5-436Dialog BoxFilter typeThe type of filter to apply: Pole-Zero (IIR), All-Zero (FIR), or All-Pole (AR).
Time-Varying Direct-Form II Transpose Filter5-437See AlsoSee “Designing Filters with Various Filter Structures” on page 4-6 for related information.Di
Time-Varying Lattice Filter5-4385Time-Varying Lattice FilterPurpose Apply a variable lattice filter to the input.Library Filtering / Filter DesignsDes
Time-Varying Lattice Filter5-439The Initial conditions parameter may take one of four forms:•Empty matrixThe empty matrix, [], causes a zero (0) initi
Time-Varying Lattice Filter5-440Dialog BoxFilter typeThe type of filter to apply: MA or AR. The MA or AR input port is enabled or disabled appropriate
Time-Varying Lattice Filter5-441See “Designing Filters with Various Filter Structures” on page 4-6 for related information.
Toeplitz5-4425ToeplitzPurpose Generate a matrix with Toeplitz symmetry.Library Math Functions / Matrices and Linear Algebra / Matrix OperationsDescrip
iv ContentsQueues Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26Sigma-Delta A/D Conversion Demo . . . . .
3 Working with Signals3-20Because the Frame-based mode parameter in the Upsample blocks is set to Maintain input frame size rather than Maintain input
Toeplitz5-443The output has the same frame status as the input.Dialog BoxSymmetricWhen selected, enables the single-input configuration for symmetric
To Wave Device5-4445To Wave DevicePurpose Send audio data to a standard audio device in real-time (Windows only).Library DSP SinksDescription The To W
To Wave Device5-445BufferingBecause the audio device generates real-time audio output, Simulink must maintain a continuous flow of data to the device
To Wave Device5-446the hardware throughput rate is higher than the simulation throughput rate, and the buffer tends to empty over the duration of the
To Wave Device5-447signal to be preloaded into the hardware buffer. A value of 0 for the Initial output delay parameter specifies the smallest possibl
To Wave Device5-448a value of 2 selects the second audio card, and so on. Select Use default audio device if the system has only a single audio card i
To Wave File5-4495To Wave FilePurpose Write audio data to file in the Microsoft Wave (.wav) format (Windows only).Library DSP SinksDescription The To
To Wave File5-450Dialog BoxFile nameThe path and name of the file to write. Paths can be relative or absolute. Tunable.Sample width (bits)The number o
Transpose5-4515TransposePurpose Compute the transpose of a matrix.Library Math Functions / Matrices and Linear Algebra / Matrix OperationsDescription
Transpose5-452Supported Data TypesSee AlsoFixed-pointCustom data typesBoolean8-, 16-, and 32-bit signed integer 8-, 16-, and 32-bit unsigned integerSi
Sample Rates and Frame Rates3-21•Direct rate conversionsDirect rate conversions, such as upsampling and downsampling, are a feature of most DSP system
Triggered Delay Line5-4535Triggered Delay LinePurpose Buffer a sequence of inputs into a frame-based output.Library Signal Management / BuffersDescrip
Triggered Delay Line5-454frame-based Mo-by-N matrix outputs, where Mo is the output frame size specified by the Delay line size parameter (i.e., the n
Triggered Delay Line5-455Supported Data TypesSee AlsoFixed-pointCustom data typesBoolean8-, 16-, and 32-bit signed integer 8-, 16-, and 32-bit unsigne
Triggered Signal From Workspace5-4565Triggered Signal From WorkspacePurpose Import signal samples from the MATLAB workspace when triggered.Library DSP
Triggered Signal From Workspace5-457interpolation takes place). For single-channel signals, the Initial output parameter value can be a vector of leng
Triggered Signal From Workspace5-458Dialog BoxSignalThe name of the MATLAB workspace variable from which to import the signal, or a valid MATLAB expre
Triggered Signal From Workspace5-459Supported Data TypesSee AlsoSee the sections below for related information:•“Discrete-Time Signals” on page 3-3•“M
Triggered To Workspace5-4605Triggered To WorkspacePurpose Write the input sample to the workspace when triggered.Library DSP SinksDescription The Trig
Triggered To Workspace5-461Parameters dialog. You can access these parameters by selecting Parameters from the Simulation menu, and clicking on the Wo
Triggered To Workspace5-462See AlsoSee “Exporting Signals” on page 3-72 for related information.Signal From Workspace DSP BlocksetTo Workspace Simulin
3 Working with Signals3-22Rate Conversion Blocks. The following table lists the principal rate conversion blocks in the DSP Blockset. Blocks marked wi
Unbuffer5-4635UnbufferPurpose Unbuffer a frame input to a sequence of scalar outputs.Library Signal Management / BuffersDescription The Unbuffer block
Unbuffer5-464LatencyZero Latency. The Unbuffer block has zero tasking latency in Simulink’s single-tasking mode. Zero tasking latency means that the f
Unbuffer5-465See “Excess Algorithmic Delay (Tasking Latency)” on page 3-91 and “The Simulation Parameters Dialog Box” in the Simulink documentation fo
Uniform Decoder5-4665Uniform DecoderPurpose Decode an integer input to a floating-point output.Library QuantizersDescription The Uniform Decoder block
Uniform Decoder5-467Signed input values, u, greater than 2B-1-1 or less than -2B-1 are wrapped back into that range using mod-2B arithmetic.u = (mod(u
Uniform Decoder5-468Dialog BoxPeakThe largest amplitude represented in the encoded input. To correctly decode values encoded with the Uniform Encoder
Uniform Decoder5-469See AlsoData Type Conversion SimulinkQuantizer SimulinkUniform Encoder DSP BlocksetudecodeSignal Processing ToolboxuencodeSignal P
Uniform Encoder5-4705Uniform EncoderPurpose Quantize and encode a floating-point input to an integer output.Library QuantizersDescription The Uniform
Uniform Encoder5-471Inputs can be real or complex, double or single precision. The output data types that the block uses are shown in the table below.
Uniform Encoder5-472The real and complex components of each input (horizontal axis) are independently quantized to one of 23 distinct levels in the ra
Sample Rates and Frame Rates3-23The sample period and frame size of the original signal are set to 0.125 seconds and 8 samples per frame, respectively
Uniform Encoder5-473Dialog BoxPeakThe largest input amplitude to be encoded, V. Real or imaginary input values greater than (1-21-B)V or less than -V
Unwrap5-4745UnwrapPurpose Unwrap the phase of a signal.Library Signal OperationsDescription The Unwrap block unwraps each input channel by adding or s
Unwrap5-475The Two Unwrap ModesYou must specify the unwrap mode by setting the parameter, Do not unwrap phase discontinuities between successive frame
Unwrap5-476Two Unwrap ModesIn both unwrap modes, the block adds to each input channel’s elements, where it updates k at each phase discontinuity. (F
Unwrap5-477The following diagrams illustrate how the two unwrap modes operate on various inputs.002π3----02– π3-----0002π3----04π3----06π3----08π3----
Unwrap5-478The block unwraps each row, treating each input row vector as completely independent of the other input row vectors.002π3----04π3----0002π3
Unwrap5-479Unwrap MethodThe Unwrap block unwraps each channel of its input matrix or input vector by adding to each successive channel element, and
Unwrap5-480diagram. For more on phase unwrap, see the previous section, “Unwrap Method” on page 5-479.
Unwrap5-481 0510152025300 2 4 6 8 10 12 14 16−50510152025300 pi 2pi 3pi 4pi 5pi 6pi0()sin2π5------4π5------6π5------…28π5----------si
Unwrap5-482Limitations The Unwrap block detects branch cut crossings, but can be fooled by sparse, rapidly changing phase values.Dialog Box02π 4π…,,,2
3 Working with Signals3-24As before, the frame rate of the original signal is 1 second (0.125∗8), shown by the first Probe block. Now the Downsample b
Unwrap5-483Do not unwrap phase discontinuities between successive framesWhen this parameter is cleared, the block unwraps each input’s channels (the i
Upsample5-4845UpsamplePurpose Resample an input at a higher rate by inserting zeros.Library Signal OperationsDescription The Upsample block resamples
Upsample5-485•Maintain input frame rateThe block generates the output at the faster (upsampled) rate by using a proportionally larger frame size than
Upsample5-486Latency and Initial ConditionsZero Latency. The Upsample block has zero tasking latency for all single-rate operations. The block is sing
Upsample5-487See “Excess Algorithmic Delay (Tasking Latency)” on page 3-91 and “The Simulation Parameters Dialog Box” in the Simulink documentation fo
Upsample5-488•Configure the Probe blocks by deselecting the Probe width and Probe complex signal check boxes (if desired).This model is multirate beca
Upsample5-489Dialog BoxUpsample factorThe integer factor, L, by which to increase the input sample rate. Sample offsetThe sample offset, D, which must
Upsample5-490See AlsoDownsample DSP BlocksetFIR Interpolation DSP BlocksetFIR Rate Conversion DSP BlocksetRepeat DSP Blockset
Variable Fractional Delay5-4915Variable Fractional DelayPurpose Delay an input by a time-varying fractional number of sample periods.Library Signal Op
Variable Fractional Delay5-492The input to the Delay port, v, contains floating-point values in the range 0 ≤ v ≤ D specifying the number of sample in
Sample Rates and Frame Rates3-25However, this is only true when the original signal is preserved in the buffering operation, with no samples added or
Variable Fractional Delay5-493Delay values less than 0 are clipped to 0, and delay values greater than D are clipped to D, where D is the Maximum dela
Variable Fractional Delay5-494For delay values less than P/2-1, the output is computed using linear interpolation. Delay values greater than D are cli
Variable Fractional Delay5-495Maximum delayThe maximum delay that the block can produce, D. Delay input values exceeding this maximum are clipped at t
Variable Integer Delay5-4965Variable Integer DelayPurpose Delay the input by a time-varying integer number of sample periods.Library Signal Operations
Variable Integer Delay5-497The Variable Integer Delay block stores the D+1 most recent samples received at the In port for each channel. At each sampl
Variable Integer Delay5-498Integer Delay block does not have a fixed initial delay period during which the initial conditions appear at the output. In
Variable Integer Delay5-499the block initializes U(2:6) with values [-1, -1, -1, 0, 1]. •Array of dimension M-by-N-by-D with which to initialize memor
Variable Integer Delay5-500sequence, the second sample in the current output frame is the input sample v(2) intervals earlier in the sequence, and so
Variable Integer Delay5-501Fixed Initial Conditions. The settings shown below specify fixed initial conditions. For a fixed initial condition, the blo
Variable Integer Delay5-502•Array of size 1-by-N-by-D. In this case, you can specify different time-varying initial conditions for each channel. For t
3 Working with Signals3-26The Buffer block preserves the signal’s data and sample period only when its Buffer overlap parameter is set to 0. The outpu
Variable Integer Delay5-503Maximum delayThe maximum delay that the block can produce for any sample. Delay input values exceeding this maximum are cli
Variable Selector5-5045Variable SelectorPurpose Select a subset of rows or columns from the input.Library Signal Management / IndexingDescription The
Variable Selector5-505•Clip index – Clip the index to the nearest valid value, and do not issue an alert. Example: For a 64-by-N input, an index of 72
Variable Selector5-506ElementsA vector containing the indices of the input rows or columns that will appear in the output matrix. This parameter is av
Variance5-5075VariancePurpose Compute the variance of an input or sequence of inputs.Library StatisticsDescription The Variance block computes the var
Variance5-508element yij containing the variance of element uij over all inputs since the last reset. For frame-based inputs, the output is a frame-ba
Variance5-509•Sample time = 1•Samples per frame = 1The block’s operation is shown in the figure below.The statsdem demo illustrates the operation of s
Variance5-510Reset portEnables the Rst input port when set to Non-zero sample, and disables the Rst input port when set to None.Supported Data TypesSe
Vector Scope5-5115Vector ScopePurpose Display a vector or matrix of time-domain, frequency-domain, or user-defined data.Library DSP SinksDescription T
Vector Scope5-512assume that it is time-domain or frequency-domain data. The dialog box parameters give you complete freedom to plot the data in the m
Sample Rates and Frame Rates3-27•Buffer adds duplicate samples to a sequence when the Buffer overlap parameter, L, is set to a nonzero value. The outp
Vector Scope5-513Scaling the Horizontal Axis for User-Defined SignalsTo correctly scale the horizontal axis for user-defined signals, the block needs
Vector Scope5-514•Each frame of frequency-domain data shares the same length as the frame of time-domain data from which it was generated; for example
Vector Scope5-515user-defined data, a Horizontal display span parameter serves the same function. Both of these parameters must be 1 or greater. See “
Vector Scope5-516to reposition it in the scope window; double click on the line label to edit the text. Note that when the simulation is rerun, the ne
Vector Scope5-517Minimum Y-limit and Maximum Y-limit set the range of the vertical axis. If Autoscale is selected from the right-click pop-up menu or
Vector Scope5-518Line PropertiesBoth the Vector Scope and Spectrum scope also offer a similar collection of line property settings. These can be expos
Vector Scope5-519For example, a five-channel signal would ordinarily generate all five plots with a solid line style. To instead plot each line with a
Vector Scope5-520These settings plot the signal channels with the following styles.Note that the first (leftmost) list item, '*', correspond
Vector Scope5-521These settings plot the signal channels in the following colors (8-bit RGB equivalents shown in the center column).Note that the firs
Vector Scope5-522•Save Position automatically updates the Scope position parameter in the Axis properties field to reflect the scope window’s current
3 Working with Signals3-28Example: Buffering with Alteration of the Signal. In the model below, a signal with a sample period of 0.125 seconds is rebu
Vector Scope5-523Dialog Box Scope Properties Dialog BoxScope propertiesSelect to expose Scope properties panel. Tunable.Input domainThe domain of the
Vector Scope5-524Display Properties Dialog BoxDisplay propertiesSelect to expose Display properties panel. Tunable.Show gridToggles the scope grid on
Vector Scope5-525Open scope immediatelyOpens the scope from the Vector Scope parameters dialog box while the simulation is running. The check box beco
Vector Scope5-526of frequency-domain data is the same as the length of the frame of time-domain data from which is was generated. (Visible when the In
Vector Scope5-527Line Properties Dialog BoxLine propertiesSelect to expose the Line Properties panel. Tunable.Line visibilitiesThe visibility of the v
Vector Scope5-528See AlsoSee “Viewing Signals” on page 3-80 for related information.Matrix Viewer DSP BlocksetSpectrum Scope DSP Blockset
Wavelet Analysis5-5295Wavelet AnalysisPurpose Decompose a signal into components of logarithmically decreasing frequency intervals and sample rates (r
Wavelet Analysis5-530Filter CoefficientsThe filter coefficients for the highpass and lowpass filters are computed by the Wavelet Toolbox function wfil
Wavelet Analysis5-531(except the last) are half that of the output from the previous level. In general, for an input with sample period Tsi=Ts, and ba
Wavelet Analysis5-532Frame-Based OperationAn Mi-by-N frame-based matrix input is treated as N independent channels, and the block filters each channel
Sample Rates and Frame Rates3-29To build the model, configure one Sine Wave block with Frequency = 1, and the other with Frequency = 2. In addition, b
Wavelet Analysis5-5332n-1 output samples, before propagating the first analyzed input sample (computed from the input received at t=0). See “Excess Al
Wavelet Analysis5-534References Fliege, N. J. Multirate Digital Signal Processing: Multirate Systems, Filter Banks, Wavelets. West Sussex, England: Jo
Wavelet Synthesis5-5355Wavelet SynthesisPurpose Reconstruct a signal from its multirate bandlimited components (requires the Wavelet Toolbox).Library
Wavelet Synthesis5-536For perfect reconstruction, the Wavelet Synthesis and Wavelet Analysis blocks must have the same parameter settings. Filter Coef
Wavelet Synthesis5-537Tree StructureThe wavelet tree structure has n+1 inputs, where n is the number of levels. The sample rate and bandwidth of the o
Wavelet Synthesis5-538The figure below shows the input and output sample periods for the four 64-channel sample-based inputs to a three-level filter b
Wavelet Synthesis5-539LatencyZero Latency. The Wavelet Synthesis block has no tasking latency for frame-based operation, which is always single-rate.
Wavelet Synthesis5-540Wavelet orderThe order for the Daubechies, Symlets, and Coiflets wavelets. This parameter is available only when one of these wa
Window Function5-5415Window FunctionPurpose Compute a window, and/or apply a window to an input signal.Library DSP Sources, Signal OperationsDescripti
Window Function5-542Window SamplingFor the generalized-cosine windows (Blackman, Hamming, and Hann), the Sampling parameter determines whether the win
vConstant Diagonal Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-82Constant Ramp . . . . . . . . . . . . . . . . . . . . . . .
3 Working with Signals3-30The Vector Scope block uses the input frame size (128) and period (12.8) to deduce the original signal’s sample period (0.1)
Window Function5-543RectangularComputes a rectangular window.w = rectwin(M)ChebyshevComputes a Chebyshev window with stopband ripple R.w = chebwin(M,R
Window Function5-544Dialog BoxOperationThe block’s operation: Apply window to input, Generate window, or Generate and apply window. The input/output p
Window Function5-545Window function name(Not shown in dialog above. Visible for User defined windows.) The name of the user-defined window function to
Yule-Walker AR Estimator5-5465Yule-Walker AR EstimatorPurpose Compute an estimate of AR model parameters using the Yule-Walker method.Library Estimati
Yule-Walker AR Estimator5-547Dialog BoxOutput(s)The type of AR model coefficients output by the block. The block can output polynomial coefficients (A
Yule-Walker AR Estimator5-548See AlsoBurg AR Estimator DSP BlocksetCovariance AR Estimator DSP BlocksetModified Covariance AR Estimator DSP BlocksetYu
Yule-Walker Method5-5495Yule-Walker MethodPurpose Compute a parametric estimate of the spectrum using the Yule-Walker AR method.Library Estimation / P
Yule-Walker Method5-550Dialog BoxInherit estimation order from input dimensionsWhen selected, sets the estimation order to one less than the length of
Yule-Walker Method5-551Supported Data TypesSee AlsoSee “Power Spectrum Estimation” on page 4-15 for related information.Double-precision floating poin
Zero Pad5-5525Zero PadPurpose Alter the input size by zero-padding or truncating rows and/or columns.Library Signal OperationsDescription The Zero Pad
Sample Rates and Frame Rates3-31In this case, based on the input frame size (256) and period (12.8), the Vector Scope block calculates the original si
Zero Pad5-553•NoneWhen None is selected, the input is passed through to the output without padding or truncation. Example In the model below, the 3-by
Zero Pad5-554column and row dimensions should be changed; None disables padding and truncation and passes the input through to the output unchanged.Nu
6 DSP Function ReferenceDSP Blockset Utility Functions . . . . . . . . . . . 6-2
6 DSP Function Reference6-2DSP Blockset Utility FunctionsIn addition to the blocks contained in the DSP Blockset libraries, a number of utility functi
dsp_links6-36dsp_linksPurpose Display library link information for blocks linked to the DSP Blockset.Syntax dsp_linksdsplinks(sys)dsplinks(sys,mode)De
dsplib6-46dsplibPurpose Open the main DSP Blockset library.Syntax dsplibdsplib verDescription dsplib opens the current version of the main DSP Blockse
dspstartup6-56dspstartupPurpose Configure the Simulink environment for DSP systems.Syntax dspstartupDescription dspstartup configures a number of Simu
dspstartup6-6See AlsoStartTime 0.0StopTime infFixedStep autoSaveTime offSaveOutput offAlgebraicLoopMsg errorInvariantConstants onRTWOptions [get_param
liblinks6-76liblinksPurpose Display library link information for blocks linked to the DSP Blockset.Syntax liblinksliblinks(sys)liblinks(sys,mode,lib)l
rebuffer_delay6-86rebuffer_delayPurpose Compute the number of samples of delay introduced by buffering and unbuffering operations.Syntax d = rebuffer_
3 Working with Signals3-32convert a frame-based signal to a sample-based signal is by using the Unbuffer block. See the following sections for more in
I-1IndexSymbolsf (linear frequency). See frequenciesfnyq (Nyquist frequency). See frequenciesFs (sample frequency or rate)See sample periodsM (frame s
IndexI-2analytic signal 5-27Analytic Signal block 5-27angular frequencydefined 3-5See also periodsarraysexporting matrix data to 3-73importing 3-65att
IndexI-3with Delay Line block 5-124with preservation of the signal 3-25with Queue block 5-353with Stack block 5-413with Triggered Delay Line block 5-4
IndexI-4for Triggered Signal To Workspace block 5-460controller canonical forms 5-24conventionstechnical 1-10time and frequency 3-4conventions in our
IndexI-5discrete sample time, defined 3-10discrete-time blocksnonsource 3-10source 3-10discrete-time signalscharacteristics 3-4defined 3-3terminology
IndexI-6Event-Count Comparator block 5-168events, triggeringfor N-Sample Enable block 5-325, 5-327for Sample and Hold block 5-383for Stack block 5-354
IndexI-7continuous-time 4-7working with 4-3Filter Designs library 4-4, 5-9designing digital filters 4-5designing filters with various filter structure
IndexI-8benefits 3-86frame-based signalsbenefits of 3-14changing frame size 3-47converting to sample-based signals 3-31, 3-60creating 3-47creating fro
IndexI-9continuous-time 4-7images, displaying matrices as 5-292importingarrays 3-65blocks for 5-10frame-based signals 3-68pages of an array 3-65sample
IndexI-10Math Functions 5-9Math Operations 5-9Matrices and Linear Algebra 5-9Matrix Factorizations 5-9Matrix Functions 5-9Matrix Inverses 5-9Matrix Op
Creating Signals3-33Creating SignalsThere are a variety of different ways to create signals using Simulink and DSP blocks. The following sections expl
IndexI-11transposing 5-451Matrices and Linear Algebra library 5-9Matrix 1-Norm block 5-280Matrix Concatenation block 5-14Matrix Factorizations library
IndexI-12defined 3-4Oω (digital frequency)defined 3-5See also frequenciesΩ (angular frequency)defined 3-5See also frequenciesΩp (passband edge frequen
IndexI-13phase angles, unwrapping 5-474phase unwrap 5-474Polynomial Evaluation block 5-343Polynomial Functions library 5-9Polynomial Stability Test bl
IndexI-14RLS Adaptive Filter block 5-375RMS block 4-21, 5-379RMS, computing 5-379root-mean-square. See RMSRp (passband ripple)See passband rippleRs (s
IndexI-15creating from vectors 5-463exporting 5-460importing 5-222, 5-388Scope block 2-7scopes 3-80scripts 6-2seconds 3-4selectingelements of a vector
IndexI-16single-rate models 3-92single-tasking mode 3-6, 3-91Singular Value Decomposition block 5-405sizeof a frameSee also frame sizesof a matrix 1-1
IndexI-17tasking latencydefined 3-91example 3-93predicting 3-92tasking modes 3-91technical conventions 1-10terminology, time and frequency 3-4, 3-5Tf
IndexI-18partial 3-25to a sample-based signal 3-26Uniform Decoder block 5-466Uniform Encoder block 5-470, 5-471units of time and frequency measures 3-
IndexI-19ZZero Pad block 3-25, 3-27, 5-552Zero-Order Hold block 3-10zero-padding 3-30, 5-337, 5-552causing unintentional rate conversions 3-31zerosins
3 Working with Signals3-34•“Creating Signals Using the Signal From Workspace Block” on page 3-38For information about importing signals, see the follo
Creating Signals3-35output check box selected, and the fourth block (DSP Constant3) has the Interpret vector parameters as 1-D check box selected.In a
3 Working with Signals3-36block is selected. This means that the output is not a matrix. However, most nonsource DSP blocks interpret a length-M 1-D v
Creating Signals3-37•Amplitude•Frequency•Phase offset•Sample time•Samples per frameIn the model below, a Sine Wave block generates a frame-based (mult
3 Working with Signals3-38See “Multichannel Signals” on page 3-11 for more information about the representation of sample-based and frame-based data.
Creating Signals3-39For more information about creating signals, see the following sections:•“Creating Signals Using Constant Blocks” on page 3-33•“Cr
vi ContentsFrom Wave File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-217Histogram . . . . . . . . . . . . . . . . . .
3 Working with Signals3-40•Channel 1: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0,...•Channel 2: 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0,...To create the model, sp
Creating Signals3-41yout = 1 1 2 1 3 0 4 0 5 1 6 1 7 0 8 0 9 1 10 1
3 Working with Signals3-42Constructing SignalsWhen you want to perform a given sequence of operations on several independent signals, it is frequently
Constructing Signals3-43Constructing Sample-Based Multichannel Signalsfrom Independent Sample-Based SignalsYou can combine individual sample-based sig
3 Working with Signals3-44Each 4-by-1 output from the Matrix Concatenation block contains one sample from each of the four input signals. All four sam
Constructing Signals3-45•In Signal From Workspace1, set Signal = [zeros(10,1) 5*ones(10,1)] •In Matrix Concatenation, set:-Number of inputs = 2- Conca
3 Working with Signals3-46frame-based signals using the Buffer block in the Buffers library (in Signal Management). The following sections explain th
Constructing Signals3-47To build the model, make the following parameter settings:•In Signal From Workspace, set Signal = [1:10;-1:-1:-10]' •In S
3 Working with Signals3-48•Output buffer size (per channel), Mo•Buffer overlap, L•Initial conditionsBuffering an N-channel (1-by-N or N-by-1) sample-b
Constructing Signals3-49•“Example: Buffering Frame-Based Signals with Overlap” on page 3-52•“Buffering Delay and Initial Conditions” on page 3-53Examp
viiPolynomial Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-338Polynomial Stability Test . . . . . . . . . . . . . . .
3 Working with Signals3-50•“Importing a Multichannel Frame-Based Signal” on page 3-68Overlapping Buffers. In some cases it is useful to work with data
Constructing Signals3-51To build the model, define the following variable in the MATLAB workspace.A = [1 1 5 -1;2 1 5 -2;3 0 5 -3;405-4;515-5;615-6];C
3 Working with Signals3-52Example: Buffering Frame-Based Signals with Overlap. In the model below, a two-channel frame-based signal with frame period
Constructing Signals3-53Buffering Delay and Initial Conditions. In both of the previous buffering examples the input signal is delayed by a certain nu
3 Working with Signals3-54Deconstructing SignalsMultichannel signals, represented by matrices in Simulink, are frequently used in DSP models for effic
Deconstructing Signals3-55in the Indexing library (in Signal Management). Any subset of rows or columns can be selected for propagation to a given out
3 Working with Signals3-56•Variable SelectorThe next section provides an example of using the Submatrix block to extract a portion of a multichannel s
Deconstructing Signals3-57Deconstructing Multichannel Frame-Based SignalsA frame-based signal with N channels and frame size M is represented by a seq
3 Working with Signals3-58 The following sections explain the two methods of deconstructing multichannel frame-based signals:•“Splitting a Multichanne
Deconstructing Signals3-59To build the model, make the following parameter settings:•In Signal From Workspace, set:-Signal = [1:10;-1:-1:-10;5*ones(1,
Kommentare zu diesen Handbüchern