Model {
  Name			  "phasenoise_sim"
  Version		  4.00
  SampleTimeColors	  off
  LibraryLinkDisplay	  "none"
  WideLines		  off
  ShowLineDimensions	  off
  ShowPortDataTypes	  off
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  BlockNameDataTip	  off
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  Created		  "Thu Aug 03 22:05:55 2000"
  Creator		  "mikem"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "ysong"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Thu Sep 07 16:07:56 2000"
  ModelVersionFormat	  "1.%<AutoIncrement:22>"
  ConfigurationManager	  "none"
  SimParamPage		  "Solver"
  StartTime		  "0.0"
  StopTime		  "10"
  SolverMode		  "Auto"
  Solver		  "FixedStepDiscrete"
  RelTol		  "1e-3"
  AbsTol		  "auto"
  Refine		  "1"
  MaxStep		  "auto"
  MinStep		  "auto"
  MaxNumMinSteps	  "-1"
  InitialStep		  "auto"
  FixedStep		  "auto"
  MaxOrder		  5
  OutputOption		  "RefineOutputTimes"
  OutputTimes		  "[]"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  SaveTime		  off
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  off
  OutputSaveName	  "yout"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  SaveFormat		  "Array"
  LimitDataPoints	  on
  MaxDataPoints		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  "warning"
  MinStepSizeMsg	  "warning"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  SingleTaskRateTransMsg  "none"
  MultiTaskRateTransMsg	  "error"
  IntegerOverflowMsg	  "warning"
  CheckForMatrixSingularity "none"
  UnnecessaryDatatypeConvMsg "none"
  Int32ToFloatConvMsg	  "warning"
  SignalLabelMismatchMsg  "none"
  LinearizationMsg	  "none"
  VectorMatrixConversionMsg "none"
  SfunCompatibilityCheckMsg "none"
  BlockPriorityViolationMsg "warning"
  ArrayBoundsChecking	  "none"
  ConsistencyChecking	  "none"
  ZeroCross		  on
  Profile		  off
  SimulationMode	  "normal"
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  TLCProfiler		  off
  TLCDebug		  off
  TLCCoverage		  off
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  on
  ExtModeLogAll		  on
  OptimizeBlockIOStorage  on
  BufferReuse		  on
  ParameterPooling	  on
  BlockReductionOpt	  off
  BooleanDataType	  off
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "MS Sans Serif"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "MS Sans Serif"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  LineDefaults {
    FontName		    "MS Sans Serif"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "phasenoise_sim"
    Location		    [157, 237, 1078, 512]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "automatic"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    AutoZoom		    on
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Reference
      Name		      "AWGN\nChannel"
      Ports		      [1, 1]
      Position		      [255, 109, 335, 151]
      ShowName		      off
      FontName		      "Helvetica"
      SourceBlock	      "commchan2/AWGN\nChannel"
      SourceType	      "AWGN Channel"
      seed		      "54321"
      noiseMode		      "Signal to noise ratio  (Es/No)"
      EsNodB		      "10*log10(log2(256))+26"
      SNRdB		      "10"
      Ps		      "1"
      Tsym		      ".001"
      variance		      "1"
    }
    Block {
      BlockType		      Reference
      Name		      "AWGN plus Phase Noise"
      Ports		      [1]
      Position		      [500, 195, 585, 245]
      FontName		      "Helvetica"
      SourceBlock	      "commsink2/Discrete-Time\nEye and Scatter\nDiagr"
"ams"
      SourceType	      "Discrete-Time Eye and Scatter Diagrams"
      time_range	      ".001"
      time_offset	      "eps"
      time_decision	      ".001"
      boundary		      "[-1.5 1.5]"
      kept_length	      "5"
      diagram_type	      "Scatter Diagram"
      eye_line		      "b-/r-"
      scatter_line	      "r."
      sample_time	      ".001"
    }
    Block {
      BlockType		      Display
      Name		      "Display"
      Ports		      [1]
      Position		      [735, 88, 820, 152]
      ShowName		      off
      FontName		      "Helvetica"
      Format		      "short"
      Decimation	      "1"
      Floating		      off
      SampleTime	      "-1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Display\nFigure"
      Ports		      []
      Position		      [60, 199, 115, 242]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "openfig phasenoise256qam.fig;"
      FontName		      "Arial"
      FontSize		      12
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Display Figure"
      MaskDisplay	      "disp('Display\\nFigure');"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      System {
	Name			"Display\nFigure"
	Location		[154, 467, 416, 618]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  SubSystem
	  Name			  "EmptySubsystem"
	  Ports			  []
	  Position		  [115, 50, 145, 80]
	  FontName		  "Helvetica"
	  ShowPortLabels	  on
	  TreatAsAtomicUnit	  off
	  RTWSystemCode		  "Auto"
	  RTWFcnNameOpts	  "Auto"
	  RTWFileNameOpts	  "Auto"
	  System {
	    Name		    "EmptySubsystem"
	    Location		    [146, 180, 902, 673]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	  }
	}
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Error Rate Calculation"
      Ports		      [2, 1]
      Position		      [610, 90, 700, 145]
      ShowName		      off
      FontName		      "Helvetica"
      SourceBlock	      "commsink2/Error Rate Calculation"
      SourceType	      "Error Rate Calculation"
      N			      "0"
      st_delay		      "0"
      cp_mode		      "Entire frame"
      subframe		      "[]"
      PMode		      "Port"
      WsName		      "ErrorVec"
      RsMode2		      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "Model Info"
      Ports		      []
      Position		      [730, 199, 781, 239]
      BackgroundColor	      "lightBlue"
      ShowName		      off
      CopyFcn		      "slcm CopyBlock;"
      DeleteFcn		      "slcm Cancel;"
      LoadFcn		      "slcm LoadBlock;"
      PostSaveFcn	      "slcm('UpdateAllCMBlocksInThisModel')"
      InitFcn		      "slcm('UpdateAllCMBlocksInThisModelInit')"
      NameChangeFcn	      "slcm Rename;"
      OpenFcn		      "commdemohelp;"
      FontName		      "Arial"
      FontSize		      12
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "CMBlock"
      MaskDescription	      "This block allows revision control information "
"to be displayed within the model."
      MaskPromptString	      "InitialSaveTempField|InitialBlockCM|BlockCM|Fra"
"me|SaveTempField|DisplayStringWithTags|MaskDisplayString|HorizontalTextAlignm"
"ent|LeftAlignmentValue|SourceBlockDiagram|TagMaxNumber|CMTag1|CMTag2|CMTag3|C"
"MTag4|CMTag5|CMTag6|CMTag7|CMTag8|CMTag9|CMTag10|CMTag11|CMTag12|CMTag13|CMTa"
"g14|CMTag15|CMTag16|CMTag17|CMTag18|CMTag19|CMTag20"
      MaskStyleString	      "edit,edit,edit,edit,edit,edit,edit,edit,edit,ed"
"it,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit"
",edit,edit,edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
      MaskCallbackString      "||||||||||||||||||||||||||||||"
      MaskEnableString	      "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
      MaskVisibilityString    "off,off,off,off,off,off,off,off,off,off,off,off"
",off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off"
      MaskToolTipString	      "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
      MaskVariables	      "InitialSaveTempField=&1;InitialBlockCM=&2;Block"
"CM=&3;Frame=&4;SaveTempField=&5;DisplayStringWithTags=&6;MaskDisplayString=&7"
";HorizontalTextAlignment=&8;LeftAlignmentValue=&9;SourceBlockDiagram=&10;TagM"
"axNumber=@11;CMTag1=&12;CMTag2=&13;CMTag3=&14;CMTag4=&15;CMTag5=&16;CMTag6=&1"
"7;CMTag7=&18;CMTag8=&19;CMTag9=&20;CMTag10=&21;CMTag11=&22;CMTag12=&23;CMTag1"
"3=&24;CMTag14=&25;CMTag15=&26;CMTag16=&27;CMTag17=&28;CMTag18=&29;CMTag19=&30"
";CMTag20=&31;"
      MaskDisplay	      "text(str2num(LeftAlignmentValue), 0.5, MaskDisp"
"layString, 'HorizontalAlignment', HorizontalTextAlignment)\n"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      MaskValueString	      "|none|none|on||Info|Info|Center|0.5|phasenoise_"
"sim|20||||||||||||||||||||"
      MaskVariableAliases     ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
      System {
	Name			"Model Info"
	Location		[154, 467, 416, 618]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  SubSystem
	  Name			  "EmptySubsystem"
	  Ports			  []
	  Position		  [115, 50, 145, 80]
	  FontName		  "Helvetica"
	  ShowPortLabels	  on
	  TreatAsAtomicUnit	  off
	  RTWSystemCode		  "Auto"
	  RTWFcnNameOpts	  "Auto"
	  RTWFileNameOpts	  "Auto"
	  System {
	    Name		    "EmptySubsystem"
	    Location		    [146, 180, 902, 673]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	  }
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Phase Noise"
      Ports		      [1, 1]
      Position		      [375, 103, 445, 157]
      ShowName		      off
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Phase Noise"
      MaskDescription	      "Generate zero-mean Gaussian phase noise. The ph"
"ase noise parameter represents the root-mean-square (RMS) value of the phase "
"noise."
      MaskPromptString	      "Phase noise (degrees):|Inital seed:"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVariables	      "ph_noise=@1;seed=@2;"
      MaskDisplay	      "disp('Phase Noise')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "2|12345"
      MaskVariableAliases     ","
      System {
	Name			"Phase Noise"
	Location		[452, 508, 819, 658]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"automatic"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [105, 48, 135, 62]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Reference
	  Name			  "Complex Phase\nShift"
	  Ports			  [2, 1]
	  Position		  [160, 43, 240, 92]
	  FontName		  "Helvetica"
	  SourceBlock		  "commsequence2/Complex Phase\nShift"
	  SourceType		  "Complex Phase Shift"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Random\nSource"
	  Ports			  [0, 1]
	  Position		  [60, 61, 95, 99]
	  Diagnostics		  "AllowInheritedTsInSrc"
	  FontName		  "Helvetica"
	  SourceBlock		  "dspsrcs3/Random\nSource"
	  SourceType		  "Random Source"
	  SrcType		  "Gaussian"
	  Min			  "0"
	  Max			  "1"
	  Mean			  "0"
	  Var			  "((pi/180)*ph_noise)^2"
	  Seed			  "seed"
	  Inherit		  on
	  SampMode		  "Discrete"
	  SampTime		  "1"
	  SampFrame		  "1"
	  OutComplex		  "Real"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [275, 63, 305, 77]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	Line {
	  SrcBlock		  "Random\nSource"
	  SrcPort		  1
	  DstBlock		  "Complex Phase\nShift"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Complex Phase\nShift"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Complex Phase\nShift"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Random-Integer\nGenerator"
      Ports		      [0, 1]
      Position		      [15, 108, 95, 152]
      ShowName		      off
      FontName		      "Helvetica"
      SourceBlock	      "commsource2/Random-Integer\nGenerator"
      SourceType	      "Random-Integer Generator"
      mul		      "256"
      seed		      "12345"
      Ts		      ".001"
      frameBased	      off
      sampPerFrame	      "1"
      orient		      off
    }
    Block {
      BlockType		      Reference
      Name		      "Rectangular QAM\nDemodulator\nBaseband"
      Ports		      [1, 1]
      Position		      [505, 104, 580, 156]
      ShowName		      off
      FontName		      "Helvetica"
      SourceBlock	      "commdigbbndam2/Rectangular QAM\nDemodulator\nBa"
"seband"
      SourceType	      "Rectangular QAM Demodulator Baseband"
      M			      "256"
      OutType		      "Integer"
      Dec		      "Binary"
      PowType		      "Average Power"
      MinDist		      "2"
      AvgPow		      "1"
      PeakPow		      "1"
      Ph		      "0"
      numSamp		      "1"
    }
    Block {
      BlockType		      Reference
      Name		      "Rectangular QAM\nModulator\nBaseband"
      Ports		      [1, 1]
      Position		      [140, 104, 215, 156]
      ShowName		      off
      FontName		      "Helvetica"
      SourceBlock	      "commdigbbndam2/Rectangular QAM\nModulator\nBase"
"band"
      SourceType	      "Rectangular QAM Modulator Baseband"
      M			      "256"
      InType		      "Integer"
      Enc		      "Binary"
      PowType		      "Average Power"
      MinDist		      "2"
      AvgPow		      "1"
      PeakPow		      "1"
      Ph		      "0"
      numSamp		      "1"
    }
    Line {
      SrcBlock		      "AWGN\nChannel"
      SrcPort		      1
      DstBlock		      "Phase Noise"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rectangular QAM\nModulator\nBaseband"
      SrcPort		      1
      DstBlock		      "AWGN\nChannel"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Random-Integer\nGenerator"
      SrcPort		      1
      Points		      [0, 0; 10, 0]
      Branch {
	DstBlock		"Rectangular QAM\nModulator\nBaseband"
	DstPort			1
      }
      Branch {
	Points			[0, -45; 485, 0]
	DstBlock		"Error Rate Calculation"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Phase Noise"
      SrcPort		      1
      Points		      [-5, 0; 25, 0]
      Branch {
	DstBlock		"Rectangular QAM\nDemodulator\nBaseband"
	DstPort			1
      }
      Branch {
	Points			[0, 90]
	DstBlock		"AWGN plus Phase Noise"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Rectangular QAM\nDemodulator\nBaseband"
      SrcPort		      1
      DstBlock		      "Error Rate Calculation"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Error Rate Calculation"
      SrcPort		      1
      DstBlock		      "Display"
      DstPort		      1
    }
    Annotation {
      Position		      [454, 44]
      Text		      "Effect of Receiver Phase Noise on 256-QAM"
      FontSize		      16
      FontWeight	      "bold"
    }
    Annotation {
      Position		      [243, 220]
      Text		      "Double-click on this block to see a BER plot \n"
"showing the performance of 256-QAM \nwith various levels of phase noise."
      FontName		      "Helvetica"
    }
    Annotation {
      Position		      [845, 98]
      Text		      "SER"
      FontName		      "Arial"
    }
    Annotation {
      Position		      [861, 120]
      Text		      "Total Errors"
      FontName		      "Arial"
    }
    Annotation {
      Position		      [870, 138]
      Text		      "Total Symbols"
      FontName		      "Arial"
    }
  }
}
