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

📄 sim43.mdl

📁 matlab源代码,适用于开发研究,带来很好的学习效果.
💻 MDL
📖 第 1 页 / 共 3 页
字号:
      SampleTime	      "-1"
      VectorParams1D	      on
    }
    Block {
      BlockType		      Selector
      InputType		      "Vector"
      IndexMode		      "One-based"
      ElementSrc	      "Internal"
      Elements		      "1"
      RowSrc		      "Internal"
      Rows		      "1"
      ColumnSrc		      "Internal"
      Columns		      "1"
      InputPortWidth	      "-1"
      IndexIsStartValue	      off
      OutputPortSize	      "1"
    }
    Block {
      BlockType		      StateSpace
      A			      "1"
      B			      "1"
      C			      "1"
      D			      "1"
      X0		      "0"
      AbsoluteTolerance	      "auto"
      Realization	      "auto"
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      InputSameDT	      on
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Terminator
    }
    Block {
      BlockType		      ToWorkspace
      VariableName	      "simulink_output"
      MaxDataPoints	      "1000"
      Decimation	      "1"
      SampleTime	      "0"
      FixptAsFi		      off
    }
    Block {
      BlockType		      UnitDelay
      X0		      "0"
      SampleTime	      "1"
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
    }
    Block {
      BlockType		      ZeroOrderHold
      SampleTime	      "1"
    }
  }
  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		    "Sim43"
    Location		    [0, 74, 1012, 743]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      ToWorkspace
      Name		      "Actual Position"
      Position		      [385, 55, 455, 75]
      Orientation	      "up"
      ForegroundColor	      "red"
      VariableName	      "XYCoords"
      MaxDataPoints	      "inf"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      Constant
      Name		      "Actual Speed"
      Position		      [200, 330, 235, 350]
      ForegroundColor	      "red"
      Value		      "Speed"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Cartesian to Polar"
      Ports		      [2, 2]
      Position		      [450, 140, 505, 220]
      DropShadow	      on
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskType		      "[x,y]->[r,theta]"
      MaskDescription	      "Tranformation from cartesian to polar\ncoordina"
"tes.\nr=sqrt(x^2+y^2), theta=atan(y/x)"
      MaskHelp		      "Unmask this block for more help."
      MaskDisplay	      "plot(0,0,100,100,[24,20,15,20,20],[85,95,85,95,"
"20],[80,20,95,85,95,85],[70,20,20,15,20,24],[56,56,55,52,50,46],[20,26,31,35,"
"38,42])"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      Port {
	PortNumber		1
	Name			"Range"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
	ShowSigGenPortName	on
      }
      Port {
	PortNumber		2
	Name			"Bearing"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
	ShowSigGenPortName	on
      }
      System {
	Name			"Cartesian to Polar"
	Location		[2, 78, 1022, 717]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "x"
	  Position		  [75, 125, 95, 145]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "y"
	  Position		  [75, 244, 95, 266]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [2, 1]
	  Position		  [160, 173, 205, 217]
	  BackgroundColor	  "[0.501961, 0.000000, 1.000000]"
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "x->r"
	  Position		  [255, 137, 370, 173]
	  BackgroundColor	  "magenta"
	  Expr			  "hypot(u[1],u[2])"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "x->theta"
	  Position		  [260, 224, 370, 256]
	  BackgroundColor	  "magenta"
	  Expr			  "atan2(u[2],u[1])"
	}
	Block {
	  BlockType		  Outport
	  Name			  "r"
	  Position		  [400, 145, 420, 165]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "theta"
	  Position		  [400, 230, 420, 250]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [0, -40]
	    DstBlock		    "x->r"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 45]
	    DstBlock		    "x->theta"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "x->r"
	  SrcPort		  1
	  DstBlock		  "r"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "x->theta"
	  SrcPort		  1
	  DstBlock		  "theta"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "x"
	  SrcPort		  1
	  Points		  [25, 0; 0, 50]
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "y"
	  SrcPort		  1
	  Points		  [25, 0; 0, -50]
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Annotation {
	  Name			  "Cartesian to Polar"
	  Position		  [247, 87]
	  VerticalAlignment	  "top"
	  FontName		  "Arial"
	  FontSize		  12
	}
      }
    }
    Block {
      BlockType		      Integrator
      Name		      "Cross\nAxis\nPosition\n"
      Ports		      [1, 1]
      Position		      [370, 137, 395, 183]
      BackgroundColor	      "cyan"
      Port {
	PortNumber		1
	Name			"y"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
	ShowSigGenPortName	on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Cross-Axis\nAcceleration Model"
      Ports		      [1, 1]
      Position		      [200, 135, 230, 185]
      BackgroundColor	      "cyan"
      DropShadow	      on
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"Cross-Axis\nAcceleration Model"
	Location		[282, 221, 803, 443]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"cyan"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Inport"
	  Position		  [70, 65, 90, 85]
	  ForegroundColor	  "red"
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [180, 120, 235, 150]
	  Orientation		  "left"
	  Gain			  "1/tauc"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [315, 72, 340, 98]
	  Gain			  "g"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  Ports			  [1, 1]
	  Position		  [205, 71, 235, 99]
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [145, 67, 165, 98]
	  Inputs		  "+-"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [370, 75, 390, 95]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Inport"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  Points		  [-70, 0; 0, -45]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Integrator"
	  SrcPort		  1
	  Points		  [25, 0]
	  Branch {
	    DstBlock		    "Gain1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 50]
	    DstBlock		    "Gain"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Integrator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Annotation {
	  Position		  [390, 25]
	}
      }
    }
    Block {
      BlockType		      Integrator
      Name		      "Cross-Axis\nVelocity"
      Ports		      [1, 1]
      Position		      [290, 138, 315, 182]
      BackgroundColor	      "cyan"
      Port {
	PortNumber		1
	Name			"ydot"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
	ShowSigGenPortName	on
      }
    }
    Block {
      BlockType		      Demux
      Name		      "Demux"
      Ports		      [1, 2]
      Position		      [140, 185, 145, 240]
      ForegroundColor	      "red"
      BackgroundColor	      "black"
      ShowName		      off
      Outputs		      "2"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Est. Position\n[x, xdot, y, ydot]"
      Position		      [760, 189, 840, 211]
      ForegroundColor	      "green"
      VariableName	      "X_hat"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      Integrator
      Name		      "Long.\nPosition"
      Ports		      [1, 1]
      Position		      [370, 253, 395, 297]
      BackgroundColor	      "magenta"
      Port {
	PortNumber		1
	Name			"x"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
	ShowSigGenPortName	on
      }
    }
    Block {
      BlockType		      Integrator
      Name		      "Long.\nVelocity"
      Ports		      [2, 1]
      Position		      [285, 254, 330, 296]
      BackgroundColor	      "magenta"
      InitialConditionSource  "external"
      Port {
	PortNumber		1
	Name			"xdot"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
	ShowSigGenPortName	on
      }
    }
    Block {
      BlockType		      StateSpace
      Name		      "Meas. Noise\nIntensity"
      Position		      [550, 274, 575, 306]
      A			      "[]"
      B			      "[]"
      C			      "[]"
      D			      "K"
      MaskType		      "Matrix Gain"
      MaskDescription	      "Matrix Gain."
      MaskHelp		      "Multiplies input vector by entered matrix to pr"
"oduce output vector (y=Au)."
      MaskPromptString	      "Gain matrix:"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskInitialization      "K = @1;"
      MaskDisplay	      "disp('K')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "[300 0; 0 .01]"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [555, 140, 560, 220]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux1"
      Ports		      [2, 1]
      Position		      [401, 120, 439, 125]
      Orientation	      "up"
      NamePlacement	      "alternate"
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Radar\nKalman Filter"
      Ports		      [1, 2]
      Position		      [650, 132, 735, 223]
      ForegroundColor	      "green"
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"Radar\nKalman Filter"
	Location		[2, 82, 1014, 721]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"

⌨️ 快捷键说明

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