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

📄 simu_modlib.mdl

📁 很优良的PID控制器设计仿真程序与模型,经过严格检验
💻 MDL
📖 第 1 页 / 共 3 页
字号:
	    Block {
	      BlockType		      Constant
	      Name		      "Constant3"
	      Position		      [355, 260, 375, 280]
	      ShowName		      off
	      Value		      "0"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant4"
	      Position		      [355, 425, 375, 445]
	      ShowName		      off
	      Value		      "0"
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "Integrator"
	      Ports		      [1, 1, 0, 0, 0]
	      Position		      [165, 99, 200, 141]
	      ExternalReset	      none
	      InitialConditionSource      internal
	      InitialCondition	      "X0"
	      LimitOutput	      off
	      UpperSaturationLimit      "inf"
	      LowerSaturationLimit      "-inf"
	      ShowSaturationPort      off
	      ShowStatePort	      off
	      AbsoluteTolerance	      "auto"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [570, 280, 605, 315]
	      ShowName		      off
	      Operator		      AND
	      Inputs		      "2"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator1"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [490, 200, 525, 235]
	      ShowName		      off
	      Operator		      OR
	      Inputs		      "2"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator2"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [490, 360, 525, 395]
	      ShowName		      off
	      Operator		      OR
	      Inputs		      "2"
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\noperator"
	      Position		      [415, 151, 445, 204]
	      ShowName		      off
	      Operator		      <=
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\noperator1"
	      Position		      [415, 312, 445, 368]
	      ShowName		      off
	      Operator		      >=
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\noperator2"
	      Position		      [415, 231, 445, 284]
	      ShowName		      off
	      Operator		      <=
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\noperator3"
	      Position		      [415, 396, 445, 449]
	      ShowName		      off
	      Operator		      >=
	    }
	    Block {
	      BlockType		      Saturate
	      Name		      "Saturation"
	      Position		      [325, 110, 350, 130]
	      UpperLimit	      "upper_limit"
	      LowerLimit	      "lower_limit"
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch"
	      Position		      [110, 80, 135, 160]
	      Threshold		      "0.5"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Outport"
	      Position		      [515, 110, 535, 130]
	      Port		      "1"
	      OutputWhenDisabled      held
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "Integrator"
	      SrcPort		      1
	      Points		      [0, 0]
	      Branch {
		Points			[40, 0; 0, 45; 70, 0]
		Branch {
		  DstBlock		  "Relational\noperator"
		  DstPort		  1
		}
		Branch {
		  Points		  [0, 160]
		  DstBlock		  "Relational\noperator1"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"Saturation"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Constant4"
	      SrcPort		      1
	      DstBlock		      "Relational\noperator3"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant3"
	      SrcPort		      1
	      DstBlock		      "Relational\noperator2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator2"
	      SrcPort		      1
	      Points		      [10, 0; 0, -75]
	      DstBlock		      "Logical\nOperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Relational\noperator3"
	      SrcPort		      1
	      Points		      [10, 0; 0, -40]
	      DstBlock		      "Logical\nOperator2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Relational\noperator1"
	      SrcPort		      1
	      Points		      [10, 0; 0, 30]
	      DstBlock		      "Logical\nOperator2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator1"
	      SrcPort		      1
	      Points		      [10, 0; 0, 70]
	      DstBlock		      "Logical\nOperator"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\noperator2"
	      SrcPort		      1
	      Points		      [15, 0; 0, -35]
	      DstBlock		      "Logical\nOperator1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Relational\noperator"
	      SrcPort		      1
	      Points		      [15, 0; 0, 30]
	      DstBlock		      "Logical\nOperator1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant2"
	      SrcPort		      1
	      DstBlock		      "Switch"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator"
	      SrcPort		      1
	      Points		      [15, 0; 0, 190; -540, 0; 0, -370]
	      DstBlock		      "Switch"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant1"
	      SrcPort		      1
	      DstBlock		      "Relational\noperator1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant"
	      SrcPort		      1
	      DstBlock		      "Relational\noperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Switch"
	      SrcPort		      1
	      DstBlock		      "Integrator"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Inport"
	      SrcPort		      1
	      Points		      [15, 0]
	      Branch {
		Points			[0, 150]
		Branch {
		  Points		  [0, 165]
		  DstBlock		  "Relational\noperator3"
		  DstPort		  1
		}
		Branch {
		  DstBlock		  "Relational\noperator2"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"Switch"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Saturation"
	      SrcPort		      1
	      DstBlock		      "Outport"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [35, 148, 65, 172]
	  Operator		  AND
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Lookup
	  Name			  "Look-Up\nTable"
	  Position		  [205, 78, 235, 102]
	  InputValues		  "[-4:5]"
	  OutputValues		  " rand(1,10)-0.5"
	}
	Block {
	  BlockType		  MATLABFcn
	  Name			  "MATLAB Fcn"
	  Position		  [280, 148, 340, 182]
	  MATLABFcn		  "sin"
	  OutputWidth		  "-1"
	}
	Block {
	  BlockType		  Memory
	  Name			  "Memory"
	  Position		  [30, 215, 70, 245]
	  X0			  "0"
	  InheritSampleTime	  off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [85, 83, 115, 107]
	  Inputs		  "2"
	}
	Block {
	  BlockType		  S-Function
	  Name			  "Quantizer"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [265, 32, 295, 58]
	  FunctionName		  "quantize"
	  Parameters		  "q"
	  MaskType		  "Quantizer"
	  MaskDescription	  "Discretizes input at given interval."
	  MaskHelp		  "Quantizes input in given intervals. "
	  MaskPromptString	  "Quantization interval:"
	  MaskStyleString	  "edit"
	  MaskInitialization	  "q = @1;"
	  MaskDisplay		  "plot([-4,4],[0,0],[0,0],[-4,4],[-3,-2,-2,-1,"
				  "-1,0,0,1,1,2,2,3,3,4]-0.5,[-3,-3,-2,-2,-1,-1"
				  ",0,0,1,1,2,2,3,3])"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  none
	  MaskIconUnits		  autoscale
	  MaskValueString	  "0.5"
	}
	Block {
	  BlockType		  RateLimiter
	  Name			  "Rate Limiter"
	  Position		  [30, 82, 60, 108]
	  RisingSlewLimit	  "1.0"
	  FallingSlewLimit	  "-1.0"
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\nOperator"
	  Position		  [330, 83, 360, 107]
	  Operator		  >=
	}
	Block {
	  BlockType		  Relay
	  Name			  "Relay"
	  Position		  [85, 33, 115, 57]
	  OnSwitchValue		  "eps"
	  OffSwitchValue	  "eps"
	  OnOutputValue		  "1"
	  OffOutputValue	  "0"
	}
	Block {
	  BlockType		  ResetIntegrator
	  Name			  "Reset\nIntegrator"
	  Position		  [365, 145, 395, 175]
	  InitialCondition	  "15"
	}
	Block {
	  BlockType		  S-Function
	  Name			  "S-Function"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [210, 160, 260, 180]
	  FunctionName		  "system"
	}
	Block {
	  BlockType		  Saturate
	  Name			  "Saturation"
	  Position		  [205, 33, 235, 57]
	  UpperLimit		  "0.5"
	  LowerLimit		  "-0.5"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Sign"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [30, 32, 60, 58]
	  ShowPortLabels	  off
	  MaskType		  "Sign"
	  MaskDescription	  "y = sign(x)"
	  MaskHelp		  "Sign Function:\\n\\t\\t\\ty = 1 if x "
				  "> 0\\n\\t\\t\\ty = 0 if x = 0\\n\\t\\t\\ty "
				  "= -1 if x < 0"
	  MaskDisplay		  "plot(-50,-50,50,50,[-50,50],[0,0],[0,0],[-50"
				  ",50],[-40,0],[-30,-30],[0,40],[30,30])"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  none
	  MaskIconUnits		  autoscale
	  System {
	    Name		    "Sign"
	    Location		    [159, 417, 467, 586]
	    Open		    off
	    ScreenColor		    white
	    Block {
	      BlockType		      Inport
	      Name		      "in_1"
	      Position		      [35, 30, 55, 50]
	      Port		      "1"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant"
	      Position		      [65, 105, 85, 125]
	      Value		      "0"
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator"
	      Position		      [140, 32, 170, 63]
	      Operator		      >
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator1"
	      Position		      [140, 92, 170, 123]
	      Operator		      <
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [215, 64, 235, 91]
	      Inputs		      "+-"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "out_1"
	      Position		      [265, 70, 285, 90]
	      Port		      "1"
	      OutputWhenDisabled      held
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "out_1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator"
	      SrcPort		      1
	      Points		      [10, 0; 0, 20]
	      DstBlock		      "Sum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator1"
	      SrcPort		      1
	      Points		      [10, 0; 0, -25]
	      DstBlock		      "Sum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant"
	      SrcPort		      1
	      Points		      [20, 0]
	      Branch {
		Points			[0, -60]
		DstBlock		"Relational\nOperator"
		DstPort			2
	      }
	      Branch {
		DstBlock		"Relational\nOperator1"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "in_1"
	      SrcPort		      1
	      Points		      [35, 0]
	      Branch {
		Points			[0, 60]
		DstBlock		"Relational\nOperator1"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Relational\nOperator"
		DstPort			1
	      }
	    }
	  }
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch"
	  Position		  [160, 149, 190, 181]
	  Threshold		  "0"
	}
	Block {
	  BlockType		  TransportDelay
	  Name			  "Transport\nDelay"
	  Position		  [105, 215, 145, 245]
	  DelayTime		  "1"
	  InitialInput		  "0"
	  BufferSize		  "1024"
	}
	Block {
	  BlockType		  VariableTransportDelay
	  Name			  "Variable\nTransport Delay"
	  Position		  [185, 217, 225, 248]
	  MaximumDelay		  "10"
	  InitialInput		  "0"
	  MaximumPoints		  "1024"
	}
	Annotation {
	  Position		  [162, 8]
	  VerticalAlignment	  top
	  Text			  "Nonlinear Library"
	}
      }
    }
    Block {
      BlockType		      StateSpace
      Name		      "State-Space"
      Position		      [75, 59, 150, 101]
      FontName		      "Times New Roman"
      FontSize		      8
      A			      "1"
      B			      "1"
      C			      "1"
      D			      "1"
      X0		      "0"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [25, 15, 45, 35]
      FontName		      "Times New Roman"
      FontSize		      8
      Inputs		      "++"
    }
    Block {
      BlockType		      TransferFcn
      Name		      "Transfer Fcn"
      Position		      [20, 107, 55, 143]
      FontName		      "Times New Roman"
      FontSize		      8
      Numerator		      "[1]"
      Denominator	      "[1 1]"
    }
    Block {
      BlockType		      ZeroPole
      Name		      "Zero-Pole"
      Position		      [90, 116, 140, 154]
      FontName		      "Times New Roman"
      FontSize		      8
      Zeros		      "[1]"
      Poles		      "[0; -1]"
      Gain		      "[1]"
    }
  }
}

⌨️ 快捷键说明

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