fm.mdl

来自「基于Simulink的模拟通信系统仿真」· MDL 代码 · 共 786 行 · 第 1/2 页

MDL
786
字号
    }
    Block {
      BlockType		      Derivative
      Name		      "Derivative"
      Position		      [695, 460, 725, 490]
    }
    Block {
      BlockType		      Reference
      Name		      "FM\nModulator\nPassband"
      Ports		      [1, 1]
      Position		      [300, 403, 375, 447]
      SourceBlock	      "commanapbnd2/FM\nModulator\nPassband"
      SourceType	      "FM Modulator Passband"
      Fc		      "1000"
      Ph		      "0"
      HzPerV		      "200"
      ts		      "1/4000"
      td		      "Inf"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation"
      Position		      [805, 455, 835, 485]
      UpperLimit	      "inf"
      LowerLimit	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope1"
      Ports		      [2]
      Position		      [1090, 771, 1120, 804]
      Location		      [208, 327, 532, 566]
      Open		      off
      NumInputPorts	      "2"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
	axes2			""
      }
      YMin		      "-1500~-1"
      YMax		      "1500~1"
      SaveName		      "ScopeData1"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "Scope2"
      Ports		      [1]
      Position		      [1125, 469, 1155, 501]
      Location		      [52, 359, 376, 598]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      YMin		      "-1000"
      YMax		      "1000"
      SaveName		      "ScopeData2"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "Scope3"
      Ports		      [1]
      Position		      [535, 599, 565, 631]
      Location		      [42, 605, 715, 990]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      YMin		      "-2"
      YMax		      "2"
      SaveName		      "ScopeData3"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "Scope4"
      Ports		      [1]
      Position		      [800, 594, 830, 626]
      Location		      [180, 508, 853, 893]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      YMin		      "-65000"
      YMax		      "10000"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "Scope5"
      Ports		      [1]
      Position		      [915, 589, 945, 621]
      Location		      [228, 591, 901, 976]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      YMin		      "-65000"
      YMax		      "10000"
      SaveName		      "ScopeData4"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "Scope6"
      Ports		      [1]
      Position		      [685, 589, 715, 621]
      Location		      [33, 571, 706, 956]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      YMin		      "-65000"
      YMax		      "10000"
      SaveName		      "ScopeData5"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      SignalGenerator
      Name		      "Signal\nGenerator"
      Position		      [215, 410, 245, 440]
      Frequency		      "100"
    }
    Block {
      BlockType		      Reference
      Name		      "Spectrum\nScope"
      Ports		      [1]
      Position		      [740, 280, 775, 330]
      SourceBlock	      "dspsnks4/Spectrum\nScope"
      SourceType	      "Spectrum Scope"
      ScopeProperties	      off
      Domain		      "Frequency"
      HorizSpan		      "1"
      UseBuffer		      on
      BufferSize	      "1024"
      Overlap		      "256"
      inpFftLenInherit	      on
      FFTlength		      "1024"
      numAvg		      "10"
      DisplayProperties	      off
      AxisGrid		      on
      Memory		      off
      FrameNumber	      on
      AxisLegend	      off
      AxisZoom		      off
      OpenScopeAtSimStart     on
      OpenScopeImmediately    off
      FigPos		      "get(0,'defaultfigureposition')"
      AxisProperties	      on
      XUnits		      "Hertz"
      XRange		      "[0...Fs/2]"
      InheritXIncr	      off
      XIncr		      "2.5E-4"
      XLabel		      "Samples"
      YUnits		      "Magnitude"
      YMin		      "-30"
      YMax		      "25"
      YLabel		      "Magnitude"
      LineProperties	      off
    }
    Block {
      BlockType		      Reference
      Name		      "Spectrum\nScope1"
      Ports		      [1]
      Position		      [1150, 315, 1185, 365]
      SourceBlock	      "dspsnks4/Spectrum\nScope"
      SourceType	      "Spectrum Scope"
      ScopeProperties	      on
      Domain		      "Frequency"
      HorizSpan		      "1"
      UseBuffer		      on
      BufferSize	      "256"
      Overlap		      "16"
      inpFftLenInherit	      on
      FFTlength		      "256"
      numAvg		      "2"
      DisplayProperties	      off
      AxisGrid		      on
      Memory		      on
      FrameNumber	      on
      AxisLegend	      off
      AxisZoom		      off
      OpenScopeAtSimStart     on
      OpenScopeImmediately    off
      FigPos		      "get(0,'defaultfigureposition')"
      AxisProperties	      off
      XUnits		      "Hertz"
      XRange		      "[0...Fs/2]"
      InheritXIncr	      off
      XIncr		      "1/400"
      XLabel		      "Samples"
      YUnits		      "dB"
      YMin		      "-30"
      YMax		      "100"
      YLabel		      "Magnitude"
      LineProperties	      off
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace"
      Position		      [485, 265, 545, 295]
      VariableName	      "simout"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ZeroOrderHold
      Name		      "Zero-Order\nHold"
      Position		      [475, 336, 510, 374]
      SampleTime	      "2.5e-4"
    }
    Block {
      BlockType		      ZeroOrderHold
      Name		      "Zero-Order\nHold1"
      Position		      [1040, 321, 1075, 359]
      SampleTime	      "1/400"
    }
    Line {
      SrcBlock		      "Signal\nGenerator"
      SrcPort		      1
      Points		      [20, 0]
      Branch {
	DstBlock		"FM\nModulator\nPassband"
	DstPort			1
      }
      Branch {
	Points			[0, 370]
	DstBlock		"Scope1"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "FM\nModulator\nPassband"
      SrcPort		      1
      Points		      [0, 0; 20, 0]
      Branch {
	Points			[0, -145]
	DstBlock		"To Workspace"
	DstPort			1
      }
      Branch {
	Points			[25, 0]
	Branch {
	  Points		  [0, -110; 35, 0]
	  DstBlock		  "Zero-Order\nHold"
	  DstPort		  1
	}
	Branch {
	  Points		  [0, 60; 45, 0]
	  Branch {
	    Points		    [0, 130]
	    DstBlock		    "Scope3"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [70, 0]
	    DstBlock		    "Analog\nFilter Design1"
	    DstPort		    1
	  }
	}
      }
    }
    Line {
      SrcBlock		      "Zero-Order\nHold"
      SrcPort		      1
      Points		      [65, 0; 0, -50]
      DstBlock		      "Spectrum\nScope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Derivative"
      SrcPort		      1
      Points		      [0, 10; 35, 0]
      Branch {
	Points			[25, 0]
	DstBlock		"Saturation"
	DstPort			1
      }
      Branch {
	Points			[-5, 0; 0, 125]
	DstBlock		"Scope4"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Analog\nFilter Design"
      SrcPort		      1
      Points		      [45, 0]
      Branch {
	Points			[0, 295]
	DstBlock		"Scope1"
	DstPort			1
      }
      Branch {
	Points			[5, 0]
	Branch {
	  DstBlock		  "Scope2"
	  DstPort		  1
	}
	Branch {
	  Points		  [-5, 0]
	  DstBlock		  "Zero-Order\nHold1"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Saturation"
      SrcPort		      1
      Points		      [0, 15; 45, 0]
      Branch {
	DstBlock		"Analog\nFilter Design"
	DstPort			1
      }
      Branch {
	Points			[0, 120]
	DstBlock		"Scope5"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Zero-Order\nHold1"
      SrcPort		      1
      DstBlock		      "Spectrum\nScope1"
      DstPort		      1
    }
    Line {
      Labels		      [0, 0]
      SrcBlock		      "Analog\nFilter Design1"
      SrcPort		      1
      Points		      [80, 0; -40, 0]
      Branch {
	DstBlock		"Derivative"
	DstPort			1
      }
      Branch {
	Points			[0, 130]
	DstBlock		"Scope6"
	DstPort			1
      }
    }
  }
}

⌨️ 快捷键说明

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