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

📄 dpcm.mdl

📁 差分脉冲编码调制(DPCM)的matlab模块仿真
💻 MDL
📖 第 1 页 / 共 2 页
字号:
    }
    Block {
      BlockType		      Mux
      Inputs		      "4"
      DisplayOption	      "none"
      UseBusObject	      off
      BusObject		      "BusObject"
      NonVirtualBus	      off
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      UseBusObject	      off
      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		      Scope
      ModelBased	      off
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-5"
      YMax		      "5"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitDataPoints	      on
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "-1"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
    }
    Block {
      BlockType		      SignalGenerator
      WaveForm		      "sine"
      TimeSource	      "Use simulation time"
      Amplitude		      "1"
      Frequency		      "1"
      Units		      "Hertz"
      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"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Terminator
    }
    Block {
      BlockType		      ToWorkspace
      VariableName	      "simulink_output"
      MaxDataPoints	      "1000"
      Decimation	      "1"
      SampleTime	      "0"
      FixptAsFi		      off
    }
  }
  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		    "dpcm"
    Location		    [480, 149, 1170, 465]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Scope
      Name		      "Comparision\nInput & Output"
      Ports		      [1]
      Position		      [630, 59, 660, 91]
      Floating		      off
      Location		      [874, 469, 1198, 708]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Reference
      Name		      "DPCM\ndecode"
      Ports		      [1, 2]
      Position		      [250, 153, 330, 197]
      SourceBlock	      "commsrccod/DPCM\ndecode"
      SourceType	      "DPCM decode"
      ShowPortLabels	      on
      num		      "[0 .9963]"
      den		      "1"
      codebook		      "[-.0848 -.029 .0298 .0853]"
      sample_time	      ".1"
    }
    Block {
      BlockType		      Reference
      Name		      "DPCM\nencode"
      Ports		      [1, 2]
      Position		      [85, 163, 165, 207]
      SourceBlock	      "commsrccod/DPCM\nencode"
      SourceType	      "DPCM encode"
      ShowPortLabels	      on
      num		      "[0 .9963]"
      den		      "1"
      partition		      "[-.0569 .0004 .0576]"
      codebook		      "[-.0848 -.029 .0298 .0853]"
      sample_time	      ".1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "DPCM data\ntraining"
      Ports		      []
      Position		      [625, 183, 685, 227]
      ForegroundColor	      "red"
      ShowName		      off
      OpenFcn		      "x=sin([0:.1:40]);[p_trans,codebook,partition]=d"
"pcmopt(x,1,8);"
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskHideContents	      off
      MaskDisplay	      "disp('Load\\nData')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"DPCM data\ntraining"
	Location		[360, 145, 701, 331]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Digital FIR\nFilter Design"
      Ports		      [1, 1]
      Position		      [495, 177, 565, 233]
      SourceBlock	      "dspddes2/Digital FIR\nFilter Design"
      SourceType	      "Digital FIR Filter Design"
      ShowPortLabels	      on
      filttype		      "Lowpass"
      N			      "22"
      Wlo		      "0.4"
      Whi		      "0.6"
      W0		      "[.2 .5 .8]"
      g0		      "1"
      W1		      "[0 .2 .3 .6 .8 1]"
      gains		      "[1 .5 0 0 1 .5]"
      wintype		      "Hamming"
      Rs		      "10"
      Kbeta		      "5"
      frame		      off
      numChans		      "1"
    }
    Block {
      BlockType		      Display
      Name		      "Display"
      Ports		      [1]
      Position		      [455, 122, 540, 148]
      Decimation	      "1"
      Lockdown		      off
    }
    Block {
      BlockType		      Scope
      Name		      "Error\nNoise\n"
      Ports		      [1]
      Position		      [510, 59, 540, 91]
      Floating		      off
      Location		      [517, 493, 841, 732]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Gain
      Name		      "Gain\nAdj. \nAttenuation"
      Position		      [290, 60, 320, 90]
      Gain		      "0.9"
    }
    Block {
      BlockType		      Scope
      Name		      "Input"
      Ports		      [1]
      Position		      [180, 14, 210, 46]
      Floating		      off
      Location		      [172, 452, 496, 691]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1.5"
      YMax		      "1.5"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Reference
      Name		      "Integer to Bit\nConverter"
      Ports		      [1, 1]
      Position		      [235, 243, 315, 287]
      FontSize		      10
      SourceBlock	      "commutil2/Integer to Bit\nConverter"
      SourceType	      "Integer to Bit Converter"
      nbits		      "3"
      outDtype		      "Same as input"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [595, 56, 600, 94]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Scope
      Name		      "Quantization\nRecovered Value\n"
      Ports		      [1]
      Position		      [450, 234, 480, 266]
      Floating		      off
      Location		      [87, 447, 411, 686]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Quantized"
      Ports		      [1]
      Position		      [230, 94, 260, 126]
      Floating		      off
      Location		      [333, 494, 657, 733]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      TimeRange		      "100"
      YMin		      "0"
      YMax		      "3"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      SignalGenerator
      Name		      "Signal\ngenerator"
      Ports		      [0, 1]
      Position		      [15, 68, 60, 102]
      ShowName		      off
      Amplitude		      "1.000000"
      Frequency		      "1.000000"
      Units		      "rad/sec"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [385, 65, 405, 85]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
    }
    Block {
      BlockType		      Terminator
      Name		      "Terminator1"
      Position		      [360, 176, 380, 194]
      ShowName		      off
    }
    Block {
      BlockType		      Terminator
      Name		      "Terminator2"
      Position		      [185, 186, 205, 204]
      ShowName		      off
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace"
      Position		      [340, 250, 400, 280]
      VariableName	      "simout"
      MaxDataPoints	      "inf"
      Decimation	      "2"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Line {
      SrcBlock		      "Signal\ngenerator"
      SrcPort		      1
      Points		      [0, 15]
      Branch {
	Points			[0, 85]
	DstBlock		"DPCM\nencode"
	DstPort			1
      }
      Branch {
	Points			[0, -25; 65, 0]
	Branch {
	  DstBlock		  "Gain\nAdj. \nAttenuation"
	  DstPort		  1
	}
	Branch {
	  Points		  [0, -45]
	  DstBlock		  "Input"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "DPCM\ndecode"
      SrcPort		      1
      Points		      [60, 0]
      Branch {
	DstBlock		"Sum"
	DstPort			2
      }
      Branch {
	Points			[0, 40; 25, 0]
	Branch {
	  DstBlock		  "Digital FIR\nFilter Design"
	  DstPort		  1
	}
	Branch {
	  Points		  [0, 45]
	  DstBlock		  "Quantization\nRecovered Value\n"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "DPCM\nencode"
      SrcPort		      1
      Points		      [40, 0]
      Branch {
	DstBlock		"DPCM\ndecode"
	DstPort			1
      }
      Branch {
	Points			[0, -65]
	DstBlock		"Quantized"
	DstPort			1
      }
      Branch {
	Points			[0, 90]
	DstBlock		"Integer to Bit\nConverter"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "DPCM\ndecode"
      SrcPort		      2
      DstBlock		      "Terminator1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      Points		      [25, 0]
      Branch {
	DstBlock		"Error\nNoise\n"
	DstPort			1
      }
      Branch {
	Points			[0, 60]
	DstBlock		"Display"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Gain\nAdj. \nAttenuation"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	DstBlock		"Sum"
	DstPort			1
      }
      Branch {
	Points			[0, -30; 240, 0; 0, 20]
	DstBlock		"Mux"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Digital FIR\nFilter Design"
      SrcPort		      1
      Points		      [5, 0; 0, -120]
      DstBlock		      "Mux"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "Comparision\nInput & Output"
      DstPort		      1
    }
    Line {
      SrcBlock		      "DPCM\nencode"
      SrcPort		      2
      DstBlock		      "Terminator2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Integer to Bit\nConverter"
      SrcPort		      1
      DstBlock		      "To Workspace"
      DstPort		      1
    }
    Annotation {
      Name		      "Function\nGenerator"
      Position		      [37, 118]
      UseDisplayTextAsClickCallback off
    }
  }
}

⌨️ 快捷键说明

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