Library {
  Name			  "com_ddm2"
  Version		  4.00
  LibraryLinkDisplay	  "none"
  CovSaveName		  "covdata"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  BlockNameDataTip	  off
  BlockParametersDataTip  on
  BlockDescriptionStringDataTip	off
  ToolBar		  off
  StatusBar		  off
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  Created		  "Tue Oct 20 09:14:29 1998"
  Creator		  "tdelve"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "ysong"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Wed Aug 23 12:06:54 2000"
  ModelVersionFormat	  "1.%<AutoIncrement:6>"
  ConfigurationManager	  "none"
  SimParamPage		  "Solver"
  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"
  Profile		  off
  SimulationMode	  "normal"
  RTWRetainRTWFile	  off
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  TLCProfiler		  off
  TLCDebug		  off
  TLCCoverage		  off
  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
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  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		    "com_ddm2"
    Location		    [100, 275, 791, 738]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    AutoZoom		    on
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "BPSK corr passband"
      Ports		      [1, 1]
      Position		      [475, 138, 555, 182]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband BPSK correlation"
      MaskDescription	      "Compute BPSK correlation. Input a BPSK modulate"
"d signal and output a correlation vector signal."
      MaskHelp		      "This block calculates the correlation value of "
"the input signal with a two-element vector of carrier frequency sinusoidal si"
"gnals. The difference between the phases of the two carrier frequency signals"
" is pi. The output is a two-element correlation vector signal. The computatio"
"n is phase sensitive."
      MaskPromptString	      "Symbol interval and offset (sec):|Carrier frequ"
"ency (Hz):|Initial phase (rad):|Sample time (sec):"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fcc=@2;Ph=@3;ts=@4;"
      MaskInitialization      "pi2=2*pi;sft=[0:1]*pi2/2;Fc=Fcc*pi2;"
      MaskDisplay	      "disp('Corr BPSK\\ndemod')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1|100/2/pi|0|.01"
      MaskVariableAliases     ",,,"
      System {
	Name			"BPSK corr passband"
	Location		[360, 100, 928, 291]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [305, 100, 325, 120]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Array sin"
	  Ports			  [1, 1]
	  Position		  [295, 50, 345, 70]
	  FunctionName		  "arysin"
	  Parameters		  "'cos'"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	}
	Block {
	  BlockType		  Clock
	  Name			  "Clock"
	  Position		  [15, 90, 35, 110]
	  DeleteFcn		  "simclock BlockIsBeingDestroyed"
	  PostSaveFcn		  "simclock Save"
	  DisplayTime		  off
	  Decimation		  "10"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [65, 85, 105, 115]
	  Gain			  "Fc"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Constant
	  Name			  "Initial phase"
	  Position		  [165, 48, 185, 72]
	  Value			  "Ph"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [385, 51, 410, 84]
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Scheduled\nreset-int1"
	  Ports			  [1, 1]
	  Position		  [440, 49, 500, 91]
	  FunctionName		  "schdint"
	  Parameters		  "td, ts, limit"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	  MaskType		  "Scheduled reset integration."
	  MaskDescription	  "Reset the state to be zero(s) at the schedu"
"led reset point."
	  MaskHelp		  "This block resets the state(s) to be zero(s"
") at the begining of reset time inteval. The reset inteval can be a two eleme"
"nts vector with the second element being offset."
	  MaskPromptString	  "Scheduled reset time inteval and offset:|Sa"
"mple time and offset:|Modulo bound:"
	  MaskStyleString	  "edit,edit,edit"
	  MaskTunableValueString  "on,on,on"
	  MaskCallbackString	  "||"
	  MaskEnableString	  "on,on,on"
	  MaskVisibilityString	  "on,on,on"
	  MaskToolTipString	  "on,on,on"
	  MaskInitialization	  "td=@1;ts=@2;limit=@3;"
	  MaskDisplay		  "disp('Schdld\\nreset-int')"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  MaskValueString	  "td|ts|Inf"
	  MaskVariableAliases	  ",,"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Shift key"
	  Position		  [115, 13, 135, 37]
	  Value			  "sft"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [3, 1]
	  Position		  [240, 40, 265, 80]
	  IconShape		  "rectangular"
	  Inputs		  "+++"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum2"
	  Ports			  [2, 1]
	  Position		  [185, 90, 210, 125]
	  IconShape		  "rectangular"
	  Inputs		  "+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold"
	  Position		  [125, 119, 160, 151]
	  SampleTime		  "td"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [525, 60, 545, 80]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  Points		  [30, 0; 0, -35]
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Array sin"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold"
	  SrcPort		  1
	  Points		  [0, -20]
	  DstBlock		  "Sum2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    DstBlock		    "Zero-Order\nHold"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Sum2"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum2"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "Sum1"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Clock"
	  SrcPort		  1
	  DstBlock		  "Gain"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Initial phase"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Shift key"
	  SrcPort		  1
	  Points		  [85, 0]
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Array sin"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Scheduled\nreset-int1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Scheduled\nreset-int1"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "BPSK demod"
      Ports		      [1, 1]
      Position		      [140, 138, 220, 182]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband BPSK demodulation"
      MaskDescription	      "Demodulate a BPSK modulated signal using correl"
"ation method."
      MaskHelp		      "This block demodulates a BPSK modulated signal "
"using the correlation method. Input is a modulated analog signal. Output is a"
" demodulated binary signal. Match the parameters to the ones used in the corr"
"esponding BPSK Mod block. The offset value in Symbol interval can be differen"
"t."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Initial phase (rad):|Sample time (sec):"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;Ph=@3;ts=@4;"
      MaskDisplay	      "plot(0,0,100,100,[5+1.5*[[0:.8:10] [10:1.6:20] "
"[20:.8:30]] 50 50 50 50+15*[0 1 1 2 2 3]],[85+10*[sin([0:.8:10]*pi*2/5) sin(["
"10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)] 85 99 75 85+8*[1 1 -1 -1 1 1]]);\ndi"
"sp('BPSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      ".1|100/2/pi|0|.01"
      MaskVariableAliases     ",,,"
      System {
	Name			"BPSK demod"
	Location		[360, 100, 723, 240]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [10, 65, 30, 85]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Reference
	  Name			  "BPSK corr passband"
	  Ports			  [1, 1]
	  Position		  [60, 53, 140, 97]
	  SourceBlock		  "com_ddm2/BPSK corr passband"
	  SourceType		  "Passband BPSK correlation"
	  td			  "td"
	  Fcc			  "Fc"
	  Ph			  "Ph"
	  ts			  "ts"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Min/max index2"
	  Ports			  [1, 1]
	  Position		  [185, 53, 265, 97]
	  SourceBlock		  "com_mocd/Min//max index"
	  SourceType		  "Maximum/minimum index."
	  td			  "td"
	  mima			  "'max'"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [295, 65, 315, 85]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "BPSK corr passband"
	  SrcPort		  1
	  DstBlock		  "Min/max index2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "BPSK corr passband"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Min/max index2"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "BPSK map"
      Ports		      [1, 1]
      Position		      [365, 138, 445, 182]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "BPSK map"
      MaskDescription	      "Map digital input signal to analog phase shift."
      MaskHelp		      "This block maps the digital input signal to the"
" analog signal for phase modulation (PM). The input is a binary signal. This "
"block is a special case of the MPSK block when the M-ary number equals 2. If "
"the input signal is 0, the phase shift is 0. If the input signal is 1, the ph"
"ase shift is pi."
      MaskPromptString	      "Input symbol interval and offset (sec):"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "td=@1;"
      MaskInitialization      "pi2=2*pi;Sft=pi2/2;"
      MaskDisplay	      "disp('BPSK\\nmap')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1"
      System {
	Name			"BPSK map"
	Location		[360, 100, 708, 274]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [60, 35, 80, 55]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Constant
	  Name			  "Multiple factor"
	  Position		  [130, 108, 150, 132]
	  Value			  "Sft"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [235, 76, 260, 109]
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold1"
	  Position		  [130, 29, 165, 61]
	  SampleTime		  "td"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [310, 85, 330, 105]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Multiple factor"
	  SrcPort		  1
	  Points		  [45, 0; 0, -20]
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold1"
	  SrcPort		  1
	  Points		  [30, 0; 0, 40]
	  DstBlock		  "Product"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "BPSK map demo"
      Ports		      []
      Position		      [580, 138, 660, 182]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "tbpsk2"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('BPSK map\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"BPSK map demo"
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "BPSK mod"
      Ports		      [1, 1]
      Position		      [25, 138, 105, 182]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband BPSK modulation"
      MaskDescription	      "Modulate the input signal using binary phase sh"
"ift keying method."
      MaskHelp		      "This block modulates a digital signal with a gi"
"ven carrier frequency using the BPSK method. The input is a binary signal. It"
" uses the BPSK Map block before feeding the signal to the PM block. When the "
"symbol interval is a two-element vector, the second element is the offset (de"
"fault is 0). The output is a modulated analog signal with maximum amplitude e"
"qual to 1."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Initial phase (rad):|Sample time (sec):"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;Ph=@3;ts=@4;"
      MaskDisplay	      "plot(0,0,100,100,[5+15*[0 1 1 2 2 3] 50 50 50 5"
"0+1.5*[[0:.8:10] [10:1.6:20] [20:.8:30]]],[85+8*[1 1 -1 -1 1 1] 85 99 75 85+1"
"0*[sin([0:.8:10]*pi*2/5) sin([10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)]]);\ndi"
"sp('BPSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      ".1|100/2/pi|0|.01"
      MaskVariableAliases     ",,,"
      System {
	Name			"BPSK mod"
	Location		[360, 100, 678, 235]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [10, 65, 30, 85]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Reference
	  Name			  "BPSK map"
	  Ports			  [1, 1]
	  Position		  [60, 53, 140, 97]
	  SourceBlock		  "com_ddm2/BPSK map"
	  SourceType		  "BPSK map"
	  td			  "td"
	}
	Block {
	  BlockType		  Reference
	  Name			  "PM\npassband"
	  Ports			  [1, 1]
	  Position		  [165, 53, 245, 97]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  SourceBlock		  "com_cdmo/PM\npassband"
	  SourceType		  "Passband PM"
	  MaskParam1		  "Fc"
	  MaskParam2		  "Ph"
	  MaskParam3		  "td"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [275, 65, 295, 85]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "BPSK map"
	  SrcPort		  1
	  DstBlock		  "PM\npassband"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "PM\npassband"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "BPSK map"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "BPSK modem demo"
      Ports		      []
      Position		      [250, 138, 330, 182]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "tbpsk"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('BPSK\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"BPSK modem demo"
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "DPSK demod"
      Ports		      [1, 1]
      Position		      [140, 68, 220, 112]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband DPSK demodulation"
      MaskDescription	      "Demodulate a DPSK modulated signal."
      MaskHelp		      "This block demodulates a DPSK modulated signal "
"using the digital MPSK Demod block and the Differential Decoder block. The in"
"put is a modulated analog signal and the output is a demodulated binary signa"
"l. Match the parameters to the ones used in the corresponding DPSK Mod block."
" The offset value in Symbol interval can be different."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Initial phase (rad):|Sample time (sec):"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;Ph=@3;ts=@4;"
      MaskDisplay	      "plot(0,0,100,100,[5+1.5*[[0:.8:10] [10:1.6:20] "
"[20:.8:30]] 50 50 50 50+15*[0 1 1 2 2 3]],[85+10*[sin([0:.8:10]*pi*2/5) sin(["
"10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)] 85 99 75 85+8*[1 1 -1 -1 1 1]]);\ndi"
"sp('DPSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      ".1|100/2/pi|0|.01"
      MaskVariableAliases     ",,,"
      System {
	Name			"DPSK demod"
	Location		[360, 100, 808, 199]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [15, 35, 35, 55]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Reference
	  Name			  "Differential decode"
	  Ports			  [1, 1]
	  Position		  [290, 22, 370, 68]
	  ShowName		  off
	  SourceBlock		  "com_ddm2/Differential decode"
	  SourceType		  "Binary differential decoder"
	  td			  "td"
	}
	Block {
	  BlockType		  Reference
	  Name			  "MPSK demod\ncorr passband"
	  Ports			  [1, 1]
	  Position		  [65, 23, 145, 67]
	  ShowName		  off
	  SourceBlock		  "com_mocd/Corr MPSK\ndemod passband"
	  SourceType		  "Passband MPSK coherent MPSK correlation"
	  N			  "2"
	  td			  "td"
	  MaskParam3		  "Fc"
	  Ph			  "Ph"
	  ts			  "ts"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Min/max index2"
	  Ports			  [1, 1]
	  Position		  [180, 23, 260, 67]
	  ShowName		  off
	  SourceBlock		  "com_mocd/Min//max index"
	  SourceType		  "Maximum/minimum index."
	  td			  "td"
	  mima			  "'max'"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [400, 35, 420, 55]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Differential decode"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Min/max index2"
	  SrcPort		  1
	  DstBlock		  "Differential decode"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "MPSK demod\ncorr passband"
	  SrcPort		  1
	  DstBlock		  "Min/max index2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "MPSK demod\ncorr passband"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "DPSK mod"
      Ports		      [1, 1]
      Position		      [25, 68, 105, 112]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband DPSK modulation"
      MaskDescription	      "Modulate the input signal using differential ph"
"ase shift keying method."
      MaskHelp		      "This block modulates a digital signal with a gi"
"ven carrier frequency using the DPSK method. The input to this block is a bin"
"ary signal. When the symbol interval is a two-element vector, the second elem"
"ent is the offset (default is 0). The output is a modulated analog signal wit"
"h a maximum amplitude equal to 1."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Initial phase (rad):|Sample time (sec):"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;Ph=@3;ts=@4;"
      MaskDisplay	      "plot(0,0,100,100,[5+15*[0 1 1 2 2 3] 50 50 50 5"
"0+1.5*[[0:.8:10] [10:1.6:20] [20:.8:30]]],[85+8*[1 1 -1 -1 1 1] 85 99 75 85+1"
"0*[sin([0:.8:10]*pi*2/5) sin([10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)]]);\ndi"
"sp('DPSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      ".1|100/2/pi|0|.01"
      MaskVariableAliases     ",,,"
      System {
	Name			"DPSK mod"
	Location		[360, 100, 799, 202]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [15, 40, 35, 60]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Reference
	  Name			  "Differential encode1"
	  Ports			  [1, 1]
	  Position		  [60, 28, 140, 72]
	  ShowName		  off
	  SourceBlock		  "com_ddm2/Differential encode"
	  SourceType		  "Binary differential encoder"
	  td			  "td"
	}
	Block {
	  BlockType		  Reference
	  Name			  "MPSK map"
	  Ports			  [1, 1]
	  Position		  [170, 28, 250, 72]
	  ShowName		  off
	  SourceBlock		  "com_mocd/MPSK map"
	  SourceType		  "MPSK map"
	  MaskParam1		  "2"
	  td			  "td"
	}
	Block {
	  BlockType		  Reference
	  Name			  "PM\npassband"
	  Ports			  [1, 1]
	  Position		  [275, 28, 355, 72]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  SourceBlock		  "com_cdmo/PM\npassband"
	  SourceType		  "Passband PM"
	  MaskParam1		  "Fc"
	  MaskParam2		  "Ph"
	  MaskParam3		  "td"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [385, 40, 405, 60]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Differential encode1"
	  SrcPort		  1
	  DstBlock		  "MPSK map"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "Differential encode1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "PM\npassband"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "MPSK map"
	  SrcPort		  1
	  DstBlock		  "PM\npassband"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "DPSK modem demo"
      Ports		      []
      Position		      [250, 68, 330, 112]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "tdpsk2"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('DPSK\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"DPSK modem demo"
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "DPSK modem demo1"
      Ports		      []
      Position		      [580, 68, 660, 112]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "tdpsk"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('DPSK codec\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"DPSK modem demo1"
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Demonstration blocks "
      Ports		      []
      Position		      [375, 355, 430, 378]
      Orientation	      "up"
      BackgroundColor	      "cyan"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp(' ')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Demonstration blocks "
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Differential decode"
      Ports		      [1, 1]
      Position		      [475, 67, 555, 113]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Binary differential decoder"
      MaskDescription	      "The binary scalar output of this block, D(k), i"
"s a logical differential computation of the binary scalar input of this block"
", M(k). D(k) = rem(M(k) + M(k-1) + 1,2)."
      MaskHelp		      "This block decodes a differential encoded signa"
"l. Let the input signal be M(k) and the output signal be D(k). Then, D(k) = r"
"em(M(k) + M(k-1) + 1,2), where M(k-1) is the previous input to this block. Th"
"e time interval between M(k) and M(k-1) is td, the symbol interval."
      MaskPromptString	      "Symbol interval (sec):"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "td=@1;"
      MaskDisplay	      "disp('Differential\\ndecoder')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1"
      System {
	Name			"Differential decode"
	Location		[360, 100, 660, 248]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [20, 28, 50, 42]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator"
	  Ports			  [2, 1]
	  Position		  [130, 27, 160, 58]
	  ShowName		  off
	  Operator		  "XOR"
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator1"
	  Ports			  [1, 1]
	  Position		  [180, 29, 210, 61]
	  ShowName		  off
	  Operator		  "NOT"
	  Inputs		  "1"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay"
	  Position		  [75, 75, 105, 105]
	  ShowName		  off
	  X0			  "0"
	  SampleTime		  "td"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [235, 38, 265, 52]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Logical\nOperator"
	  SrcPort		  1
	  DstBlock		  "Logical\nOperator1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  Points		  [5, 0]
	  Branch {
	    DstBlock		    "Unit Delay"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Logical\nOperator"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Unit Delay"
	  SrcPort		  1
	  Points		  [5, 0]
	  DstBlock		  "Logical\nOperator"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Logical\nOperator1"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Differential encode"
      Ports		      [1, 1]
      Position		      [365, 68, 445, 112]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Binary differential encoder"
      MaskDescription	      "The binary scalar output of this block, D(k), i"
"s a logical differential computation of the binary scalar input to this block"
", M(k) with the  previous output of this block D(k-1). D(k) = rem(M(k) + D(k-"
"1),2)"
      MaskHelp		      "This block encodes the binary scalar signal usi"
"ng the differential encode method. Let the input signal be M(k) and the outpu"
"t signal be D(k). Then, D(k) = rem(M(k) + D(k-1),2), where D(k-1) is the prev"
"ious output of this block. The time interval between D(k) and D(k-1) is td, t"
"he symbol interval."
      MaskPromptString	      "Symbol interval (sec):"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "td=@1;"
      MaskDisplay	      "disp('Differential\\nencoder')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1"
      System {
	Name			"Differential encode"
	Location		[360, 100, 641, 248]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [25, 28, 55, 42]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator"
	  Ports			  [2, 1]
	  Position		  [80, 27, 110, 58]
	  ShowName		  off
	  Operator		  "XOR"
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator1"
	  Ports			  [1, 1]
	  Position		  [135, 29, 165, 61]
	  ShowName		  off
	  Operator		  "NOT"
	  Inputs		  "1"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay"
	  Position		  [130, 95, 160, 125]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  X0			  "0"
	  SampleTime		  "td"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [205, 38, 235, 52]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Logical\nOperator"
	  SrcPort		  1
	  DstBlock		  "Logical\nOperator1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Logical\nOperator1"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    DstBlock		    "Out1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 65]
	    DstBlock		    "Unit Delay"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Unit Delay"
	  SrcPort		  1
	  Points		  [-60, 0]
	  DstBlock		  "Logical\nOperator"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Logical\nOperator"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "MSK demod"
      Ports		      [1, 1]
      Position		      [140, 338, 220, 382]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband MSK demodulation"
      MaskDescription	      "Demodulate an MSK modulated signal.       "
      MaskHelp		      "This block demodulates an MSK modulated signal."
" It uses a matched filter to process the input signal and detect the in-phase"
" and quadrature components of the signal. The filtered output is fed to an OQ"
"PSK Demap block resulting in a binary signal. Match the parameters to the one"
"s used in the corresponding MSK Mod block. The offset value in Symbol interva"
"l can be different."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Initial phase (rad):|Sample time (sec):"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;Ph=@3;ts=@4;"
      MaskInitialization      "T(1)=td(1);T2=2*T(1);if length(td)>1,T(2)=td(2)"
"; else, T(2)=0;end\n"
      MaskDisplay	      "plot(0,0,100,100,[5+1.5*[[0:.8:10] [10 20] [20:"
".8:30]] 50 50 50 50+15*[0 1 1 2 2 3]],[85+10*[sin([0:.8:10]*pi*2/5) 0 0 sin(["
"20:.8:30]*pi*2/5)] 85 99 75 85+8*[1 1 -1 -1 1 1]]);\ndisp('MSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1|100/2/pi|0 |.01"
      MaskVariableAliases     ",,,"
      System {
	Name			"MSK demod"
	Location		[360, 100, 1173, 287]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [340, 85, 360, 105]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Clock
	  Name			  "Clock"
	  Position		  [20, 85, 40, 105]
	  ShowName		  off
	  DeleteFcn		  "simclock BlockIsBeingDestroyed"
	  PostSaveFcn		  "simclock Save"
	  DisplayTime		  off
	  Decimation		  "10"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [200, 40, 295, 70]
	  ShowName		  off
	  Expr			  "cos(u[1]+Ph)/2"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [200, 120, 295, 150]
	  ShowName		  off
	  Expr			  "cos(u[1]+Ph)/2"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [80, 36, 185, 74]
	  ShowName		  off
	  Gain			  "pi*(Fc*2+1/2/td)"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [80, 115, 185, 155]
	  ShowName		  off
	  Gain			  "pi*(Fc*2-1/2/td)"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Reference
	  Name			  "OQPSK demap"
	  Ports			  [2, 1]
	  Position		  [665, 78, 745, 122]
	  SourceBlock		  "com_ddm2/OQPSK demap"
	  SourceType		  "OQPSK demap"
	  td			  "td"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [395, 57, 425, 88]
	  ShowName		  off
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Product
	  Name			  "Product1"
	  Ports			  [2, 1]
	  Position		  [395, 107, 425, 138]
	  ShowName		  off
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Reference
	  Name			  "Scheduled\nreset-int"
	  Ports			  [1, 1]
	  Position		  [450, 53, 530, 97]
	  ShowName		  off
	  SourceBlock		  "com_util/Scheduled\nreset-int"
	  SourceType		  "Scheduled reset integration"
	  td			  "[2*T(1), T(1)+T(2)]"
	  ts			  "ts"
	  limit			  "Inf"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Scheduled\nreset-int1"
	  Ports			  [1, 1]
	  Position		  [450, 103, 530, 147]
	  ShowName		  off
	  SourceBlock		  "com_util/Scheduled\nreset-int"
	  SourceType		  "Scheduled reset integration"
	  td			  "[2*T(1), T(2)]"
	  ts			  "ts"
	  limit			  "Inf"
	}
	Block {
	  BlockType		  Signum
	  Name			  "Sign"
	  Position		  [600, 59, 635, 91]
	}
	Block {
	  BlockType		  Signum
	  Name			  "Sign1"
	  Position		  [600, 109, 635, 141]
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [340, 49, 370, 76]
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "++"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [340, 114, 370, 141]
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "-+"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold"
	  Position		  [550, 110, 580, 140]
	  ShowName		  off
	  SampleTime		  "[2*T(1), T(2)]"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold1"
	  Position		  [550, 60, 580, 90]
	  ShowName		  off
	  SampleTime		  "[2*T(1), T(1)+T(2)]"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [765, 90, 785, 110]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Clock"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [0, -40]
	    DstBlock		    "Gain"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 40]
	    DstBlock		    "Gain1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Product1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  DstBlock		  "Fcn1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fcn1"
	  SrcPort		  1
	  Points		  [-5, 0]
	  Branch {
	    DstBlock		    "Sum"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Sum1"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  DstBlock		  "Fcn"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fcn"
	  SrcPort		  1
	  Points		  [-5, 0]
	  Branch {
	    DstBlock		    "Sum"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Sum1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    DstBlock		    "Product"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Product1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Scheduled\nreset-int"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product1"
	  SrcPort		  1
	  DstBlock		  "Scheduled\nreset-int1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Scheduled\nreset-int"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Scheduled\nreset-int1"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold1"
	  SrcPort		  1
	  DstBlock		  "Sign"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "OQPSK demap"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold"
	  SrcPort		  1
	  DstBlock		  "Sign1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sign"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "OQPSK demap"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sign1"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "OQPSK demap"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "MSK mod"
      Ports		      [1, 1]
      Position		      [25, 338, 105, 382]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband MSK modulation"
      MaskDescription	      "Modulate the input signal using minimum phase s"
"hift keying method."
      MaskHelp		      "This block modulates a digital signal with a gi"
"ven carrier frequency using the MSK method. It uses the OQPSK Map block to ma"
"p the binary input signal to the in-phase and quadrature components. When the"
" symbol interval is a two-element vector, the second element is the offset (d"
"efault is 0). The output is a modulated analog signal with a maximum amplitud"
"e equal to 1."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Initial phase (rad):|Sample time (sec):"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;Ph=@3;ts=@4;"
      MaskDisplay	      "plot(0,0,100,100,[5+15*[0 1 1 2 2 3] 50 50 50 5"
"0+1.5*[[0:.8:10] [10:1.6:20] [20:.8:30]]],[85+8*[1 1 -1 -1 1 1] 85 99 75 85+1"
"0*[sin([0:.8:10]*pi*2/5) sin([10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)]]);\ndi"
"sp('MSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1|100/2/pi|0|.01"
      MaskVariableAliases     ",,,"
      System {
	Name			"MSK mod"
	Location		[360, 100, 1014, 246]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [15, 65, 35, 85]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Clock
	  Name			  "Clock"
	  Position		  [145, 65, 165, 85]
	  ShowName		  off
	  DeleteFcn		  "simclock BlockIsBeingDestroyed"
	  PostSaveFcn		  "simclock Save"
	  DisplayTime		  off
	  Decimation		  "10"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [325, 35, 420, 65]
	  ShowName		  off
	  Expr			  "cos(u[1]+Ph)/2"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [325, 85, 420, 115]
	  ShowName		  off
	  Expr			  "cos(u[1]+Ph)/2"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [205, 31, 310, 69]
	  ShowName		  off
	  Gain			  "pi*(Fc*2+1/2/td)"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [205, 80, 310, 120]
	  ShowName		  off
	  Gain			  "pi*(Fc*2-1/2/td)"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Reference
	  Name			  "OQPSK map"
	  Ports			  [1, 2]
	  Position		  [50, 53, 130, 97]
	  SourceBlock		  "com_ddm2/OQPSK map"
	  SourceType		  "OQPSK map"
	  T			  "td"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [520, 37, 550, 68]
	  ShowName		  off
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Product
	  Name			  "Product1"
	  Ports			  [2, 1]
	  Position		  [520, 87, 550, 118]
	  ShowName		  off
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [465, 44, 495, 71]
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "++"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [465, 79, 495, 106]
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "-+"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum2"
	  Ports			  [2, 1]
	  Position		  [575, 49, 605, 76]
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "++"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [620, 55, 640, 75]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Sum2"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "OQPSK map"
	  SrcPort		  1
	  Points		  [0, -55; 370, 0]
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "OQPSK map"
	  SrcPort		  2
	  Points		  [0, 50; 370, 0]
	  DstBlock		  "Product1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Product1"
	  SrcPort		  1
	  Points		  [5, 0]
	  DstBlock		  "Sum2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Sum2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Product1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fcn1"
	  SrcPort		  1
	  Points		  [-5, 0]
	  Branch {
	    Points		    [30, -36]
	    DstBlock		    "Sum"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Sum1"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  DstBlock		  "Fcn1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fcn"
	  SrcPort		  1
	  Points		  [-5, 0]
	  Branch {
	    DstBlock		    "Sum"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Sum1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Clock"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [0, -25]
	    DstBlock		    "Gain"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 25]
	    DstBlock		    "Gain1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  DstBlock		  "Fcn"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "OQPSK map"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "MSK modem demo"
      Ports		      []
      Position		      [250, 338, 330, 382]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "tmsk"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('MSK\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"MSK modem demo"
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "OQPSK demap"
      Ports		      [2, 1]
      Position		      [475, 273, 555, 317]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "OQPSK demap"
      MaskDescription	      "Reverse the OQPSK map. Input in-phase and quadr"
"ature components from the two inputs and output the demapped signal."
      MaskHelp		      "This block demaps an OQPSK mapped signal. You c"
"an place this block after a QAM demodulation (QADM) block. The two inputs are"
" the in-phase and quadrature elements of the QAM demodulated  (QADM)signal. T"
"he output is a binary signal with sample time T."
      MaskPromptString	      "Symbol interval and offset (sec):"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "td=@1;"
      MaskInitialization      "N=4;A=1/sqrt(2);P=pi/4;y1=apkconst(N,A,P);y2=im"
"ag(y1);y1=real(y1);T=td(1);T2=2*T;if length(td)>1,Offset=td(2); else, Offset="
"0;end"
      MaskDisplay	      "disp('OQPSK\\ndemap')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1 "
      System {
	Name			"OQPSK demap"
	Location		[360, 100, 790, 308]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "real"
	  Position		  [15, 105, 35, 125]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "imag"
	  Position		  [15, 20, 35, 40]
	  Port			  "2"
	  Interpolate		  on
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Minimum1"
	  Ports			  [1, 1]
	  Position		  [230, 30, 290, 50]
	  ShowName		  off
	  FunctionName		  "arymimai"
	  Parameters		  "'min'"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Minimum2"
	  Ports			  [1, 1]
	  Position		  [230, 115, 290, 135]
	  ShowName		  off
	  FunctionName		  "arymimai"
	  Parameters		  "'min'"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [185, 30, 210, 50]
	  ShowName		  off
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Product
	  Name			  "Product1"
	  Ports			  [2, 1]
	  Position		  [185, 115, 210, 135]
	  ShowName		  off
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Reference
	  Name			  "Pulses divide\nsample time"
	  Ports			  [0, 1]
	  Position		  [205, 63, 285, 107]
	  ShowName		  off
	  SourceBlock		  "com_sour/Pulses divide\nsample time"
	  SourceType		  "Pulse generator"
	  samp_time		  "T2"
	  out_divid		  "1"
	  offset		  "Offset"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [135, 23, 155, 52]
	  ForegroundColor	  "red"
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum6"
	  Ports			  [2, 1]
	  Position		  [135, 108, 155, 137]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch"
	  Position		  [315, 70, 345, 100]
	  ShowName		  off
	  Threshold		  ".5"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold"
	  Position		  [60, 14, 95, 46]
	  ForegroundColor	  "red"
	  ShowName		  off
	  SampleTime		  "[T2, Offset]"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold1"
	  Position		  [70, 99, 105, 131]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  SampleTime		  "[T2, Offset+T]"
	}
	Block {
	  BlockType		  Constant
	  Name			  "imag_pt"
	  Position		  [50, 149, 85, 171]
	  BackgroundColor	  "yellow"
	  Value			  "[-1 1]"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Constant
	  Name			  "real_pt"
	  Position		  [50, 59, 85, 81]
	  BackgroundColor	  "green"
	  Value			  "[-1 1]"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [365, 75, 385, 95]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "imag"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "real"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "real_pt"
	  SrcPort		  1
	  Points		  [20, 0; 0, -25]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Product"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Product"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Sum6"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Product1"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Product1"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Minimum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product1"
	  SrcPort		  1
	  DstBlock		  "Minimum2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Switch"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Minimum1"
	  SrcPort		  1
	  Points		  [5, 0]
	  DstBlock		  "Switch"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Minimum2"
	  SrcPort		  1
	  Points		  [5, 0]
	  DstBlock		  "Switch"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "imag_pt"
	  SrcPort		  1
	  Points		  [20, 0; 0, -30]
	  DstBlock		  "Sum6"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold1"
	  SrcPort		  1
	  DstBlock		  "Sum6"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Pulses divide\nsample time"
	  SrcPort		  1
	  DstBlock		  "Switch"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "OQPSK demod"
      Ports		      [1, 1]
      Position		      [140, 273, 220, 317]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband OQPSK demodulation"
      MaskDescription	      "Demodulate an OQPSK modulated signal."
      MaskHelp		      "This block demodulates an OQPSK modulated signa"
"l. The inputs are the in-phase and quadrature components of the QAM demodulat"
"ed (QADM) signal. The output is a scalar binary signal with sample time T."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Sampling time (sec):|Initial Phase"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;ts=@3;Ph=@4;"
      MaskInitialization      "[num,den]=butter(5,Fc*2*ts);NIR=4;AIR=1/sqrt(2)"
";PIR=pi/4;\n"
      MaskDisplay	      "plot(0,0,100,100,[5+1.5*[[0:.8:10] [10 20] [20:"
".8:30]] 50 50 50 50+15*[0 1 1 2 2 3]],[85+10*[sin([0:.8:10]*pi*2/5) 0 0 sin(["
"20:.8:30]*pi*2/5)] 85 99 75 85+8*[1 1 -1 -1 1 1]]);\ndisp('OQPSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1|100/2/pi|1/100|0"
      MaskVariableAliases     ",,,"
      System {
	Name			"OQPSK demod"
	Location		[360, 100, 701, 191]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [15, 30, 35, 50]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Reference
	  Name			  "OQPSK demap"
	  Ports			  [2, 1]
	  Position		  [175, 18, 255, 62]
	  SourceBlock		  "com_ddm2/OQPSK demap"
	  SourceType		  "OQPSK demap"
	  td			  "td"
	}
	Block {
	  BlockType		  Reference
	  Name			  "QADM\npassband3"
	  Ports			  [1, 2]
	  Position		  [55, 18, 135, 62]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  SourceBlock		  "com_cdmo/QADM\npassband"
	  SourceType		  "Passband DSB-SC QADM"
	  Fc			  "Fc"
	  num			  "num"
	  den			  "den"
	  Ph			  "Ph"
	  ts			  "ts"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [290, 30, 310, 50]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "OQPSK demap"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "QADM\npassband3"
	  SrcPort		  2
	  DstBlock		  "OQPSK demap"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "QADM\npassband3"
	  SrcPort		  1
	  DstBlock		  "OQPSK demap"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "QADM\npassband3"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "OQPSK map"
      Ports		      [1, 2]
      Position		      [365, 273, 445, 317]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "OQPSK map"
      MaskDescription	      "The input binary signal, with sample time T, is"
" mapped into the 1/-1 value in-phase component with sample time 2T and offset"
" 0, and into the quadrature component with sample time 2T and offset T."
      MaskHelp		      "This block maps the scalar binary input signal "
"to the offset QPSK encoded signal. The value of the output of this block is e"
"ither 1 or -1. The first output is the in-phase component. The second output "
"of this block is the quadrature component. Note the difference between QPSK a"
"nd OQPSK. This block does not introduce any delay."
      MaskPromptString	      "Symbol interval (sec):"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "T=@1;"
      MaskInitialization      "if length(T)<2, T=[T, 0]; end;"
      MaskDisplay	      "disp('OQPSK\\nmap')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1 "
      System {
	Name			"OQPSK map"
	Location		[360, 100, 690, 269]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [25, 63, 55, 77]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Lookup
	  Name			  "Look-Up\nTable"
	  Position		  [80, 55, 110, 85]
	  InputValues		  "[0 .5 .5 1]"
	  OutputValues		  "[-1 -1 1 1]"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold"
	  Position		  [165, 95, 195, 125]
	  SampleTime		  "[2*T(1), T(2)]"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold1"
	  Position		  [165, 15, 195, 45]
	  SampleTime		  "[2*T(1), T(1)+T(2)]"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [240, 23, 270, 37]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out2"
	  Position		  [235, 103, 265, 117]
	  Port			  "2"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold"
	  SrcPort		  1
	  DstBlock		  "Out2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold1"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Look-Up\nTable"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Look-Up\nTable"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    Points		    [0, 40]
	    DstBlock		    "Zero-Order\nHold"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -40]
	    DstBlock		    "Zero-Order\nHold1"
	    DstPort		    1
	  }
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "OQPSK map demo"
      Ports		      []
      Position		      [580, 273, 660, 317]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "toqpskmp"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('OQPSK map\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"OQPSK map demo"
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "OQPSK mod"
      Ports		      [1, 1]
      Position		      [25, 273, 105, 317]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband OQPSK modulation"
      MaskDescription	      "Modulate the input signal using offset quadratu"
"re phase shift keying method."
      MaskHelp		      "This block modulates a digital signal with a gi"
"ven carrier frequency using the OQPSK method. The input to this block is a bi"
"nary signal. When the symbol interval is a two-element vector, the second ele"
"ment is the offset (default is 0). The block uses the OQPSK Map block before "
"feeding the signal to the QAM block. The output is a modulated analog signal "
"with maximum amplitude equal to 1."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Initial phase (rad):|Sample time (sec):"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;Ph=@3;ts=@4;"
      MaskDisplay	      "plot(0,0,100,100,[5+15*[0 1 1 2 2 3] 50 50 50 5"
"0+1.5*[[0:.8:10] [10:1.6:20] [20:.8:30]]],[85+8*[1 1 -1 -1 1 1] 85 99 75 85+1"
"0*[sin([0:.8:10]*pi*2/5) sin([10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)]]);\ndi"
"sp('OQPSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1|100/2/pi|0|1/100"
      MaskVariableAliases     ",,,"
      System {
	Name			"OQPSK mod"
	Location		[360, 100, 670, 223]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [15, 40, 35, 60]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Reference
	  Name			  "OQPSK map"
	  Ports			  [1, 2]
	  Position		  [50, 28, 130, 72]
	  SourceBlock		  "com_ddm2/OQPSK map"
	  SourceType		  "OQPSK map"
	  T			  "td"
	}
	Block {
	  BlockType		  Reference
	  Name			  "QAM\npassband"
	  Ports			  [2, 1]
	  Position		  [160, 28, 240, 72]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  SourceBlock		  "com_cdmo/QAM\npassband"
	  SourceType		  "Passband DSB-SC QAM"
	  Fc			  "Fc"
	  Ph			  "Ph"
	  ts			  "ts"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [265, 40, 285, 60]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "OQPSK map"
	  SrcPort		  1
	  DstBlock		  "QAM\npassband"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "OQPSK map"
	  SrcPort		  2
	  DstBlock		  "QAM\npassband"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "QAM\npassband"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "OQPSK map"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "OQPSK modem demo"
      Ports		      []
      Position		      [250, 273, 330, 317]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "toqpsk"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('OQPSK\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"OQPSK modem demo"
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "QPSK demap"
      Ports		      [2, 1]
      Position		      [475, 203, 555, 247]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "QPSK demap"
      MaskDescription	      "Reverse the QPSK map. Input in-phase and quadra"
"ture components from the two inputs. Output demapped signal."
      MaskHelp		      "This block demaps a QPSK mapped signal. You can"
" place this block after a QAM demodulation (QADM) block. The two inputs are t"
"he in-phase and quadrature elements of the QAM demodulated (QADM) signal. The"
" output is a binary scalar signal with sample time T."
      MaskPromptString	      "Symbol interval and offset (sec):"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "td=@1;"
      MaskInitialization      "N=4;A=1/sqrt(2);P=pi/4;y1=apkconst(N,A,P);y2=im"
"ag(y1);y1=real(y1);T=td(1);T2=2*T;if length(td)>1,Offset=td(2); else, Offset="
"0;end"
      MaskDisplay	      "disp('QPSK\\ndemap')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1"
      System {
	Name			"QPSK demap"
	Location		[360, 100, 1078, 342]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "real"
	  Position		  [20, 35, 40, 55]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "imag"
	  Position		  [30, 120, 50, 140]
	  Port			  "2"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator"
	  Ports			  [2, 1]
	  Position		  [505, 57, 535, 88]
	  ShowName		  off
	  Operator		  "OR"
	  Inputs		  "2"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Minimum1"
	  Ports			  [1, 1]
	  Position		  [270, 85, 330, 105]
	  ShowName		  off
	  FunctionName		  "arymimai"
	  Parameters		  "'min'"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [190, 45, 215, 65]
	  ShowName		  off
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Product
	  Name			  "Product1"
	  Ports			  [2, 1]
	  Position		  [190, 130, 215, 150]
	  ShowName		  off
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Reference
	  Name			  "Pulses divide\nsample time"
	  Ports			  [0, 1]
	  Position		  [485, 108, 565, 152]
	  ShowName		  off
	  SourceBlock		  "com_sour/Pulses divide\nsample time"
	  SourceType		  "Pulse generator"
	  samp_time		  "T2"
	  out_divid		  "1"
	  offset		  "Offset"
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\nOperator"
	  Position		  [420, 152, 450, 183]
	  ShowName		  off
	  Operator		  "<="
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\nOperator1"
	  Position		  [410, 17, 440, 48]
	  ShowName		  off
	  Operator		  "<="
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\nOperator2"
	  Position		  [415, 87, 445, 118]
	  ShowName		  off
	  Operator		  ">="
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [140, 38, 160, 67]
	  ForegroundColor	  "red"
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum2"
	  Ports			  [2, 1]
	  Position		  [235, 78, 255, 107]
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "++"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum6"
	  Ports			  [2, 1]
	  Position		  [140, 123, 160, 152]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch"
	  Position		  [595, 115, 625, 145]
	  ShowName		  off
	  Threshold		  ".5"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold"
	  Position		  [65, 29, 100, 61]
	  ForegroundColor	  "red"
	  ShowName		  off
	  SampleTime		  "[T2, Offset]"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold1"
	  Position		  [75, 114, 110, 146]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  SampleTime		  "[T2, Offset]"
	}
	Block {
	  BlockType		  Constant
	  Name			  "imag_pt"
	  Position		  [25, 164, 50, 186]
	  BackgroundColor	  "yellow"
	  Value			  "y2"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Constant
	  Name			  "real_pt"
	  Position		  [25, 84, 50, 106]
	  BackgroundColor	  "green"
	  Value			  "y1"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Constant
	  Name			  "real_pt1"
	  Position		  [365, 164, 390, 186]
	  BackgroundColor	  "green"
	  Value			  "1.5"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Constant
	  Name			  "real_pt2"
	  Position		  [355, 49, 380, 71]
	  BackgroundColor	  "green"
	  Value			  ".5"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Constant
	  Name			  "real_pt3"
	  Position		  [350, 99, 375, 121]
	  BackgroundColor	  "green"
	  Value			  "2.5"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [670, 120, 690, 140]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Minimum1"
	  SrcPort		  1
	  Points		  [5, 0]
	  Branch {
	    Points		    [0, 65]
	    DstBlock		    "Relational\nOperator"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Relational\nOperator2"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -70]
	    DstBlock		    "Relational\nOperator1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Relational\nOperator2"
	  SrcPort		  1
	  Points		  [20, 0; 0, -25]
	  DstBlock		  "Logical\nOperator"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Relational\nOperator1"
	  SrcPort		  1
	  Points		  [20, 0; 0, 30]
	  DstBlock		  "Logical\nOperator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "real_pt3"
	  SrcPort		  1
	  DstBlock		  "Relational\nOperator2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "real_pt2"
	  SrcPort		  1
	  Points		  [5, 0; 0, -20]
	  DstBlock		  "Relational\nOperator1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum2"
	  SrcPort		  1
	  DstBlock		  "Minimum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product1"
	  SrcPort		  1
	  DstBlock		  "Sum2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Sum2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum6"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Product1"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Product1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Product"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Product"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "imag_pt"
	  SrcPort		  1
	  Points		  [60, 0; 0, -30]
	  DstBlock		  "Sum6"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold1"
	  SrcPort		  1
	  DstBlock		  "Sum6"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "real_pt"
	  SrcPort		  1
	  Points		  [60, 0; 0, -35]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "imag"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "real"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Pulses divide\nsample time"
	  SrcPort		  1
	  DstBlock		  "Switch"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Switch"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Logical\nOperator"
	  SrcPort		  1
	  Points		  [40, 0]
	  DstBlock		  "Switch"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "real_pt1"
	  SrcPort		  1
	  DstBlock		  "Relational\nOperator"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Relational\nOperator"
	  SrcPort		  1
	  Points		  [125, 0]
	  DstBlock		  "Switch"
	  DstPort		  3
	}
	Annotation {
	  Position		  [361, 220]
	  Text			  "This block diagram uses the QASK frame. It "
"may not be the simplest way to implement QPSK."
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "QPSK demod"
      Ports		      [1, 1]
      Position		      [140, 203, 220, 247]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband QPSK demodulation"
      MaskDescription	      "Demodulate a QPSK modulated signal."
      MaskHelp		      "This block demodulates a QPSK modulated signal."
" It uses the QAM demodulation (QADM) block and the QPSK Demap block. The inpu"
"t is a modulated analog signal and the output is a demodulated binary signal."
" Match the parameters to the ones used in the corresponding QPSK Mod block. T"
"he offset value in Symbol interval can be different."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Sampling time (sec):|Initial Phase"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;ts=@3;Ph=@4;"
      MaskInitialization      "[num,den]=butter(5,Fc*2*ts);NIR=4;AIR=1/sqrt(2)"
";PIR=pi/4;\n"
      MaskDisplay	      "plot(0,0,100,100,[5+1.5*[[0:.8:10] [10 20] [20:"
".8:30]] 50 50 50 50+15*[0 1 1 2 2 3]],[85+10*[sin([0:.8:10]*pi*2/5) 0 0 sin(["
"20:.8:30]*pi*2/5)] 85 99 75 85+8*[1 1 -1 -1 1 1]]);\ndisp('QPSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1|100/2/pi|1/100 |0"
      MaskVariableAliases     ",,,"
      System {
	Name			"QPSK demod"
	Location		[360, 100, 718, 227]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [25, 50, 45, 70]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Reference
	  Name			  "QADM\npassband3"
	  Ports			  [1, 2]
	  Position		  [65, 38, 145, 82]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  SourceBlock		  "com_cdmo/QADM\npassband"
	  SourceType		  "Passband DSB-SC QADM"
	  Fc			  "Fc"
	  num			  "num"
	  den			  "den"
	  Ph			  "Ph"
	  ts			  "ts"
	}
	Block {
	  BlockType		  Reference
	  Name			  "QPSK demap"
	  Ports			  [2, 1]
	  Position		  [185, 38, 265, 82]
	  ShowName		  off
	  SourceBlock		  "com_ddm2/QPSK demap"
	  SourceType		  "QPSK demap"
	  td			  "td"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [295, 50, 315, 70]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "QPSK demap"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "QADM\npassband3"
	  SrcPort		  2
	  DstBlock		  "QPSK demap"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "QADM\npassband3"
	  SrcPort		  1
	  DstBlock		  "QPSK demap"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "QADM\npassband3"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "QPSK map"
      Ports		      [1, 2]
      Position		      [365, 203, 445, 247]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "QPSK map"
      MaskDescription	      "The input binary signal, with sample time T, is"
" mapped into the 1/-1 value in-phase and quadrature component output signals "
"with sample time 2T."
      MaskHelp		      "This block maps the scalar input binary signal "
"to the QPSK encoded signal. The value of the output of this block is either 1"
" or -1. The first output is the in-phase component. The second output is the "
"quadrature component. This block introduces a delay 2T, where T is the input "
"signal sample interval."
      MaskPromptString	      "Symbol interval (sec):"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "T=@1;"
      MaskDisplay	      "disp('QPSK\\nmap')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1"
      System {
	Name			"QPSK map"
	Location		[360, 100, 796, 248]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [25, 63, 55, 77]
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Lookup
	  Name			  "Look-Up\nTable"
	  Position		  [80, 55, 110, 85]
	  InputValues		  "[0 .5 .5 1]"
	  OutputValues		  "[-1 -1 1 1]"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay"
	  Position		  [145, 85, 175, 115]
	  X0			  "-1"
	  SampleTime		  "T"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay1"
	  Position		  [150, 15, 180, 45]
	  X0			  "-1"
	  SampleTime		  "T"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay2"
	  Position		  [210, 15, 240, 45]
	  X0			  "-1"
	  SampleTime		  "T"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold"
	  Position		  [270, 15, 300, 45]
	  SampleTime		  "2*T"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold1"
	  Position		  [270, 85, 300, 115]
	  SampleTime		  "2*T"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [350, 23, 380, 37]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out2"
	  Position		  [350, 93, 380, 107]
	  Port			  "2"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Unit Delay2"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Unit Delay1"
	  SrcPort		  1
	  DstBlock		  "Unit Delay2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold1"
	  SrcPort		  1
	  DstBlock		  "Out2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Unit Delay"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Look-Up\nTable"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    Points		    [0, 30]
	    DstBlock		    "Unit Delay"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -40]
	    DstBlock		    "Unit Delay1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Look-Up\nTable"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "QPSK map demo"
      Ports		      []
      Position		      [580, 203, 660, 247]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "tqpskmap"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('QPSK map\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"QPSK map demo"
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "QPSK mod"
      Ports		      [1, 1]
      Position		      [25, 203, 105, 247]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Passband QPSK modulation"
      MaskDescription	      "Modulate the input signal using quadrature phas"
"e shift keying method."
      MaskHelp		      "This block modulates a digital signal with a gi"
"ven carrier frequency using the QPSK method. The input to this block is a bin"
"ary signal. When the symbol interval is a two-element vector, the second elem"
"ent is the offset (default is 0). This block uses the QPSK Map block before f"
"eeding the signal to the QAM block. The output is a modulated analog signal w"
"ith a maximum amplitude equal to 1."
      MaskPromptString	      "Symbol interval (sec):|Carrier frequency (Hz):|"
"Initial phase (rad):|Sample time (sec):"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVariables	      "td=@1;Fc=@2;Ph=@3;ts=@4;"
      MaskDisplay	      "plot(0,0,100,100,[5+15*[0 1 1 2 2 3] 50 50 50 5"
"0+1.5*[[0:.8:10] [10:1.6:20] [20:.8:30]]],[85+8*[1 1 -1 -1 1 1] 85 99 75 85+1"
"0*[sin([0:.8:10]*pi*2/5) sin([10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)]]);\ndi"
"sp('QPSK')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      ".1|100/2/pi|0 |.01"
      MaskVariableAliases     ",,,"
      System {
	Name			"QPSK mod"
	Location		[360, 100, 701, 219]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [15, 40, 35, 60]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Reference
	  Name			  "QAM\npassband"
	  Ports			  [2, 1]
	  Position		  [160, 28, 240, 72]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  SourceBlock		  "com_cdmo/QAM\npassband"
	  SourceType		  "Passband DSB-SC QAM"
	  Fc			  "Fc"
	  Ph			  "Ph"
	  ts			  "ts"
	}
	Block {
	  BlockType		  Reference
	  Name			  "QPSK map"
	  Ports			  [1, 2]
	  Position		  [60, 28, 140, 72]
	  SourceBlock		  "com_ddm2/QPSK map"
	  SourceType		  "QPSK map"
	  T			  "td"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [265, 40, 285, 60]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "QAM\npassband"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "QPSK map"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "QPSK map"
	  SrcPort		  1
	  DstBlock		  "QAM\npassband"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "QPSK map"
	  SrcPort		  2
	  DstBlock		  "QAM\npassband"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "QPSK modem demo"
      Ports		      []
      Position		      [250, 203, 330, 247]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "tqpsk"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('QPSK\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"QPSK modem demo"
	Location		[360, 100, 520, 245]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Line {
      SrcBlock		      "OQPSK map"
      SrcPort		      2
      DstBlock		      "OQPSK demap"
      DstPort		      2
    }
    Line {
      SrcBlock		      "OQPSK map"
      SrcPort		      1
      DstBlock		      "OQPSK demap"
      DstPort		      1
    }
    Line {
      SrcBlock		      "QPSK map"
      SrcPort		      2
      DstBlock		      "QPSK demap"
      DstPort		      2
    }
    Line {
      SrcBlock		      "QPSK map"
      SrcPort		      1
      DstBlock		      "QPSK demap"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Differential encode"
      SrcPort		      1
      DstBlock		      "Differential decode"
      DstPort		      1
    }
    Line {
      SrcBlock		      "MSK mod"
      SrcPort		      1
      DstBlock		      "MSK demod"
      DstPort		      1
    }
    Line {
      SrcBlock		      "OQPSK mod"
      SrcPort		      1
      DstBlock		      "OQPSK demod"
      DstPort		      1
    }
    Line {
      SrcBlock		      "QPSK mod"
      SrcPort		      1
      DstBlock		      "QPSK demod"
      DstPort		      1
    }
    Line {
      SrcBlock		      "BPSK mod"
      SrcPort		      1
      DstBlock		      "BPSK demod"
      DstPort		      1
    }
    Line {
      SrcBlock		      "DPSK mod"
      SrcPort		      1
      DstBlock		      "DPSK demod"
      DstPort		      1
    }
    Annotation {
      Position		      [322, 42]
      VerticalAlignment	      "top"
      ForegroundColor	      "red"
      Text		      "(passband simulation)"
    }
    Annotation {
      Position		      [332, 27]
      VerticalAlignment	      "top"
      ForegroundColor	      "red"
      Text		      "Digital Modulation/Demodulation Library (contin"
"ued)"
      FontSize		      12
      FontWeight	      "bold"
    }
    Annotation {
      Position		      [92, 184]
    }
    Annotation {
      Position		      [350, 437]
      Text		      "Warning: This library is obsolete and may be re"
"moved in the future."
      FontName		      "Arial"
      FontSize		      12
    }
  }
}
