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

📄 shower.mdl

📁 simulink real-time workshop for dragon12 development board from
💻 MDL
📖 第 1 页 / 共 3 页
字号:
	      Position		      [325, 345, 390, 365]
	      ShowName		      off
	      Value		      "lower_limit"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant2"
	      Position		      [20, 135, 40, 155]
	      Value		      "0"
	    }
	    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]
	      Position		      [165, 99, 200, 141]
	      InitialCondition	      "X0"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator"
	      Ports		      [2, 1]
	      Position		      [570, 280, 605, 315]
	      ShowName		      off
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator1"
	      Ports		      [2, 1]
	      Position		      [490, 200, 525, 235]
	      ShowName		      off
	      Operator		      "OR"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator2"
	      Ports		      [2, 1]
	      Position		      [490, 360, 525, 395]
	      ShowName		      off
	      Operator		      "OR"
	    }
	    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
	    }
	    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
	    }
	    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]
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "Saturation"
	      SrcPort		      1
	      DstBlock		      "Outport"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Inport"
	      SrcPort		      1
	      Points		      [15, 0]
	      Branch {
		DstBlock		"Switch"
		DstPort			1
	      }
	      Branch {
		Points			[0, 150]
		Branch {
		  DstBlock		  "Relational\noperator2"
		  DstPort		  1
		}
		Branch {
		  Points		  [0, 165]
		  DstBlock		  "Relational\noperator3"
		  DstPort		  1
		}
	      }
	    }
	    Line {
	      SrcBlock		      "Switch"
	      SrcPort		      1
	      DstBlock		      "Integrator"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant"
	      SrcPort		      1
	      DstBlock		      "Relational\noperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant1"
	      SrcPort		      1
	      DstBlock		      "Relational\noperator1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator"
	      SrcPort		      1
	      Points		      [15, 0; 0, 190; -540, 0; 0, -370]
	      DstBlock		      "Switch"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant2"
	      SrcPort		      1
	      DstBlock		      "Switch"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Relational\noperator"
	      SrcPort		      1
	      Points		      [15, 0; 0, 30]
	      DstBlock		      "Logical\nOperator1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\noperator2"
	      SrcPort		      1
	      Points		      [15, 0; 0, -35]
	      DstBlock		      "Logical\nOperator1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator1"
	      SrcPort		      1
	      Points		      [10, 0; 0, 70]
	      DstBlock		      "Logical\nOperator"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\noperator1"
	      SrcPort		      1
	      Points		      [10, 0; 0, 30]
	      DstBlock		      "Logical\nOperator2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\noperator3"
	      SrcPort		      1
	      Points		      [10, 0; 0, -40]
	      DstBlock		      "Logical\nOperator2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator2"
	      SrcPort		      1
	      Points		      [10, 0; 0, -75]
	      DstBlock		      "Logical\nOperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant3"
	      SrcPort		      1
	      DstBlock		      "Relational\noperator2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant4"
	      SrcPort		      1
	      DstBlock		      "Relational\noperator3"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Integrator"
	      SrcPort		      1
	      Points		      [0, 0]
	      Branch {
		DstBlock		"Saturation"
		DstPort			1
	      }
	      Branch {
		Points			[40, 0; 0, 45; 70, 0]
		Branch {
		  Points		  [0, 160]
		  DstBlock		  "Relational\noperator1"
		  DstPort		  1
		}
		Branch {
		  DstBlock		  "Relational\noperator"
		  DstPort		  1
		}
	      }
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [350, 35, 370, 55]
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_2"
	  Position		  [140, 215, 160, 235]
	  Port			  "2"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "valve\nsetting\n(hot)"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "flow rate\n(hot)"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "valve\nsetting\n(hot)"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "flow rate\n(hot)"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "temp (hot)"
	  SrcPort		  1
	  DstBlock		  "out_2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "max flow\nconstant"
	  SrcPort		  1
	  Points		  [35, 0; 0, -45]
	  DstBlock		  "max\nflow"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "max flow\nvariation"
	  SrcPort		  1
	  DstBlock		  "max\nflow"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "max\nflow"
	  SrcPort		  1
	  Points		  [15, 0; 0, -65]
	  DstBlock		  "Mux"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      Fcn
      Name		      "temp"
      Position		      [300, 160, 340, 180]
      Expr		      "(u(1)*u(2) + u(3)*u(4))/(u(1)+u(3))"
    }
    Block {
      BlockType		      Sum
      Name		      "temp\nerror"
      Ports		      [2, 1]
      Position		      [445, 165, 465, 185]
      Inputs		      "+-"
    }
    Block {
      BlockType		      SubSystem
      Name		      "temp\nsetpoint"
      Ports		      [0, 1]
      Position		      [440, 214, 470, 246]
      Orientation	      "left"
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      System {
	Name			"temp\nsetpoint"
	Location		[586, 460, 820, 697]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Sum
	  Name			  "flow"
	  Ports			  [2, 1]
	  Position		  [120, 30, 140, 50]
	}
	Block {
	  BlockType		  Constant
	  Name			  "temp\nsetpoint"
	  Position		  [40, 21, 75, 49]
	  Value			  "23"
	}
	Block {
	  BlockType		  SignalGenerator
	  Name			  "temp\nvariation"
	  Position		  [40, 93, 85, 127]
	  WaveForm		  "square"
	  Amplitude		  "4.000000"
	  Frequency		  "0.214320"
	  Units			  "rad/sec"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [170, 30, 190, 50]
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "flow"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "temp\nvariation"
	  SrcPort		  1
	  Points		  [5, 0; 0, -65]
	  DstBlock		  "flow"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "temp\nsetpoint"
	  SrcPort		  1
	  DstBlock		  "flow"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "cold water\nvalve"
      SrcPort		      1
      Points		      [5, 0; 0, -25]
      DstBlock		      "Mux2"
      DstPort		      3
    }
    Line {
      SrcBlock		      "hot water\nvalve"
      SrcPort		      1
      Points		      [25, 0]
      DstBlock		      "Mux2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "hot water\nvalve"
      SrcPort		      2
      Points		      [5, 0; 0, 20]
      DstBlock		      "Mux2"
      DstPort		      2
    }
    Line {
      SrcBlock		      "cold water\nvalve"
      SrcPort		      2
      Points		      [25, 0]
      DstBlock		      "Mux2"
      DstPort		      4
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      1
      Points		      [-35, 0; 0, -80]
      DstBlock		      "cold water\nvalve"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      2
      Points		      [-45, 0; 0, -175]
      DstBlock		      "hot water\nvalve"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux3"
      SrcPort		      1
      DstBlock		      "Fuzzy Logic\nController"
      DstPort		      1
    }
    Line {
      SrcBlock		      "temp\nerror"
      SrcPort		      1
      Points		      [10, 0; 0, 100]
      DstBlock		      "Mux3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "flow\nerror"
      SrcPort		      1
      Points		      [20, 0; 0, 170]
      DstBlock		      "Mux3"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Fuzzy Logic\nController"
      SrcPort		      1
      DstBlock		      "Demux"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux2"
      SrcPort		      1
      Points		      [65, 0]
      Branch {
	Points			[0, -20]
	DstBlock		"flow rate"
	DstPort			1
      }
      Branch {
	Points			[0, 20]
	DstBlock		"temp"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "temp"
      SrcPort		      1
      Points		      [50, 0]
      Branch {
	DstBlock		"temp\nerror"
	DstPort			1
      }
      Branch {
	Points			[0, 155; 165, 0; 0, -50]
	DstBlock		"Zero-Order\nHold4"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "temp\nsetpoint"
      SrcPort		      1
      Points		      [-25, 0]
      Branch {
	Points			[0, -50]
	DstBlock		"temp\nerror"
	DstPort			2
      }
      Branch {
	Points			[0, 85; 140, 0; 0, -80]
	DstBlock		"Zero-Order\nHold3"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "flow rate"
      SrcPort		      1
      Points		      [50, 0]
      Branch {
	DstBlock		"flow\nerror"
	DstPort			2
      }
      Branch {
	Points			[0, -110; 155, 0; 0, 185]
	DstBlock		"Zero-Order\nHold2"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "flow\nsetpoint"
      SrcPort		      1
      Points		      [-25, 0]
      Branch {
	Points			[0, 55]
	DstBlock		"flow\nerror"
	DstPort			1
      }
      Branch {
	Points			[0, -35; 150, 0]
	DstBlock		"Zero-Order\nHold1"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Zero-Order\nHold1"
      SrcPort		      1
      DstBlock		      "Mux"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Zero-Order\nHold2"
      SrcPort		      1
      DstBlock		      "Mux"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Zero-Order\nHold3"
      SrcPort		      1
      DstBlock		      "Mux4"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Zero-Order\nHold4"
      SrcPort		      1
      DstBlock		      "Mux4"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux4"
      SrcPort		      1
      DstBlock		      "Scope1"
      DstPort		      1
    }
    Annotation {
      Name		      "Simulation parameters:\nSolver: ODE1 (Euler)  -"
">  60 ms cycle time\nFixed Step size: 120 ms\nUpload: every 480 ms   (= DISCA"
"RDING FACTOR : 4)"
      Position		      [36, 37]
      HorizontalAlignment     "left"
    }
  }
}

⌨️ 快捷键说明

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