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

📄 lhw_sttc_o2s4.mdl

📁 用simlink开发的space-time coding仿真模型,仿真的精度与效率有不小的提高
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Complex\nExponential"
	      SrcPort		      1
	      Points		      [25, 0; 0, -40]
	      DstBlock		      "Product"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Product"
	      SrcPort		      1
	      DstBlock		      "h1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "h2"
	  Ports			  [0, 1]
	  Position		  [25, 94, 45, 116]
	  BackgroundColor	  "lightBlue"
	  TreatAsAtomicUnit	  off
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  System {
	    Name		    "h2"
	    Location		    [189, 286, 669, 523]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Reference
	      Name		      "Complex\nExponential"
	      Ports		      [1, 1]
	      Position		      [150, 107, 200, 143]
	      SourceBlock	      "dspmathops/Complex\nExponential"
	      SourceType	      "Complex Exponential"
	      ShowPortLabels	      "on"
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Product"
	      Ports		      [2, 1]
	      Position		      [270, 62, 300, 93]
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Rayleigh Noise\nGenerator"
	      Ports		      [0, 1]
	      Position		      [125, 28, 205, 72]
	      FontSize		      10
	      SourceBlock	      "commnoisgen2/Rayleigh Noise\nGenerator"
	      SourceType	      "Rayleigh Noise Generator"
	      ShowPortLabels	      "on"
	      alpha		      "my_sigma"
	      seed		      "46567"
	      Ts		      "my_sample_time"
	      frameBased	      "off"
	      sampPerFrame	      "1"
	      orient		      "off"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Uniform Noise\nGenerator"
	      Ports		      [0, 1]
	      Position		      [25, 103, 105, 147]
	      FontSize		      10
	      SourceBlock	      "commnoisgen2/Uniform Noise\nGenerator"
	      SourceType	      "Uniform Noise Generator"
	      ShowPortLabels	      "on"
	      low		      "0"
	      up		      "2*pi"
	      seed		      "116719"
	      Ts		      "my_sample_time"
	      frameBased	      "off"
	      sampPerFrame	      "1"
	      orient		      "off"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "h2"
	      Position		      [325, 73, 355, 87]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Line {
	      SrcBlock		      "Uniform Noise\nGenerator"
	      SrcPort		      1
	      DstBlock		      "Complex\nExponential"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Rayleigh Noise\nGenerator"
	      SrcPort		      1
	      Points		      [20, 0; 0, 20]
	      DstBlock		      "Product"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Complex\nExponential"
	      SrcPort		      1
	      Points		      [25, 0; 0, -40]
	      DstBlock		      "Product"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Product"
	      SrcPort		      1
	      DstBlock		      "h2"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [235, 78, 265, 92]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "h1"
	  SrcPort		  1
	  DstBlock		  "Copy"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "h2"
	  SrcPort		  1
	  DstBlock		  "Copy1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Copy"
	  SrcPort		  1
	  DstBlock		  "Matrix\nConcatenation1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Copy1"
	  SrcPort		  1
	  DstBlock		  "Matrix\nConcatenation1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Matrix\nConcatenation1"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Display
      Name		      "Display1"
      Ports		      [1]
      Position		      [565, 436, 665, 504]
      FontSize		      10
      Decimation	      "1"
    }
    Block {
      BlockType		      Reference
      Name		      "Error Rate\nCalculation"
      Ports		      [2, 1]
      Position		      [390, 400, 465, 455]
      Orientation	      "down"
      NamePlacement	      "alternate"
      FontSize		      10
      SourceBlock	      "commsink2/Error Rate\nCalculation"
      SourceType	      "Error Rate Calculation"
      N			      "0"
      st_delay		      "130"
      cp_mode		      "Entire frame"
      subframe		      "[]"
      PMode		      "Port"
      WsName		      "ErrorVec"
      RsMode2		      off
      stop		      on
      numErr		      "200"
      maxBits		      "1e4"
    }
    Block {
      BlockType		      "S-Function"
      Name		      "Frame Error"
      Ports		      [2, 2]
      Position		      [394, 315, 461, 375]
      Orientation	      "down"
      NamePlacement	      "alternate"
      CopyFcn		      "set_param(gcbh,'LinkStatus','none')"
      PreSaveFcn	      "try, set_param(gcb,'FunctionName','FER_Prepare'"
"), end"
      OpenFcn		      "sfunctionwizard(gcbh)"
      FontSize		      10
      FunctionName	      "FER_Prepare"
      SFunctionModules	      "FER_Prepare_wrapper  "
      MaskType		      "S-Function Builder"
      MaskInitialization      "val = [[.9  0.75 0.75 1 1 .9 .9 1]',[1 1 0.75 0"
".75 .9 .9 1 .9]'];try , sys = get_param(gcb,'SfunBuilderFcnName');if isempty("
"sys), sys = get_param(gcb,'FunctionName'); end,catch, sys = get_param(gcb,'Fu"
"nctionName'); end"
      MaskDisplay	      "plot(val(:,1),val(:,2)),disp(sys)port_label('in"
"put',1,'u0')port_label('input',2,'u1')port_label('output',1,'y0')port_label('"
"output',2,'y1')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
    }
    Block {
      BlockType		      Reference
      Name		      "M-PSK\nModulator\nBaseband"
      Ports		      [1, 1]
      Position		      [205, 39, 260, 71]
      FontSize		      10
      SourceBlock	      "commdigbbndpm2/M-PSK\nModulator\nBaseband"
      SourceType	      "M-PSK Modulator Baseband"
      M			      "4"
      InType		      "Integer"
      Enc		      "Binary"
      Ph		      "0"
      numSamp		      "1"
    }
    Block {
      BlockType		      Reference
      Name		      "M-PSK\nModulator\nBaseband1"
      Ports		      [1, 1]
      Position		      [205, 114, 260, 146]
      FontSize		      10
      SourceBlock	      "commdigbbndpm2/M-PSK\nModulator\nBaseband"
      SourceType	      "M-PSK Modulator Baseband"
      M			      "4"
      InType		      "Integer"
      Enc		      "Binary"
      Ph		      "0"
      numSamp		      "1"
    }
    Block {
      BlockType		      Reference
      Name		      "Matrix\nConcatenation"
      Ports		      [2, 1]
      Position		      [330, 75, 380, 110]
      FontSize		      10
      SourceBlock	      "simulink/Math\nOperations/Matrix\nConcatenation"
      SourceType	      "Matrix Concatenation"
      numInports	      "2"
      catMethod		      "Horizontal"
    }
    Block {
      BlockType		      Reference
      Name		      "Matrix\nSum"
      Ports		      [1, 1]
      Position		      [500, 88, 545, 122]
      DialogController	      "dspDDGCreate"
      DialogControllerArgs    "DataTag0"
      FontSize		      10
      SourceBlock	      "dspmtrx3/Matrix\nSum"
      SourceType	      "Matrix Sum"
      Dim		      "Rows"
      additionalParams	      off
      allowOverrides	      on
      outputMode	      "Same as accumulator"
      outputWordLength	      "16"
      outputFracLength	      "15"
      accumMode		      "Inherit via internal rule"
      accumWordLength	      "32"
      accumFracLength	      "30"
      roundingMode	      "Floor"
      overflowMode	      off
      LockScale		      off
    }
    Block {
      BlockType		      Reference
      Name		      "Multiport\nSelector1"
      Ports		      [1, 2]
      Position		      [540, 182, 580, 213]
      FontSize		      10
      SourceBlock	      "dspindex/Multiport\nSelector"
      SourceType	      "Multiport Selector"
      rowsOrCols	      "Columns"
      idxCellArray	      "{ 1,2 }"
      idxErrMode	      "Clip Index"
    }
    Block {
      BlockType		      "S-Function"
      Name		      "My Viterbi Decoding"
      Ports		      [3, 1]
      Position		      [790, 98, 915, 152]
      CopyFcn		      "set_param(gcbh,'LinkStatus','none')"
      PreSaveFcn	      "try, set_param(gcb,'FunctionName','Viterbi_Deco"
"ding'), end"
      OpenFcn		      "sfunctionwizard(gcbh)"
      FontSize		      10
      FunctionName	      "Viterbi_Decoding"
      SFunctionModules	      "Viterbi_Decoding_wrapper  "
      WizardData	      "DataTag1"
      MaskType		      "S-Function Builder"
      MaskInitialization      "val = [[.9  0.75 0.75 1 1 .9 .9 1]',[1 1 0.75 0"
".75 .9 .9 1 .9]'];try , sys = get_param(gcb,'SfunBuilderFcnName');if isempty("
"sys), sys = get_param(gcb,'FunctionName'); end,catch, sys = get_param(gcb,'Fu"
"nctionName'); end"
      MaskDisplay	      "plot(val(:,1),val(:,2)),disp(sys)port_label('in"
"put',1,'r')port_label('input',2,'h1')port_label('input',3,'h2')port_label('ou"
"tput',1,'y')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
    }
    Block {
      BlockType		      SubSystem
      Name		      "O2s4 Encoding"
      Ports		      [1, 2]
      Position		      [95, 76, 155, 114]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"O2s4 Encoding"
	Location		[2, 74, 1014, 724]
	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, 243, 55, 257]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Add"
	  Ports			  [4, 1]
	  Position		  [635, 212, 670, 288]
	  Inputs		  "++++"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [200, 75, 230, 105]
	  Value			  "[0 2]"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [390, 115, 420, 145]
	  Value			  "[1 0]"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant2"
	  Position		  [200, 390, 230, 420]
	  Value			  "[2 2]"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant3"
	  Position		  [395, 350, 425, 380]
	  Value			  "[0 1]"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant4"
	  Position		  [680, 295, 710, 325]
	  Value			  "4"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Integer to Bit\nConverter2"
	  Ports			  [1, 1]
	  Position		  [90, 233, 135, 267]
	  FontSize		  10
	  SourceBlock		  "commutil2/Integer to Bit\nConverter"
	  SourceType		  "Integer to Bit Converter"
	  nbits			  "2"
	}
	Block {
	  BlockType		  Math
	  Name			  "Math\nFunction"

⌨️ 快捷键说明

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