sysgen记录2

declare:just note 
source 块1
•The Band-Limited White Noise blockgenerates normally distributed random numbers that are suitable for use incontinuous or hybrid systems and produces output at a specific sample rate,which is related to the correlation time of the noise.
•The Chirp Signal block generates asine wave whose frequency increases at a linear rate with time. You can usethis block for spectral analysis of nonlinear systems. The block generates ascalar or vector output.
•The Constant block generates a realor.complexconstant valueThe blockgenerates scalar (1x1 2-D array), vector (1-D array), or matrix (2-D array)output, depending on the dimensionality of the Constant value parameter and thesetting of the Interpret vector parameters as a 1-D parameter.
•The Counter Free-Running blockcounts up until the maximum possible value, 2 Nbits – 1,is reached, where Nbits is the number of bits. The counterthen overflows to zero and restarts counting up. The counter is alwaysinitialized to zero. The Count Limited block counts up until the specifiedupper limit is reached. The counter then wraps back to zero and restartscounting up. The counter is always initialized to zero.
:note ::overflow & wrap &
•The From File block outputs dataread from a MAT file. Its icon displays the pathname of the file supplying thedata.
•The Ramp block generates a signalthat starts at a specified time and value and changes by a specified rate. Theblock’s Slope, Start time, Duty Cycle, and Initial Output parameters determinethe characteristics of the output signal. All must have the same dimensionsafter scalar expansion.
sink块儿2
•The Display block shows the valueof its input on its icon. You control the display format via the Formatparameter.
•The Scope block displays its inputwith respect to simulation time. The Scope block can have multiple axes (oneper port); all axes have a common time range with independent y-axes. The Scopeblock allows you to adjust the amount of time and the range of input valuesdisplayed. You can move and resize the Scope window and you can modify theScope’s parameter values during the simulation. A floating scope is a Scopeblock that can display the signals carried on one or more lines.
•The To File block writes its inputto a matrix in a MAT file. The block writes one column for each time step. Thefirst row is the simulation time; the remainder of the column is the inputdata, one data point for each element in the input vector.
•The To Workspace block writes itsinput to the workspace. The block writes its output to an array or structurethat has the name specified by the block’s Variable name parameter. The Saveformat parameter determines the output format.
•The XY Graph block displays an X-Yplot of its inputs in a MATLAB figure window. The block has two scalar inputs.The block plots data in the first input (the x direction) against data in thesecond input (the y direction). This block is useful for examining limit cyclesand other two-state data. Data outside the specified range is not displayed.

HOW TO 
1.white noise 
result:

 HINT:

•The White Noise block complementsthe spectrum scope, especially when testing the Spectral response of thefilter. (Communications blockset® Commssources.)
•The Random Number block from theSimulink sources has the same effects as the White Noise block.
•The Gaussian Noise Generator blockgenerates discrete-time, white Gaussian noise. You must specify the initialseed vector in the simulation.
•The Mean Value and the Variancemust be scalars for System Generator usage.

2.scope




HINT:
•ClickProperties to change the number of
axes displayed and the Timerangevalue
(X-axis)
•Usethe DataHistorytab to control the number of values stored and displayed
on the scope
–Also,can direct output to workspace
•ClickAutoscale to let the tools
configure the display to the correct axis
values quickly
•Right-clickthe Y-axis to set its value
•To display multiple signals on onescope, use the MUX block to combine signals (Simulink ® Signals&Systems).
3.SpectrumScope1


HINT:
•Thespectrum scope is extremely useful for performing a frequency analysis on yourdesign and can be found in the DSP blockset ® DSPsinks library
•Becauseno System Generator designs will useframe-based data, the input must be “buffered” (under the Scope properties).The size of the buffer determines the resolution of the FFT performed
•Useoverlapping to avoid the discontinuities of using finite data
•Usethe Axispropertiesto control the axes scale and units
•Typically, the spectrum scopeshould be used when analyzing the frequency response of a system with morerealistic continuous data inputs over a long period of time. If you are tryingto analyze the impulse response of a filter, exporting the output to theworkspace and visualizing there is recommended because of the windowingfunctions and normalization of the spectrum scope.
•You can also set line colorsthrough the Line properties option (not shown here).
•For example, [1 0 0]|[0 1 0]specifies the colors for two channels. The values are RGB values.
•Typically, the spectrum scopeshould be used when analyzing the frequency response of a system with morerealistic continuous data inputs over a long period of time. If you are tryingto analyze the impulse response of a filter, exporting the output to theworkspace and visualizing there is recommended because of the windowingfunctions and normalization of the spectrum scope.
•You can also set line colorsthrough the Line properties option (not shown here).
•For example, [1 0 0]|[0 1 0]specifies the colors for two channels. The values are RGB values.

4. SpectrumScope2

RESULT:

HINT:
•Thisexample takes two chirp signals (frequency-varying sine waves), adds themtogether, and views the results on the Spectrum Scope
•Note:Be aware of the window that is being used by the scope, especially whenanalyzing small data sets. The default is hann
•A legend, line colors, and linestyles can all be controlled from the Line properties menu or from the Axis andChannels menus in the spectrum scope.
•To change the window function usedby the spectrum scope, right-click the block, select LookUnder Mask,and double-click the short-time FFT block. Select the desired window type.
•Note:Covering the effects and benefits of different windowing techniques is beyondthe scope of this course.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值