ch6example2.mdl

来自「清华大学出版社 邵玉斌编写的《通信系统建模与仿真实例分析》一书的所有MATLAB」· MDL 代码 · 共 749 行 · 第 1/2 页

MDL
749
字号
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [20, 58, 50, 72]
	}
	Block {
	  BlockType		  TriggerPort
	  Name			  "Trigger"
	  Ports			  []
	  Position		  [75, 15, 95, 35]
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [115, 58, 145, 72]
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [495, 261, 500, 299]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
      Port {
	PortNumber		1
	Name			"原信号和采样"
	PropagatedSignals	", "
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      Product
      Name		      "Product\n采样"
      Ports		      [2, 1]
      Position		      [190, 111, 235, 144]
      InputSameDT	      off
    }
    Block {
      BlockType		      DiscretePulseGenerator
      Name		      "Pulse\nGenerator"
      Position		      [20, 118, 65, 152]
      Period		      "10"
      SampleTime	      "1/4000"
      Port {
	PortNumber		1
	Name			"冲激脉冲"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      RandomNumber
      Name		      "Random\nNumber"
      Position		      [25, 50, 55, 80]
      SampleTime	      "1/4000"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [2]
      Position		      [600, 267, 635, 318]
      Location		      [29, 335, 549, 665]
      Open		      on
      NumInputPorts	      "2"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
	axes2			""
      }
      TimeRange		      "0.1"
      YMin		      "-0.8~-0.8"
      YMax		      "0.8~0.8"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Reference
      Name		      "Spectrum\nScope"
      Ports		      [1]
      Position		      [600, 15, 635, 65]
      FontSize		      10
      SourceBlock	      "dspsnks4/Spectrum\nScope"
      SourceType	      "Spectrum Scope"
      ScopeProperties	      on
      Domain		      "Frequency"
      HorizSpan		      "1"
      UseBuffer		      on
      BufferSize	      "2048"
      Overlap		      "64"
      inpFftLenInherit	      on
      FFTlength		      "1024"
      numAvg		      "200"
      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		      "-20"
      YMax		      "10"
      YLabel		      "Magnitude, dB"
      LineProperties	      off
    }
    Block {
      BlockType		      Reference
      Name		      "Spectrum\nScope1"
      Ports		      [1]
      Position		      [600, 185, 635, 235]
      FontSize		      10
      SourceBlock	      "dspsnks4/Spectrum\nScope"
      SourceType	      "Spectrum Scope"
      ScopeProperties	      on
      Domain		      "Frequency"
      HorizSpan		      "1"
      UseBuffer		      on
      BufferSize	      "2048"
      Overlap		      "64"
      inpFftLenInherit	      on
      FFTlength		      "1024"
      numAvg		      "200"
      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		      "-40"
      YMax		      "10"
      YLabel		      "Magnitude, dB"
      LineProperties	      off
    }
    Block {
      BlockType		      Reference
      Name		      "Spectrum\nScope2"
      Ports		      [1]
      Position		      [600, 105, 635, 155]
      FontSize		      10
      SourceBlock	      "dspsnks4/Spectrum\nScope"
      SourceType	      "Spectrum Scope"
      ScopeProperties	      on
      Domain		      "Frequency"
      HorizSpan		      "1"
      UseBuffer		      on
      BufferSize	      "2048"
      Overlap		      "64"
      inpFftLenInherit	      on
      FFTlength		      "1024"
      numAvg		      "200"
      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		      "-20"
      YMax		      "10"
      YLabel		      "Magnitude, dB"
      LineProperties	      off
    }
    Block {
      BlockType		      ZeroOrderHold
      Name		      "Zero-Order\nHold"
      Position		      [515, 21, 550, 59]
      SampleTime	      "1/4000"
    }
    Block {
      BlockType		      ZeroOrderHold
      Name		      "Zero-Order\nHold1"
      Position		      [520, 191, 555, 229]
      SampleTime	      "1/4000"
    }
    Block {
      BlockType		      ZeroOrderHold
      Name		      "Zero-Order\nHold2"
      Position		      [515, 111, 550, 149]
      SampleTime	      "1/4000"
    }
    Line {
      SrcBlock		      "Analog\nFilter Design1"
      SrcPort		      1
      Points		      [30, 0]
      Branch {
	Points			[0, 55]
	DstBlock		"Product\n采样"
	DstPort			1
      }
      Branch {
	Labels			[1, 0]
	Points			[0, -25; 295, 0]
	Branch {
	  DstBlock		  "Zero-Order\nHold"
	  DstPort		  1
	}
	Branch {
	  Points		  [0, 230]
	  DstBlock		  "Mux"
	  DstPort		  1
	}
      }
    }
    Line {
      Name		      "冲激脉冲"
      Labels		      [0, 0]
      SrcBlock		      "Pulse\nGenerator"
      SrcPort		      1
      Points		      [90, 0]
      Branch {
	Points			[15, 0]
	DstBlock		"Product\n采样"
	DstPort			2
      }
      Branch {
	Points			[0, -43]
	DstBlock		"Enabled and\nTriggered Subsystem"
	DstPort			trigger
      }
    }
    Line {
      Name		      "恢复"
      Labels		      [0, 0]
      SrcBlock		      "Analog\nFilter Design"
      SrcPort		      1
      Points		      [-10, 0; 30, 0]
      Branch {
	Labels			[1, 0]
	DstBlock		"Zero-Order\nHold2"
	DstPort			1
      }
      Branch {
	Points			[0, 175]
	DstBlock		"Scope"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Zero-Order\nHold"
      SrcPort		      1
      DstBlock		      "Spectrum\nScope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Zero-Order\nHold1"
      SrcPort		      1
      DstBlock		      "Spectrum\nScope1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Zero-Order\nHold2"
      SrcPort		      1
      DstBlock		      "Spectrum\nScope2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Random\nNumber"
      SrcPort		      1
      DstBlock		      "Analog\nFilter Design1"
      DstPort		      1
    }
    Line {
      Name		      "原信号和采样"
      Labels		      [0, 0]
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Product\n采样"
      SrcPort		      1
      DstBlock		      "Enabled and\nTriggered Subsystem"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Enabled and\nTriggered Subsystem"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	DstBlock		"Analog\nFilter Design"
	DstPort			1
      }
      Branch {
	Points			[0, 80]
	Branch {
	  Points		  [0, 80]
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Branch {
	  DstBlock		  "Zero-Order\nHold1"
	  DstPort		  1
	}
      }
    }
    Annotation {
      Name		      "低通"
      Position		      [380, 196]
    }
    Annotation {
      Name		      "平顶采样过程的原理仿真\n文件名:ch6example2.mdl"
      Position		      [92, 206]
      DropShadow	      on
    }
  }
}

⌨️ 快捷键说明

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