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

📄 chou1.mdl

📁 信号实验常用的simulink模型和mfile,可直接在matlan下运行。
💻 MDL
📖 第 1 页 / 共 2 页
字号:
Model {
  Name			  "chou1"
  Version		  2.09
  SimParamPage		  Solver
  SampleTimeColors	  off
  InvariantConstants	  off
  WideVectorLines	  off
  ShowLineWidths	  off
  PaperOrientation	  landscape
  PaperType		  usletter
  PaperUnits		  inches
  StartTime		  "0.0"
  StopTime		  "9999"
  Solver		  ode45
  RelTol		  "1e-5"
  AbsTol		  "1e-5"
  Refine		  "1"
  MaxStep		  "0.001"
  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
  SimulationMode	  normal
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_vc.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		    "chou1"
    Location		    [12, 44, 606, 413]
    Open		    on
    ScreenColor		    white
    Block {
      BlockType		      ZeroPole
      Name		      "巴特沃斯\n低通滤波器1"
      Position		      [170, 93, 230, 137]
      FontName		      "宋体"
      FontSize		      12
      Zeros		      "z"
      Poles		      "p"
      Gain		      "k"
      MaskType		      "buttap"
      MaskDescription	      "Analog Butterworth low pass filter.\n\n(Requires"
			      " Signal Processing Toolbox)"
      MaskHelp		      "Butterworth low pass filter using MATLAB's "
			      "butter command."
      MaskPromptString	      "Cutoff frequency (rad/sec)|Order"
      MaskStyleString	      "edit,edit"
      MaskInitialization      "[z,p,k]=buttap(@2); z=@1*z; p=@1*p; k=real(prod("
			      "-p)); [num,den]=zp2tf(z,p,k); w=logspace(log10(@"
			      "1/10),log10(10*@1),20); h=freqs(num,den,w); "
      MaskDisplay	      "plot(20*log10(w),20*log10(abs(h)))"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      MaskValueString	      "60|4"
    }
    Block {
      BlockType		      ZeroPole
      Name		      "巴特沃斯\n低通滤波器2"
      Position		      [405, 168, 465, 212]
      FontName		      "宋体"
      FontSize		      12
      Zeros		      "z"
      Poles		      "p"
      Gain		      "k"
      MaskType		      "buttap"
      MaskDescription	      "Analog Butterworth low pass filter.\n\n(Requires"
			      " Signal Processing Toolbox)"
      MaskHelp		      "Butterworth low pass filter using MATLAB's "
			      "butter command."
      MaskPromptString	      "Cutoff frequency (rad/sec)|Order"
      MaskStyleString	      "edit,edit"
      MaskInitialization      "[z,p,k]=buttap(@2); z=@1*z; p=@1*p; k=real(prod("
			      "-p)); [num,den]=zp2tf(z,p,k); w=logspace(log10(@"
			      "1/10),log10(10*@1),20); h=freqs(num,den,w); "
      MaskDisplay	      "plot(20*log10(w),20*log10(abs(h)))"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      MaskValueString	      "60|4"
    }
    Block {
      BlockType		      SubSystem
      Name		      "乘法器"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [315, 179, 335, 201]
      FontName		      "Arial"
      FontSize		      12
      ShowPortLabels	      off
      MaskType		      "Dot Product"
      MaskDescription	      "Inner (dot) product.\ny=sum(u1.*u2)"
      MaskHelp		      "Computes the inner (dot) product of the inputs: "
			      "sum(u1.*u2).  The inputs are vectors of the "
			      "same length. Output is a scalar."
      MaskDisplay	      "disp('X')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      System {
	Name			"乘法器"
	Location		[33, 479, 253, 634]
	Open			off
	ScreenColor		white
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [15, 25, 35, 45]
	  Port			  "1"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Inport
	  Name			  "in_2"
	  Position		  [15, 90, 35, 110]
	  Port			  "2"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [65, 55, 90, 75]
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [125, 55, 145, 75]
	  Inputs		  "+"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [185, 55, 205, 75]
	  Port			  "1"
	  OutputWhenDisabled	  held
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in_2"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "抽样脉冲"
      Ports		      [0, 1, 0, 0, 0]
      Position		      [55, 227, 90, 263]
      FontName		      "宋体"
      FontSize		      12
      ShowPortLabels	      off
      MaskType		      "Pulse Generator"
      MaskDescription	      "Pulse Generator."
      MaskHelp		      "Pulse generator which ensures pulse\\ntransition"
			      "s are hit. Provides a vector of pulses when "
			      "the height is entered as a vector.\\nUnmask "
			      "to see how it works."
      MaskPromptString	      "Pulse period (secs):|Pulse width:|Pulse height:|"
			      "Pulse start time:"
      MaskStyleString	      "edit,edit,edit,edit"
      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	      "pi/100|0.001|1|0.5"
      System {
	Name			"抽样脉冲"
	Location		[158, 441, 759, 682]
	Open			off
	ScreenColor		white
	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		  "0"
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    Points		    [90, 0; 0, -75]
	    DstBlock		    "Logical\nOperator"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [55, 0; 0, 45]
	    DstBlock		    "Unit Delay1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  Points		  [0, 0]

⌨️ 快捷键说明

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