matlab输入信号离散化,sampe-fft.mdl 源代码在线查看 - 这是在matlab/simulink环境下,对一个连续信号采样及离散化.并进行FFT频谱分析的实例 资源下载 虫虫电子下载站...

该博客内容涉及Simulink模型的详细配置,包括常量、数据类型转换、脉冲发生器、增益、量化器、正弦波、零阶保持器等模块的使用。模型中实现了信号的生成、运算、量化,并通过 Spectrum Scope 进行频谱分析。此外,还探讨了模型的采样时间和实时运行特性。
摘要由CSDN通过智能技术生成

ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging on MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off GenerateASAP2 off } PropName "Components" }}PropName"Components" } Name "Configuration" SimulationMode "normal" CurrentDlgPage "Solver" } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Clock DisplayTime off } Block { BlockType Constant Value "1" VectorParams1D on OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" } Block { BlockType DataTypeConversion OutDataTypeMode "Inherit via back propagation" OutDataType "sfix(16)" OutScaling "2^0" LockScale off ConvertRealWorld "Real World Value (RWV)" RndMeth "Zero" SaturateOnIntegerOverflowon SampleTime "-1" } Block { BlockType DiscretePulseGenerator PulseType "Sample based" TimeSource "Use simulation time" Amplitude "1" Period "2" PulseWidth "1" PhaseDelay "0" SampleTime "1" VectorParams1D on } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParameterDataTypeMode "Same as input" ParameterDataType "sfix(16)" ParameterScalingMode "Best Precision: Matrix-wise" ParameterScaling "2^0" OutDataTypeMode "Same as input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflowon SampleTime "-1" } Block { BlockType Inport BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" Interpolate on } Block { BlockType Math Operator "exp" OutputSignalType "auto" SampleTime "-1" OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflowon } Block { BlockType "M-S-Function" MFile "mlfile" } Block { BlockType Outport Port "1" BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Product Inputs "2" Multiplication "Element-wise(.*)" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Zero" SaturateOnIntegerOverflowon SampleTime "-1" } Block { BlockType Quantizer QuantizationInterval "0.5" LinearizeAsGain on SampleTime "-1" } Block { BlockType "S-Function" FunctionName "system" PortCounts "[]" SFunctionModules "''" } Block { BlockType Sin SineType "Time based" TimeSource "Use simulation time" Amplitude "1" Bias "0" Frequency "1" Phase "0" Samples "10" Offset "0" SampleTime "-1" VectorParams1D on } Block { BlockType SubSystem ShowPortLabels on Permissions "ReadWrite" PermitHierarchicalResolution "All" SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflowon SampleTime "-1" } Block { BlockType Trigonometry Operator "sin" OutputSignalType "auto" SampleTime "-1" } Block { BlockType ZeroOrderHold SampleTime "1" } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "test" Location [131, 332, 679, 711] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType Reference Name "Chirp Signal" Ports [0, 1] Position [130, 155, 160, 185] SourceBlock "simulink/Sources/Chirp Signal" SourceType "chirp" ShowPortLabels on f1 "1" T "100" f2 "100" VectorParams1D on } Block { BlockType Gain Name "Gain" Position [235, 225, 265, 255] Gain "100" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflowoff } Block { BlockType DiscretePulseGenerator Name "Pulse\nGenerator" Ports [0, 1] Position [125, 58, 170, 92] PulseType "Time based" PulseWidth "50" } Block { BlockType Quantizer Name "Quantizer" Position [390, 220, 430, 260] QuantizationInterval "0.001" LinearizeAsGain off } Block { BlockType Sin Name "Sine Wave" Ports [0, 1] Position [135, 230, 165, 260] SineType "Time based" Amplitude "40" Frequency "2*pi*100" SampleTime "0" } Block { BlockType Reference Name "Spectrum\nScope" Ports [1] Position [490, 215, 525, 265] SourceBlock "dspsnks4/Spectrum\nScope" SourceType "Spectrum Scope" ShowPortLabels off ScopeProperties on Domain "Frequency" HorizSpan "1" UseBuffer on BufferSize "128" Overlap "64" inpFftLenInherit off FFTlength "64" numAvg "2" DisplayProperties off AxisGrid on Memory off FrameNumber on AxisLegend off AxisZoom off OpenScopeAtSimStart on OpenScopeImmediately off FigPos "get(0,'defaultfigureposition')" AxisProperties off XUnits "Hertz" XRange "[0...Fs/2]" InheritXIncr on XIncr "1.0" XLabel "Samples" YUnits "dB" YMin "-92.7321425443479" YMax "60.5661999779112" YLabel "Magnitude, dB" LineProperties off LineMarkers "stem" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold1" Position [325, 225, 360, 255] SampleTime "1/1000" } Line { SrcBlock "Zero-Order\nHold1" SrcPort 1 DstBlock "Quantizer" DstPort 1 } Line { SrcBlock "Quantizer" SrcPort 1 DstBlock "Spectrum\nScope" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "Zero-Order\nHold1" DstPort 1 } Line { SrcBlock "Pulse\nGenerator" SrcPort 1 Points [20, 0; 0, 165] DstBlock "Gain" DstPort 1 } }}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值