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

📄 backvalve.mdl

📁 amesim和matlab simulink联合仿真设置方法及多个精彩例程
💻 MDL
📖 第 1 页 / 共 2 页
字号:
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      OutDataTypeMode	      "Inherit from 'Constant value'"
      OutDataType	      "sfix(16)"
      ConRadixGroup	      "Use specified scaling"
      OutScaling	      "2^0"
      SampleTime	      "inf"
    }
    Block {
      BlockType		      DiscreteIntegrator
      IntegratorMethod	      "Integration: Forward Euler"
      gainval		      "1.0"
      ExternalReset	      "none"
      InitialConditionSource  "internal"
      InitialCondition	      "0"
      InitialConditionMode    "State and output"
      SampleTime	      "1"
      OutDataTypeMode	      "Inherit via internal rule"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	off
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
    }
    Block {
      BlockType		      DiscreteTransferFcn
      Numerator		      "[1]"
      Denominator	      "[1 0.5]"
      SampleTime	      "1"
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
      Realization	      "auto"
    }
    Block {
      BlockType		      Gain
      Gain		      "1"
      Multiplication	      "Element-wise(K.*u)"
      ParameterDataTypeMode   "Same as input"
      ParameterDataType	      "sfix(16)"
      ParameterScalingMode    "Best Precision: Matrix-wise"
      ParameterScaling	      "2^0"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Inport
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      Interpolate	      on
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Saturate
      UpperLimit	      "0.5"
      LowerLimit	      "-0.5"
      LinearizeAsGain	      on
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Scope
      Floating		      off
      ModelBased	      off
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-5"
      YMax		      "5"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitDataPoints	      on
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      PortCounts	      "[]"
      SFunctionModules	      "''"
    }
    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"
    }
  }
  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		    "backvalve"
    Location		    [0, 62, 1012, 701]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "A4"
    PaperUnits		    "centimeters"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Constant
      Name		      "Constant"
      Position		      [30, 180, 60, 210]
      Value		      "5"
    }
    Block {
      BlockType		      Reference
      Name		      "Discrete\nPID Controller"
      Ports		      [1, 1]
      Position		      [210, 172, 255, 218]
      SourceBlock	      "powerlib_extras/Discrete \nControl Blocks/Discr"
"ete\nPID Controller"
      SourceType	      "Discrete PID Controller"
      ShowPortLabels	      on
      Kp		      "500"
      Ki		      "0"
      Kd		      "5"
      TcD		      "0.5"
      Par_Limits	      "[1e6 -1e6]"
      Init		      "0"
      Ts		      "50e-3"
    }
    Block {
      BlockType		      Gain
      Name		      "Gain"
      Position		      [320, 225, 350, 255]
      Gain		      "-0.001"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      "S-Function"
      Name		      "S-Function"
      Ports		      [2, 1]
      Position		      [460, 153, 600, 237]
      InitFcn		      "clear backvalve_"
      StopFcn		      "clear backvalve_"
      FunctionName	      "backvalve_"
      Parameters	      "1 0.1"
      MaskDisplay	      "port_label('output',1,'PRE');port_label('input'"
",1,'MOT');port_label('input',2,'VALVE');disp('AMESim:\\n backvalve_')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation1"
      Position		      [385, 225, 415, 255]
      UpperLimit	      "1"
      LowerLimit	      "0"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation2"
      Position		      [360, 145, 390, 175]
      UpperLimit	      "700"
      LowerLimit	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [1]
      Position		      [825, 179, 855, 211]
      Location		      [1, 50, 1025, 737]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope1"
      Ports		      [1]
      Position		      [205, 264, 235, 296]
      Location		      [1, 50, 1025, 737]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      SaveName		      "ScopeData1"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope2"
      Ports		      [1]
      Position		      [445, 89, 475, 121]
      Location		      [107, 200, 431, 427]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      SaveName		      "ScopeData2"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope3"
      Ports		      [1]
      Position		      [640, 99, 670, 131]
      Location		      [275, 382, 599, 621]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      SaveName		      "ScopeData3"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Ports		      [2, 1]
      Position		      [115, 167, 140, 223]
      ShowName		      off
      Inputs		      "|+-"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Line {
      SrcBlock		      "Constant"
      SrcPort		      1
      DstBlock		      "Sum1"
      DstPort		      1
    }
    Line {
      Labels		      [0, 0]
      SrcBlock		      "Sum1"
      SrcPort		      1
      Points		      [0, 0; 25, 0]
      Branch {
	DstBlock		"Discrete\nPID Controller"
	DstPort			1
      }
      Branch {
	Points			[0, 85]
	DstBlock		"Scope1"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Discrete\nPID Controller"
      SrcPort		      1
      Points		      [35, 0]
      Branch {
	Points			[50, 0]
	DstBlock		"Saturation2"
	DstPort			1
      }
      Branch {
	Points			[0, 45]
	DstBlock		"Gain"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Saturation2"
      SrcPort		      1
      Points		      [25, 0]
      Branch {
	Points			[0, -55]
	DstBlock		"Scope2"
	DstPort			1
      }
      Branch {
	Points			[0, 15]
	DstBlock		"S-Function"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "S-Function"
      SrcPort		      1
      Points		      [20, 0]
      Branch {
	DstBlock		"Scope3"
	DstPort			1
      }
      Branch {
	Points			[165, 0]
	Branch {
	  DstBlock		  "Scope"
	  DstPort		  1
	}
	Branch {
	  Labels		  [1, 0]
	  Points		  [0, 165; -620, 0; 0, -145]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
      }
    }
    Line {
      SrcBlock		      "Gain"
      SrcPort		      1
      DstBlock		      "Saturation1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Saturation1"
      SrcPort		      1
      Points		      [10, 0; 0, -25]
      DstBlock		      "S-Function"
      DstPort		      2
    }
  }
}

⌨️ 快捷键说明

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