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

📄 s3.mdl

📁 simulink electrical machine(2)
💻 MDL
📖 第 1 页 / 共 5 页
字号:
Model {
  Name			  "s3"
  Version		  2.00
  SimParamPage		  Solver
  SampleTimeColors	  off
  WideVectorLines	  off
  PaperOrientation	  landscape
  StartTime		  "0.0"
  StopTime		  "tstop"
  Solver		  ode15s
  RelTol		  "1e-6"
  AbsTol		  "1e-6"
  Refine		  "1"
  MaxStep		  "1e-3"
  InitialStep		  "auto"
  FixedStep		  "auto"
  MaxOrder		  5
  OutputOption		  RefineOutputTimes
  OutputTimes		  "[]"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  SaveTime		  off
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  off
  OutputSaveName	  "yout"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  LimitMaxRows		  off
  MaxRows		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  warning
  MinStepSizeMsg	  warning
  UnconnectedInputMsg	  warning
  UnconnectedOutputMsg	  warning
  UnconnectedLineMsg	  warning
  ConsistencyChecking	  off
  ZeroCross		  on
  BlockDefaults {
    Orientation		    right
    ForegroundColor	    black
    BackgroundColor	    white
    DropShadow		    off
    NamePlacement	    normal
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    normal
    FontAngle		    normal
    ShowName		    on
  }
  AnnotationDefaults {
    HorizontalAlignment	    center
    VerticalAlignment	    middle
    ForegroundColor	    black
    BackgroundColor	    white
    DropShadow		    off
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    normal
    FontAngle		    normal
  }
  System {
    Name		    "s3"
    Location		    [-7, 35, 797, 568]
    Open		    on
    ScreenColor		    white
    Block {
      BlockType		      Gain
      Name		      "2/P"
      Position		      [300, 356, 350, 394]
      Orientation	      left
      Gain		      "2/P"
    }
    Block {
      BlockType		      Clock
      Name		      "Clock"
      Position		      [155, 115, 175, 135]
      Orientation	      up
      DeleteFcn		      "simclock BlockIsBeingDestroyed"
      PostSaveFcn	      "simclock Save"
      Location		      [30, 40, 140, 75]
    }
    Block {
      BlockType		      Lookup
      Name		      "Field\nWeakening"
      Position		      [95, 272, 135, 308]
      InputValues	      "speed"
      OutputValues	      "lambdadre"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Field_Orient"
      Position		      [185, 168, 225, 267]
      ShowPortLabels	      off
      System {
	Name			"Field_Orient"
	Location		[56, 163, 734, 499]
	Open			off
	ScreenColor		white
	Block {
	  BlockType		  Inport
	  Name			  "Tem*"
	  Position		  [35, 55, 55, 75]
	  Port			  "1"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Inport
	  Name			  "lambdadre"
	  Position		  [35, 130, 55, 150]
	  Port			  "2"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Inport
	  Name			  "thetar"
	  Position		  [35, 255, 55, 275]
	  Port			  "3"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Derivative
	  Name			  "Derivative"
	  Position		  [120, 130, 150, 150]
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [450, 193, 520, 217]
	  Expr			  "cos(u[1])"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [450, 253, 520, 277]
	  Expr			  "sin(u[1])"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Position		  [135, 55, 160, 90]
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux1"
	  Position		  [450, 89, 480, 116]
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux2"
	  Position		  [180, 111, 200, 149]
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "ids^e"
	  Position		  [230, 111, 405, 149]
	  Expr			  "(xr*u[2]+rpr*wb*u[1])/(rpr*xm)"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "iqs^e"
	  Position		  [220, 59, 405, 91]
	  Expr			  "(4/(3*P))*u[1]*xr/(xm*u[2])"
	}
	Block {
	  BlockType		  Sum
	  Name			  "rho"
	  Position		  [400, 237, 415, 273]
	  Inputs		  "++"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "theta2"
	  Position		  [325, 194, 360, 226]
	  ExternalReset		  none
	  InitialConditionSource  internal
	  InitialCondition	  "0"
	  LimitOutput		  off
	  UpperSaturationLimit	  "inf"
	  LowerSaturationLimit	  "-inf"
	  ShowSaturationPort	  off
	  ShowStatePort		  off
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "we-wr"
	  Position		  [105, 192, 275, 228]
	  Expr			  "(rpr*wb/xr)*(u[1]/u[2])"
	}
	Block {
	  BlockType		  Outport
	  Name			  "iqs^e*"
	  Position		  [560, 65, 580, 85]
	  Port			  "1"
	  OutputWhenDisabled	  held
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "ids^e*"
	  Position		  [560, 120, 580, 140]
	  Port			  "2"
	  OutputWhenDisabled	  held
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "cos_rho"
	  Position		  [560, 195, 580, 215]
	  Port			  "3"
	  OutputWhenDisabled	  held
	  InitialOutput		  "0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "sin_rho"
	  Position		  [560, 255, 580, 275]
	  Port			  "4"
	  OutputWhenDisabled	  held
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "ids^e"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    Points		    [25, 0]
	    DstBlock		    "Mux1"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "ids^e*"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Mux2"
	  SrcPort		  1
	  DstBlock		  "ids^e"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "lambdadre"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    Points		    [30, 0; 0, -20]
	    DstBlock		    "Mux2"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [30, 0; 0, -60]
	    DstBlock		    "Mux"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Derivative"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Fcn1"
	  SrcPort		  1
	  DstBlock		  "sin_rho"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "thetar"
	  SrcPort		  1
	  DstBlock		  "rho"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Fcn"
	  SrcPort		  1
	  DstBlock		  "cos_rho"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "iqs^e"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    DstBlock		    "iqs^e*"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [25, 0]
	    DstBlock		    "Mux1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Tem*"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "iqs^e"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux1"
	  SrcPort		  1
	  Points		  [20, 0; 0, 65; -425, 0; 0, 40]
	  DstBlock		  "we-wr"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "we-wr"
	  SrcPort		  1
	  DstBlock		  "theta2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "theta2"
	  SrcPort		  1
	  Points		  [10, 0; 0, 35]
	  DstBlock		  "rho"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "rho"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    Points		    [10, 0; 0, -50]
	    DstBlock		    "Fcn"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [10, 0; 0, 10]
	    DstBlock		    "Fcn1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Derivative"
	  SrcPort		  1
	  DstBlock		  "Mux2"
	  DstPort		  2
	}
	Annotation {
	  Position		  [297, 197]
	  VerticalAlignment	  top
	  Text			  "w2"
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "m3"
      Position		      [650, 24, 718, 58]
      DropShadow	      on
      OpenFcn		      "m3"
      ShowPortLabels	      off
      MaskType		      "Masked block of m3.m"
      MaskHelp		      "Uses m3.m to initialize and plot"
      MaskDisplay	      "disp('Initialize\\nand plot')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      off
      MaskIconUnits	      autoscale
      System {
	Name			"m3"
	Location		[575, 32767, 765, 32767]
	Open			off
	ScreenColor		white
	Annotation {
	  Position		  [107, 47]
	  VerticalAlignment	  top
	  Text			  "Masked block of m3.m to initialize s3.m\nand"
				  " plot results of the simulation"
	}
      }
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Position		      [123, 75, 717, 85]
      Orientation	      up
      Inputs		      "7"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux1"
      Position		      [675, 275, 695, 315]
      Inputs		      "2"
    }
    Block {
      BlockType		      Fcn
      Name		      "Rotor flux \nmagnitude"
      Position		      [735, 382, 830, 408]
      Expr		      "sqrt(u[1]*u[1]+u[2]*u[2])"
    }
    Block {
      BlockType		      Sum
      Name		      "Sa"
      Position		      [370, 155, 390, 175]
      Inputs		      "-+"
    }
    Block {
      BlockType		      Sum
      Name		      "Sa1"
      Position		      [370, 205, 390, 225]
      Inputs		      "-+"
    }
    Block {
      BlockType		      Sum
      Name		      "Sa2"
      Position		      [370, 255, 390, 275]
      Inputs		      "-+"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Position		      [540, 33, 560, 57]
      Floating		      off
      Location		      [5, 432, 817, 594]
      Open		      on
      Grid		      on
      TickLabels	      on
      ZoomMode		      yonly
      TimeRange		      "2"
      YMin		      "-200"
      YMax		      "200"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitMaxRows	      off
      MaxRows		      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Selector
      Name		      "Selector"
      Position		      [450, 35, 500, 55]
      Elements		      "[3 4 5 6 7]"
      InputPortWidth	      "7"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Position		      [805, 175, 820, 235]
      Inputs		      "+++"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Position		      [60, 168, 75, 197]
      Inputs		      "+-"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Tmech"
      Position		      [490, 302, 520, 318]
      ShowPortLabels	      on
      MaskType		      "Repeating table"
      MaskDescription	      "Repeating table."
      MaskHelp		      "Repeats cycle given in table. Time values "
			      "should be monotonically increasing."
      MaskPromptString	      "Time values:|Output values:"
      MaskStyleString	      "edit,edit"
      MaskVariables	      "rep_seq_t=@1;rep_seq_y=@2;"
      MaskInitialization      "period = max(rep_seq_t);\n"
      MaskDisplay	      "plot([rep_seq_t,rep_seq_t+period,rep_seq_t+2*per"
			      "iod,rep_seq_t(1)+3*period],[rep_seq_y,rep_seq_y,"
			      "rep_seq_y,rep_seq_y(1)])"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      off
      MaskIconUnits	      autoscale
      MaskValueString	      "time_tmech|tmech_tmech"
      System {
	Name			"Tmech"
	Location		[382, 166, 692, 322]
	Open			off
	ScreenColor		white
	Block {
	  BlockType		  Clock
	  Name			  "Clock"
	  Position		  [45, 60, 65, 80]
	  DeleteFcn		  "simclock BlockIsBeingDestroyed"
	  PostSaveFcn		  "simclock Save"
	  Location		  [30, 40, 110, 80]
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [110, 60, 150, 80]
	  Expr			  "rem(u[1],period)"
	}
	Block {
	  BlockType		  Lookup
	  Name			  "Look-Up Table"
	  Position		  [210, 58, 250, 82]
	  InputValues		  "rep_seq_t"
	  OutputValues		  "rep_seq_y"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [285, 60, 305, 80]
	  Port			  "1"
	  OutputWhenDisabled	  held
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Look-Up Table"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Clock"
	  SrcPort		  1
	  DstBlock		  "Fcn1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fcn1"
	  SrcPort		  1
	  DstBlock		  "Look-Up Table"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace"
      Position		      [305, 37, 355, 53]
      Orientation	      left
      VariableName	      "y"
      Buffer		      "40000"
      Decimation	      "1"
      SampleTime	      "0"
    }
    Block {
      BlockType		      TransferFcn
      Name		      "Torque\nController"
      Position		      [90, 166, 145, 204]
      Numerator		      "[30 7]"
      Denominator	      "[1 0]"
    }
    Block {
      BlockType		      SubSystem
      Name		      "abc2qds"
      Position		      [485, 176, 530, 279]
      ShowPortLabels	      off
      System {
	Name			"abc2qds"
	Location		[73, 84, 637, 421]
	Open			off
	ScreenColor		white
	Block {
	  BlockType		  Inport
	  Name			  "vag"
	  Position		  [40, 100, 60, 120]
	  Port			  "1"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Inport
	  Name			  "vbg"
	  Position		  [40, 160, 60, 180]
	  Port			  "2"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {

⌨️ 快捷键说明

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