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

📄 bluetooth_lib2.mdl

📁 本文通过对各种环境下的蓝牙的双工传输进行了仿真
💻 MDL
📖 第 1 页 / 共 5 页
字号:
		Block {
		  BlockType		  Inport
		  Name			  "Tx"
		  Position		  [105, 128, 135, 142]
		  Port			  "2"
		  IconDisplay		  "Port number"
		  LatchInput		  off
		}
		Block {
		  BlockType		  Inport
		  Name			  "Time"
		  Position		  [105, 243, 135, 257]
		  Port			  "3"
		  IconDisplay		  "Port number"
		  LatchInput		  off
		}
		Block {
		  BlockType		  EnablePort
		  Name			  "Enable"
		  Ports			  []
		  Position		  [315, 25, 335, 45]
		}
		Block {
		  BlockType		  SubSystem
		  Name			  "Calculate\nThroughput"
		  Ports			  [2, 1]
		  Position		  [395, 218, 480, 262]
		  TreatAsAtomicUnit	  off
		  MinAlgLoopOccurrences	  off
		  RTWSystemCode		  "Auto"
		  System {
		    Name		    "Calculate\nThroughput"
		    Location		    [337, 286, 932, 514]
		    Open		    off
		    ModelBrowserVisibility  off
		    ModelBrowserWidth	    200
		    ScreenColor		    "white"
		    PaperOrientation	    "landscape"
		    PaperPositionMode	    "auto"
		    PaperType		    "usletter"
		    PaperUnits		    "inches"
		    ZoomFactor		    "100"
		    Block {
		    BlockType		    Inport
		    Name		    "BER"
		    Position		    [90, 88, 120, 102]
		    Port		    "1"
		    IconDisplay		    "Port number"
		    LatchInput		    off
		    Port {
		    PortNumber		    1
		    Name		    "Total bits"
		    PropagatedSignals	    "Error results"
		    RTWStorageClass	    "Auto"
		    DataLoggingNameMode	    "SignalName"
		    ShowSigGenPortName	    on
		    }
		    }
		    Block {
		    BlockType		    Inport
		    Name		    "Curent time"
		    Position		    [90, 143, 120, 157]
		    Port		    "2"
		    IconDisplay		    "Port number"
		    LatchInput		    off
		    }
		    Block {
		    BlockType		    Fcn
		    Name		    "Fcn"
		    Position		    [150, 135, 210, 165]
		    ShowName		    off
		    Expr		    "u+eps"
		    }
		    Block {
		    BlockType		    Fcn
		    Name		    "Ignore\none packet"
		    Position		    [295, 80, 355, 110]
		    Expr		    "u-160"
		    }
		    Block {
		    BlockType		    Product
		    Name		    "Product"
		    Ports		    [2, 1]
		    Position		    [410, 86, 455, 119]
		    ShowName		    off
		    Inputs		    "*/"
		    RndMeth		    "Floor"
		    Port {
		    PortNumber		    1
		    Name		    "Bits/time"
		    RTWStorageClass	    "Auto"
		    DataLoggingNameMode	    "SignalName"
		    ShowSigGenPortName	    on
		    }
		    }
		    Block {
		    BlockType		    Selector
		    Name		    "Selector"
		    Ports		    [1, 1]
		    Position		    [160, 76, 200, 114]
		    ShowName		    off
		    Elements		    "[3]"
		    InputPortWidth	    "3"
		    Port {
		    PortNumber		    1
		    Name		    "Total bits"
		    RTWStorageClass	    "Auto"
		    DataLoggingNameMode	    "SignalName"
		    ShowSigGenPortName	    on
		    }
		    }
		    Block {
		    BlockType		    Outport
		    Name		    "Data rate"
		    Position		    [550, 98, 580, 112]
		    IconDisplay		    "Port number"
		    BusOutputAsStruct	    off
		    }
		    Line {
		    Name		    "Total bits"
		    Labels		    [1, 0]
		    SrcBlock		    "Selector"
		    SrcPort		    1
		    DstBlock		    "Ignore\none packet"
		    DstPort		    1
		    }
		    Line {
		    SrcBlock		    "Curent time"
		    SrcPort		    1
		    DstBlock		    "Fcn"
		    DstPort		    1
		    }
		    Line {
		    Name		    "Total bits"
		    SrcBlock		    "BER"
		    SrcPort		    1
		    DstBlock		    "Selector"
		    DstPort		    1
		    }
		    Line {
		    Name		    "Bits/time"
		    Labels		    [0, 0]
		    SrcBlock		    "Product"
		    SrcPort		    1
		    DstBlock		    "Data rate"
		    DstPort		    1
		    }
		    Line {
		    SrcBlock		    "Fcn"
		    SrcPort		    1
		    Points		    [160, 0; 0, -40]
		    DstBlock		    "Product"
		    DstPort		    2
		    }
		    Line {
		    SrcBlock		    "Ignore\none packet"
		    SrcPort		    1
		    DstBlock		    "Product"
		    DstPort		    1
		    }
		  }
		}
		Block {
		  BlockType		  Display
		  Name			  "Data BER Display\n(should be 0)"
		  Ports			  [1]
		  Position		  [545, 125, 630, 185]
		  Decimation		  "1"
		}
		Block {
		  BlockType		  Reference
		  Name			  "Fail if BER !=0"
		  Description		  "u < eps"
		  Ports			  [1]
		  Position		  [560, 37, 620, 83]
		  SourceBlock		  "simulink/Model\nVerification/Check "
"Static \nUpper Bound"
		  SourceType		  "Checks_SMax"
		  ShowPortLabels	  on
		  max			  "eps"
		  max_included		  off
		  enabled		  on
		  stopWhenAssertionFail	  on
		  export		  off
		  icon			  "graphic"
		}
		Block {
		  BlockType		  Reference
		  Name			  "Raw BER"
		  Ports			  [2, 1]
		  Position		  [210, 117, 295, 188]
		  ShowName		  off
		  SourceBlock		  "commsink2/Error Rate\nCalculation"
		  SourceType		  "Error Rate Calculation"
		  N			  "0"
		  st_delay		  "0"
		  cp_mode		  "Entire frame"
		  subframe		  "[]"
		  PMode			  "Port"
		  WsName		  "ErrorVec"
		  RsMode2		  off
		  stop			  off
		  numErr		  "50"
		  maxBits		  "1e6"
		  Port {
		    PortNumber		    1
		    Name		    "Error results"
		    RTWStorageClass	    "Auto"
		    DataLoggingNameMode	    "SignalName"
		    ShowSigGenPortName	    on
		  }
		}
		Block {
		  BlockType		  Selector
		  Name			  "Selector"
		  Ports			  [1, 1]
		  Position		  [405, 48, 430, 72]
		  ShowName		  off
		  Elements		  "[1]"
		  InputPortWidth	  "3"
		  Port {
		    PortNumber		    1
		    Name		    "BER"
		    RTWStorageClass	    "Auto"
		    DataLoggingNameMode	    "SignalName"
		    ShowSigGenPortName	    on
		  }
		}
		Block {
		  BlockType		  Display
		  Name			  "Throughput (bps)"
		  Ports			  [1]
		  Position		  [550, 226, 635, 254]
		  Decimation		  "1"
		}
		Block {
		  BlockType		  ToWorkspace
		  Name			  "Throughput To Workspace"
		  Position		  [550, 304, 630, 336]
		  VariableName		  "Throughput1"
		  MaxDataPoints		  "1"
		  SampleTime		  "-1"
		  SaveFormat		  "Array"
		}
		Line {
		  Name			  "Error results"
		  Labels		  [0, 0]
		  SrcBlock		  "Raw BER"
		  SrcPort		  1
		  Points		  [50, 0; 25, 0]
		  Branch {
		    Points		    [0, 75]
		    DstBlock		    "Calculate\nThroughput"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 0]
		    Branch {
		    DstBlock		    "Data BER Display\n(should be 0)"
		    DstPort		    1
		    }
		    Branch {
		    Points		    [0, -95]
		    DstBlock		    "Selector"
		    DstPort		    1
		    }
		  }
		}
		Line {
		  SrcBlock		  "Tx"
		  SrcPort		  1
		  DstBlock		  "Raw BER"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Rx"
		  SrcPort		  1
		  DstBlock		  "Raw BER"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Calculate\nThroughput"
		  SrcPort		  1
		  Points		  [25, 0]
		  Branch {
		    Points		    [0, 80]
		    DstBlock		    "Throughput To Workspace"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Throughput (bps)"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Time"
		  SrcPort		  1
		  DstBlock		  "Calculate\nThroughput"
		  DstPort		  2
		}
		Line {
		  Name			  "BER"
		  Labels		  [1, 0]
		  SrcBlock		  "Selector"
		  SrcPort		  1
		  DstBlock		  "Fail if BER !=0"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      Clock
	      Name		      "Clock"
	      Position		      [520, 240, 540, 260]
	      Decimation	      "10"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Data store"
	      Ports		      [3, 1]
	      Position		      [400, 145, 495, 285]
	      SourceBlock	      "dspbuff3/Queue"
	      SourceType	      "Queue"
	      depth		      "8"
	      trigger		      "Rising edge"
	      overflow		      "Dynamic reallocation"
	      pes		      "Warning"
	      eso		      off
	      fso		      off
	      nso		      off
	      clr		      off
	      clrOutport	      off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Delay 1 packet"
	      Ports		      [1, 1]
	      Position		      [590, 164, 635, 196]
	      SourceBlock	      "dspobslib/Integer Delay"
	      SourceType	      "Integer Delay"
	      delay		      "160"
	      ic		      "0"
	      reset_popup	      "None"
	      Port {
		PortNumber		1
		Name			"Previous Packet"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Delay 1 packet1"
	      Ports		      [1, 1]
	      Position		      [235, 154, 280, 186]
	      NamePlacement	      "alternate"
	      SourceBlock	      "dspobslib/Integer Delay"
	      SourceType	      "Integer Delay"
	      delay		      "160"
	      ic		      "0"
	      reset_popup	      "None"
	      Port {
		PortNumber		1
		Name			"Previous Packet"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Integer Delay"
	      Ports		      [1, 1]
	      Position		      [250, 245, 275, 275]
	      ShowName		      off
	      SourceBlock	      "dspobslib/Integer Delay"
	      SourceType	      "Integer Delay"
	      delay		      "1"
	      ic		      "0"
	      reset_popup	      "None"
	      Port {
		PortNumber		1
		Name			"Small delay\n to deal with\n missing "
"start edge"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Integer Delay1"
	      Ports		      [1, 1]
	      Position		      [250, 200, 275, 230]
	      ShowName		      off
	      SourceBlock	      "dspobslib/Integer Delay"
	      SourceType	      "Integer Delay"
	      delay		      "1"
	      ic		      "0"
	      reset_popup	      "None"
	      Port {
		PortNumber		1
		Name			"Small delay\n to deal with\n missing "
"start edge"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      ZeroOrderHold
	      Name		      "Zero-Order\nHold"
	      Position		      [595, 236, 610, 264]
	      ShowName		      off
	      SampleTime	      "Slot_Ts"
	      Port {
		PortNumber		1
		Name			"Latch time"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Line {
	      SrcBlock		      "Data store"
	      SrcPort		      1
	      DstBlock		      "ACL BER meter"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Tx Event "
	      SrcPort		      1
	      DstBlock		      "Integer Delay1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Rx Info Bits"
	      SrcPort		      1
	      DstBlock		      "Delay 1 packet"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Tx Info Bits"
	      SrcPort		      1
	      DstBlock		      "Delay 1 packet1"
	      DstPort		      1
	    }
	    Line {
	      Name		      "Previous Packet"
	      Labels		      [0, 1]
	      SrcBlock		      "Delay 1 packet1"
	      SrcPort		      1
	      DstBlock		      "Data store"
	      DstPort		      1
	    }
	    Line {
	      Name		      "Small delay\n to deal with\n missing st"
"art edge"
	      Labels		      [2, 1]
	      SrcBlock		      "Integer Delay1"
	      SrcPort		      1
	      Points		      [0, 0]
	      DstBlock		      "Data store"
	      DstPort		      2
	    }
	    Line {
	      Name		      "Small delay\n to deal with\n missing st"
"art edge"
	      Labels		      [2, 1]
	      SrcBlock		      "Integer Delay"
	      SrcPort		      1
	      Points		      [0, 0]
	      DstBlock		      "Data store"
	      DstPort		      3
	    }
	    Line {
	      Name		      "Previous Packet"
	      Labels		      [1, 0]
	      SrcBlock		      "Delay 1 packet"
	      SrcPort		      1
	      DstBlock		      "ACL BER meter"
	      DstPort		      1
	    }
	    Line {
	      Name		      "Latch time"
	      Labels		      [0, 0]
	      SrcBlock		      "Zero-Order\nHold"
	      SrcPort		      1
	      DstBlock		      "ACL BER meter"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Clock"
	      SrcPort		      1
	      DstBlock		      "Zero-O

⌨️ 快捷键说明

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