📄 sdtoolbox.mdl
字号:
Block { BlockType MATLABFcn Name "MATLAB Fcn" Position [95, 25, 155, 55] MATLABFcn "jitteredSinewave(u,Ampl,Bias,Freq,Phase,Sam""pJ)" } Block { BlockType Reference Name "Ramp" Ports [0, 1] Position [25, 25, 55, 55] SourceBlock "simulink/Sources/Ramp" SourceType "Ramp" ShowPortLabels "on" slope "1" start "0" X0 "0" VectorParams1D "on" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold" Position [210, 25, 245, 55] SampleTime "Ts" } Block { BlockType Outport Name "Out1" Position [305, 33, 335, 47] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Ramp" SrcPort 1 DstBlock "MATLAB Fcn" DstPort 1 } Line { SrcBlock "MATLAB Fcn" SrcPort 1 DstBlock "Zero-Order\nHold" DstPort 1 } Line { SrcBlock "Zero-Order\nHold" SrcPort 1 DstBlock "Out1" DstPort 1 } } } Block { BlockType SubSystem Name "Power Spectral Density" Ports [1] Position [45, 93, 85, 137] TreatAsAtomicUnit off MinAlgLoopOccurrences off RTWSystemCode "Auto" MaskDescription "Calculates power spectral density, signal-to-no""ise ratio and effective number of bits of the Sigma-Delta modulator output" MaskHelp "web('PSD.html','-helpbrowser')" MaskPromptString "Scope Number|Sampling Frequency [Hz]|Lower Band"" Bound [Hz]|Upper Band Bound [Hz]|Signal Frequency [Hz]|Number of FFT Points|""Number of Transient Points|Variables Available in the Workspace|Nome of .mat ""File|Scale" MaskStyleString "edit,edit,edit,edit,edit,edit,edit,checkbox,edi""t,popup(linear|logarithmic)" MaskTunableValueString "on,on,on,on,on,on,on,on,on,on" MaskCallbackString "|||||||opt1=(get_param(gcb,'VW'));\nswitch opt1""\n case 'off'\n set_param(gcb,'MaskEnab""les',{'on','on','on','on','on','on','on','on','off','on'});\n case 'on""'\n set_param(gcb,'MaskEnables',{'on','on','on""','on','on','on','on','on','on','on'}); \nend\n||" MaskEnableString "on,on,on,on,on,on,on,on,off,on" MaskVisibilityString "on,on,on,on,on,on,on,on,on,on" MaskToolTipString "on,on,on,on,on,on,on,on,on,on" MaskVarAliasString ",,,,,,,,," MaskVariables "SN=@1;Fs=@2;fBL=@3;fBH=@4;Fin=@5;N=@6;Ntransien""t=@7;VW=@8;savename=&9;Scale_type=@10;" MaskInitialization "[f,FL,FH]=sinker_ini(Fs,fBL,fBH,Fin,N,SN);" MaskDisplay "plot(0,0,1,1,[.14,.91,.91,.14,.14],[.86,.86,.40"",.40,.86],[.85,.82,.80,.79,.75,.67,.63,.60,.57,.53,.41,.36,.33,.27,.24],[.49,"".50,.53,.50,.49,.51,.54,.63,.54,.50,.50,.52,.82,.52,.45])\ntext(.54,.18, 'PSD""','horizontalAlignment', 'center')\n" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "normalized" MaskValueString "2|Fs|1|Fs/R|Fin|N|Ntransient|off|savemat|linear" MaskTabNameString ",,,,,,,,," System { Name "Power Spectral Density" Location [0, 72, 499, 320] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" Block { BlockType Inport Name "In1" Position [45, 47, 75, 63] Port "1" IconDisplay "Port number" LatchInput off } Block { BlockType Constant Name "Constant" Position [30, 85, 60, 115] } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [210, 46, 215, 84] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Scope Name "Scope" Ports [1] Position [370, 49, 400, 81] Location [1, 56, 1401, 1019] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%<SignalLabel>" } SaveName "ScopeData7" DataFormat "StructureWithTime" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [115, 90, 135, 110] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Block { BlockType UnitDelay Name "Unit Delay" Position [140, 140, 175, 180] Orientation "left" SampleTime "1/Fs" } Block { BlockType ZeroOrderHold Name "Zero-Order\nHold" Position [125, 35, 165, 75] SampleTime "1/Fs" } Block { BlockType MATLABFcn Name "sinker" Position [265, 50, 325, 80] MATLABFcn "sinker(u(1),f,FL,FH,N,Ntransient,u(2),SN,Fs"",VW,savename,Scale_type)" } Line { SrcBlock "Unit Delay" SrcPort 1 Points [-10, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Constant" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 Points [0, 0; 55, 0] Branch { DstBlock "Mux" DstPort 2 } Branch { Points [0, 60] DstBlock "Unit Delay" DstPort 1 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "sinker" DstPort 1 } Line { SrcBlock "In1" SrcPort 1 DstBlock "Zero-Order\nHold" DstPort 1 } Line { SrcBlock "sinker" SrcPort 1 DstBlock "Scope" DstPort 1 } Line { SrcBlock "Zero-Order\nHold" SrcPort 1 DstBlock "Mux" DstPort 1 } } } Block { BlockType SubSystem Name "REAL\nResonator" Ports [1, 1] Position [405, 15, 460, 55] TreatAsAtomicUnit off MinAlgLoopOccurrences off RTWSystemCode "Auto" MaskDescription "Models a real discrete resonator with delay con""sidering op-amp saturation, finite gain, finite bandwidth and slew rate" MaskHelp "web('ReRes.html','-helpbrowser')" MaskPromptString "Sample Time|Finite Gain|Saturation|Slew Rate|Ga""in-Bandwidth" MaskStyleString "edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on" MaskCallbackString "||||" MaskEnableString "on,on,on,on,on" MaskVisibilityString "on,on,on,on,on" MaskToolTipString "on,on,on,on,on" MaskVarAliasString ",,,," MaskVariables "Ts=@1;alfa=@2;Amax=@3;sr=@4;GBW=@5;" MaskDisplay "dpoly([0 0 -1], [1 0 1], 'z-')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "Ts|alfa|Amax|sr|GBW" MaskTabNameString ",,,," System { Name "REAL\nResonator" Location [146, 88, 724, 335] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" Block { BlockType Inport Name "IN" Position [15, 35, 35, 55] Port "1" IconDisplay "Port number" LatchInput off } Block { BlockType Saturate Name "Saturation" Position [390, 35, 420, 65] UpperLimit "Amax" LowerLimit "-Amax" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [180, 38, 205, 62] } Block { BlockType UnitDelay Name "Unit Delay" Position [230, 35, 260, 65] SampleTime "Ts" } Block { BlockType UnitDelay Name "Unit Delay1" Position [290, 35, 320, 65] SampleTime "Ts" } Block { BlockType Gain Name "alfa" Position [290, 120, 320, 150] Orientation "left" Gain "alfa" } Block { BlockType Gain Name "alfa1" Position [340, 35, 370, 65] Gain "-1" } Block { BlockType MATLABFcn Name "slewRate" Position [70, 30, 130, 60] MATLABFcn "slew(u,alfa,sr,GBW,Ts)" } Block { BlockType Outport Name "Out1" Position [505, 41, 525, 59] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Unit Delay" DstPort 1 } Line { SrcBlock "Saturation" SrcPort 1 Points [15, 0] Branch { DstBlock "Out1" DstPort 1 } Branch { Points [0, 85] DstBlock "alfa" DstPort 1 } } Line { SrcBlock "IN" SrcPort 1 DstBlock "slewRate" DstPort 1 } Line { SrcBlock "slewRate" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "alfa" SrcPort 1 Points [-130, 0; 0, -80] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Unit Delay" SrcPort 1 DstBlock "Unit Delay1" DstPort 1 } Line { SrcBlock "Unit Delay1" SrcPort 1 DstBlock "alfa1" DstPort 1 } Line { SrcBlock "alfa1" SrcPort 1 DstBlock "Saturation" DstPort 1 } } } Block { BlockType SubSystem Name "REAL Integrator\n(no Delay)" Ports [1, 1] Position [305, 14, 360, 56] TreatAsAtomicUnit off MinAlgLoopOccurrences off RTWSystemCode "Auto" MaskDescription "Models a real discrete integrator without delay"" considering op-amp saturation, finite gain, finite bandwidth and slew rate" MaskHelp "web('ReIntND.html','-helpbrowser')" MaskPromptString "Sample Time|Finite Gain|Saturation|Slew Rate|Ga""in-Bandwidth" MaskStyleString "edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on" MaskCallbackString "||||" MaskEnableString "on,on,on,on,on" MaskVisibilityString "on,on,on,on,on" MaskToolTipString "on,on,on,on,on" MaskVarAliasString ",,,," MaskVariables "Ts=@1;alfa=@2;Amax=@3;sr=@4;GBW=@5;" MaskDisplay "dpoly([1 0], [1 -1], 'z-')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "Ts|alfa|Amax|sr|GBW" MaskTabNameString ",,,," System { Name "REAL Integrator\n(no Delay)" Location [88, 111, 752, 727] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" Block { BlockType Inport Name "IN" Position [100, 140, 120, 160] Port "1" IconDisplay "Port number" LatchInput off } Block { BlockType Saturate Name "Saturation" Position [335, 140, 365, 170] UpperLimit "Amax" LowerLimit "-Amax" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [240, 143, 265, 167] } Block { BlockType UnitDelay Name "Unit Delay1" Position [335, 225, 365, 255] Orientation "left" SampleTime "Ts" } Block { BlockType Gain Name "alfa" Position [280, 225, 310, 255] Orientation "left" Gain "alfa" } Block { BlockType MATLABFcn Name "slewRate" Position [140, 135, 200, 165] MATLABFcn "slew(u,alfa,sr,GBW,Ts)" } Block { BlockType Outport Name "Out1" Position [495, 146, 515, 164] IconDisplay "Port number" BusOutputAsStruct off } Line { SrcBlock "Saturation" SrcPort 1 Points [0, 0; 60, 0] Branch { DstBlock "Out1" DstPort 1 } Branch { Points [0, 85] DstBlock "Unit Delay1" DstPort 1 } } Line { SrcBlock "alfa" SrcPort 1 Points [-50, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Unit Delay1" SrcPort 1 DstBlock "alfa" DstPort 1 } Line { SrcBlock "IN" SrcPort 1 DstBlock "slewRate" DstPort 1 } Line { SrcBlock "slewRate" SrcPort 1 DstBlock "Sum" DstPort 1 } } } Block { BlockType SubSystem Name "REAL Integrator\n(with Delay)" Ports [1, 1] Position [215, 15, 270, 55] TreatAsAtomicUnit off MinAlgLoopOccurrences off RTWSystemCode "Auto" MaskDescription "Models a real discrete integrator with delay co""nsidering op-amp saturation, finite gain, finite bandwidth and slew rate" MaskHelp "web('ReIntD.html' , '-helpbrowser')\n" MaskPromptString "Sample Time|Finite Gain|Saturation|Slew Rate|Ga""in-Bandwidth" MaskStyleString "edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on" MaskCallbackString "||||" MaskEnableString "on,on,on,on,on" MaskVisibilityString "on,on,on,on,on" MaskToolTipString "on,on,on,on,on" MaskVarAliasString ",,,," MaskVariables "Ts=@1;alfa=@2;Amax=@3;sr=@4;GBW=@5;" MaskDisplay "dpoly([0 1], [1 -1], 'z-')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "Ts|alfa|Amax|sr|GBW" MaskTabNameString ",,,," System { Name "REAL Integrator\n(with Delay)" Location [72, 141, 650, 388] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" Block { BlockType Inport Name "IN" Position [15, 35, 35, 55] Port "1" IconDisplay "Port number" LatchInput off } Block { BlockType Saturate
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -