⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adnc_rls.mdl

📁 数字信号处理(机械工业出版社)的源码
💻 MDL
📖 第 1 页 / 共 2 页
字号:
      OpenScopeAtSimStart     on
      OpenScopeImmediately    off
      FigPos		      "[404 258 378 272]"
      AxisProperties	      off
      XUnits		      "Hertz"
      XRange		      "[0...Fs/2]"
      InheritXIncr	      on
      XIncr		      "1"
      XLabel		      "Samples"
      YUnits		      "dB"
      YMin		      "-60"
      YMax		      "0"
      YLabel		      "Magnitude, dB"
      LineProperties	      off
      LineDisables	      "on"
      LineStyles	      "-"
      LineColors	      "[0 0 1]"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [400, 151, 405, 189]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Reference
      Name		      "Noise"
      Ports		      [0, 1]
      Position		      [35, 121, 80, 169]
      Diagnostics	      "AllowInheritedTsInSrc"
      SourceBlock	      "dspsrcs4/Random\nSource"
      SourceType	      "Random Source"
      SrcType		      "Gaussian"
      NormMethod	      "Ziggurat"
      CltLength		      "12"
      Min		      "0"
      Max		      "1"
      Mean		      "0"
      Var		      "1"
      RepMode		      "Specify seed"
      Seed		      "[23341]"
      Inherit		      off
      SampMode		      "Discrete"
      SampTime		      "1"
      SampFrame		      "1"
      DataType		      "Double"
      OutComplex	      "Real"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Noise Filter"
      Ports		      [1, 1]
      Position		      [125, 123, 195, 167]
      AncestorBlock	      "dspddes3/Digital FIR\nFilter Design"
      TreatAsAtomicUnit	      off
      MaskType		      "Digital FIR Filter Design"
      MaskDescription	      "Implements various window-based FIR filter desi"
"gns using the Signal Processing Toolbox's \"fir1\" and \"fir2\" filter design"
" commands.  The gain at each \"cutoff frequency\" is the average of the gains"
" in the adjacent bands (usually 0.5)."
      MaskHelp		      "web(dspbhelp);"
      MaskPromptString	      "Filter type:|Filter order:|Cutoff frequency (0 "
"to 1):|Upper cutoff frequency:|Cutoff frequency vector (0 < f < 1):|Gain in t"
"he first band:|Frequency vector (including 0 and 1):|Gains at these frequenci"
"es:|Window type:|Stopband attenuation in dB:|Beta:"
      MaskStyleString	      "popup(Lowpass|Highpass|Bandpass|Bandstop|Multib"
"and|Arbitrary Shape (fir2)),edit,edit,edit,edit,popup(0|1),edit,edit,popup(Ba"
"rtlett|Blackman|Boxcar|Chebyshev|Hamming|Hann|Hanning|Kaiser|Triangular),edit"
",edit"
      MaskTunableValueString  "on,off,on,on,on,on,on,on,on,on,on"
      MaskCallbackString      "dspblkfir2||||||||dspblkfir2||"
      MaskEnableString	      "on,on,on,on,on,on,on,on,on,off,off"
      MaskVisibilityString    "on,on,on,off,off,off,off,off,on,on,on"
      MaskToolTipString	      "on,on,on,on,on,on,on,on,on,on,on"
      MaskVarAliasString      ",,,,,,,,,,"
      MaskVariables	      "filttype=&1;N=@2;Wlo=@3;Whi=@4;W0=@5;g0=@6;W1=@"
"7;gains=@8;wintype=&9;Rs=@10;Kbeta=@11;"
      MaskInitialization      "[b,h,w,str]=dspblkfir2('design',filttype,N,Wlo,"
"Whi,W0,g0,W1,gains,wintype,Rs, Kbeta);"
      MaskDisplay	      "disp('LP FIR')\n"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      MaskValueString	      "Lowpass|31|0.5|0.6|[.2 .5 .8]|1|[0 .2 .3 .6 .8 "
"1]|[1 .5 0 0 1 .5]|Hamming|10|5"
      System {
	Name			"Noise Filter"
	Location		[310, 283, 552, 411]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [25, 43, 55, 57]
	}
	Block {
	  BlockType		  Reference
	  Name			  "Direct-Form II\nTranspose Filter"
	  Ports			  [1, 1]
	  Position		  [75, 28, 145, 72]
	  SourceBlock		  "dsparch3/Direct-Form II\nTranspose Filter"
	  SourceType		  "Direct-Form II Transpose Filter"
	  num			  "b"
	  den			  "1"
	  ic			  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [165, 43, 195, 57]
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Direct-Form II\nTranspose Filter"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Direct-Form II\nTranspose Filter"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Reference
      Name		      "RLS\nAdaptive Filter"
      Ports		      [2, 2]
      Position		      [120, 200, 205, 260]
      SourceBlock	      "dspadpt3/RLS\nAdaptive Filter"
      SourceType	      "RLS Adaptive Filter"
      Ntaps		      "32"
      Lambda		      "1.0"
      ic		      "0.0"
      phi0		      "0.1"
      Adapt		      off
      RstPort		      "None"
    }
    Block {
      BlockType		      Scope
      Name		      "Results"
      Ports		      [4]
      Position		      [440, 60, 470, 125]
      Location		      [223, 391, 600, 792]
      Open		      on
      NumInputPorts	      "4"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
	axes3			"%<SignalLabel>"
	axes4			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
	axes2			""
	axes3			""
	axes4			""
      }
      TimeRange		      "128"
      YMin		      "-2~-2~-2~-5"
      YMax		      "2~2~2~5"
      DataFormat	      "Array"
    }
    Block {
      BlockType		      Reference
      Name		      "Sine Wave"
      Ports		      [0, 1]
      Position		      [35, 48, 80, 92]
      SourceBlock	      "dspsrcs4/Sine Wave"
      SourceType	      "Sine Wave"
      Amplitude		      "1"
      Frequency		      "0.055"
      Phase		      "0"
      SampleMode	      "Discrete"
      OutComplex	      "Real"
      CompMethod	      "Trigonometric fcn"
      TableSize		      "Speed"
      SampleTime	      "1"
      SamplesPerFrame	      "1"
      additionalParams	      off
      dataType		      "double"
      wordLen		      "16"
      udDataType	      "sfix(16)"
      fracBitsMode	      "Best precision"
      numFracBits	      "14"
      ResetState	      "Restart at time zero"
      Port {
	PortNumber		1
	Name			"Input Signal"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      Sum
      Name		      "Sum2"
      Ports		      [2, 1]
      Position		      [225, 135, 245, 155]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "++|"
      Port {
	PortNumber		1
	Name			"Signal + Noise"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      Sum
      Name		      "Sum3"
      Ports		      [2, 1]
      Position		      [285, 170, 305, 190]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "+-"
      Port {
	PortNumber		1
	Name			"Error Signal"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Line {
      Name		      "Input Signal"
      Labels		      [0, 0]
      SrcBlock		      "Sine Wave"
      SrcPort		      1
      Points		      [150, 0]
      Branch {
	DstBlock		"Sum2"
	DstPort			1
      }
      Branch {
	Labels			[1, 0]
	Points			[150, 0]
	Branch {
	  DstBlock		  "Results"
	  DstPort		  1
	}
	Branch {
	  DstBlock		  "Mux"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Noise Filter"
      SrcPort		      1
      DstBlock		      "Sum2"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Noise"
      SrcPort		      1
      Points		      [0, 0; 15, 0]
      Branch {
	Points			[0, 70]
	DstBlock		"RLS\nAdaptive Filter"
	DstPort			1
      }
      Branch {
	DstBlock		"Noise Filter"
	DstPort			1
      }
    }
    Line {
      Name		      "Signal + Noise"
      SrcBlock		      "Sum2"
      SrcPort		      1
      Points		      [45, 0]
      Branch {
	Points			[0, 0]
	DstBlock		"Sum3"
	DstPort			1
      }
      Branch {
	Labels			[1, 1]
	Points			[0, -60]
	DstBlock		"Results"
	DstPort			2
      }
    }
    Line {
      Name		      "Error Signal"
      Labels		      [2, 0]
      SrcBlock		      "Sum3"
      SrcPort		      1
      Points		      [-5, 0; 65, 0]
      Branch {
	Points			[0, 220; -270, 0; 0, -155]
	DstBlock		"RLS\nAdaptive Filter"
	DstPort			2
      }
      Branch {
	Points			[0, -80]
	DstBlock		"Results"
	DstPort			3
      }
      Branch {
	DstBlock		"Mux"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "RLS\nAdaptive Filter"
      SrcPort		      1
      Points		      [85, 0]
      DstBlock		      "Sum3"
      DstPort		      2
    }
    Line {
      SrcBlock		      "RLS\nAdaptive Filter"
      SrcPort		      2
      Points		      [10, 0]
      Branch {
	Points			[0, 85]
	DstBlock		"Freq\nResponse"
	DstPort			1
      }
      Branch {
	DstBlock		"Flip"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Flip"
      SrcPort		      1
      DstBlock		      "Filter\nTaps"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      Points		      [10, 0; 0, -55]
      DstBlock		      "Results"
      DstPort		      4
    }
    Annotation {
      Name		      "s(n)"
      Position		      [102, 58]
    }
    Annotation {
      Name		      "w(n)"
      Position		      [99, 133]
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -