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

📄 fuzzypidcontroller.mdl

📁 SIMULINK仿真中做了模糊控制自整定PID控制器和常规PID控制器对同一个一阶惯性环节的控制仿真
💻 MDL
📖 第 1 页 / 共 3 页
字号:
      LinearizePole	      "inf"
    }
    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
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      LatchByDelayingOutsideSignal off
      LatchByCopyingInsideSignal off
      Interpolate	      on
    }
    Block {
      BlockType		      Integrator
      ExternalReset	      "none"
      InitialConditionSource  "internal"
      InitialCondition	      "0"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
      IgnoreLimit	      off
      ZeroCross		      on
    }
    Block {
      BlockType		      Mux
      Inputs		      "4"
      DisplayOption	      "none"
      UseBusObject	      off
      BusObject		      "BusObject"
      NonVirtualBus	      off
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      UseBusObject	      off
      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		      Product
      Inputs		      "2"
      Multiplication	      "Element-wise(.*)"
      InputSameDT	      on
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Zero"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Scope
      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	      "-1"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
    }
    Block {
      BlockType		      Step
      Time		      "1"
      Before		      "0"
      After		      "1"
      SampleTime	      "-1"
      VectorParams1D	      on
      ZeroCross		      on
    }
    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		      ToWorkspace
      VariableName	      "simulink_output"
      MaxDataPoints	      "1000"
      Decimation	      "1"
      SampleTime	      "0"
      FixptAsFi		      off
    }
    Block {
      BlockType		      TransferFcn
      Numerator		      "[1]"
      Denominator	      "[1 2 1]"
      AbsoluteTolerance	      "auto"
      Realization	      "auto"
    }
    Block {
      BlockType		      TransportDelay
      DelayTime		      "1"
      InitialOutput	      "0"
      BufferSize	      "1024"
      FixedBuffer	      off
      TransDelayFeedthrough   off
      PadeOrder		      "0"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  LineDefaults {
    FontName		    "arial"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "FuzzyPIDcontroller"
    Location		    [156, 348, 950, 641]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "A4"
    PaperUnits		    "centimeters"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Demux
      Name		      "Demux"
      Ports		      [1, 3]
      Position		      [415, 71, 420, 109]
      BackgroundColor	      "black"
      ShowName		      off
      Outputs		      "3"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Derivative
      Name		      "Derivative"
      Position		      [165, 95, 195, 125]
    }
    Block {
      BlockType		      Reference
      Name		      "Fuzzy Logic \nController"
      Ports		      [1, 1]
      Position		      [320, 66, 380, 114]
      SourceBlock	      "fuzblock/Fuzzy Logic \nController"
      SourceType	      "FIS"
      ShowPortLabels	      on
      fis		      "Gas_supply"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Fuzzy-PID controller"
      Ports		      [4, 1]
      Position		      [455, 35, 495, 125]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskHideContents	      off
      System {
	Name			"Fuzzy-PID controller"
	Location		[540, 367, 965, 598]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "e"
	  Position		  [25, 113, 55, 127]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "Kp"
	  Position		  [110, 73, 140, 87]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "Ki"
	  Position		  [175, 188, 205, 202]
	  Port			  "3"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "Kd"
	  Position		  [180, 23, 210, 37]
	  Port			  "4"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Add"
	  Ports			  [3, 1]
	  Position		  [315, 92, 345, 128]
	  Inputs		  "+++"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Derivative
	  Name			  "Derivative"
	  Position		  [170, 55, 200, 85]
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [115, 105, 145, 135]
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  Ports			  [1, 1]
	  Position		  [170, 135, 200, 165]
	  IgnoreLimit		  off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [240, 47, 270, 78]
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product1"
	  Ports			  [2, 1]
	  Position		  [240, 97, 270, 128]
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product2"
	  Ports			  [2, 1]
	  Position		  [240, 142, 270, 173]
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Outport
	  Name			  "u"
	  Position		  [370, 103, 400, 117]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Derivative"
	  SrcPort		  1
	  Points		  [0, 0]
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Integrator"
	  SrcPort		  1
	  Points		  [0, 0]
	  DstBlock		  "Product2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product1"
	  SrcPort		  1
	  Points		  [0, -5]
	  DstBlock		  "Add"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  Points		  [10, 0; 0, 35]
	  DstBlock		  "Add"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product2"
	  SrcPort		  1
	  Points		  [10, 0; 0, -40]
	  DstBlock		  "Add"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Kp"
	  SrcPort		  1
	  Points		  [0, 25]
	  DstBlock		  "Product1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Kd"
	  SrcPort		  1
	  Points		  [0, 25]
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Ki"
	  SrcPort		  1
	  Points		  [15, 0]
	  DstBlock		  "Product2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  Points		  [0, 0]
	  DstBlock		  "Product1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "e"
	  SrcPort		  1
	  Points		  [0, 0; 15, 0]
	  Branch {
	    DstBlock		    "Gain1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -50]
	    DstBlock		    "Derivative"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 30]
	    DstBlock		    "Integrator"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Add"
	  SrcPort		  1
	  Points		  [0, 0]
	  DstBlock		  "u"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Gain
      Name		      "Gain"
      Position		      [170, 35, 200, 65]
      Gain		      "2"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
      Port {
	PortNumber		1
	Name			"e"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
    }
    Block {
      BlockType		      Gain
      Name		      "Gain1"
      Position		      [225, 95, 255, 125]
      Gain		      "0.5"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"

⌨️ 快捷键说明

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