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

📄 bpsk.mdl

📁 matlab实现BPSK的调制
💻 MDL
📖 第 1 页 / 共 2 页
字号:
      Samples		      "10"
      Offset		      "0"
      SampleTime	      "-1"
      VectorParams1D	      on
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Terminator
    }
  }
  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		    "BPSK"
    Location		    [245, 150, 829, 583]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "Embedded\nMATLAB Function"
      Ports		      [3, 1]
      Position		      [235, 146, 405, 264]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      Array {
	Type			"Handle"
	Dimension		0
	PropName		"AvailSigsLoadSave"
      }
      MaskType		      "Stateflow"
      MaskDescription	      "Embedded MATLAB block"
      MaskDisplay	      "disp('BPSK_a');"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Embedded\nMATLAB Function"
	Location		[257, 457, 812, 717]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "bit"
	  Position		  [20, 101, 40, 119]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "no_shift"
	  Position		  [20, 136, 40, 154]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "shift"
	  Position		  [20, 171, 40, 189]
	  Port			  "3"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Demux
	  Name			  " Demux "
	  Ports			  [1, 1]
	  Position		  [270, 180, 320, 220]
	  Outputs		  "1"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  " SFunction "
	  Tag			  "Stateflow S-Function BPSK 2"
	  Ports			  [3, 2]
	  Position		  [180, 100, 230, 180]
	  FunctionName		  "sf_sfun"
	  PortCounts		  "[3 2]"
	  Port {
	    PortNumber		    2
	    Name		    "out_a"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	    ShowSigGenPortName	    on
	  }
	}
	Block {
	  BlockType		  Terminator
	  Name			  " Terminator "
	  Position		  [460, 191, 480, 209]
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_a"
	  Position		  [460, 101, 480, 119]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  1
	  Points		  [0, 80]
	  DstBlock		  " Demux "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " Demux "
	  SrcPort		  1
	  DstBlock		  " Terminator "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "bit"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  1
	}
	Line {
	  Name			  "out_a"
	  Labels		  [0, 0]
	  SrcBlock		  " SFunction "
	  SrcPort		  2
	  DstBlock		  "out_a"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "no_shift"
	  SrcPort		  1
	  Points		  [120, 0]
	  DstBlock		  " SFunction "
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "shift"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  3
	}
      }
    }
    Block {
      BlockType		      DiscretePulseGenerator
      Name		      "Pulse\nGenerator"
      Ports		      [0, 1]
      Position		      [45, 53, 90, 87]
      Period		      "4"
      PulseWidth	      "2"
      SampleTime	      "1/20"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope1"
      Ports		      [4]
      Position		      [475, 69, 505, 101]
      Location		      [5, 56, 1029, 741]
      Open		      off
      NumInputPorts	      "4"
      List {
	ListType		AxesTitles
	axes1			"CODED SIGN"
	axes2			"CARRIER SIGNAL"
	axes3			"CARRIER SIGNAL WITH PHASE=-PI"
	axes4			"BPSK signal"
      }
      YMin		      "0~-5~-5~-5"
      YMax		      "1~5~5~5"
      SaveName		      "ScopeData1"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave Shift"
      Ports		      [0, 1]
      Position		      [95, 250, 125, 280]
      SineType		      "Time based"
      Frequency		      "2*10*pi"
      Phase		      "-pi"
      Offset		      "-90"
      SampleTime	      "1/2000"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave1"
      Ports		      [0, 1]
      Position		      [45, 190, 75, 220]
      SineType		      "Time based"
      Frequency		      "2*10*pi"
      SampleTime	      "1/2000"
    }
    Line {
      SrcBlock		      "Pulse\nGenerator"
      SrcPort		      1
      Points		      [110, 0]
      Branch {
	DstBlock		"Scope1"
	DstPort			1
      }
      Branch {
	Points			[0, 95]
	DstBlock		"Embedded\nMATLAB Function"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Sine Wave1"
      SrcPort		      1
      Points		      [65, 0]
      Branch {
	Points			[0, -125]
	DstBlock		"Scope1"
	DstPort			2
      }
      Branch {
	DstBlock		"Embedded\nMATLAB Function"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Sine Wave Shift"
      SrcPort		      1
      Points		      [0, -20; 45, 0]
      Branch {
	DstBlock		"Embedded\nMATLAB Function"
	DstPort			3
      }
      Branch {
	Points			[0, -155]
	DstBlock		"Scope1"
	DstPort			3
      }
    }
    Line {
      SrcBlock		      "Embedded\nMATLAB Function"
      SrcPort		      1
      Points		      [20, 0; 0, -105]
      DstBlock		      "Scope1"
      DstPort		      4
    }
  }
}

# Finite State Machines
#
#    Stateflow Version 6.1 (R14SP1) dated Sep  7 2004, 18:52:26
#
#

Stateflow {

	machine {
		id                   		1
		name                 		"BPSK"
		created              		"29-Sep-2006 12:05:01"
		isLibrary            		0
		firstTarget          		11
		sfVersion            		61014000
	}

	chart {
		id                       		2
		name                     		"Embedded\n"
					"MATLAB Function"
		windowPosition           		[255.45 318.75 200.25 189.75]
		viewLimits               		[0 156.75 0 153.75]
		screen                   		[1 1 1024 768 1.333333333333333]
		treeNode                 		[0 3 0 0]
		firstTransition          		5
		firstJunction            		4
		viewObj                  		2
		machine                  		1
		decomposition            		CLUSTER_CHART
		type                     		EML_CHART
		firstData                		6
		chartFileNumber          		2
		disableImplicitCasting   		1
		eml {
			name		"BPSK_a"
		}
	}

	state {
		id                  		3
		labelString         		"eML_blk_kernel()"
		position            		[18 64.5 118 66]
		fontSize            		12
		chart               		2
		treeNode            		[2 0 0 0]
		superState          		SUBCHART
		subviewer           		2
		type                		FUNC_STATE
		decomposition       		CLUSTER_STATE
		eml {
			isEML       		1
			script      		"function out_a=BPSK_a(bit,no_shift,shift)\n"
						"if bit == 1\n"
						"    out_a = no_shift\n"
						"else\n"
						"    out_a = shift\n"
						"end"
			editorLayout		"100 M4x1[146 214 671 364]"
		}
	}

	junction {
		id         		4
		position   		[23.5747 49.5747 7]
		chart      		2
		linkNode   		[2 0 0]
		subviewer  		2
		type       		CONNECTIVE_JUNCTION
	}

	transition {
		id             		5
		labelString    		"{eML_blk_kernel();}"
		labelPosition  		[32.125 19.875 102.544 14.964]
		fontSize       		12
		src {
			intersection		[0 0 1 0 23.5747 14.625 0 0]
		}
		dst {
			id          		4
			intersection		[7 0 -1 -1 23.5747 42.5747 0 0]
		}
		midPoint       		[23.5747 24.9468]
		chart          		2
		linkNode       		[2 0 0]
		dataLimits     		[21.175 25.975 14.625 42.575]
		subviewer      		2
		drawStyle      		SMART
	}

	data {
		id                            		6
		name                          		"bit"
		linkNode                      		[2 0 7]
		scope                         		INPUT_DATA
		machine                       		1
		dataType                      		"inherited"
		fixptType {
			bias    		0
			slope   		1
			exponent		0
			baseType		SF_INT16_TYPE
			lock    		0
		}
		dlgFixptMode                  		0
		complexity                    		SF_COMPLEX_INHERITED
		props {
			range {
				minimum		""
				maximum		""
			}
			array {
				size      		"-1"
			}
		}
	}

	data {
		id                            		7
		name                          		"out_a"
		linkNode                      		[2 6 8]
		scope                         		OUTPUT_DATA
		machine                       		1
		dataType                      		"inherited"
		fixptType {
			bias    		0
			slope   		1
			exponent		0
			baseType		SF_INT16_TYPE
			lock    		0
		}
		dlgFixptMode                  		0
		complexity                    		SF_COMPLEX_INHERITED
		props {
			range {
				minimum		""
				maximum		""
			}
			array {
				size      		"-1"
			}
		}
	}

	data {
		id                            		8
		name                          		"no_shift"
		linkNode                      		[2 7 9]
		scope                         		INPUT_DATA
		machine                       		1
		dataType                      		"inherited"
		fixptType {
			bias    		0
			slope   		1
			exponent		0
			baseType		SF_INT16_TYPE
			lock    		0
		}
		dlgFixptMode                  		0
		complexity                    		SF_COMPLEX_INHERITED
		props {
			range {
				minimum		""
				maximum		""
			}
			array {
				size      		"-1"
			}
		}
	}

	data {
		id                            		9
		name                          		"shift"
		linkNode                      		[2 8 0]
		scope                         		INPUT_DATA
		machine                       		1
		dataType                      		"inherited"
		fixptType {
			bias    		0
			slope   		1
			exponent		0
			baseType		SF_INT16_TYPE
			lock    		0
		}
		dlgFixptMode                  		0
		complexity                    		SF_COMPLEX_INHERITED
		props {
			range {
				minimum		""
				maximum		""
			}
			array {
				size      		"-1"
			}
		}
	}

	instance {
		id     		10
		name   		"Embedded\n"
					"MATLAB Function"
		machine		1
		chart  		2
	}

	target {
		id                        		11
		name                      		"sfun"
		description               		"Default Simulink S-Function Target."
		machine                   		1
		linkNode                  		[1 0 0]
	}
}

⌨️ 快捷键说明

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