Library {
  Name			  "com_sync"
  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:09:17 1998"
  Creator		  "tdelve"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "ysong"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Wed Aug 23 12:09:16 2000"
  ModelVersionFormat	  "1.%<AutoIncrement:7>"
  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_sync"
    Location		    [177, 192, 558, 459]
    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		      "Baseband model\nfor PLL"
      Ports		      [1, 1]
      Position		      [150, 48, 230, 92]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Baseband PLL model"
      MaskDescription	      "Output the phase shifting of the input signal f"
"rom the oscillation frequency."
      MaskHelp		      "this block is used to detect the phase shifting"
" of the input signal. The input to this block is an oscillation signal with p"
"ossible phase shifting. The block detects the phase shifting value using the "
"PLL technique. Design the lowpass filter to pass the phase changing signal an"
"d to eliminate the oscillation signal."
      MaskPromptString	      "Lowpass filter numerator:|Lowpass filter denomi"
"nator:|Oscillation amplitude:|Gain at the output:"
      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	      "Fn=@1;Fd=@2;Ac=@3;G=@4;"
      MaskInitialization      "pi2=2*pi;Kc=Ac/2;"
      MaskDisplay	      "disp('Baseband\\nPLL')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "[3.0002,  0, 40002]|[1, 67.46, 2270.9, 40002]|1"
"|2"
      MaskVariableAliases     ",,,"
      System {
	Name			"Baseband model\nfor PLL"
	Location		[360, 100, 1002, 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			  "in_1"
	  Position		  [15, 20, 35, 40]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [270, 25, 310, 45]
	  ShowName		  off
	  Expr			  "sin(u[1])"
	}
	Block {
	  BlockType		  TransferFcn
	  Name			  "Filter"
	  Position		  [420, 16, 470, 54]
	  ShowName		  off
	  Numerator		  "Fn"
	  Denominator		  "Fd"
	  Realization		  "auto"
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [260, 88, 290, 122]
	  Orientation		  "left"
	  ShowName		  off
	  Gain			  "pi2"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [145, 13, 175, 47]
	  ShowName		  off
	  Gain			  "pi2"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain2"
	  Position		  [340, 20, 385, 50]
	  ShowName		  off
	  Gain			  "Kc"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain3"
	  Position		  [520, 22, 545, 48]
	  ShowName		  off
	  Gain			  "G"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Reference
	  Name			  "Modulo\nintegrator"
	  Ports			  [1, 1]
	  Position		  [65, 14, 120, 46]
	  ShowName		  off
	  SourceBlock		  "com_util/Modulo\nintegrator"
	  SourceType		  "Modulo integrator"
	  modu			  "1"
	  init			  "0"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Modulo\nintegrator1"
	  Ports			  [1, 1]
	  Position		  [325, 90, 385, 120]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  SourceBlock		  "com_util/Modulo\nintegrator"
	  SourceType		  "Modulo integrator"
	  modu			  "1"
	  init			  "0"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [220, 25, 240, 45]
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Outport
	  Name			  "Estimated\nphase"
	  Position		  [580, 25, 600, 45]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  Points		  [20, 0]
	  DstBlock		  "Modulo\nintegrator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fcn"
	  SrcPort		  1
	  DstBlock		  "Gain2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Fcn"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Filter"
	  SrcPort		  1
	  Points		  [30, 0; 0, 0]
	  Branch {
	    Points		    [0, 70]
	    DstBlock		    "Modulo\nintegrator1"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Gain3"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Modulo\nintegrator1"
	  SrcPort		  1
	  DstBlock		  "Gain"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Modulo\nintegrator"
	  SrcPort		  1
	  DstBlock		  "Gain1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain3"
	  SrcPort		  1
	  DstBlock		  "Estimated\nphase"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain2"
	  SrcPort		  1
	  DstBlock		  "Filter"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  Points		  [-55, 0; 0, -65]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Charge pump\nPLL"
      Ports		      [1, 3]
      Position		      [25, 128, 105, 172]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Charge pump PLL"
      MaskDescription	      "Output the phase shifting signal at 1st port; t"
"he detected phase error at 2nd port; VOC output at 3rd port."
      MaskHelp		      "This block uses a digital charge pump to detect"
" the phase shifting from the oscillation signal. The first output is the dete"
"cted phase shift. The second output is the detected phase error output from p"
"hase detector. The third output is the matching signal for the input. Note a "
"180 degree phase difference between the input signal and the matching signal."
      MaskPromptString	      "Lowpass filter numerator:|Lowpass filter Denomi"
"nator:|Oscillation frequency (Hz):|Oscillation Phase (rad):|Oscillation Ampli"
"tude:|Gain at the output:"
      MaskStyleString	      "edit,edit,edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on,on"
      MaskCallbackString      "|||||"
      MaskEnableString	      "on,on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on,on"
      MaskVariables	      "Fn=@1;Fd=@2;Fc=@3;Ph=@4;Ac=@5;G=@6;"
      MaskInitialization      "Cu=1;"
      MaskDisplay	      "disp('Charge\\npump\\nPLL')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "[3.0002,  0, 40002]|[1, 67.46, 2270.9, 40002]|1"
"00/2/pi|pi|1|3"
      MaskVariableAliases     ",,,,,"
      System {
	Name			"Charge pump\nPLL"
	Location		[360, 100, 829, 363]
	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		  [40, 60, 60, 80]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [355, 67, 380, 93]
	  ShowName		  off
	  Gain			  "G"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Phase/freq\ndetector"
	  Ports			  [2, 1]
	  Position		  [135, 59, 195, 101]
	  ShowName		  off
	  ShowPortLabels	  on
	  TreatAsAtomicUnit	  off
	  RTWSystemCode		  "Auto"
	  RTWFcnNameOpts	  "Auto"
	  RTWFileNameOpts	  "Auto"
	  MaskType		  "Phase Detector"
	  MaskDescription	  "Phase detector:"
	  MaskPromptString	  "Cross zero line threshold:|Charge pump curr"
"ent:"
	  MaskStyleString	  "edit,edit"
	  MaskTunableValueString  "on,on"
	  MaskCallbackString	  "|"
	  MaskEnableString	  "on,on"
	  MaskVisibilityString	  "on,on"
	  MaskToolTipString	  "on,on"
	  MaskInitialization	  "Thre=@1;Cu=@2;lo=[0 0;0 1;1 0;1 0;0 1;0 1;0"
" 0;0 0;1 0;0 0;1 0;0 0;1 0;0 0;0 0;0 0];"
	  MaskDisplay		  "disp('Phase\\nfrequency\\ndetector')"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  MaskValueString	  "-sqrt(eps)|Cu"
	  MaskVariableAliases	  ","
	  System {
	    Name		    "Phase/freq\ndetector"
	    Location		    [410, 150, 1386, 562]
	    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		      [30, 105, 50, 125]
	      ShowName		      off
	      Port		      "1"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "in_2"
	      Position		      [65, 125, 85, 145]
	      ShowName		      off
	      Port		      "2"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant1"
	      Position		      [125, 227, 200, 253]
	      ShowName		      off
	      Value		      "[Thre; Thre]"
	      VectorParams1D	      on
	    }
	    Block {
	      BlockType		      Memory
	      Name		      "Delay\none step"
	      Position		      [160, 175, 200, 205]
	      ShowName		      off
	      X0		      "0"
	      InheritSampleTime	      off
	    }
	    Block {
	      BlockType		      Demux
	      Name		      "Demux"
	      Ports		      [1, 2]
	      Position		      [410, 45, 450, 80]
	      ShowName		      off
	      Outputs		      "2"
	      BusSelectionMode	      off
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "Fcn"
	      Position		      [610, 140, 825, 170]
	      ShowName		      off
	      Expr		      "(u[1]>0)+u[3]*((u[1]<=0)&&(u[2]<=0))"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain"
	      Position		      [475, 60, 495, 80]
	      ShowName		      off
	      Gain		      "-1"
	      Multiplication	      "Element-wise(K.*u)"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain1"
	      Position		      [900, 145, 920, 165]
	      ShowName		      off
	      Gain		      "Cu"
	      Multiplication	      "Element-wise(K.*u)"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Memory
	      Name		      "Memory"
	      Position		      [425, 205, 465, 235]
	      Orientation	      "left"
	      ShowName		      off
	      X0		      "0"
	      InheritSampleTime	      off
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	    }
	    Block {
	      BlockType		      Memory
	      Name		      "Memory1"
	      Position		      [645, 190, 685, 220]
	      Orientation	      "left"
	      ShowName		      off
	      X0		      "0"
	      InheritSampleTime	      off
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux"
	      Ports		      [2, 1]
	      Position		      [105, 105, 135, 145]
	      ShowName		      off
	      Inputs		      "2"
	      DisplayOption	      "none"
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux2"
	      Ports		      [2, 1]
	      Position		      [390, 125, 420, 165]
	      ShowName		      off
	      Inputs		      "[2 2]"
	      DisplayOption	      "none"
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux3"
	      Ports		      [2, 1]
	      Position		      [565, 135, 595, 175]
	      ShowName		      off
	      Inputs		      "[2 1]"
	      DisplayOption	      "none"
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator"
	      Position		      [315, 123, 345, 147]
	      ShowName		      off
	      Operator		      ">"
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator1"
	      Position		      [240, 118, 270, 142]
	      ShowName		      off
	      Operator		      "<="
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator2"
	      Position		      [240, 183, 270, 207]
	      ShowName		      off
	      Operator		      "<="
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator3"
	      Position		      [240, 48, 270, 72]
	      ShowName		      off
	      Operator		      "<"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1]
	      Position		      [345, 55, 365, 75]
	      ShowName		      off
	      IconShape		      "rectangular"
	      Inputs		      "-+"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch"
	      Position		      [860, 139, 885, 171]
	      ShowName		      off
	      Threshold		      "eps"
	    }
	    Block {
	      BlockType		      CombinatorialLogic
	      Name		      "phase\n flip-flop"
	      Position		      [440, 125, 495, 165]
	      ShowName		      off
	      TruthTable	      "lo"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "out_1"
	      Position		      [940, 145, 960, 165]
	      ShowName		      off
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "Switch"
	      SrcPort		      1
	      DstBlock		      "Gain1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Demux"
	      SrcPort		      1
	      Points		      [390, 0]
	      DstBlock		      "Switch"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Gain"
	      SrcPort		      1
	      Points		      [335, 0; 0, 95]
	      DstBlock		      "Switch"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Demux"
	      SrcPort		      2
	      DstBlock		      "Gain"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "Demux"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "phase\n flip-flop"
	      SrcPort		      1
	      Points		      [30, 0; 0, 0]
	      Branch {
		Points			[0, 0]
		Branch {
		  Points		  [0, 75]
		  DstBlock		  "Memory"
		  DstPort		  1
		}
		Branch {
		  DstBlock		  "Mux3"
		  DstPort		  1
		}
	      }
	      Branch {
		Points			[0, -35; -200, 0]
		DstBlock		"Sum"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator3"
	      SrcPort		      1
	      DstBlock		      "Sum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Fcn"
	      SrcPort		      1
	      Points		      [0, 0]
	      Branch {
		DstBlock		"Switch"
		DstPort			2
	      }
	      Branch {
		Points			[0, 50]
		DstBlock		"Memory1"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Mux3"
	      SrcPort		      1
	      DstBlock		      "Fcn"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Memory1"
	      SrcPort		      1
	      Points		      [-90, 0]
	      DstBlock		      "Mux3"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant1"
	      SrcPort		      1
	      Points		      [5, 0; 0, -40]
	      Branch {
		DstBlock		"Relational\nOperator2"
		DstPort			2
	      }
	      Branch {
		Points			[0, -65]
		Branch {
		  Points		  [0, -70]
		  DstBlock		  "Relational\nOperator3"
		  DstPort		  2
		}
		Branch {
		  DstBlock		  "Relational\nOperator1"
		  DstPort		  2
		}
	      }
	    }
	    Line {
	      SrcBlock		      "Mux"
	      SrcPort		      1
	      Points		      [0, 0]
	      Branch {
		Points			[0, 0]
		Branch {
		  Points		  [5, 0; 0, -70]
		  DstBlock		  "Relational\nOperator3"
		  DstPort		  1
		}
		Branch {
		  Points		  [5, 0]
		  DstBlock		  "Delay\none step"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"Relational\nOperator1"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Memory"
	      SrcPort		      1
	      Points		      [-55, 0; 0, -65]
	      DstBlock		      "Mux2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Gain1"
	      SrcPort		      1
	      DstBlock		      "out_1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator2"
	      SrcPort		      1
	      Points		      [15, 0; 0, -55]
	      DstBlock		      "Relational\nOperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator1"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Delay\none step"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Mux2"
	      SrcPort		      1
	      DstBlock		      "phase\n flip-flop"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator"
	      SrcPort		      1
	      DstBlock		      "Mux2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "in_2"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "in_1"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      1
	    }
	    Annotation {
	      Position		      [327, 27]
	      VerticalAlignment	      "top"
	      Text		      "Compensater for the phase pi"
	    }
	    Annotation {
	      Position		      [902, 112]
	      VerticalAlignment	      "top"
	      Text		      "charge pump"
	    }
	    Annotation {
	      Position		      [357, 277]
	      VerticalAlignment	      "top"
	      Text		      "Functionality of phase flip-flop:"
	    }
	    Annotation {
	      Position		      [527, 327]
	      VerticalAlignment	      "top"
	      Text		      "The left hand side block diagram is to "
"detect the signal crossing from positive to negative.\nThe right hand side of"
" the block diagram is to switch from one state to another.               "
	    }
	    Annotation {
	      Position		      [532, 312]
	      VerticalAlignment	      "top"
	      Text		      "The state of the output is changed when"
" one of the input changes from positive to negative."
	    }
	    Annotation {
	      Position		      [522, 297]
	      VerticalAlignment	      "top"
	      Text		      "There are three different output combin"
"ations: HL, LL, LH, where H is one and L is zero."
	    }
	    Annotation {
	      Position		      [497, 357]
	      VerticalAlignment	      "top"
	      Text		      "true table:logic=[0 0;0 1;1 0;1 0;0 1;0"
" 1;0 0;0 0;1 0;0 0;1 0;0 0;1 0;0 0;0 0;0 0]"
	    }
	  }
	}
	Block {
	  BlockType		  TransferFcn
	  Name			  "Transfer Fcn"
	  Position		  [240, 59, 290, 101]
	  ShowName		  off
	  Numerator		  "Fn"
	  Denominator		  "Fd"
	  Realization		  "auto"
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Voltage-controlled\noscillator"
	  Ports			  [1, 1]
	  Position		  [175, 135, 255, 175]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  SourceBlock		  "com_util/Voltage-controlled\noscillator"
	  SourceType		  "Voltage-controlled oscillator"
	  Ac			  "Ac"
	  Fc			  "Fc"
	  Kc			  "1"
	  Ph			  "Ph"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [415, 70, 435, 90]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_2"
	  Position		  [320, 25, 340, 45]
	  ShowName		  off
	  Port			  "2"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_3"
	  Position		  [370, 205, 390, 225]
	  ShowName		  off
	  Port			  "3"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Transfer Fcn"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    DstBlock		    "Gain"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 75]
	    DstBlock		    "Voltage-controlled\noscillator"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "Phase/freq\ndetector"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Voltage-controlled\noscillator"
	  SrcPort		  1
	  Points		  [-60, 0]
	  Branch {
	    Points		    [0, -65]
	    DstBlock		    "Phase/freq\ndetector"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, 60]
	    DstBlock		    "out_3"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Phase/freq\ndetector"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Transfer Fcn"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -45]
	    DstBlock		    "out_2"
	    DstPort		    1
	  }
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Linearized baseband\nmodel for PLL"
      Ports		      [1, 1]
      Position		      [150, 128, 230, 172]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Linearized baseband PLL model"
      MaskDescription	      "Output the phase shifting of the input signal f"
"rom the oscillation frequency."
      MaskHelp		      "This block detects the phase shifting of the in"
"put signal. The input to this block is an oscillation signal with possible ph"
"ase shifting. The block detects the phase shifting value using PLL technique."
" Design the lowpass filter to pass the phase changing signal and to eliminate"
" the oscillation signal."
      MaskPromptString	      "Lowpass filter numerator:|Lowpass filter denomi"
"nator:|Oscillation amplitude:|Gain at the output:"
      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	      "Fn=@1;Fd=@2;Ac=@3;G=@4;"
      MaskInitialization      "pi2=2*pi;Kc=Ac/2;"
      MaskDisplay	      "disp('Linearized\\nbaseband\\nPLL')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "[3.0002,  0, 40002]|[1, 67.46, 2270.9, 40002]|1"
"|2"
      MaskVariableAliases     ",,,"
      System {
	Name			"Linearized baseband\nmodel for PLL"
	Location		[360, 100, 996, 251]
	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, 25, 35, 45]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  TransferFcn
	  Name			  "Filter"
	  Position		  [420, 21, 470, 59]
	  ShowName		  off
	  Numerator		  "Fn"
	  Denominator		  "Fd"
	  Realization		  "auto"
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [255, 95, 290, 125]
	  Orientation		  "left"
	  ShowName		  off
	  Gain			  "pi2"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [140, 18, 175, 52]
	  ShowName		  off
	  Gain			  "pi2"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain2"
	  Position		  [325, 25, 370, 55]
	  ShowName		  off
	  Gain			  "Kc"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain3"
	  Position		  [520, 27, 545, 53]
	  ShowName		  off
	  Gain			  "G"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Reference
	  Name			  "Modulo\nintegrator"
	  Ports			  [1, 1]
	  Position		  [60, 20, 120, 50]
	  ShowName		  off
	  SourceBlock		  "com_util/Modulo\nintegrator"
	  SourceType		  "Modulo integrator"
	  modu			  "1"
	  init			  "0"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Modulo\nintegrator1"
	  Ports			  [1, 1]
	  Position		  [335, 95, 395, 125]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  SourceBlock		  "com_util/Modulo\nintegrator"
	  SourceType		  "Modulo integrator"
	  modu			  "1"
	  init			  "0"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [220, 30, 240, 50]
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Outport
	  Name			  "Estimated\nphase"
	  Position		  [580, 30, 600, 50]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "Modulo\nintegrator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  Points		  [-60, 0; 0, -65]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain2"
	  SrcPort		  1
	  DstBlock		  "Filter"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain3"
	  SrcPort		  1
	  DstBlock		  "Estimated\nphase"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Modulo\nintegrator"
	  SrcPort		  1
	  DstBlock		  "Gain1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Modulo\nintegrator1"
	  SrcPort		  1
	  DstBlock		  "Gain"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Filter"
	  SrcPort		  1
	  Points		  [30, 0; 0, 0]
	  Branch {
	    Points		    [0, 70]
	    DstBlock		    "Modulo\nintegrator1"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Gain3"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Gain2"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Phase-Locked\nLoop demo"
      Ports		      []
      Position		      [275, 48, 355, 92]
      BackgroundColor	      "cyan"
      ShowName		      off
      OpenFcn		      "tstpll"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('PLL\\ndemo')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Phase-Locked\nLoop 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		      "Phase-locked\nloop"
      Ports		      [1, 3]
      Position		      [25, 48, 105, 92]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskType		      "Simple form PLL"
      MaskDescription	      "Output the phase shifting signal at 1st port; t"
"he detected phase error at 2nd port; VOC output at 3rd port."
      MaskHelp		      "This block detects the phase shifting of the in"
"put signal. This block uses a multiplier phase detector. The first output is "
"the detected phase shift. The second output is the detected phase error outpu"
"t from phase detector. The third output is the matching signal for the input."
" Note a 180 degree phase difference between the input signal and the matching"
" signal."
      MaskPromptString	      "Lowpass filter numerator:|Lowpass filter denomi"
"nator:|Oscillation frequency:|Oscillation Phase:|Oscillation Amplitude:|Gain "
"at the output:"
      MaskStyleString	      "edit,edit,edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on,on"
      MaskCallbackString      "|||||"
      MaskEnableString	      "on,on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on,on"
      MaskVariables	      "Fn=@1;Fd=@2;Fc=@3;Ph=@4;Ac=@5;G=@6;"
      MaskDisplay	      "disp('PLL')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "[3.0002,  0, 40002]|[1, 67.46, 2270.9, 40002]|1"
"00/2/pi|pi/2|1|2"
      MaskVariableAliases     ",,,,,"
      System {
	Name			"Phase-locked\nloop"
	Location		[360, 100, 815, 344]
	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		  [45, 65, 65, 85]
	  ShowName		  off
	  Port			  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [350, 67, 375, 93]
	  ShowName		  off
	  Gain			  "G"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  TransferFcn
	  Name			  "Lowpass\nfilter"
	  Position		  [225, 59, 275, 101]
	  ShowName		  off
	  Numerator		  "Fn"
	  Denominator		  "Fd"
	  Realization		  "auto"
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Product
	  Name			  "Multiplier\nphase detector"
	  Ports			  [2, 1]
	  Position		  [140, 70, 165, 90]
	  ShowName		  off
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Reference
	  Name			  "Voltage-controlled\noscillator"
	  Ports			  [1, 1]
	  Position		  [165, 135, 245, 175]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  SourceBlock		  "com_util/Voltage-controlled\noscillator"
	  SourceType		  "Voltage-controlled oscillator"
	  Ac			  "Ac"
	  Fc			  "Fc"
	  Kc			  "1"
	  Ph			  "Ph"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [405, 70, 425, 90]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_2"
	  Position		  [305, 25, 325, 45]
	  ShowName		  off
	  Port			  "2"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_3"
	  Position		  [315, 195, 335, 215]
	  ShowName		  off
	  Port			  "3"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Lowpass\nfilter"
	  SrcPort		  1
	  Points		  [40, 0; 0, 0]
	  Branch {
	    Points		    [0, 75]
	    DstBlock		    "Voltage-controlled\noscillator"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Gain"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "Multiplier\nphase detector"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Multiplier\nphase detector"
	  SrcPort		  1
	  Points		  [20, 0]
	  Branch {
	    DstBlock		    "Lowpass\nfilter"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -45]
	    DstBlock		    "out_2"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Voltage-controlled\noscillator"
	  SrcPort		  1
	  Points		  [-65, 0]
	  Branch {
	    Points		    [0, -70]
	    DstBlock		    "Multiplier\nphase detector"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, 50]
	    DstBlock		    "out_3"
	    DstPort		    1
	  }
	}
      }
    }
    Annotation {
      Position		      [182, 13]
      VerticalAlignment	      "top"
      ForegroundColor	      "green"
      Text		      "Synchronization Library"
      FontSize		      12
      FontWeight	      "bold"
    }
    Annotation {
      Position		      [190, 247]
      Text		      "Warning: This library is obsolete and may be re"
"moved in the future."
      FontName		      "Arial"
      FontSize		      12
    }
  }
}
