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

📄 homework_3.mdl

📁 设计一M阶自适应回波抵消器
💻 MDL
📖 第 1 页 / 共 3 页
字号:
      Name		      "Scope3"
      Ports		      [1]
      Position		      [1060, 154, 1090, 186]
      Floating		      off
      Location		      [392, 436, 716, 675]
      Open		      off
      NumInputPorts	      "1"
      TickLabels	      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      TimeRange		      "10              "
      YMin		      "-0.3"
      YMax		      "0.4"
      SaveName		      "ScopeData2"
      DataFormat	      "StructureWithTime"
      MaxDataPoints	      "5000000"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope4"
      Ports		      [1]
      Position		      [495, 314, 525, 346]
      Orientation	      "left"
      NamePlacement	      "alternate"
      Floating		      off
      Location		      [810, 304, 1134, 543]
      Open		      on
      NumInputPorts	      "1"
      ZoomMode		      "yonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "0.95"
      YMax		      "1.05"
      SaveName		      "ScopeData4"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Line {
      SrcBlock		      "Integer Delay"
      SrcPort		      1
      DstBlock		      "Gain"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Integer Delay1"
      SrcPort		      1
      DstBlock		      "Gain1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Add"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	Points			[0, 145]
	DstBlock		"Scope1"
	DstPort			1
      }
      Branch {
	DstBlock		"LMS Filter"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "LMS Filter"
      SrcPort		      1
      DstBlock		      "Scope2"
      DstPort		      1
    }
    Line {
      Name		      "error"
      Labels		      [0, 0]
      SrcBlock		      "LMS Filter"
      SrcPort		      2
      Points		      [65, 0; 0, 30]
      Branch {
	DstBlock		"Scope3"
	DstPort			1
      }
      Branch {
	Points			[0, 145]
	DstBlock		"Embedded\nMATLAB Function"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Gain"
      SrcPort		      1
      DstBlock		      "Add"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Gain1"
      SrcPort		      1
      Points		      [15, 0; 0, -55]
      DstBlock		      "Add"
      DstPort		      3
    }
    Line {
      SrcBlock		      "From Wave File"
      SrcPort		      1
      DstBlock		      "Demux"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      1
      Points		      [120, 0]
      Branch {
	Points			[0, 10]
	Branch {
	  DstBlock		  "Integer Delay"
	  DstPort		  1
	}
	Branch {
	  Points		  [0, 65]
	  Branch {
	    DstBlock		    "Integer Delay1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 260; 55, 0]
	    Branch {
	      DstBlock		      "Integer Delay2"
	      DstPort		      1
	    }
	    Branch {
	      DstBlock		      "Bus\nCreator"
	      DstPort		      1
	    }
	  }
	}
      }
      Branch {
	Points			[0, -50; 180, 0]
	Branch {
	  Points		  [0, 50]
	  DstBlock		  "Add"
	  DstPort		  1
	}
	Branch {
	  DstBlock		  "Integer Delay11"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "LMS Filter"
      SrcPort		      3
      Points		      [40, 0; 0, 160]
      DstBlock		      "Embedded\nMATLAB Function"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Integer Delay2"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	DstBlock		"Integer Delay4"
	DstPort			1
      }
      Branch {
	Points			[5, 0]
	DstBlock		"Bus\nCreator"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Integer Delay4"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	DstBlock		"Integer Delay9"
	DstPort			1
      }
      Branch {
	DstBlock		"Bus\nCreator"
	DstPort			3
      }
    }
    Line {
      SrcBlock		      "Integer Delay5"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	DstBlock		"Integer Delay3"
	DstPort			1
      }
      Branch {
	DstBlock		"Bus\nCreator"
	DstPort			9
      }
    }
    Line {
      SrcBlock		      "Integer Delay6"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	DstBlock		"Integer Delay5"
	DstPort			1
      }
      Branch {
	Points			[5, 0]
	DstBlock		"Bus\nCreator"
	DstPort			8
      }
    }
    Line {
      SrcBlock		      "Integer Delay7"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	DstBlock		"Integer Delay6"
	DstPort			1
      }
      Branch {
	DstBlock		"Bus\nCreator"
	DstPort			7
      }
    }
    Line {
      SrcBlock		      "Integer Delay8"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	DstBlock		"Integer Delay7"
	DstPort			1
      }
      Branch {
	DstBlock		"Bus\nCreator"
	DstPort			6
      }
    }
    Line {
      SrcBlock		      "Integer Delay9"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	DstBlock		"Integer Delay10"
	DstPort			1
      }
      Branch {
	DstBlock		"Bus\nCreator"
	DstPort			4
      }
    }
    Line {
      SrcBlock		      "Integer Delay10"
      SrcPort		      1
      Points		      [5, 0]
      Branch {
	DstBlock		"Integer Delay8"
	DstPort			1
      }
      Branch {
	Points			[5, 0]
	DstBlock		"Bus\nCreator"
	DstPort			5
      }
    }
    Line {
      SrcBlock		      "Integer Delay3"
      SrcPort		      1
      Points		      [20, 0]
      DstBlock		      "Bus\nCreator"
      DstPort		      10
    }
    Line {
      SrcBlock		      "Integer Delay12"
      SrcPort		      1
      Points		      [-75, 0; 0, -5]
      Branch {
	Points			[0, -155]
	DstBlock		"LMS Filter"
	DstPort			3
      }
      Branch {
	Points			[0, 5]
	DstBlock		"Scope4"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Embedded\nMATLAB Function"
      SrcPort		      1
      DstBlock		      "Integer Delay12"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Bus\nCreator"
      SrcPort		      1
      Points		      [440, 0; 0, -230]
      DstBlock		      "Embedded\nMATLAB Function"
      DstPort		      3
    }
    Line {
      SrcBlock		      "Integer Delay11"
      SrcPort		      1
      Points		      [60, 0]
      Branch {
	DstBlock		"Scope0"
	DstPort			1
      }
      Branch {
	Points			[0, 90]
	DstBlock		"LMS Filter"
	DstPort			2
      }
    }
    Annotation {
      Position		      [374, 108]
    }
    Annotation {
      Position		      [1081, 115]
    }
  }
}
MatData {
  NumRecords		  1
  DataRecord {
    Tag			    DataTag0
    Data		    "  %)30     .    8     8    (     0         %    "
"\"     $    !     0         .    ,     8    (    !          %    \"     $    "
"#     0         0  , 3$U3  "
  }
}

# Finite State Machines
#
#    Stateflow Version 6.6 (R2007a) dated Jan 30 2007, 03:33:34
#
#

Stateflow {

	machine {
		id                   		1
		name                 		"homework_3"
		created              		"03-Jun-2008 10:45:11"
		isLibrary            		0
		firstTarget          		11
		sfVersion            		66014000
	}

	chart {
		id                                        		2
		name                                      		"Embedded\n"
					"MATLAB Function"
		windowPosition                            		[317.039 353.766 200.25 189.75]
		viewLimits                                		[0 156.75 0 153.75]
		screen                                    		[1 1 1440 900 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       		"fcn"
		}
	}

	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 step = fcn(error,weight,input)\n"
						"weight_sum = 10 / 1 * (weight(1)^2 + weight(2)^2 + weight(3"
						")^2 + weight(4)^2 + weight(5)^2 + weight(6)^2 + weight(7)^2"
						" + weight(8)^2 + weight(9)^2 + weight(10)^2);\n"
						"input_sum = (input(1)^2 + input(2)^2 + input(3)^2 + input(4"
						")^2 + input(5)^2 + input(6)^2 + input(7)^2 + input(8)^2 + i"
						"nput(9)^2 + input(10)^2)/10;\n"
						"y_opt = weight_sum * input_sum/(error^2);\n"
						"y_fix_1 = 0.1;\n"
						"y_fix_2 = 0.5;\n"
						"y_fix_3 = 1;\n"
						"y_fix_4 = 2;\n"
						"if y_opt < y_fix_1\n"
						"     step = 0;\n"
						"else\n"
						"     if y_opt < y_fix_2 / 2\n"
						"         step = y_fix_1 / 2;\n"
						"     else\n"
						"         if y_opt < y_fix_3 / 2\n"
						"             step = y_fix_2 / 2;\n"
						"         else\n"
						"             if y_opt < y_fix_4 / 2\n"
						"                 step = y_fix_3 / 2;\n"
						"             else step = y_fix_4 / 2;\n"
						"             end\n"
						"         end\n"
						"     end\n"
						"end"
			editorLayout             		"100 M4x1[91 38 810 543]"
			treatIntsAsFixpt         		0
		}
	}

	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     		[23.575 23.575 14.625 34.575]
		subviewer      		2
		drawStyle      		SMART
		executionOrder 		1
	}

	data {
		id                            		6
		name                          		"error"
		linkNode                      		[2 0 7]
		scope                         		INPUT_DATA
		machine                       		1
		props {
			array {
				size      		"-1"
			}
			type {
				method    		SF_INHERITED_TYPE
			}
			complexity           		SF_COMPLEX_INHERITED
		}
		dataType                      		"inherited"
		fixptType {
			slope   		1
			baseType		SF_INT16_TYPE
		}
		complexity                    		SF_COMPLEX_INHERITED
	}

	data {
		id                            		7
		name                          		"step"
		linkNode                      		[2 6 8]
		scope                         		OUTPUT_DATA
		machine                       		1
		props {
			array {
				size      		"-1"
			}
			type {
				method    		SF_INHERITED_TYPE
			}
			complexity           		SF_COMPLEX_INHERITED
			frame                		SF_FRAME_NO
		}
		dataType                      		"inherited"
		fixptType {
			slope   		1
			baseType		SF_INT16_TYPE
		}
		complexity                    		SF_COMPLEX_INHERITED
	}

	data {
		id                            		8
		name                          		"weight"
		linkNode                      		[2 7 9]
		scope                         		INPUT_DATA
		machine                       		1
		props {
			array {
				size      		"-1"
			}
			type {
				method    		SF_INHERITED_TYPE
				primitive 		SF_DOUBLE_TYPE
				isSigned  		1
				wordLength		"16"
			}
			complexity           		SF_COMPLEX_INHERITED
			frame                		SF_FRAME_INHERITED
		}
		dataType                      		"inherited"
		complexity                    		SF_COMPLEX_INHERITED
	}

	data {
		id                            		9
		name                          		"input"
		linkNode                      		[2 8 0]
		scope                         		INPUT_DATA
		machine                       		1
		props {
			array {
				size      		"-1"
			}
			type {
				method    		SF_INHERITED_TYPE
				primitive 		SF_DOUBLE_TYPE
				isSigned  		1
				wordLength		"16"
			}
			complexity           		SF_COMPLEX_INHERITED
			frame                		SF_FRAME_INHERITED
		}
		dataType                      		"inherited"
		complexity                    		SF_COMPLEX_INHERITED
	}

	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 + -