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

📄 xhblock1.mdl

📁 信号实验常用的simulink模型和mfile,可直接在matlan下运行。
💻 MDL
字号:
Model {
  Name			  "xhblock1"
  Version		  2.20
  SimParamPage		  Solver
  SampleTimeColors	  off
  InvariantConstants	  off
  WideVectorLines	  off
  ShowLineWidths	  off
  StartTime		  "0.0"
  StopTime		  "10.0"
  Solver		  ode45
  RelTol		  "1e-3"
  AbsTol		  "1e-6"
  Refine		  "1"
  MaxStep		  "auto"
  InitialStep		  "auto"
  FixedStep		  "auto"
  MaxOrder		  5
  OutputOption		  RefineOutputTimes
  OutputTimes		  "[]"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  SaveTime		  on
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  on
  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
  SimulationMode	  normal
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWPlaceOutputsASAP	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  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
  }
  LineDefaults {
    FontName		    "Helvetica"
    FontSize		    9
    FontWeight		    normal
    FontAngle		    normal
  }
  System {
    Name		    "xhblock1"
    Location		    [104, 80, 741, 502]
    Open		    on
    ToolBar		    on
    StatusBar		    on
    ScreenColor		    white
    PaperOrientation	    landscape
    PaperPositionMode	    auto
    PaperType		    usletter
    PaperUnits		    inches
    Block {
      BlockType		      Product
      Name		      "乘法器"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [105, 159, 140, 201]
      FontName		      "宋体, 159, 1"
      FontSize		      12
      Inputs		      "2"
    }
    Block {
      BlockType		      TransferFcn
      Name		      "单元1"
      Position		      [100, 249, 165, 291]
      DropShadow	      on
      FontName		      "宋体, 249, 1"
      FontSize		      12
      Numerator		      "[1]"
      Denominator	      "[R*C 1]"
      MaskType		      "积分 1],, 2065, 291]"
      MaskDescription	      "积分 1],, 2065, 291]"
      MaskPromptString	      "电容量(法):|电阻值(欧姆):0],[0,0],[-50,50"
"],[-40,0],[-30"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskInitialization      "C=@1;R=@2;"
      MaskDisplay	      "plot([0 2 2 2],[2 2 1.5 2.5],[2 6],[2.5 2.5],[2"
" 6],[1.5 1.5],[6 6],[2.5 1.5],[6 11],[2 2],[8 8 6 10],[2 0 0 0],[6 10],[-1 -1"
"],[8 8 7 9],[-1 -3 -3 -3]);"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      MaskValueString	      "1|1"
    }
    Block {
      BlockType		      TransferFcn
      Name		      "单元2"
      Position		      [230, 248, 295, 292]
      DropShadow	      on
      FontName		      "宋体, 248, 2"
      FontSize		      12
      Numerator		      "[R*C 0]"
      Denominator	      "[R*C 1]"
      MaskType		      "微分 1]3, 1995, 292]"
      MaskDescription	      "微分 1]3, 1995, 292]"
      MaskPromptString	      "电容量(法):|电阻值(欧姆): 6],[2.5 2.5],[2"
" 6],[1.5 1.5],[6 6],[2.5 1.5],[6 11],[2 2],[8 8 6 10],[2 0 0 0],[6 10],[-1 -1"
"],[8 8 7 9],[-1 -3 -3 -3]);"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskInitialization      "C=@1;R=@2;"
      MaskDisplay	      "plot([0 2 2 2],[2 2 0 4],[3 3 3 8],[0 4 2 2],[6"
" 6 5.5 6.5],[2 0 0 0],[5.5 5.5],[0 -4],[6.5 6.5],[0 -4],[5.5 6.5 6 6],[-4 -4 "
"-4 -5.5],[5.5 6.5],[-5.5 -5.5]);"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      MaskValueString	      "1|1"
    }
    Block {
      BlockType		      TransferFcn
      Name		      "单元3"
      Position		      [370, 245, 490, 295]
      DropShadow	      on
      FontName		      "宋体, 245, 4"
      FontSize		      12
      Numerator		      "[1]"
      Denominator	      "[L*C R*C 1]"
      MaskType		      " 单元7*C 1]65,, 295]0 "
      MaskDescription	      " 单元7*C 1]65,, 295]0 "
      MaskPromptString	      "电阻值(欧):|电感值(亨):|电容值(法):],["
"-1 -1],[8 8 7 9],[-1 -4 -4 -4],[12.5 12 2],[8 8 6 10],[2 0 0 0],[6 10],[-1 -1"
"],[85.5],[5.5 6.5],[-5.5 -5.5]);"
      MaskStyleString	      "edit,edit,edit"
      MaskTunableValueString  "on,on,on"
      MaskInitialization      "R=@1;L=@2;C=@3;"
      MaskDisplay	      "plot([3 5 5 5],[2 2 1.5 2.5],[5 9],[2.5 2.5],[5"
" 9],[1.5 1.5],[9 9],[2.5 1.5],[9 11],[2 2],[11:1/7:12],[2 2.5 2.707 2.866 2.8"
"66 2.707 2.5 2],[12:1/7:13],[2 2.5 2.707 2.866 2.866 2.707 2.5 2],[13:1/7:14]"
",[2 2.5 2.707 2.866 2.866 2.707 2.5 2],[14:1/7:15],[2 2.5 2.707 2.866 2.866 2"
".707 2.5 2],[15 21],[2 2],[18 18 16 20],[2 0 0 0],[16 20],[-1 -1],[18 18 17 1"
"9],[-1 -3 -3 -3]);"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      MaskValueString	      "1|1|1"
    }
    Block {
      BlockType		      TransferFcn
      Name		      "单元4"
      Position		      [235, 339, 405, 391]
      DropShadow	      on
      FontName		      "宋体, 339, 4"
      FontSize		      12
      Numerator		      "[1]"
      Denominator	      "[L*C1*C2*R L*C2 R*(C1+C2) 1]"
      MaskType		      "单元5*C2*R L*C2 R*(C1"
      MaskDescription	      "单元5*C2*R L*C2 R*(C1"
      MaskPromptString	      "电阻R(欧):|电容C1(法):|电感L(亨):|电容"
"C2(法): 1.5 1],[2:1/7:3],[1 1.5 1.707 1.866 1.866 1.707 1.5 1],[3:1/7:4],["
"1 1.5 1.707 1.866 1.866 1.7072 2.5 2.707 2.866 2.866 2.707 2.5 2],[13:1/7:14]"
",[2 2.5 2.707 2.866 2.866 2.707 2.5 2],[14:1/7:1"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskInitialization      "R=@1;C1=@2;L=@3;C2=@4;"
      MaskDisplay	      "plot([0 2 2 2],[2 2 1.5 2.5],[2 6],[2.5 2.5],[2"
" 6],[1.5 1.5],[6 6],[2.5 1.5],[6 11],[2 2],[8 8 6 10],[2 0 0 0],[6 10],[-1 -1"
"],[8 8 7 9],[-1 -3 -3 -3],[11:1/7:12],[2 2.5 2.707 2.866 2.866 2.707 2.5 2],["
"12:1/7:13],[2 2.5 2.707 2.866 2.866 2.707 2.5 2],[13:1/7:14],[2 2.5 2.707 2.8"
"66 2.866 2.707 2.5 2],[14:1/7:15],[2 2.5 2.707 2.866 2.866 2.707 2.5 2],[15 2"
"1],[2 2],[18 18 16 20],[2 0 0 0],[16 20],[-1 -1],[18 18 17 19],[-1 -3 -3 -3])"
";disp('R     C1     L      C2')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      MaskValueString	      "1|1|1|1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "方波信号"
      Ports		      [0, 1, 0, 0, 0]
      Position		      [305, 89, 345, 131]
      FontName		      "宋体, 89, 34"
      FontSize		      12
      ShowPortLabels	      off
      MaskType		      "Pulse Generator"
      MaskDescription	      "Pulse Generator."
      MaskHelp		      "Pulse generator which ensures pulse\\ntransitio"
"ns are hit. Provides a vector of pulses when the height is entered as a vecto"
"r.\\nUnmask to see how it works."
      MaskPromptString	      "Pulse period (secs):|Pulse width:|Pulse height:"
"|Pulse start time:"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskInitialization      "Ts=@1; du=@2; ht=@3; stt=@4; ini=ones(length(ht"
"),1); st1=rem(stt,Ts); st2=rem(stt+du,Ts);if(Ts<=1.2*du),ini=zeros(length(ht)"
",1);end;"
      MaskDisplay	      "plot(0,0,100,100,[90,75,75,60,60,35,35,20,20,10"
"],[20,20,80,80,20,20,80,80,20,20])"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      MaskValueString	      "20|20|1|1"
      System {
	Name			"方波信号"
	Location		[158, 441, 759, 682]
	Open			off
	ToolBar			off
	StatusBar		off
	ScreenColor		white
	PaperOrientation	landscape
	PaperPositionMode	auto
	PaperType		usletter
	PaperUnits		inches
	Block {
	  BlockType		  Clock
	  Name			  "Clock1"
	  Position		  [295, 100, 315, 120]
	  ShowName		  off
	  Location		  [30, 40, 140, 75]
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [25, 30, 45, 50]
	  Value			  "1"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [295, 149, 320, 171]
	  Value			  "stt"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [510, 102, 535, 128]
	  ShowName		  off
	  Gain			  "ht"
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [285, 38, 315, 62]
	  Operator		  XOR
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator1"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [355, 38, 385, 62]
	  Operator		  NOT
	  Inputs		  "1"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [455, 105, 480, 125]
	  ShowName		  off
	  Inputs		  "2"
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\noperator"
	  Position		  [370, 102, 400, 133]
	  ShowName		  off
	  Operator		  ">="
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [135, 35, 155, 55]
	  ShowName		  off
	  Inputs		  "+-"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [130, 120, 150, 140]
	  ShowName		  off
	  Inputs		  "+-"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay"
	  Position		  [145, 75, 195, 95]
	  Orientation		  left
	  X0			  "0"
	  SampleTime		  "[Ts,st1]"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay1"
	  Position		  [140, 165, 190, 185]
	  Orientation		  left
	  X0			  "ini"
	  SampleTime		  "[Ts,st2]"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [560, 105, 580, 125]
	  ShowName		  off
	  Port			  "1"
	  OutputWhenDisabled	  held
	  InitialOutput		  "[]"
	}
	Line {
	  SrcBlock		  "Logical\nOperator1"
	  SrcPort		  1
	  Points		  [40, 0; 0, 60]
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Logical\nOperator"
	  SrcPort		  1
	  DstBlock		  "Logical\nOperator1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant1"
	  SrcPort		  1
	  Points		  [20, 0; 0, -35]
	  DstBlock		  "Relational\noperator"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Gain"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Relational\noperator"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Clock1"
	  SrcPort		  1
	  DstBlock		  "Relational\noperator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Unit Delay"
	  SrcPort		  1
	  Points		  [-35, 0; 0, -35]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    Points		    [70, 0; 0, 40]
	    DstBlock		    "Unit Delay"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Logical\nOperator"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    DstBlock		    "Sum"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [20, 0; 0, 85]
	    DstBlock		    "Sum1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    Points		    [55, 0; 0, 45]
	    DstBlock		    "Unit Delay1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [90, 0; 0, -75]
	    DstBlock		    "Logical\nOperator"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Unit Delay1"
	  SrcPort		  1
	  Points		  [-35, 0; 0, -40]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      Gain
      Name		      "放大器"
      Position		      [255, 163, 300, 197]
      FontName		      "宋体, 163, 3"
      FontSize		      12
      Gain		      "1"
    }
    Block {
      BlockType		      Integrator
      Name		      "积分器"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [405, 166, 440, 204]
      FontName		      "宋体, 166, 4"
      FontSize		      12
      ExternalReset	      none
      InitialConditionSource  internal
      InitialCondition	      "0"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
    }
    Block {
      BlockType		      Sum
      Name		      "加法器"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [180, 159, 220, 201]
      FontName		      "宋体, 159, 2"
      FontSize		      12
      Inputs		      "++"
    }
    Block {
      BlockType		      Step
      Name		      "阶跃输入"
      Position		      [240, 89, 275, 131]
      FontName		      "宋体, 89, 27"
      FontSize		      12
      Time		      "1"
      Before		      "0"
      After		      "1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "频谱分析仪"
      Ports		      [1, 0, 0, 0, 0]
      Position		      [475, 89, 505, 131]
      DropShadow	      on
      CopyFcn		      "ssfunpsd([],[],[],'CopyBlock')"
      DeleteFcn		      "ssfunpsd([],[],[],'DeleteBlock')"
      LoadFcn		      "ssfunpsd([],[],[],'LoadBlock')"
      StartFcn		      "ssfunpsd([],[],[],'Start')"
      NameChangeFcn	      "ssfunpsd([],[],[],'NameChange')"
      FontName		      "宋体npsd([],"
      FontSize		      12
      ShowPortLabels	      off
      MaskType		      "频谱分析仪],[],[],'NameChange')),35,35,20,20,10"
"],["
      MaskDescription	      "频谱分析仪(利用图形窗口显示实时结果)5 2.5],[5"
" 9],[1.5 1.5],[9 9],[2.5 1.5],[9 11],[2 2],[11:1/7:12],[2 2.5 2.707length(ht)"
",1);end;k to see how it works.1/7:12],[2 2.5 2.707 2.866 2.866 2.7"
      MaskHelp		      "当把该模块连接到一个系统的输出时,将以图形窗口

⌨️ 快捷键说明

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